[dracut] update to latest git
Harald Hoyer
harald at fedoraproject.org
Thu Jan 26 11:56:53 UTC 2012
commit 8e216fcb5823aed21e3bf8f99a38e92a0b72b18b
Author: Harald Hoyer <harald at redhat.com>
Date: Thu Jan 26 12:56:40 2012 +0100
update to latest git
0065-99base-init-remove-tmpfs-on-dev.patch | 33 +++
0066-netroot-actually-run-netroot-hooks.patch | 26 +++
0067-let-some-modules-to-respect-mount_needs.patch | 51 +++++
...-client-module-setup.sh-spell-corrections.patch | 27 +++
...t-module-setup.sh-do-not-install-ssh-clie.patch | 54 +++++
0070-add-usrmove-module.patch | 224 ++++++++++++++++++++
0071-dracut.spec-add-compat-symlinks-to-sbin.patch | 39 ++++
dracut.spec | 25 ++-
8 files changed, 478 insertions(+), 1 deletions(-)
---
diff --git a/0065-99base-init-remove-tmpfs-on-dev.patch b/0065-99base-init-remove-tmpfs-on-dev.patch
new file mode 100644
index 0000000..9f38ed8
--- /dev/null
+++ b/0065-99base-init-remove-tmpfs-on-dev.patch
@@ -0,0 +1,33 @@
+From ba7fa583bf7fdc548e961f23d2801cb4e7d50aba Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Mon, 23 Jan 2012 16:08:46 +0100
+Subject: [PATCH] 99base/init: remove tmpfs on /dev
+
+tmpfs on /dev is not supported anymore and devtmpfs is supported in
+kernels for a long time.
+---
+ modules.d/99base/init | 11 +----------
+ 1 files changed, 1 insertions(+), 10 deletions(-)
+
+diff --git a/modules.d/99base/init b/modules.d/99base/init
+index 33a7379..abfa3c5 100755
+--- a/modules.d/99base/init
++++ b/modules.d/99base/init
+@@ -110,16 +110,7 @@ if [ "$RD_DEBUG" = "yes" ]; then
+ fi
+
+ if ! ismounted /dev; then
+- # try to mount devtmpfs
+- if ! mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null 2>&1; then
+- # if it failed fall back to normal tmpfs
+- mount -t tmpfs -o mode=0755,nosuid tmpfs /dev >/dev/null 2>&1
+- # Make some basic devices first, let udev handle the rest
+- 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
++ mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null 2>&1
+ fi
+
+ # prepare the /dev directory
diff --git a/0066-netroot-actually-run-netroot-hooks.patch b/0066-netroot-actually-run-netroot-hooks.patch
new file mode 100644
index 0000000..304d861
--- /dev/null
+++ b/0066-netroot-actually-run-netroot-hooks.patch
@@ -0,0 +1,26 @@
+From a2a74022e2db0cc44ab68a846c3acafd9df1d971 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Tue, 24 Jan 2012 13:09:34 -0500
+Subject: [PATCH] netroot: actually run netroot hooks
+
+The line "source_all netroot" was trying to source netroot hooks from
+/netroot, which doesn't exist, so netroot hooks were never executed.
+
+Signed-off-by: Will Woods <wwoods at redhat.com>
+---
+ modules.d/40network/netroot | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
+index 9d996cc..bda34df 100755
+--- a/modules.d/40network/netroot
++++ b/modules.d/40network/netroot
+@@ -123,7 +123,7 @@ if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then
+ fi
+
+ # Source netroot hooks before we start the handler
+-source_all netroot
++source_all $hookdir/netroot
+
+ # Run the handler; don't store the root, it may change from device to device
+ # XXX other variables to export?
diff --git a/0067-let-some-modules-to-respect-mount_needs.patch b/0067-let-some-modules-to-respect-mount_needs.patch
new file mode 100644
index 0000000..ee84d71
--- /dev/null
+++ b/0067-let-some-modules-to-respect-mount_needs.patch
@@ -0,0 +1,51 @@
+From 7f347723d88ffe8a942bbc445a00defa3f06f4e5 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Wed, 25 Jan 2012 09:04:17 +0800
+Subject: [PATCH] let some modules to respect $mount_needs
+
+Cc: Harald Hoyer <harald at redhat.com>
+Signed-off-by: WANG Cong <xiyou.wangcong at gmail.com>
+---
+ modules.d/95iscsi/module-setup.sh | 2 +-
+ modules.d/95nbd/module-setup.sh | 2 +-
+ modules.d/95ssh-client/module-setup.sh | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
+index 5738941..d645dba 100755
+--- a/modules.d/95iscsi/module-setup.sh
++++ b/modules.d/95iscsi/module-setup.sh
+@@ -23,7 +23,7 @@ check() {
+ [[ -d iscsi_session ]]
+ )
+
+- [[ $hostonly ]] && {
++ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ _rootdev=$(find_root_block_device)
+ if [[ $_rootdev ]]; then
+ # root lives on a block device, so we can be more precise about
+diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
+index 793687d..a6f812f 100755
+--- a/modules.d/95nbd/module-setup.sh
++++ b/modules.d/95nbd/module-setup.sh
+@@ -9,7 +9,7 @@ check() {
+
+ # if an nbd device is not somewhere in the chain of devices root is
+ # mounted on, fail the hostonly check.
+- [[ $hostonly ]] && {
++ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}
+ . $dracutfunctions
+
+diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
+index 0ffc298..3b84900 100644
+--- a/modules.d/95ssh-client/module-setup.sh
++++ b/modules.d/95ssh-client/module-setup.sh
+@@ -8,6 +8,7 @@ check() {
+ # If our prerequisites are not met, fail.
+ type -P ssh >/dev/null || return 1
+ type -P scp >/dev/null || return 1
++ [[ $mount_needs ]] && return 1
+ if [[ $sshkey ]]; then
+ [ ! -f $sshkey ] && {
+ derror "sshkey is not found!"
diff --git a/0068-95ssh-client-module-setup.sh-spell-corrections.patch b/0068-95ssh-client-module-setup.sh-spell-corrections.patch
new file mode 100644
index 0000000..e3e49b2
--- /dev/null
+++ b/0068-95ssh-client-module-setup.sh-spell-corrections.patch
@@ -0,0 +1,27 @@
+From 92dc0adca2eaeedf6937dc9c6897a07dc1939223 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 25 Jan 2012 09:59:12 +0100
+Subject: [PATCH] 95ssh-client/module-setup.sh: spell corrections
+
+---
+ modules.d/95ssh-client/module-setup.sh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
+index 3b84900..3aa9bd2 100644
+--- a/modules.d/95ssh-client/module-setup.sh
++++ b/modules.d/95ssh-client/module-setup.sh
+@@ -15,11 +15,11 @@ check() {
+ return 1
+ }
+ [[ ! $cttyhack = yes ]] && {
+- dinfo "--ctty is not used, you should make sure the machine is knowhost and copy the sshkey to remote machine!"
++ dinfo "--ctty is not used, you should make sure the machine is a knownhost and copy the sshkey to remote machine!"
+ }
+ else
+ [[ ! $cttyhack = yes ]] && {
+- derror "ssh interactive mode need option --ctty!"
++ derror "ssh interactive mode needs option --ctty!"
+ return 1
+ }
+ fi
diff --git a/0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch b/0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch
new file mode 100644
index 0000000..256878c
--- /dev/null
+++ b/0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch
@@ -0,0 +1,54 @@
+From 38164332e198f7cc8f339b42d555796918de04b3 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 25 Jan 2012 10:02:29 +0100
+Subject: [PATCH] 95ssh-client/module-setup.sh: do not install ssh-client by
+ default
+
+Do not install ssh-client by default and report the missing ctty in the
+install section.
+---
+ modules.d/95ssh-client/module-setup.sh | 15 ++++++++-------
+ 1 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
+index 3aa9bd2..4410e4e 100644
+--- a/modules.d/95ssh-client/module-setup.sh
++++ b/modules.d/95ssh-client/module-setup.sh
+@@ -9,22 +9,18 @@ check() {
+ type -P ssh >/dev/null || return 1
+ type -P scp >/dev/null || return 1
+ [[ $mount_needs ]] && return 1
++
+ if [[ $sshkey ]]; then
+ [ ! -f $sshkey ] && {
+- derror "sshkey is not found!"
++ derror "ssh key: $sshkey is not found!"
+ return 1
+ }
+ [[ ! $cttyhack = yes ]] && {
+ dinfo "--ctty is not used, you should make sure the machine is a knownhost and copy the sshkey to remote machine!"
+ }
+- else
+- [[ ! $cttyhack = yes ]] && {
+- derror "ssh interactive mode needs option --ctty!"
+- return 1
+- }
+ fi
+
+- return 0
++ return 255
+ }
+
+ depends() {
+@@ -54,6 +50,11 @@ inst_sshenv()
+ }
+
+ install() {
++ [[ ! $cttyhack = yes ]] && {
++ derror "ssh interactive mode needs option --ctty!"
++ return 1
++ }
++
+ inst ssh
+ inst scp
+ inst_sshenv
diff --git a/0070-add-usrmove-module.patch b/0070-add-usrmove-module.patch
new file mode 100644
index 0000000..6a39eda
--- /dev/null
+++ b/0070-add-usrmove-module.patch
@@ -0,0 +1,224 @@
+From ae8b82e395c9530a66288f7a9e939242137d3f56 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Thu, 26 Jan 2012 11:33:51 +0100
+Subject: [PATCH] add usrmove module
+
+---
+ dracut.spec | 1 +
+ modules.d/30usrmove/do-usrmove.sh | 7 ++
+ modules.d/30usrmove/module-setup.sh | 19 ++++
+ modules.d/30usrmove/usrmove-convert.sh | 153 ++++++++++++++++++++++++++++++++
+ 4 files changed, 180 insertions(+), 0 deletions(-)
+ create mode 100755 modules.d/30usrmove/do-usrmove.sh
+ create mode 100755 modules.d/30usrmove/module-setup.sh
+ create mode 100755 modules.d/30usrmove/usrmove-convert.sh
+
+diff --git a/dracut.spec b/dracut.spec
+index 16c8aa3..06533e3 100644
+--- a/dracut.spec
++++ b/dracut.spec
+@@ -226,6 +226,7 @@ rm -rf $RPM_BUILD_ROOT
+ %{dracutlibdir}/modules.d/05busybox
+ %{dracutlibdir}/modules.d/10i18n
+ %{dracutlibdir}/modules.d/10rpmversion
++%{dracutlibdir}/modules.d/30usrmove
+ %{dracutlibdir}/modules.d/50plymouth
+ %{dracutlibdir}/modules.d/90btrfs
+ %{dracutlibdir}/modules.d/90crypt
+diff --git a/modules.d/30usrmove/do-usrmove.sh b/modules.d/30usrmove/do-usrmove.sh
+new file mode 100755
+index 0000000..8bdf5ab
+--- /dev/null
++++ b/modules.d/30usrmove/do-usrmove.sh
+@@ -0,0 +1,7 @@
++#!/bin/bash
++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
++# ex: ts=8 sw=4 sts=4 et filetype=sh
++
++if getargbool 0 rd.usrmove; then
++ usrmove-convert "$NEWROOT" 2>&1 | vinfo
++fi
+diff --git a/modules.d/30usrmove/module-setup.sh b/modules.d/30usrmove/module-setup.sh
+new file mode 100755
+index 0000000..05b2366
+--- /dev/null
++++ b/modules.d/30usrmove/module-setup.sh
+@@ -0,0 +1,19 @@
++#!/bin/bash
++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
++# ex: ts=8 sw=4 sts=4 et filetype=sh
++
++check() {
++ [[ $mount_needs ]] && return 1
++ return 255
++}
++
++depends() {
++ return 0
++}
++
++install() {
++ dracut_install bash
++ inst_hook pre-pivot 99 "$moddir/do-usrmove.sh"
++ inst "$moddir/usrmove-convert.sh" /usr/bin/usrmove-convert
++}
++
+diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
+new file mode 100755
+index 0000000..3295074
+--- /dev/null
++++ b/modules.d/30usrmove/usrmove-convert.sh
+@@ -0,0 +1,153 @@
++#!/bin/bash
++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
++# ex: ts=8 sw=4 sts=4 et filetype=sh
++
++set -x
++
++ROOT="$1"
++
++if [[ ! -d "$ROOT" ]]; then
++ echo "Usage: $0 <rootdir>"
++ exit 1
++fi
++
++if [[ "$ROOT" -ef / ]]; then
++ echo "Can't convert the running system."
++ echo "Please boot with 'usrmove' on the kernel command line,"
++ echo "to update with the help of the initramfs,"
++ echo "or run this script from a rescue system."
++ exit 1
++fi
++
++while [[ "$ROOT" != "${ROOT%/}" ]]; do
++ ROOT=${ROOT%/}
++done
++
++needconvert() {
++ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64"; do
++ if [[ -e "$dir" ]]; then
++ [[ -L "$dir" ]] || return 0
++ fi
++ done
++ return 1
++}
++
++if ! needconvert; then
++ echo "Your system is already converted."
++ exit 0
++fi
++
++testfile="$ROOT/.usrmovecheck$$"
++rm -f "$testfile"
++> "$testfile"
++if [[ ! -e "$testfile" ]]; then
++ echo "Cannot write to $ROOT/"
++ exit 1
++fi
++rm -f "$testfile"
++
++testfile="$ROOT/usr/.usrmovecheck$$"
++rm -f "$testfile"
++> "$testfile"
++if [[ ! -e "$testfile" ]]; then
++ echo "Cannot write to $ROOT/usr/"
++ exit 1
++fi
++rm -f "$testfile"
++
++ismounted() {
++ while read a m a; do
++ [[ "$m" = "$1" ]] && return 0
++ done < /proc/mounts
++ return 1
++}
++
++# clean up after ourselves no matter how we die.
++cleanup() {
++ echo "Something failed. Move back to the original state"
++ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64" \
++ "$ROOT/usr/bin" "$ROOT/usr/sbin" "$ROOT/usr/lib" \
++ "$ROOT/usr/lib64"; do
++ [[ -d "${dir}.usrmove-new" ]] && rm -fr "${dir}.usrmove-new"
++ if [[ -d "${dir}.usrmove-old" ]]; then
++ mv "$dir" "${dir}.del~"
++ mv "${dir}.usrmove-old" "$dir"
++ rm -fr "${dir}.del~"
++ fi
++ done
++}
++
++trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT
++trap 'exit 1;' SIGINT
++
++ismounted "$ROOT/usr" || CP_HARDLINK="-l"
++
++set -e
++
++# merge / and /usr in new dir in /usr
++for dir in bin sbin lib lib64; do
++ rm -rf "$ROOT/usr/${dir}.usrmove-new"
++ [[ -L "$ROOT/$dir" ]] && continue
++ [[ -d "$ROOT/$dir" ]] || continue
++ echo "Make a copy of \`$ROOT/usr/$dir'."
++ [[ -d "$ROOT/usr/$dir" ]] \
++ && cp -ax $CP_HARDLINK "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
++ echo "Merge the copy with \`$ROOT/$dir'."
++ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \
++ || mkdir -p "$ROOT/usr/${dir}.usrmove-new"
++ cp -axT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
++ echo "Clean up duplicates in \`$ROOT/usr/$dir'."
++ # delete all symlinks that have been backed up
++ find "$ROOT/usr/${dir}.usrmove-new" -type l -name '*.usrmove~' -delete || :
++ # replace symlink with backed up binary
++ find "$ROOT/usr/${dir}.usrmove-new" \
++ -name '*.usrmove~' \
++ -type f \
++ -exec bash -c 'p="{}";o=${p%%%%.usrmove~};
++ [[ -L "$o" ]] && mv -f "$p" "$o"' ';' || :
++done
++# switch over merged dirs in /usr
++for dir in bin sbin lib lib64; do
++ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] || continue
++ echo "Switch to new \`$ROOT/usr/$dir'."
++ rm -fr "$ROOT/usr/${dir}.usrmove-old"
++ mv "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-old"
++ mv "$ROOT/usr/${dir}.usrmove-new" "$ROOT/usr/$dir"
++done
++
++# replace dirs in / with links to /usr
++for dir in bin sbin lib lib64; do
++ [[ -L "$ROOT/$dir" ]] && continue
++ [[ -d "$ROOT/$dir" ]] || continue
++ echo "Create \`$ROOT/$dir' symlink."
++ rm -rf "$ROOT/${dir}.usrmove-old" || :
++ mv "$ROOT/$dir" "$ROOT/${dir}.usrmove-old"
++ ln -sfn usr/$dir "$ROOT/$dir"
++done
++
++echo "Clean up backup files."
++# everything seems to work; cleanup
++for dir in bin sbin lib lib64; do
++ # if we get killed in the middle of "rm -rf", ensure not to leave
++ # an incomplete directory, which is moved back by cleanup()
++ [[ -d "$ROOT/usr/${dir}.usrmove-old" ]] \
++ && mv "$ROOT/usr/${dir}.usrmove-old" "$ROOT/usr/${dir}.usrmove-old~"
++ [[ -d "$ROOT/${dir}.usrmove-old" ]] \
++ && mv "$ROOT/${dir}.usrmove-old" "$ROOT/${dir}.usrmove-old~"
++done
++
++for dir in bin sbin lib lib64; do
++ [[ -d "$ROOT/usr/${dir}.usrmove-old~" ]] \
++ && rm -rf "$ROOT/usr/${dir}.usrmove-old~" || :
++ [[ -d "$ROOT/${dir}.usrmove-old~" ]] \
++ && rm -rf "$ROOT/${dir}.usrmove-old~" || :
++done
++
++set +e
++
++echo "Run ldconfig."
++ldconfig -r "$ROOT"
++echo "Set autorelabel flag."
++> "$ROOT/.autorelabel"
++echo "Done."
++exit 0
diff --git a/0071-dracut.spec-add-compat-symlinks-to-sbin.patch b/0071-dracut.spec-add-compat-symlinks-to-sbin.patch
new file mode 100644
index 0000000..b9bb813
--- /dev/null
+++ b/0071-dracut.spec-add-compat-symlinks-to-sbin.patch
@@ -0,0 +1,39 @@
+From 4cbc0c79ac19d021f6f884a779c19c05fd9e5a20 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Thu, 26 Jan 2012 12:41:03 +0100
+Subject: [PATCH] dracut.spec: add compat symlinks to /sbin
+
+---
+ dracut.spec | 12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/dracut.spec b/dracut.spec
+index 06533e3..4eb3ba3 100644
+--- a/dracut.spec
++++ b/dracut.spec
+@@ -197,13 +197,25 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
+ mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
+ install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log
+
++# create the ghosts
++mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/sbin
++ln -s ../bin/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
++ln -s ../usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
++
+ %clean
+ rm -rf $RPM_BUILD_ROOT
+
++%post -p <lua>
++posix.symlink("../bin/dracut", "%{_sbindir}/dracut")
++posix.symlink("../usr/bin/dracut", "/sbin/dracut")
++return 0
++
+ %files
+ %defattr(-,root,root,0755)
+ %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
+ %{_bindir}/dracut
++%ghost /sbin/dracut
++%ghost %{_sbindir}/dracut
+ %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
+ %{_bindir}/mkinitrd
+ %{_bindir}/lsinitrd
diff --git a/dracut.spec b/dracut.spec
index dbac75b..44d8319 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -10,7 +10,7 @@
Name: dracut
Version: 014
-Release: 65.git20120123%{?dist}
+Release: 72.git20120126%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel} > 6
@@ -88,6 +88,13 @@ Patch61: 0061-iscsi-multipath-also-search-in-drivers-s390-scsi.patch
Patch62: 0062-dracut-_get_fs_type-also-handle-dev-block-maj-min.patch
Patch63: 0063-dracut-functions-get_maj_min-major-and-minor-was-swa.patch
Patch64: 0064-90crypt-module-setup.sh-prepend-luks-to-hostonly-cmd.patch
+Patch65: 0065-99base-init-remove-tmpfs-on-dev.patch
+Patch66: 0066-netroot-actually-run-netroot-hooks.patch
+Patch67: 0067-let-some-modules-to-respect-mount_needs.patch
+Patch68: 0068-95ssh-client-module-setup.sh-spell-corrections.patch
+Patch69: 0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch
+Patch70: 0070-add-usrmove-module.patch
+Patch71: 0071-dracut.spec-add-compat-symlinks-to-sbin.patch
BuildArch: noarch
@@ -262,13 +269,25 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log
+# create the ghosts
+mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/sbin
+ln -s ../bin/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
+ln -s ../usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p <lua>
+posix.symlink("../bin/dracut", "%{_sbindir}/dracut")
+posix.symlink("../usr/bin/dracut", "/sbin/dracut")
+return 0
+
%files
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%{_bindir}/dracut
+%ghost /sbin/dracut
+%ghost %{_sbindir}/dracut
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
%{_bindir}/mkinitrd
%{_bindir}/lsinitrd
@@ -291,6 +310,7 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/10rpmversion
+%{dracutlibdir}/modules.d/30usrmove
%{dracutlibdir}/modules.d/50plymouth
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
@@ -365,6 +385,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
+* Thu Jan 26 2012 Harald Hoyer <harald at redhat.com> 014-72.git20120126
+- update to latest git
+
* Mon Jan 23 2012 Harald Hoyer <harald at redhat.com> 014-65.git20120123
- update to latest git
More information about the scm-commits
mailing list