]> granicus.if.org Git - zfs/commitdiff
Prevent dependencies on Debianized packages
authorAntonio Russo <antonio.e.russo@gmail.com>
Fri, 7 Jul 2017 17:45:17 +0000 (13:45 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 7 Jul 2017 17:45:17 +0000 (10:45 -0700)
Call dpkg-shlibdeps with arguments excluding the Debianized packages
lib{uutil1,nvpair1,zfs2,zpool2}linux from the auto-generated
dependencies of generated .debs. A shim dh_shlibdeps that calls the
real dh_shlibdeps with corresponding arguments is installed into a
temporary directory, which is in turn pre-pended to the PATH for the
alien call, working around alien's inability to directly alter the
dependencies of its output debs. Resolves #6106.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
Closes #6309
Closes #6106

config/deb.am

index 648417b2adc6e5dfb35a9c8b1e32fc0f7cbf73b1..6665e4a2d408bd455f06a44a7b341cc45a701410 100644 (file)
@@ -38,9 +38,24 @@ if CONFIG_USER
        pkg7=$${name}-test-$${version}.$${arch}.rpm; \
        pkg8=$${name}-dracut-$${version}.$${arch}.rpm; \
        pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \
+## Arguments need to be passed to dh_shlibdeps. Alien provides no mechanism
+## to do this, so we install a shim onto the path which calls the real
+## dh_shlibdeps with the required arguments.
+       path_prepend=`mktemp -d /tmp/intercept.XXX`; \
+       echo "#$(SHELL)" > $${path_prepend}/dh_shlibdeps; \
+       echo "`which dh_shlibdeps` -- \
+        -xlibuutil1linux -xlibnvpair1linux -xlibzfs2linux -xlibzpool2linux" \
+        >> $${path_prepend}/dh_shlibdeps; \
+## These -x arguments are passed to dpkg-shlibdeps, which exclude the
+## Debianized packages from the auto-generated dependencies of the new debs,
+## which should NOT be mixed with the alien-generated debs created here
+       chmod +x $${path_prepend}/dh_shlibdeps; \
+       env PATH=$${path_prepend}:$${PATH} \
        fakeroot $(ALIEN) --bump=0 --scripts --to-deb \
            $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
-           $$pkg8 $$pkg9;
+           $$pkg8 $$pkg9; \
+       $(RM) $${path_prepend}/dh_shlibdeps; \
+       rmdir $${path_prepend}; \
        $(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
            $$pkg8 $$pkg9;
 endif