mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-17 20:04:26 -05:00
1ede2e1a1e
Qubes that have the updates-proxy-service enabled will have the repository definitions set to work with the proxy, being it a TemplateVM or another type of qube. Qubes that have that same service disabled and are based on templates that are being cached, will have the repository definitions corrected for it to work like normal systems via the networking instead of caching proxy. Optimizations were done for a faster runtime, previously it would call sed 38 times on Fedora-39, now it only calls sed 2 times for Fedora repositories (one extra for rpmfusion) and some more for PackageKit and dnf.conf markers. Inexpensive runtime is a must for a script that may run multiple times, such as when being called by a tool monitoring the filesystem such as inotify. Code from /usr/lib/qubes/update-proxy-configs was used for the NetVM use case of the cacher, thus the license had to be changed. For: https://github.com/ben-grande/qusal/issues/44 Fixes: https://github.com/ben-grande/qusal/issues/31
37 lines
1006 B
Plaintext
37 lines
1006 B
Plaintext
{#
|
|
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#}
|
|
|
|
|
|
"{{ slsdotpath }}-install-client-scripts":
|
|
file.recurse:
|
|
- name: /usr/bin/
|
|
- source: salt://{{ slsdotpath }}/files/client/bin/
|
|
- file_mode: "0755"
|
|
- group: root
|
|
- user: root
|
|
- makedirs: True
|
|
|
|
"{{ slsdotpath }}-install-client-repository-definitions":
|
|
cmd.run:
|
|
- name: apt-cacher-ng-repo
|
|
- stateful: True
|
|
- runas: root
|
|
- require:
|
|
- file: "{{ slsdotpath }}-install-client-scripts"
|
|
|
|
"{{ slsdotpath }}-install-client-systemd":
|
|
file.managed:
|
|
- name: /usr/lib/systemd/system/qubes-apt-cacher-ng-repo.service
|
|
- source: salt://{{ slsdotpath }}/files/client/systemd/qubes-apt-cacher-ng-repo.service
|
|
- mode: "0644"
|
|
- group: root
|
|
- user: root
|
|
- makedirs: True
|
|
|
|
"{{ slsdotpath }}-install-client-systemd-start-qubes-apt-cacher-ng-repo.service":
|
|
service.enabled:
|
|
- name: qubes-apt-cacher-ng-repo.service
|