Updates templates to show correct flavors for all variants

i9
Eugene Zamriy 2 years ago
parent ad3b544dfa
commit c585e15be9
Signed by: ezamriy
GPG Key ID: 7EBF95C7DCFA496C

@ -1,4 +1,4 @@
From 8836e2a52e01cbc24c990ba79418fb297165466e Mon Sep 17 00:00:00 2001
From 4796511e7883d320a0daeae8c2eaa50999e92992 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <evgeniy.zamriy@softline.com>
Date: Wed, 26 Jul 2023 23:51:00 +0300
Subject: [PATCH 3/3] Translate installation image bootloader to Russian
@ -6,9 +6,9 @@ Subject: [PATCH 3/3] Translate installation image bootloader to Russian
---
80-rhel/config_files/x86/grub2-efi.cfg | 15 ++++++----
80-rhel/config_files/x86/isolinux.cfg | 41 +++++++++++++++-----------
80-rhel/efi.tmpl | 11 +++++++
80-rhel/x86.tmpl | 19 +++++++++++-
4 files changed, 62 insertions(+), 24 deletions(-)
80-rhel/efi.tmpl | 9 +++++-
80-rhel/x86.tmpl | 23 +++++++++++++--
4 files changed, 62 insertions(+), 26 deletions(-)
diff --git a/80-rhel/config_files/x86/grub2-efi.cfg b/80-rhel/config_files/x86/grub2-efi.cfg
index 5fc47de..dfd827f 100644
@ -165,9 +165,15 @@ index 01bf0cd..0cad3c2 100644
menu end
diff --git a/80-rhel/efi.tmpl b/80-rhel/efi.tmpl
index bb1aa4f..9a32a61 100644
index bb1aa4f..dda0e79 100644
--- a/80-rhel/efi.tmpl
+++ b/80-rhel/efi.tmpl
@@ -1,4 +1,4 @@
-<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel"/>
+<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel, FLAVOR=''"/>
<%
EFIBOOTDIR="EFI/BOOT"
APPLE_EFI_ICON=inroot+"/usr/share/pixmaps/bootloader/fedora.icns"
@@ -7,6 +7,7 @@ APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol"
mkdir ${EFIBOOTDIR}
@ -184,15 +190,11 @@ index bb1aa4f..9a32a61 100644
## actually make the EFI images
${make_efiboot("images/efiboot.img")}
@@ -39,7 +41,16 @@ ${make_efiboot("images/efiboot.img")}
@@ -39,7 +41,12 @@ ${make_efiboot("images/efiboot.img")}
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
%endif
install ${configdir}/grub2-efi.cfg ${eficonf}
+ %if product.variant == 'Server':
+ replace @FLAVOR@ ' Сервер' ${eficonf}
+ %else:
+ replace @FLAVOR@ '' ${eficonf}
+ %endif
+ replace @FLAVOR@ '${FLAVOR}' ${eficonf}
+ %if product.name == 'MSVSphere':
+ replace @PRODUCT@ 'МСВСфера' ${eficonf}
+ %else:
@ -202,23 +204,25 @@ index bb1aa4f..9a32a61 100644
replace @KERNELNAME@ vmlinuz ${eficonf}
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
diff --git a/80-rhel/x86.tmpl b/80-rhel/x86.tmpl
index 3d9d0a4..a254999 100644
index 3d9d0a4..be49189 100644
--- a/80-rhel/x86.tmpl
+++ b/80-rhel/x86.tmpl
@@ -23,6 +23,12 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
@@ -23,6 +23,14 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
isoargs = "-iso-level 3"
else:
isoargs = ""
+
+# define an MSVSphere-specific image flavor constant
+if product.variant == 'Server':
+ FLAVOR=' Сервер'
+if product.variant in ("Minimal", "Server"):
+ FLAVOR=" Сервер"
+elif product.variant == "BaseOS":
+ FLAVOR=" ОС"
+else:
+ FLAVOR=''
+ FLAVOR=""
%>
mkdir images
@@ -41,12 +47,23 @@ install ${configdir}/boot.msg ${BOOTDIR}
@@ -41,12 +49,23 @@ install ${configdir}/boot.msg ${BOOTDIR}
install ${configdir}/grub.conf ${BOOTDIR}
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
install boot/memtest* ${BOOTDIR}/memtest
@ -243,6 +247,15 @@ index 3d9d0a4..a254999 100644
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
@@ -90,7 +109,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%>
treeinfo images-${basearch} ${img|basename} ${img}
%endfor
- <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/>
+ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, FLAVOR=FLAVOR"/>
%endif
# Create optional product.img and updates.img
--
2.40.1
2.41.0

@ -1,6 +1,6 @@
Name: lorax-templates-msvsphere
Version: 9.0
Release: 37%{?dist}.1
Release: 37%{?dist}.2
Summary: MSVSphere 9 build templates for lorax and livemedia-creator
License: GPLv2+
@ -45,6 +45,9 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{templatedir}/config_files/x86/
%{templatedir}/*
%changelog
* Fri Jul 28 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 9.0.37.2
- Added proper image type identification for BaseOS and Minimal variants
* Wed Jul 26 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 9.0-37.1
- Translated BIOS and EFI installation image bootloaders to Russian
- Added bootloader font with cp866 encoding support

Loading…
Cancel
Save