[dracut/f14/master] - fix /dev/systty Resolves: rhbz#654935

Harald Hoyer harald at fedoraproject.org
Fri Nov 19 08:12:18 UTC 2010


commit 73c11bf6962e2f9733d8516828f84c24ea250dd0
Author: Harald Hoyer <harald at redhat.com>
Date:   Fri Nov 19 09:12:46 2010 +0100

    - fix /dev/systty
    Resolves: rhbz#654935

 0001-Fix-ahci-detection-in-kernel-2.6.35.patch     |   33 +++++++++
 ...xed-ip-dhcp6.patch => 0002-fixed-ip-dhcp6.patch |    6 +-
 ...d-note-about-putting-IPv6-addresses-in-br.patch |    6 +-
 ...anged-IPv6-addresses-to-the-documentation.patch |    6 +-
 ...005-fips-fixes-copy-paste-error-for-check.patch |    6 +-
 ...patch => 0006-crypt-add-fpu-kernel-module.patch |    6 +-
 ...-for-symlinks-to-dev-.udev-rules.d-for-la.patch |    6 +-
 ...nctions-set-LANG-C-for-ldd-output-parsing.patch |    6 +-
 ...functions-use-LC_ALL-C-rather-than-LANG-C.patch |    6 +-
 ...knod-with-mode-and-set-umask-for-the-rest.patch |   76 ++++++++++++++++++++
 ...outh-depend-on-crypt-if-cryptsetup-exists.patch |   15 ----
 dracut.spec                                        |   44 +++++++-----
 12 files changed, 158 insertions(+), 58 deletions(-)
---
diff --git a/0001-Fix-ahci-detection-in-kernel-2.6.35.patch b/0001-Fix-ahci-detection-in-kernel-2.6.35.patch
new file mode 100644
index 0000000..2b5b504
--- /dev/null
+++ b/0001-Fix-ahci-detection-in-kernel-2.6.35.patch
@@ -0,0 +1,33 @@
+From ef9aefa776a15fc5b3bb480e2f292f821f555bc8 Mon Sep 17 00:00:00 2001
+From: Andrey Borzenkov <arvidjaar at mail.ru>
+Date: Thu, 5 Aug 2010 20:06:57 +0400
+Subject: [PATCH 01/10] Fix ahci detection in kernel 2.6.35
+
+Kernel 2.6.35 (may be, earlier) split ahci into libahci.ko and ahci.ko
+and added ahci_platform.ko. As a result, drivers ahci and ahci_platform
+do not contain any symbol that are checked for storage modules (it is
+libahci.ko that references ata_scsi_ioctl now). So add additional
+symbol ahci_init_controller; it seems this is expected to be called by
+every driver based on libahci.ko.
+
+Signed-off-by: Andrey Borzenkov <arvidjaar at mail.ru>
+---
+ modules.d/90kernel-modules/installkernel |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/modules.d/90kernel-modules/installkernel b/modules.d/90kernel-modules/installkernel
+index 2171e5a..e679b10 100755
+--- a/modules.d/90kernel-modules/installkernel
++++ b/modules.d/90kernel-modules/installkernel
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+ if [[ -z $drivers ]]; then
+     block_module_test() {
+-	local blockfuncs='ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device'
++	local blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device'
+ 
+ 	egrep -q "$blockfuncs" "$1"
+     }
+-- 
+1.7.3.1
+
diff --git a/0001-fixed-ip-dhcp6.patch b/0002-fixed-ip-dhcp6.patch
similarity index 86%
rename from 0001-fixed-ip-dhcp6.patch
rename to 0002-fixed-ip-dhcp6.patch
index e277ea9..b116bc6 100644
--- a/0001-fixed-ip-dhcp6.patch
+++ b/0002-fixed-ip-dhcp6.patch
@@ -1,7 +1,7 @@
-From 1c894acb42e91d5748e40b92dc7c87a21a6af3c3 Mon Sep 17 00:00:00 2001
+From 1e894f9061b35decbed6c6a7d127348b7f8917e2 Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Thu, 17 Jun 2010 16:25:28 +0200
-Subject: [PATCH 1/8] fixed "ip=dhcp6"
+Subject: [PATCH 02/10] fixed "ip=dhcp6"
 
 ---
  modules.d/40network/parse-ip-opts.sh |    2 +-
