Store template repo configuration in /etc

This way it's easier to permanently enable repos.
This commit is contained in:
Marek Marczykowski-Górecki 2021-02-03 02:15:26 +01:00
parent ed6aff3b1e
commit 6980e7ba14
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 11 additions and 11 deletions

View File

@ -645,7 +645,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_str2 = \ repo_str2 = \
'''[qubes-templates-itl-testing] '''[qubes-templates-itl-testing]
@ -656,7 +656,7 @@ metalink = https://yum.qubes-os.org/r$releasever/templates-itl-testing/repodata/
enabled = 0 enabled = 0
fastestmirror = 1 fastestmirror = 1
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -696,7 +696,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -730,7 +730,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -764,7 +764,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -798,7 +798,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -832,7 +832,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -866,7 +866,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()
@ -900,7 +900,7 @@ enabled = 1
fastestmirror = 1 fastestmirror = 1
metadata_expire = 7d metadata_expire = 7d
gpgcheck = 1 gpgcheck = 1
gpgkey = file:///usr/share/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary gpgkey = file:///etc/qubes/repo-templates/keys/RPM-GPG-KEY-qubes-$releasever-primary
''' '''
repo_conf1.write(repo_str1.encode()) repo_conf1.write(repo_str1.encode())
repo_conf1.flush() repo_conf1.flush()

View File

@ -98,11 +98,11 @@ def get_parser() -> argparse.ArgumentParser:
description=help_str) description=help_str)
parser_main.add_argument('--repo-files', action='append', parser_main.add_argument('--repo-files', action='append',
default=['/usr/share/qubes/repo-templates/qubes-templates.repo'], default=['/etc/qubes/repo-templates/qubes-templates.repo'],
help=('Specify files containing DNF repository configuration.' help=('Specify files containing DNF repository configuration.'
' Can be used more than once.')) ' Can be used more than once.'))
parser_main.add_argument('--keyring', parser_main.add_argument('--keyring',
default='/usr/share/qubes/repo-templates/keys', default='/etc/qubes/repo-templates/keys',
help='Specify directory containing RPM public keys.') help='Specify directory containing RPM public keys.')
parser_main.add_argument('--updatevm', default=UPDATEVM, parser_main.add_argument('--updatevm', default=UPDATEVM,
help=('Specify VM to download updates from.' help=('Specify VM to download updates from.'