Skip to content
Snippets Groups Projects
Verified Commit 085df2c6 authored by Robin Candau's avatar Robin Candau
Browse files

Use paccache.service environment file to pass extra arguments

Use the new `/etc/conf.d/pacman-contrib` environment file (introduced in pacman/pacman-contrib!53) to pass extra arguments to `paccache.service` instead of overriding it completely.

This improves security as it allows to benefit from all the hardening implemented in the upstream service file (which wasn't the case previously, since the whole service file was overwriten).

/!\ Requires `pacman-contrib` >= `1.11.0` /!\

Closes #649
parent 64fb2c86
No related branches found
No related tags found
1 merge request!921Use paccache.service environment file to pass extra arguments
[Unit]
Description=Discard unused packages
[Service]
Type=oneshot
ExecStart=/usr/bin/paccache -r -c /var/cache/pacman/pkg
......@@ -145,8 +145,11 @@
- name: Install pacman-contrib for paccache/pacdiff and fakeroot for checkupdates
pacman: name=pacman-contrib,fakeroot state=installed
- name: Install custom paccache.service
copy: src=paccache.service dest=/etc/systemd/system/paccache.service owner=root group=root mode=0644
- name: Add extra arguments in paccache.service environment file
lineinfile:
path: /etc/conf.d/pacman-contrib
regexp: '^PACCACHE_ARGS='
line: 'PACCACHE_ARGS=-c /var/cache/pacman/pkg'
- name: Start and enable paccache timer
systemd_service: name=paccache.timer enabled=yes state=started daemon_reload=yes
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment