# apt-cacher-ng config for the elizaOS Live containerized build. # # Derived from Tails' vagrant/provision/assets/acng.conf. Tails runs # apt-cacher-ng *inside* its build VM for a specific reason, not just # speed: a Tails chroot hook sets the chroot's /etc/apt/resolv.conf to # "nameserver 127.0.0.1" (the final system resolves DNS through Tor). # At build time there is no Tor, so the chroot cannot resolve hostnames # — and later hooks still run `apt-get install` inside that chroot. # Pointing apt at a proxy by IP (127.0.0.1:3142) sidesteps chroot DNS # entirely: the proxy runs in the container, where DNS works, and does # the real fetching. We replicate that, container-side. # # As a bonus the package cache (a Docker named volume) persists across # builds, so re-builds skip the network — Tails' other reason for acng. CacheDir: /var/cache/apt-cacher-ng LogDir: /var/cache/apt-cacher-ng/apt-cacher-ng-log Port: 3142 # apt reaches us purely as an Acquire::http::Proxy (proxy mode), so no # mirror Remap rules are needed. Allow CONNECT tunnelling for any https # source; http downloads matching the patterns below get cached. AllowUserPorts: 80 443 PassThroughPattern: .* ExTreshold: 50 # File-classification patterns (verbatim from Tails' acng.conf) — these # decide which fetched files apt-cacher-ng caches vs streams through. VfilePattern = (^|.*?/)(Index|Packages(\.gz|\.bz2|\.lzma|\.xz)?|InRelease|Release|Release\.gpg|Sources(\.gz|\.bz2|\.lzma|\.xz)?|release|index\.db-.*\.gz|Contents-[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|((setup|setup-legacy)(\.ini|\.bz2|\.hint)(\.sig)?)|mirrors\.lst|repo(index|md)\.xml(\.asc|\.key)?|directory\.yast|products|content(\.asc|\.key)?|media|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|info\.txt|license\.tar\.gz|license\.zip|.*\.db(\.tar\.gz)?|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|metalink\?repo|.*prestodelta\.xml\.gz)$|/dists/.*/installer-[^/]+/[^0-9][^/]+/images/.* VfilePatternEx = .*/project/trace/[a-z-]+$ PfilePattern = .*(\.d?deb|\.rpm|\.dsc|\.tar(\.gz|\.bz2|\.lzma|\.xz)(\.gpg)?|\.diff(\.gz|\.bz2|\.lzma|\.xz)|\.o|\.jigdo|\.template|changelog|copyright|\.udeb|\.debdelta|\.diff/.*\.gz|(Devel)?ReleaseAnnouncement(\?.*)?|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz|fonts/(final/)?[a-z]+32.exe(\?download.*)?|/dists/.*/installer-[^/]+/[0-9][^/]+/images/.*)$ WfilePattern = (^|.*?/)(Release|InRelease|Release\.gpg|(Packages|Sources)(\.gz|\.bz2|\.lzma|\.xz)?|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|.*\.xml|.*\.db\.tar\.gz|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|[a-z]+32.exe)$|/dists/.*/installer-.*/images/.*