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#65679 - [devtools] arch-nspawn expects file:// repo paths configured in the container exist on the host

Attached to Project: Arch Linux
Opened by Yu, Li Yu (afg) - Monday, 02 March 2020, 09:03 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 02 March 2020, 13:37 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Pierre Schmitz (Pierre)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If I configure a local repository in the container `Server = file:///b`.
Then try `arch-nspawn /path/to/container`, it would expect that `/b` exist on the host.

Failed to stat /b: No such file or directory

arch-nspawn inserts `--bind=/b` to systemd-nspawn's arguments, probably since [1].

It seems that the issue mentioned in the commit ( FS#45882 ) could be workarounded by passing --bind-ro manually.
makechrootpkg (which wraps arch-nspawn) also provides `-d` and `-D` for additional bind mounts.

[1] https://git.archlinux.org/devtools.git/commit/?id=69112171e5de910331e46cf3f848866550125024

---

My use case is: I have local file:// repositories in the host somewhere like /home/user/custompkgs and configured as
file:///custompkgs in the container. The change mentioned above required the repo have the same paths.
I used --bind-ro=/home/user/custompkgs:/custompkgs or -D /home/user/custompkgs:/custompkgs in arch-nspawn and makechrootpkg respectively.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Monday, 02 March 2020, 13:37 GMT
Reason for closing:  Not a bug
Comment by Eli Schwartz (eschwartz) - Monday, 02 March 2020, 13:29 GMT
That was literally the whole point of the commit in question, so I'm not sure what the problem is. Cachedirs are now mounted automatically, and this requires you to be consistent in the directory names.

You can just use file:///home/user/custompkgs inside the chroot as well.
Comment by Eli Schwartz (eschwartz) - Monday, 02 March 2020, 13:37 GMT

Loading...