From 74a664194602edf042b38869858e5a601e7f91dd Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 28 Mar 2019 16:54:09 -0400 Subject: Escape paths with ":" that are passed to systemd-nspawn --bind When parsing paths to automatically make available to the container, the ":" is used internally by systemd-nspawn to signify destinations in the container. Replace automatically with "\:" for the mounts that we set up, in order to safely handle a working directory etc. that contains this character. For bind options exposed to the user, it is assumed the user takes care of passing systemd-nspawn compatible paths themselves. Fixes FS#60845 Signed-off-by: Eli Schwartz Signed-off-by: Levente Polyak --- makechrootpkg.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makechrootpkg.in') diff --git a/makechrootpkg.in b/makechrootpkg.in index d9369d4..409f0e7 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -379,8 +379,8 @@ download_sources prepare_chroot if arch-nspawn "$copydir" \ - --bind="$PWD:/startdir" \ - --bind="$SRCDEST:/srcdest" \ + --bind="${PWD//:/\\:}:/startdir" \ + --bind="${SRCDEST//:/\\:}:/srcdest" \ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ /chrootbuild "${makepkg_args[@]}" then -- cgit v1.2.3-70-g09d2