Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#54999 - [arch-install-scripts] unable to bind mount pacman cache onto pacstrap target

Attached to Project: Arch Linux
Opened by Asbjørn Apeland (aude) - Tuesday, 01 August 2017, 07:43 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 02 August 2017, 12:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I use the tool mkosi (https://github.com/systemd/mkosi). It has a feature to re-use a package cache, and does this via `mount --bind /path/to/cache new_root/path/to/package/cache`.

The bind mount is not used now, as pacstrap does a `mount $newroot $newroot --bind`, and this voids the sub-mounts.
https://git.archlinux.org/arch-install-scripts.git/tree/common?id=0b8efa0e422a3411cefeafea0d5561c7348aa65c#n82

I'm curious why pacstrap does this "bind mount target directory to itself". Is it necessary?

If it's not necessary, I propose to remove it.
If it's necessary, I propose to change it into a `mount --rbind`.


Additional info:
* arch-install-scripts 17-1


Steps to reproduce:

# mkdir newroot
# mkdir -p newroot/var/cache/pacman/pkg
# mount --bind /var/cache/pacman/pkg newroot/var/cache/pacman/pkg
# pacstrap -d newroot
(you will now see that all packages are downloaded, the bind mounted cache is voided)
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 02 August 2017, 12:32 GMT
Reason for closing:  Won't fix
Additional comments about closing:  mkosi will conform with pacstrap's behavior: https://github.com/systemd/mkosi/issues/ 124
Comment by Dave Reisner (falconindy) - Tuesday, 01 August 2017, 12:04 GMT Comment by Asbjørn Apeland (aude) - Wednesday, 02 August 2017, 09:28 GMT
Yes, that is the same issue.

Seems mkosi wants to adapt to pacstrap. I'm still curious, why bind mount to itself? Any part of the system need the target directory to be a mountpoint?
Comment by Dave Reisner (falconindy) - Wednesday, 02 August 2017, 12:32 GMT
Without the bind mount, genfstab doesn't have a proper root mountpoint to derive child mounts from.

Loading...