FS#48908 - [debootstrap] Directly sourcing /etc/makepkg.conf breaks POSIX compatibility
Attached to Project:
Community Packages
Opened by Tinu Weber (ayekat) - Tuesday, 12 April 2016, 13:08 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 07 February 2018, 15:56 GMT
Opened by Tinu Weber (ayekat) - Tuesday, 12 April 2016, 13:08 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 07 February 2018, 15:56 GMT
|
Details
Description:
`arch-detect.patch` adds lines that source `/etc/makepkg.conf` in order to determine the CARCH value. However, `/etc/makepkg.conf` is written for bash (and thus contains bashisms, like arrays), whereas debootstrap has the `#! /bin/sh` shebang and therefore expects to run on any POSIX-compatible shell, such as dash. Additional info: * package version: debootstrap-1.0.80-2-any Steps to reproduce: * Make `/bin/sh` a symlink to `/bin/dash`. * Run `debootstrap x y`. * See it crash with this error: /usr/bin/debootstrap: 11: /etc/makepkg.conf: Syntax error: "(" unexpected I have attached an updated `arch-detect.patch` that correctly wraps the sourcing of `/etc/makepkg.conf` in bash. However, this would add a dependency on bash, so it an alternative fix would perhaps be to manually extract the CARCH value. |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Wednesday, 07 February 2018, 15:56 GMT
Reason for closing: Fixed
Additional comments about closing: debootstrap 1.0.93-2
Wednesday, 07 February 2018, 15:56 GMT
Reason for closing: Fixed
Additional comments about closing: debootstrap 1.0.93-2
Since I'm not sure if the above patch is still valid, I have attached an up-to-date patch for `arch-detect.patch` to this comment.
pacman-conf was added in these commits BTW:
https://git.archlinux.org/pacman.git/commit/?id=170bb80a1f8a020595738c7febdb15c68574ce29
https://git.archlinux.org/pacman.git/commit/?id=d9eda13fc69eb0bfbbab6d7488e99e5c7b033d3a