From: Todd C. Miller Date: Mon, 11 Jun 2012 19:07:06 +0000 (-0400) Subject: Install AIX packages under /opt/freeware with links in /usr/bin and X-Git-Tag: SUDO_1_7_10~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee4702cf18abc01866d83e3f930540e6c1125e31;p=sudo Install AIX packages under /opt/freeware with links in /usr/bin and /usr/sbin. This matches the layout of the sudo package from AIX freeware. --HG-- branch : 1.7 --- diff --git a/mkpkg b/mkpkg index df678225e..ad81ea267 100755 --- 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 c219012b3..cb4c354bf 100644 --- 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