Bugzilla – Bug 886
Configure prefix option ignored due to hard coded references
Last modified: 2019-10-14 10:35:57 MDT
Attempts to install sudo 1.8.27 into a non-standard location using the configure prefix option fails due to hard coded references to /usr/local/libexec For example: $ ./configure --prefix=/tmp/relocate --disable-shared $ make $ make install Abbreviated output shows error: .... mkdir /usr/local/libexec/sudo mkdir: 0653-357 Cannot access directory /usr/local/libexec. /usr/local/libexec: The file access permissions do not allow the specified action. make: 1254-004 The error code from the last command is 2. The following hard coded references appear to be the cause: $ egrep /usr/local/libexec configure noexec_file=/usr/local/libexec/sudo/sudo_noexec.so sesh_file=/usr/local/libexec/sudo/sesh PLUGINDIR=/usr/local/libexec/sudo My understanding is these directories should be under ${libexecdir}. Performing the following substitution before running configure allows the installation to complete: $ cp configure configure.orig $ sed -e 's:/usr/local/libexec:${libexecdir}:' configure.orig > configure Full output from original failing command : make install for d in lib/util lib/zlib plugins/group_file plugins/sudoers plugins/system_group src include doc examples; do (cd $d && exec make pre-install) && continue; exit $?; done Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. Target "pre-install" is up to date. for d in lib/util lib/zlib plugins/group_file plugins/sudoers plugins/system_group src include doc examples; do (cd $d && exec make "INSTALL_OWNER=-o 0 -g 0" install) && continue; exit $?; done /bin/sh ../../mkinstalldirs /tmp/relocate/libexec/sudo mkdir /tmp/relocate/libexec mkdir /tmp/relocate/libexec/sudo case "-static -export-symbols ./util.exp" in *-no-install*) ;; *) if [ X"no" = X"yes" ]; then INSTALL_BACKUP='' /bin/sh ../../libtool --quiet --mode=install /bin/sh ../../install-sh -c -o 0 -g 0 libsudo_util.la /tmp/relocate/libexec/sudo; fi;; esac case "-no-install -static -export-symbols ./zlib.exp" in *-no-install*) ;; *) if [ X"no" = X"yes" ]; then INSTALL_BACKUP='' /bin/sh ../../libtool --quiet --mode=install /bin/sh ../../install-sh -c -o 0 -g 0 libsudo_z.la /tmp/relocate/libexec/sudo; fi;; esac /bin/sh ../../mkinstalldirs /usr/local/libexec/sudo mkdir /usr/local/libexec/sudo mkdir: 0653-357 Cannot access directory /usr/local/libexec. /usr/local/libexec: The file access permissions do not allow the specified action. make: 1254-004 The error code from the last command is 2. Stop. make: 1254-004 The error code from the last command is 2.
This only happens when --disable-shared is used, which is why I haven't noticed it myself. The problem is that the plugindir Makefile variable is used even when --disable-shared is specified but its value is not updated in configure so you get the default value instead. I just committed a fix for this: https://www.sudo.ws/repos/sudo/rev/0f6c9a4af739
Fixed in sudo 1.8.28