FS#75378 - [arch-install-scripts] arch-chroot 25.2 no longer working as expected from 24.2

Attached to Project: Arch Linux
Opened by Niels (zee99) - Tuesday, 19 July 2022, 21:25 GMT
Last edited by Kristian (klausenbusk) - Sunday, 31 July 2022, 00:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To David Runge (dvzrv)
Morten Linderud (Foxboron)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

Using arch-chroot a lot for image builds. Executig arch-chroot as root with a single mountpoint as target parameter and providing a command to execute in the chroot'd environment. Example:

arch-chroot /mnt /bin/bash -c "pacman-key --init"

(notice the mounted system is a loop device of a 8GB file, formatted as an ext4 fs and prepared with pacstrap)

This worked fine in version 24.2 (and still does) without any issues. All temporary mounts are "unmounted" (or lazy unmounted) when exiting the chroot.

With version 25.2 (and 25.1) this no longer works. When executing the above example command /mnt/dev is no longer unmounted (or lazy unmounted) with the warning "device busy". It is correct the device is busy due to gpg being run as part of the pacman-key command, however would expect that the lazy unmount would take care of that.

Because of the incomplete unmounting sub-sequent calls to arch-chroot fail as it can not remount /mnt/dev (it was never unmounted).

Would not expect such a fundamental change between 24.2 and 25.2 and this seems not to be intended behavior. I was not able to trace where the difference between 24.2 and 25.x is that make this change as it seems the codebase has changed substantially between 24.2 and 25.x
This task depends upon

Closed by  Kristian (klausenbusk)
Sunday, 31 July 2022, 00:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in arch-install-scripts 26-1 with this PR: https://github.com/archlinux/arch-instal l-scripts/pull/22.
Comment by Kristian (klausenbusk) - Thursday, 28 July 2022, 11:37 GMT Comment by Demurgos (demurgos) - Thursday, 28 July 2022, 18:48 GMT

Loading...