Compare commits
4 Commits
68f872a10e
...
aa9b1b454f
Author | SHA1 | Date |
---|---|---|
Zbigniew Jędrzejewski-Szmek | aa9b1b454f | |
Fedora Release Engineering | 3d050aaf49 | |
Marta Lewandowska | 8656bfd565 | |
Fedora Release Engineering | d696710922 |
15
grubby-bls
15
grubby-bls
|
@ -827,12 +827,15 @@ fi
|
|||
remove_var_prefix "$(get_prefix)"
|
||||
|
||||
if [[ -n $kernel ]]; then
|
||||
opts="${bls_options[$default_index]}"
|
||||
if [[ $copy_default != "true" ]]; then
|
||||
opts=$(echo $opts | sed -e 's/ .*//')
|
||||
fi
|
||||
if [[ -n $args ]]; then
|
||||
opts="${opts} ${args}"
|
||||
if [[ $copy_default = "true" ]]; then
|
||||
opts="${bls_options[$default_index]}"
|
||||
if [[ -n $args ]]; then
|
||||
opts="${opts} ${args}"
|
||||
fi
|
||||
else
|
||||
opts="${opts} ${args}"
|
||||
remove_args="$kernelopts"
|
||||
update_args "${opts}" "${remove_args}" ""
|
||||
fi
|
||||
|
||||
add_bls_fragment "${kernel}" "${title}" "${opts}" "${initrd}" \
|
||||
|
|
17
grubby.spec
17
grubby.spec
|
@ -3,13 +3,12 @@
|
|||
|
||||
Name: grubby
|
||||
Version: 8.40
|
||||
Release: 68%{?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,23 @@ 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
|
||||
|
||||
* Tue Feb 21 2023 Marta Lewandowska <mlewando@redhat.com> - 8.40-70
|
||||
- remove root= when not copying default
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.40-69
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Nov 01 2022 Robbie Harwood <rharwood@redhat.com> - 8.40-68
|
||||
- Drop custom rpm-sort
|
||||
- See-also: https://github.com/rpm-software-management/rpm/pull/2249
|
||||
|
|
|
@ -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