Bug#914128: perl: usrmerge issues

Vagrant Cascadian vagrant at reproducible-builds.org
Thu Jul 15 21:40:04 BST 2021


Control: tags 914128 patch

On 2018-11-19, Niko Tyni wrote:
> Diffoscoping a perl built on a usrmerged [1] system with
> one built on a non-usrmerged system reveals the configure
> process hardcoding some paths in the build results,
>
> [1] https://wiki.debian.org/UsrMerge
>
> Snippets from config.h, Config.pm, Config_heavy.pl, config.sh.debug.gz
> and so forth include things below.
>
> The /bin vs. /usr/bin command paths can probably be fixed/worked around
> by passing the full /bin paths (which should work on both systems)
> directly to Configure. The /lib64 thing in libpth / glibpth looks like
> a bug to me. I don't know what to do about libsdirs and libsfound.
>
> There's potential breakage if perl is built on a usrmerged system but
> run on a non-usrmerged one. I suspect the breakage would not be very bad
> and that most of this is cosmetic and not widely used.

Attached are two patches which *partially* address the issues, fixing
binary paths and glibpth.


> -libpth => '/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib',
> +libpth => '/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64',

Still an issue. I tried patching Configure (and the relevent
regen-configure files) to not de-duplicate directories, but without
success. How to patch Configure sure is "fun". :)


> -lns='/bin/ln -s'
> +lns='/usr/bin/ln -s'
>
> -rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
> +rm_try='/usr/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'

Fixed by attached patch, *mostly* using unspecified binary paths.
full_sed is intended to actually contain a full path, so I specified
/bin/sed explicitly (since it works on both usrmerge/non-usrmerge
systems).


> -glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
> +glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib /lib64 /usr/lib64 /usr/local/lib64 '

Fixed by attached patch. Debian mostly uses multiarch rather than
bi-arch, and the bi-arch directories were only added when /usr/lib64
exists anyways...


> -libsdirs=' /usr/lib/x86_64-linux-gnu'
> +libsdirs=' /lib/x86_64-linux-gnu'
...
> -libsfound=' /usr/lib/x86_64-linux-gnu/libgdbm.so /usr/lib/x86_64-linux-gnu/libgdbm_compat.so /usr/lib/x86_64-linux-gnu/libdb.so /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libm.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libc.so /usr/lib/x86_64-linux-gnu/libcrypt.so'

No longer issues... ?


> -libspath=' /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib'
> +libspath=' /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64'

Still an issue. Probably inherited from libpth...


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Configure-libpth.U-Do-not-adjust-glibpth-when-usr-li.patch
Type: text/x-diff
Size: 1641 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20210715/ee92b1c1/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-debian-config.over-Set-working-values-for-full_sed-a.patch
Type: text/x-diff
Size: 942 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20210715/ee92b1c1/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20210715/ee92b1c1/attachment.sig>


More information about the Reproducible-builds mailing list