Cyril Brulebois:
> Hi,
>
> Niels Thykier <[email protected]> (2019-02-24):
>> (Please CC me on replies per mail).
>
> (Done.)
>
>> I am seeing feedback on a PoC patch for dh_makeshlibs to have it
>> auto-detect udebs in the common case, where the udeb has the same name
>> as the deb followed by the suffix "-udeb". AFAICT, this will make
>> --add-udeb obsolete in many cases as many udebs follow the previous
>> mentioned naming convention.
>>
>> The patch is available at [SALSA]. Please let me know what you think
>> about it.
>>
>> Thanks,
>> ~Niels
>>
>> [SALSA]: https://salsa.debian.org/debian/debhelper/merge_requests/21
>
> Did you test rebuilding packages using that option against said
> debhelper, and were the results identical?
>
Thanks for the feedback. :)
I have tested this and they do.
Test method: I have verified this against systemd at git master[1] using
the following three variants/builds:
* Vanilla debhelper/12.2.3 with explicit --add-udeb
* Patched debhelper/12.2.3 with explicit --add-udeb
* Patched debhelper/12.2.3 dropping the "dh_makeshlibs -plibudev1 \
--add-udeb=libudev1-udeb [...]" line[2]
All three generate identical results (i.e. bit-for-bit identical
debs/udebs)[3].
> Slightly worried by people possibly blindly dropping --add-udeb and not
> checking what happens to their packages. Would be nice to double-check
> up-front that everything works as intended.
>
>
> Cheers,
>
I will never be able to make code that works all the time given the
premise that people "blindly" apply changes. However, it is not my goal
either. The goal for this change is to simplify udeb handling to remove
one papercut /in the common case/ for udeb packages in two forms:
1) Packages that need to add a new udeb will have one less step to
worry about when they follow the naming convention for udebs.
2) /Some/ existing udeb producing packages will be able to drop their
manual overrides (assuming they follow this convention as well).
An example of a package that would benefit is bind9, where we can
remove about 11 lines[4].
While most packages seem follow the convention, there are exceptions.
As an example, I spotted fontconfig[5] which will not benefit from this
change. Instead, it (and other exceptions) will have to keep --add-udeb.
Thanks,
~Niels
[1] Being pedantic, I manually disabling lto and skipped tested to speed
up the build. But neither of those changes affects what dh_makeshlibs
would do.
[2] I.e. the udeb is now handled by the "dh_makeshlibs
--remaining-packages" line two lines further down.
[3]
> $ sha256sum ../dh-udeb-*patched-*/* | perl -p -e 's@ [.][.]/.*/@@' | sort |
> uniq -c
> 3 038b3ed72cf8ea4e6d0053816ab30df4aa144c25424f86fbe2e8dd354fac8b55
> systemd-journal-remote-dbgsym_241-6_amd64.deb
> 3 1cbf500fadaf90186087f4a5fc6e8c4fe60862e340b11a99e4daca6e4e2b10b2
> systemd-coredump_241-6_amd64.deb
> 3 2aa7870a61ce402c09067fdfc56adb327b59ab1998201e526af68501a69163ba
> systemd-coredump-dbgsym_241-6_amd64.deb
> 3 2f1ab51bbb4cc228d1c1f3d289446873edcf48d6278031d70b455fc51513e4bd
> udev-udeb_241-6_amd64.udeb
> 3 46b2e60fdf18bca7a1e4fd8145fdd3e153d44fb441de12a997a4ca157e8faed8
> systemd_241-6_amd64.deb
> 3 48675c51db2a9b27dcdedf869fbe32e59a1f24c322ceba52b7c79dde72aa4b10
> libudev1_241-6_amd64.deb
> 3 49e8ab46e19ea8c1f430956144363dc9769c301f99ce0a51aa7ada7b9382d380
> systemd-tests_241-6_amd64.deb
> 3 4f0147d49c12afb5672bfcaa6b5b8dfa3cb7b09ad8cccc1f5bb6416414f9b9c1
> udev_241-6_amd64.deb
> 3 53489f3e9fa8839d0b93bc3316d0c09cb7e98ff51424d7961877822923b22a3d
> libudev1-dbgsym_241-6_amd64.deb
> 3 62f924f1e2575f58305b3a5d5937ee7c92ebce3eb4195252b17d77ee72955126
> udev-dbgsym_241-6_amd64.deb
> 3 67a1bf0f20d8e2a26c711434b9697fc52eb7798e1931a2401dac82a91db3cc45
> systemd-sysv_241-6_amd64.deb
> 3 6a44c6584d6c20bed06a50b5f6ebae21947e0c5ed879913a467d3e245c85ee0c
> systemd-tests-dbgsym_241-6_amd64.deb
> 3 925a78b13a78af8793ac6961bb6c8d48efa9dc083e4b07e7b773ff1b7512c3c2
> systemd-journal-remote_241-6_amd64.deb
> 3 9cc85ddf88adf862d32e81016f0ffcfe1abedee09f33b9463b7e3d35a1df99c2
> systemd-container_241-6_amd64.deb
> 3 9d26934e2223059e9be51d3488bfaafec8ed4c75cdce4721a9075f74c893b95a
> libsystemd0-dbgsym_241-6_amd64.deb
> 3 9e80822a057401bcf33248d0d2963b72ee5410db22f103f35769207298e9cbc0
> libsystemd-dev_241-6_amd64.deb
> 3 bd4359c7318613759873b519dc4b33c8f6d7bc51549181599f47d2ea6975d27b
> libnss-systemd_241-6_amd64.deb
> 3 be4235e2f121f81af37d177b02be6d5997e0dfaeaa4dbd89e21f820988c4e136
> libnss-systemd-dbgsym_241-6_amd64.deb
> 3 be5ce8fdbcd39f09e98da8702591cf809e051a4f6e1eabce4e16f78388b2c08d
> systemd-container-dbgsym_241-6_amd64.deb
> 3 c18217606b58a86679f9f861bb4c1ef0a25e61135e3c1415dc848c8e4360b5fa
> libudev1-udeb_241-6_amd64.udeb
> 3 d76f4486969095902d707054e8831ce426f944cfdfca2d60f71274d760ea69f3
> libpam-systemd-dbgsym_241-6_amd64.deb
> 3 d7ad01e09c3774300f5efad1b1f1cec9a14a2a25d53ee1f5ded8074fbf943f01
> systemd-dbgsym_241-6_amd64.deb
> 3 dbf2f5e8d790e10544b54a3690af4ccd621692f07ad4893e1cca9664187d8cad
> libudev-dev_241-6_amd64.deb
> 3 e00e105f6b28fedeb0087d7f5f19ef9eb805dc5f71ae1a26f6cbd0589968aafb
> libsystemd0_241-6_amd64.deb
> 3 e7879ad9a7d5987de4025abf20c7cd02bd6e8eff96ae10efcf0a4137f767c014
> libpam-systemd_241-6_amd64.deb
[4] The entire override_dh_makeshlibs target in bind9/1:9.11.5.P4+dfsg-5.1.
https://sources.debian.org/src/bind9/1:9.11.5.P4+dfsg-5.1/debian/rules/#L163-L174
[5] fontconfig/2.13.1-2 contains the following:
"""
override_dh_makeshlibs:
dh_makeshlibs -plibfontconfig1 -V"libfontconfig1 (>= 2.13)" \
--add-udeb="fontconfig-udeb" -- -c4
"""
(editorial note: I realigned it and added a backslash continuation to
readability in the mail)