update code

This commit is contained in:
zhuchunyi 2019-11-06 19:41:49 +08:00
commit e3a426344b
12 changed files with 672 additions and 0 deletions

View File

@ -0,0 +1,61 @@
From d8b0abd7856cd9281c29a8fd54f6114eb0a428bd Mon Sep 17 00:00:00 2001
From: liuxueping <liuxueping1@huawei.com>
Date: Sat, 29 Dec 2018 17:27:53 +0000
Subject: [PATCH] add text mode selection menu in grub configuration
---
share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg | 6 +++++-
.../templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
index 2f6fedb..a779fe7 100644
--- a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
+++ b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
@@ -26,7 +26,7 @@ set timeout=60
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
+menuentry 'Install @PRODUCT@ @VERSION@ with GUI mode' --class red --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ ro
initrd @INITRDPATH@
}
@@ -34,6 +34,10 @@ menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gn
linux @KERNELPATH@ @ROOT@ rd.live.check
initrd @INITRDPATH@
}
+menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ ro inst.text
+ initrd @INITRDPATH@
+}
submenu 'Troubleshooting -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ nomodeset
diff --git a/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
index c6a3d68..72ff14b 100644
--- a/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
+++ b/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
@@ -26,7 +26,7 @@ set timeout=60
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
+menuentry 'Start @PRODUCT@ @VERSION@ with GUI mode' --class red --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ rd.live.image quiet
initrd @INITRDPATH@
}
@@ -34,6 +34,10 @@ menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class red --class gnu-
linux @KERNELPATH@ @ROOT@ rd.live.image rd.live.check quiet
initrd @INITRDPATH@
}
+menuentry 'Start @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ ro inst.text
+ initrd @INITRDPATH@
+}
submenu 'Troubleshooting -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ rd.live.image nomodeset quiet
--
1.8.3.1

View File

@ -0,0 +1,31 @@
From 0d10194ee30c2c4548f92857f26b92ef5c9d9048 Mon Sep 17 00:00:00 2001
From: liuxueping <liuxueping1@huawei.com>
Date: Thu, 10 Jan 2019 18:29:51 +0000
Subject: [PATCH] delete kernel-modules pkg
---
share/templates.d/99-generic/runtime-install.tmpl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/share/templates.d/99-generic/runtime-install.tmpl b/share/templates.d/99-generic/runtime-install.tmpl
index 3dc8770..6bee5e6 100644
--- a/share/templates.d/99-generic/runtime-install.tmpl
+++ b/share/templates.d/99-generic/runtime-install.tmpl
@@ -9,10 +9,13 @@ installpkg rpm-ostree ostree
## speed up compression on multicore systems
installpkg pigz
+##add by euler
+installpkg fcoe-utils libblockdev-btrfs
+
## kernel and firmware
## NOTE: Without explicitly including kernel-modules-extra dnf will choose kernel-debuginfo-*
## to satify a gfs2-utils kmod requirement
-installpkg kernel kernel-modules kernel-modules-extra
+installpkg kernel
installpkg grubby
%if basearch != "s390x":
## skip the firmware for sound, video, and scanners, none of which will
--
1.8.3.1

View File

@ -0,0 +1,49 @@
From aae1b6a8399062f6aacdad5df474474ef2185f40 Mon Sep 17 00:00:00 2001
From: sunguoshuai <sunguoshuai@huawei.com>
Date: Fri, 11 Jan 2019 03:17:16 -0500
Subject: [PATCH] disable isolabel character change
---
share/templates.d/99-generic/live/x86.tmpl | 6 +++---
share/templates.d/99-generic/x86.tmpl | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/share/templates.d/99-generic/live/x86.tmpl b/share/templates.d/99-generic/live/x86.tmpl
index 9290dbb..ba0ffdc 100644
--- a/share/templates.d/99-generic/live/x86.tmpl
+++ b/share/templates.d/99-generic/live/x86.tmpl
@@ -9,10 +9,10 @@ LIVEDIR="LiveOS"
LORAXDIR="usr/share/lorax/"
## Don't allow spaces or escape characters in the iso label
-def valid_label(ch):
- return ch.isalnum() or ch == '_'
+#def valid_label(ch):
+# return ch.isalnum() or ch == '_'
-isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
+#isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
from os.path import basename
%>
diff --git a/share/templates.d/99-generic/x86.tmpl b/share/templates.d/99-generic/x86.tmpl
index 1b0a940..aff0255 100644
--- a/share/templates.d/99-generic/x86.tmpl
+++ b/share/templates.d/99-generic/x86.tmpl
@@ -9,10 +9,10 @@ KERNELDIR=PXEBOOTDIR
LORAXDIR="usr/share/lorax/"
## Don't allow spaces or escape characters in the iso label
-def valid_label(ch):
- return ch.isalnum() or ch == '_'
+#def valid_label(ch):
+# return ch.isalnum() or ch == '_'
-isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
+#isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
from os.path import basename
%>
--
1.8.3.1

