If eg. setcap is in /sbin and user is building as a normal user without $PATH having /sbin, the build system will default to /usr/sbin/setcap as it's defined in AC_PATH_PROG and fail during the build with 'setcap: command not found'
For example, my $PATH as normal user: $ echo $PATH /usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 I see Debian and Ubuntu carries a patch that changes these hardcoded paths to what they have, but that's equally unwise. And since sbin is by definion a superuser directory, and some distributions indeed still make this distiction, this patch is cheap to apply, no regressions to others. Ref, http://www.delorie.com/gnu/docs/autoconf/autoconf_41.html Thanks!
>From 7a0300dddefa8cfbb5ca4af20901df41ba177a82 Mon Sep 17 00:00:00 2001 From: Samuli Suominen <ssuomi...@gentoo.org> Date: Sat, 8 Mar 2014 09:49:29 +0200 Subject: [PATCH] Find the tools for users with no /sbin:/usr/sbin in PATH since some systems still make the distiction between bin and sbin. --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 880672d..597dc14 100644 --- a/configure.ac +++ b/configure.ac @@ -65,16 +65,16 @@ AC_PROG_CC_C99 AC_PATH_PROG([M4], [m4]) AC_PATH_PROG([XSLTPROC], [xsltproc]) -AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon]) -AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck]) +AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) +AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) -AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap]) +AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) -AC_PATH_PROG([KILL], [kill], [/usr/bin/kill]) +AC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) -AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod]) +AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) -AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec]) +AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin]) M4_DEFINES= -- 1.9.0
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel