• Re: [PATCH] debian: packaging syzkaller

    From Soren Stoutner@21:1/5 to All on Tue Aug 27 11:36:26 2024
    To: debian-go@lists.debian.org
    Copy: yskelg@gmail.com (Yunseong Kim)

    Yunseong,

    Thank you for your work on this. As a next step, I would recommend you upload the package to the Mentors website.

    https://mentors.debian.net/

    That will assist you in finding a sponsor.

    On Tuesday, August 27, 2024 11:17:37 AM MST Yunseong Kim wrote:
    Hi debian mentor and debian-go member,

    This is my first time working on Debian packaging, so I need some advice.

    This link is my syzkaller repository on salsa.
    Link: https://salsa.debian.org/yunseongkim/syzkaller/-/tree/debian?ref_type=heads

    This is the dpkg-buildpackage log.
    Link: https://paste.debian.net/1327693/

    On 8/28/24 3:10 오전, Yunseong Kim wrote:
    Initially packaging works for syzkaller

    Signed-off-by: Yunseong Kim <yskelg@gmail.com>
    ---

    debian/.gitignore | 3 ++
    debian/changelog | 5 +++
    debian/compat | 1 +
    debian/control | 12 +++++++
    debian/copyright | 26 ++++++++++++++
    debian/files | 2 ++
    debian/rules | 84 ++++++++++++++++++++++++++++++++++++++++++++
    debian/source/format | 1 +
    8 files changed, 134 insertions(+)
    create mode 100644 debian/.gitignore
    create mode 100644 debian/changelog
    create mode 100644 debian/compat
    create mode 100644 debian/control
    create mode 100644 debian/copyright
    create mode 100644 debian/files
    create mode 100755 debian/rules
    create mode 100644 debian/source/format

    diff --git a/debian/.gitignore b/debian/.gitignore
    new file mode 100644
    index 000000000..29aca38cb
    --- /dev/null
    +++ b/debian/.gitignore
    @@ -0,0 +1,3 @@
    +syzkaller/
    +syzkaller.substvars
    +syzkaller.debhelper.log
    diff --git a/debian/changelog b/debian/changelog
    new file mode 100644
    index 000000000..e4d028bb5
    --- /dev/null
    +++ b/debian/changelog
    @@ -0,0 +1,5 @@
    +syzkaller (20240826+e4f3ea1bc2e0) unstable; urgency=medium
    +
    + * New upstream release)
    +
    + -- Yunseong Kim <yskelg@gmail.com> Sat, 24 Aug 2024 14:47:08 +0800
    diff --git a/debian/compat b/debian/compat
    new file mode 100644
    index 000000000..ec635144f
    --- /dev/null
    +++ b/debian/compat
    @@ -0,0 +1 @@
    +9
    diff --git a/debian/control b/debian/control
    new file mode 100644
    index 000000000..8cc29056b
    --- /dev/null
    +++ b/debian/control
    @@ -0,0 +1,12 @@
    +Source: syzkaller
    +Section: main
    +Priority: optional
    +Maintainer: Yunseong Kim <yskelg@gmail.com>
    +Build-Depends: debhelper (>= 9), dh-golang, golang-go:native (>= 1.3.0) +Standards-Version: 3.9.6
    +
    +Package: syzkaller
    +Architecture: arm64
    +Depends: ${shlibs:Depends}, ${misc:Depends}
    +Built-Using: ${misc:Built-Using}
    +Description: syzkaller is an unsupervised coverage-guided kernel fuzzer diff --git a/debian/copyright b/debian/copyright
    new file mode 100644
    index 000000000..855f4c5bf
    --- /dev/null
    +++ b/debian/copyright
    @@ -0,0 +1,26 @@
    +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: syzkaller
    +Source: https://github.com/google/syzkaller
    +
    +Files: *
    +Copyright: 2024 Yunseong Kim
    +License: Apache License 2.0
    + Copyright (c) 2024 Yunseong Kim
    + .
    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to
    permit
    persons to whom the Software is + furnished to do so, subject to the following conditions:
    + .
    + The above copyright notice and this permission notice shall be included
    in
    all + copies or substantial portions of the Software.
    + .
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR
    + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE.
    diff --git a/debian/files b/debian/files
    new file mode 100644
    index 000000000..d77937778
    --- /dev/null
    +++ b/debian/files
    @@ -0,0 +1,2 @@
    +syzkaller_20240826+e4f3ea1bc2e0_arm64.buildinfo main optional +syzkaller_20240826+e4f3ea1bc2e0_arm64.deb main optional
    diff --git a/debian/rules b/debian/rules
    new file mode 100755
    index 000000000..eacb4e9a5
    --- /dev/null
    +++ b/debian/rules
    @@ -0,0 +1,84 @@
    +#!/usr/bin/make -f
    +
    +export DH_OPTIONS
    +
    +##
    +# From git-lfs/git-lfs repo:
    +# Looks like dh_golang doesn't set diffrent archs, so you have to do them semi-manually. +##
    +
    +## This if-structure is decided on what is passed by the -a flag by dpkg-buildpackage command. +ifeq ($(DEB_HOST_ARCH), i386)
    + export GOARCH := 386
    +else ifeq ($(DEB_HOST_ARCH), amd64)
    + export GOARCH := amd64
    +else ifeq ($(DEB_HOST_ARCH), armhf)
    + export GOARCH := arm
    + # May need to set GOARM as well if your going to target ARM. But for
    now
    this works. +else ifeq ($(DEB_HOST_ARCH), arm64)
    + export GOARCH := arm64
    +endif
    +
    +# Or add your arch that your targeting, these are just examples.
    +
    +# Directory where compiled binary is placed + debian setup files.
    +# Note: If your doing building thru git, you may want to add obj-* to .gitignore +BUILD_DIR := obj-$(DEB_HOST_GNU_TYPE)
    +
    +# Required: Put the url (without http://) of your git repo.
    +export DH_GOPKG := github.com/google/syzkaller
    +
    +# Required: Put the name of your git repo below.
    +GIT_REPO_NAME := syzkaller
    +
    +export PATH := $(CURDIR)/$(BUILD_DIR)/bin:$(PATH)
    +
    +##
    +# by-default, dh_golang only copies *.go and other source - this upsets a bunch of vendor test routines +##
    +export DH_GOLANG_INSTALL_ALL := 1
    +
    +%:
    + dh $@ --buildsystem=golang --with=golang
    +
    +override_dh_clean:
    + rm -f debian/debhelper.log
    + dh_clean
    +
    +override_dh_auto_build:
    + #dh_auto_build
    + make CFLAGS=""
    + ##
    + # From git-lfs/git-lfs repo:
    + # dh_golang doesn't do anything here in deb 8, and it's needed in both + ##
    + if [ "$(DEB_HOST_GNU_TYPE)" != "$(DEB_BUILD_GNU_TYPE)" ]; then\
    + cp -rf $(BUILD_DIR)/bin/*/* $(BUILD_DIR)/bin/; \
    + fi
    +
    +override_dh_strip:
    + ##
    + # From git-lfs/git-lfs repo:
    + # strip disabled as golang upstream doesn't support it and it makes go crash. + # See https://launchpad.net/bugs/1200255.
    + ##
    +
    +override_dh_golang:
    + ##
    + # From git-lfs/git-lfs repo:
    + # The dh_golang is used to add the Built-using field to the deb. This
    is
    only for reference. + # As of https://anonscm.debian.org/cgit/collab-maint/dh-golang.git/commit/script/
    dh
    _golang?id=7c3fbec6ea92294477fa8910264fe9bd823f21c3 + # dh_golang
    errors out
    because the go compiler used was not installed via a package. Therefore the step is skipped + ##
    +
    +override_dh_auto_test:
    + make -j1 test
    +
    +override_dh_auto_install:
    + # This is making a "fakeroot" so that when the deb is installed the
    binary
    will be placed in /usr/bin. + mkdir -p debian/$(GIT_REPO_NAME)/usr/bin/
    + mkdir -p debian/$(GIT_REPO_NAME)/usr/share/doc/syzkaller/
    + # This is copying the binary and placing it in the fake root path.
    + cp -r docs/ debian/$(GIT_REPO_NAME)/usr/share/doc/syzkaller/
    + cp bin/*_*/syz-* bin/syz-* debian/$(GIT_REPO_NAME)/usr/bin/
    +
    diff --git a/debian/source/format b/debian/source/format
    new file mode 100644
    index 000000000..89ae9db8f
    --- /dev/null
    +++ b/debian/source/format
    @@ -0,0 +1 @@
    +3.0 (native)

    Please feel free to let me know if there are any improvements needed
    after reviewing the code. Thank you!

    Warm regards,
    Yunseong Kim


    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmbOHKoACgkQwufLJ66w tgOVSRAAibjY4pZ2E/FhNMh26Nro7Gt/DH8y755J994/6fIGeJFvV5HCyUo7eK8G pzM8ryAITXbt4STCtPqm8plpulCESrihidNGw1T/torISb3bibbeNWNdExYhg5yv AEsgeaZtbufcYCGexXiVNEHX46LuEvWMGSuMbk4+lVggaFfdp7guwNaWGyBk1F+p Au3FNnBqJuGgyzZrlukpSHsVhubQQ+6ophoUKOsR31Qr3oLfcO2ecZILqG4aeuKu KuyLg3n9npCi/99jA5s02949Q9KWHbrNWDhPAhkuCUuN8yetMzLdf2VLoeuc6ToL nviN+lTddGCoAzIT1wQYTgH8AXeO6NPkww8qLBSiY7/1OTS9urk2QcfGb1bJnKcS zuqmUEVf/C2YcMhmxbFWQHSJAuf+wBARCykNFPdf1hh25JFBAH2BnvXPRatq71cL HU2kosif1FFWK4JtaS3pivgOmdNL7jQHzw8ZfzGPB6otEQ8j/R48bZeV6QmmowrJ zuvcg9KHHxmrDJimG7QVi2sYdndlRbmKP2ut92Hl87FNRypV9uuSM+ghJV3nLMAo +Tu1MIAyDhZiGKkY37BsRWVyTnpDsoKkuLQ4OTJpRaM9YPZdKm2wbfGh3mAlFNDW +fz8Q4yOPquAw04Da/GJNvv8jBtsyylylWswrWIZ7sahQJGZrBc=
    =dMAl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Tue Aug 27 12:17:08 2024
    On Tuesday, August 27, 2024 12:06:55 PM MST Yunseong Kim wrote:
    I've uploaded my syzkaller package on mentors.debian.net.

    That was quick of you. If you haven’t already, you’ll want to file an ITP (Intent to Package). Then you will want to file a RFS (Requst for Sponsor). Instructions for both are at (which I assume you have already found):

    https://mentors.debian.net/intro-maintainers/

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmbOJjQACgkQwufLJ66w tgM6CA//Uk1Ix/zC15Fg+flkwNW825gUZBOwhmQtceygf/NBae2dR5fwtATr2ZUl zgd8IqEh8C7i4gAaPfTNhYoOYLro/1TeF8CqO0/mda2u/Vv/Wf3kVEdEmj+PfszV 02uLizE7KICkF8K9KJqnqx4JE7C8ZFRG/lW3I0f4KivH47TG2fHuF68UeXPLcxs0 EBMZuimKs7auYuzOu4WhbduRO7+6IwUet91DIZcFt0JazIlRuq3hs7a+PanA5eSz cHTJslEqAUE5xMY6/V7k2WuKlG0WV39ua8q1caGgBHU5My8kmjB1qVMHCgDZJY55 T3VmK+Vo/bfN/CUNe6VdlLi5yP7KQcY0CFEidZoRoXwJs0DkPfmg9qLqq2ZcGRCR m6MNkK8PqKmYQoe+NZA61c9q3h3NxFodbVEPPX1ZuyU/rDspJYVcyfzAEATR59md /azm/HMm/1ypfgc3ncpSNYrTSUf+we6jU8EJOcmTIzLa9ux6Jj2HLzupTdWPEKc4 l8kSM0Sd4Jj8eFyvUhweSNKI7HQtM3WALMNj2sng3DE+t6biWZM9vyghCWuJdNXQ r6CJT66TjlGgwx6GhQqLL9HvGx/UXCiRc4DwYXRIpVY3eMiNgGy8seNwEhw5C+0+ qmxZtYOFEAGz+OA/mLBXrfQqnV7asgQM368vzbtvKFSVKxCFG18=
    =F58G
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil Wyett@21:1/5 to Soren Stoutner on Tue Aug 27 21:50:01 2024
    On Tue, 2024-08-27 at 12:17 -0700, Soren Stoutner wrote:
    On Tuesday, August 27, 2024 12:06:55 PM MST Yunseong Kim wrote:
    I've uploaded my syzkaller package on mentors.debian.net.

    That was quick of you. If you haven’t already, you’ll want to file an ITP
    (Intent to Package). Then you will want to file a RFS (Requst for Sponsor).
    Instructions for both are at (which I assume you have already found):

    https://mentors.debian.net/intro-maintainers/


    Very quick indeed. The package is not in a state to be reviewed.

    I will offer the Debian Developers Corner link below for the submitter.

    https://www.debian.org/devel/

    Regards

    Phil

    --

    "I play the game for the game’s own sake"

    Arthur Conan Doyle - The Adventure of the Bruce-Partington Plans

    --

    Buy Me A Coffee: https://buymeacoffee.com/kathenasorg

    Internet Relay Chat (IRC): kathenas

    Matrix: #kathenas:matrix.org

    Website: https://kathenas.org

    Instagram: https://instagram.com/kathenasorg/

    Threads: https://www.threads.net/@kathenasorg

    --







    -----BEGIN PGP SIGNATURE-----

    iQJOBAABCAA4FiEEcKCsRax3nv6E9jrtckqptS8CTIsFAmbOLT0aHHBoaWxpcC53 eWV0dEBrYXRoZW5hcy5vcmcACgkQckqptS8CTIvvew//dMKkUEXvf37worCUB4IX cSsD5XtG0uRXxF+DzhZHEwyZ9U2GALXl/8SWbsUC6AwMA4ZdkEKtuJHYthrEFlkA dVATc1n5aDopIAB3oO0Ep/i7r7SixFWmiMqbGcAAGERQM2LxTQ5wnQgSjzHgJ4QV CabZvycoEdcWYlUxcHq3tRxv0JBnieO3ZnaGII3Lo3RZHrvUztpa0qMTVPBJN+QX k10Sb5BqJU0J4ItRiT9LbLbTO62LKATl4Yjg4lUM76lqSKX82eOI1qJ5AAnlB/wA c6iOTuPJZDuM3BvtYUx+ZTJiJX6IVmlMYh3RWWanvzXNrcl9V94/GMoWP3zM7NmJ f0tw8wlrO+19QYY67Pqsg62wZ4RQs0RlH5cIUT2Z/fKLMb6c7USFKrOlvZ5VtaeY zvMvcWmpHuSTlcEJ6KXDYhNA3aCUa1BYjZrVryNY+njUAbnpkwSS89p47
  • From Guillem Jover@21:1/5 to Yunseong Kim on Wed Aug 28 15:50:01 2024
    Hi!

    On Wed, 2024-08-28 at 03:10:51 +0900, Yunseong Kim wrote:
    Initially packaging works for syzkaller

    Thanks for reaching out to the lists as suggested on IRC. :)

    Prompted by the initial request in there, I had done a quick review pass
    over the commit provided and added comments inline, just in case
    someone else wants to dig further into the review, help mentoring or
    take it from there:

    https://salsa.debian.org/yunseongkim/syzkaller/-/commit/374da96e9379aa50ad2dfbfc44b892bde2c8de0a

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)