View File

@ -0,0 +1,26 @@
From 71cc3cb1f2a166b364fb3beee79df7ae076c5eab Mon Sep 17 00:00:00 2001
From: liuxueping <liuxueping1@huawei.com>
Date: Sat, 29 Dec 2018 17:04:05 +0000
Subject: [PATCH] ignore the dir that without kernel version
---
src/pylorax/treebuilder.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
index 0756804..64c3709 100644
--- a/src/pylorax/treebuilder.py
+++ b/src/pylorax/treebuilder.py
@@ -211,6 +211,9 @@ class RuntimeBuilder(object):
moddir = joinpaths(root, "lib/modules/")
for kernel in findkernels(root=root):
ksyms = joinpaths(root, "boot/System.map-%s" % kernel.version)
+ if not os.path.exists(ksyms):
+ logger.info("not exist %s. ignore and continue.", ksyms)
+ continue
logger.info("doing depmod and module-info for %s", kernel.version)
runcmd(["depmod", "-a", "-F", ksyms, "-b", root, kernel.version])
generate_module_info(moddir+kernel.version, outfile=moddir+"module-info")
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From 7b7d4988dfab6e6fc7fa3821aa0a015455171f83 Mon Sep 17 00:00:00 2001
From: liuxueping <liuxueping1@huawei.com>
Date: Sat, 29 Dec 2018 17:19:27 +0000
Subject: [PATCH] use tty0 other than ttyAMA0 in rescue mode
---
share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
index 1cc389d..2f6fedb 100644
--- a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
+++ b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
@@ -40,7 +40,7 @@ submenu 'Troubleshooting -->' {
initrd @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rescue
+ linux @KERNELPATH@ @ROOT@ rescue console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
}
--
1.8.3.1

32
disable-GeoIP.patch Normal file
View File

@ -0,0 +1,32 @@
diff -Nur a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
--- a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-03-28 16:01:10.192000000 +0800
+++ b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-03-28 16:55:11.264000000 +0800
@@ -27,11 +27,11 @@
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro inst.text console=ttyAMA0 console=tty0
+ linux @KERNELPATH@ @ROOT@ ro inst.text inst.geoloc=0 console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rd.live.check inst.text console=ttyAMA0 console=tty0
+ linux @KERNELPATH@ @ROOT@ rd.live.check inst.text inst.geoloc=0 console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
diff -Nur lorax-29.16_old/share/templates.d/99-generic/config_files/aarch64/grub.conf lorax-29.16/share/templates.d/99-generic/config_files/aarch64/grub.conf
--- lorax-29.16_old/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-03-28 16:01:10.188000000 +0800
+++ lorax-29.16/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-03-28 16:53:11.692000000 +0800
@@ -5,9 +5,9 @@
hiddenmenu
title Install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ quiet inst.text
+ kernel @KERNELPATH@ @ROOT@ quiet inst.text inst.geoloc=0
initrd @INITRDPATH@
title Test this media & install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.text
+ kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.text inst.geoloc=0
initrd @INITRDPATH@

View File