@@ -21,5 +21,5 @@ index 7362669..a3c9597 100755
  	        die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
  	    [ -n "$ip" ] && \
 -- 
-1.7.0.1
+1.7.3.1
 
diff --git a/0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch b/0003-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
similarity index 93%
rename from 0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
rename to 0003-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
index fcd6fed..095f46f 100644
--- a/0002-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
+++ b/0003-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
@@ -1,7 +1,7 @@
-From e8e4b28dfa1790070c912b31416a7444a4683437 Mon Sep 17 00:00:00 2001
+From 7b09a1b9ee02f4f7be623bed288ee03b4c60300a Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at 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
+Subject: [PATCH 03/10] dracut.8: add note about putting IPv6 addresses in brackets
 
 ---
  dracut.8 |   11 ++++++++++-
@@ -44,5 +44,5 @@ index 4050541..1417c36 100644
  .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
+1.7.3.1
 
diff --git a/0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch b/0004-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
similarity index 92%
rename from 0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
rename to 0004-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
index 7da3176..ba3c690 100644
--- a/0003-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
+++ b/0004-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
@@ -1,7 +1,7 @@
-From be217dc4d477b8453794cd47842002de14c87c82 Mon Sep 17 00:00:00 2001
+From bae2040264bcef7308cb0593044ae358b4c2f4fe Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at 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
+Subject: [PATCH 04/10] dracut.8: changed IPv6 addresses to the documentation address space
 
 ---
  dracut.8 |    6 +++---
@@ -39,5 +39,5 @@ index 1417c36..45d3295 100644
  .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
+1.7.3.1
 
diff --git a/0004-fips-fixes-copy-paste-error-for-check.patch b/0005-fips-fixes-copy-paste-error-for-check.patch
similarity index 85%
rename from 0004-fips-fixes-copy-paste-error-for-check.patch
rename to 0005-fips-fixes-copy-paste-error-for-check.patch
index 5ebf2f8..100e307 100644
--- a/0004-fips-fixes-copy-paste-error-for-check.patch
+++ b/0005-fips-fixes-copy-paste-error-for-check.patch
@@ -1,7 +1,7 @@
-From 59a083d8d18e3c9364c62740e2307679c2d6c7d2 Mon Sep 17 00:00:00 2001
+From 6532fb25b7b145a5abd13ef724118b672d10482d Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Fri, 18 Jun 2010 12:52:52 +0200
-Subject: [PATCH 4/8] fips: fixes copy&paste error for "check"
+Subject: [PATCH 05/10] fips: fixes copy&paste error for "check"
 
 ---
  modules.d/01fips/check |   16 +---------------
@@ -33,5 +33,5 @@ index e5cd87e..9d8d2e6 100755
  exit 255
  
 -- 
-1.7.0.1
+1.7.3.1
 
diff --git a/0005-crypt-add-fpu-kernel-module.patch b/0006-crypt-add-fpu-kernel-module.patch
similarity index 81%
rename from 0005-crypt-add-fpu-kernel-module.patch
rename to 0006-crypt-add-fpu-kernel-module.patch
index 4e2fdde..2670f7d 100644
--- a/0005-crypt-add-fpu-kernel-module.patch
+++ b/0006-crypt-add-fpu-kernel-module.patch
@@ -1,7 +1,7 @@
-From 95c1941ce5c236a547e0e1155aefad8292a9fab3 Mon Sep 17 00:00:00 2001
+From b32c7fc8a470687262e6c5ed379aa8895a29e02b Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Mon, 21 Jun 2010 20:47:01 +0200
-Subject: [PATCH 5/8] crypt: add fpu kernel module
+Subject: [PATCH 06/10] crypt: add fpu kernel module
 
 ---
  modules.d/90crypt/installkernel |    2 +-
@@ -17,5 +17,5 @@ index f61f501..de154a5 100755
 +instmods dm_crypt cbc sha256 xts aes aes_generic aesni-intel aes-x86_64 fpu
  
 -- 
-1.7.0.1
+1.7.3.1
 
