Bug #251
[libremakepkg] Bind mount $SRCDEST and $PKGDEST
100%
Description
This will be easier with #261, but also requires a change in logic. Right now it copies the files between the inside and outside directories; if we bind mount them it must chown them instead.
History
Updated by lukeshu over 11 years ago
I'm not sure that's a good idea.
Sharing CacheDir makes sense, because all of the files there are owned by root. However, SRCDEST is owned by a normal user outside of the chroot, and sort-of root and sort-of "nobody" inside of the chroot. We could chown the files when done, but if there were an error and we had to bail early that wouldn't happen. I think it makes more sense to copy the files from the chroots's SRCDEST to the outside SRCDEST and chown them at once.
Updated by fauno over 11 years ago
dirty hack: make "nobody" on chroot have the same uid as the packager's user (most probably 1000) or better, create a 'packager' user on the chroot with the same said logic :)
then run chroot tools as this user
Updated by mtjm over 11 years ago
Do we need SRCDEST to be owned by the normal user? I nearly never need to modify them.
Updated by lukeshu almost 11 years ago
mtjm: yes, not to modify them manually, but so that tools can (normal makepkg, librestage, librerelease)
I'm removing this from the "don't break and confuse parabolers" target; I'm happy with how copying works, and like I said, I'm not sure this is a good idea. I'm leaving it open as a "wish", in case we ever want to revisit it.
Updated by lukeshu almost 11 years ago
Upstream makechrootpkg does this; sort of. It bind mounts them to srcdest_host and pkgdest_host, then symlinks the files, then copies the new files to *_host when done.
We'll get that the next time I merge devtools updates.
Updated by lukeshu over 10 years ago
Having upgraded to the new devtools, it now does this (as explained in my previous comment).