diff --git a/cacher/README b/cacher/README index 16413f3..035f990 100644 --- a/cacher/README +++ b/cacher/README @@ -6,13 +6,13 @@ Config files are included, which will work out of the box for Debian,Ubuntu and The cache and log directories are bind-mounted in /rw in the cacher qube. Copy directory to /srv/salt, then run: -qubesctl state.apply cacher.create. +qubesctl state.apply cacher.create qubesctl --skip-dom0 --targets=template-cacher state.apply cacher.install qubesctl --skip-dom0 --targets=cacher state.apply cacher.configure To automatically use the proxy run: qubesctl state.apply cacher.use -This will configure /etc/qubes-rpc/policy/qubes.UpdatesProxy to use the cachingproxy be default. +This will configure /etc/qubes/policy.d/30-user.policy to use the caching proxy be default. apt-cacher-ng will cache HTTPS requests if you change https:// to http://HTTPS/// in repo source lists. To configure the templates to use the proxy in this way, run: diff --git a/cacher/acng.conf b/cacher/acng.conf index 11389ae..ed8af32 100644 --- a/cacher/acng.conf +++ b/cacher/acng.conf @@ -60,12 +60,12 @@ Port:8082 # installation using information collected on the system. # Examples: #Remap-debrep: https://deb.debian.org http://deb.debian.org file:deb_mirrors.gz /debian ; file:backends_debian # Debian Archives +Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux Remap-debrep: https://deb.debian.org http://deb.debian.org file:deb_mirrors.gz /debian +Remap-fedora: file:fedora_mirrors # Fedora Linux Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here #Remap-sfnet: file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please create this file or specify preferred mirrors here -Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux -Remap-fedora: file:fedora_mirrors # Fedora Linux Remap-epel: file:epel_mirrors # Fedora EPEL Remap-slrep: file:sl_mirrors # Scientific Linux Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives @@ -93,6 +93,7 @@ ReportPage: acng-report.html # it's a convenience alias for the Debug option, see below for details. # # UnbufferLogs: 0 +UnbufferLogs: 1 # Enables extended client information in log entries. When set to 0, only # activity type, time and transfer sizes are logged. @@ -217,9 +218,9 @@ ExThreshold: 4 # # To see examples of the expected syntax, run: apt-cacher-ng -p debug=1 # -PfilePatternEx: .*xml.zck$|.*yaml.gz$|.*fedora.*arch=x86_64$|.*f30&arch=x86_64|.*29&arch=x86_64 +PfilePatternEx: .*xml.zck$|.*yaml.gz$|.*fedora.*arch=x86_64$|.*f35&arch=x86_64|.*f36&arch=x86_64 # VfilePatternEx: -VfilePatternEx: ^/\?release=[0-9]+&arch=.*|.*/RPM-GPG-KEY.*|.*\?repo=fedora +VfilePatternEx: ^/\?release=[0-9]+&arch=.*|.*/RPM-GPG-KEY.*|.*\?repo=fedora|.*pkg.tar.zst.sig # SPfilePatternEx: # SVfilePatternEx: # WfilePatternEx: diff --git a/cacher/configure.sls b/cacher/configure.sls index 3cf6b1b..4df8625 100644 --- a/cacher/configure.sls +++ b/cacher/configure.sls @@ -1,5 +1,7 @@ # vim: set syntax=yaml ts=2 sw=2 sts=2 et : +{% if grains['nodename'] != 'dom0' %} + /rw/config/rc.local: file.append: - text: | @@ -18,3 +20,5 @@ - user: root - group: root - makedirs: True + +{% endif %} diff --git a/cacher/configure.top b/cacher/configure.top index 50e983d..3e776f3 100644 --- a/cacher/configure.top +++ b/cacher/configure.top @@ -2,4 +2,4 @@ base: cacher: - - cacher.install + - cacher.configure diff --git a/cacher/install.sls b/cacher/install.sls index 7da4b4a..3cd9221 100644 --- a/cacher/install.sls +++ b/cacher/install.sls @@ -2,6 +2,9 @@ # # # + +{% if grains['nodename'] != 'dom0' %} + allow-testing: file.uncomment: - name: /etc/apt/sources.list.d/qubes-r4.list @@ -44,3 +47,12 @@ cp /lib/apt-cacher-ng/deb_mirrors.gz /etc/apt-cacher-ng/deb_mirrors.gz: - salt://cacher/fedora_mirrors - user: root - group: root + +/etc/apt-cacher-ng/archlx_mirrors: + file.managed: + - source: + - salt://cacher/archlx_mirrors + - user: root + - group: root + +{% endif %} diff --git a/cacher/use.sls b/cacher/use.sls index 5061fd4..f23ff44 100644 --- a/cacher/use.sls +++ b/cacher/use.sls @@ -6,4 +6,4 @@ qvm-present-id: /etc/qubes/policy.d/30-user.policy: file.prepend: - - text: "qubes.UpdatesProxy * @type:TemplateVM @default allow,target=cacher" + - text: "qubes.UpdatesProxy * @type:TemplateVM @default allow target=cacher"