Package: llvm-13-runtime Version: 1:13.0.1-6 Severity: wishlist Tags: patch User: pkg-systemd-maintain...@lists.alioth.debian.org Usertags: systemd-binfmt
Hi, your package llvm-13-runtime declares a dependency (Recommends) on binfmt-support and ships binfmt-support configuration files in /usr/share/binfmts/. systemd provides a builtin, cross-distro facility named systemd-binfmt to register binary formats. You can read more about it at https://www.freedesktop.org/software/systemd/man/systemd-binfmt.html https://www.freedesktop.org/software/systemd/man/binfmt.d.html https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html The systemd package provides a dpkg file trigger so it is sufficient to simply install configuration files in /usr/lib/binfmt.d/, no modifications in the maintainer scripts are necessary. The attached patch adds support for systemd-binfmt and adjusts the dependency on binfmt-support accordingly, so binfmt-support is no longer installed automatically if systemd is already available. It also updates the autopkgtest suite to no longer require binfmt-support. Regards, Michael
diff -Nru llvm-toolchain-13-13.0.1/debian/control llvm-toolchain-13-13.0.1/debian/control --- llvm-toolchain-13-13.0.1/debian/control 2022-06-04 15:30:01.000000000 +0200 +++ llvm-toolchain-13-13.0.1/debian/control 2022-06-05 20:24:56.000000000 +0200 @@ -340,7 +340,7 @@ Package: llvm-13-runtime Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: binfmt-support +Recommends: binfmt-support | systemd Description: Modular compiler and toolchain technologies, IR interpreter LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff -Nru llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.binfmt.conf.in llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.binfmt.conf.in --- llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.binfmt.conf.in 1970-01-01 01:00:00.000000000 +0100 +++ llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.binfmt.conf.in 2022-06-05 20:24:56.000000000 +0200 @@ -0,0 +1 @@ +:llvm-@LLVM_VERSION@-runtime.binfmt:M::BC::/usr/bin/lli-@LLVM_VERSION@: diff -Nru llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.install.in llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.install.in --- llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.install.in 2021-08-27 11:35:35.000000000 +0200 +++ llvm-toolchain-13-13.0.1/debian/llvm-X.Y-runtime.install.in 2022-06-05 20:24:56.000000000 +0200 @@ -5,4 +5,5 @@ usr/bin/lli-child-target-@LLVM_VERSION@ debian/llvm-@LLVM_VERSION@-runtime.binfmt usr/share/binfmts/ +debian/llvm-@llvm_vers...@-runtime.binfmt.conf usr/lib/binfmt.d/ diff -Nru llvm-toolchain-13-13.0.1/debian/qualify-clang.sh llvm-toolchain-13-13.0.1/debian/qualify-clang.sh --- llvm-toolchain-13-13.0.1/debian/qualify-clang.sh 2022-06-04 15:29:01.000000000 +0200 +++ llvm-toolchain-13-13.0.1/debian/qualify-clang.sh 2022-06-05 20:24:56.000000000 +0200 @@ -305,9 +305,7 @@ clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc chmod +x foo.bc # only run if the binfmt is installed correctly -/usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> foo.log || true -if grep -q "interpreter = /usr/bin/lli-" foo.log; then - /usr/sbin/update-binfmts --enable llvm-$VERSION-runtime.binfmt || true +if grep -q "enabled" /proc/sys/fs/binfmt_misc/llvm-${VERSION}-runtime.binfmt; then if ! ./foo.bc|grep -q "lli foo"; then echo "executing ./foo.bc failed" ./foo.bc || true diff -Nru llvm-toolchain-13-13.0.1/debian/tests/control llvm-toolchain-13-13.0.1/debian/tests/control --- llvm-toolchain-13-13.0.1/debian/tests/control 2022-06-04 15:29:01.000000000 +0200 +++ llvm-toolchain-13-13.0.1/debian/tests/control 2022-06-05 20:24:56.000000000 +0200 @@ -1,5 +1,5 @@ Test-Command: bash -v ./debian/qualify-clang.sh -Depends: @, cmake, make, g++, file, dpkg-dev, binfmt-support +Depends: @, cmake, make, g++, file, dpkg-dev # Comment the dbgsym package because of bug #917528 # dbgsym packages not being available in testing # clang-13-dbgsym, libclang1-13-dbgsym