From 439f0734f5a882a853657bb2636ac04de5d96b13 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 15 Feb 2023 17:18:39 -0700 Subject: [PATCH] Sudo-specific executables moved to /usr/libexec/sudo starting in Debian 12 (Bookworm) and Ubuntu 22.04 (Jammy Jellyfish). Previously, they were stored in /usr/lib/sudo. --- scripts/mkpkg | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/mkpkg b/scripts/mkpkg index dd4f4492f..4a63585f0 100755 --- a/scripts/mkpkg +++ b/scripts/mkpkg @@ -277,6 +277,12 @@ case "$osversion" in make_opts="${make_opts}${make_opts+ }"'docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)' ;; deb*|ubu*) + # Sudo-specific executables moved to /usr/libexec/sudo starting in + # Debian: Debian 12 (Bookworm) + # Ubuntu: Ubuntu 22.04 (Jammy Jellyfish) + # Previously, they were stored in /usr/lib/sudo. + libexec=lib + # AppArmor is enabled by default starting in # Debian: Debian 10 (Buster) # Ubuntu: Ubuntu 12.04 (Precise Pangolin) @@ -286,11 +292,17 @@ case "$osversion" in if [ -z $osmajor ] || [ $osmajor -ge 10 ]; then with_apparmor=true fi + if [ -z $osmajor ] || [ $osmajor -ge 12 ]; then + libexec=libexec + fi ;; ubu*) if [ -z $osmajor ] || [ $osmajor -ge 14 ]; then with_apparmor=true fi + if [ -z $osmajor ] || [ $osmajor -ge 22 ]; then + libexec=libexec + fi ;; esac @@ -338,7 +350,7 @@ case "$osversion" in --disable-root-mailer --with-sendmail=/usr/sbin/sendmail --mandir=/usr/share/man - --libexecdir=/usr/lib + --libexecdir=/usr/$libexec --with-linux-audit $configure_opts" # Use correct libaudit dependency