]> granicus.if.org Git - sudo/commitdiff
Install AIX packages under /opt/freeware with links in /usr/bin and
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 Jun 2012 19:07:06 +0000 (15:07 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 Jun 2012 19:07:06 +0000 (15:07 -0400)
/usr/sbin.  This matches the layout of the sudo package from AIX
freeware.

--HG--
branch : 1.7

mkpkg
sudo.pp

diff --git a/mkpkg b/mkpkg
index df678225eeefdb51c5c71e23ab6508e7c797aa9f..ad81ea2679aadc433ad244ef376802d033fc4b5f 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -252,6 +252,22 @@ case "$osversion" in
                --with-env-editor
                $configure_opts"
        ;;
+    aix*)
+       # Note, must indent with tabs, not spaces due to IFS trickery
+       # Note: we include our own zlib instead of relying on the
+       #       AIX freeware version being installed.
+       configure_opts="
+               --prefix=/opt/freeware
+               --mandir=/opt/freeware/man
+               --with-insults=disabled
+               --with-logging=syslog
+               --with-logfac=auth
+               --with-editor=/usr/bin/vi
+               --with-env-editor
+               --enable-zlib=builtin
+               $configure_opts"
+       PPVARS="${PPVARS}${PPVARS+$space}aix_freeware=$true"
+       ;;
     *)
        # For Solaris, add project support and use let configure choose zlib.
        # For all others, use the builtin zlib.
diff --git a/sudo.pp b/sudo.pp
index c219012b362c1239c630c193879549189e49cce9..cb4c354bfb8461dadfc9cadb45ec9ec49431a4a5 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -215,6 +215,15 @@ still allow people to get their work done."
        perl -pe 'last if (/^What/i && $seen++)' NEWS > ${pp_wrkdir}/ReadMe.txt
 %endif
 
+%if X"$aix_freeware" = X"true"
+       # Create links from /opt/freeware/{bin,sbin} -> /usr/{bin.sbin}
+       mkdir -p ${pp_destdir}/usr/bin ${pp_destdir}/usr/sbin
+       ln -s -f ${bindir}/sudo ${pp_destdir}/usr/bin
+       ln -s -f ${bindir}/sudoedit ${pp_destdir}/usr/bin
+       ln -s -f ${bindir}/sudoreplay ${pp_destdir}/usr/bin
+       ln -s -f ${sbindir}/visudo ${pp_destdir}/usr/sbin
+%endif
+
        # OS-level directories that should generally exist but might not.
        extradirs=`echo ${pp_destdir}/${mandir}/[mc]* | sed "s#${pp_destdir}/##g"`
        extradirs="$extradirs `dirname $docdir` `dirname $timedir`"
@@ -265,6 +274,13 @@ still allow people to get their work done."
 %else
        $sudoersdir/sudoers.dist $sudoers_mode $sudoers_uid:$sudoers_gid volatile
 %endif
+%if X"$aix_freeware" = X"true"
+       # Links for binaries from /opt/freeware to /usr
+       /usr/bin/sudo           0755 root: symlink $bindir/sudo
+       /usr/bin/sudoedit       0755 root: symlink $bindir/sudoedit
+       /usr/bin/sudoreplay     0755 root: symlink $bindir/sudoreplay
+       /usr/sbin/visudo        0755 root: symlink $sbindir/visudo
+%endif
 
 %files [!aix]
        $sudoedit_man           0644 symlink,ignore-others $sudoedit_man_target