Drop installkernel so that it can by provided by systemd
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.
This commit is contained in:
parent
3d050aaf49
commit
aa9b1b454f
@ -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 <zbyszek@in.waw.pl> - 8.40-72
|
||||
- Drop installkernel so that it can be provided by systemd
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.40-71
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author(s): tyson@rwii.com
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "Usage: `basename $0` <kernel_version> <bootimage> <mapfile>" >&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
|
Loading…
Reference in New Issue
Block a user