From 6980e7ba14981496c66fb520bf330f7f6f348721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 3 Feb 2021 02:15:26 +0100 Subject: [PATCH] Store template repo configuration in /etc This way it's easier to permanently enable repos. --- qubesadmin/tests/tools/qvm_template.py | 18 +++++++++--------- qubesadmin/tools/qvm_template.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/qubesadmin/tests/tools/qvm_template.py b/qubesadmin/tests/tools/qvm_template.py index a49f6ad..348b39c 100644 --- a/qubesadmin/tests/tools/qvm_template.py +++ b/qubesadmin/tests/tools/qvm_template.py @@ -645,7 +645,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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 = \ '''[qubes-templates-itl-testing] @@ -656,7 +656,7 @@ metalink = https://yum.qubes-os.org/r$releasever/templates-itl-testing/repodata/ enabled = 0 fastestmirror = 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.flush() @@ -696,7 +696,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -730,7 +730,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -764,7 +764,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -798,7 +798,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -832,7 +832,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -866,7 +866,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() @@ -900,7 +900,7 @@ enabled = 1 fastestmirror = 1 metadata_expire = 7d 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.flush() diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index c99ddac..4fac98b 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -98,11 +98,11 @@ def get_parser() -> argparse.ArgumentParser: description=help_str) 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.' ' Can be used more than once.')) 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.') parser_main.add_argument('--updatevm', default=UPDATEVM, help=('Specify VM to download updates from.'