summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAntonio Russo <[email protected]>2017-07-07 13:45:17 -0400
committerBrian Behlendorf <[email protected]>2017-07-07 10:45:17 -0700
commitc34efbebd577644674a7cf543b3e0540c9f0fa9f (patch)
tree59733d9ef369df4f606e65eb48badb3056d6daa6 /config
parent92e43c17188d47f47b69318e4884096dec380e36 (diff)
Prevent dependencies on Debianized packages
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 <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #6309 Closes #6106
Diffstat (limited to 'config')
-rw-r--r--config/deb.am17
1 files changed, 16 insertions, 1 deletions
diff --git a/config/deb.am b/config/deb.am
index 648417b2a..6665e4a2d 100644
--- a/config/deb.am
+++ b/config/deb.am
@@ -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