rpm-software-management / rpm

The RPM package manager
http://rpm.org
Other
507 stars 366 forks source link

unshare plugin fails in a chroot #3187

Open pmatilai opened 4 months ago

pmatilai commented 4 months ago

Describe the bug unshare plugin fails in various ways when installing to a chroot.

To Reproduce Steps to reproduce the behavior:

  1. Install F41, install rpm-plugin-unshare
  2. dnf --installroot=/srv/test --disablerepo="*" --enablerepo="rawhide" install rpm

Expected behavior No errors encountered.

Output Errors like this repeated for various scriptlets:

[...] Running scriptlet: p11-kit-trust-0.25.3-4.fc40.x86_64 52/77 error: failed to mount private /: Invalid argument error: Plugin unshare: hook scriplet_fork_post failed warning: %post(p11-kit-trust-0.25.3-4.fc40.x86_64) scriptlet failed, exit status 126 [...]

Environment

pmatilai commented 2 months ago

https://unix.stackexchange.com/questions/554240/unshare-mount-inside-a-jenkins-chroot-environment seems to be right on the money... or at least relevant: / inside the chroot is not an actual mount-point.

pmatilai commented 2 months ago

Moving the / remount to the rpm parent process makes it work, but then that has other side-effects and causes one test to fail. That rabbit hole may be deep, and it's not something we can afford to dive into just before an rc.

pmatilai commented 1 month ago

Dropping 4.20 milestone, that ship sailed already. There's always the next update.

ttc0419 commented 3 weeks ago

@pmatilai Hi, is there any workarounds without re compiling rpm?

pmatilai commented 3 weeks ago

Just uninstall the plugin? Or use --noplugins for chroot operations.