mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Handle Debian GNU Hurd
This commit is contained in:
parent
e4057faca2
commit
b5a3513fb9
@ -282,6 +282,12 @@ case "$osversion" in
|
|||||||
make_opts="${make_opts}${make_opts+ }"'docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
make_opts="${make_opts}${make_opts+ }"'docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
|
||||||
;;
|
;;
|
||||||
deb*|ubu*)
|
deb*|ubu*)
|
||||||
|
if [ "$crossbuild" = "true" ]; then
|
||||||
|
osname="unknown"
|
||||||
|
else
|
||||||
|
osname="`uname`"
|
||||||
|
fi
|
||||||
|
|
||||||
# Sudo-specific executables moved to /usr/libexec/sudo starting in
|
# Sudo-specific executables moved to /usr/libexec/sudo starting in
|
||||||
# Debian: Debian 12 (Bookworm)
|
# Debian: Debian 12 (Bookworm)
|
||||||
# Ubuntu: Ubuntu 22.04 (Jammy Jellyfish)
|
# Ubuntu: Ubuntu 22.04 (Jammy Jellyfish)
|
||||||
@ -294,36 +300,50 @@ case "$osversion" in
|
|||||||
osmajor=`sed -n -e 's/^VERSION_ID=\"\([0-9]*\).*$/\1/p' /etc/os-release`
|
osmajor=`sed -n -e 's/^VERSION_ID=\"\([0-9]*\).*$/\1/p' /etc/os-release`
|
||||||
case "$osversion" in
|
case "$osversion" in
|
||||||
deb*)
|
deb*)
|
||||||
if [ -z $osmajor ] || [ $osmajor -ge 10 ]; then
|
|
||||||
with_apparmor=true
|
|
||||||
fi
|
|
||||||
if [ -z $osmajor ] || [ $osmajor -ge 12 ]; then
|
if [ -z $osmajor ] || [ $osmajor -ge 12 ]; then
|
||||||
libexec=libexec
|
libexec=libexec
|
||||||
fi
|
fi
|
||||||
|
case "$osname" in
|
||||||
|
Linux|unknown)
|
||||||
|
if [ -z $osmajor ] || [ $osmajor -ge 10 ]; then
|
||||||
|
with_apparmor=true
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
ubu*)
|
ubu*)
|
||||||
if [ -z $osmajor ] || [ $osmajor -ge 14 ]; then
|
|
||||||
with_apparmor=true
|
|
||||||
fi
|
|
||||||
if [ -z $osmajor ] || [ $osmajor -ge 22 ]; then
|
if [ -z $osmajor ] || [ $osmajor -ge 22 ]; then
|
||||||
libexec=libexec
|
libexec=libexec
|
||||||
fi
|
fi
|
||||||
;;
|
if [ -z $osmajor ] || [ $osmajor -ge 14 ]; then
|
||||||
esac
|
with_apparmor=true
|
||||||
|
fi
|
||||||
# Encrypted remote I/O log support.
|
|
||||||
with_openssl=true
|
|
||||||
# Python plugins
|
|
||||||
with_python=true
|
|
||||||
# Man pages should be compressed in .deb files
|
|
||||||
export MANCOMPRESS='gzip -9'
|
|
||||||
export MANCOMPRESSEXT='.gz'
|
|
||||||
# If Ubuntu, add --enable-admin-flag
|
|
||||||
case "$osversion" in
|
|
||||||
ubu*)
|
|
||||||
configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture"
|
configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$osname" in
|
||||||
|
GNU)
|
||||||
|
# GNU hurd doesn't have PAM, AppArmor or have Python packages
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Python plugins
|
||||||
|
with_python=true
|
||||||
|
# PAM
|
||||||
|
configure_opts="${configure_opts}${configure_opts+$tab}--with-pam"
|
||||||
|
# Linux audit
|
||||||
|
configure_opts="${configure_opts}${configure_opts+$tab}--with-linux-audit"
|
||||||
|
# AppArmor
|
||||||
|
if [ X"$with_apparmor" = X"true" ]; then
|
||||||
|
configure_opts="${configure_opts}${configure_opts+$tab}--with-apparmor"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Encrypted remote I/O log support.
|
||||||
|
with_openssl=true
|
||||||
|
# Man pages should be compressed in .deb files
|
||||||
|
export MANCOMPRESS='gzip -9'
|
||||||
|
export MANCOMPRESSEXT='.gz'
|
||||||
# Newer Debian uses arch-specific lib dirs
|
# Newer Debian uses arch-specific lib dirs
|
||||||
MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`
|
MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
# Note, must indent with tabs, not spaces due to IFS trickery
|
||||||
@ -337,12 +357,8 @@ case "$osversion" in
|
|||||||
configure_opts="${configure_opts}${configure_opts+$tab}--with-sssd-lib=/usr/lib/$MULTIARCH"
|
configure_opts="${configure_opts}${configure_opts+$tab}--with-sssd-lib=/usr/lib/$MULTIARCH"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ X"$with_apparmor" = X"true" ]; then
|
|
||||||
configure_opts="${configure_opts}${configure_opts+$tab}--with-apparmor"
|
|
||||||
fi
|
|
||||||
configure_opts="--prefix=/usr
|
configure_opts="--prefix=/usr
|
||||||
--with-all-insults
|
--with-all-insults
|
||||||
--with-pam
|
|
||||||
--enable-zlib=system
|
--enable-zlib=system
|
||||||
--with-fqdn
|
--with-fqdn
|
||||||
--with-logging=syslog
|
--with-logging=syslog
|
||||||
@ -356,20 +372,23 @@ case "$osversion" in
|
|||||||
--with-sendmail=/usr/sbin/sendmail
|
--with-sendmail=/usr/sbin/sendmail
|
||||||
--mandir=/usr/share/man
|
--mandir=/usr/share/man
|
||||||
--libexecdir=/usr/$libexec
|
--libexecdir=/usr/$libexec
|
||||||
--with-linux-audit
|
|
||||||
$configure_opts"
|
$configure_opts"
|
||||||
# Use correct libaudit dependency
|
# Use correct libaudit dependency for Linux audit
|
||||||
for f in /lib/${MULTIARCH}${MULTIARCH:+/}libaudit.so.[0-9]* /lib/libaudit.so.[0-9]*; do
|
case "$configure_opts" in
|
||||||
if [ -f "$f" ]; then
|
*--with-linux-audit*)
|
||||||
linux_audit=`dpkg-query -S "$f" 2>/dev/null | sed -n 's/:.*//p'`
|
for f in /lib/${MULTIARCH}${MULTIARCH:+/}libaudit.so.[0-9]* /lib/libaudit.so.[0-9]*; do
|
||||||
test -n "$linux_audit" && break
|
if [ -f "$f" ]; then
|
||||||
|
linux_audit=`dpkg-query -S "$f" 2>/dev/null | sed -n 's/:.*//p'`
|
||||||
|
test -n "$linux_audit" && break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -z "$linux_audit" ]; then
|
||||||
|
echo "unable to determine package for libaudit" 1>&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
PPVARS="${PPVARS}${PPVARS+$space}linux_audit=$linux_audit"
|
||||||
if [ -z "$linux_audit" ]; then
|
;;
|
||||||
echo "unable to determine package for libaudit" 1>&2
|
esac
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
PPVARS="${PPVARS}${PPVARS+$space}linux_audit=$linux_audit"
|
|
||||||
# Use correct libssl dependency
|
# Use correct libssl dependency
|
||||||
libssl_dep=`dpkg-query -S /usr/lib/${MULTIARCH}${MULTIARCH:+/}libssl.so.[1-9]* /lib/${MULTIARCH}${MULTIARCH:+/}libssl.so.[1-9]* 2>/dev/null | sort -rn | awk -F: '{ print $1; exit }'`
|
libssl_dep=`dpkg-query -S /usr/lib/${MULTIARCH}${MULTIARCH:+/}libssl.so.[1-9]* /lib/${MULTIARCH}${MULTIARCH:+/}libssl.so.[1-9]* 2>/dev/null | sort -rn | awk -F: '{ print $1; exit }'`
|
||||||
if [ -z "$libssl_dep" ]; then
|
if [ -z "$libssl_dep" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user