Bug 433

Summary: "make install-sudoers" fails to install sudoers file if compiling in separate directory
Product: Sudo Reporter: Andreas Koppenhoefer <andreas.koppenhoefer>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: normal    
Version: 1.7.4   
Hardware: Sun   
OS: Solaris 2.x   
Attachments: fix for install-sudoers target

Description Andreas Koppenhoefer 2010-08-30 08:07:19 MDT
If building binaries in a directory separated from sudo source, then make target install-sudoers fails to install sudoers file. The target expects the sudoers file located in source tree (like in previous versions). Acually it has been created in the build tree.
Repeat with:
$ tar -xvzf sudo-1.7.4p3.tar.gz
$ mkdir build
$ cd build
$ ../sudo-1.7.4p3/configure
$ make
$ mkdir /tmp/root
$ make DESTDIR=/tmp/root install

The last few lines of "make install" are:

test -f =/tmp/root/etc/sudoers || \
    /bin/bash /devel/pkg/sudo/sudo-1.7.4p3/install-sh -c -O 0 -G 0 -M 0440 \
        /devel/pkg/sudo-1.7.4p3/sudoers /tmp/root/etc/sudoers
cp: cannot access /devel/pkg/sudo/sudo-1.7.4p3/sudoers
*** Error code 1
make: Fatal error: Command failed for target `install-sudoers'
Comment 1 Todd C. Miller 2010-08-30 08:41:41 MDT
You should be able to just remove the "$(srcdir)/" from the install-sudoers target and have it install properly.
Comment 2 Todd C. Miller 2010-08-30 08:54:48 MDT
Created attachment 288 [details]
fix for install-sudoers target
Comment 3 Andreas Koppenhoefer 2010-08-30 09:01:40 MDT
Confirmed: the attached patch fixes this issue. Thanx.
Comment 4 Todd C. Miller 2010-09-14 16:41:41 MDT
Fixed in sudo 1.7.4p4