dracut-038-34.git20140815

- git snapshot
This commit is contained in:
Harald Hoyer 2014-08-19 16:48:01 +02:00
parent c0b5e2571e
commit 53bced429c
5 changed files with 163 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 99128f2b64775313866b1d4edd3cd6220be937f8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 14:03:39 +0200
Subject: [PATCH] Makefile:rpm: wget the lgpl license for Source1
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7383309..f68960a 100644
--- a/Makefile
+++ b/Makefile
@@ -188,7 +188,9 @@ rpm: dracut-$(VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
- (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
+ (cd "$$rpmbuild"; \
+ wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
+ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm )

View File

@ -0,0 +1,31 @@
From 95957248a18cd1bd87d017b1b9ec81f2e193be45 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 14:56:42 +0200
Subject: [PATCH] 51-dracut-rescue.install: fixed /proc/cmdline read
---
51-dracut-rescue.install | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
index b655bc2..677805a 100755
--- a/51-dracut-rescue.install
+++ b/51-dracut-rescue.install
@@ -45,7 +45,7 @@ if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
- readarray -t BOOT_OPTIONS < /proc/cmdline
+ read -ar BOOT_OPTIONS < /proc/cmdline
fi
if ! [[ $BOOT_OPTIONS ]]; then
exit 1
@@ -75,7 +75,7 @@ case "$COMMAND" in
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2
fi
- dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$2"
+ dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$KERNEL_VERSION"
((ret+=$?))
{

View File

@ -0,0 +1,68 @@
From ccb8ce0403056fc9af5b010a8d279d3891cbc399 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 14:58:02 +0200
Subject: [PATCH] 50-dracut.install: fixed /proc/cmdline reading
and beautified the code a bit
---
50-dracut.install | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/50-dracut.install b/50-dracut.install
index 0282741..b0cc7c3 100755
--- a/50-dracut.install
+++ b/50-dracut.install
@@ -2,31 +2,35 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
-if [[ -f /etc/kernel/cmdline ]]; then
- readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
-fi
+COMMAND="$1"
+KERNEL_VERSION="$2"
+BOOT_DIR_ABS="$3"
+KERNEL_IMAGE="$4"
-if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
- readarray -t BOOT_OPTIONS < /proc/cmdline
-fi
+ret=0
+case "$COMMAND" in
+ add)
+ if [[ -f /etc/kernel/cmdline ]]; then
+ readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
+ fi
-unset noimageifnotneeded
+ if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
+ read -ar BOOT_OPTIONS < /proc/cmdline
+ fi
-for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
- if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
- noimageifnotneeded="yes"
- break
- fi
-done
+ unset noimageifnotneeded
-ret=0
-case "$1" in
- add)
- dracut ${noimageifnotneeded:+--noimageifnotneeded} "$3"/initrd "$2"
+ for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
+ if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
+ noimageifnotneeded="yes"
+ break
+ fi
+ done
+ dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS"/initrd "$KERNEL_VERSION"
ret=$?
;;
remove)
- rm -f -- "$3"/initrd
+ rm -f -- "$BOOT_DIR_ABS"/initrd
ret=$?
;;
esac

View File

@ -0,0 +1,32 @@
From bc140a0b299d6f873f6d583d85cbdbc40afbc964 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 14:58:34 +0200
Subject: [PATCH] 50-dracut.install: install pregenerated initrd
If there is an already pregenerated initrd at the same location as the
kernel install that and do not generate a new one.
---
50-dracut.install | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/50-dracut.install b/50-dracut.install
index b0cc7c3..ad5fc0e 100755
--- a/50-dracut.install
+++ b/50-dracut.install
@@ -10,6 +10,16 @@ KERNEL_IMAGE="$4"
ret=0
case "$COMMAND" in
add)
+ INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
+ if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
+ # we found an initrd at the same place as the kernel
+ # use this and don't generate a new one
+ cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \
+ && chown root:root "$BOOT_DIR_ABS/initrd" \
+ && chmod 0600 "$BOOT_DIR_ABS/initrd" \
+ && exit 0
+ fi
+
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi

View File

@ -11,7 +11,7 @@
Name: dracut
Version: 038
Release: 31.git20140815%{?dist}
Release: 34.git20140815%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -59,6 +59,10 @@ Patch26: 0026-Categorize-needed-modules-on-ARM.patch
Patch27: 0027-Introduce-ARM-specific-modules-needed-by-drm.patch
Patch28: 0028-dracut-functions.sh-get_persistent_dev-use-printf-in.patch
Patch29: 0029-Generate-reproducible-initramfs-images.patch
Patch30: 0030-Makefile-rpm-wget-the-lgpl-license-for-Source1.patch
Patch31: 0031-51-dracut-rescue.install-fixed-proc-cmdline-read.patch
Patch32: 0032-50-dracut.install-fixed-proc-cmdline-reading.patch
Patch33: 0033-50-dracut.install-install-pregenerated-initrd.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -507,6 +511,9 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Fri Aug 15 2014 Harald Hoyer <harald@redhat.com> 038-34.git20140815
- git snapshot
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 038-31.git20140815
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild