FS#60845 - {devtools} makechrootpkg: cannot handle bind directories with colons (:)

Attached to Project: Arch Linux
Opened by mearon (mearon) - Sunday, 18 November 2018, 01:07 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 21 August 2019, 04:50 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version 5.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

When makechrootpkg is invoked in a path with has a colon in its name, it fails. This is probably due to how arch-nspawn is called here: https://git.archlinux.org/devtools.git/tree/makechrootpkg.in#n419

$ pwd
/home/user/build/sway_2018-11-17T18:51:31+01:00/scdoc
$ makechrootpkg -c -r $BUILD_CHROOT
.......
==> Validating source files with sha512sums...
scdoc-1.5.2.tar.gz ... Passed
Failed to parse --bind(-ro)= argument /home/user/build/sway_2018-11-17T18:51:31+01:00/scdoc:/startdir: Invalid argument
==> ERROR: Build failed, check /home/user/build/nspawn_archbuild/user/build



Steps to Reproduce:

- copy arbitrary PKGBUILD into a directory with at minimum one colon in its name
- enter that directory
- invoke makechroot -r <some chroot>
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 21 August 2019, 04:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  https://git.archlinux.org/devtools.git/c ommit/?id=74a664194602edf042b38869858e5a 601e7f91dd
Comment by Eli Schwartz (eschwartz) - Sunday, 18 November 2018, 01:28 GMT
  • Field changed: Attached to Project (Pacman → Arch Linux)
  • Field changed: Summary ([devtools] makechrootpkg: cannot handle bind directories with colons (:) → {devtools} makechrootpkg: cannot handle bind directories with colons (:))
  • Field changed: Status (Unconfirmed → Unassigned)
According to systemd-nspawn documentation, "Backslash escapes are interpreted, so "\:" may be used to embed colons in either path." Since we internally pass this argument, we internally should escape it.

Note: this will also need to be fixed for cachedir handling in arch-nspawn.
Note2: This should *not* be fixed in makechrootpkg's -d and -D arguments, as those are user paths, and if a user wishes to bind-mount a directory to some other location inside the chroot, they obviously need to be able to do so themselves...

Loading...