Message ID | CA+icZUW_K-f-ATDuvtsjXokx7aWUcfh7XpW2JhxBeegXp3V4xw@mail.gmail.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | First experiments with kmod-git and meson build-system | expand |
Context | Check | Description |
---|---|---|
mcgrof/vmtest-modules-next-PR | fail | merge-conflict |
Hi Sedat, On Fri, 18 Oct 2024 at 11:48, Sedat Dilek <sedat.dilek@gmail.com> wrote: > > Hi, > Have you tested the resulting files, or you're just building testing? In case of the latter we already have CI which covers Debian so :shrug: > looks like etc directory was not copied to $PREFIX. > Yes, meson behaves differently wrt /etc - not much we can do there. Ideally you can check how other Debian packages using meson deal with this and borrow the approach. > meson setup --prefix $PREFIX --sysconfdir $PREFIX/etc --native-file > build-dev.ini ../build > The build-dev.ini is a configuration file for kmod _developers_, so it for packaging purposes seems off IMHO. If you want to help with the Debian side, you can reach out to their maintainer Marco (CC'd) via the debian bug tracker, email or salsa[1]. HTH Emil [1] https://salsa.debian.org/md/kmod
On Fri, Oct 18, 2024 at 2:01 PM Emil Velikov <emil.l.velikov@gmail.com> wrote: > > Hi Sedat, > > On Fri, 18 Oct 2024 at 11:48, Sedat Dilek <sedat.dilek@gmail.com> wrote: > Have you tested the resulting files, or you're just building testing? > In case of the latter we already have CI which covers Debian so > :shrug: > Hi Emil, Great, you consider Debian/unstable builds in your CI. Thanks. > > looks like etc directory was not copied to $PREFIX. > > > > Yes, meson behaves differently wrt /etc - not much we can do there. > Ideally you can check how other Debian packages using meson deal with > this and borrow the approach. > Hmmm, can this be somehow documented - say in README.md? > > meson setup --prefix $PREFIX --sysconfdir $PREFIX/etc --native-file > > build-dev.ini ../build > > > > The build-dev.ini is a configuration file for kmod _developers_, so it > for packaging purposes seems off IMHO. > Yupp. Did upgrade to latest kmod-git and moved to a custom ini file - see below. [ Documentation ] README.md requires some hints to manpages and docs build requirements: manpages: scdoc docs: gtk-doc-tools (/usr/bin/gtkdoc-scan) Link: https://packages.debian.org/sid/all/gtk-doc-tools/filelist I see some more improvements to README.md. Offer: I can cook up a patch and send for review. > If you want to help with the Debian side, you can reach out to their > maintainer Marco (CC'd) via the debian bug tracker, email or salsa[1]. > > HTH > Emil > [1] https://salsa.debian.org/md/kmod Ah Marco :-)! I did an install from kmod-git with overwriting the kmod binary and libkmod library. Renew my initrd.img file: KVER="6.12.0-rc3-1-amd64-clang19-kcfi" ; update-initramfs -c -k $KVER -v 2>&1 | tee log_update-initramfs_$KVER.txt Booted fine! I saw some other things like: file /usr/lib/x86_64-linux-gnu/libkmod.so* /usr/lib/x86_64-linux-gnu/libkmod.so: symbolic link to libkmod.so.2 /usr/lib/x86_64-linux-gnu/libkmod.so.2: symbolic link to libkmod.so.2.5.0 /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3990121244ac36f617b2d289712054ecb1e390ba, with debug_info, not stripped Or an ASAN complaint is displayed requiring a LD_PRELOAD when "b_sanitize = 'address,undefined'" is used (when running update-initramfs). I have done my own INI file: --- build-dev.ini 2024-10-19 13:24:58.806312629 +0200 +++ build-dileks.ini 2024-10-19 13:26:05.332670566 +0200 @@ -4,15 +4,15 @@ ; SPDX-License-Identifier: LGPL-2.1-or-later [project options] -build-tests = true -debug-messages = true -docs = true +build-tests = false +debug-messages = false +docs = false zstd = 'enabled' xz = 'enabled' zlib = 'enabled' openssl = 'enabled' werror = true -b_sanitize = 'address,undefined' +;b_sanitize = 'address,undefined' [built-in options] -buildtype = 'debugoptimized' +;buildtype = 'debugoptimized' ^^ What buildtype other than above exists? Thanks for the helpful hints, Emil. Best regards, -Sedat-
On Sat, 19 Oct 2024 at 12:35, Sedat Dilek <sedat.dilek@gmail.com> wrote: > > On Fri, Oct 18, 2024 at 2:01 PM Emil Velikov <emil.l.velikov@gmail.com> wrote: > > > > Hi Sedat, > > > > On Fri, 18 Oct 2024 at 11:48, Sedat Dilek <sedat.dilek@gmail.com> wrote: > > > Have you tested the resulting files, or you're just building testing? > > In case of the latter we already have CI which covers Debian so > > :shrug: > > > > Hi Emil, > > Great, you consider Debian/unstable builds in your CI. We already do use Debian unstable - see the .github folder, in particular [1] [1] https://github.com/kmod-project/kmod/blob/2758cb57ebe2b7bbf3b435544187a98702929b48/.github/workflows/main.yml#L34 > Thanks. > > > > looks like etc directory was not copied to $PREFIX. > > > > > > > Yes, meson behaves differently wrt /etc - not much we can do there. > > Ideally you can check how other Debian packages using meson deal with > > this and borrow the approach. > > > > Hmmm, can this be somehow documented - say in README.md? > Don't think it scales to document more than the very basics build and install in kmod's README. Meson has a dedicated site plus a very active discussion and issues sections. > > > meson setup --prefix $PREFIX --sysconfdir $PREFIX/etc --native-file > > > build-dev.ini ../build > > > > > > > The build-dev.ini is a configuration file for kmod _developers_, so it > > for packaging purposes seems off IMHO. > > > > Yupp. > Did upgrade to latest kmod-git and moved to a custom ini file - see below. > > [ Documentation ] > > README.md requires some hints to manpages and docs build requirements: > > manpages: scdoc > docs: gtk-doc-tools (/usr/bin/gtkdoc-scan) > > Link: https://packages.debian.org/sid/all/gtk-doc-tools/filelist > > I see some more improvements to README.md. > Offer: I can cook up a patch and send for review. > Yes please, nicely spotted. Please read over the CONTRIBUTING.md file for tips. Try to use the general project name (gtk-doc) and not the package name. > > If you want to help with the Debian side, you can reach out to their > > maintainer Marco (CC'd) via the debian bug tracker, email or salsa[1]. > > > > HTH > > Emil > > [1] https://salsa.debian.org/md/kmod > > Ah Marco :-)! > > I did an install from kmod-git with overwriting the kmod binary and > libkmod library. > > Renew my initrd.img file: > > KVER="6.12.0-rc3-1-amd64-clang19-kcfi" ; update-initramfs -c -k $KVER > -v 2>&1 | tee log_update-initramfs_$KVER.txt > > Booted fine! > > I saw some other things like: > > file /usr/lib/x86_64-linux-gnu/libkmod.so* > /usr/lib/x86_64-linux-gnu/libkmod.so: symbolic link to libkmod.so.2 > /usr/lib/x86_64-linux-gnu/libkmod.so.2: symbolic link to libkmod.so.2.5.0 > /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0: ELF 64-bit LSB shared > object, x86-64, version 1 (SYSV), dynamically linked, > BuildID[sha1]=3990121244ac36f617b2d289712054ecb1e390ba, with > debug_info, not stripped > > Or an ASAN complaint is displayed requiring a LD_PRELOAD when > "b_sanitize = 'address,undefined'" is used (when running > update-initramfs). > Yup, those are expected... Speaking of which - with the sanitizers enablement move to `build-dev.ini` I forgot to update the README :-) > I have done my own INI file: > > --- build-dev.ini 2024-10-19 13:24:58.806312629 +0200 > +++ build-dileks.ini 2024-10-19 13:26:05.332670566 +0200 > @@ -4,15 +4,15 @@ > ; SPDX-License-Identifier: LGPL-2.1-or-later > > [project options] > -build-tests = true > -debug-messages = true > -docs = true > +build-tests = false > +debug-messages = false > +docs = false > zstd = 'enabled' > xz = 'enabled' > zlib = 'enabled' > openssl = 'enabled' > werror = true > -b_sanitize = 'address,undefined' > +;b_sanitize = 'address,undefined' > > [built-in options] > -buildtype = 'debugoptimized' > +;buildtype = 'debugoptimized' > > ^^ What buildtype other than above exists? > Check the meson website - it describes them quite well [2] [2] https://mesonbuild.com/Builtin-options.html#details-for-buildtype -Emil > Thanks for the helpful hints, Emil. > > Best regards, > -Sedat-
On Sat, Oct 19, 2024 at 4:31 PM Emil Velikov <emil.l.velikov@gmail.com> wrote: ... > > [built-in options] > > -buildtype = 'debugoptimized' > > +;buildtype = 'debugoptimized' > > > > ^^ What buildtype other than above exists? > > > > Check the meson website - it describes them quite well [2] > > [2] https://mesonbuild.com/Builtin-options.html#details-for-buildtype > > -Emil > Thanks. In my custom INI file: [built-in options] buildtype = 'release' and: sudo meson install --strip -C ../build Results: # file /bin/kmod /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 /bin/kmod: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Build ID[sha1]=ef45146171c0036544a9345fbd7d0c96e3fa4cc3, for GNU/Linux 3.2.0, stripped /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=725a4446b481b380588011e4e8733c1db eed3c82, stripped # ll /bin/kmod /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 -rwxr-xr-x 1 root root 172K 19. Okt 23:51 /bin/kmod -rwxr-xr-x 1 root root 103K 19. Okt 23:51 /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 Best regards, -Sedat- [ PREREQS ] apt-get update # man-pages apt-get install -t unstable scdoc -s apt-get install -t unstable scdoc -y # docs ##apt-get install -t unstable gtk-doc-tools -s ##apt-get install -t unstable gtk-doc-tools -y [ BASE-DIR ] BASE_DIR="$HOME/src/kmod" mkdir $BASE_DIR [ KMOD GIT ] cd $BASE_DIR git clone git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git git [ build-dileks.ini ] ; SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@gmail.com> ; SPDX-FileCopyrightText: 2024 Lucas De Marchi <lucas.de.marchi@gmail.com> ; ; SPDX-License-Identifier: LGPL-2.1-or-later [project options] build-tests = false debug-messages = false docs = false zstd = 'enabled' xz = 'enabled' zlib = 'enabled' openssl = 'enabled' werror = true ;b_sanitize = 'address,undefined' [built-in options] buildtype = 'release' - EOF - NOTE: build-tests option requires linux-headers package(s) to be installed! [ BUILD-DIR ] cd $BASE_DIR mkdir build [ CONFIGURE ] cd git meson setup --native-file build-dileks.ini ../build [ BUILD ] meson compile -C ../build [ INSTALL ] sudo meson install --strip -C ../build -dileks // 19-Oct-2024: Update to kmod-v33-314-g557e79c360a3; Use buildtype = 'release' and add '--strip' to install -dileks // 18-Oct-2024: Initial release
On Sun, Oct 20, 2024 at 12:07 AM Sedat Dilek <sedat.dilek@gmail.com> wrote: > > On Sat, Oct 19, 2024 at 4:31 PM Emil Velikov <emil.l.velikov@gmail.com> wrote: > ... > > > [built-in options] > > > -buildtype = 'debugoptimized' > > > +;buildtype = 'debugoptimized' > > > > > > ^^ What buildtype other than above exists? > > > > > > > Check the meson website - it describes them quite well [2] > > > > [2] https://mesonbuild.com/Builtin-options.html#details-for-buildtype > > > > -Emil > > > > Thanks. > > In my custom INI file: > > [built-in options] > buildtype = 'release' > > and: > > sudo meson install --strip -C ../build > > Results: > > # file /bin/kmod /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 > /bin/kmod: ELF 64-bit LSB pie > executable, x86-64, version 1 (SYSV), dynamically linked, interpreter > /lib64/ld-linux-x86-64.so.2, Build > ID[sha1]=ef45146171c0036544a9345fbd7d0c96e3fa4cc3, for GNU/Linux 3.2.0, stripped > /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0: ELF 64-bit LSB shared > object, x86-64, version 1 (SYSV), dynamically linked, > BuildID[sha1]=725a4446b481b380588011e4e8733c1db > eed3c82, stripped > > # ll /bin/kmod /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 > -rwxr-xr-x 1 root root 172K 19. Okt 23:51 /bin/kmod > -rwxr-xr-x 1 root root 103K 19. Okt 23:51 > /usr/lib/x86_64-linux-gnu/libkmod.so.2.5.0 > Link: https://mesonbuild.com/Release-notes-for-0-62-0.html#meson-install-strip
Add strip option to custom INI file: [ build-dileks.ini ] ; SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@gmail.com> ; SPDX-FileCopyrightText: 2024 Lucas De Marchi <lucas.de.marchi@gmail.com> ; ; SPDX-License-Identifier: LGPL-2.1-or-later [project options] build-tests = false debug-messages = false docs = false zstd = 'enabled' xz = 'enabled' zlib = 'enabled' openssl = 'enabled' werror = true strip = true [built-in options] buildtype = 'release' - EOF - BR, -sed@-
--- a/build-dev.ini +++ b/build-dev.ini @@ -4,7 +4,7 @@ ; SPDX-License-Identifier: LGPL-2.1-or-later [project options] -build-tests = true +build-tests = false debug-messages = true docs = true zstd = 'enabled'