* Mon Aug 09 2010 Harald Hoyer <harald@redhat.com> 007-1

- version 007
This commit is contained in:
Harald Hoyer 2010-08-09 16:33:19 +02:00
parent 3609291845
commit 63c8b553fc
11 changed files with 17 additions and 369 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
dracut-006.tar.bz2
dracut-007.tar.bz2

View File

@ -1,25 +0,0 @@
From 1c894acb42e91d5748e40b92dc7c87a21a6af3c3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 17 Jun 2010 16:25:28 +0200
Subject: [PATCH 1/8] fixed "ip=dhcp6"
---
modules.d/40network/parse-ip-opts.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 7362669..a3c9597 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -74,7 +74,7 @@ for p in $(getargs ip=); do
die "Sorry, automatic calculation of netmask is not yet supported"
;;
auto6);;
- dhcp|on|any) \
+ dhcp|dhcp6|on|any) \
[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
[ -n "$ip" ] && \
--
1.7.0.1

View File

@ -1,48 +0,0 @@
From e8e4b28dfa1790070c912b31416a7444a4683437 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 17 Jun 2010 17:03:38 +0200
Subject: [PATCH 2/8] dracut.8: add note about putting IPv6 addresses in brackets
---
dracut.8 | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dracut.8 b/dracut.8
index 4050541..1417c36 100644
--- a/dracut.8
+++ b/dracut.8
@@ -284,7 +284,7 @@ specify nameserver(s) to use
.TP
.BR root= "[<server-ip>:]<root-dir>[:<nfs-options>]"
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given,
-use dhcp next_server.
+use dhcp next_server. if server-ip is an IPv6 address it has to be put in brackets, e.g. [fec0:0:a10:4000:3c67:6ff:fe1f:5904].
NFS options can be appended with the prefix ":" or "," and are seperated by ",".
.TP
.BR root= "nfs:[<server-ip>:]<root-dir>[:<nfs-options>]"
@@ -327,6 +327,11 @@ http://tools.ietf.org/html/rfc4173
.BR root= "\%iscsi:[username:password\:[:reverse:password]@]\:[<servername>]\::[<protocol>]\::[<port>]\::[<LUN>]\::<targetname>"
.ad
e.g. root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
+
+.ad l
+If servername is an IPv6 address, it has to be put in brackets.
+ e.g.
+ root=iscsi:@[fec0:0:a10:4000:3c67:6ff:fe1f:5904]::::iqn.2009-06.dracut:target0
.TP
.ad l
.BR root= ??? " netroot=" "\%iscsi:[username:password[:reverse:password]@]\:[<servername>]\::[<protocol>]\::[<port>]\::[<LUN>]\::<targetname> ..."
@@ -337,6 +342,10 @@ multiple netroot options allow setting up multiple iscsi disks
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1
+.ad l
+If servername is an IPv6 address, it has to be put in brackets.
+ e.g.
+ netroot=iscsi:@[fec0:0:a10:4000:3c67:6ff:fe1f:5904]::::iqn.2009-06.dracut:target0
.TP
.ad l
.BR \%root= \%??? " \%iscsi_initiator=" \%<initiator> " \%iscsi_target_name=" "<target name>" " \%iscsi_target_ip=" "<target ip>" " \%iscsi_target_port=" "<target port>" " \%iscsi_target_group=" "<target group>" " \%iscsi_username=" "<username>" " \%iscsi_password=" <password> " \%iscsi_in_username=" "<in username>" " \%iscsi_in_password=" "<in password>"
--
1.7.0.1

View File

@ -1,43 +0,0 @@
From be217dc4d477b8453794cd47842002de14c87c82 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 17 Jun 2010 17:14:09 +0200
Subject: [PATCH 3/8] dracut.8: changed IPv6 addresses to the documentation address space
---
dracut.8 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dracut.8 b/dracut.8
index 1417c36..45d3295 100644
--- a/dracut.8
+++ b/dracut.8
@@ -284,7 +284,7 @@ specify nameserver(s) to use
.TP
.BR root= "[<server-ip>:]<root-dir>[:<nfs-options>]"
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given,
-use dhcp next_server. if server-ip is an IPv6 address it has to be put in brackets, e.g. [fec0:0:a10:4000:3c67:6ff:fe1f:5904].
+use dhcp next_server. if server-ip is an IPv6 address it has to be put in brackets, e.g. [2001:DB8::1].
NFS options can be appended with the prefix ":" or "," and are seperated by ",".
.TP
.BR root= "nfs:[<server-ip>:]<root-dir>[:<nfs-options>]"
@@ -331,7 +331,7 @@ e.g. root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
.ad l
If servername is an IPv6 address, it has to be put in brackets.
e.g.
- root=iscsi:@[fec0:0:a10:4000:3c67:6ff:fe1f:5904]::::iqn.2009-06.dracut:target0
+ root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
.TP
.ad l
.BR root= ??? " netroot=" "\%iscsi:[username:password[:reverse:password]@]\:[<servername>]\::[<protocol>]\::[<port>]\::[<LUN>]\::<targetname> ..."
@@ -345,7 +345,7 @@ multiple netroot options allow setting up multiple iscsi disks
.ad l
If servername is an IPv6 address, it has to be put in brackets.
e.g.
- netroot=iscsi:@[fec0:0:a10:4000:3c67:6ff:fe1f:5904]::::iqn.2009-06.dracut:target0
+ netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
.TP
.ad l
.BR \%root= \%??? " \%iscsi_initiator=" \%<initiator> " \%iscsi_target_name=" "<target name>" " \%iscsi_target_ip=" "<target ip>" " \%iscsi_target_port=" "<target port>" " \%iscsi_target_group=" "<target group>" " \%iscsi_username=" "<username>" " \%iscsi_password=" <password> " \%iscsi_in_username=" "<in username>" " \%iscsi_in_password=" "<in password>"
--
1.7.0.1

View File

@ -1,37 +0,0 @@
From 59a083d8d18e3c9364c62740e2307679c2d6c7d2 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 18 Jun 2010 12:52:52 +0200
Subject: [PATCH 4/8] fips: fixes copy&paste error for "check"
---
modules.d/01fips/check | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/modules.d/01fips/check b/modules.d/01fips/check
index e5cd87e..9d8d2e6 100755
--- a/modules.d/01fips/check
+++ b/modules.d/01fips/check
@@ -1,19 +1,5 @@
#!/bin/bash
-. $dracutfunctions
-
-for program in ip arping; do
- which $program >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- dwarning "Could not find program \"$program\" required by network."
- exit 1
- fi
-done
-for program in dhclient brctl; do
- which $program >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- dwarning "Could not find program \"$program\" it might be required by network."
- fi
-done
+[[ $1 = -d ]] && exit 0
exit 255
--
1.7.0.1

View File

@ -1,21 +0,0 @@
From 95c1941ce5c236a547e0e1155aefad8292a9fab3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 21 Jun 2010 20:47:01 +0200
Subject: [PATCH 5/8] crypt: add fpu kernel module
---
modules.d/90crypt/installkernel | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90crypt/installkernel b/modules.d/90crypt/installkernel
index f61f501..de154a5 100755
--- a/modules.d/90crypt/installkernel
+++ b/modules.d/90crypt/installkernel
@@ -1,3 +1,3 @@
#!/bin/bash
-instmods dm_crypt cbc sha256 xts aes aes_generic aesni-intel aes-x86_64
+instmods dm_crypt cbc sha256 xts aes aes_generic aesni-intel aes-x86_64 fpu
--
1.7.0.1

View File

@ -1,99 +0,0 @@
From ae5ec68355f580ca4b86aa35fbbcbb0ed0900bb6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jun 2010 10:30:39 +0200
Subject: [PATCH 6/8] Write rules for symlinks to /dev/.udev/rules.d for later usage
We want some symlinks to persist in the real root, so we write them to
/dev/.udev/rules.d, that they survive a retrigger.
---
.../90dmsquash-live/dmsquash-live-genrules.sh | 8 +++++---
.../90dmsquash-live/dmsquash-liveiso-genrules.sh | 4 ++--
modules.d/95resume/resume-genrules.sh | 12 ++++++++----
modules.d/95rootfs-block/block-genrules.sh | 5 +++--
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
index 56199d5..1057c8c 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
@@ -1,14 +1,16 @@
if [ "${root%%:*}" = "live" ]; then
- (
+ [ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d
+ {
printf 'KERNEL=="%s", SYMLINK+="live"\n' \
${root#live:/dev/}
printf 'SYMLINK=="%s", SYMLINK+="live"\n' \
${root#live:/dev/}
+ } >> /dev/.udev/rules.d/99-live-mount.rules
+ {
printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
${root#live:/dev/}
printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
${root#live:/dev/}
-
- ) >> /etc/udev/rules.d/99-live-mount.rules
+ } >> /etc/udev/rules.d/99-live-mount.rules
echo '[ -e /dev/root ]' > /initqueue-finished/dmsquash.sh
fi
diff --git a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
index a196202..fa771f8 100755
--- a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
+++ b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
@@ -1,7 +1,7 @@
if [ "${root%%:*}" = "liveiso" ]; then
- (
+ {
printf 'KERNEL=="loop0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root `/sbin/losetup -f --show %s`"\n' \
${root#liveiso:}
- ) >> /etc/udev/rules.d/99-liveiso-mount.rules
+ } >> /etc/udev/rules.d/99-liveiso-mount.rules
echo '[ -e /dev/root ]' > /initqueue-finished/dmsquash.sh
fi
diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
index a00a362..59e1024 100755
--- a/modules.d/95resume/resume-genrules.sh
+++ b/modules.d/95resume/resume-genrules.sh
@@ -1,13 +1,17 @@
if [ -n "$resume" ]; then
+ [ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d
{
- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
- ${resume#/dev/};
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
- ${resume#/dev/};
printf "KERNEL==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
${resume#/dev/};
printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \
${resume#/dev/};
+ } >> /dev/.udev/rules.d/99-resume.rules
+
+ {
+ printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
+ ${resume#/dev/};
+ printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
+ ${resume#/dev/};
} >> /etc/udev/rules.d/99-resume.rules
printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job"; }\n' \
diff --git a/modules.d/95rootfs-block/block-genrules.sh b/modules.d/95rootfs-block/block-genrules.sh
index 1b650f8..80e0c4c 100755
--- a/modules.d/95rootfs-block/block-genrules.sh
+++ b/modules.d/95rootfs-block/block-genrules.sh
@@ -1,10 +1,11 @@
if [ "${root%%:*}" = "block" ]; then
- (
+ [ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d
+ {
printf 'KERNEL=="%s", SYMLINK+="root"\n' \
${root#block:/dev/}
printf 'SYMLINK=="%s", SYMLINK+="root"\n' \
${root#block:/dev/}
- ) >> /etc/udev/rules.d/99-mount.rules
+ } >> /dev/.udev/rules.d/99-root.rules
printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \
"${root#block:}" "${root#block:}" >> /initqueue-settled/blocksymlink.sh
--
1.7.0.1

View File

@ -1,25 +0,0 @@
From e4ebd474ec39d28a5e211f47bf77db3939ca2e90 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jun 2010 10:32:25 +0200
Subject: [PATCH 7/8] dracut-functions: set LANG=C for ldd output parsing
---
dracut-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 58f119f..57dd702 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -248,7 +248,7 @@ inst_binary() {
local LDSO NAME IO FILE ADDR I1 n f TLIBDIR
[[ -e $initdir$target ]] && return 0
# I love bash!
- ldd $bin 2>/dev/null | while read line; do
+ LANG=C ldd $bin 2>/dev/null | while read line; do
[[ $line = 'not a dynamic executable' ]] && return 1
if [[ $line =~ not\ found ]]; then
derror "Missing a shared library required by $bin."
--
1.7.0.1

View File

@ -1,25 +0,0 @@
From 45b5a4e142e7b1f9831b8dbc3e1be0960709e6b6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jun 2010 11:59:49 +0200
Subject: [PATCH 8/8] dracut-functions: use LC_ALL=C rather than LANG=C
---
dracut-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 57dd702..2cd573a 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -248,7 +248,7 @@ inst_binary() {
local LDSO NAME IO FILE ADDR I1 n f TLIBDIR
[[ -e $initdir$target ]] && return 0
# I love bash!
- LANG=C ldd $bin 2>/dev/null | while read line; do
+ LC_ALL=C ldd $bin 2>/dev/null | while read line; do
[[ $line = 'not a dynamic executable' ]] && return 1
if [[ $line =~ not\ found ]]; then
derror "Missing a shared library required by $bin."
--
1.7.0.1

View File

@ -1,26 +1,10 @@
# Variables must be defined
%define with_switch_root 1
%define with_switch_root 0
%define with_nbd 1
# switchroot provided by util-linux-ng in F-12+
%if 0%{?fedora} > 11 || 0%{?rhel} >= 6
%define with_switch_root 0
%endif
# nbd in Fedora only
%if 0%{?rhel} >= 6
%define with_nbd 0
%endif
%if %{defined gittag}
%define rdist .git%{gittag}%{?dist}
%define dashgittag -%{gittag}
%else
%define rdist %{?dist}
%endif
Name: dracut
Version: 006
Release: 2%{?rdist}
Version: 007
Release: 1
Summary: Initramfs generator using udev
Group: System Environment/Base
License: GPLv2+
@ -28,17 +12,8 @@ URL: http://apps.sourceforge.net/trac/dracut/wiki
# Source can be generated by
# http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=snapshot;h=%{?dashgittag};sf=tgz
Source0: dracut-%{version}%{?dashgittag}.tar.bz2
Patch1: 0001-fixed-ip-dhcp6.patch
Patch2: 0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
Patch3: 0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
Patch4: 0004-fips-fixes-copy-paste-error-for-check.patch
Patch5: 0005-crypt-add-fpu-kernel-module.patch
Patch6: 0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
Patch7: 0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
Patch8: 0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: docbook-style-xsl docbook-dtds docbook-style-xsl libxslt
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6
# no "provides", because dracut does not offer
@ -94,6 +69,7 @@ Requires: nbd
%endif
Requires: net-tools iproute
Requires: bridge-utils
Requires: vconfig
%description network
This package requires everything which is needed to build a generic
@ -130,21 +106,13 @@ Requires: coreutils cryptsetup-luks device-mapper
Requires: diffutils dmraid findutils grep lvm2 gawk
Requires: module-init-tools sed
Requires: cpio gzip
Requires: %{name} = %{version}-%{release}
%description tools
This package contains tools to assemble the local initrd and host configuration.
%prep
%setup -q -n %{name}-%{version}%{?dashgittag}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
make WITH_SWITCH_ROOT=0%{?with_switch_root}
@ -156,11 +124,14 @@ make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
rm $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips/check
# remove gentoo specific modules
rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/50gensplash
mkdir -p $RPM_BUILD_ROOT/boot/dracut
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/fedora.conf
%if 0%{?fedora} <= 12 && 0%{?rhel} < 6
rm $RPM_BUILD_ROOT/sbin/mkinitrd
@ -184,11 +155,14 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/dracut
%{_datadir}/dracut/dracut-functions
%config(noreplace) /etc/dracut.conf
%config(noreplace) /etc/dracut.conf.d/fedora.conf
%dir /etc/dracut.conf.d
%{_mandir}/man8/dracut.8*
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man5/dracut.conf.5*
%{_datadir}/dracut/modules.d/00bootchart
%{_datadir}/dracut/modules.d/00dash
%{_datadir}/dracut/modules.d/10redhat-i18n
%{_datadir}/dracut/modules.d/10i18n
%{_datadir}/dracut/modules.d/10rpmversion
%{_datadir}/dracut/modules.d/50plymouth
%{_datadir}/dracut/modules.d/60xen
@ -219,7 +193,6 @@ rm -rf $RPM_BUILD_ROOT
%files network
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS
%{_datadir}/dracut/modules.d/40network
%{_datadir}/dracut/modules.d/95fcoe
%{_datadir}/dracut/modules.d/95iscsi
@ -230,7 +203,6 @@ rm -rf $RPM_BUILD_ROOT
%files fips
%defattr(-,root,root,0755)
%doc COPYING
%{_datadir}/dracut/modules.d/01fips
%files generic
@ -239,7 +211,6 @@ rm -rf $RPM_BUILD_ROOT
%files tools
%defattr(-,root,root,0755)
%doc COPYING NEWS
%{_mandir}/man8/dracut-gencmdline.8*
%{_mandir}/man8/dracut-catimages.8*
/sbin/dracut-gencmdline
@ -249,9 +220,8 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Wed Jun 23 2010 Harald Hoyer <harald@redhat.com> 006-2
- bugfixes
- preserve /dev/live symlink for real root
* Mon Aug 09 2010 Harald Hoyer <harald@redhat.com> 007-1
- version 007
* Thu Jun 17 2010 Harald Hoyer <harald@redhat.com> 006-1
- version 006

View File

@ -1 +1 @@
016052b57001789ec2acf89d382a82f5 dracut-006.tar.bz2
e052dda4bdfc4d03915458dce2d86822 dracut-007.tar.bz2