From 51a71f4d98c8f05f80d73f80f9707f5d5653520c Mon Sep 17 00:00:00 2001 From: hanzj0122_admin <961123325@gmail.com> Date: Tue, 1 Sep 2020 10:30:07 +0800 Subject: [PATCH] move installkernel-bls installkernel.in to grubby --- grub2.spec | 13 +++----- installkernel-bls | 85 ----------------------------------------------- installkernel.in | 8 ----- 3 files changed, 4 insertions(+), 102 deletions(-) delete mode 100644 installkernel-bls delete mode 100644 installkernel.in diff --git a/grub2.spec b/grub2.spec index a60fa1b..9333214 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.04 -Release: 3 +Release: 4 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -20,8 +20,6 @@ Source6: gitignore Source7: 99-grub-mkconfig.install Source9: strtoull_test.c Source10: 20-grub.install -Source11: installkernel-bls -Source12: installkernel.in %include %{SOURCE1} %include %{SOURCE2} @@ -230,10 +228,6 @@ install -d -m 0755 %{buildroot}%{_unitdir}/system-update.target.wants install -m 0755 docs/grub-boot-indeterminate.service %{buildroot}%{_unitdir} ln -s ../grub-boot-indeterminate.service %{buildroot}%{_unitdir}/system-update.target.wants -install -d -m 0755 %{buildroot}%{_libexecdir}/installkernel -cp -v %{SOURCE11} %{buildroot}%{_libexecdir}/installkernel -sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE12} > %{buildroot}%{_sbindir}/installkernel - %global finddebugroot "%{_builddir}/%{?buildsubdir}/debug" %global dip RPM_BUILD_ROOT=%{finddebugroot} %{__debug_install_post} @@ -310,7 +304,6 @@ rm -r /boot/grub2.tmp/ || : %defattr(-,root,root) %license COPYING %dir /boot/grub2/themes/system -%attr(0755,root,root) %{_sbindir}/installkernel %attr(0700,root,root) %dir /boot/grub2 %ghost %config(noreplace) /boot/grub2/grubenv %exclude /boot/grub2/* @@ -320,7 +313,6 @@ rm -r /boot/grub2.tmp/ || : %{_prefix}/lib/kernel/install.d/20-grub.install %{_prefix}/lib/kernel/install.d/99-grub-mkconfig.install %{_sysconfdir}/kernel/install.d/*.install -%{_libexecdir}/installkernel/installkernel-bls %dir %attr(0700,root,root) %{efi_esp_dir} %{_datadir}/locale/* @@ -392,6 +384,9 @@ rm -r /boot/grub2.tmp/ || : %{_datadir}/man/man* %changelog +* Tue Sep 1 2020 hanzhijun - 2.04-4 +- move installkernel-bls installkernel.in to grubby + * Fri Aug 7 2020 hanzhijun - 2.04-3 - Type:cves - Id:CVE-2020-10713 CVE-2020-14308 CVE-2020-14309 CVE-2020-14310 CVE-2020-14311 CVE-2020-15705 CVE-2020-15706 CVE-2020-15707 diff --git a/installkernel-bls b/installkernel-bls deleted file mode 100644 index d66c44a..0000000 --- a/installkernel-bls +++ /dev/null @@ -1,85 +0,0 @@ -#! /bin/sh -# -# /sbin/installkernel -# -# Copyright 2007-2008 Red Hat, Inc. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Author(s): tyson@rwii.com -# - -[[ -f /etc/default/grub ]] && . /etc/default/grub - -usage() { - echo "Usage: `basename $0` " >&2 - exit 1 -} - -cfgLoader= - -if [ -z "$INSTALL_PATH" -o "$INSTALL_PATH" == "/boot" ]; then - INSTALL_PATH=/boot - cfgLoader=1 -fi - -LINK_PATH=/boot -RELATIVE_PATH=`echo "$INSTALL_PATH/" | sed "s|^$LINK_PATH/||"` -KERNEL_VERSION=$1 -BOOTIMAGE=$2 -MAPFILE=$3 -ARCH=$(uname -m) -if [ $ARCH = 'ppc64' -o $ARCH = 'ppc' ]; then - KERNEL_NAME=vmlinux -else - KERNEL_NAME=vmlinuz -fi - -if [ -z "$KERNEL_VERSION" -o -z "$BOOTIMAGE" -o -z "$MAPFILE" ]; then - usage -fi - -if [ -f $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION ]; then - mv $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION \ - $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION.old; -fi - -if [ ! -L $INSTALL_PATH/$KERNEL_NAME ]; then - if [ -e $INSTALLPATH/$KERNEL_NAME ]; then - mv $INSTALL_PATH/$KERNEL_NAME $INSTALL_PATH/$KERNEL_NAME.old - fi -fi - -if [ -f $INSTALL_PATH/System.map-$KERNEL_VERSION ]; then - mv $INSTALL_PATH/System.map-$KERNEL_VERSION \ - $INSTALL_PATH/System.map-$KERNEL_VERSION.old; -fi - -if [ ! -L $INSTALL_PATH/System.map ]; then - if [ -e $INSTALLPATH/System.map ]; then - mv $INSTALL_PATH/System.map $INSTALL_PATH/System.map.old - fi -fi -ln -sf ${RELATIVE_PATH}$INSTALL_PATH/System.map-$KERNEL_VERSION $LINK_PATH/System.map - -cat $BOOTIMAGE > $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION -cp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION - -ln -fs ${RELATIVE_PATH}$INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION $LINK_PATH/$KERNEL_NAME -ln -fs ${RELATIVE_PATH}$INSTALL_PATH/System.map-$KERNEL_VERSION $LINK_PATH/System.map - -if [ -n "$cfgLoader" ] && [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then - kernel-install add $KERNEL_VERSION $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION - exit $? -fi diff --git a/installkernel.in b/installkernel.in deleted file mode 100644 index 87b81ee..0000000 --- a/installkernel.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -if [[ -x @@LIBEXECDIR@@/installkernel ]] ; then - exec @@LIBEXECDIR@@/installkernel "${@}" -elif [[ -x @@LIBEXECDIR@@/installkernel-bls ]] ; then - exec @@LIBEXECDIR@@/installkernel-bls "${@}" -fi -echo "installkernel is not installed correctly." >>/dev/stderr -exit 1 -- Gitee