[systemd/f21] systemd-216-21

Harald Hoyer harald at fedoraproject.org
Fri Mar 13 08:35:48 UTC 2015


commit 5d90d92882723db06f0d873983d4e4407b3f270d
Author: Harald Hoyer <harald at redhat.com>
Date:   Fri Mar 13 09:29:19 2015 +0100

    systemd-216-21
    
    - update kernel-install to cope with kernel images in locations other
    than /boot

 kernel-install-grubby.patch | 50 ++++++++++++++++++++++++++++++---------------
 systemd.spec                |  5 ++++-
 2 files changed, 38 insertions(+), 17 deletions(-)
---
diff --git a/kernel-install-grubby.patch b/kernel-install-grubby.patch
index 481859d..1793f83 100644
--- a/kernel-install-grubby.patch
+++ b/kernel-install-grubby.patch
@@ -1,31 +1,46 @@
-From 0fe97bc02e3108efdb844feb1b367a89ba995d83 Mon Sep 17 00:00:00 2001
+From ae656ceaa1092ba81255ade8e462305ebe77f656 Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Tue, 14 Jan 2014 17:48:08 -0500
 Subject: [PATCH] kernel-install: add fedora specific callouts to
  new-kernel-pkg
 
 ---
- src/kernel-install/kernel-install | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
+ src/kernel-install/kernel-install | 36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
 
 diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
-index 3ae1d77..3a2ac56 100644
+index 3ae1d77..f1c74de 100644
 --- a/src/kernel-install/kernel-install
 +++ b/src/kernel-install/kernel-install
-@@ -19,6 +19,27 @@
- # You should have received a copy of the GNU Lesser General Public License
- # along with systemd; If not, see <http://www.gnu.org/licenses/>.
+@@ -71,6 +71,42 @@ fi
+ KERNEL_VERSION="$1"
+ KERNEL_IMAGE="$2"
  
 +if [[ -x /sbin/new-kernel-pkg ]]; then
-+    [[ "$2" == *\+* ]] && flavor=-"${2##*+}"
-+    case "$1" in
++    KERNEL_DIR="${KERNEL_IMAGE%/*}"
++    if [[ "${KERNEL_DIR}" != "/boot" ]]; then
++        for i in \
++            "$KERNEL_IMAGE" \
++            "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \
++            "$KERNEL_DIR"/System.map \
++            "$KERNEL_DIR"/config \
++            "$KERNEL_DIR"/zImage.stub \
++            "$KERNEL_DIR"/dtb \
++            ; do
++            [[ -e "$i" ]] || continue
++            cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
++        done
++    fi
++
++    [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
++    case "$COMMAND" in
 +        add)
-+            /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $?
-+            /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $?
-+            /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $?
++            /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
++            /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
++            /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
 +            ;;
 +        remove)
-+            /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || exit $?
++            /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
 +            ;;
 +        *)
 +            ;;
@@ -37,6 +52,9 @@ index 3ae1d77..3a2ac56 100644
 +    fi
 +fi
 +
- usage()
- {
-     echo "Usage:"
+ if [[ -f /etc/machine-id ]]; then
+     read MACHINE_ID < /etc/machine-id
+ fi
+-- 
+2.3.2
+
diff --git a/systemd.spec b/systemd.spec
index 8060dda..1603364 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -16,7 +16,7 @@
 Name:           systemd
 Url:            http://www.freedesktop.org/wiki/Software/systemd
 Version:        216
-Release:        20%{?gitcommit:.git%{gitcommit}}%{?dist}
+Release:        21%{?gitcommit:.git%{gitcommit}}%{?dist}
 # For a breakdown of the licensing, see README
 License:        LGPLv2+ and MIT and GPLv2+
 Summary:        A System and Service Manager
@@ -1050,6 +1050,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
 %{_datadir}/systemd/gatewayd
 
 %changelog
+* Fri Mar 13 2015 Harald Hoyer <harald at redhat.com> 216-21
+- update kernel-install to cope with kernel images in locations other than /boot
+
 * Thu Feb 05 2015 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> - 216-20
 - Patch for crash in systemd-sleep (#1147610)
 - Improved --help and error handling in commandline errors (#1183771, #1186952)


More information about the scm-commits mailing list