[Pkg-aide-maintainers] Bug#542541: please add rules for apt-file

Hannes von Haugwitz hannes at vonhaugwitz.com
Thu Aug 20 06:41:12 UTC 2009


Package: aide-common
Version: 0.13.1-10
Severity: wishlist
Tags: patch

Hi,

the attached patch adds a script which generates rules for apt-file.

Hannes

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30.5 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aide-common depends on:
ii  aide [aide-binary] 0.13.1-10             Advanced Intrusion Detection Envir
ii  bsd-mailx [mailx]  8.1.2-0.20081101cvs-2 A simple mail user agent
ii  debconf [debconf-2 1.5.27                Debian configuration management sy
ii  liblockfile1       1.08-3                NFS-safe locking library, includes
ii  ucf                3.0018                Update Configuration File: preserv

Versions of packages aide-common recommends:
ii  cron                          3.0pl1-106 process scheduling daemon

aide-common suggests no packages.

-- debconf information excluded
-------------- next part --------------
--- /etc/aide/aide.conf.d/31_aide_apt-file.orig	1970-01-01 01:00:00.000000000 +0100
+++ /etc/aide/aide.conf.d/31_aide_apt-file	2009-08-19 12:17:02.000000000 +0200
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+SOURCESLIST="/etc/apt/sources.list"
+
+while read deb uri dist comp; do
+    PROTOCOL="$(echo $uri | sed 's|\([^:]\+\).*|\1|')"
+    HOST="$(echo $uri | sed 's|.*//\([^/[:space:]]\+\).*|\1|')"
+    HOSTPATH="$(echo $uri | sed 's|.*//[^/[:space:]]\+/\?||;s|/$||;s|/|_|g;s|^\(.\+\)$|_\1|')"
+    if [ "$PROTOCOL" = "http" ] || [ "$PROTOCOL" = "ftp" ]; then
+        echo "/var/cache/apt/apt-file/"${HOST//\./\\\.}${HOSTPATH}"_dists_"${dist}"_Contents-@@{ARCH}\.(gz|IndexDiff)$ VarFile"
+    fi
+done < $SOURCESLIST
+
+echo "/var/cache/apt/apt-file$ VarDir"


More information about the Pkg-aide-maintainers mailing list