Bug#1006557: toybox: Causes initramfs-tools trigger to fail without giving a reason

2022-02-27 Thread Axel Beckert
Hi Antoni,

Antoni Villalonga wrote:
> I've checked why it works on my system. I've tested the package on a Debian
> Live environment where /bin is symlink to /usr/bin. \o/

Already suspected such a thing. But it's not related to the live
system but to the installation time. In more recent Debian
installations that symlink is there by default. Keyword here is
"usrmerge" or "merged /usr". But it's usefulness and sanity are
debated.

> I'll push it to Salsa ASAP.

Salsa seems still broken. :-/ Had to do my last upload without pushing
to Salsa first, too.

Anyway, I appreciated your prompt response! Thanks!

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#1006557: toybox: Causes initramfs-tools trigger to fail without giving a reason

2022-02-27 Thread Antoni Villalonga
On Sun, Feb 27, 2022 at 09:02:17PM +0100, Axel Beckert wrote:
> Package: toybox
> Version: 0.8.6+dfsg-2
> Severity: serious
> 
> Hi,
> 
> since I upgraded toybox to 0.8.6+dfsg-2, the initramfs-tools trigger
> fails on my machine:
> 
> Processing triggers for initramfs-tools (0.140) ...
> update-initramfs: Generating /boot/initrd.img-5.16.0-3-amd64
> E: /usr/share/initramfs-tools/hooks/zy-toybox failed with return 1.
> update-initramfs: failed for /boot/initrd.img-5.16.0-3-amd64 with 1.
> dpkg: error processing package initramfs-tools (--configure):
>  installed initramfs-tools package post-installation script subprocess 
> returned error exit status 1
> 
> Unfortunately /usr/share/initramfs-tools/hooks/zy-toybox doesn't note
> what exactly went wrong.
> 
> [...]
> Changing
> 
>   TB_BIN=/usr/bin/toybox
> 
> to
> 
>   TB_BIN=/bin/toybox
> 
> fixes this.

Hi Axel,

Thanks for reporting the bug and the fix.

I've checked why it works on my system. I've tested the package on a Debian
Live environment where /bin is symlink to /usr/bin. \o/

Your fix proposal is correct.
I'll push it to Salsa ASAP.

Thanks for your time!

-- 
Antoni Villalonga
https://friki.cat/



Bug#1006557: toybox: Causes initramfs-tools trigger to fail without giving a reason

2022-02-27 Thread Axel Beckert
Package: toybox
Version: 0.8.6+dfsg-2
Severity: serious

Hi,

since I upgraded toybox to 0.8.6+dfsg-2, the initramfs-tools trigger
fails on my machine:

Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.16.0-3-amd64
E: /usr/share/initramfs-tools/hooks/zy-toybox failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.16.0-3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1

Unfortunately /usr/share/initramfs-tools/hooks/zy-toybox doesn't note
what exactly went wrong.

I've added a "set -x" to /usr/share/initramfs-tools/hooks/zy-toybox and
it fails as follows:

~ # dpkg --configure -a
Setting up initramfs-tools (0.140) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.16.0-3-amd64
+ echo 
+ exit 0
+ TB_BIN=/usr/bin/toybox
+ [ n =  ]
+ [ -r /usr/share/initramfs-tools/hook-functions ]
+ . /usr/share/initramfs-tools/hook-functions
+ [ -f /var/tmp/mkinitramfs_Z7BaTH/bin/sh ]
+ rm -f /var/tmp/mkinitramfs_Z7BaTH/bin/toybox
+ copy_exec /usr/bin/toybox /bin/toybox
+ local src target x nonoptlib ret
+ src=/usr/bin/toybox
+ target=/bin/toybox
+ copy_file binary /usr/bin/toybox /bin/toybox
+ local type src target link_target
+ type=binary
+ src=/usr/bin/toybox
+ target=/bin/toybox
+ [ -f /usr/bin/toybox ]
+ return 2
+ return 1
E: /usr/share/initramfs-tools/hooks/zy-toybox failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.16.0-3-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
 initramfs-tools
dpkg --configure -a  5.13s user 2.38s system 96% cpu 7.800 total

Changing

  TB_BIN=/usr/bin/toybox

to

  TB_BIN=/bin/toybox

fixes this.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), 
(500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 
'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.16.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages toybox depends on:
ii  libc6  2.33-7
ii  libcrypt1  1:4.4.27-1.1

toybox recommends no packages.

toybox suggests no packages.

-- no debconf information