[klibc] Fwd: [Bug 2028571] Re: klibc-utils contains identical binaries
Thorsten Glaser
tg at mirbsd.de
Thu Jul 27 10:46:36 PDT 2023
---------- Forwarded message ----------
Date: Thu, 27 Jul 2023 16:40:58 -0000
Subject: [Bug 2028571] Re: klibc-utils contains identical binaries
jdupes normally considers hardlinks as one.
And, indeed, on my Debian system, I see:
-rwxr-xr-x 1 root root 36656 May 27 2021 gunzip*
-rwxr-xr-x 1 root root 36656 May 27 2021 gzip*
These aren’t hardlinks.
And indeed they aren’t hardlinks in the Debian binary package either:
$ paxtar -xOf klibc-utils_2.0.8-6.1_amd64.deb data.tar.xz | xz -d | paxtar -tvf - | fgrep zip
-rwxr-xr-x 1 root root 36656 May 27 2021 ./usr/lib/klibc/bin/gunzip
-rwxr-xr-x 1 root root 36656 May 27 2021 ./usr/lib/klibc/bin/gzip
debian/klibc-utils.install just has:
usr/lib/klibc/bin/*
These get placed there by:
override_dh_auto_install:
$(MAKE) install $(KLIBC_MAKEFLAGS)
Upstream usr/gzip/Kbuild does hardlink them in the build directory:
$(obj)/gunzip $(obj)/zcat: $(obj)/gzip
$(call cmd,ln)
The upstream “make install” call causes execution of:
install -m 755 usr/gzip/gzip usr/gzip/gunzip usr/gzip/zcat
../tmp/usr/lib/klibc/bin
And, indeed, this breaks up the hardlink.
I see two actions arising from this:
① The Debian packaging probably should run something like…
for pkgtopdir in debian/*/; do jdupes -rL "$pkgtopdir"; done
… after installing all the files.
@maximilian attems, are you reading?
② Upstream should probably not use install(1) to install hardlinked
files; perhaps recreate the hardlinks in the destination like the BSDs
do?
I’ll forward this to the upstream mailing list.
** Changed in: klibc (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2028571
Title:
klibc-utils contains identical binaries
Status in klibc package in Ubuntu:
Confirmed
Bug description:
```
$ jdupes -r /usr/lib/klibc/bin
Scanning: 38 files, 1 items (in 1 specified)
/usr/lib/klibc/bin/gunzip
/usr/lib/klibc/bin/gzip
/usr/lib/klibc/bin/zcat
/usr/lib/klibc/bin/halt
/usr/lib/klibc/bin/poweroff
/usr/lib/klibc/bin/reboot
```
Please replace these binaries with symlinks to reduce the size of the
uncompressed initramfs.
ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: klibc-utils 2.0.12-1
ProcVersionSignature: Ubuntu 6.2.0-25.25-generic 6.2.13
Uname: Linux 6.2.0-25-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: Unity:Unity7:ubuntu
Date: Mon Jul 24 21:14:36 2023
Dependencies: libklibc 2.0.12-1
InstallationDate: Installed on 2022-03-20 (491 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: klibc
UpgradeStatus: Upgraded to lunar on 2023-04-20 (95 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/2028571/+subscriptions
More information about the klibc
mailing list