Repository: cobbler/cobbler (language: python)

Issue:
Use new signatures URL in libcobblersignatures
### Is your feature request related to a problem?

As a maintainer  
I want to avoid duplicate work with the signatures  
so that I can have more time to myself

### Provide a detailed description of the proposed feature

Currently, we are using the old signatures URL in the website repository. As libcobblersignatures is taking over the job of managing and exposing this data the first step is to use the data that we are hosting in that repository.

### Alternatives you've considered

None

### Additional information

See https://github.com/cobbler/libcobblersignatures/pull/66



Discussion / hints:

Fix patch:
diff --git a/changelog.d/3696.added b/changelog.d/3696.added
new file mode 100644
index 0000000000..9d56b8f319
--- /dev/null
+++ b/changelog.d/3696.added
@@ -0,0 +1,1 @@
+Use new default URL for the signatures file
\ No newline at end of file
diff --git a/config/cobbler/settings.yaml b/config/cobbler/settings.yaml
index 238399af10..7e0e18c5ae 100644
--- a/config/cobbler/settings.yaml
+++ b/config/cobbler/settings.yaml
@@ -572,7 +572,7 @@ iso_template_dir: "/etc/cobbler/iso"
 
 # Signatures
 signature_path: "/var/lib/cobbler/distro_signatures.json"
-signature_url: "https://cobbler.github.io/signatures/3.0.x/latest.json"
+signature_url: "https://cobbler.github.io/libcobblersignatures/data/v2/distro_signatures.json"
 
 # Set to "true" to enable Cobbler's dynamic DNS updates.
 nsupdate_enabled: false
diff --git a/docs/cobbler-conf/settings-yaml.rst b/docs/cobbler-conf/settings-yaml.rst
index b2bbb8c0b8..ff767f51dc 100644
--- a/docs/cobbler-conf/settings-yaml.rst
+++ b/docs/cobbler-conf/settings-yaml.rst
@@ -939,7 +939,7 @@ signature_url
 Updates to the signatures may happen more often then we have releases. To enable you to import new version we provide
 the most up to date signatures we offer on this like. You may host this file for yourself and adjust it for your needs.
 
-default: ``https://cobbler.github.io/signatures/3.0.x/latest.json``
+default: ``https://cobbler.github.io/libcobblersignatures/data/v2/distro_signatures.json``
 
 tftpboot_location
 #################


Test patch:
diff --git a/system-tests/tests/svc-settings b/system-tests/tests/svc-settings
index 0448b52c90..3d70217e9b 100755
--- a/system-tests/tests/svc-settings
+++ b/system-tests/tests/svc-settings
@@ -143,7 +143,7 @@ cat >${tmp}/a <<-EOF
     "server": "192.168.1.1",
     "sign_puppet_certs_automatically": false,
     "signature_path": "/var/lib/cobbler/distro_signatures.json",
-    "signature_url": "https://cobbler.github.io/signatures/3.0.x/latest.json",
+    "signature_url": "https://cobbler.github.io/libcobblersignatures/data/v2/distro_signatures.json",
     "syslinux_dir": "/usr/share/syslinux",
     "syslinux_memdisk_folder": "/usr/share/syslinux",
     "syslinux_pxelinux_folder": "/usr/share/syslinux",
diff --git a/tests/test_data/V3_4_0/settings.yaml b/tests/test_data/V3_4_0/settings.yaml
index f59d1a784b..62694ef693 100644
--- a/tests/test_data/V3_4_0/settings.yaml
+++ b/tests/test_data/V3_4_0/settings.yaml
@@ -568,7 +568,7 @@ puppet_version: 2
 
 # Signatures
 signature_path: "/var/lib/cobbler/distro_signatures.json"
-signature_url: "https://cobbler.github.io/signatures/3.0.x/latest.json"
+signature_url: "https://cobbler.github.io/libcobblersignatures/data/v2/distro_signatures.json"
 
 # Set to "true" to enable Cobbler's dynamic DNS updates.
 nsupdate_enabled: false
diff --git a/tests/utils/utils_test.py b/tests/utils/utils_test.py
index 28d5cbea9f..c8d0ad0d14 100644
--- a/tests/utils/utils_test.py
+++ b/tests/utils/utils_test.py
@@ -173,7 +173,10 @@ def test_read_file_contents():
 @pytest.mark.parametrize(
     "remote_url,expected_result",
     [
-        ("https://cobbler.github.io/signatures/latest.json", True),
+        (
+            "https://cobbler.github.io/libcobblersignatures/data/v2/distro_signatures.json",
+            True,
+        ),
         ("https://cobbler.github.io/signatures/not_existing", False),
     ],
 )