diff --git a/0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch b/0007-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
similarity index 96%
rename from 0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
rename to 0007-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
index 8c5aa2f..c1006ef 100644
--- a/0006-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
+++ b/0007-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
@@ -1,7 +1,7 @@
-From ae5ec68355f580ca4b86aa35fbbcbb0ed0900bb6 Mon Sep 17 00:00:00 2001
+From 840a9e7a21ea56692a2e69f049daf354d9ecd9a2 Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at 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
+Subject: [PATCH 07/10] 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.
@@ -95,5 +95,5 @@ index 1b650f8..80e0c4c 100755
      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
+1.7.3.1
 
diff --git a/0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch b/0008-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
similarity index 82%
rename from 0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
rename to 0008-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
index df69a59..0210cc8 100644
--- a/0007-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
+++ b/0008-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
@@ -1,7 +1,7 @@
-From e4ebd474ec39d28a5e211f47bf77db3939ca2e90 Mon Sep 17 00:00:00 2001
+From a3f3f9e0553d48013b1c88c594678be412763c48 Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Tue, 22 Jun 2010 10:32:25 +0200
-Subject: [PATCH 7/8] dracut-functions: set LANG=C for ldd output parsing
+Subject: [PATCH 08/10] dracut-functions: set LANG=C for ldd output parsing
 
 ---
  dracut-functions |    2 +-
@@ -21,5 +21,5 @@ index 58f119f..57dd702 100755
  	if [[ $line =~ not\ found ]]; then
  	    derror "Missing a shared library required by $bin."
 -- 
-1.7.0.1
+1.7.3.1
 
diff --git a/0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch b/0009-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
similarity index 82%
rename from 0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
rename to 0009-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
index 7e3b72c..e0ba2a4 100644
--- a/0008-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
+++ b/0009-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
@@ -1,7 +1,7 @@
-From 45b5a4e142e7b1f9831b8dbc3e1be0960709e6b6 Mon Sep 17 00:00:00 2001
+From d393f8c8d8e132d4a09e0d28b2882cd321a75798 Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at 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
+Subject: [PATCH 09/10] dracut-functions: use LC_ALL=C rather than LANG=C
 
 ---
  dracut-functions |    2 +-
@@ -21,5 +21,5 @@ index 57dd702..2cd573a 100755
  	if [[ $line =~ not\ found ]]; then
  	    derror "Missing a shared library required by $bin."
 -- 
-1.7.0.1
+1.7.3.1
 
