mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 05:17:54 +00:00
Debian fixes:
* fix modes to be more in line with what Debian expects * add section * install LICENSE as copyright and ChangeLog as changelog * create stub changelog.debian
This commit is contained in:
parent
8b38f45841
commit
b5ee0ab910
40
sudo.pp
40
sudo.pp
@ -13,6 +13,7 @@ The basic philosophy is to give as few privileges as possible but \
|
|||||||
still allow people to get their work done."
|
still allow people to get their work done."
|
||||||
vendor="Todd C. Miller"
|
vendor="Todd C. Miller"
|
||||||
copyright="(c) 1993-1996,1998-2012 Todd C. Miller"
|
copyright="(c) 1993-1996,1998-2012 Todd C. Miller"
|
||||||
|
shmode=0644
|
||||||
|
|
||||||
%if [aix]
|
%if [aix]
|
||||||
# AIX package summary is limited to 40 characters
|
# AIX package summary is limited to 40 characters
|
||||||
@ -30,6 +31,8 @@ still allow people to get their work done."
|
|||||||
|
|
||||||
%if [sd]
|
%if [sd]
|
||||||
pp_sd_vendor_tag="TCM"
|
pp_sd_vendor_tag="TCM"
|
||||||
|
# HP-UX shared objects must be executable
|
||||||
|
shmode=0755
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if [solaris]
|
%if [solaris]
|
||||||
@ -48,16 +51,25 @@ still allow people to get their work done."
|
|||||||
if test -n "$linux_audit"; then
|
if test -n "$linux_audit"; then
|
||||||
pp_rpm_requires="audit-libs >= $linux_audit"
|
pp_rpm_requires="audit-libs >= $linux_audit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pp_deb_maintainer="$pp_rpm_packager"
|
|
||||||
pp_deb_release="$pp_rpm_release"
|
|
||||||
pp_deb_version="$pp_rpm_version"
|
|
||||||
%else
|
%else
|
||||||
# For all but RPM and Debian we need to install sudoers with a different
|
# 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.
|
# name and make a copy of it if there is no existing file.
|
||||||
mv ${pp_destdir}$sudoersdir/sudoers ${pp_destdir}$sudoersdir/sudoers.dist
|
mv ${pp_destdir}$sudoersdir/sudoers ${pp_destdir}$sudoersdir/sudoers.dist
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if [deb]
|
||||||
|
pp_deb_maintainer="$pp_rpm_packager"
|
||||||
|
pp_deb_release="$pp_rpm_release"
|
||||||
|
pp_deb_version="$pp_rpm_version"
|
||||||
|
pp_deb_section=admin
|
||||||
|
install -D -m 644 ${pp_destdir}$docdir/LICENSE ${pp_wrkdir}/${name}/usr/share/doc/${name}/copyright
|
||||||
|
install -D -m 644 ${pp_destdir}$docdir/ChangeLog ${pp_wrkdir}/${name}/usr/share/doc/${name}/changelog
|
||||||
|
gzip -9f ${pp_wrkdir}/${name}/usr/share/doc/${name}/changelog
|
||||||
|
printf "$name ($pp_deb_version-$pp_deb_release) admin; urgency=low\n\n * see upstream changelog\n\n -- $pp_deb_maintainer `date '+%a, %d %b %Y %T %z'`\n" > ${pp_wrkdir}/${name}/usr/share/doc/${name}/changelog.Debian
|
||||||
|
chmod 644 ${pp_wrkdir}/${name}/usr/share/doc/${name}/changelog.Debian
|
||||||
|
gzip -9f ${pp_wrkdir}/${name}/usr/share/doc/${name}/changelog.Debian
|
||||||
|
%endif
|
||||||
|
|
||||||
%if [rpm]
|
%if [rpm]
|
||||||
# Add distro info to release
|
# Add distro info to release
|
||||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'`
|
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'`
|
||||||
@ -208,16 +220,20 @@ still allow people to get their work done."
|
|||||||
$bindir/sudoedit 4111 root:
|
$bindir/sudoedit 4111 root:
|
||||||
$sbindir/visudo 0111
|
$sbindir/visudo 0111
|
||||||
$bindir/sudoreplay 0111
|
$bindir/sudoreplay 0111
|
||||||
$includedir/sudo_plugin.h 0444
|
$includedir/sudo_plugin.h 0644
|
||||||
$libexecdir/* 0755 optional
|
$libexecdir/* $shmode optional
|
||||||
$sudoersdir/sudoers.d/ 0750 $sudoers_uid:$sudoers_gid
|
$sudoersdir/sudoers.d/ 0750 $sudoers_uid:$sudoers_gid
|
||||||
$timedir/ 0700 root:
|
$timedir/ 0700 root:
|
||||||
$docdir/ 0755
|
$docdir/ 0755
|
||||||
$docdir/sudoers2ldif 0555 optional,ignore-others
|
$docdir/sudoers2ldif 0555 optional,ignore-others
|
||||||
$docdir/* 0444
|
%if [deb]
|
||||||
|
$docdir/LICENSE ignore,ignore-others
|
||||||
|
$docdir/ChangeLog ignore,ignore-others
|
||||||
|
%endif
|
||||||
|
$docdir/* 0644
|
||||||
$localedir/ - optional
|
$localedir/ - optional
|
||||||
$localedir/** 0444 optional
|
$localedir/** - optional
|
||||||
/etc/pam.d/* 0444 volatile,optional
|
/etc/pam.d/* 0644 volatile,optional
|
||||||
%if [rpm,deb]
|
%if [rpm,deb]
|
||||||
$sudoersdir/sudoers $sudoers_mode $sudoers_uid:$sudoers_gid volatile
|
$sudoersdir/sudoers $sudoers_mode $sudoers_uid:$sudoers_gid volatile
|
||||||
%else
|
%else
|
||||||
@ -225,12 +241,12 @@ still allow people to get their work done."
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files [!aix]
|
%files [!aix]
|
||||||
$mandir/man*/*
|
$mandir/man*/* 0644
|
||||||
|
|
||||||
%files [aix]
|
%files [aix]
|
||||||
# Some versions use catpages, some use manpages.
|
# Some versions use catpages, some use manpages.
|
||||||
$mandir/cat*/* optional
|
$mandir/cat*/* optional 0644
|
||||||
$mandir/man*/* optional
|
$mandir/man*/* optional 0644
|
||||||
|
|
||||||
%post [!rpm,deb]
|
%post [!rpm,deb]
|
||||||
# Don't overwrite an existing sudoers file
|
# Don't overwrite an existing sudoers file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user