diff --git a/debian/aide.conf.d/10_aide_hostname b/debian/aide.conf.d/10_aide_hostname index 092e865..8a2c39e 100755 --- a/debian/aide.conf.d/10_aide_hostname +++ b/debian/aide.conf.d/10_aide_hostname @@ -17,3 +17,10 @@ fi if [ -n "$(dpkg --print-architecture)" ]; then echo "@@define ARCH $(dpkg --print-architecture)" fi +if [ -n "$(dpkg --print-foreign-architectures)" ]; then + if [ "$(dpkg --print-foreign-architectures | wc -l)" -gt 1 ]; then + echo "@@define FOREIGN_ARCHES $(dpkg --print-foreign-architectures | tr '\n' '|' | sed 's/^/(/; s/|$/)/')" + else + echo "@@define FOREIGN_ARCHES $(dpkg --print-foreign-architectures)" + fi +fi diff --git a/debian/aide.conf.d/31_aide_apt b/debian/aide.conf.d/31_aide_apt index 89bcdf3..52d4dcc 100755 --- a/debian/aide.conf.d/31_aide_apt +++ b/debian/aide.conf.d/31_aide_apt @@ -34,6 +34,9 @@ cat $SOURCESLIST /dev/null | sed 's/ #.*$//' | while read deb uri dist comp; do if [ "$deb" = "deb" ]; then for c in $comp; do echo "$LISTSDIR/${HOST}${HOSTPATH}_dists_${dist}_${c}_binary-@@{ARCH}_Packages(\.IndexDiff)?$ VarFile" + echo "@@ifdef FOREIGN_ARCHES" + echo "$LISTSDIR/${HOST}${HOSTPATH}_dists_${dist}_${c}_binary-@@{FOREIGN_ARCHES}_Packages(\.IndexDiff)?$ VarFile" + echo "@@endif" echo "$LISTSDIR/${HOST}${HOSTPATH}_dists_${dist}_(InRelease|Release(\.gpg)?)$ VarFile" echo "$LISTSDIR/${HOST}${HOSTPATH}_dists_${dist}_${c}_i18n_Translation-@@{TRANSLATIONS}(\.IndexDiff)?$ VarFile" done @@ -71,6 +74,9 @@ echo "/var/backups/apt\.extended_states\.6\.gz$ HiSerMemberLog" if [ "$IGNORE_ARCHIVES" = "yes" ]; then echo "!$ARCHIVESDIR/[-a-zA-Z0-9%\.~_+]+_(@@{ARCH}|all)\.deb$" + echo "@@ifdef FOREIGN_ARCHES" + echo "!$ARCHIVESDIR/[-a-zA-Z0-9%\.~_+]+_@@{FOREIGN_ARCHES}\.deb$" + echo "@@endif" fi if [ "$IGNORE_FRQCHG" = "yes" ]; then diff --git a/debian/aide.conf.d/31_aide_apt-file b/debian/aide.conf.d/31_aide_apt-file index f61f60f..88f03ba 100755 --- a/debian/aide.conf.d/31_aide_apt-file +++ b/debian/aide.conf.d/31_aide_apt-file @@ -9,6 +9,9 @@ cat $SOURCESLIST /dev/null | sed 's/ #.*$//' | while read deb uri dist comp; do if [ "$PROTOCOL" = "http" ] || [ "$PROTOCOL" = "ftp" ]; then for c in $comp; do echo "/var/cache/apt/apt-file/"${HOST//\./\\\.}${HOSTPATH}"_dists_"${dist//\//_}"_"${c}"_Contents-@@{ARCH}\.(gz|IndexDiff)$ VarFile" + echo "@@ifdef FOREIGN_ARCHES" + echo "/var/cache/apt/apt-file/"${HOST//\./\\\.}${HOSTPATH}"_dists_"${dist//\//_}"_"${c}"_Contents-@@{FOREIGN_ARCHES}\.(gz|IndexDiff)$ VarFile" + echo "@@endif" done fi done