From f92a00c4b376bc1f643e2cf97b54211494b72a3a Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Wed, 21 Nov 2018 10:06:07 +0100 Subject: [PATCH] Remove installkernel-bls script The installkernel-bls script is present in both the grub2-common and grubby packages. But there's no need for this duplication and it can just be installed by the grubby package. Related: rhbz#1647721 Signed-off-by: Javier Martinez Canillas --- grub2.spec | 17 +++------- installkernel-bls | 85 ----------------------------------------------- installkernel.in | 8 ----- 3 files changed, 4 insertions(+), 106 deletions(-) delete mode 100755 installkernel-bls delete mode 100644 installkernel.in diff --git a/grub2.spec b/grub2.spec index e9a954b..c4a5ad6 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 62%{?dist} +Release: 63%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base License: GPLv3+ @@ -23,8 +23,6 @@ Source5: theme.tar.bz2 Source6: gitignore Source8: strtoull_test.c Source9: 20-grub.install -Source11: installkernel-bls -Source12: installkernel.in Source13: 99-grub-mkconfig.install %include %{SOURCE1} @@ -237,12 +235,6 @@ install -d -m 0755 %{buildroot}%{_unitdir}/system-update.target.wants ln -s ../grub-boot-indeterminate.service \ %{buildroot}%{_unitdir}/system-update.target.wants -# Install installkernel script -mkdir -p %{buildroot}%{_libexecdir}/installkernel/ -cp -v %{SOURCE11} %{buildroot}%{_libexecdir}/installkernel/ -sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE12} \ - > %{buildroot}%{_sbindir}/installkernel - # Don't run debuginfo on all the grub modules and whatnot; it just # rejects them, complains, and slows down extraction. %global finddebugroot "%{_builddir}/%{?buildsubdir}/debug" @@ -339,9 +331,6 @@ fi %{_sysconfdir}/kernel/install.d/20-grubby.install %{_sysconfdir}/kernel/install.d/90-loaderentry.install %{_prefix}/lib/kernel/install.d/99-grub-mkconfig.install -%dir %{_libexecdir}/installkernel -%{_libexecdir}/installkernel/installkernel-bls -%attr(0755,root,root) %{_sbindir}/installkernel %dir %{_datarootdir}/grub %exclude %{_datarootdir}/grub/* %dir /boot/%{name} @@ -503,7 +492,7 @@ fi %endif %changelog -* Tue Oct 23 2018 Javier Martinez Canillas +* Wed Nov 21 2018 Javier Martinez Canillas - 2.02-63 - add 10_linux_bls grub.d snippet to generate menu entries from BLS files Resolves: rhbz#1636013 - Only set kernelopts in grubenv if it wasn't set before @@ -522,6 +511,8 @@ fi Resolves: rhbz#1640979 - Don't unconditionally set default entry when installing debug kernels Resolves: rhbz#1636346 +- Remove installkernel-bls script + Related: rhbz#1647721 * Thu Oct 04 2018 Peter Jones - 2.02-62 - Exclude /etc/grub.d/01_fallback_counting until we work through some design diff --git a/installkernel-bls b/installkernel-bls deleted file mode 100755 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