mkarchroot, arch-nspawn: fix relative file copy
Hi, first merge request, hopefully it's up to standards. :)
Currently, giving a relative path to either scripts using the -f option
results in the path being incorrect.
We use readlink to get the absolute file paths of the files to be copied to
the container in order to copy them to a location matching the host.
Pierre
Merge request reports
Activity
added 5 commits
-
da693811...009c58f7 - 4 commits from branch
archlinux:master
- c2669a3a - mkarchroot, arch-nspawn: fix relative file copy
-
da693811...009c58f7 - 4 commits from branch
Hi Pierre, I'm actually not convinced this is a bug rather than a feature. If we fix the local relative paths (needs to fix
/
in 2 locations) for the-f
options, it is possible to copy over files f.e. to/etc/systemd/...
without actually needing to put a file there on the host system. one could have a side location preparing files in/home/foobar/test/etc/systemd
and use./etc/systemd
with working dir set to/home/foobar/test
.I think having
-f
behave like that has more gain compared to allowing to sit in/etc/systemd/
and passing./foo.conf
. What are your thoughts and use case taking all this into account?Edited by Levente Polyakping @harmfulbreeze
Hey,
I did not get the chance to use arch-nspawn lately, so I don't exactly remember my use case unfortunately. However your explanation makes total sense and clarifies its use, thank you.
I think having a clear explanation of the option in the man pages would go a long way. Should I instead contribute to the man pages to better explain the option?
Thanks :)
Pierre
Edited by Pierre Grasser
added scopequestion label
added resolutionnot-a-bug label