diff --git a/0010-mknod-with-mode-and-set-umask-for-the-rest.patch b/0010-mknod-with-mode-and-set-umask-for-the-rest.patch
new file mode 100644
index 0000000..bf348c7
--- /dev/null
+++ b/0010-mknod-with-mode-and-set-umask-for-the-rest.patch
@@ -0,0 +1,76 @@
+From 581dd3a7a396eeef865cac3b6924df31a1acd62d Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Fri, 23 Jul 2010 11:17:19 +0200
+Subject: [PATCH 10/10] mknod with mode and set umask for the rest
+
+---
+ modules.d/50plymouth/plymouth-pretrigger.sh |   12 +++++++-----
+ modules.d/99base/init                       |   12 +++++++-----
+ 2 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
+index 8605c61..34d60df 100755
+--- a/modules.d/50plymouth/plymouth-pretrigger.sh
++++ b/modules.d/50plymouth/plymouth-pretrigger.sh
+@@ -1,17 +1,19 @@
+ #!/bin/sh
+ 
+ if ! getarg rd_NO_PLYMOUTH; then
+-    [ -c /dev/null ] || mknod /dev/null c 1 3
++    [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
+     # first trigger graphics subsystem
+     udevadm trigger --attr-match=class=0x030000 >/dev/null 2>&1
+     # first trigger graphics and tty subsystem
+     udevadm trigger --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1
+ 
+     udevadm settle --timeout=30 2>&1 | vinfo
+-    [ -c /dev/zero ] || mknod /dev/zero c 1 5
+-    [ -c /dev/systty ] || mknod /dev/systty c 4 0
+-    [ -c /dev/fb ] || mknod /dev/fb c 29 0
+-    [ -c /dev/hvc0 ] || mknod /dev/hvc0 c 229 0
++    [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
++    [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0
++    [ -e /dev/systty ] || ln -s tty0 /dev/systty
++    [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0
++    [ -e /dev/fb ] || ln -s fb0 /dev/fb
++    [ -c /dev/hvc0 ] || mknod -m 0600 /dev/hvc0 c 229 0
+ 
+     info "Starting plymouth daemon"
+     [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
+diff --git a/modules.d/99base/init b/modules.d/99base/init
+index 45033af..8938dfb 100755
+--- a/modules.d/99base/init
++++ b/modules.d/99base/init
+@@ -62,11 +62,13 @@ export TERM=linux
+ NEWROOT="/sysroot"
+ 
+ trap "emergency_shell Signal caught!" 0
++# set umask
++umask 0007
+ 
+ RDDEBUG=""
+ . /lib/dracut-lib.sh
+ 
+-mknod /dev/null c 1 3
++mknod -m 0666 /dev/null c 1 3
+ 
+ # mount some important things
+ mount -t proc /proc /proc >/dev/null 2>&1
+@@ -78,10 +80,10 @@ if [ ! -c /dev/ptmx ]; then
+         # if it failed fall back to normal tmpfs
+ 	mount -t tmpfs -omode=0755 udev /dev >/dev/null 2>&1 
+ 	# Make some basic devices first, let udev handle the rest
+-	mknod /dev/null c 1 3
+-	mknod /dev/ptmx c 5 2
+-	mknod /dev/console c 5 1
+-	mknod /dev/kmsg c 1 11
++	mknod -m 0666 /dev/null c 1 3
++	mknod -m 0666 /dev/ptmx c 5 2
++	mknod -m 0600 /dev/console c 5 1
++	mknod -m 0660 /dev/kmsg c 1 11
+     fi
+ fi
+ 
+-- 
+1.7.3.1
+
diff --git a/dracut.spec b/dracut.spec
index c51cc3b..6f18c12 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -20,7 +20,7 @@
 
 Name: dracut
 Version: 006
-Release: 3%{?rdist}
+Release: 4%{?rdist}
 Summary: Initramfs generator using udev
 Group: System Environment/Base          
 License: GPLv2+ 
@@ -29,15 +29,16 @@ URL: http://apps.sourceforge.net/trac/dracut/wiki
 # 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
-Patch100: 0100-plymouth-depend-on-crypt-if-cryptsetup-exists.patch
+Patch1: 0001-Fix-ahci-detection-in-kernel-2.6.35.patch
+Patch2: 0002-fixed-ip-dhcp6.patch
+Patch3: 0003-dracut.8-add-note-about-putting-IPv6-addresses-in-br.patch
+Patch4: 0004-dracut.8-changed-IPv6-addresses-to-the-documentation.patch
+Patch5: 0005-fips-fixes-copy-paste-error-for-check.patch
+Patch6: 0006-crypt-add-fpu-kernel-module.patch
+Patch7: 0007-Write-rules-for-symlinks-to-dev-.udev-rules.d-for-la.patch
+Patch8: 0008-dracut-functions-set-LANG-C-for-ldd-output-parsing.patch
+Patch9: 0009-dracut-functions-use-LC_ALL-C-rather-than-LANG-C.patch
+Patch10: 0010-mknod-with-mode-and-set-umask-for-the-rest.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -137,15 +138,16 @@ 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
-%patch100 -p1
+%patch1 -p1 -b .git1
+%patch2 -p1 -b .git2
+%patch3 -p1 -b .git3
+%patch4 -p1 -b .git4
+%patch5 -p1 -b .git5
+%patch6 -p1 -b .git6
+%patch7 -p1 -b .git7
+%patch8 -p1 -b .git8
+%patch9 -p1 -b .git9
+%patch10 -p1 -b .git10
 
 %build
 make WITH_SWITCH_ROOT=0%{?with_switch_root}
@@ -250,6 +252,10 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/lib/dracut/overlay
 
 %changelog
+* Thu Nov 18 2010 Harald Hoyer <harald at redhat.com> 006-4
+- fix /dev/systty
+Resolves: rhbz#654935
+
 * Wed Oct 13 2010 Harald Hoyer <harald at redhat.com> 006-3
 - plymouth dracut module should only depend on crypt module,
   if cryptsetup exists


More information about the scm-commits mailing list