Repository: cobbler/cobbler (language: python)

Issue:
[Backport] grubx86.efi vs grubx64.efi
### Original feature issue

- Issue: #3092
- PR: #3183

### Target release

- [x] release33
- [ ] release32
- [ ] release30

### Reason

Stabilization of Cobbler 3.3.4



Discussion / hints:

Fix patch:
diff --git a/changelog.d/3623.fixed b/changelog.d/3623.fixed
new file mode 100644
index 0000000000..655224f4a6
--- /dev/null
+++ b/changelog.d/3623.fixed
@@ -0,0 +1,1 @@
+This PR changes the default name of the grub2-efi bootloader to grubx64.efi to match the default that we have in our DHCPv4 template.
\ No newline at end of file
diff --git a/cobbler.spec b/cobbler.spec
index 17905becb2..95a7df15de 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -299,6 +299,9 @@ sed -e "s|/var/lib/tftpboot|%{tftpboot_dir}|g" -i config/cobbler/settings.yaml
 %endif
 
 %build
+if [ -d "%{_sourcedir}/%{name}-%{version}/.git" ]; then
+    cp -r %{_sourcedir}/%{name}-%{version}/.git %{_builddir}/%{name}-%{version}
+fi
 %if 0%{?fedora} || 0%{?rhel}
 . distro_build_configs.sh FEDORA
 %else
diff --git a/config/cobbler/settings.yaml b/config/cobbler/settings.yaml
index 5780e31640..85c20ece70 100644
--- a/config/cobbler/settings.yaml
+++ b/config/cobbler/settings.yaml
@@ -73,7 +73,7 @@ bootloaders_formats:
       - net
       - ofnet
   x86_64-efi:
-    binary_name: grubx86.efi
+    binary_name: grubx64.efi
     extra_modules:
       - chain
       - efinet
diff --git a/templates/etc/dhcp6.template b/templates/etc/dhcp6.template
index 4e3f766cd8..2a009dd88b 100644
--- a/templates/etc/dhcp6.template
+++ b/templates/etc/dhcp6.template
@@ -35,7 +35,7 @@ option dhcp6.bootfile-url code 59 = string ;
 class "pxeclients" {
     match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
     if substring (option vendor-class-identifier, 15, 5) = "00007" {
-        option dhcp6.bootfile-url "tftp://[$next_server_v6]/grub/grubx86.efi";
+        option dhcp6.bootfile-url "tftp://[$next_server_v6]/grub/grubx64.efi";
     }
     else if substring (option vendor-class-identifier, 15, 5) = "00000" {
         option dhcp6.bootfile-url "tftp://[$next_server_v6]/grub/grub.0";


Test patch:
diff --git a/system-tests/tests/settings-cli-migrate b/system-tests/tests/settings-cli-migrate
index bdc7436618..862fb057d3 100755
--- a/system-tests/tests/settings-cli-migrate
+++ b/system-tests/tests/settings-cli-migrate
@@ -53,7 +53,7 @@ bootloaders_formats:
       - net
       - ofnet
   x86_64-efi:
-    binary_name: grubx86.efi
+    binary_name: grubx64.efi
     extra_modules:
       - chain
       - efinet
diff --git a/system-tests/tests/svc-settings b/system-tests/tests/svc-settings
index b47980cfc8..9bfd51efc3 100755
--- a/system-tests/tests/svc-settings
+++ b/system-tests/tests/svc-settings
@@ -212,7 +212,7 @@ cat >${tmp}/a <<-EOF
             ]
         },
         "x86_64-efi": {
-            "binary_name": "grubx86.efi",
+            "binary_name": "grubx64.efi",
             "extra_modules": [
                 "chain",
                 "efinet"
diff --git a/tests/actions/buildiso_test.py b/tests/actions/buildiso_test.py
index 3dc46310c1..faff8658a9 100644
--- a/tests/actions/buildiso_test.py
+++ b/tests/actions/buildiso_test.py
@@ -47,7 +47,7 @@ class TestBuildiso:
     @pytest.mark.parametrize(
         "input_arch,result_binary_name,expected_exception",
         [
-            (enums.Archs.X86_64, "grubx86.efi", does_not_raise()),
+            (enums.Archs.X86_64, "grubx64.efi", does_not_raise()),
             (enums.Archs.PPC, "grub.ppc64le", does_not_raise()),
             (enums.Archs.PPC64, "grub.ppc64le", does_not_raise()),
             (enums.Archs.PPC64EL, "grub.ppc64le", does_not_raise()),
diff --git a/tests/test_data/V3_3_4/settings.yaml b/tests/test_data/V3_3_4/settings.yaml
index 7589211d78..9555d0588b 100644
--- a/tests/test_data/V3_3_4/settings.yaml
+++ b/tests/test_data/V3_3_4/settings.yaml
@@ -74,7 +74,7 @@ bootloaders_formats:
       - net
       - ofnet
   x86_64-efi:
-    binary_name: grubx86.efi
+    binary_name: grubx64.efi
     extra_modules:
       - chain
       - efinet