From aa9b1b454fd0c792226cefb65d744fadfaa8acda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Jun 2023 11:33:14 -0600 Subject: [PATCH] Drop installkernel so that it can by provided by systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemd has kernel-install which supports being invoked as installkernel. After the file is removed from grubby, we can just provide a symlink installkernel → kernel-install. --- grubby.spec | 8 ++--- installkernel-bls | 83 ----------------------------------------------- 2 files changed, 4 insertions(+), 87 deletions(-) delete mode 100755 installkernel-bls diff --git a/grubby.spec b/grubby.spec index a19523e..af0bbdc 100644 --- a/grubby.spec +++ b/grubby.spec @@ -3,13 +3,12 @@ Name: grubby Version: 8.40 -Release: 71%{?dist} +Release: 72%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ Source1: grubby-bls # Source2: rpm-sort.c Source3: COPYING -Source4: installkernel-bls Source5: 95-kernel-hooks.install Source6: 10-devicetree.install Source7: grubby.8 @@ -53,7 +52,6 @@ cp %{SOURCE3} . || true %install mkdir -p %{buildroot}%{_sbindir}/ install -T -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/grubby -install -T -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}/installkernel install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE5} install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE6} @@ -71,12 +69,14 @@ fi %files %license COPYING %attr(0755,root,root) %{_sbindir}/grubby -%attr(0755,root,root) %{_sbindir}/installkernel %attr(0755,root,root) %{_prefix}/lib/kernel/install.d/10-devicetree.install %attr(0755,root,root) %{_prefix}/lib/kernel/install.d/95-kernel-hooks.install %{_mandir}/man8/grubby.8* %changelog +* Mon Sep 11 2023 Zbigniew Jedrzejewski-Szmek - 8.40-72 +- Drop installkernel so that it can be provided by systemd + * Thu Jul 20 2023 Fedora Release Engineering - 8.40-71 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/installkernel-bls b/installkernel-bls deleted file mode 100755 index f2f607e..0000000 --- a/installkernel-bls +++ /dev/null @@ -1,83 +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 -# - -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" ]; then - kernel-install add $KERNEL_VERSION $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION - exit $? -fi