Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1061178: usrmerge: Usrmerge fails with a staticly-linked cp command

7 views
Skip to first unread message

Ajax Dong

unread,
Jan 20, 2024, 5:50:05 AM1/20/24
to
Package: usrmerge
Version: 35
Severity: important
Tags: patch
X-Debbugs-Cc: ajax...@outlook.com

I'm reporting this bug on other device (the machine's host), so the system information is
irrelevant (However, they are both Debian Bookworm, all packages
up-to-date).

Days ago I upgraded one of my machines (I use sudo machinectl shell
network-service to get its shell) from Debian Buster to Debian Bookworm.
The cp and mv command on that machine was staticly-linked and
self-contained. (It does not require any shared library.) UseMerge
script failed with error "Cannot close fd". I traced to L222:

```perl
sub early_conversion_files {
open(my $fh, '-|', 'ldd /bin/cp');
my @ldd = <$fh>;
close $fh;
```

Because /bin/cp is staticly linked, ldd exited with error, $fh is not
open. In this senario, this function may be skipped. I added an early
return and finished the merge locally without other error.


-- System Information:
Debian Release: 12.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-17-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages usrmerge depends on:
ii libfile-find-rule-perl 0.34-3
ii perl 5.36.0-7+deb12u1

usrmerge recommends no packages.

usrmerge suggests no packages.

-- no debconf information

Marco d'Itri

unread,
Jan 20, 2024, 3:20:06 PM1/20/24
to
On Jan 20, Ajax Dong <ajax...@outlook.com> wrote:

> Days ago I upgraded one of my machines (I use sudo machinectl shell
> network-service to get its shell) from Debian Buster to Debian Bookworm.
> The cp and mv command on that machine was staticly-linked and
> self-contained. (It does not require any shared library.) UseMerge
This does not look like any Debian system I know.

> Because /bin/cp is staticly linked, ldd exited with error, $fh is not
Not on any of the Debian 10, 11 and 12 systems that I checked:

md:~$ ldd /sbin/ldconfig
statically linked
md:~$

And this ldd output does not cause early_conversion_files() to fail.
What's up then?

--
ciao,
Marco
signature.asc
0 new messages