diff --git a/0001-fixed-ip-dhcp6.patch b/0001-fixed-ip-dhcp6.patch new file mode 100644 index 0000000..e277ea9 --- /dev/null +++ b/0001-fixed-ip-dhcp6.patch @@ -0,0 +1,25 @@ +From 1c894acb42e91d5748e40b92dc7c87a21a6af3c3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch b/0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch new file mode 100644 index 0000000..fcd6fed --- /dev/null +++ b/0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch @@ -0,0 +1,48 @@ +From e8e4b28dfa1790070c912b31416a7444a4683437 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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= "[:][:]" + mount nfs share from :/, 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:[:][:]" +@@ -327,6 +327,11 @@ http://tools.ietf.org/html/rfc4173 + .BR root= "\%iscsi:[username:password\:[:reverse:password]@]\:[]\::[]\::[]\::[]\::" + .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]@]\:[]\::[]\::[]\::[]\:: ..." +@@ -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=" \% " \%iscsi_target_name=" "" " \%iscsi_target_ip=" "" " \%iscsi_target_port=" "" " \%iscsi_target_group=" "" " \%iscsi_username=" "" " \%iscsi_password=" " \%iscsi_in_username=" "" " \%iscsi_in_password=" "" +-- +1.7.0.1 + diff --git a/0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch b/0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch new file mode 100644 index 0000000..7da3176 --- /dev/null +++ b/0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch @@ -0,0 +1,43 @@ +From be217dc4d477b8453794cd47842002de14c87c82 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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= "[:][:]" + mount nfs share from :/, 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:[:][:]" +@@ -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]@]\:[]\::[]\::[]\::[]\:: ..." +@@ -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=" \% " \%iscsi_target_name=" "" " \%iscsi_target_ip=" "" " \%iscsi_target_port=" "" " \%iscsi_target_group=" "" " \%iscsi_username=" "" " \%iscsi_password=" " \%iscsi_in_username=" "" " \%iscsi_in_password=" "" +-- +1.7.0.1 + diff --git a/0004-fips-fixes-copy-paste-error-for-check.patch b/0004-fips-fixes-copy-paste-error-for-check.patch new file mode 100644 index 0000000..5ebf2f8 --- /dev/null +++ b/0004-fips-fixes-copy-paste-error-for-check.patch @@ -0,0 +1,37 @@ +From 59a083d8d18e3c9364c62740e2307679c2d6c7d2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/0005-crypt-add-fpu-kernel-module.patch b/0005-crypt-add-fpu-kernel-module.patch new file mode 100644 index 0000000..4e2fdde --- /dev/null +++ b/0005-crypt-add-fpu-kernel-module.patch @@ -0,0 +1,21 @@ +From 95c1941ce5c236a547e0e1155aefad8292a9fab3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch b/0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch new file mode 100644 index 0000000..8c5aa2f --- /dev/null +++ b/0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch @@ -0,0 +1,99 @@ +From ae5ec68355f580ca4b86aa35fbbcbb0ed0900bb6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch b/0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch new file mode 100644 index 0000000..df69a59 --- /dev/null +++ b/0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch @@ -0,0 +1,25 @@ +From e4ebd474ec39d28a5e211f47bf77db3939ca2e90 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch b/0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch new file mode 100644 index 0000000..7e3b72c --- /dev/null +++ b/0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch @@ -0,0 +1,25 @@ +From 45b5a4e142e7b1f9831b8dbc3e1be0960709e6b6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 + diff --git a/dracut.spec b/dracut.spec index e1b87fa..e287341 100644 --- a/dracut.spec +++ b/dracut.spec @@ -20,7 +20,7 @@ Name: dracut Version: 006 -Release: 1%{?rdist} +Release: 2%{?rdist} Summary: Initramfs generator using udev Group: System Environment/Base License: GPLv2+ @@ -28,6 +28,16 @@ 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) %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 @@ -126,6 +136,15 @@ 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} @@ -230,6 +249,10 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Wed Jun 23 2010 Harald Hoyer 006-2 +- bugfixes +- preserve /dev/live symlink for real root + * Thu Jun 17 2010 Harald Hoyer 006-1 - version 006