From 4870060e91dc67f67e2be18e5696b49aa59f697f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 9 Jul 2015 13:01:43 -0600 Subject: [PATCH] Better checks for the libaudit package for Debian and error out if we can't figure it out. --- mkpkg | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mkpkg b/mkpkg index 8d5aeb501..f949a1683 100755 --- a/mkpkg +++ b/mkpkg @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Todd C. Miller +# Copyright (c) 2010-2015 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -223,7 +223,16 @@ case "$osversion" in --with-linux-audit $configure_opts" # Use correct libaudit dependency - linux_audit=`dpkg-query -S /lib/${MULTIARCH}${MULTIARCH:+/}libaudit.so.[0-9]* | sed -e 's/:.*//' -e q` + for f in /lib/${MULTIARCH}${MULTIARCH:+/}libaudit.so.[0-9]* /lib/libaudit.so.[0-9]*; do + if test -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 PPVARS="${PPVARS}${PPVARS+$space}linux_audit=$linux_audit" ;; macos*) -- 2.40.0