CentOS 8: Upgrade grubby to version 8.40

(1)Release Version Upgrade
(2)Matching code changes with el7 to el8

Change-Id: I036b880e95e966cf0831d76aacbe06f5b813609b
Story: 2006729
Task: 37672
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
Long Li 2019-11-22 11:33:21 +08:00
parent 9035cd1be8
commit a11b5eed5f
7 changed files with 77 additions and 72 deletions

View File

@ -1,2 +1,2 @@
COPY_LIST="" COPY_LIST=""
TIS_PATCH_VER=3 TIS_PATCH_VER=1

View File

@ -1,8 +1,7 @@
From aecf1e4686bbd50e96bea030bdf7ee4f4882fe5c Mon Sep 17 00:00:00 2001 From aecf1e4686bbd50e96bea030bdf7ee4f4882fe5c Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 17:23:24 -0400 Date: Mon, 2 Oct 2017 17:23:24 -0400
Subject: [PATCH 1/2] WRS: Subject: [PATCH 1/2] 0001-grubby-Update-package-versioning-for-TIS-format.patch
0001-grubby-Update-package-versioning-for-TIS-format.patch
Conflicts: Conflicts:
SPECS/grubby.spec SPECS/grubby.spec
@ -11,17 +10,17 @@ Conflicts:
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec
index dd8fa7f..22bff31 100644 index a7cb388..a42642f 100644
--- a/SPECS/grubby.spec --- a/SPECS/grubby.spec
+++ b/SPECS/grubby.spec +++ b/SPECS/grubby.spec
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Name: grubby Name: grubby
Version: 8.28 Version: 8.40
-Release: 25%{?dist} -Release: 34%{?dist}
+Release: 25.el7%{?_tis_dist}.%{tis_patch_ver} +Release: 34.el8%{?_tis_dist}.%{tis_patch_ver}
Summary: Command line tool for updating bootloader configs Summary: Command line tool for updating BootLoaderSpec files
Group: System Environment/Base
License: GPLv2+ License: GPLv2+
URL: https://github.com/rhinstaller/grubby
-- --
1.9.1 2.7.4

View File

@ -1,26 +1,25 @@
From 3c4f2fef7d1d321a34a9777946879f187fdad2bc Mon Sep 17 00:00:00 2001 From 3c4f2fef7d1d321a34a9777946879f187fdad2bc Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com> From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 17:23:24 -0400 Date: Mon, 2 Oct 2017 17:23:24 -0400
Subject: [PATCH 2/2] WRS: 0002-grubby-Generic-name-for-Titanium.patch Subject: [PATCH 2/2] 0002-grubby-Generic-name-for-Titanium.patch
--- ---
SPECS/grubby.spec | 3 +++ SPECS/grubby.spec | 2 ++
1 file changed, 3 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec
index 22bff31..882339a 100644 index a42642f..28de109 100644
--- a/SPECS/grubby.spec --- a/SPECS/grubby.spec
+++ b/SPECS/grubby.spec +++ b/SPECS/grubby.spec
@@ -84,6 +84,9 @@ Patch0074: 0074-Add-s390-s390x-set-default-index-test-1285601.patch @@ -70,6 +70,8 @@ Patch0054: 0054-Make-installkernel-to-use-kernel-install-scripts-on-.patch
Patch0075: 0075-Fix-setDefaultImage-for-s390-s390x-1285601.patch Patch0055: 0055-Add-usr-libexec-rpm-sort.patch
Patch0076: 0076-grubby-Make-sure-configure-BOOTLOADER-variables-are-.patch Patch0056: 0056-Improve-man-page-for-info-option.patch
+# WRS Titanium patches
+Patch1000: 1000-Generic-name-for-Titanium.patch +Patch1000: 1000-Generic-name-for-Titanium.patch
+ +
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc
BuildRequires: pkgconfig glib2-devel popt-devel BuildRequires: pkgconfig glib2-devel popt-devel
BuildRequires: libblkid-devel git BuildRequires: libblkid-devel git-core sed make
-- --
1.9.1 2.7.4

View File