@ -0,0 +1,51 @@
diff -urN b/share/templates.d/99-generic/config_files/aarch64/grub.conf a/share/templates.d/99-generic/config_files/aarch64/grub.conf
--- b/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-02-12 00:00:00.000000000 +0000
+++ a/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-02-12 00:00:00.000000000 +0000
@@ -5,9 +5,9 @@
hiddenmenu
title Install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ quiet
+ kernel @KERNELPATH@ @ROOT@ quiet inst.text
initrd @INITRDPATH@
title Test this media & install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ rd.live.check quiet
+ kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.text
initrd @INITRDPATH@
diff -urN b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
--- b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-02-12 00:00:00.000000000 +0000
+++ a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-02-12 00:00:00.000000000 +0000
@@ -26,25 +26,15 @@
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Install @PRODUCT@ @VERSION@ with GUI mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro
- initrd @INITRDPATH@
+menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ ro inst.text console=ttyAMA0 console=tty0
+ initrd @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rd.live.check
+ linux @KERNELPATH@ @ROOT@ rd.live.check inst.text console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
-menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro inst.text
- initrd @INITRDPATH@
-}
-submenu 'Troubleshooting -->' {
- menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ nomodeset
- initrd @INITRDPATH@
- }
- menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rescue console=ttyAMA0 console=tty0
- initrd @INITRDPATH@
- }
+menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ rescue console=ttyAMA0 console=tty0
+ initrd @INITRDPATH@
}

View File

@ -0,0 +1,57 @@
diff -Nur lorax-29.16.org/share/templates.d/99-generic/runtime-cleanup.tmpl lorax-29.16/share/templates.d/99-generic/runtime-cleanup.tmpl
--- lorax-29.16.org/share/templates.d/99-generic/runtime-cleanup.tmpl 2019-07-03 20:37:16.956000000 +0800
+++ lorax-29.16/share/templates.d/99-generic/runtime-cleanup.tmpl 2019-07-03 20:52:38.372000000 +0800
@@ -85,6 +85,13 @@
## icons cache
remove /usr/share/icons/*/icon-theme.cache
+remove /usr/lib/fontconfig/cache/*
+remove /lib/fontconfig/cache/*
+remove /var/lib/systemd/catalog/database
+remove /var/cache/ldconfig/aux-cache
+remove /var/log/tallylog
+remove /root/lorax-packages.log rebuildfile/rootfs/root/lorax-packages.log
+
## clean up kernel modules
removekmod sound drivers/media drivers/hwmon \
diff -Nur lorax-29.16.org/share/templates.d/99-generic/runtime-postinstall.tmpl lorax-29.16/share/templates.d/99-generic/runtime-postinstall.tmpl
--- lorax-29.16.org/share/templates.d/99-generic/runtime-postinstall.tmpl 2019-07-03 20:37:16.956000000 +0800
+++ lorax-29.16/share/templates.d/99-generic/runtime-postinstall.tmpl 2019-07-03 20:51:33.296000000 +0800
@@ -83,6 +83,36 @@
install ${configdir}/pam.sshd etc/pam.d/login
install ${configdir}/pam.sshd etc/pam.d/remote
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/91228186-0035-4ab7-a583-80b8c0acafb4/g' usr/share/fonts/aajohan-comfortaa/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/14bd5324-8247-4fd5-959e-4c676fb7a565/g' usr/share/fonts/bitmap/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/482bafab-3b6c-4800-a75e-e9150e03c4c6/g' usr/share/fonts/cantarell/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/b063668a-0121-470b-bfb2-cb866ef00550/g' usr/share/fonts/dejavu/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/dd6f2d63-2799-4d40-94ed-6a9e279523d9/g' usr/share/fonts/google-noto-cjk/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/b2bae36d-0b7f-4ae3-828a-4d1645547ec5/g' usr/share/fonts/jomolhari/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/d9675a1c-4ddc-4b36-bd9b-b7ae291731fe/g' usr/share/fonts/kacst/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/3629d762-01ea-4ab9-9e/g' usr/share/fonts/khmeros/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/5afccf87-ea92-4199-883f-6a5c3d43a4f7/g' usr/share/fonts/lklug/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/7882ea50-c955-40cc-b3/g' usr/share/fonts/lohit-assamese/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/320e3ca7-1538-4b07-9e/g' usr/share/fonts/lohit-bengali/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/242a5398-f31c-457a-a2/g' usr/share/fonts/lohit-devanagari/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/56811d0f-3154-4640-92/g' usr/share/fonts/lohit-gujarati/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/1eab1ce2-2528-46d9-b9/g' usr/share/fonts/lohit-gurmukhi/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/13c61158-ab1e-4918-8419-691dda24e833/g' usr/share/fonts/lohit-kannada/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/3d705fdf-9efc-47a4-91/g' usr/share/fonts/lohit-odia/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/4975ccbc-74df-4120-ac/g' usr/share/fonts/lohit-tamil/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/16ce5728-fa4c-440d-91/g' usr/share/fonts/lohit-telugu/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/9d5d6eea-c3be-48e9-80/g' usr/share/fonts/madan/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/84ce8a34-194e-47c0-8c/g' usr/share/fonts/sil-abyssinica/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/957787b2-56db-477e-ab/g' usr/share/fonts/sil-padauk/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/1262a8a4-1500-46f4-a3/g' usr/share/fonts/sil-scheherazade/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/ae34a6aa-984f-4723-ba/g' usr/share/fonts/smc/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/d8e92fdf-9c28-4106-bc/g' usr/share/fonts/thai-scalable/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/f2b19e9f-788f-4062-a5/g' usr/share/fonts/.uuid
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/04b9b13b-5eab-47fc-9c/g' usr/share/X11/fonts/misc/.uuid
+
+runcmd chroot ${root} sed -i 's/[0-9a-f]\{32\}/7eb9b797f7c14fca90f2a6d89bd0a9d1/g' etc/machine-id
+
+
## set up "install" user account
append etc/passwd "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda"
append etc/shadow "install::14438:0:99999:7:::"

BIN
lorax-29.16.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,42 @@
diff -Nuar a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
--- a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-08-02 23:35:27.264000000 -0400
+++ b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-08-02 23:42:52.396000000 -0400
@@ -1,4 +1,4 @@
-set default="1"
+set default="2"
function load_video {
if [ x$feature_all_video_module = xy ]; then
@@ -26,12 +26,16 @@
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Install @PRODUCT@ @VERSION@ with GUI mode' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ ro inst.geoloc=0
+ initrd @INITRDPATH@
+}
menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ ro inst.text inst.geoloc=0 console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rd.live.check inst.text inst.geoloc=0 console=ttyAMA0 console=tty0
+ linux @KERNELPATH@ @ROOT@ rd.live.check inst.geoloc=0
initrd @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
diff -Nuar a/share/templates.d/99-generic/config_files/aarch64/grub.conf b/share/templates.d/99-generic/config_files/aarch64/grub.conf
--- a/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-08-02 23:35:27.280000000 -0400
+++ b/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-08-02 23:41:29.292000000 -0400
@@ -5,9 +5,9 @@
hiddenmenu
title Install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ quiet inst.text inst.geoloc=0
+ kernel @KERNELPATH@ @ROOT@ quiet inst.geoloc=0
initrd @INITRDPATH@
title Test this media & install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.text inst.geoloc=0
+ kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.geoloc=0
initrd @INITRDPATH@

View File

@ -0,0 +1,37 @@
diff -Nuar lorax-29.16/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg lorax-29.16-new/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg
--- a/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-08-26 04:14:56.212000000 -0400
+++ b/share/templates.d/99-generic/config_files/aarch64/grub2-efi.cfg 2019-08-26 04:18:31.500000000 -0400
@@ -27,15 +27,15 @@
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install @PRODUCT@ @VERSION@ with GUI mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro inst.geoloc=0
+ linux @KERNELPATH@ @ROOT@ ro inst.geoloc=0 inst.kdump_addon=on
initrd @INITRDPATH@
}
menuentry 'Install @PRODUCT@ @VERSION@ with text mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro inst.text inst.geoloc=0 console=ttyAMA0 console=tty0
+ linux @KERNELPATH@ @ROOT@ ro inst.text inst.geoloc=0 inst.kdump_addon=on console=ttyAMA0 console=tty0
initrd @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rd.live.check inst.geoloc=0
+ linux @KERNELPATH@ @ROOT@ rd.live.check inst.geoloc=0 inst.kdump_addon=on
initrd @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
diff -Nuar lorax-29.16/share/templates.d/99-generic/config_files/aarch64/grub.conf lorax-29.16-new/share/templates.d/99-generic/config_files/aarch64/grub.conf
--- a/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-08-26 04:14:56.228000000 -0400
+++ b/share/templates.d/99-generic/config_files/aarch64/grub.conf 2019-08-26 04:19:04.176000000 -0400
@@ -5,9 +5,9 @@
hiddenmenu
title Install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ quiet inst.geoloc=0
+ kernel @KERNELPATH@ @ROOT@ quiet inst.geoloc=0 inst.kdump_addon=on
initrd @INITRDPATH@
title Test this media & install @PRODUCT@ @VERSION@
findiso
- kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.geoloc=0
+ kernel @KERNELPATH@ @ROOT@ rd.live.check quiet inst.geoloc=0 inst.kdump_addon=on
initrd @INITRDPATH@

261
lorax.spec Normal file
View File

@ -0,0 +1,261 @@
%define debug_package %{nil}
Name: lorax
Version: 29.16
Release: 5
Summary: A set of tools used to create bootable images
License: GPLv2+
URL: https://github.com/weldr/lorax
Source0: https://github.com/weldr/lorax/archive/%{name}-%{version}.tar.gz
Patch9000: 0001-ignore-the-dir-that-without-kernel-version.patch
Patch9001: 0001-add-text-mode-selection-menu-in-grub-configuration.patch
Patch9002: 0001-use-tty0-other-than-ttyAMA0-in-rescue-mode.patch
Patch9003: 0001-delete-kernel-modules-pkg.patch
Patch9004: 0001-disable-isolabel-character-change.patch
Patch9005: disable-graphics-install.patch
Patch9006: disable-GeoIP.patch
Patch9007: eliminate-difference.patch
Patch9008: lorax-enable-GUI-installation.patch
Patch9009: lorax-enable-anaconda-KdumpSpoke.patch
BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic
BuildRequires: python3-nose python3-pytest-mock python3-pocketlint python3-gevent
BuildRequires: python3-mock python3-urllib3 python3-dnf python3-librepo
BuildRequires: python3-libselinux python3-mako python3-kickstart python3-rpmfluff
Requires: lorax-templates GConf2 cpio device-mapper dosfstools e2fsprogs
Requires: findutils gawk genisoimage glib2 glibc glibc-common gzip isomd5sum
Requires: module-init-tools parted squashfs-tools util-linux xz pigz
Requires: dracut kpartx libselinux-python3 python3-mako python3-kickstart
Requires: python3-dnf python3-librepo
%ifarch %{ix86} x86_64
Requires: syslinux >= 6.02-4
%endif
%ifarch %{arm}
Requires: uboot-tools
%endif
Provides: appliance-tools-minimizer = %{version}-%{release}
Obsoletes: appliance-tools-minimizer < 007.7-3
Provides: lorax-templates-generic = %{version}-%{release}
Obsoletes: lorax-templates-generic < %{version}-%{release}
Provides: lorax-templates = %{version}-%{release}
%description
Tools for creating images, including the Anaconda boot.iso, live disk images, iso's,
and filesystem images.
It also includes livemedia-creator which is used to create bootable livemedia,
including live isos and disk images. It can use libvirtd for the install, or
Anaconda's image install feature.
The package including lorax-templates-generic
lorax-templates-generic,Generic build templates for lorax and livemedia-creator
%package lmc-virt
Summary: livemedia-creator libvirt dependencies
Requires: lorax = %{version}-%{release} qemu edk2-ovmf
Recommends: qemu-kvm
%description lmc-virt
Additional dependencies required by livemedia-creator when using it with qemu.
%package lmc-novirt
Summary: livemedia-creator no-virt dependencies
Requires: lorax = %{version}-%{release} anaconda-core anaconda-tui system-logos
%description lmc-novirt
Additional dependencies required by livemedia-creator when using it with --no-virt
to run Anaconda.
%package composer
Summary: Lorax Image Composer API Server
BuildRequires: python3-flask python3-gobject libgit2-glib python3-pytoml python3-semantic_version
Requires: lorax = %{version}-%{release}
Requires(pre): /usr/bin/getent /usr/sbin/groupadd /usr/sbin/useradd
Requires: python3-pytoml python3-semantic_version libgit2 libgit2-glib
Requires: python3-flask python3-gevent anaconda-tui qemu-img tar
%{?systemd_requires}
BuildRequires: systemd
%description composer
lorax-composer provides a REST API for building images using lorax.
%package -n composer-cli
Summary: A command line tool for use with the lorax-composer API server
Requires: python3-urllib3
%description -n composer-cli
A command line tool for use with the lorax-composer API server. Examine recipes,
build images, etc. from the command line.
%package_help
%prep
%setup -q -n %{name}-%{version}
%patch9000 -p1
%ifarch aarch64
%patch9001 -p1
%patch9002 -p1
%endif
%patch9003 -p1
%patch9004 -p1
%ifarch aarch64
%patch9005 -p1
%patch9006 -p1
%patch9007 -p1
%patch9008 -p1
%patch9009 -p1
%endif
%build
%make_build
%install
%make_install DESTDIR=%{buildroot} mandir=%{_mandir}
install -dp %{buildroot}/var/lib/lorax/composer/blueprints/
for toml in example-http-server.toml example-development.toml example-atlas.toml; do
cp ./tests/pylorax/blueprints/$toml %{buildroot}/var/lib/lorax/composer/blueprints/
done
%check
make check
%pre composer
getent group weldr >/dev/null 2>&1 || groupadd -r weldr >/dev/null 2>&1 || :
getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin -c "User for lorax-composer" weldr >/dev/null 2>&1 || :
%post composer
%systemd_post lorax-composer.service
%systemd_post lorax-composer.socket
%preun composer
%systemd_preun lorax-composer.service
%systemd_preun lorax-composer.socket
%postun composer
%systemd_postun_with_restart lorax-composer.service
%systemd_postun_with_restart lorax-composer.socket
%files
%defattr(-,root,root,-)
%doc AUTHORS docs/livemedia-creator.rst docs/product-images.rst
%doc docs/*ks ANNOUNCE POLICY
%license COPYING
%config(noreplace) %{_sysconfdir}/lorax/lorax.conf
%{python3_sitelib}/pylorax
%{python3_sitelib}/*.egg-info
%{_bindir}/image-minimizer
%{_bindir}/mk-s390-cdboot
%{_sbindir}/lorax
%{_sbindir}/mkefiboot
%{_sbindir}/livemedia-creator
%dir %{_sysconfdir}/lorax
%dir %{_datadir}/lorax
%dir %{_datadir}/lorax/templates.d
%{_datadir}/lorax/templates.d/*
%files lmc-virt
%files lmc-novirt
%files composer
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/lorax/composer.conf
%{python3_sitelib}/pylorax/api/*
%{_sbindir}/lorax-composer
%{_unitdir}/lorax-composer.*
%dir %{_datadir}/lorax/composer
%{_datadir}/lorax/composer/*
%{_tmpfilesdir}/lorax-composer.conf
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/blueprints/
%attr(0771, weldr, weldr) %{_sharedstatedir}/lorax/composer/blueprints/*
%files -n composer-cli
%defattr(-,root,root,-)
%{_sysconfdir}/bash_completion.d/composer
%{_bindir}/composer
%{python3_sitelib}/composer/*
%files help
%defattr(-,root,root)
%doc HACKING.md README.md
%{_mandir}/man1/*.1*
%changelog
* Mon Oct 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.34.0-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC: add lorax-lmc-virt package
* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.34.0-1
- Package init
* Fri Aug 23 2019 cangyi<cangyi@huawei.com> - 29.16-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:format patches
* Fri Aug 16 2019 fanghuiyu<fanghuiyu@huawei.com> - 29.16-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:enable GUI installation
* Wed Jul 3 2019 zhujunhao<zhujunhao5@huawei.com> - 29.16-1.h7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:eliminate-difference
* Thu Mar 28 2019 tianhang<tianhang1@huawei.com> - 29.16-1.h6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:disable GeoIP for anaconda
* Wed Feb 27 2019 hexiaowen<hexiaowen@huawei.com> - 29.16-1.h5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:disable graphic install and add console cmdline
* Wed Feb 27 2019 hexiaowen<hexiaowen@huawei.com> - 29.16-1.h4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:disable graphic install
* Fri Jan 11 2019 zhouyihang<zhouyihang1@huawei.com> - 29.16-1.h3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:disable isolabel character change
* Thu Jan 10 2019 liuxueping<liuxueping1@huawei.com> - 29.16-1.h2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:delete kernel-modules pkgs
* Sat Dec 29 2018 liuxueping<liuxueping1@huawei.com> - 29.16-1.h1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:use tty0 rather than ttyAMA0 for rescue mode on aarch64 machine
ignore the dir that without kernel version
add text mode in aarch64 installation