#8 Drop installkernel so that it can by provided by systemd
Closed 9 months ago by zbyszek. Opened a year ago by zbyszek.

file modified
+4 -4
@@ -3,13 +3,12 @@ 

  

  Name: grubby

  Version: 8.40

- Release: 70%{?dist}

+ Release: 71%{?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 @@ 

  %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 @@ 

  %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

+ * Thu Jun 22 2023 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 8.40-71

+ - Drop installkernel so that it can by provided by systemd

typo - s/by/be/g

+ 

  * Tue Feb 21 2023 Marta Lewandowska <mlewando@redhat.com> - 8.40-70

  - remove root= when not copying default

  

file removed
-83
@@ -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

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.

typo - s/by/be/g

I missed the notification on this. Updated pull request in https://src.fedoraproject.org/rpms/grubby/pull-request/9.

Pull-Request has been closed by zbyszek

9 months ago
Metadata