X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sudo.pp;h=35c18b7b80e3148efd0ac48c551c8e67e19799f9;hb=f3530d8198251b72d01da9a07b1fa518446ec0f0;hp=8f7ccbae1923e27dcbcf0b7da91697a1c21c0ad8;hpb=d7751e8b58b26f298b57d31ae87386e685eb8c14;p=debian%2Fsudo diff --git a/sudo.pp b/sudo.pp index 8f7ccba..35c18b7 100644 --- a/sudo.pp +++ b/sudo.pp @@ -12,23 +12,53 @@ limited root privileges to users and log root activity. \ The basic philosophy is to give as few privileges as possible but \ still allow people to get their work done." vendor="Todd C. Miller" - copyright="(c) 1993-1996,1998-2010 Todd C. Miller" - pp_rpm_release="1" + copyright="(c) 1993-1996,1998-2011 Todd C. Miller" + +%if [aix] + # AIX package summary is limited to 40 characters + summary="Configurable super-user privileges" + + # Convert to 4 part version for AIX, including patch level + pp_aix_version=`echo $version|sed -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)p\([0-9]*\)$/\1.\2/' -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)[^0-9\.].*$/\1/' -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)$/\1.0/'` +%endif + +%if [kit] + # Strip off patchlevel for kit which only supports xyz versions + pp_kit_version="`echo $version|sed -e 's/\.//g' -e 's/[^0-9][^0-9]*[0-9][0-9]*$//'`" + pp_kit_name="TCM" +%endif + +%if [sd] + pp_sd_vendor_tag="TCM" +%endif + +%if [solaris] + pp_solaris_name="TCM${name}" + pp_solaris_pstamp=`/usr/bin/date "+%B %d, %Y"` +%endif + +%if [rpm,deb] + # Convert patch level into release and remove from version + pp_rpm_release="`expr \( $version : '.*p\([0-9][0-9]*\)' \| 0 \) + 1`" + pp_rpm_version="`expr $version : '\(.*\)p[0-9][0-9]*'`" pp_rpm_license="BSD" pp_rpm_url="http://www.sudo.ws/" pp_rpm_group="Applications/System" pp_rpm_packager="Todd.Miller@courtesan.com" - pp_deb_maintainer="Todd.Miller@courtesan.com" - pp_sd_vendor_tag="TCM" - pp_kit_name="TCM" - pp_solaris_name="TCM${name}" -%if [!rpm,deb] + if test -n "$linux_audit"; then + pp_rpm_requires="audit-libs >= $linux_audit" + fi + + pp_deb_maintainer="$pp_rpm_packager" + pp_deb_release="$pp_rpm_release" + pp_deb_version="$pp_rpm_version" +%else # For all but RPM and Debian we need to install sudoers with a different # name and make a copy of it if there is no existing file. mv ${pp_destdir}$sudoersdir/sudoers ${pp_destdir}$sudoersdir/sudoers.dist %endif -%set [rpm] +%if [rpm] # Add distro info to release osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'` case "$pp_rpm_distro" in @@ -66,8 +96,8 @@ still allow people to get their work done." # For RedHat the doc dir is expected to include version and release case "$pp_rpm_distro" in centos*|rhel*) - mv ${pp_destdir}/${docdir} ${pp_destdir}/${docdir}-${version}-1 - docdir=${docdir}-${version}-1 + mv ${pp_destdir}/${docdir} ${pp_destdir}/${docdir}-${version}-${pp_rpm_release} + docdir=${docdir}-${version}-${pp_rpm_release} ;; esac @@ -122,8 +152,9 @@ still allow people to get their work done." fi ;; esac +%endif -%set [deb] +%if [deb] # Uncomment some Defaults and the %sudo rule in sudoers # Note that the order must match that of sudoers and be tab-indented. /bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF' @@ -143,9 +174,7 @@ still allow people to get their work done." session required pam_permit.so session required pam_limits.so EOF - -%set [aix] - summary="Configurable super-user privileges" +%endif %files $bindir/sudo 4111 root: