FS#32789 - [pacman] should run install scripts with /bin/bash to allow non-bash /bin/sh

Attached to Project: Pacman
Opened by Nico Schottelius (telmich) - Wednesday, 21 November 2012, 23:03 GMT
Last edited by Allan McRae (Allan) - Wednesday, 21 November 2012, 23:47 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Dan McGee (toofishes)
Allan McRae (Allan)
Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.3
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

As I am running some thousands of /bin/sh calls each and every day, having /bin/sh point to /bin/bash (instead of /bin/dash) makes the process way slower than necessary.

I manually ln -sf'd /bin/dash to /bin/sh, but now the installation of packages like cpio fails:

(1/1) installing cpio [########################################] 100%
sh: 2: /tmp/alpm_J8srra/.INSTALL: Syntax error: "(" unexpected
error: command failed to execute correctly
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 21 November 2012, 23:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  in git
Comment by Gaetan Bisson (vesath) - Wednesday, 21 November 2012, 23:39 GMT
We can only solve one bug at a time. The issue you're reporting here is apparently that pacman calls /bin/sh on install scripts (which never specify a shebang) when the install script uses bashisms.

In my opinion we should expect install scripts to use bashisms, and therefore pacman should call /bin/bash instead. So I'll reassign this as a pacman bug and see what pacman devs think.
Comment by Allan McRae (Allan) - Wednesday, 21 November 2012, 23:47 GMT
pacman-4.1 (next release) is able to specify the shell for install scriptlets and will use bash in Arch Linux.

Loading...