Simplify rpm linux distro settings
This commit is contained in:
105
mkpkg
105
mkpkg
@@ -27,10 +27,19 @@ esac
|
|||||||
# Choose configure options by platform.
|
# Choose configure options by platform.
|
||||||
# We use the same configure options as vendor packages when possible.
|
# We use the same configure options as vendor packages when possible.
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
centos4.*|rhel4.*)
|
centos*|rhel*)
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
configure_opts="
|
case "$platform" in
|
||||||
|
centos[0-4].*|rhel[0-4].*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# RHEL 5 and up build pies and have audit support
|
||||||
|
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
||||||
|
configure_opts="--with-linux-audit"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Note, must indent with tabs, not spaces due to IFS trickery
|
||||||
|
configure_opts="$configure_opts
|
||||||
--prefix=$prefix
|
--prefix=$prefix
|
||||||
--with-logging=syslog
|
--with-logging=syslog
|
||||||
--with-logfac=authpriv
|
--with-logfac=authpriv
|
||||||
@@ -44,52 +53,21 @@ case "$platform" in
|
|||||||
--with-selinux
|
--with-selinux
|
||||||
--with-passprompt=[sudo] password for %p: "
|
--with-passprompt=[sudo] password for %p: "
|
||||||
;;
|
;;
|
||||||
centos5.*|rhel5.*)
|
sles*)
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
configure_opts="
|
|
||||||
--prefix=$prefix
|
|
||||||
--with-logging=syslog
|
|
||||||
--with-logfac=authpriv
|
|
||||||
--with-pam
|
|
||||||
--with-pam-login
|
|
||||||
--with-editor=/bin/vi
|
|
||||||
--with-env-editor
|
|
||||||
--with-ignore-dot
|
|
||||||
--with-tty-tickets
|
|
||||||
--with-ldap
|
|
||||||
--with-selinux
|
|
||||||
--with-linux-audit
|
|
||||||
--with-passprompt=[sudo] password for %p: "
|
|
||||||
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
|
||||||
;;
|
|
||||||
sles9.*)
|
|
||||||
prefix=/usr
|
|
||||||
# SuSE doesn't have /usr/libexec
|
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
*64*) libexec=lib64;;
|
sles[0-9].*)
|
||||||
*) libexec=lib;;
|
;;
|
||||||
|
sles10.*)
|
||||||
|
# SLES 10 and higher build pies
|
||||||
|
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# SLES 11 and higher has SELinux too
|
||||||
|
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
||||||
|
configure_opts="--with-selinux"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
|
||||||
configure_opts="
|
|
||||||
--prefix=$prefix
|
|
||||||
--libexecdir=$prefix/$libexec/sudo
|
|
||||||
--with-logging=syslog
|
|
||||||
--with-logfac=auth
|
|
||||||
--with-all-insults
|
|
||||||
--with-ignore-dot
|
|
||||||
--with-tty-tickets
|
|
||||||
--enable-shell-sets-home
|
|
||||||
--with-sudoers-mode=0440
|
|
||||||
--with-pam
|
|
||||||
--with-ldap
|
|
||||||
--with-env-editor
|
|
||||||
--with-passprompt=%p\'s password: "
|
|
||||||
|
|
||||||
make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
|
||||||
;;
|
|
||||||
sles10.*)
|
|
||||||
prefix=/usr
|
|
||||||
# SuSE doesn't have /usr/libexec
|
# SuSE doesn't have /usr/libexec
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
*64*) libexec=lib64;;
|
*64*) libexec=lib64;;
|
||||||
@@ -97,7 +75,7 @@ case "$platform" in
|
|||||||
esac
|
esac
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
# Note, must indent with tabs, not spaces due to IFS trickery
|
||||||
# XXX - SuSE uses secure path but only for env_reset
|
# XXX - SuSE uses secure path but only for env_reset
|
||||||
configure_opts="
|
configure_opts="$configure_opts
|
||||||
--prefix=$prefix
|
--prefix=$prefix
|
||||||
--libexecdir=$prefix/$libexec/sudo
|
--libexecdir=$prefix/$libexec/sudo
|
||||||
--with-logging=syslog
|
--with-logging=syslog
|
||||||
@@ -113,39 +91,8 @@ case "$platform" in
|
|||||||
--with-passprompt=%p\'s password: "
|
--with-passprompt=%p\'s password: "
|
||||||
|
|
||||||
make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
||||||
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
|
||||||
;;
|
;;
|
||||||
sles11.*)
|
deb.*)
|
||||||
prefix=/usr
|
|
||||||
# SuSE doesn't have /usr/libexec
|
|
||||||
case "$platform" in
|
|
||||||
*64*) libexec=lib64;;
|
|
||||||
*) libexec=lib;;
|
|
||||||
esac
|
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
|
||||||
# XXX - SuSE uses secure path but only for env_reset
|
|
||||||
configure_opts="
|
|
||||||
--prefix=$prefix
|
|
||||||
--libexecdir=$prefix/$libexec/sudo
|
|
||||||
--with-selinux
|
|
||||||
--with-logging=syslog
|
|
||||||
--with-logfac=auth
|
|
||||||
--with-all-insults
|
|
||||||
--with-ignore-dot
|
|
||||||
--with-tty-tickets
|
|
||||||
--enable-shell-sets-home
|
|
||||||
--with-sudoers-mode=0440
|
|
||||||
--with-pam
|
|
||||||
--with-ldap
|
|
||||||
--with-env-editor
|
|
||||||
--with-passprompt=%p\'s password: "
|
|
||||||
|
|
||||||
make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
|
||||||
export CFLAGS="$F_PIE" LDFLAGS="-pie"
|
|
||||||
;;
|
|
||||||
deb[456].*)
|
|
||||||
# XXX - create sudo group like debian does
|
|
||||||
# debian now has a %sudo entry in its sample sudoers
|
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
# Note, must indent with tabs, not spaces due to IFS trickery
|
||||||
if test "${SUDO_FLAVOR:-vanilla}" == "ldap"; then
|
if test "${SUDO_FLAVOR:-vanilla}" == "ldap"; then
|
||||||
configure_opts="--with-ldap
|
configure_opts="--with-ldap
|
||||||
|
8
sudo.pp
8
sudo.pp
@@ -47,7 +47,7 @@ still allow people to get their work done."
|
|||||||
|
|
||||||
# Choose the correct PAM file by distro
|
# Choose the correct PAM file by distro
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
centos4.*|rhel4.*)
|
centos[0-4].*|rhel[0-4].*)
|
||||||
mkdir -p ${pp_destdir}/etc/pam.d
|
mkdir -p ${pp_destdir}/etc/pam.d
|
||||||
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
@@ -57,7 +57,7 @@ still allow people to get their work done."
|
|||||||
session required pam_limits.so
|
session required pam_limits.so
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
centos5.*|rhel5.*)
|
centos*|rhel*)
|
||||||
mkdir -p ${pp_destdir}/etc/pam.d
|
mkdir -p ${pp_destdir}/etc/pam.d
|
||||||
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
@@ -84,7 +84,7 @@ still allow people to get their work done."
|
|||||||
session required pam_limits.so
|
session required pam_limits.so
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
sles10.*|sles11.*)
|
sles*)
|
||||||
mkdir -p ${pp_destdir}/etc/pam.d
|
mkdir -p ${pp_destdir}/etc/pam.d
|
||||||
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
@@ -100,7 +100,7 @@ still allow people to get their work done."
|
|||||||
%set [deb]
|
%set [deb]
|
||||||
# Choose the correct PAM file by distro
|
# Choose the correct PAM file by distro
|
||||||
case "$pp_deb_distro" in
|
case "$pp_deb_distro" in
|
||||||
deb[456].*)
|
deb*)
|
||||||
mkdir -p ${pp_destdir}/etc/pam.d
|
mkdir -p ${pp_destdir}/etc/pam.d
|
||||||
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
|
Reference in New Issue
Block a user