On Wed, Oct 23, 2024 at 11:07 PM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote: > > Hi Emil, > > commit 844835cd9a4e5f08e1a3eefb4928c5d769264894 breaks when NO DESTDIR is set: > > meson compile -C ../build > > meson setup --native-file build-dileks.ini ../build > > [ build-dileks.ini ] > ; SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@xxxxxxxxx> > ; SPDX-FileCopyrightText: 2024 Lucas De Marchi <lucas.de.marchi@xxxxxxxxx> > ; > ; 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- > > sudo LC_ALL=C meson install -C ../build > ... > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/depmod' > /home/dileks/src/kmod/git/scripts/kmod-symlink.sh: line 10: DESTDIR: > unbound variable > FAILED: install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/depmod' > failed with exit code 1. > > Works: > > sudo DESTDIR=/bin meson install -C ../build > ... > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/depmod' > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/insmod' > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/lsmod' > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/modinfo' > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/modprobe' > Running custom install script > '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/rmmod' > > $ ll /bin/*mod > -rwxr-xr-x 1 root root 67K 23. Okt 17:36 /bin/chmod > lrwxrwxrwx 1 root root 4 20. Okt 00:19 /bin/depmod -> kmod > lrwxrwxrwx 1 root root 4 20. Okt 00:19 /bin/insmod -> kmod > -rwxr-xr-x 1 root root 172K 23. Okt 23:02 /bin/kmod > lrwxrwxrwx 1 root root 4 20. Okt 00:19 /bin/lsmod -> kmod > lrwxrwxrwx 1 root root 4 20. Okt 00:19 /bin/rmmod -> kmod > > Set a default for DESTDIR (destdir)? > > Best regards, > -Sedat- Lucas have a fix for it: $ git diff diff --git a/scripts/kmod-symlink.sh b/scripts/kmod-symlink.sh index 6511284a97a6..f825eef89a69 100755 --- a/scripts/kmod-symlink.sh +++ b/scripts/kmod-symlink.sh @@ -7,4 +7,6 @@ set -euo pipefail # # For context read through https://github.com/mesonbuild/meson/issues/9 +DESTDIR=${DESTDIR:-/} + ln -sf kmod "$DESTDIR/$1" ***** $ sudo meson install -C ../build Dropping privileges to 'dileks' before running ninja... ninja: Entering directory `/home/dileks/src/kmod/build' ninja: no work to do. Installing libkmod.so.2.5.0 to /usr/lib/x86_64-linux-gnu Stripping target 'libkmod.so.2.5.0'. Installing kmod to /usr/bin Stripping target 'kmod'. Installing man/depmod.d.5 to /usr/share/man/man5 Installing man/modprobe.d.5 to /usr/share/man/man5 Installing man/modules.dep.5 to /usr/share/man/man5 Installing man/depmod.8 to /usr/share/man/man8 Installing man/insmod.8 to /usr/share/man/man8 Installing man/kmod.8 to /usr/share/man/man8 Installing man/lsmod.8 to /usr/share/man/man8 Installing man/modinfo.8 to /usr/share/man/man8 Installing man/modprobe.8 to /usr/share/man/man8 Installing man/rmmod.8 to /usr/share/man/man8 Installing man/modules.dep.bin.5 to /usr/share/man/man5 Installing /home/dileks/src/kmod/git/libkmod/libkmod.h to /usr/include Installing /home/dileks/src/kmod/git/shell-completion/bash/insmod to /usr/share/bash-completion/completions Installing /home/dileks/src/kmod/git/shell-completion/bash/lsmod to /usr/share/bash-completion/completions Installing /home/dileks/src/kmod/git/shell-completion/bash/rmmod to /usr/share/bash-completion/completions Installing /home/dileks/src/kmod/git/shell-completion/fish/insmod.fish to /usr/share/fish/vendor_functions.d Installing /home/dileks/src/kmod/git/shell-completion/fish/lsmod.fish to /usr/share/fish/vendor_functions.d Installing /home/dileks/src/kmod/git/shell-completion/fish/rmmod.fish to /usr/share/fish/vendor_functions.d Installing /home/dileks/src/kmod/git/shell-completion/zsh/_insmod to /usr/share/zsh/site-functions Installing /home/dileks/src/kmod/git/shell-completion/zsh/_lsmod to /usr/share/zsh/site-functions Installing /home/dileks/src/kmod/git/shell-completion/zsh/_rmmod to /usr/share/zsh/site-functions Installing /home/dileks/src/kmod/git/shell-completion/bash/kmod to /usr/share/bash-completion/completions Installing /home/dileks/src/kmod/build/meson-private/libkmod.pc to /usr/lib/x86_64-linux-gnu/pkgconfig Installing /home/dileks/src/kmod/build/meson-private/kmod.pc to /usr/share/pkgconfig Installing symlink pointing to libkmod.so.2.5.0 to /usr/lib/x86_64-linux-gnu/libkmod.so.2 Installing symlink pointing to libkmod.so.2 to /usr/lib/x86_64-linux-gnu/libkmod.so Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/depmod' Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/insmod' Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/lsmod' Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/modinfo' Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/modprobe' Running custom install script '/home/dileks/src/kmod/git/scripts/kmod-symlink.sh /usr/bin/rmmod' BR, -sed@-