@ -4,56 +4,57 @@ Date: Tue, 13 Feb 2018 23:02:49 -0500
Subject: [PATCH 1/1] grubby add multiboot2 Subject: [PATCH 1/1] grubby add multiboot2
--- ---
SPECS/grubby.spec | 15 +++++++++++++++ SPECS/grubby.spec | 16 ++++++++++++++++
1 file changed, 15 insertions(+) 1 file changed, 16 insertions(+)
diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec
index 071463a..a3bb371 100644 index 28de109..e7bee82 100644
--- a/SPECS/grubby.spec --- a/SPECS/grubby.spec
+++ b/SPECS/grubby.spec +++ b/SPECS/grubby.spec
@@ -86,6 +86,7 @@ Patch0076: 0076-grubby-Make-sure-configure-BOOTLOADER-variables-are-.patch @@ -71,6 +71,7 @@ Patch0055: 0055-Add-usr-libexec-rpm-sort.patch
Patch0056: 0056-Improve-man-page-for-info-option.patch
# WRS Titanium patches
Patch1000: 1000-Generic-name-for-Titanium.patch Patch1000: 1000-Generic-name-for-Titanium.patch
+Patch1001: 1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch +Patch1001: 1001-Add-support-for-updating-grub-cfg-with-multiboot-2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc
BuildRequires: pkgconfig glib2-devel popt-devel BuildRequires: pkgconfig glib2-devel popt-devel
@@ -102,6 +103,10 @@ Requires: s390utils-base @@ -88,6 +89,11 @@ Requires: s390utils-base
Requires: uboot-tools
%endif %endif
Requires: system-release Requires: findutils
+BuildRequires: python-setuptools +BuildRequires: python-setuptools
+Requires: python-devel +Requires: python-devel
+ +
+%define pythonroot /usr/lib64/python2.7/site-packages +%define pythonroot /usr/lib64/python2.7/site-packages
+
%description %description
grubby is a command line tool for updating and displaying information about This package provides a grubby compatibility script that manages
@@ -142,6 +147,11 @@ mkdir -p $RPM_BUILD_ROOT/boot BootLoaderSpec files and is meant to only be used for legacy compatibility
echo " " >> $RPM_BUILD_ROOT/boot/boot.scr @@ -128,6 +134,11 @@ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/grubby,g" %{SOURCE2} \
%endif sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} \
> %{buildroot}%{_sbindir}/installkernel
+install -d -m 0755 $RPM_BUILD_ROOT/%{pythonroot}/grubby +install -d -m 0755 $RPM_BUILD_ROOT/%{pythonroot}/grubby
+install -m 644 grub_cfg_update.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/grub_cfg_update.py +install -m 644 grub_cfg_update.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/grub_cfg_update.py
+install -m 644 __init__.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/__init__.py +install -m 644 __init__.py $RPM_BUILD_ROOT/%{pythonroot}/grubby/__init__.py
+install -m 500 grub-cfg-update $RPM_BUILD_ROOT/usr/sbin/grub-cfg-update +install -m 500 grub-cfg-update $RPM_BUILD_ROOT/usr/sbin/grub-cfg-update
+ +
%clean %package deprecated
rm -rf $RPM_BUILD_ROOT Summary: Legacy command line tool for updating bootloader configs
Conflicts: %{name} <= 8.40-13
@@ -154,6 +164,11 @@ rm -rf $RPM_BUILD_ROOT @@ -164,6 +175,11 @@ current boot environment.
%{_prefix}/sbin/installkernel %attr(0755,root,root) %{_sbindir}/grubby
%{_prefix}/sbin/new-kernel-pkg %attr(0755,root,root) %{_sbindir}/installkernel
%{_prefix}/sbin/grubby %attr(0755,root,root) %{_sbindir}/new-kernel-pkg
+%{pythonroot}/grubby +%{pythonroot}/grubby
+%{_prefix}/sbin/grub-cfg-update +%{_prefix}/sbin/grub-cfg-update
+%{pythonroot}/grubby/grub_cfg_update.py +%{pythonroot}/grubby/grub_cfg_update.py
+%{pythonroot}/grubby/__init__.py +%{pythonroot}/grubby/__init__.py
+ +
%{_mandir}/man8/*.8* %{_mandir}/man8/*.8*
/usr/libexec/grubby/prune_debug
%ghost %attr(0644,-,-) %config(noreplace) %{_sysconfdir}/sysconfig/kernel %changelog
-- --
1.8.3.1 2.7.4

View File

@ -3,15 +3,16 @@ From: jmckenna <jason.mckenna@windriver.com>
Date: Wed, 5 Apr 2017 09:35:06 -0400 Date: Wed, 5 Apr 2017 09:35:06 -0400
Subject: [PATCH] Use generic OS title for Titanium Subject: [PATCH] Use generic OS title for Titanium
Signed-off-by: lilong-neu <lilong-neu@neusoft.com>
--- ---
new-kernel-pkg | 2 ++ new-kernel-pkg | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/new-kernel-pkg b/new-kernel-pkg diff --git a/new-kernel-pkg b/new-kernel-pkg
index 847e959..977ef2d 100755 index 0fe6caa..9add50b 100755
--- a/new-kernel-pkg --- a/new-kernel-pkg
+++ b/new-kernel-pkg +++ b/new-kernel-pkg
@@ -166,6 +166,8 @@ set_title() { @@ -157,6 +157,8 @@ set_title() {
fi fi
elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then
title=$(echo $version | sed 's/ /_/g') title=$(echo $version | sed 's/ /_/g')
@ -21,5 +22,5 @@ index 847e959..977ef2d 100755
. /etc/os-release . /etc/os-release
title="$NAME ($version) $VERSION" title="$NAME ($version) $VERSION"
-- --
1.9.1 2.7.4

View File

@ -4,35 +4,41 @@ Date: Tue, 13 Feb 2018 22:48:54 -0500
Subject: [PATCH 1/1] Add support for updating grub.cfg with multiboot 2 Subject: [PATCH 1/1] Add support for updating grub.cfg with multiboot 2
--- ---
Makefile | 5 +++ Makefile | 4 ++
__init__.py | 8 ++++ __init__.py | 8 ++++
grub-cfg-update | 17 ++++++++ grub-cfg-update | 17 ++++++++
grub_cfg_update.py | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++ grub_cfg_update.py | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++
new-kernel-pkg | 33 ++++++++++---- new-kernel-pkg | 33 ++++++++++----
5 files changed, 181 insertions(+), 8 deletions(-) 5 files changed, 180 insertions(+), 8 deletions(-)
create mode 100644 __init__.py create mode 100644 __init__.py
create mode 100644 grub-cfg-update create mode 100644 grub-cfg-update
create mode 100644 grub_cfg_update.py create mode 100644 grub_cfg_update.py
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index e021f35..93fa41b 100644 index 8eeec80..de72d3c 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -56,6 +56,11 @@ install: all @@ -49,6 +49,7 @@ test: all
install -m 755 grubby $(DESTDIR)$(PREFIX)/sbin ; \ install: all
install -m 644 grubby.8 $(DESTDIR)/$(mandir)/man8 ; \ mkdir -p $(DESTDIR)$(PREFIX)$(sbindir)
mkdir -p $(DESTDIR)/$(mandir)/man8
+ mkdir -p $(DESTDIR)/usr/lib64/python3.6/site-packages/grubby
install -m 755 new-kernel-pkg $(DESTDIR)$(PREFIX)$(sbindir)
install -m 644 new-kernel-pkg.8 $(DESTDIR)/$(mandir)/man8
install -m 755 installkernel $(DESTDIR)$(PREFIX)$(sbindir)
@@ -59,6 +60,9 @@ install: all
fi fi
+ mkdir -p $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby install -m 755 -d $(DESTDIR)$(PREFIX)$(libexecdir)/grubby/
+ install -m 644 grub_cfg_update.py $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby/grub_cfg_update.py install -m 755 rpm-sort $(DESTDIR)$(PREFIX)$(libexecdir)/grubby/rpm-sort
+ install -m 644 __init__.py $(DESTDIR)/usr/lib64/python2.7/site-packages/grubby/__init__.py + install -m 644 grub_cfg_update.py $(DESTDIR)/usr/lib64/python3.6/site-packages/grubby/grub_cfg_update.py
+ install -m 500 grub-cfg-update $(DESTDIR)$(PREFIX)/sbin/grub-cfg-update + install -m 644 __init__.py $(DESTDIR)/usr/lib64/python3.6/site-packages/grubby/__init__.py
+ + install -m 500 grub-cfg-update $(DESTDIR)$(PREFIX)$(sbindir)/grub-cfg-update
grubby:: $(OBJECTS) grubby:: $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS)
diff --git a/__init__.py b/__init__.py diff --git a/__init__.py b/__init__.py
new file mode 100644 new file mode 100644
index 0000000..5f30af6 index 0000000..40094b3
--- /dev/null --- /dev/null
+++ b/__init__.py +++ b/__init__.py
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
@ -44,14 +50,13 @@ index 0000000..5f30af6
+# +#
+# +#
+# +#
\ No newline at end of file
diff --git a/grub-cfg-update b/grub-cfg-update diff --git a/grub-cfg-update b/grub-cfg-update
new file mode 100644 new file mode 100644
index 0000000..5e457e9 index 0000000..64fd286
--- /dev/null --- /dev/null
+++ b/grub-cfg-update +++ b/grub-cfg-update
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
+#!/usr/bin/env python +#!/usr/bin/env python3
+ +
+""" +"""
+Copyright (c) 2018 Wind River Systems, Inc. +Copyright (c) 2018 Wind River Systems, Inc.
@ -70,11 +75,11 @@ index 0000000..5e457e9
+ +
diff --git a/grub_cfg_update.py b/grub_cfg_update.py diff --git a/grub_cfg_update.py b/grub_cfg_update.py
new file mode 100644 new file mode 100644
index 0000000..f5cd174 index 0000000..03c83c9
--- /dev/null --- /dev/null
+++ b/grub_cfg_update.py +++ b/grub_cfg_update.py
@@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
+#!/usr/bin/env python +#!/usr/bin/env python3
+# +#
+# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0
@ -201,10 +206,10 @@ index 0000000..f5cd174
+ print e + print e
+ sys.exit(-1) + sys.exit(-1)
diff --git a/new-kernel-pkg b/new-kernel-pkg diff --git a/new-kernel-pkg b/new-kernel-pkg
index 977ef2d..1bb0a64 100755 index 9add50b..f87a171 100755
--- a/new-kernel-pkg --- a/new-kernel-pkg
+++ b/new-kernel-pkg +++ b/new-kernel-pkg
@@ -185,6 +185,11 @@ install() { @@ -176,6 +176,11 @@ install() {
return return
fi fi
@ -216,7 +221,7 @@ index 977ef2d..1bb0a64 100755
INITRD="" INITRD=""
if [ -f $initrdfile ]; then if [ -f $initrdfile ]; then
[ -n "$verbose" ] && echo "found $initrdfile and using it with grubby" [ -n "$verbose" ] && echo "found $initrdfile and using it with grubby"
@@ -334,6 +339,11 @@ remove() { @@ -332,6 +337,11 @@ remove() {
return return
fi fi
@ -228,7 +233,7 @@ index 977ef2d..1bb0a64 100755
local files local files
local f local f
files="/etc/kernel/prerm.d/*[^~] /etc/kernel/prerm.d/$version/*[^~]" files="/etc/kernel/prerm.d/*[^~] /etc/kernel/prerm.d/$version/*[^~]"
@@ -483,14 +493,21 @@ update() { @@ -446,14 +456,21 @@ update() {
fi fi
if [ -n "$cfgGrub2Efi" ]; then if [ -n "$cfgGrub2Efi" ]; then
@ -259,5 +264,5 @@ index 977ef2d..1bb0a64 100755
[ -n "$verbose" ] && echo "$grub2EfiConfig does not exist, not running grubby" [ -n "$verbose" ] && echo "$grub2EfiConfig does not exist, not running grubby"
fi fi
-- --
1.8.3.1 2.7.4

View File

@ -1 +1 @@
mirror:Source/grubby-8.28-25.el7.src.rpm mirror:Source/grubby-8.40-34.el8.src.rpm