FS#29987 - [wireshark-cli] 1.6.8-1 install script uses setcap which is not in PATH

Attached to Project: Arch Linux
Opened by John Bartholomew (jpab) - Wednesday, 23 May 2012, 17:01 GMT
Last edited by Guillaume ALAUX (galaux) - Sunday, 29 July 2012, 10:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

wireshark.install uses setcap directly, but setcap is in usr/sbin, which is not in PATH during the install. It should use the full path usr/sbin/setcap.

setcap is from [libcap] 2.22-3.

Additional info:

Package version: 1.6.8-1

$ sudo pacman -S wireshark-cli
Proceed with installation? [Y/n]
(1/1) checking package integrity [########################################] 100%
(1/1) loading package files [########################################] 100%
(1/1) checking for file conflicts [########################################] 100%
(1/1) checking available disk space [########################################] 100%
(1/1) upgrading wireshark-cli [########################################] 100%
/tmp/alpm_OaQwwF/.INSTALL: line 11: setcap: command not found
error: command failed to execute correctly

Steps to reproduce:

pacman sync wireshark-cli.
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Sunday, 29 July 2012, 10:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added en tested OK in 1.8.1-1
Comment by Ionut Biru (wonder) - Wednesday, 23 May 2012, 17:37 GMT
you want to check out why you don't have /usr/sbin/setcap, which is in libcap, package that is already as dependency.
Comment by John Bartholomew (jpab) - Wednesday, 23 May 2012, 17:38 GMT
I do have /usr/sbin/setcap. /usr/sbin is not in PATH when running the install script.

Edit: probably because I'm running pacman through sudo.
Comment by Ionut Biru (wonder) - Wednesday, 23 May 2012, 17:48 GMT
it should be. start investigating why is not in your PATH.
Comment by John Bartholomew (jpab) - Wednesday, 23 May 2012, 18:33 GMT
Ok, I've found the cause of that. A bad merge of /etc/slim.conf lead to an incorrect login_cmd which caused /etc/profile to be ignored for a SLiM login.

However, I note that
1) it seems to be common for install scripts to give the full path to commands, c.f. glibc.install, rather than assuming they'll be found in PATH, and
2) in a comment on  FS#19967  (https://bugs.archlinux.org/task/19967) Allan McRae states "Any error in assuming sbin is in the PATH is a packaging error."

Perhaps there should be a minimal list of directories in PATH during installs, and that should be enforced by pacman?

Loading...