diff --git a/0001-dracut-install.c-try-clone-ioctl-for-more-speed.patch b/0001-dracut-install.c-try-clone-ioctl-for-more-speed.patch deleted file mode 100644 index a19caf9..0000000 --- a/0001-dracut-install.c-try-clone-ioctl-for-more-speed.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 85854b245e1090970d566d6432dabc315e17461c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 09:06:13 +0200 -Subject: [PATCH] dracut-install.c: try clone ioctl for more speed - ---- - install/dracut-install.c | 64 ++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 59 insertions(+), 5 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index ccd4ba4..86c32db 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - #include "log.h" - #include "hashmap.h" -@@ -163,25 +164,78 @@ static int ln_r(const char *src, const char *dst) - return 0; - } - -+/* Perform the O(1) btrfs clone operation, if possible. -+ Upon success, return 0. Otherwise, return -1 and set errno. */ -+static inline int clone_file(int dest_fd, int src_fd) -+{ -+#undef BTRFS_IOCTL_MAGIC -+#define BTRFS_IOCTL_MAGIC 0x94 -+#undef BTRFS_IOC_CLONE -+#define BTRFS_IOC_CLONE _IOW (BTRFS_IOCTL_MAGIC, 9, int) -+ return ioctl(dest_fd, BTRFS_IOC_CLONE, src_fd); -+} -+ -+static bool use_clone = true; -+ - static int cp(const char *src, const char *dst) - { - int pid; -- int status; -+ int ret; -+ -+ if(use_clone) { -+ struct stat sb; -+ int dest_desc, source_desc; -+ -+ if (lstat(src, &sb) != 0) -+ goto normal_copy; -+ -+ if (S_ISLNK(sb.st_mode)) -+ goto normal_copy; -+ -+ source_desc = open(src, O_RDONLY | O_CLOEXEC); -+ if (source_desc < 0) -+ goto normal_copy; - -+ dest_desc = -+ open(dst, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, -+ (sb.st_mode) & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)); -+ -+ if (dest_desc < 0) { -+ close(source_desc); -+ goto normal_copy; -+ } -+ -+ ret = clone_file(dest_desc, source_desc); -+ close(source_desc); -+ if (ret == 0) { -+ if (fchown(dest_desc, sb.st_uid, sb.st_gid) != 0) -+ fchown(dest_desc, -1, sb.st_gid); -+ close(dest_desc); -+ return ret; -+ } -+ close(dest_desc); -+ -+ /* clone did not work, remove the file */ -+ unlink(dst); -+ /* do not try clone again */ -+ use_clone = false; -+ } -+ -+ normal_copy: - pid = fork(); - if (pid == 0) { - execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode", "-fL", src, dst, NULL); - _exit(EXIT_FAILURE); - } - -- while (waitpid(pid, &status, 0) < 0) { -+ while (waitpid(pid, &ret, 0) < 0) { - if (errno != EINTR) { -- status = -1; -+ ret = -1; - break; - } - } - -- return status; -+ return ret; - } - - static int resolve_deps(const char *src) -@@ -643,7 +697,7 @@ static int install_all(int argc, char **argv) - free(dest); - } - -- if ((ret != 0) && (!arg_optional)) { -+ if ((ret != 0) && (!arg_optional)) { - log_error("ERROR: installing '%s'", argv[i]); - r = EXIT_FAILURE; - } diff --git a/0002-move-dracut-install-to-dracutbasedir.patch b/0002-move-dracut-install-to-dracutbasedir.patch deleted file mode 100644 index aca1164..0000000 --- a/0002-move-dracut-install-to-dracutbasedir.patch +++ /dev/null @@ -1,408 +0,0 @@ -From f4031e8a9a7734fbb94e7350a814a5446c5cef5c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 09:12:35 +0200 -Subject: [PATCH] move dracut-install to dracutbasedir - -We do not want to install dracut-install to /usr/bin until all -interfaces are set to stone and the manpage is written. Until then the -tool is dracut internal. ---- - Makefile | 25 ++++++++--- - dracut-functions.sh | 121 +++++++++++++++++++++++++++++---------------------- - dracut.sh | 4 +- - dracut.spec | 9 +++- - install/Makefile | 18 ++------ - 5 files changed, 102 insertions(+), 75 deletions(-) - -diff --git a/Makefile b/Makefile -index 5488f8e..1d5531d 100644 ---- a/Makefile -+++ b/Makefile -@@ -13,10 +13,25 @@ manpages = dracut.8 dracut.cmdline.7 dracut.conf.5 dracut-catimages.8 - - .PHONY: install clean archive rpm testimage test all check AUTHORS doc - --all: syncheck dracut-version.sh install/dracut-install -+all: syncheck dracut-version.sh dracut-install - --install/dracut-install: -- $(MAKE) -C install dracut-install -+DRACUT_INSTALL_SOURCE = \ -+ install/dracut-install.c \ -+ install/hashmap.c\ -+ install/log.c \ -+ install/util.c -+ -+DRACUT_INSTALL_HEADER = \ -+ install/hashmap.h \ -+ install/log.h \ -+ install/macro.h \ -+ install/util.h -+ -+dracut-install: $(DRACUT_INSTALL_SOURCE) $(DRACUT_INSTALL_HEADER) -+ gcc -std=gnu99 -O2 -g -Wall -o dracut-install $(DRACUT_INSTALL_SOURCE) -+ -+indent: -+ indent -i8 -nut -br -linux -l120 install/dracut-install.c - - doc: $(manpages) dracut.html - -@@ -74,7 +89,7 @@ install: doc dracut-version.sh - ln -s ../dracut-shutdown.service \ - $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ - fi -- $(MAKE) -C install install -+ install $(strip) -m 0755 dracut-install $(DESTDIR)$(pkglibdir)/dracut-install - - dracut-version.sh: - @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh -@@ -85,9 +100,9 @@ clean: - $(RM) */*/*~ - $(RM) test-*.img - $(RM) dracut-*.rpm dracut-*.tar.bz2 -+ $(RM) dracut-install - $(RM) $(manpages) dracut.html - $(MAKE) -C test clean -- $(MAKE) -C install clean - - archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2 - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 3fca456..5acf6f6 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -20,11 +20,30 @@ - # along with this program. If not, see . - # - --[[ -d "$initdir/.kernelmodseen" ]] || mkdir -p "$initdir/.kernelmodseen" -+ -+if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then -+ if ! [[ -d "$initdir/.kernelmodseen" ]]; then -+ mkdir -p "$initdir/.kernelmodseen" -+ fi -+ DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" -+fi - - # Generic substring function. If $2 is in $1, return 0. - strstr() { [[ $1 = *$2* ]]; } - -+# find a binary. If we were not passed the full path directly, -+# search in the usual places to find the binary. -+find_binary() { -+ if [[ -z ${1##/*} ]]; then -+ if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; }; then -+ echo $1 -+ return 0 -+ fi -+ fi -+ -+ type -P $1 -+} -+ - if ! [[ $dracutbasedir ]]; then - dracutbasedir=${BASH_SOURCE[0]%/*} - [[ $dracutbasedir = "dracut-functions" ]] && dracutbasedir="." -@@ -32,6 +51,14 @@ if ! [[ $dracutbasedir ]]; then - dracutbasedir="$(readlink -f $dracutbasedir)" - fi - -+if ! [[ $DRACUT_INSTALL ]]; then -+ DRACUT_INSTALL=$(find_binary dracut-install) -+fi -+ -+if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then -+ DRACUT_INSTALL=$dracutbasedir/dracut-install -+fi -+ - # Detect lib paths - if ! [[ $libdirs ]] ; then - if strstr "$(ldd /bin/sh)" "/lib64/" &>/dev/null \ -@@ -391,56 +418,56 @@ check_vol_slaves() { - return 1 - } - --if [[ -x /usr/bin/dracut-install ]]; then -+if [[ $DRACUT_INSTALL ]]; then - [[ $DRACUT_RESOLVE_LAZY ]] || export DRACUT_RESOLVE_DEPS=1 - inst_dir() { - [[ -e ${initdir}/"$1" ]] && return 0 # already there -- dracut-install ${initdir+-D "$initdir"} -d "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} -d "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} -d "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -d "$@" || : - } - - inst() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there -- #dinfo "dracut-install -l $@" -- dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ #dinfo "$DRACUT_INSTALL -l $@" -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - inst_simple() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -e $1 ]] || return 1 # no source -- dracut-install ${initdir+-D "$initdir"} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} "$@" || : - } - - inst_symlink() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -L $1 ]] || return 1 -- dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - dracut_install() { -- #dinfo "initdir=$initdir dracut-install -l $@" -- dracut-install ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ #dinfo "initdir=$initdir $DRACUT_INSTALL -l $@" -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - inst_library() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -e $1 ]] || return 1 # no source -- dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - inst_binary() { -- dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - inst_script() { -- dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -- (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : -+ $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" -+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : - } - - else -@@ -664,19 +691,6 @@ rev_lib_symlinks() { - echo "${links}" - } - --# find a binary. If we were not passed the full path directly, --# search in the usual places to find the binary. --find_binary() { -- if [[ -z ${1##/*} ]]; then -- if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; }; then -- echo $1 -- return 0 -- fi -- fi -- -- type -P $1 --} -- - # attempt to install any programs specified in a udev rule - inst_rule_programs() { - local _prog _bin -@@ -1112,8 +1126,8 @@ install_kmod_with_fw() { - [[ -e "${initdir}/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" ]] \ - && return 0 - -- if [[ -e "$initdir/.kernelmodseen/${1##*/}" ]]; then -- read ret < "$initdir/.kernelmodseen/${1##*/}" -+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -e "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" ]]; then -+ read ret < "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" - return $ret - fi - -@@ -1133,8 +1147,9 @@ install_kmod_with_fw() { - - inst_simple "$1" "/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" - ret=$? -- [ -d "$initdir/.kernelmodseen" ] && \ -- echo $ret > "$initdir/.kernelmodseen/${1##*/}" -+ [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -+ [[ -d "$DRACUT_KERNEL_LAZY_HASHDIR" ]] && \ -+ echo $ret > "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" - (($ret != 0)) && return $ret - - local _modname=${1##*/} _fwdir _found _fw -@@ -1181,38 +1196,38 @@ for_each_kmod_dep() { - dracut_kernel_post() { - local _moddirname=${srcmods%%/lib/modules/*} - -- if [[ -f "$initdir/.kernelmodseen/lazylist" ]]; then -+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then - xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ -- < "$initdir/.kernelmodseen/lazylist" 2>/dev/null \ -+ < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" 2>/dev/null \ - | sort -u \ - | while read _cmd _modpath _options; do - [[ $_cmd = insmod ]] || continue - echo "$_modpath" -- done > "$initdir/.kernelmodseen/lazylist.dep" -+ done > "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" - - ( -- if [[ -x /usr/bin/dracut-install ]] && [[ -z $_moddirname ]]; then -- xargs dracut-install ${initdir+-D "$initdir"} -a < "$initdir/.kernelmodseen/lazylist.dep" -+ if [[ -x $DRACUT_INSTALL ]] && [[ -z $_moddirname ]]; then -+ xargs $DRACUT_INSTALL ${initdir+-D "$initdir"} -a < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" - else - while read _modpath; do - local _destpath=$_modpath - [[ $_moddirname ]] && _destpath=${_destpath##$_moddirname/} - _destpath=${_destpath##*/lib/modules/$kernel/} - inst_simple "$_modpath" "/lib/modules/$kernel/${_destpath}" || exit $? -- done < "$initdir/.kernelmodseen/lazylist.dep" -+ done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" - fi - ) & - - -- if [[ -x /usr/bin/dracut-install ]]; then -- xargs modinfo -k $kernel -F firmware < "$initdir/.kernelmodseen/lazylist.dep" \ -+ if [[ -x $DRACUT_INSTALL ]]; then -+ xargs modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ - | while read line; do - for _fwdir in $fw_dir; do - echo $_fwdir/$line; - done; -- done |xargs dracut-install ${initdir+-D "$initdir"} -a -o -+ done |xargs $DRACUT_INSTALL ${initdir+-D "$initdir"} -a -o - else -- for _fw in $(xargs modinfo -k $kernel -F firmware < "$initdir/.kernelmodseen/lazylist.dep"); do -+ for _fw in $(xargs modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"); do - for _fwdir in $fw_dir; do - if [[ -d $_fwdir && -f $_fwdir/$_fw ]]; then - inst_simple "$_fwdir/$_fw" "/lib/firmware/$_fw" -@@ -1243,7 +1258,7 @@ dracut_kernel_post() { - exit 1 - fi - -- rm -fr "$initdir/.kernelmodseen" -+ [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && rm -fr "$DRACUT_KERNEL_LAZY_HASHDIR" - } - - find_kernel_modules_by_path () ( -@@ -1296,8 +1311,9 @@ instmods() { - _mod=${_mod##*/} - # if we are already installed, skip this module and go on - # to the next one. -- if [[ -f "$initdir/.kernelmodseen/${_mod%.ko}.ko" ]]; then -- read _ret <"$initdir/.kernelmodseen/${_mod%.ko}.ko" -+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -+ [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" ]]; then -+ read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" - return $_ret - fi - -@@ -1312,7 +1328,7 @@ instmods() { - && ! [[ "$add_drivers" =~ " ${_mod} " ]] \ - && return 0 - -- if [[ "$_check" = "yes" ]] || ! [[ $DRACUT_KERNEL_LAZY ]]; then -+ if [[ "$_check" = "yes" ]] || ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then - # We use '-d' option in modprobe only if modules prefix path - # differs from default '/'. This allows us to use Dracut with - # old version of modprobe which doesn't have '-d' option. -@@ -1325,7 +1341,8 @@ instmods() { - --set-version $kernel ${_moddirname} $_mpargs - ((_ret+=$?)) - else -- echo $_mod >> "$initdir/.kernelmodseen/lazylist" -+ [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -+ echo $_mod >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" - fi - ;; - esac -diff --git a/dracut.sh b/dracut.sh -index 335f08b..1dc8cee 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -820,12 +820,12 @@ if [[ $kernel_only != yes ]]; then - cat $f >> "${initdir}/etc/fstab" - done - -- if [[ $DRACUT_RESOLVE_LAZY ]] && [[ -x /usr/bin/dracut-install ]]; then -+ if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then - dinfo "*** Resolving executable dependencies ***" - find "$initdir" -type f \ - '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \ - -not -path '*.ko' -print0 \ -- | xargs -0 dracut-install ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} -+ | xargs -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} - dinfo "*** Resolving executable dependencies done***" - fi - -diff --git a/dracut.spec b/dracut.spec -index 96dbc9c..06d8139 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -19,8 +19,13 @@ Group: System Environment/Base - %if 0%{?suse_version} - Group: System/Base - %endif --License: GPLv2+ -+ -+# The entire source code is GPLv2+ -+# except install/* which is LGPLv2.1+ -+License: GPLv2+ and LGPLv2.1+ -+ - URL: https://dracut.wiki.kernel.org/ -+ - # Source can be generated by - # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz - Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 -@@ -235,7 +240,6 @@ rm -rf $RPM_BUILD_ROOT - %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 - %{_bindir}/mkinitrd - %{_bindir}/lsinitrd --%{_bindir}/dracut-install - %endif - %dir %{dracutlibdir} - %dir %{dracutlibdir}/modules.d -@@ -244,6 +248,7 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/dracut-version.sh - %{dracutlibdir}/dracut-logger.sh - %{dracutlibdir}/dracut-initramfs-restore -+%{dracutlibdir}/dracut-install - %config(noreplace) /etc/dracut.conf - %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} - %config /etc/dracut.conf.d/01-dist.conf -diff --git a/install/Makefile b/install/Makefile -index 59532a8..5332f25 100644 ---- a/install/Makefile -+++ b/install/Makefile -@@ -1,17 +1,7 @@ --prefix ?= /usr --bindir ?= ${prefix}/bin --strip ?= -s -- --all: dracut-install -- --dracut-install: dracut-install.c hashmap.c log.c util.c -- gcc -std=gnu99 -O2 -g -Wall -o dracut-install dracut-install.c hashmap.c log.c util.c -- --install: dracut-install -- install $(strip) -m 0755 dracut-install $(DESTDIR)$(bindir)/dracut-install -+all: -+ $(MAKE) -C .. - - clean: -- rm -f dracut-install *~ -+ $(MAKE) -C .. clean - --indent: -- indent -i8 -nut -br -linux -l120 dracut-install.c -+.PHONY: all clean diff --git a/0003-98usrmount-force-mounting-usr-read-only-option-rd.us.patch b/0003-98usrmount-force-mounting-usr-read-only-option-rd.us.patch deleted file mode 100644 index 63cf733..0000000 --- a/0003-98usrmount-force-mounting-usr-read-only-option-rd.us.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2ee48b4b4b07e28980ff851991d2884d8c76c12c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= -Date: Fri, 29 Jun 2012 13:58:18 +0200 -Subject: [PATCH] 98usrmount: force mounting /usr read-only option - (rd.usrmount.ro) - ---- - dracut.cmdline.7.asc | 5 +++++ - modules.d/98usrmount/mount-usr.sh | 9 +++++++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 883223c..5669700 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -76,6 +76,11 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 - ---- - - -+**rd.usrmount.ro**: -+ force mounting _/usr_ read-only. Use this option if your init system -+ performs remount of _/usr_ the same as it does with rootfs. -+ -+ - Misc - ~~~~ - **rd.driver.blacklist=**_[,,...]_:: -diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh -index 92638d1..748ac01 100755 ---- a/modules.d/98usrmount/mount-usr.sh -+++ b/modules.d/98usrmount/mount-usr.sh -@@ -68,8 +68,13 @@ mount_usr() - _ret=$? - echo $_ret >/run/initramfs/usr-fsck - if [ $_ret -ne 255 ]; then -- info "Mounting /usr" -- mount "$NEWROOT/usr" 2>&1 | vinfo -+ if getargbool 0 rd.usrmount.ro; then -+ info "Mounting /usr (read-only forced)" -+ mount -r "$NEWROOT/usr" 2>&1 | vinfo -+ else -+ info "Mounting /usr" -+ mount "$NEWROOT/usr" 2>&1 | vinfo -+ fi - fi - fi - } diff --git a/0004-99base-don-t-require-fs-lib-to-detect-rootfstype.patch b/0004-99base-don-t-require-fs-lib-to-detect-rootfstype.patch deleted file mode 100644 index 1371bdf..0000000 --- a/0004-99base-don-t-require-fs-lib-to-detect-rootfstype.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e42b6f9e1504290f54be0074eb51a025c812e84f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= -Date: Fri, 29 Jun 2012 13:58:19 +0200 -Subject: [PATCH] 99base: don't require fs-lib to detect rootfstype - -If fs-lib is not included, no rootfs autodetection is performed. ---- - modules.d/99base/mount-hook.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99base/mount-hook.sh b/modules.d/99base/mount-hook.sh -index dcf1415..db07866 100755 ---- a/modules.d/99base/mount-hook.sh -+++ b/modules.d/99base/mount-hook.sh -@@ -4,7 +4,9 @@ - - PATH=/usr/sbin:/usr/bin:/sbin:/bin - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh --type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh -+type det_fs >/dev/null 2>&1 || [ -f /lib/fs-lib.sh ] && . /lib/fs-lib.sh -+# If fs-lib is not included use following det_fs replacement. -+type det_fs >/dev/null 2>&1 || det_fs() { echo "${2:-auto}"; } - - mountpoint="$1" - ismounted "$mountpoint" && exit 0 diff --git a/0005-new-option-rd.skipfsck-to-skip-fsck-for-rootfs-and-u.patch b/0005-new-option-rd.skipfsck-to-skip-fsck-for-rootfs-and-u.patch deleted file mode 100644 index 3e2ee16..0000000 --- a/0005-new-option-rd.skipfsck-to-skip-fsck-for-rootfs-and-u.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9fb01d49d6fa9772caed7eaa184072ff365b7d80 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= -Date: Fri, 29 Jun 2012 13:58:20 +0200 -Subject: [PATCH] new option: rd.skipfsck to skip fsck for rootfs and /usr - ---- - dracut.cmdline.7.asc | 4 ++++ - modules.d/95rootfs-block/mount-root.sh | 4 +++- - modules.d/98usrmount/mount-usr.sh | 15 ++++++++------- - 3 files changed, 15 insertions(+), 8 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 5669700..3bfb53a 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -75,6 +75,10 @@ resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 - resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 - ---- - -+**rd.skipfsck**:: -+ skip fsck for rootfs and _/usr_. If you're mounting _/usr_ read-only and -+ the init system performs fsck before remount, you might want to use this -+ option to avoid duplication. - - **rd.usrmount.ro**: - force mounting _/usr_ read-only. Use this option if your init system -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 2cae526..9109638 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -103,7 +103,9 @@ mount_root() { - # printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab - - ran_fsck=0 -- if [ -z "$fastboot" -a "$READONLY" != "yes" ] && ! strstr "${rflags},${rootopts}" _netdev; then -+ if [ -z "$fastboot" -a "$READONLY" != "yes" ] && \ -+ ! strstr "${rflags},${rootopts}" _netdev && \ -+ ! getargbool 0 rd.skipfsck; then - umount "$NEWROOT" - fsck_single "${root#block:}" "$rootfs" "$rflags" "$fsckoptions" - _ret=$? -diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh -index 748ac01..5798777 100755 ---- a/modules.d/98usrmount/mount-usr.sh -+++ b/modules.d/98usrmount/mount-usr.sh -@@ -60,14 +60,15 @@ mount_usr() - - if [ "x$_usr_found" != "x" ]; then - # we have to mount /usr -- if [ "0" != "${_passno:-0}" ]; then -- fsck_usr "$_dev" "$_fs" "$_opts" -- else -- : -+ _fsck_ret=0 -+ if ! getargbool 0 rd.skipfsck; then -+ if [ "0" != "${_passno:-0}" ]; then -+ fsck_usr "$_dev" "$_fs" "$_opts" -+ _fsck_ret=$? -+ echo $_fsck_ret >/run/initramfs/usr-fsck -+ fi - fi -- _ret=$? -- echo $_ret >/run/initramfs/usr-fsck -- if [ $_ret -ne 255 ]; then -+ if [ $_fsck_ret -ne 255 ]; then - if getargbool 0 rd.usrmount.ro; then - info "Mounting /usr (read-only forced)" - mount -r "$NEWROOT/usr" 2>&1 | vinfo diff --git a/0006-95rootfs-block-skip-checks-rel.-to-fsck-if-rd.skipfs.patch b/0006-95rootfs-block-skip-checks-rel.-to-fsck-if-rd.skipfs.patch deleted file mode 100644 index 5130b3c..0000000 --- a/0006-95rootfs-block-skip-checks-rel.-to-fsck-if-rd.skipfs.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 965c2d8760cd862eff1c0401db57cadb0e1b4eed Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= -Date: Fri, 29 Jun 2012 13:58:21 +0200 -Subject: [PATCH] 95rootfs-block: skip checks rel. to fsck if rd.skipfsck is - supplied - ---- - modules.d/95rootfs-block/mount-root.sh | 29 ++++++++++++++++------------- - 1 file changed, 16 insertions(+), 13 deletions(-) - -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 9109638..19f59fa 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -54,20 +54,23 @@ mount_root() { - fsckoptions=$(cat "$NEWROOT"/fsckoptions) - fi - -- if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then -- fsckoptions="-f $fsckoptions" -- elif [ -f "$NEWROOT"/.autofsck ]; then -- [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && . "$NEWROOT"/etc/sysconfig/autofsck -- if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then -- AUTOFSCK_OPT="$AUTOFSCK_OPT -f" -- fi -- if [ -n "$AUTOFSCK_SINGLEUSER" ]; then -- warn "*** Warning -- the system did not shut down cleanly. " -- warn "*** Dropping you to a shell; the system will continue" -- warn "*** when you leave the shell." -- emergency_shell -+ if ! getargbool 0 rd.skipfsck; then -+ if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then -+ fsckoptions="-f $fsckoptions" -+ elif [ -f "$NEWROOT"/.autofsck ]; then -+ [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && \ -+ . "$NEWROOT"/etc/sysconfig/autofsck -+ if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then -+ AUTOFSCK_OPT="$AUTOFSCK_OPT -f" -+ fi -+ if [ -n "$AUTOFSCK_SINGLEUSER" ]; then -+ warn "*** Warning -- the system did not shut down cleanly. " -+ warn "*** Dropping you to a shell; the system will continue" -+ warn "*** when you leave the shell." -+ emergency_shell -+ fi -+ fsckoptions="$AUTOFSCK_OPT $fsckoptions" - fi -- fsckoptions="$AUTOFSCK_OPT $fsckoptions" - fi - - rootopts= diff --git a/0007-dracut-functions.sh-set-LC_ALL-C-to-get-correct-pars.patch b/0007-dracut-functions.sh-set-LC_ALL-C-to-get-correct-pars.patch deleted file mode 100644 index 0c841cc..0000000 --- a/0007-dracut-functions.sh-set-LC_ALL-C-to-get-correct-pars.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0e95d84892d06ff14e4d6b321dad05344724934e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:27:36 +0200 -Subject: [PATCH] dracut-functions.sh: set LC_ALL=C to get correct parsing - information - ---- - dracut-functions.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 5acf6f6..cd9426e 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -19,7 +19,7 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see . - # -- -+export LC_ALL=C - - if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then - if ! [[ -d "$initdir/.kernelmodseen" ]]; then diff --git a/0008-do-not-umount-root-remount-it.-do-not-mount-ro-if-no.patch b/0008-do-not-umount-root-remount-it.-do-not-mount-ro-if-no.patch deleted file mode 100644 index 710d882..0000000 --- a/0008-do-not-umount-root-remount-it.-do-not-mount-ro-if-no.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 7209df9e912c73318dcb380838bc1dbe24a43a4b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:29:30 +0200 -Subject: [PATCH] do not umount root, remount it. do not mount ro if not - specified - -also mount /usr readonly if "ro" is specified on the command line -if /usr is a btrfs subvolume of root, use the same mount options ---- - modules.d/95rootfs-block/mount-root.sh | 20 +++++++++----------- - modules.d/98usrmount/mount-usr.sh | 9 +++++++++ - modules.d/99base/parse-root-opts.sh | 6 ++++-- - 3 files changed, 22 insertions(+), 13 deletions(-) - -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 19f59fa..932571a 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -15,7 +15,6 @@ filter_rootopts() { - local v - while [ $# -gt 0 ]; do - case $1 in -- rw|ro);; - defaults);; - *) - v="$v,${1}";; -@@ -82,7 +81,7 @@ mount_root() { - # the root filesystem, - # remount it with the proper options - rootopts="defaults" -- while read dev mp fs opts rest; do -+ while read dev mp fs opts dump fsck; do - # skip comments - [ "${dev%%#*}" != "$dev" ] && continue - -@@ -90,6 +89,7 @@ mount_root() { - # sanity - determine/fix fstype - rootfs=$(det_fs "${root#block:}" "$fs") - rootopts=$opts -+ rootfsck=$fsck - break - fi - done < "$NEWROOT/etc/fstab" -@@ -99,28 +99,26 @@ mount_root() { - - # we want rootflags (rflags) to take precedence so prepend rootopts to - # them; rflags is guaranteed to not be empty -- rflags="${rootopts:+"${rootopts},"}${rflags}" -+ rflags="${rootopts:+${rootopts},}${rflags}" - - # backslashes are treated as escape character in fstab - # esc_root=$(echo ${root#block:} | sed 's,\\,\\\\,g') - # printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab - - ran_fsck=0 -- if [ -z "$fastboot" -a "$READONLY" != "yes" ] && \ -- ! strstr "${rflags},${rootopts}" _netdev && \ -+ if [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] && \ -+ ! strstr "${rflags}" _netdev && \ - ! getargbool 0 rd.skipfsck; then -- umount "$NEWROOT" - fsck_single "${root#block:}" "$rootfs" "$rflags" "$fsckoptions" - _ret=$? - [ $_ret -ne 255 ] && echo $_ret >/run/initramfs/root-fsck - ran_fsck=1 - fi - -- if [ -n "$rootopts" -o "$ran_fsck" = "1" ]; then -- info "Remounting ${root#block:} with -o ${rflags}" -- umount "$NEWROOT" &>/dev/null -- mount -t "$rootfs" -o "$rflags" "${root#block:}" "$NEWROOT" 2>&1 | vinfo -- fi -+ echo "${root#block:} $NEWROOT $rootfs ${rflags:-defaults} 0 $rootfsck" >> /etc/fstab -+ -+ info "Remounting ${root#block:} with -o ${rflags}" -+ mount -o remount "$NEWROOT" 2>&1 | vinfo - - [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null - [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null -diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh -index 5798777..5cf4eb8 100755 ---- a/modules.d/98usrmount/mount-usr.sh -+++ b/modules.d/98usrmount/mount-usr.sh -@@ -52,6 +52,15 @@ mount_usr() - _dev="/dev/disk/by-uuid/${_dev#UUID=}" - ;; - esac -+ if strstr "$_opts" "subvol=" && \ -+ [ "${root#block:}" -ef $_dev ] -+ [ -n "$rflags" ]; then -+ # for btrfs subvolumes we have to mount /usr with the same rflags -+ _opts="${_opts:+${_opts},}${rflags}" -+ elif getarg ro; then -+ # if "ro" is specified, we want /usr to be readonly, too -+ _opts="${_opts:+${_opts},}ro" -+ fi - echo "$_dev ${NEWROOT}${_mp} $_fs ${_opts} $_freq $_passno" - _usr_found="1" - break -diff --git a/modules.d/99base/parse-root-opts.sh b/modules.d/99base/parse-root-opts.sh -index 2f427aa..44dcc09 100755 ---- a/modules.d/99base/parse-root-opts.sh -+++ b/modules.d/99base/parse-root-opts.sh -@@ -5,9 +5,11 @@ - root=$(getarg root=) - - if rflags="$(getarg rootflags=)"; then -- getarg rw && rflags="${rflags},rw" || rflags="${rflags},ro" -+ getarg rw && rflags="${rflags},rw" -+ getarg ro && rflags="${rflags},ro" - else -- getarg rw && rflags=rw || rflags=ro -+ getarg rw && rflags=rw -+ getarg ro && rflags=ro - fi - - fstype="$(getarg rootfstype=)" diff --git a/0009-dracut-install.c-give-info-that-SOURCE-argument-is-m.patch b/0009-dracut-install.c-give-info-that-SOURCE-argument-is-m.patch deleted file mode 100644 index 5f969b7..0000000 --- a/0009-dracut-install.c-give-info-that-SOURCE-argument-is-m.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 34e43ceb0df05081b737f932b0bc2f0426fb5276 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:31:38 +0200 -Subject: [PATCH] dracut-install.c: give info that SOURCE argument is missing - ---- - install/dracut-install.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 86c32db..778881a 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -601,6 +601,7 @@ static int parse_argv(int argc, char *argv[]) - } - - if (!optind || optind == argc) { -+ log_error("No SOURCE argument given"); - usage(EXIT_FAILURE); - } - diff --git a/0010-dracut.sh-do-not-lazy-resolve-include-directories.patch b/0010-dracut.sh-do-not-lazy-resolve-include-directories.patch deleted file mode 100644 index c1e0ce3..0000000 --- a/0010-dracut.sh-do-not-lazy-resolve-include-directories.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 998bf6e0888d93443278c2ff5335fc594d318e4b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:33:19 +0200 -Subject: [PATCH] dracut.sh: do not lazy resolve "include" directories - ---- - dracut.sh | 40 +++++++++++++++++++++------------------- - 1 file changed, 21 insertions(+), 19 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 1dc8cee..c4562e6 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -783,6 +783,27 @@ if [[ $no_kernel != yes ]]; then - dinfo "*** Installing kernel module dependencies and firmware done ***" - fi - -+if [[ $kernel_only != yes ]]; then -+ (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]} -+ -+ while pop fstab_lines line; do -+ echo "$line 0 0" >> "${initdir}/etc/fstab" -+ done -+ -+ for f in $add_fstab; do -+ cat $f >> "${initdir}/etc/fstab" -+ done -+ -+ if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then -+ dinfo "*** Resolving executable dependencies ***" -+ find "$initdir" -type f \ -+ '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \ -+ -not -path '*.ko' -print0 \ -+ | xargs -r -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} -+ dinfo "*** Resolving executable dependencies done***" -+ fi -+fi -+ - while pop include_src src && pop include_target tgt; do - if [[ $src && $tgt ]]; then - if [[ -f $src ]]; then -@@ -810,25 +831,6 @@ while pop include_src src && pop include_target tgt; do - done - - if [[ $kernel_only != yes ]]; then -- (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]} -- -- while pop fstab_lines line; do -- echo "$line 0 0" >> "${initdir}/etc/fstab" -- done -- -- for f in $add_fstab; do -- cat $f >> "${initdir}/etc/fstab" -- done -- -- if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then -- dinfo "*** Resolving executable dependencies ***" -- find "$initdir" -type f \ -- '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \ -- -not -path '*.ko' -print0 \ -- | xargs -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} -- dinfo "*** Resolving executable dependencies done***" -- fi -- - # make sure that library links are correct and up to date - for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do - [[ -f $f ]] && inst_simple "$f" diff --git a/0011-dracut-functions.sh-dracut.sh-use-xargs-with-r.patch b/0011-dracut-functions.sh-dracut.sh-use-xargs-with-r.patch deleted file mode 100644 index 8a11e8c..0000000 --- a/0011-dracut-functions.sh-dracut.sh-use-xargs-with-r.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 73575f11a9255704643b47ad0494cd2aabdce04c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:34:13 +0200 -Subject: [PATCH] dracut-functions.sh,dracut.sh: use xargs with "-r" - ---- - dracut-functions.sh | 17 ++++++++--------- - dracut.sh | 2 +- - 2 files changed, 9 insertions(+), 10 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index cd9426e..80b022f 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1197,7 +1197,7 @@ dracut_kernel_post() { - local _moddirname=${srcmods%%/lib/modules/*} - - if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then -- xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ -+ xargs -r modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ - < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" 2>/dev/null \ - | sort -u \ - | while read _cmd _modpath _options; do -@@ -1206,8 +1206,8 @@ dracut_kernel_post() { - done > "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" - - ( -- if [[ -x $DRACUT_INSTALL ]] && [[ -z $_moddirname ]]; then -- xargs $DRACUT_INSTALL ${initdir+-D "$initdir"} -a < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" -+ if [[ $DRACUT_INSTALL ]] && [[ -z $_moddirname ]]; then -+ xargs -r $DRACUT_INSTALL ${initdir+-D "$initdir"} -a < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" - else - while read _modpath; do - local _destpath=$_modpath -@@ -1218,16 +1218,15 @@ dracut_kernel_post() { - fi - ) & - -- -- if [[ -x $DRACUT_INSTALL ]]; then -- xargs modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ -+ if [[ $DRACUT_INSTALL ]]; then -+ xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ - | while read line; do - for _fwdir in $fw_dir; do - echo $_fwdir/$line; - done; -- done |xargs $DRACUT_INSTALL ${initdir+-D "$initdir"} -a -o -+ done | xargs -r $DRACUT_INSTALL ${initdir+-D "$initdir"} -a -o - else -- for _fw in $(xargs modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"); do -+ for _fw in $(xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"); do - for _fwdir in $fw_dir; do - if [[ -d $_fwdir && -f $_fwdir/$_fw ]]; then - inst_simple "$_fwdir/$_fw" "/lib/firmware/$_fw" -@@ -1273,7 +1272,7 @@ find_kernel_modules_by_path () ( - IFS=$_OLDIFS - else - ( cd /sys/module; echo *; ) \ -- | xargs modinfo -F filename -k $kernel 2>/dev/null -+ | xargs -r modinfo -F filename -k $kernel 2>/dev/null - fi - return 0 - ) -diff --git a/dracut.sh b/dracut.sh -index c4562e6..7ca3e8d 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -879,7 +879,7 @@ if [[ $do_strip = yes ]] ; then - find "$initdir" -type f \ - '(' -perm -0100 -or -perm -0010 -or -perm -0001 \ - -or -path '*/lib/modules/*.ko' ')' -print0 \ -- | xargs -0 strip -g 2>/dev/null -+ | xargs -r -0 strip -g 2>/dev/null - dinfo "*** Stripping files done ***" - fi - diff --git a/0012-add-hardlink-nohardlink-options.patch b/0012-add-hardlink-nohardlink-options.patch deleted file mode 100644 index 4e98a78..0000000 --- a/0012-add-hardlink-nohardlink-options.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 04d18f558743aa5b3430fe71fc8f9d7facd489ea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:34:46 +0200 -Subject: [PATCH] add "--hardlink" "--nohardlink" options - ---- - dracut.8.asc | 10 ++++++++-- - dracut.sh | 20 ++++++++++++++------ - 2 files changed, 22 insertions(+), 8 deletions(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index bab5996..196e2e8 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -183,10 +183,16 @@ example: - inhibit installation of any fsck tools - - **--strip**:: -- strip binaries in the initramfs (default) -+ strip binaries in the initramfs - - **--nostrip**:: -- do not strip binaries in the initramfs -+ do not strip binaries in the initramfs (default) -+ -+**--hardlink**:: -+ hardlink files in the initramfs (default) -+ -+**--nohardlink**:: -+ do not hardlink files in the initramfs - - **--prefix** __:: - prefix initramfs files with the specified directory -diff --git a/dracut.sh b/dracut.sh -index 7ca3e8d..4a6d5c7 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -65,6 +65,8 @@ Creates initial ramdisk images for preloading modules - --no-kernel Do not install kernel drivers and firmware files - --strip Strip binaries in the initramfs - --nostrip Do not strip binaries in the initramfs (default) -+ --hardlink Hardlink files in the initramfs (default) -+ --nohardlink Do not hardlink files in the initramfs - --prefix [DIR] Prefix initramfs files with [DIR] - --noprefix Do not prefix initramfs files (default) - --mdadmconf Include local /etc/mdadm.conf -@@ -251,6 +253,8 @@ while (($# > 0)); do - --no-kernel) kernel_only="no"; no_kernel="yes";; - --strip) do_strip_l="yes";; - --nostrip) do_strip_l="no";; -+ --hardlink) do_hardlink_l="yes";; -+ --nohardlink) do_hardlink_l="no";; - --noprefix) prefix_l="/";; - --mdadmconf) mdadmconf_l="yes";; - --nomdadmconf) mdadmconf_l="no";; -@@ -434,6 +438,9 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - - [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l - [[ $do_strip_l ]] && do_strip=$do_strip_l -+[[ $do_strip ]] || do_strip=no -+[[ $do_hardlink_l ]] && do_hardlink=$do_hardlink_l -+[[ $do_hardlink ]] || do_hardlink=yes - [[ $prefix_l ]] && prefix=$prefix_l - [[ $prefix = "/" ]] && unset prefix - [[ $hostonly_l ]] && hostonly=$hostonly_l -@@ -444,7 +451,6 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - [[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" - [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" - [[ $tmpdir ]] || tmpdir=/var/tmp --[[ $do_strip ]] || do_strip=no - [[ $compress_l ]] && compress=$compress_l - [[ $show_modules_l ]] && show_modules=$show_modules_l - [[ $nofscks_l ]] && nofscks="yes" -@@ -883,11 +889,13 @@ if [[ $do_strip = yes ]] ; then - dinfo "*** Stripping files done ***" - fi - --type hardlink &>/dev/null && { -- dinfo "*** hardlinking files ***" -- hardlink "$initdir" 2>&1 -- dinfo "*** hardlinking files done ***" --} -+if [[ $do_hardlink = yes ]] ; then -+ type hardlink &>/dev/null && { -+ dinfo "*** hardlinking files ***" -+ hardlink "$initdir" 2>&1 -+ dinfo "*** hardlinking files done ***" -+ } -+fi - - dinfo "*** Creating image file ***" - if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ diff --git a/0013-new-testsuite-test-TEST-03-USR-MOUNT.patch b/0013-new-testsuite-test-TEST-03-USR-MOUNT.patch deleted file mode 100644 index ae0dd20..0000000 --- a/0013-new-testsuite-test-TEST-03-USR-MOUNT.patch +++ /dev/null @@ -1,295 +0,0 @@ -From ef9b54cfe652c19ad38f19bf4fd13a9e7a9705b2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 11:38:24 +0200 -Subject: [PATCH] new testsuite test TEST-03-USR-MOUNT - -mounts /usr as a btrfs subvolume and should respect "rw" and "ro" kernel -command line arguments properly. ---- - test/TEST-03-USR-MOUNT/99-idesymlinks.rules | 8 ++ - test/TEST-03-USR-MOUNT/Makefile | 10 ++ - test/TEST-03-USR-MOUNT/create-root.sh | 29 ++++++ - test/TEST-03-USR-MOUNT/cryptroot-ask.sh | 6 ++ - test/TEST-03-USR-MOUNT/fstab | 2 + - test/TEST-03-USR-MOUNT/hard-off.sh | 3 + - test/TEST-03-USR-MOUNT/test-init.sh | 31 +++++++ - test/TEST-03-USR-MOUNT/test.sh | 132 +++++++++++++++++++++++++++ - 8 files changed, 221 insertions(+) - create mode 100644 test/TEST-03-USR-MOUNT/99-idesymlinks.rules - create mode 100644 test/TEST-03-USR-MOUNT/Makefile - create mode 100755 test/TEST-03-USR-MOUNT/create-root.sh - create mode 100755 test/TEST-03-USR-MOUNT/cryptroot-ask.sh - create mode 100644 test/TEST-03-USR-MOUNT/fstab - create mode 100755 test/TEST-03-USR-MOUNT/hard-off.sh - create mode 100755 test/TEST-03-USR-MOUNT/test-init.sh - create mode 100755 test/TEST-03-USR-MOUNT/test.sh - -diff --git a/test/TEST-03-USR-MOUNT/99-idesymlinks.rules b/test/TEST-03-USR-MOUNT/99-idesymlinks.rules -new file mode 100644 -index 0000000..d557790 ---- /dev/null -+++ b/test/TEST-03-USR-MOUNT/99-idesymlinks.rules -@@ -0,0 +1,8 @@ -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" -diff --git a/test/TEST-03-USR-MOUNT/Makefile b/test/TEST-03-USR-MOUNT/Makefile -new file mode 100644 -index 0000000..bc0ddb6 ---- /dev/null -+++ b/test/TEST-03-USR-MOUNT/Makefile -@@ -0,0 +1,10 @@ -+all: -+ @make -s --no-print-directory -C ../.. all -+ @basedir=../.. testdir=../ ./test.sh --all -+setup: -+ @make --no-print-directory -C ../.. all -+ @basedir=../.. testdir=../ ./test.sh --setup -+clean: -+ @basedir=../.. testdir=../ ./test.sh --clean -+run: -+ @basedir=../.. testdir=../ ./test.sh --run -diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh -new file mode 100755 -index 0000000..6662bca ---- /dev/null -+++ b/test/TEST-03-USR-MOUNT/create-root.sh -@@ -0,0 +1,29 @@ -+#!/bin/sh -+# don't let udev and this script step on eachother's toes -+for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do -+ > "/etc/udev/rules.d/$x" -+done -+rm /etc/lvm/lvm.conf -+udevadm control --reload-rules -+set -e -+# save a partition at the beginning for future flagging purposes -+sfdisk -C 5120 -H 2 -S 32 -L /dev/sda </dev/sda1 -+sync -+poweroff -f -+ -diff --git a/test/TEST-03-USR-MOUNT/cryptroot-ask.sh b/test/TEST-03-USR-MOUNT/cryptroot-ask.sh -new file mode 100755 -index 0000000..db27c5b ---- /dev/null -+++ b/test/TEST-03-USR-MOUNT/cryptroot-ask.sh -@@ -0,0 +1,6 @@ -+#!/bin/sh -+ -+[ -b /dev/mapper/$2 ] && exit 0 -+echo -n test >/keyfile -+/sbin/cryptsetup luksOpen $1 $2 /dev/watchdog -+export PATH=/sbin:/bin:/usr/sbin:/usr/bin -+strstr() { [ "${1#*$2*}" != "$1" ]; } -+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) -+plymouth --quit -+exec /dev/console 2>&1 -+ -+ismounted() { -+ while read a m a; do -+ [ "$m" = "$1" ] && return 0 -+ done < /proc/mounts -+ return 1 -+} -+ -+if ismounted /usr; then -+ echo "dracut-root-block-success" >/dev/sdb -+fi -+export TERM=linux -+export PS1='initramfs-test:\w\$ ' -+[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab -+[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab -+stty sane -+echo "made it to the rootfs!" -+if strstr "$CMDLINE" "rd.shell"; then -+ strstr "$(setsid --help)" "control" && CTTY="-c" -+ setsid $CTTY sh -i -+fi -+echo "Powering down." -+mount -n -o remount,ro / -+poweroff -f -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -new file mode 100755 -index 0000000..34a120f ---- /dev/null -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -0,0 +1,132 @@ -+#!/bin/bash -+ -+TEST_DESCRIPTION="root filesystem on a btrfs filesystem with /usr subvolume" -+ -+KVERSION=${KVERSION-$(uname -r)} -+ -+# Uncomment this to debug failures -+#DEBUGFAIL="rd.shell rd.break" -+ -+client_run() { -+ local test_name="$1"; shift -+ local client_opts="$*" -+ -+ echo "CLIENT TEST START: $test_name" -+ -+ dd if=/dev/zero of=$TESTDIR/result bs=1M count=1 -+ $testdir/run-qemu \ -+ -hda $TESTDIR/root.btrfs \ -+ -hdb $TESTDIR/result \ -+ -m 256M -nographic \ -+ -net none -kernel /boot/vmlinuz-$KVERSION \ -+ -watchdog ib700 -watchdog-action poweroff \ -+ -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -initrd $TESTDIR/initramfs.testing -+ -+ if (($? != 0)); then -+ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" -+ return 1 -+ fi -+ -+ if ! grep -m 1 -q dracut-root-block-success $TESTDIR/result; then -+ echo "CLIENT TEST END: $test_name [FAILED]" -+ return 1 -+ fi -+ echo "CLIENT TEST END: $test_name [OK]" -+ -+} -+ -+test_run() { -+ client_run "no option specified, should fail" && return 1 -+ client_run "readonly root" "ro" || return 1 -+ client_run "writeable root" "rw" || return 1 -+ return 0 -+} -+ -+test_setup() { -+ rm -f $TESTDIR/root.btrfs -+ # Create the blank file to use as a root filesystem -+ dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=160 -+ -+ kernel=$KVERSION -+ # Create what will eventually be our root filesystem onto an overlay -+ ( -+ initdir=$TESTDIR/overlay/source -+ mkdir -p $initdir -+ . $basedir/dracut-functions.sh -+ dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -+ mount dmesg ifconfig dhclient mkdir cp ping dhclient \ -+ umount strace less setsid -+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do -+ [ -f ${_terminfodir}/l/linux ] && break -+ done -+ dracut_install -o ${_terminfodir}/l/linux -+ inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script" -+ inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" -+ dracut_install grep -+ inst_simple ./fstab /etc/fstab -+ inst ./test-init.sh /sbin/init -+ find_binary plymouth >/dev/null && dracut_install plymouth -+ (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) -+ cp -a /etc/ld.so.conf* $initdir/etc -+ sudo ldconfig -r "$initdir" -+ ) -+ -+ # second, install the files needed to make the root filesystem -+ ( -+ initdir=$TESTDIR/overlay -+ . $basedir/dracut-functions.sh -+ dracut_install sfdisk mkfs.btrfs btrfs poweroff cp umount sync -+ inst_hook initqueue 01 ./create-root.sh -+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -+ ) -+ -+ # create an initramfs that will create the target root filesystem. -+ # We do it this way so that we do not risk trashing the host mdraid -+ # devices, volume groups, encrypted partitions, etc. -+ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -+ -m "dash udev-rules btrfs base rootfs-block kernel-modules" \ -+ -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ -+ --nomdadmconf \ -+ --nohardlink \ -+ -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 -+ -+ # Invoke KVM and/or QEMU to actually create the target filesystem. -+ -+# echo $TESTDIR/overlay -+# echo $TESTDIR/initramfs.makeroot -+#exit 1 -+ rm -rf $TESTDIR/overlay -+ -+ $testdir/run-qemu \ -+ -hda $TESTDIR/root.btrfs \ -+ -m 256M -nographic -net none \ -+ -kernel "/boot/vmlinuz-$kernel" \ -+ -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -+ -initrd $TESTDIR/initramfs.makeroot || return 1 -+ grep -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 -+ -+ -+ ( -+ initdir=$TESTDIR/overlay -+ . $basedir/dracut-functions.sh -+ dracut_install poweroff shutdown -+ inst_hook emergency 000 ./hard-off.sh -+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -+ ) -+ sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -+ -a "debug watchdog" \ -+ -o "network" \ -+ -d "piix ide-gd_mod ata_piix btrfs sd_mod ib700wdt" \ -+ -f $TESTDIR/initramfs.testing $KVERSION || return 1 -+ -+ rm -rf $TESTDIR/overlay -+ -+# -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm" -+} -+ -+test_cleanup() { -+ return 0 -+} -+ -+. $testdir/test-functions diff --git a/0014-TEST-01-BASIC-grow-the-root-disk.patch b/0014-TEST-01-BASIC-grow-the-root-disk.patch deleted file mode 100644 index f344dc5..0000000 --- a/0014-TEST-01-BASIC-grow-the-root-disk.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 47057875e753786cc439be665859ae3ac0ee72a1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 12:14:12 +0200 -Subject: [PATCH] TEST-01-BASIC: grow the root disk - ---- - test/TEST-01-BASIC/create-root.sh | 2 +- - test/TEST-01-BASIC/test.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-01-BASIC/create-root.sh b/test/TEST-01-BASIC/create-root.sh -index 046bfb9..ce900ad 100755 ---- a/test/TEST-01-BASIC/create-root.sh -+++ b/test/TEST-01-BASIC/create-root.sh -@@ -7,7 +7,7 @@ rm /etc/lvm/lvm.conf - udevadm control --reload-rules - set -e - # save a partition at the beginning for future flagging purposes --sfdisk -C 1280 -H 2 -S 32 -L /dev/sda < -Date: Sat, 30 Jun 2012 12:15:04 +0200 -Subject: [PATCH] fs-lib/fs-lib.sh: skip fsck for xfs and btrfs. remount is - enough - ---- - modules.d/99fs-lib/fs-lib.sh | 28 +++++++++++++++------------- - 1 file changed, 15 insertions(+), 13 deletions(-) - -diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh -index d1b7a9d..b274935 100755 ---- a/modules.d/99fs-lib/fs-lib.sh -+++ b/modules.d/99fs-lib/fs-lib.sh -@@ -32,15 +32,17 @@ fsck_tail() { - # note: this function sets _drv of the caller - fsck_able() { - case "$1" in -- xfs) { -- type xfs_db && -- type xfs_repair && -- type xfs_check && -- type mount && -- type umount -- } >/dev/null 2>&1 && -- _drv="_drv=none fsck_drv_xfs" && -- return 0 -+ xfs) -+ # { -+ # type xfs_db && -+ # type xfs_repair && -+ # type xfs_check && -+ # type mount && -+ # type umount -+ # } >/dev/null 2>&1 && -+ # _drv="_drv=none fsck_drv_xfs" && -+ # return 0 -+ return 1 - ;; - ext?) - type e2fsck >/dev/null 2>&1 && -@@ -58,9 +60,10 @@ fsck_able() { - return 0 - ;; - btrfs) -- type btrfsck >/dev/null 2>&1 && -- _drv="_drv=none fsck_drv_btrfs" && -- return 0 -+ # type btrfsck >/dev/null 2>&1 && -+ # _drv="_drv=none fsck_drv_btrfs" && -+ # return 0 -+ return 1 - ;; - nfs*) - # nfs can be a nop, returning success -@@ -89,7 +92,6 @@ fsck_drv_btrfs() { - return 0 - } - -- - # common code for checkers that follow usual subset of options and return codes - fsck_drv_com() { - local _ret diff --git a/0016-rootfs-block-mount-root.sh-warn-if-ro-mount-failed-a.patch b/0016-rootfs-block-mount-root.sh-warn-if-ro-mount-failed-a.patch deleted file mode 100644 index ed2cd33..0000000 --- a/0016-rootfs-block-mount-root.sh-warn-if-ro-mount-failed-a.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 5113a3efff522664b85a75d67f674d218035696c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 12:15:42 +0200 -Subject: [PATCH] rootfs-block/mount-root.sh: warn if ro mount failed and - remount - -remount the root filesystem, if it was not unmounted ---- - modules.d/95rootfs-block/mount-root.sh | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 932571a..e61b0e8 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -29,7 +29,10 @@ mount_root() { - local _ret - # sanity - determine/fix fstype - rootfs=$(det_fs "${root#block:}" "$fstype") -- mount -t ${rootfs} -o "$rflags",ro "${root#block:}" "$NEWROOT" -+ while ! mount -t ${rootfs} -o "$rflags",ro "${root#block:}" "$NEWROOT"; do -+ warn "Failed to mount -t ${rootfs} -o $rflags,ro ${root#block:} $NEWROOT" -+ fsck_ask_err -+ done - - READONLY= - fsckoptions= -@@ -106,9 +109,11 @@ mount_root() { - # printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab - - ran_fsck=0 -- if [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] && \ -+ if fsck_able "$rootfs" && \ -+ [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] && \ - ! strstr "${rflags}" _netdev && \ - ! getargbool 0 rd.skipfsck; then -+ umount "$NEWROOT" - fsck_single "${root#block:}" "$rootfs" "$rflags" "$fsckoptions" - _ret=$? - [ $_ret -ne 255 ] && echo $_ret >/run/initramfs/root-fsck -@@ -117,8 +122,13 @@ mount_root() { - - echo "${root#block:} $NEWROOT $rootfs ${rflags:-defaults} 0 $rootfsck" >> /etc/fstab - -- info "Remounting ${root#block:} with -o ${rflags}" -- mount -o remount "$NEWROOT" 2>&1 | vinfo -+ if ! ismounted "$NEWROOT"; then -+ info "Mounting ${root#block:} with -o ${rflags}" -+ mount "$NEWROOT" 2>&1 | vinfo -+ else -+ info "Remounting ${root#block:} with -o ${rflags}" -+ mount -o remount "$NEWROOT" 2>&1 | vinfo -+ fi - - [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null - [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null diff --git a/0017-TEST-02-SYSTEMD-enlarge-the-root-disk.patch b/0017-TEST-02-SYSTEMD-enlarge-the-root-disk.patch deleted file mode 100644 index bbba865..0000000 --- a/0017-TEST-02-SYSTEMD-enlarge-the-root-disk.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1d59e3e592066bd739e8c34290b87fbe97310d0d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 30 Jun 2012 12:17:34 +0200 -Subject: [PATCH] TEST-02-SYSTEMD: enlarge the root disk - ---- - test/TEST-02-SYSTEMD/create-root.sh | 2 +- - test/TEST-02-SYSTEMD/test.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-02-SYSTEMD/create-root.sh b/test/TEST-02-SYSTEMD/create-root.sh -index 0e91ab5..fe2ce12 100755 ---- a/test/TEST-02-SYSTEMD/create-root.sh -+++ b/test/TEST-02-SYSTEMD/create-root.sh -@@ -7,7 +7,7 @@ rm /etc/lvm/lvm.conf - udevadm control --reload-rules - set -e - # save a partition at the beginning for future flagging purposes --sfdisk -C 1280 -H 2 -S 32 -L /dev/sda < -Date: Sat, 30 Jun 2012 12:46:55 +0200 -Subject: [PATCH] dracut-functions.sh: create $initdir, if it does not exist - ---- - dracut-functions.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 80b022f..eabbb0d 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -28,6 +28,10 @@ if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then - DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" - fi - -+if [[ $initdir ]] && ! [[ -d $initdir ]]; then -+ mkdir -p "$initdir" -+fi -+ - # Generic substring function. If $2 is in $1, return 0. - strstr() { [[ $1 = *$2* ]]; } - diff --git a/0019-dracut-install.c-for-lazy-install-shebangs-do-not-ch.patch b/0019-dracut-install.c-for-lazy-install-shebangs-do-not-ch.patch deleted file mode 100644 index 8d03b9d..0000000 --- a/0019-dracut-install.c-for-lazy-install-shebangs-do-not-ch.patch +++ /dev/null @@ -1,140 +0,0 @@ -From e74944eee578532bc7286b54ce5eccc715ed90c1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 2 Jul 2012 18:46:48 +0200 -Subject: [PATCH] dracut-install.c: for lazy install shebangs, do not check - for existence - ---- - install/dracut-install.c | 35 +++++++++++++++++++---------------- - 1 file changed, 19 insertions(+), 16 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 778881a..1d5748d 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -57,7 +57,7 @@ static char *destrootdir = NULL; - static Hashmap *items = NULL; - static Hashmap *items_failed = NULL; - --static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps); -+static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst); - - static size_t dir_len(char const *file) - { -@@ -260,7 +260,7 @@ static int resolve_deps(const char *src) - for (q = p; *q && (!isspace(*q)); q++) ; - *q = '\0'; - log_debug("Script install: '%s'", p); -- ret = dracut_install(p, p, false, true); -+ ret = dracut_install(p, p, false, true, false); - if (ret != 0) - log_error("ERROR: failed to install '%s'", p); - return ret; -@@ -287,7 +287,7 @@ static int resolve_deps(const char *src) - int r; - for (q = p; *q && *q != ' ' && *q != '\n'; q++) ; - *q = '\0'; -- r = dracut_install(p, p, false, false); -+ r = dracut_install(p, p, false, false, true); - if (r != 0) - log_error("ERROR: failed to install '%s' for '%s'", p, src); - else -@@ -301,7 +301,7 @@ static int resolve_deps(const char *src) - *q = '\0'; - - /* ignore errors for base lib symlink */ -- if (dracut_install(p, p, false, false) == 0) -+ if (dracut_install(p, p, false, false, true) == 0) - log_debug("Lib install: '%s'", p); - } - } -@@ -328,7 +328,7 @@ static int hmac_install(const char *src, const char *dst) - asprintf(&srchmacname, "%s/.%s.hmac", srcpath, &src[dlen + 1]); - asprintf(&dsthmacname, "%s/.%s.hmac", dstpath, &src[dlen + 1]); - log_debug("hmac cp '%s' '%s')", srchmacname, dsthmacname); -- dracut_install(srchmacname, dsthmacname, false, false); -+ dracut_install(srchmacname, dsthmacname, false, false, true); - free(dsthmacname); - free(srchmacname); - free(srcpath); -@@ -336,7 +336,7 @@ static int hmac_install(const char *src, const char *dst) - return 0; - } - --static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps) -+static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst) - { - struct stat sb, db; - char *dname = NULL; -@@ -356,11 +356,13 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - } - } - -- existing = hashmap_get(items, dst); -- if (existing) { -- if (strcmp(existing, dst) == 0) { -- log_debug("hash hit items for '%s'", dst); -- return 0; -+ if (hashdst) { -+ existing = hashmap_get(items, dst); -+ if (existing) { -+ if (strcmp(existing, dst) == 0) { -+ log_debug("hash hit items for '%s'", dst); -+ return 0; -+ } - } - } - -@@ -374,6 +376,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - } - } - -+ - i = strdup(dst); - hashmap_put(items, i, i); - -@@ -408,7 +411,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - log_debug("dest dir '%s' does not exist", fulldstdir); - dname = strdup(dst); - dname[dir_len(dname)] = '\0'; -- ret = dracut_install(dname, dname, true, false); -+ ret = dracut_install(dname, dname, true, false, true); - - free(dname); - -@@ -442,7 +445,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - if (abspath == NULL) - return 1; - -- if (dracut_install(abspath, abspath, false, resolvedeps)) { -+ if (dracut_install(abspath, abspath, false, resolvedeps, hashdst)) { - log_debug("'%s' install error", abspath); - return 1; - } -@@ -683,7 +686,7 @@ static int install_all(int argc, char **argv) - dest = strdup(newsrc); - - log_debug("dracut_install '%s'", newsrc); -- ret = dracut_install(newsrc, dest, arg_createdir, arg_resolvedeps); -+ ret = dracut_install(newsrc, dest, arg_createdir, arg_resolvedeps, true); - if (ret == 0) { - end = true; - log_debug("dracut_install '%s' OK", newsrc); -@@ -694,7 +697,7 @@ static int install_all(int argc, char **argv) - free(path); - } else { - char *dest = strdup(argv[i]); -- ret = dracut_install(argv[i], dest, arg_createdir, arg_resolvedeps); -+ ret = dracut_install(argv[i], dest, arg_createdir, arg_resolvedeps, true); - free(dest); - } - -@@ -764,7 +767,7 @@ int main(int argc, char **argv) - r = install_all(argc - optind, &argv[optind]); - } else { - /* simple "inst src dst" */ -- r = dracut_install(argv[optind], argv[optind + 1], arg_createdir, arg_resolvedeps); -+ r = dracut_install(argv[optind], argv[optind + 1], arg_createdir, arg_resolvedeps, true); - if ((r != 0) && (!arg_optional)) { - log_error("ERROR: installing '%s' to '%s'", argv[optind], argv[optind + 1]); - r = EXIT_FAILURE; diff --git a/0020-usrmount-mount-usr.sh-give-emergency_shell-if-usr-mo.patch b/0020-usrmount-mount-usr.sh-give-emergency_shell-if-usr-mo.patch deleted file mode 100644 index 5859478..0000000 --- a/0020-usrmount-mount-usr.sh-give-emergency_shell-if-usr-mo.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f225f180e363a42307dfcdb962e751476dd1a210 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 2 Jul 2012 18:51:20 +0200 -Subject: [PATCH] usrmount/mount-usr.sh: give emergency_shell if /usr mount - failed - ---- - modules.d/98usrmount/mount-usr.sh | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh -index 5cf4eb8..3173241 100755 ---- a/modules.d/98usrmount/mount-usr.sh -+++ b/modules.d/98usrmount/mount-usr.sh -@@ -74,17 +74,21 @@ mount_usr() - if [ "0" != "${_passno:-0}" ]; then - fsck_usr "$_dev" "$_fs" "$_opts" - _fsck_ret=$? -- echo $_fsck_ret >/run/initramfs/usr-fsck -+ [ $_fsck_ret -ne 255 ] && echo $_fsck_ret >/run/initramfs/usr-fsck - fi - fi -- if [ $_fsck_ret -ne 255 ]; then -- if getargbool 0 rd.usrmount.ro; then -- info "Mounting /usr (read-only forced)" -- mount -r "$NEWROOT/usr" 2>&1 | vinfo -- else -- info "Mounting /usr" -- mount "$NEWROOT/usr" 2>&1 | vinfo -- fi -+ if getargbool 0 rd.usrmount.ro; then -+ info "Mounting /usr (read-only forced)" -+ mount -r "$NEWROOT/usr" 2>&1 | vinfo -+ else -+ info "Mounting /usr" -+ mount "$NEWROOT/usr" 2>&1 | vinfo -+ fi -+ if ! ismounted /usr; then -+ warn "Mounting /usr to $NEWROOT/usr failed" -+ warn "*** Dropping you to a shell; the system will continue" -+ warn "*** when you leave the shell." -+ emergency_shell - fi - fi - } diff --git a/0021-dracut-functions.sh-forgot-set-version-kernel-for-mo.patch b/0021-dracut-functions.sh-forgot-set-version-kernel-for-mo.patch deleted file mode 100644 index 9e6a224..0000000 --- a/0021-dracut-functions.sh-forgot-set-version-kernel-for-mo.patch +++ /dev/null @@ -1,24 +0,0 @@ -From ec61f0a3af894d2498d696464f12da2d500b9f39 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 2 Jul 2012 22:14:49 +0200 -Subject: [PATCH] dracut-functions.sh: forgot --set-version $kernel for - modprobe - ---- - dracut-functions.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index eabbb0d..2898c30 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1201,7 +1201,8 @@ dracut_kernel_post() { - local _moddirname=${srcmods%%/lib/modules/*} - - if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then -- xargs -r modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ -+ xargs -r modprobe -a ${_moddirname+-d ${_moddirname}/} \ -+ --ignore-install --show-depends --set-version $kernel \ - < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" 2>/dev/null \ - | sort -u \ - | while read _cmd _modpath _options; do diff --git a/0022-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch b/0022-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch deleted file mode 100644 index ebc58ce..0000000 --- a/0022-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 194b80f974751b2eb5e6f50075d150b9c8083b77 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 2 Jul 2012 22:51:24 +0200 -Subject: [PATCH] dracut-functions.sh:find_kernel_modules_by_path() fixed - hostonly part - -filter /sys/module/* modules by path ---- - dracut-functions.sh | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 2898c30..6de7c72 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1277,7 +1277,11 @@ find_kernel_modules_by_path () ( - IFS=$_OLDIFS - else - ( cd /sys/module; echo *; ) \ -- | xargs -r modinfo -F filename -k $kernel 2>/dev/null -+ | xargs -r modinfo -F filename -k $kernel 2>/dev/null \ -+ | while read a; do -+ [[ $a = kernel*/$1/* ]] || continue -+ echo $srcmods/$a -+ done - fi - return 0 - ) diff --git a/0023-base-init.sh-error-out-early-if-dev-proc-or-sys-cann.patch b/0023-base-init.sh-error-out-early-if-dev-proc-or-sys-cann.patch deleted file mode 100644 index 122e1cc..0000000 --- a/0023-base-init.sh-error-out-early-if-dev-proc-or-sys-cann.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c204501e3eaf31a69ef69aa567f5d3c88f69c66a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 13:14:12 +0200 -Subject: [PATCH] base/init.sh: error out early, if /dev, /proc or /sys cannot - be mounted - ---- - modules.d/99base/init.sh | 25 ++++++++++++++++++++----- - 1 file changed, 20 insertions(+), 5 deletions(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index d395a99..3eb6424 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -20,14 +20,22 @@ export PATH - RD_DEBUG="" - . /lib/dracut-lib.sh - --trap "emergency_shell Signal caught!" 0 -- - # mount some important things - [ ! -d /proc/self ] && \ -- mount -t proc -o nosuid,noexec,nodev proc /proc >/dev/null 2>&1 -+ mount -t proc -o nosuid,noexec,nodev proc /proc >/dev/null -+ -+if [ "$?" != "0" ]; then -+ echo "Cannot mount proc on /proc! Compile the kernel with CONFIG_PROC_FS!" -+ exit 1 -+fi - - [ ! -d /sys/kernel ] && \ -- mount -t sysfs -o nosuid,noexec,nodev sysfs /sys >/dev/null 2>&1 -+ mount -t sysfs -o nosuid,noexec,nodev sysfs /sys >/dev/null -+ -+if [ "$?" != "0" ]; then -+ echo "Cannot mount sysfs on /sys! Compile the kernel with CONFIG_SYSFS!" -+ exit 1 -+fi - - if [ -x /lib/systemd/systemd-timestamp ]; then - RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp) -@@ -39,7 +47,12 @@ fi - setdebug - - if ! ismounted /dev; then -- mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null -+ mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null -+fi -+ -+if ! ismounted /dev; then -+ echo "Cannot mount devtmpfs on /dev! Compile the kernel with CONFIG_DEVTMPFS!" -+ exit 1 - fi - - # prepare the /dev directory -@@ -66,6 +79,8 @@ if ! ismounted /run; then - rm -fr /newrun - fi - -+trap "emergency_shell Signal caught!" 0 -+ - [ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs - - UDEVVERSION=$(udevadm --version) diff --git a/0024-add-lsinitrd-and-mkinitrd-man-pages.patch b/0024-add-lsinitrd-and-mkinitrd-man-pages.patch deleted file mode 100644 index e6fe5a3..0000000 --- a/0024-add-lsinitrd-and-mkinitrd-man-pages.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 0e14946a2032040899d792cf8eefd5db341074c8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 14:18:55 +0200 -Subject: [PATCH] add lsinitrd and mkinitrd man pages - ---- - Makefile | 14 ++++++++++--- - dracut.spec | 2 ++ - lsinitrd.1.asc | 43 +++++++++++++++++++++++++++++++++++++ - mkinitrd.8.asc | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 120 insertions(+), 3 deletions(-) - create mode 100644 lsinitrd.1.asc - create mode 100644 mkinitrd.8.asc - -diff --git a/Makefile b/Makefile -index 1d5531d..78cf85d 100644 ---- a/Makefile -+++ b/Makefile -@@ -9,7 +9,12 @@ sysconfdir ?= ${prefix}/etc - bindir ?= ${prefix}/bin - mandir ?= ${prefix}/share/man - --manpages = dracut.8 dracut.cmdline.7 dracut.conf.5 dracut-catimages.8 -+manpages = dracut.8 \ -+ dracut.cmdline.7 \ -+ dracut.conf.5 \ -+ dracut-catimages.8 \ -+ lsinitrd.1 \ -+ mkinitrd.8 - - .PHONY: install clean archive rpm testimage test all check AUTHORS doc - -@@ -55,7 +60,7 @@ install: doc dracut-version.sh - mkdir -p $(DESTDIR)$(bindir) - mkdir -p $(DESTDIR)$(sysconfdir) - mkdir -p $(DESTDIR)$(pkglibdir)/modules.d -- mkdir -p $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 -+ mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 - install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut - install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages - install -m 0755 mkinitrd-dracut.sh $(DESTDIR)$(bindir)/mkinitrd -@@ -68,8 +73,11 @@ install: doc dracut-version.sh - install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh - install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore - cp -arx modules.d $(DESTDIR)$(pkglibdir) -+ install -m 0644 lsinitrd.1 $(DESTDIR)$(mandir)/man1/lsinitrd.1 -+ install -m 0644 mkdinitrd.8 $(DESTDIR)$(mandir)/man8/mkinitrd.8 - install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8 -- install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8/dracut-catimages.8 -+ install -m 0644 dracut-catimages.8 \ -+ $(DESTDIR)$(mandir)/man8/dracut-catimages.8 - install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5/dracut.conf.5 - install -m 0644 dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.cmdline.7 - ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 -diff --git a/dracut.spec b/dracut.spec -index 06d8139..b258121 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -255,9 +255,11 @@ rm -rf $RPM_BUILD_ROOT - %endif - %dir /etc/dracut.conf.d - %{_mandir}/man8/dracut.8* -+%{_mandir}/man8/mkinitrd.8* - %{_mandir}/man7/dracut.kernel.7* - %{_mandir}/man7/dracut.cmdline.7* - %{_mandir}/man5/dracut.conf.5* -+%{_mandir}/man1/lsinitrd.1* - %{dracutlibdir}/modules.d/00bootchart - %{dracutlibdir}/modules.d/00dash - %{dracutlibdir}/modules.d/04watchdog -diff --git a/lsinitrd.1.asc b/lsinitrd.1.asc -new file mode 100644 -index 0000000..5b0c62e ---- /dev/null -+++ b/lsinitrd.1.asc -@@ -0,0 +1,43 @@ -+LSINITRD(1) -+========= -+:doctype: manpage -+:man source: dracut -+:man manual: dracut -+ -+NAME -+---- -+lsinitrd - tool to show the contents of an initramfs image -+ -+SYNOPSIS -+-------- -+*lsinit* ['OPTION...'] [] -+ -+DESCRIPTION -+----------- -+lsinitrd shows the contents of an initramfs image. if is omitted, then -+lsinitrd uses the default image /boot/initramfs-.img. -+ -+OPTIONS -+------- -+**-h, --help**:: -+ print a help message and exit. -+ -+**-s, --size**:: -+ sort the contents of the initramfs by size. -+ -+AVAILABILITY -+------------ -+The lsinitrd command is part of the dracut package and is available from -+link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org] -+ -+AUTHORS -+------- -+Harald Hoyer -+ -+Amerigo Wang -+ -+Nikoli -+ -+SEE ALSO -+-------- -+*dracut*(8) -diff --git a/mkinitrd.8.asc b/mkinitrd.8.asc -new file mode 100644 -index 0000000..2792915 ---- /dev/null -+++ b/mkinitrd.8.asc -@@ -0,0 +1,64 @@ -+MKINITRD(8) -+========= -+:doctype: manpage -+:man source: dracut -+:man manual: dracut -+ -+NAME -+---- -+mkinitrd - is a compat wrapper, which calls dracut to generate an initramfs -+ -+SYNOPSIS -+-------- -+*mkinitrd* ['OPTION...'] [] -+ -+DESCRIPTION -+----------- -+mkinitrd creates an initramfs image for the kernel with -+version by calling "dracut". -+ -+If a more fine grained control over the resulting image is needed, -+"dracut" should be called directly. -+ -+OPTIONS -+------- -+**--version**:: -+ print info about the version -+ -+**-v, --verbose**:: -+ increase verbosity level -+ -+**-f, --force**:: -+ overwrite existing initramfs file. -+ -+**--image-version*:: -+ append the kernel version to the target image -+ -. -+ -+**--with=**:: -+ add the kernel module to the initramfs. -+ -+**--preload=**:: -+ preload the kernel module in the initramfs before any other kernel -+ modules are loaded. This can be used to ensure a certain device naming, which -+ should in theory be avoided and the use of symbolic links in /dev is -+ encouraged. -+ -+**--nocompress**:: -+ do not compress the resulting image. -+ -+**--help**:: -+ print a help message and exit. -+ -+AVAILABILITY -+------------ -+The mkinitrd command is part of the dracut package and is available from -+link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org] -+ -+AUTHORS -+------- -+Harald Hoyer -+ -+SEE ALSO -+-------- -+*dracut*(8) diff --git a/0025-manpages-simplify-AUTHORS.patch b/0025-manpages-simplify-AUTHORS.patch deleted file mode 100644 index 4727834..0000000 --- a/0025-manpages-simplify-AUTHORS.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 9f355169f454987405fcb79dc3eba6a280981a8c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 14:20:14 +0200 -Subject: [PATCH] manpages: simplify AUTHORS - ---- - dracut.8.asc | 24 ++++++++---------------- - dracut.cmdline.7.asc | 3 +-- - 2 files changed, 9 insertions(+), 18 deletions(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 196e2e8..3c0efb9 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -364,29 +364,21 @@ link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org] - - AUTHORS - ------- --*Harald Hoyer*:: -- Project Leader and Developer -+Harald Hoyer - --*Victor Lowther*:: -- Developer -+Victor Lowther - --*Philippe Seewer*:: -- Developer -+Philippe Seewer - --*Warren Togami*:: -- Developer -+Warren Togami - --*Amadeusz Żołnowski*:: -- Developer -+Amadeusz Żołnowski - --*Jeremy Katz*:: -- Developer -+Jeremy Katz - --*David Dillow*:: -- Developer -+David Dillow - --*Will Woods*:: -- Developer -+Will Woods - - SEE ALSO - -------- -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 3bfb53a..997c513 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -650,8 +650,7 @@ _/etc/cmdline.d/*.conf_:: - - AUTHOR - ------ --*Harald Hoyer*:: -- Project Leader and Developer -+Harald Hoyer - - SEE ALSO - -------- diff --git a/0026-dracut.sh-use-getopt-to-parse-arguments.patch b/0026-dracut.sh-use-getopt-to-parse-arguments.patch deleted file mode 100644 index 9c2689f..0000000 --- a/0026-dracut.sh-use-getopt-to-parse-arguments.patch +++ /dev/null @@ -1,365 +0,0 @@ -From ffa71b4afa3e8865ab4f068f908ff8e05744a6ee Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 14:20:51 +0200 -Subject: [PATCH] dracut.sh: use getopt to parse arguments - -now we can put options and arguments anywhere we like. - -e.g. -$ dracut test.img --force ---- - dracut.sh | 233 ++++++++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 169 insertions(+), 64 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 4a6d5c7..c1be619 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -24,7 +24,7 @@ - # - - # store for logging --dracut_args="$@" -+dracut_args=( "$@" ) - - set -o pipefail - -@@ -36,7 +36,32 @@ usage() { - - # 80x25 linebreak here ^ - cat << EOF --Usage: $0 [OPTION]... -+Usage: $0 [OPTION]... [ []] -+ -+Version: $DRACUT_VERSION -+ -+Creates initial ramdisk images for preloading modules -+ -+ -h, --help Display all options -+ -+If a [LIST] has multiple arguments, then you have to put these in quotes. -+ -+For example: -+ -+ # dracut --add-drivers "module1 module2" ... -+ -+EOF -+} -+ -+long_usage() { -+ [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut -+ if [[ -f $dracutbasedir/dracut-version.sh ]]; then -+ . $dracutbasedir/dracut-version.sh -+ fi -+ -+# 80x25 linebreak here ^ -+ cat << EOF -+Usage: $0 [OPTION]... [ []] - - Version: $DRACUT_VERSION - -@@ -139,8 +164,11 @@ Creates initial ramdisk images for preloading modules - --sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module) - - If [LIST] has multiple arguments, then you have to put these in quotes. -+ - For example: --# dracut --add-drivers "module1 module2" ... -+ -+ # dracut --add-drivers "module1 module2" ... -+ - EOF - } - -@@ -151,9 +179,10 @@ EOF - # example: - # push stack 1 2 "3 4" - push() { -+ local _i - local __stack=$1; shift -- for i in "$@"; do -- eval ${__stack}'[${#'${__stack}'[@]}]="$i"' -+ for _i in "$@"; do -+ eval ${__stack}'[${#'${__stack}'[@]}]="$_i"' - done - } - -@@ -169,16 +198,16 @@ push() { - pop() { - local __stack=$1; shift - local __resultvar=$1 -- local myresult; -+ local _value; - # check for empty stack - eval '[[ ${#'${__stack}'[@]} -eq 0 ]] && return 1' - -- eval myresult='${'${__stack}'[${#'${__stack}'[@]}-1]}' -+ eval _value='${'${__stack}'[${#'${__stack}'[@]}-1]}' - - if [[ "$__resultvar" ]]; then -- eval $__resultvar="'$myresult'" -+ eval $__resultvar="'$_value'" - else -- echo "$myresult" -+ echo "$_value" - fi - eval unset ${__stack}'[${#'${__stack}'[@]}-1]' - return 0 -@@ -202,52 +231,105 @@ read_arg() { - fi - } - --# Little helper function for reading args from the commandline to a stack. --# it automatically handles -a b and -a=b variants, and returns 1 if --# we need to shift $3. --push_arg() { -- # $1 = arg name -- # $2 = arg value -- # $3 = arg parameter -- local rematch='^[^=]*=(.*)$' -- if [[ $2 =~ $rematch ]]; then -- push "$1" "${BASH_REMATCH[1]}" -- else -- push "$1" "$3" -- # There is no way to shift our callers args, so -- # return 1 to indicate they should do it instead. -- return 1 -- fi --} -- - verbosity_mod_l=0 - unset kernel - unset outfile - --while (($# > 0)); do -- case ${1%%=*} in -- -a|--add) push_arg add_dracutmodules_l "$@" || shift;; -- --force-add) push_arg force_add_dracutmodules_l "$@" || shift;; -- --add-drivers) push_arg add_drivers_l "$@" || shift;; -- --omit-drivers) push_arg omit_drivers_l "$@" || shift;; -- -m|--modules) push_arg dracutmodules_l "$@" || shift;; -- -o|--omit) push_arg omit_dracutmodules_l "$@" || shift;; -- -d|--drivers) push_arg drivers_l "$@" || shift;; -- --filesystems) push_arg filesystems_l "$@" || shift;; -- -I|--install) push_arg install_items_l "$@" || shift;; -- --fwdir) push_arg fw_dir_l "$@" || shift;; -- --libdirs) push_arg libdirs_l "$@" || shift;; -- --fscks) push_arg fscks_l "$@" || shift;; -- --add-fstab) push_arg add_fstab_l "$@" || shift;; -- --mount) push_arg fstab_lines "$@" || shift;; -+# Workaround -i, --include taking 2 arguments -+set -- "${@/--include/++include}" -+ -+# This prevents any long argument ending with "-i" -+# -i, like --opt-i but I think we can just prevent that -+set -- "${@/%-i/++include}" -+ -+TEMP=$(unset POSIXLY_CORRECT; getopt \ -+ -o "a:m:o:d:I:k:c:L:fvqlHhM" \ -+ --long add: \ -+ --long force-add: \ -+ --long add-drivers: \ -+ --long omit-drivers: \ -+ --long modules: \ -+ --long omit: \ -+ --long drivers: \ -+ --long filesystems: \ -+ --long install: \ -+ --long fwdir: \ -+ --long libdirs: \ -+ --long fscks: \ -+ --long add-fstab: \ -+ --long mount: \ -+ --long nofscks: \ -+ --long kmoddir: \ -+ --long conf: \ -+ --long confdir: \ -+ --long tmpdir: \ -+ --long stdlog: \ -+ --long compress: \ -+ --long prefix: \ -+ --long force \ -+ --long kernel-only \ -+ --long no-kernel \ -+ --long strip \ -+ --long nostrip \ -+ --long hardlink \ -+ --long nohardlink \ -+ --long noprefix \ -+ --long mdadmconf \ -+ --long nomdadmconf \ -+ --long lvmconf \ -+ --long nolvmconf \ -+ --long debug \ -+ --long profile \ -+ --long sshkey: \ -+ --long verbose \ -+ --long quiet \ -+ --long local \ -+ --long hostonly \ -+ --long no-hostonly \ -+ --long fstab \ -+ --long help \ -+ --long bzip2 \ -+ --long lzma \ -+ --long xz \ -+ --long no-compress \ -+ --long gzip \ -+ --long list-modules \ -+ --long show-modules \ -+ --long keep \ -+ --long printsize \ -+ -- "$@") -+ -+if (( $? != 0 )); then -+ usage -+ exit 1 -+fi -+ -+eval set -- "$TEMP" -+ -+while :; do -+ case $1 in -+ -a|--add) push add_dracutmodules_l "$2"; shift;; -+ --force-add) push force_add_dracutmodules_l "$2"; shift;; -+ --add-drivers) push add_drivers_l "$2"; shift;; -+ --omit-drivers) push omit_drivers_l "$2"; shift;; -+ -m|--modules) push dracutmodules_l "$2"; shift;; -+ -o|--omit) push omit_dracutmodules_l "$2"; shift;; -+ -d|--drivers) push drivers_l "$2"; shift;; -+ --filesystems) push filesystems_l "$2"; shift;; -+ -I|--install) push install_items_l "$2"; shift;; -+ --fwdir) push fw_dir_l "$2"; shift;; -+ --libdirs) push libdirs_l "$2"; shift;; -+ --fscks) push fscks_l "$2"; shift;; -+ --add-fstab) push add_fstab_l "$2"; shift;; -+ --mount) push fstab_lines "$2"; shift;; - --nofscks) nofscks_l="yes";; -- -k|--kmoddir) read_arg drivers_dir_l "$@" || shift;; -- -c|--conf) read_arg conffile "$@" || shift;; -- --confdir) read_arg confdir "$@" || shift;; -- --tmpdir) read_arg tmpdir_l "$@" || shift;; -- -L|--stdlog) read_arg stdloglvl_l "$@" || shift;; -- --compress) read_arg compress_l "$@" || shift;; -- --prefix) read_arg prefix_l "$@" || shift;; -+ -k|--kmoddir) drivers_dir_l="$2"; shift;; -+ -c|--conf) conffile="$2"; shift;; -+ --confdir) confdir="$2"; shift;; -+ --tmpdir) tmpdir_l="$2"; shift;; -+ -L|--stdlog) stdloglvl_l="$2"; shift;; -+ --compress) compress_l="$2"; shift;; -+ --prefix) prefix_l="$2"; shift;; - -f|--force) force=yes;; - --kernel-only) kernel_only="yes"; no_kernel="no";; - --no-kernel) kernel_only="no"; no_kernel="yes";; -@@ -262,7 +344,7 @@ while (($# > 0)); do - --nolvmconf) lvmconf_l="no";; - --debug) debug="yes";; - --profile) profile="yes";; -- --sshkey) read_arg sshkey "$@" || shift;; -+ --sshkey) sshkey="$2"; shift;; - -v|--verbose) ((verbosity_mod_l++));; - -q|--quiet) ((verbosity_mod_l--));; - -l|--local) -@@ -273,48 +355,67 @@ while (($# > 0)); do - -H|--hostonly) hostonly_l="yes" ;; - --no-hostonly) hostonly_l="no" ;; - --fstab) use_fstab_l="yes" ;; -- -h|--help) usage; exit 1 ;; -+ -h|--help) long_usage; exit 1 ;; - -i|--include) push include_src "$2" -- push include_target "$3" -- shift 2;; -+ shift;; - --bzip2) compress_l="bzip2";; - --lzma) compress_l="lzma";; - --xz) compress_l="xz";; - --no-compress) _no_compress_l="cat";; - --gzip) compress_l="gzip";; -- --list-modules) -- do_list="yes"; -- ;; -+ --list-modules) do_list="yes";; - -M|--show-modules) - show_modules_l="yes" - ;; - --keep) keep="yes";; - --printsize) printsize="yes";; -- -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; -+ -+ --) shift; break;; -+ -+ *) # should not even reach this point -+ printf "\n!Unknown option: '%s'\n\n" "$1" >&2; usage; exit 1;; -+ esac -+ shift -+done -+ -+# getopt cannot handle multiple arguments, so just handle "-I,--include" -+# the old fashioned way -+ -+while (($# > 0)); do -+ case ${1%%=*} in -+ ++include) push include_src "$2" -+ push include_target "$3" -+ shift 2;; - *) - if ! [[ ${outfile+x} ]]; then - outfile=$1 - elif ! [[ ${kernel+x} ]]; then - kernel=$1 - else -- echo "Unknown argument: $1" -+ printf "\nUnknown arguments: %s\n\n" "$*" >&2 - usage; exit 1; - fi - ;; - esac - shift - done -+ - if ! [[ $kernel ]]; then - kernel=$(uname -r) - fi --[[ $outfile ]] || outfile="/boot/initramfs-$kernel.img" -+ -+if ! [[ $outfile ]]; then -+ outfile="/boot/initramfs-$kernel.img" -+fi - - for i in /usr/sbin /sbin /usr/bin /bin; do - rl=$i - if [ -L "$i" ]; then - rl=$(readlink -f $i) - fi -- NPATH+=":$rl" -+ if [[ "$NPATH" != "*:$rl*" ]] ; then -+ NPATH+=":$rl" -+ fi - done - export PATH="${NPATH#:}" - unset NPATH -@@ -536,8 +637,12 @@ done - omit_drivers="${omit_drivers_corrected%|}" - unset omit_drivers_corrected - -- --ddebug "Executing $0 $dracut_args" -+# prepare args for logging -+for ((i=0; i < ${#dracut_args[@]}; i++)); do -+ strstr "${dracut_args[$i]}" " " && \ -+ dracut_args[$i]="\"${dracut_args[$i]}\"" -+done -+ddebug "Executing: $0 ${dracut_args[@]}" - - [[ $do_list = yes ]] && { - for mod in $dracutbasedir/modules.d/*; do -@@ -573,7 +678,7 @@ if [[ ! -d "$outdir" ]]; then - dfatal "Can't write $outfile: Directory $outdir does not exist." - exit 1 - elif [[ ! -w "$outdir" ]]; then -- dfatal "No permission to write $outdir." -+ dfatal "No permission to write to $outdir." - exit 1 - elif [[ -f "$outfile" && ! -w "$outfile" ]]; then - dfatal "No permission to write $outfile." diff --git a/0027-usrmount-mount-usr.sh-check-the-right-path-with-ismo.patch b/0027-usrmount-mount-usr.sh-check-the-right-path-with-ismo.patch deleted file mode 100644 index ac49480..0000000 --- a/0027-usrmount-mount-usr.sh-check-the-right-path-with-ismo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From f0e10d9351be491f5ff703b6ba4ed230a5673609 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:20:46 +0200 -Subject: [PATCH] usrmount/mount-usr.sh: check the right path with ismounted - ---- - modules.d/98usrmount/mount-usr.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh -index 3173241..c277d74 100755 ---- a/modules.d/98usrmount/mount-usr.sh -+++ b/modules.d/98usrmount/mount-usr.sh -@@ -84,7 +84,7 @@ mount_usr() - info "Mounting /usr" - mount "$NEWROOT/usr" 2>&1 | vinfo - fi -- if ! ismounted /usr; then -+ if ! ismounted "$NEWROOT/usr"; then - warn "Mounting /usr to $NEWROOT/usr failed" - warn "*** Dropping you to a shell; the system will continue" - warn "*** when you leave the shell." diff --git a/0028-TEST-03-USR-MOUNT-change-test-to-use-a-seperate-disk.patch b/0028-TEST-03-USR-MOUNT-change-test-to-use-a-seperate-disk.patch deleted file mode 100644 index d6a4c86..0000000 --- a/0028-TEST-03-USR-MOUNT-change-test-to-use-a-seperate-disk.patch +++ /dev/null @@ -1,105 +0,0 @@ -From a128f03b305aebdce6a99a6b027c17ed58a1648e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:21:54 +0200 -Subject: [PATCH] TEST-03-USR-MOUNT: change test to use a seperate disk - ---- - test/TEST-03-USR-MOUNT/create-root.sh | 14 ++++++++++++-- - test/TEST-03-USR-MOUNT/fstab | 2 +- - test/TEST-03-USR-MOUNT/test-init.sh | 2 +- - test/TEST-03-USR-MOUNT/test.sh | 8 ++++++-- - 4 files changed, 20 insertions(+), 6 deletions(-) - -diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh -index 6662bca..9a3e561 100755 ---- a/test/TEST-03-USR-MOUNT/create-root.sh -+++ b/test/TEST-03-USR-MOUNT/create-root.sh -@@ -12,13 +12,23 @@ sfdisk -C 5120 -H 2 -S 32 -L /dev/sda </dev/sdb -+ echo "dracut-root-block-success" >/dev/sdc - fi - export TERM=linux - export PS1='initramfs-test:\w\$ ' -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index 34a120f..d966c3c 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -16,7 +16,8 @@ client_run() { - dd if=/dev/zero of=$TESTDIR/result bs=1M count=1 - $testdir/run-qemu \ - -hda $TESTDIR/root.btrfs \ -- -hdb $TESTDIR/result \ -+ -hdb $TESTDIR/usr.btrfs \ -+ -hdc $TESTDIR/result \ - -m 256M -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -watchdog ib700 -watchdog-action poweroff \ -@@ -37,7 +38,7 @@ client_run() { - } - - test_run() { -- client_run "no option specified, should fail" && return 1 -+ client_run "no option specified" || return 1 - client_run "readonly root" "ro" || return 1 - client_run "writeable root" "rw" || return 1 - return 0 -@@ -45,8 +46,10 @@ test_run() { - - test_setup() { - rm -f $TESTDIR/root.btrfs -+ rm -f $TESTDIR/usr.btrfs - # Create the blank file to use as a root filesystem - dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=160 -+ dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=160 - - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay -@@ -100,6 +103,7 @@ test_setup() { - - $testdir/run-qemu \ - -hda $TESTDIR/root.btrfs \ -+ -hdb $TESTDIR/usr.btrfs \ - -m 256M -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ - -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ diff --git a/0029-TEST-30-ISCSI-put-back-in-hard-off.sh-for-tests.patch b/0029-TEST-30-ISCSI-put-back-in-hard-off.sh-for-tests.patch deleted file mode 100644 index f708c77..0000000 --- a/0029-TEST-30-ISCSI-put-back-in-hard-off.sh-for-tests.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 38bbec3731b8e7b6b130debb4eed43bbdab75dea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:22:29 +0200 -Subject: [PATCH] TEST-30-ISCSI: put back in hard-off.sh for tests - ---- - test/TEST-30-ISCSI/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index cf4b6ec..5ebd9ac 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -155,7 +155,7 @@ test_setup() { - initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown --# inst_hook emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ diff --git a/0030-lsinitrd.sh-print-usage-for-h.patch b/0030-lsinitrd.sh-print-usage-for-h.patch deleted file mode 100644 index 220e0a9..0000000 --- a/0030-lsinitrd.sh-print-usage-for-h.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f7bccf3724834ca42b2521f0367291219314a09a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:23:27 +0200 -Subject: [PATCH] lsinitrd.sh: print usage for -?, -h - ---- - lsinitrd.sh | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index e6767dc..f27f755 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -19,13 +19,19 @@ - # along with this program. If not, see . - # - --[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [-s] [ []]" ; exit 1 ; } -+usage() -+{ -+ echo "Usage: $(basename $0) [-s] [ []]" -+} -+ -+[[ $# -le 2 ]] || { usage ; exit 1 ; } - - sorted=0 - while getopts "s" opt; do - case $opt in - s) sorted=1;; -- \?) exit 1;; -+ h) usage; exit 0;; -+ \?) usage; exit 1;; - esac - done - shift $((OPTIND-1)) diff --git a/0031-lsinitrd.sh-get-rid-of-awk-call.patch b/0031-lsinitrd.sh-get-rid-of-awk-call.patch deleted file mode 100644 index 08037e2..0000000 --- a/0031-lsinitrd.sh-get-rid-of-awk-call.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d8caa679e06e779a04e2353cfeab80de47477d2a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:23:59 +0200 -Subject: [PATCH] lsinitrd.sh: get rid of awk call - ---- - lsinitrd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index f27f755..fc4b8b0 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -63,7 +63,7 @@ if [[ $# -eq 2 ]]; then - exit $? - fi - --echo "$image: $(du -h $image | awk '{print $1}')" -+echo "$image: $(du -h $image | while read a b; do echo $a;done)" - echo "========================================================================" - $CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null - echo "========================================================================" diff --git a/0032-lsinitrd.sh-fixed-version-file-extraction.patch b/0032-lsinitrd.sh-fixed-version-file-extraction.patch deleted file mode 100644 index 34d7fee..0000000 --- a/0032-lsinitrd.sh-fixed-version-file-extraction.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a85ee030ab6b3b29833b10be6b83c89e8fc0c455 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 3 Jul 2012 18:24:21 +0200 -Subject: [PATCH] lsinitrd.sh: fixed version file extraction - ---- - lsinitrd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index fc4b8b0..a844932 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -65,7 +65,7 @@ fi - - echo "$image: $(du -h $image | while read a b; do echo $a;done)" - echo "========================================================================" --$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null -+$CAT "$image" | cpio --extract --verbose --quiet --to-stdout '*lib/dracut/dracut-*' 2>/dev/null - echo "========================================================================" - if [ "$sorted" -eq 1 ]; then - $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 diff --git a/0033-Makefile-mkinitrd-man-page-install-typo.patch b/0033-Makefile-mkinitrd-man-page-install-typo.patch deleted file mode 100644 index 6d4f9ef..0000000 --- a/0033-Makefile-mkinitrd-man-page-install-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From eaf4cb6bbb6367c967d1af3a00af5be3eba98a56 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 06:57:11 +0200 -Subject: [PATCH] Makefile: mkinitrd man page install typo - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 78cf85d..07741d0 100644 ---- a/Makefile -+++ b/Makefile -@@ -74,7 +74,7 @@ install: doc dracut-version.sh - install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore - cp -arx modules.d $(DESTDIR)$(pkglibdir) - install -m 0644 lsinitrd.1 $(DESTDIR)$(mandir)/man1/lsinitrd.1 -- install -m 0644 mkdinitrd.8 $(DESTDIR)$(mandir)/man8/mkinitrd.8 -+ install -m 0644 mkinitrd.8 $(DESTDIR)$(mandir)/man8/mkinitrd.8 - install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8 - install -m 0644 dracut-catimages.8 \ - $(DESTDIR)$(mandir)/man8/dracut-catimages.8 diff --git a/0034-fips-change-module-list.patch b/0034-fips-change-module-list.patch deleted file mode 100644 index e4d787c..0000000 --- a/0034-fips-change-module-list.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0251fcd4003501f5a6a50fa31d640f4bf307c3de Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 10:11:27 +0200 -Subject: [PATCH] fips: change module list - ---- - modules.d/01fips/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index 3a35c9b..dbf51e3 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -13,7 +13,7 @@ depends() { - installkernel() { - local _fipsmodules _mod - _fipsmodules="aead aes_generic xts aes-x86_64 ansi_cprng cbc ccm chainiv ctr" -- _fipsmodules+=" des deflate ecb eseqiv hmac seqiv sha256 sha512" -+ _fipsmodules+=" des deflate ecb eseqiv hmac seqiv sha256_generic sha512" - _fipsmodules+=" cryptomgr crypto_null tcrypt dm-mod dm-crypt" - - mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/0035-i18n-module-setup.sh-s-error-info-if-no-keymap-is-co.patch b/0035-i18n-module-setup.sh-s-error-info-if-no-keymap-is-co.patch deleted file mode 100644 index dd7f98e..0000000 --- a/0035-i18n-module-setup.sh-s-error-info-if-no-keymap-is-co.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 394ffc1d979d47d6ec4c0419ea13e98e1b781bd5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 10:28:56 +0200 -Subject: [PATCH] i18n/module-setup.sh: s/error/info if no keymap is - configured - -https://bugzilla.redhat.com/show_bug.cgi?id=836418 ---- - modules.d/10i18n/module-setup.sh | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh -index a7ddc82..a1cf1c8 100755 ---- a/modules.d/10i18n/module-setup.sh -+++ b/modules.d/10i18n/module-setup.sh -@@ -74,9 +74,11 @@ install() { - for map in ${item[1]//,/ } - do - map=(${map//-/ }) -- value=$(grep "^${map[0]}=" "${item[0]}") -- value=${value#*=} -- echo "${map[1]:-${map[0]}}=${value}" -+ if [[ -f "${item[0]}" ]]; then -+ value=$(grep "^${map[0]}=" "${item[0]}") -+ value=${value#*=} -+ echo "${map[1]:-${map[0]}}=${value}" -+ fi - done - done - } -@@ -155,9 +157,10 @@ install() { - EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE} - - [[ ${KEYMAP} ]] || { -- derror 'No KEYMAP.' -+ dinfo 'No KEYMAP configured.' - return 1 - } -+ - findkeymap ${KEYMAP} - - for map in ${EXT_KEYMAPS} diff --git a/0036-fips-add-instmods-silent-check-mode-c-s.patch b/0036-fips-add-instmods-silent-check-mode-c-s.patch deleted file mode 100644 index 3fd83d1..0000000 --- a/0036-fips-add-instmods-silent-check-mode-c-s.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 338b43cd6a97cf767af2953ce5c69240d4c32290 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 10:42:22 +0200 -Subject: [PATCH] fips: add instmods silent check mode "-c -s" - ---- - dracut-functions.sh | 18 ++++++++++++------ - modules.d/01fips/module-setup.sh | 4 ++-- - 2 files changed, 14 insertions(+), 8 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 6de7c72..d91e2a4 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1290,8 +1290,8 @@ find_kernel_modules () { - find_kernel_modules_by_path drivers - } - --# instmods [-c] [ ... ] --# instmods [-c] -+# instmods [-c [-s]] [ ... ] -+# instmods [-c [-s]] - # install kernel modules along with all their dependencies. - # can be e.g. "=block" or "=drivers/usb/storage" - instmods() { -@@ -1299,11 +1299,17 @@ instmods() { - # called [sub]functions inherit _fderr - local _fderr=9 - local _check=no -+ local _silent=no - if [[ $1 = '-c' ]]; then - _check=yes - shift - fi - -+ if [[ $1 = '-s' ]]; then -+ _silent=yes -+ shift -+ fi -+ - function inst1mod() { - local _ret=0 _mod="$1" - case $_mod in -@@ -1362,8 +1368,8 @@ instmods() { - if (($# == 0)); then # filenames from stdin - while read _mod; do - inst1mod "${_mod%.ko*}" || { -- if [ "$_check" = "yes" ]; then -- dfatal "Failed to install $_mod" -+ if [[ "$_check" == "yes" ]]; then -+ [[ "$_silent" == "no" ]] && dfatal "Failed to install $_mod" - return 1 - fi - } -@@ -1371,8 +1377,8 @@ instmods() { - fi - while (($# > 0)); do # filenames as arguments - inst1mod ${1%.ko*} || { -- if [ "$_check" = "yes" ]; then -- dfatal "Failed to install $1" -+ if [[ "$_check" == "yes" ]]; then -+ [[ "$_silent" == "no" ]] && dfatal "Failed to install $1" - return 1 - fi - } -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index dbf51e3..2d238fb 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -13,13 +13,13 @@ depends() { - installkernel() { - local _fipsmodules _mod - _fipsmodules="aead aes_generic xts aes-x86_64 ansi_cprng cbc ccm chainiv ctr" -- _fipsmodules+=" des deflate ecb eseqiv hmac seqiv sha256_generic sha512" -+ _fipsmodules+=" des deflate ecb eseqiv hmac seqiv sha256 sha256_generic sha512 sha512_generic" - _fipsmodules+=" cryptomgr crypto_null tcrypt dm-mod dm-crypt" - - mkdir -m 0755 -p "${initdir}/etc/modprobe.d" - - for _mod in $_fipsmodules; do -- if hostonly='' instmods $_mod; then -+ if hostonly='' instmods -c -s $_mod; then - echo $_mod >> "${initdir}/etc/fipsmodules" - echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf" - fi diff --git a/0037-install-user-group-adm-for-journal.patch b/0037-install-user-group-adm-for-journal.patch deleted file mode 100644 index b4bb47b..0000000 --- a/0037-install-user-group-adm-for-journal.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d04f16f60047b3d4c52fb4799aa34462f7fe62b7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 14:30:45 +0200 -Subject: [PATCH] install user/group adm for journal - ---- - modules.d/98systemd/module-setup.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index d712724..d20d18d 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -101,6 +101,11 @@ install() { - fi - fi - -+ # install adm user/group for journald -+ dracut_install nologin -+ egrep '^adm:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" -+ egrep '^adm:' /etc/group >> "$initdir/etc/group" -+ - ln -fs $systemdutildir/systemd "$initdir/init" - - rm -f "${initdir}${systemdsystemunitdir}/emergency.service" diff --git a/0038-network-factor-out-parse_ifname_opts-for-ifname-genr.patch b/0038-network-factor-out-parse_ifname_opts-for-ifname-genr.patch deleted file mode 100644 index fd3b63b..0000000 --- a/0038-network-factor-out-parse_ifname_opts-for-ifname-genr.patch +++ /dev/null @@ -1,75 +0,0 @@ -From e7dc1e42cdf519c20c9f104153ef778462fcdbd9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 5 Jul 2012 12:54:13 +0200 -Subject: [PATCH] network: factor out parse_ifname_opts() for ifname-genrules - ---- - modules.d/40network/ifname-genrules.sh | 2 ++ - modules.d/40network/net-lib.sh | 16 ++++++++++++++++ - modules.d/40network/parse-ifname.sh | 16 +--------------- - 3 files changed, 19 insertions(+), 15 deletions(-) - -diff --git a/modules.d/40network/ifname-genrules.sh b/modules.d/40network/ifname-genrules.sh -index e188c88..b0b429c 100755 ---- a/modules.d/40network/ifname-genrules.sh -+++ b/modules.d/40network/ifname-genrules.sh -@@ -7,6 +7,8 @@ if ! getarg ifname= >/dev/null ; then - return - fi - -+command -v parse_ifname_opts >/dev/null || . /lib/net-lib.sh -+ - { - for p in $(getargs ifname=); do - parse_ifname_opts $p -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 9132e4d..9a1e004 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -289,3 +289,19 @@ ip_to_var() { - esac - fi - } -+ -+parse_ifname_opts() { -+ local IFS=: -+ set $1 -+ -+ case $# in -+ 7) -+ ifname_if=$1 -+ # udev requires MAC addresses to be lower case -+ ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/') -+ ;; -+ *) -+ die "Invalid arguments for ifname=" -+ ;; -+ esac -+} -diff --git a/modules.d/40network/parse-ifname.sh b/modules.d/40network/parse-ifname.sh -index ce73a72..d5156b3 100755 ---- a/modules.d/40network/parse-ifname.sh -+++ b/modules.d/40network/parse-ifname.sh -@@ -18,21 +18,7 @@ if ! getarg ifname= >/dev/null ; then - return - fi - --parse_ifname_opts() { -- local IFS=: -- set $1 -- -- case $# in -- 7) -- ifname_if=$1 -- # udev requires MAC addresses to be lower case -- ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/') -- ;; -- *) -- die "Invalid arguments for ifname=" -- ;; -- esac --} -+command -v parse_ifname_opts >/dev/null || . /lib/net-lib.sh - - # Check ifname= lines - for p in $(getargs ifname=); do diff --git a/0039-systemd-exit-with-sane-state.patch b/0039-systemd-exit-with-sane-state.patch deleted file mode 100644 index cb1efd8..0000000 --- a/0039-systemd-exit-with-sane-state.patch +++ /dev/null @@ -1,123 +0,0 @@ -From f1e9f613d9eea3105e906c114266d283ac898d44 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:28:17 +0200 -Subject: [PATCH] systemd: exit with sane state - ---- - modules.d/98systemd/dracut-cmdline.sh | 6 ++++-- - modules.d/98systemd/dracut-initqueue.sh | 6 ++++-- - modules.d/98systemd/dracut-pre-pivot.sh | 6 ++++-- - modules.d/98systemd/dracut-pre-trigger.sh | 6 ++++-- - modules.d/98systemd/dracut-pre-udev.sh | 6 ++++-- - 5 files changed, 20 insertions(+), 10 deletions(-) - -diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh -index e1a75ea..6a44815 100755 ---- a/modules.d/98systemd/dracut-cmdline.sh -+++ b/modules.d/98systemd/dracut-cmdline.sh -@@ -8,9 +8,10 @@ NEWROOT="/sysroot" - [ -d /run/lock ] || mkdir -p -m 0755 /run/lock - - if [ -f /dracut-state.sh ]; then -- . /dracut-state.sh || : -+ . /dracut-state.sh 2>/dev/null - fi --. /lib/dracut-lib.sh -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - source_conf /etc/conf.d - - # run scriptlets to parse the command line -@@ -23,3 +24,4 @@ source_hook cmdline - export root rflags fstype netroot NEWROOT - - export -p > /dracut-state.sh -+exit 0 -diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh -index 03f1c9b..bc63582 100755 ---- a/modules.d/98systemd/dracut-initqueue.sh -+++ b/modules.d/98systemd/dracut-initqueue.sh -@@ -3,9 +3,10 @@ - # ex: ts=8 sw=4 sts=4 et filetype=sh - - if [ -f /dracut-state.sh ]; then -- . /dracut-state.sh || : -+ . /dracut-state.sh 2>/dev/null - fi --. /lib/dracut-lib.sh -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - source_conf /etc/conf.d - - getarg 'rd.break=initqueue' 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" -@@ -106,3 +107,4 @@ done - export -p > /dracut-state.sh - - systemctl isolate initrd-switch-root.target -+exit 0 -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 89d7e6d..29a8248 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -3,9 +3,10 @@ - # ex: ts=8 sw=4 sts=4 et filetype=sh - - if [ -f /dracut-state.sh ]; then -- . /dracut-state.sh || : -+ . /dracut-state.sh 2>/dev/null - fi --. /lib/dracut-lib.sh -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - source_conf /etc/conf.d - - # pre pivot scripts are sourced just before we doing cleanup and switch over -@@ -49,3 +50,4 @@ getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_r - cp -avr /lib/systemd/system/dracut*.service /run/systemd/system/ - - export -p > /dracut-state.sh -+exit 0 -diff --git a/modules.d/98systemd/dracut-pre-trigger.sh b/modules.d/98systemd/dracut-pre-trigger.sh -index 9521eaa..52ecfaf 100755 ---- a/modules.d/98systemd/dracut-pre-trigger.sh -+++ b/modules.d/98systemd/dracut-pre-trigger.sh -@@ -3,9 +3,10 @@ - # ex: ts=8 sw=4 sts=4 et filetype=sh - - if [ -f /dracut-state.sh ]; then -- . /dracut-state.sh || : -+ . /dracut-state.sh 2>/dev/null - fi --. /lib/dracut-lib.sh -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - source_conf /etc/conf.d - - getargbool 0 rd.udev.info -y rdudevinfo && udevadm control --log-priority=info -@@ -17,3 +18,4 @@ source_hook pre-trigger - udevadm control --reload >/dev/null 2>&1 || : - - export -p > /dracut-state.sh -+exit 0 -diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh -index 3b5ac37..2566ab9 100755 ---- a/modules.d/98systemd/dracut-pre-udev.sh -+++ b/modules.d/98systemd/dracut-pre-udev.sh -@@ -3,9 +3,10 @@ - # ex: ts=8 sw=4 sts=4 et filetype=sh - - if [ -f /dracut-state.sh ]; then -- . /dracut-state.sh || : -+ . /dracut-state.sh 2>/dev/null - fi --. /lib/dracut-lib.sh -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - source_conf /etc/conf.d - - # pre pivot scripts are sourced just before we doing cleanup and switch over -@@ -14,3 +15,4 @@ getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Br - source_hook pre-udev - - export -p > /dracut-state.sh -+exit 0 diff --git a/0040-dracut.asc-add-lsinitrd-and-mkinitrd.patch b/0040-dracut.asc-add-lsinitrd-and-mkinitrd.patch deleted file mode 100644 index 65ec320..0000000 --- a/0040-dracut.asc-add-lsinitrd-and-mkinitrd.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e5efb6a798788195e2c1154deb582abf2dc0c6f5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:29:44 +0200 -Subject: [PATCH] dracut.asc: add lsinitrd and mkinitrd - ---- - dracut.asc | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/dracut.asc b/dracut.asc -index 6d93379..e1f756c 100644 ---- a/dracut.asc -+++ b/dracut.asc -@@ -1022,6 +1022,12 @@ include::dracut.conf.5.asc[] - [[dracutcmdline7]] - include::dracut.cmdline.7.asc[] - -+[[lsinitrd1]] -+include::lsinitrd.1.asc[] -+ -+[[mkinitrd8]] -+include::mkinitrd.8.asc[] -+ - :leveloffset: 0 - [appendix] - License diff --git a/0041-dracut.8.asc-fixup-NOTE-sections.patch b/0041-dracut.8.asc-fixup-NOTE-sections.patch deleted file mode 100644 index a8d5a7d..0000000 --- a/0041-dracut.8.asc-fixup-NOTE-sections.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 18595cede8d84212bc8f9055f5710f97998ed165 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:30:03 +0200 -Subject: [PATCH] dracut.8.asc: fixup NOTE sections - ---- - dracut.8.asc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 3c0efb9..619fcaf 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -46,7 +46,7 @@ example: - **-o, --omit** __:: - omit a space-separated list of dracut modules. This parameter can be - specified multiple times. -- -++ - [NOTE] - =============================== - If [LIST] has multiple arguments, then you have to put these in quotes. For -@@ -130,7 +130,7 @@ example: - specify a space-separated list of kernel filesystem modules to exclusively - include in the generic initramfs. This parameter can be specified multiple - times. -- -++ - [NOTE] - =============================== - If [LIST] has multiple arguments, then you have to put these in quotes. For -@@ -273,7 +273,6 @@ provide a valid _/etc/fstab_. - =============================== - If [LIST] has multiple arguments, then you have to put these in quotes. For - example: --+ - ---- - # dracut --install "/bin/foo /sbin/bar" ... - ---- diff --git a/0042-dracut.cmdline.7.asc-fixup.patch b/0042-dracut.cmdline.7.asc-fixup.patch deleted file mode 100644 index a4205a1..0000000 --- a/0042-dracut.cmdline.7.asc-fixup.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 5d0404e3b373f29b80f4383fdd87a8525537d6e1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:30:50 +0200 -Subject: [PATCH] dracut.cmdline.7.asc: fixup - ---- - dracut.cmdline.7.asc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 997c513..5f0396c 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -65,7 +65,8 @@ rootfstype=ext3 - do not honor special mount options for the root filesystem found in - _/etc/fstab_ of the real root. - --**resume=**__ -+**resume=**__:: -+ resume from a swap partition - + - E.g.: - + diff --git a/0043-network-do-not-rename-other-interfaces-and-document-.patch b/0043-network-do-not-rename-other-interfaces-and-document-.patch deleted file mode 100644 index 0ab40b6..0000000 --- a/0043-network-do-not-rename-other-interfaces-and-document-.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 1760dfc051dfd84e932dbd63ba2b3c7e8b6ecf50 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:31:31 +0200 -Subject: [PATCH] network: do not rename other interfaces and document the - ifname usage - -We do not support renaming in the kernel namespace anymore (as udev does -that not anymore). So, if a user wants to use ifname, he has to rename -to a custom namespace. "eth[0-9]+" is not allowed anymore. ---- - dracut.cmdline.7.asc | 49 +++++++++++++++++++++++++------- - modules.d/40network/ifname-genrules.sh | 7 +---- - modules.d/40network/net-genrules.sh | 4 +-- - modules.d/40network/net-lib.sh | 10 +++++++ - modules.d/95fcoe/fcoe-genrules.sh | 2 +- - 5 files changed, 53 insertions(+), 19 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 5f0396c..755d641 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -295,24 +295,51 @@ Network - **ip=**__:_{dhcp|on|any|dhcp6|auto6}_[:[__][:__]]:: - This parameter can be specified multiple times. - + -+===================== - dhcp|on|any|dhcp6::: get ip from dhcp server on a specific interface - auto6::: do IPv6 autoconfiguration --::: optionally set on the -+::: optionally **set** on the . This -+cannot be used in conjunction with the **ifname** argument for the -+same . -+===================== -+ -+[IMPORTANT] -+===================== -+It is recommended to either bind to a MAC with the **ifname** -+argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location. -+ -+em::: for embedded NICs -+p#_::: for cards in PCI slots -+===================== - - **ip=**__:__:__:__:__:__:_{none|off|dhcp|on|any|dhcp6|auto6|ibft}_[:[__][:__]]:: - explicit network configuration. If you want do define a IPv6 address, put it - in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple - times. - + --::: optionally set on the -+===================== -+::: optionally **set** on the . This -+cannot be used in conjunction with the **ifname** argument for the -+same . -+===================== -+ -+[IMPORTANT] -+===================== -+It is recommended to either bind to a MAC with the **ifname** -+argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location. -+ -+em::: for embedded NICs -+p#_::: for cards in PCI slots -+===================== - - **ifname=**__:__:: -- Assign network device name (ie eth0) to the NIC with MAC . -- Note: If you use this option you _must_ specify an ifname= argument for all -- interfaces used in ip= or fcoe= arguments. However, if the interface in -- ip= or fcoe= is a bridge, bonding or vlan interface, you should specify -- an ifname= for _each_ of its underlying interfaces. This parameter can be -- specified multiple times. -+ Assign network device name (ie "bootnet") to the NIC with MAC . -++ -+[IMPORTANT] -+ -+Do **not** use the default kernel naming scheme for the interface name, -+as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the -+interface name. Better name it "bootnet" or "bluesocket". - - **bootdev=**__:: - specify network interface to use routing and netroot information from. -@@ -430,8 +457,10 @@ FCoE - **fcoe=**__:_{dcb|nodcb}_:: - Try to connect to a FCoE SAN through the NIC specified by __ or - __ or EDD settings. For the second argument, currently only nodcb is -- supported. This parameter can be specified multiple times. Note: letters in -- the MAC-address must be lowercase! -+ supported. This parameter can be specified multiple times. -++ -+[NOTE] -+letters in the MAC-address must be lowercase! - - NBD - ~~~ -diff --git a/modules.d/40network/ifname-genrules.sh b/modules.d/40network/ifname-genrules.sh -index b0b429c..d5f8b0f 100755 ---- a/modules.d/40network/ifname-genrules.sh -+++ b/modules.d/40network/ifname-genrules.sh -@@ -15,9 +15,4 @@ command -v parse_ifname_opts >/dev/null || . /lib/net-lib.sh - printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1", NAME="%s"\n' "$ifname_mac" "$ifname_if" - done - -- # Rename non named interfaces out of the way for named ones. -- for p in $(getargs ifname=); do -- parse_ifname_opts $p -- printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{type}=="1", NAME!="?*", KERNEL=="%s", NAME="%%k-renamed"\n' "$ifname_if" -- done --} > /etc/udev/rules.d/50-ifname.rules -+} >> /etc/udev/rules.d/80-ifname.rules -diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh -index 3bb5d80..8aeee2d 100755 ---- a/modules.d/40network/net-genrules.sh -+++ b/modules.d/40network/net-genrules.sh -@@ -54,7 +54,7 @@ fix_bootif() { - - # Default: We don't know the interface to use, handle all - else -- printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" > /etc/udev/rules.d/61-default-net.rules -+ printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" > /etc/udev/rules.d/91-default-net.rules - fi - --} > /etc/udev/rules.d/60-net.rules -+} > /etc/udev/rules.d/90-net.rules -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 9a1e004..641b21e 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -304,4 +304,14 @@ parse_ifname_opts() { - die "Invalid arguments for ifname=" - ;; - esac -+ -+ case $ifname_if in -+ eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]|eth[0-9][0-9][0-9][0-9]) -+ warn "ifname=$ifname_if uses the kernel name space for interfaces" -+ warn "This can fail for multiple network interfaces and is discouraged!" -+ warn "Please use a custom name like \"netboot\" or \"bluesocket\"" -+ warn "or use biosdevname and no ifname= at all." -+ ;; -+ esac -+ - } -diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh -index d87f72c..80894ed 100755 ---- a/modules.d/95fcoe/fcoe-genrules.sh -+++ b/modules.d/95fcoe/fcoe-genrules.sh -@@ -13,4 +13,4 @@ - else - printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb" - fi --} > /etc/udev/rules.d/60-fcoe.rules -+} > /etc/udev/rules.d/92-fcoe.rules diff --git a/0044-mkinitrd.8.asc-mark-paragraph-as-important.patch b/0044-mkinitrd.8.asc-mark-paragraph-as-important.patch deleted file mode 100644 index 140f4c6..0000000 --- a/0044-mkinitrd.8.asc-mark-paragraph-as-important.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 528864e4604599e446950817ce7eaeaafa844930 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:42:06 +0200 -Subject: [PATCH] mkinitrd.8.asc: mark paragraph as important - ---- - mkinitrd.8.asc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mkinitrd.8.asc b/mkinitrd.8.asc -index 2792915..25661c8 100644 ---- a/mkinitrd.8.asc -+++ b/mkinitrd.8.asc -@@ -17,6 +17,7 @@ DESCRIPTION - mkinitrd creates an initramfs image for the kernel with - version by calling "dracut". - -+[IMPORTANT] - If a more fine grained control over the resulting image is needed, - "dracut" should be called directly. - diff --git a/0045-network-ifname-genrules.sh-check-for-multiple-ifname.patch b/0045-network-ifname-genrules.sh-check-for-multiple-ifname.patch deleted file mode 100644 index b65dcfb..0000000 --- a/0045-network-ifname-genrules.sh-check-for-multiple-ifname.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f1e7add2bf74b836bc29d20df2e4e53638e49936 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 12:57:17 +0200 -Subject: [PATCH] network/ifname-genrules.sh: check for multiple ifname= lines - ---- - modules.d/40network/ifname-genrules.sh | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/modules.d/40network/ifname-genrules.sh b/modules.d/40network/ifname-genrules.sh -index d5f8b0f..3cf4be7 100755 ---- a/modules.d/40network/ifname-genrules.sh -+++ b/modules.d/40network/ifname-genrules.sh -@@ -12,7 +12,23 @@ command -v parse_ifname_opts >/dev/null || . /lib/net-lib.sh - { - for p in $(getargs ifname=); do - parse_ifname_opts $p -+ -+ if [ -f /tmp/ifname-$ifname_mac ]; then -+ read oldif < /tmp/ifname-$ifname_mac -+ fi -+ if [ -f /tmp/ifname-$ifname_if ]; then -+ read oldmac < /tmp/ifname-$ifname_if -+ fi -+ if [ -n "$oldif" -a -n "$oldmac" -a "$oldif" = "$ifname_if" -a "$oldmac" = "$ifname_mac" ]; then -+ # skip same ifname= declaration -+ continue -+ fi -+ -+ [ -n "$oldif" ] && warn "Multiple interface names specified for MAC $ifname_mac: $oldif" -+ [ -n "$oldmac" ] && warn "Multiple MAC specified for $ifname_if: $oldmac" -+ - printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1", NAME="%s"\n' "$ifname_mac" "$ifname_if" -+ echo $ifname_if > /tmp/ifname-$ifname_mac -+ echo $ifname_mac > /tmp/ifname-$ifname_if - done -- - } >> /etc/udev/rules.d/80-ifname.rules diff --git a/0046-dracut.sh-keep-vim-syntax-highlighting-happy.patch b/0046-dracut.sh-keep-vim-syntax-highlighting-happy.patch deleted file mode 100644 index 6330a21..0000000 --- a/0046-dracut.sh-keep-vim-syntax-highlighting-happy.patch +++ /dev/null @@ -1,21 +0,0 @@ -From a421016671d59d99d182194223e83a6a616dedf2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 13:48:05 +0200 -Subject: [PATCH] dracut.sh: keep vim syntax highlighting happy - ---- - dracut.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.sh b/dracut.sh -index c1be619..db2e33b 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -641,6 +641,7 @@ unset omit_drivers_corrected - for ((i=0; i < ${#dracut_args[@]}; i++)); do - strstr "${dracut_args[$i]}" " " && \ - dracut_args[$i]="\"${dracut_args[$i]}\"" -+ #" keep vim happy - done - ddebug "Executing: $0 ${dracut_args[@]}" - diff --git a/0047-systemd-check-that-prefix-does-not-contain-run.patch b/0047-systemd-check-that-prefix-does-not-contain-run.patch deleted file mode 100644 index 5c5d7a0..0000000 --- a/0047-systemd-check-that-prefix-does-not-contain-run.patch +++ /dev/null @@ -1,55 +0,0 @@ -From e09048aaf5cbc6c98fc03bdf89250e5c0e70f8c0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 13:49:03 +0200 -Subject: [PATCH] systemd: check, that --prefix= does not contain /run - -systemd will mount /run before dracut has a chance to copy over the -original content. ---- - dracut.sh | 3 ++- - modules.d/98systemd/module-setup.sh | 10 +++++++--- - 2 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index db2e33b..0b43f44 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -779,7 +779,8 @@ export initdir dracutbasedir dracutmodules drivers \ - use_fstab fstab_lines libdirs fscks nofscks \ - stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ - debug host_fs_types host_devs sshkey add_fstab \ -- DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir -+ DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir \ -+ prefix - - # Create some directory structure first - [[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}" -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index d20d18d..b2111a9 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -4,10 +4,9 @@ - - check() { - [[ $mount_needs ]] && return 1 -- if [[ -x /lib/systemd/systemd ]] || [[ -x /usr/lib/systemd/systemd ]]; then -- return 255 -+ if [[ -x $systemdutildir/systemd ]]; then -+ return 255 - fi -- [[ $systemdutildir ]] && return 255 - - return 1 - } -@@ -17,6 +16,11 @@ depends() { - } - - install() { -+ if strstr "$prefix" "/run/"; then -+ dfatal "systemd does not work a prefix, which contains \"/run\"!!" -+ exit 1 -+ fi -+ - dracut_install -o \ - $systemdutildir/systemd \ - $systemdutildir/systemd-cgroups-agent \ diff --git a/0048-fixed-bash-sh-requirements.patch b/0048-fixed-bash-sh-requirements.patch deleted file mode 100644 index 87156cb..0000000 --- a/0048-fixed-bash-sh-requirements.patch +++ /dev/null @@ -1,81 +0,0 @@ -From e1619ee151b20549dc5c6112a5715df58db7b108 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 14:06:05 +0200 -Subject: [PATCH] fixed bash/sh requirements - ---- - modules.d/90btrfs/btrfs_finished.sh | 2 +- - modules.d/90btrfs/btrfs_timeout.sh | 2 +- - modules.d/90livenet/fetch-liveupdate.sh | 2 +- - modules.d/90livenet/livenetroot.sh | 2 +- - modules.d/90livenet/module-setup.sh | 2 +- - modules.d/99img-lib/module-setup.sh | 3 +-- - 6 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/modules.d/90btrfs/btrfs_finished.sh b/modules.d/90btrfs/btrfs_finished.sh -index 7e87dec..5e7691a 100755 ---- a/modules.d/90btrfs/btrfs_finished.sh -+++ b/modules.d/90btrfs/btrfs_finished.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - -diff --git a/modules.d/90btrfs/btrfs_timeout.sh b/modules.d/90btrfs/btrfs_timeout.sh -index 84f7997..cd64443 100755 ---- a/modules.d/90btrfs/btrfs_timeout.sh -+++ b/modules.d/90btrfs/btrfs_timeout.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - -diff --git a/modules.d/90livenet/fetch-liveupdate.sh b/modules.d/90livenet/fetch-liveupdate.sh -index 88aa2b1..024feaa 100755 ---- a/modules.d/90livenet/fetch-liveupdate.sh -+++ b/modules.d/90livenet/fetch-liveupdate.sh -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - # fetch-liveupdate - fetch an update image for dmsquash-live media. - # this gets called by the "initqueue/online" hook for each network interface - # that comes online. -diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh -index 617be62..1bbee55 100755 ---- a/modules.d/90livenet/livenetroot.sh -+++ b/modules.d/90livenet/livenetroot.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # livenetroot - fetch a live image from the network and run it - - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -diff --git a/modules.d/90livenet/module-setup.sh b/modules.d/90livenet/module-setup.sh -index 265f29e..4249655 100755 ---- a/modules.d/90livenet/module-setup.sh -+++ b/modules.d/90livenet/module-setup.sh -@@ -6,7 +6,7 @@ check() { - } - - depends() { -- echo network url-lib dmsquash-live -+ echo network url-lib dmsquash-live img-lib - return 0 - } - -diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh -index 9ff5d7c..ebd0436 100755 ---- a/modules.d/99img-lib/module-setup.sh -+++ b/modules.d/99img-lib/module-setup.sh -@@ -13,8 +13,7 @@ depends() { - } - - install() { -- # NOTE/TODO: we require bash, but I don't know how to specify that.. -- dracut_install tar gzip dd -+ dracut_install tar gzip dd bash - # TODO: make this conditional on a cmdline flag / config option - dracut_install -o cpio xz bzip2 - inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh" diff --git a/0049-dracut.spec-dracut.conf.d-fedora.conf.example-no-das.patch b/0049-dracut.spec-dracut.conf.d-fedora.conf.example-no-das.patch deleted file mode 100644 index 6cde37e..0000000 --- a/0049-dracut.spec-dracut.conf.d-fedora.conf.example-no-das.patch +++ /dev/null @@ -1,56 +0,0 @@ -From d96c3254e8bbe56763617f45f1148d81b10f4745 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 14:22:10 +0200 -Subject: [PATCH] dracut.spec,dracut.conf.d/fedora.conf.example: no dash - -hard remove dash from supported modules - -we do not want to have anything to do with dash bugs ---- - dracut.conf.d/fedora.conf.example | 7 +++---- - dracut.spec | 4 +++- - 2 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index 25b5cfa..ee53844 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -2,13 +2,12 @@ - - # i18n - i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP" --omit_dracutmodules+=" dash " - omit_drivers+=" .*/fs/ocfs/.* " --add_dracutmodules+=" systemd " - stdloglvl=3 --realinitpath="/usr/lib/systemd/systemd" - install_items+=" vi /etc/virc ps grep cat rm " --prefix="/" -+readonly prefix="/" - systemdutildir=/usr/lib/systemd - systemdsystemunitdir=/usr/lib/systemd/system - udevdir=/usr/lib/udev -+add_dracutmodules+=" systemd " -+realinitpath="/usr/lib/systemd/systemd" -diff --git a/dracut.spec b/dracut.spec -index b258121..a6fec89 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -190,6 +190,9 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips - rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni - %endif - -+# we do not support dash in the initramfs -+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash -+ - # remove gentoo specific modules - rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash - -@@ -261,7 +264,6 @@ rm -rf $RPM_BUILD_ROOT - %{_mandir}/man5/dracut.conf.5* - %{_mandir}/man1/lsinitrd.1* - %{dracutlibdir}/modules.d/00bootchart --%{dracutlibdir}/modules.d/00dash - %{dracutlibdir}/modules.d/04watchdog - %{dracutlibdir}/modules.d/05busybox - %{dracutlibdir}/modules.d/10i18n diff --git a/0050-systemd-module-setup.sh-also-include-systemd-udevd-u.patch b/0050-systemd-module-setup.sh-also-include-systemd-udevd-u.patch deleted file mode 100644 index 629ab0b..0000000 --- a/0050-systemd-module-setup.sh-also-include-systemd-udevd-u.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 995487641743afebd84f1476c3d32120e7e357ae Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 6 Jul 2012 14:33:53 +0200 -Subject: [PATCH] systemd/module-setup.sh: also include systemd-udevd* units - -systemd-udev* was renamed to systemd-udevd* ---- - modules.d/98systemd/module-setup.sh | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index b2111a9..60e1be2 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -55,7 +55,9 @@ install() { - $systemdsystemunitdir/systemd-shutdownd.socket \ - $systemdsystemunitdir/systemd-ask-password-console.path \ - $systemdsystemunitdir/systemd-udev-control.socket \ -+ $systemdsystemunitdir/systemd-udevd-control.socket \ - $systemdsystemunitdir/systemd-udev-kernel.socket \ -+ $systemdsystemunitdir/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/systemd-ask-password-plymouth.path \ - $systemdsystemunitdir/systemd-journald.socket \ - $systemdsystemunitdir/systemd-initctl.service \ -@@ -67,8 +69,11 @@ install() { - $systemdsystemunitdir/kexec.service \ - $systemdsystemunitdir/fsck@.service \ - $systemdsystemunitdir/systemd-udev.service \ -+ $systemdsystemunitdir/systemd-udevd.service \ - $systemdsystemunitdir/systemd-udev-trigger.service \ -+ $systemdsystemunitdir/systemd-udevd-trigger.service \ - $systemdsystemunitdir/systemd-udev-settle.service \ -+ $systemdsystemunitdir/systemd-udevd-settle.service \ - $systemdsystemunitdir/systemd-ask-password-plymouth.service \ - $systemdsystemunitdir/systemd-journald.service \ - $systemdsystemunitdir/systemd-vconsole-setup.service \ -@@ -79,10 +84,14 @@ install() { - $systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-udev-control.socket \ -+ $systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-udev-kernel.socket \ -+ $systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udev.service \ -+ $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ -+ $systemdsystemunitdir/sysinit.target.wants/systemd-udevd-trigger.service \ - $systemdsystemunitdir/ctrl-alt-del.target \ - $systemdsystemunitdir/single.service \ - $systemdsystemunitdir/syslog.socket \ diff --git a/0051-dracut.conf.d-fedora.conf.example-removed-readonly-f.patch b/0051-dracut.conf.d-fedora.conf.example-removed-readonly-f.patch deleted file mode 100644 index 4f80f93..0000000 --- a/0051-dracut.conf.d-fedora.conf.example-removed-readonly-f.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 56ed92922e6a229668fa02becd1419909cdbf29d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 08:21:00 +0200 -Subject: [PATCH] dracut.conf.d/fedora.conf.example: removed readonly from - prefix - ---- - dracut.conf.d/fedora.conf.example | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index ee53844..4cb1890 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -5,7 +5,7 @@ i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-F - omit_drivers+=" .*/fs/ocfs/.* " - stdloglvl=3 - install_items+=" vi /etc/virc ps grep cat rm " --readonly prefix="/" -+prefix="/" - systemdutildir=/usr/lib/systemd - systemdsystemunitdir=/usr/lib/systemd/system - udevdir=/usr/lib/udev diff --git a/0052-dracut-functions.sh-bail-out-if-initdir-is-not-set.patch b/0052-dracut-functions.sh-bail-out-if-initdir-is-not-set.patch deleted file mode 100644 index 5736a6b..0000000 --- a/0052-dracut-functions.sh-bail-out-if-initdir-is-not-set.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 593b315c700641496e89133918b97c1ad019c8ce Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 10:02:04 +0200 -Subject: [PATCH] dracut-functions.sh: bail out, if $initdir is not set - ---- - dracut-functions.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index d91e2a4..3f56316 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -96,6 +96,11 @@ if ! type dinfo >/dev/null 2>&1; then - dlog_init - fi - -+if ! [[ $initdir ]]; then -+ dfatal "initdir not set" -+ exit 1 -+fi -+ - # export standard hookdirs - [[ $hookdirs ]] || { - hookdirs="cmdline pre-udev pre-trigger netroot " diff --git a/0053-dracut.sh-corrected-error-messages-if-mktemp-failed.patch b/0053-dracut.sh-corrected-error-messages-if-mktemp-failed.patch deleted file mode 100644 index 061bd6c..0000000 --- a/0053-dracut.sh-corrected-error-messages-if-mktemp-failed.patch +++ /dev/null @@ -1,22 +0,0 @@ -From fbf658fece613a838f2d1b0acfc78f670799e3da Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 10:02:35 +0200 -Subject: [PATCH] dracut.sh: corrected error messages, if mktemp failed - ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 0b43f44..9be7cac 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -577,7 +577,7 @@ fi - readonly TMPDIR="$tmpdir" - readonly initdir=$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX) - [ -d "$initdir" ] || { -- echo "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t initramfs.XXXXXXfailed." >&2 -+ echo "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t initramfs.XXXXXX failed." >&2 - exit 1 - } - diff --git a/0054-require-systemd-186.patch b/0054-require-systemd-186.patch deleted file mode 100644 index 5005c4d..0000000 --- a/0054-require-systemd-186.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 6795dcc4fc388db89d95ae39098eee754c96ed18 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 10:04:35 +0200 -Subject: [PATCH] require systemd >= 186 - ---- - dracut.spec | 2 +- - modules.d/98systemd/dracut-initqueue.service | 4 ++-- - modules.d/98systemd/dracut-pre-pivot.sh | 2 +- - modules.d/98systemd/dracut-pre-trigger.service | 6 +++--- - modules.d/98systemd/dracut-pre-udev.service | 2 +- - modules.d/98systemd/module-setup.sh | 9 --------- - 6 files changed, 8 insertions(+), 17 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index a6fec89..6be1c3d 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -84,7 +84,7 @@ Requires: file - Requires: udev > 166 - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Requires: systemd >= 44-15 -+Requires: systemd >= 186 - %else - Requires: util-linux-ng >= 2.21 - %endif -diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service -index 5168677..73bc1e1 100644 ---- a/modules.d/98systemd/dracut-initqueue.service -+++ b/modules.d/98systemd/dracut-initqueue.service -@@ -10,8 +10,8 @@ - [Unit] - Description=Dracut initqueue hook - DefaultDependencies=no --After=systemd-udev-trigger.service --Wants=systemd-udev-trigger.service -+After=systemd-udevd-trigger.service -+Wants=systemd-udevd-trigger.service - ConditionPathExists=/etc/initrd-release - - [Service] -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 29a8248..06642d0 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -36,7 +36,7 @@ echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf - - udevadm control --stop-exec-queue - --for i in systemd-udev.service udev.service; do -+for i in systemd-udevd.service; do - systemctl is-active $i >/dev/null 2>&1 && systemctl stop $i - done - -diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service -index b553187..450ed20 100644 ---- a/modules.d/98systemd/dracut-pre-trigger.service -+++ b/modules.d/98systemd/dracut-pre-trigger.service -@@ -10,9 +10,9 @@ - [Unit] - Description=Dracut pre-trigger hook - DefaultDependencies=no --Before=systemd-udev-trigger.service dracut-initqueue.service --After=dracut-pre-udev.service systemd-udev.service --Wants=dracut-pre-udev.service systemd-udev.service -+Before=systemd-udevd-trigger.service dracut-initqueue.service -+After=dracut-pre-udev.service systemd-udevd.service -+Wants=dracut-pre-udev.service systemd-udevd.service - ConditionPathExists=/etc/initrd-release - - [Service] -diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service -index 40c9055..a320498 100644 ---- a/modules.d/98systemd/dracut-pre-udev.service -+++ b/modules.d/98systemd/dracut-pre-udev.service -@@ -10,7 +10,7 @@ - [Unit] - Description=Dracut pre-udev hook - DefaultDependencies=no --Before=systemd-udev.service dracut-pre-trigger.service -+Before=systemd-udevd.service dracut-pre-trigger.service - After=dracut-cmdline.service - Wants=dracut-cmdline.service - ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 60e1be2..543db7e 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -54,9 +54,7 @@ install() { - $systemdsystemunitdir/systemd-initctl.socket \ - $systemdsystemunitdir/systemd-shutdownd.socket \ - $systemdsystemunitdir/systemd-ask-password-console.path \ -- $systemdsystemunitdir/systemd-udev-control.socket \ - $systemdsystemunitdir/systemd-udevd-control.socket \ -- $systemdsystemunitdir/systemd-udev-kernel.socket \ - $systemdsystemunitdir/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/systemd-ask-password-plymouth.path \ - $systemdsystemunitdir/systemd-journald.socket \ -@@ -68,11 +66,8 @@ install() { - $systemdsystemunitdir/reboot.service \ - $systemdsystemunitdir/kexec.service \ - $systemdsystemunitdir/fsck@.service \ -- $systemdsystemunitdir/systemd-udev.service \ - $systemdsystemunitdir/systemd-udevd.service \ -- $systemdsystemunitdir/systemd-udev-trigger.service \ - $systemdsystemunitdir/systemd-udevd-trigger.service \ -- $systemdsystemunitdir/systemd-udev-settle.service \ - $systemdsystemunitdir/systemd-udevd-settle.service \ - $systemdsystemunitdir/systemd-ask-password-plymouth.service \ - $systemdsystemunitdir/systemd-journald.service \ -@@ -83,14 +78,10 @@ install() { - $systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \ - $systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \ -- $systemdsystemunitdir/sockets.target.wants/systemd-udev-control.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \ -- $systemdsystemunitdir/sockets.target.wants/systemd-udev-kernel.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ -- $systemdsystemunitdir/sysinit.target.wants/systemd-udev.service \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \ -- $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udevd-trigger.service \ - $systemdsystemunitdir/ctrl-alt-del.target \ - $systemdsystemunitdir/single.service \ diff --git a/0055-systemd-udev-trigger.service-and-systemd-udev-settle.patch b/0055-systemd-udev-trigger.service-and-systemd-udev-settle.patch deleted file mode 100644 index df5d7c3..0000000 --- a/0055-systemd-udev-trigger.service-and-systemd-udev-settle.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b4e20a898ef2f5985a30282c93a21bc14efe7309 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 10:12:04 +0200 -Subject: [PATCH] systemd-udev-trigger.service and systemd-udev-settle.service - have no "d" - ---- - modules.d/98systemd/dracut-initqueue.service | 4 ++-- - modules.d/98systemd/dracut-pre-trigger.service | 2 +- - modules.d/98systemd/module-setup.sh | 6 +++--- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service -index 73bc1e1..5168677 100644 ---- a/modules.d/98systemd/dracut-initqueue.service -+++ b/modules.d/98systemd/dracut-initqueue.service -@@ -10,8 +10,8 @@ - [Unit] - Description=Dracut initqueue hook - DefaultDependencies=no --After=systemd-udevd-trigger.service --Wants=systemd-udevd-trigger.service -+After=systemd-udev-trigger.service -+Wants=systemd-udev-trigger.service - ConditionPathExists=/etc/initrd-release - - [Service] -diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service -index 450ed20..86c7c5e 100644 ---- a/modules.d/98systemd/dracut-pre-trigger.service -+++ b/modules.d/98systemd/dracut-pre-trigger.service -@@ -10,7 +10,7 @@ - [Unit] - Description=Dracut pre-trigger hook - DefaultDependencies=no --Before=systemd-udevd-trigger.service dracut-initqueue.service -+Before=systemd-udev-trigger.service dracut-initqueue.service - After=dracut-pre-udev.service systemd-udevd.service - Wants=dracut-pre-udev.service systemd-udevd.service - ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 543db7e..0387ec4 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -67,8 +67,8 @@ install() { - $systemdsystemunitdir/kexec.service \ - $systemdsystemunitdir/fsck@.service \ - $systemdsystemunitdir/systemd-udevd.service \ -- $systemdsystemunitdir/systemd-udevd-trigger.service \ -- $systemdsystemunitdir/systemd-udevd-settle.service \ -+ $systemdsystemunitdir/systemd-udev-trigger.service \ -+ $systemdsystemunitdir/systemd-udev-settle.service \ - $systemdsystemunitdir/systemd-ask-password-plymouth.service \ - $systemdsystemunitdir/systemd-journald.service \ - $systemdsystemunitdir/systemd-vconsole-setup.service \ -@@ -82,7 +82,7 @@ install() { - $systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \ -- $systemdsystemunitdir/sysinit.target.wants/systemd-udevd-trigger.service \ -+ $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ - $systemdsystemunitdir/ctrl-alt-del.target \ - $systemdsystemunitdir/single.service \ - $systemdsystemunitdir/syslog.socket \ diff --git a/0056-TEST-30-ISCSI-convert-to-ext3.patch b/0056-TEST-30-ISCSI-convert-to-ext3.patch deleted file mode 100644 index b5dc583..0000000 --- a/0056-TEST-30-ISCSI-convert-to-ext3.patch +++ /dev/null @@ -1,150 +0,0 @@ -From cbefa470063eedb80da1317566668d8ec03d89c0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 10:16:33 +0200 -Subject: [PATCH] TEST-30-ISCSI: convert to ext3 - ---- - test/TEST-30-ISCSI/client-init.sh | 2 +- - test/TEST-30-ISCSI/create-root.sh | 4 ++-- - test/TEST-30-ISCSI/test.sh | 29 +++++++++++++++-------------- - 3 files changed, 18 insertions(+), 17 deletions(-) - -diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh -index 1b9d633..e78db27 100755 ---- a/test/TEST-30-ISCSI/client-init.sh -+++ b/test/TEST-30-ISCSI/client-init.sh -@@ -6,7 +6,7 @@ export PS1='initramfs-test:\w\$ ' - stty sane - echo "made it to the rootfs! Powering down." - while read dev fs fstype opts rest; do -- [ "$fstype" != "ext2" ] && continue -+ [ "$fstype" != "ext3" ] && continue - echo "iscsi-OK $dev $fstype $opts" > /dev/sda - break - done < /proc/mounts -diff --git a/test/TEST-30-ISCSI/create-root.sh b/test/TEST-30-ISCSI/create-root.sh -index 2b7cac1..6016320 100755 ---- a/test/TEST-30-ISCSI/create-root.sh -+++ b/test/TEST-30-ISCSI/create-root.sh -@@ -5,7 +5,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do - done - rm /etc/lvm/lvm.conf - udevadm control --reload-rules --mke2fs -F /dev/sda && \ -+mkfs.ext3 -j -F /dev/sda && \ - mkdir -p /sysroot && \ - mount /dev/sda /sysroot && \ - cp -a -t /sysroot /source/* && \ -@@ -16,7 +16,7 @@ lvm pvcreate -ff -y /dev/md0 && \ - lvm vgcreate dracut /dev/md0 && \ - lvm lvcreate -l 100%FREE -n root dracut && \ - lvm vgchange -ay && \ --mke2fs -L sysroot /dev/dracut/root && \ -+mkfs.ext3 -j -L sysroot /dev/dracut/root && \ - mount /dev/dracut/root /sysroot && \ - cp -a -t /sysroot /source/* && \ - umount /sysroot && \ -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 5ebd9ac..8c577f0 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem over iSCSI" - KVERSION=${KVERSION-$(uname -r)} - - #DEBUGFAIL="rd.shell" --#SERIAL="-serial udp:127.0.0.1:9999" -+#SERIAL="tcp:127.0.0.1:9999" - SERIAL="null" - - run_server() { -@@ -12,15 +12,16 @@ run_server() { - echo "iSCSI TEST SETUP: Starting DHCP/iSCSI server" - - $testdir/run-qemu \ -- -hda $TESTDIR/server.ext2 \ -- -hdb $TESTDIR/root.ext2 \ -+ -hda $TESTDIR/server.ext3 \ -+ -hdb $TESTDIR/root.ext3 \ - -hdc $TESTDIR/iscsidisk2.img \ - -hdd $TESTDIR/iscsidisk3.img \ - -m 256M -nographic \ -+ -serial $SERIAL \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12330 \ - -kernel /boot/vmlinuz-$KVERSION \ -- -append "root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/sda rootfstype=ext3 rw rd.debug loglevel=77 console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.server \ - -pidfile $TESTDIR/server.pid -daemonize || return 1 - sudo chmod 644 $TESTDIR/server.pid || return 1 -@@ -94,7 +95,7 @@ test_setup() { - fi - - # Create the blank file to use as a root filesystem -- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=20 -+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=20 - dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=20 - dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=20 - -@@ -119,7 +120,7 @@ test_setup() { - ( - initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh -- dracut_install sfdisk mke2fs poweroff cp umount -+ dracut_install sfdisk mkfs.ext3 poweroff cp umount - inst_hook initqueue 01 ./create-root.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) -@@ -129,7 +130,7 @@ test_setup() { - # devices, volume groups, encrypted partitions, etc. - $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ -- -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -+ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ - -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 - rm -rf $TESTDIR/overlay - -@@ -141,13 +142,13 @@ test_setup() { - fi - # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu \ -- -hda $TESTDIR/root.ext2 \ -+ -hda $TESTDIR/root.ext3 \ - -hdb $TESTDIR/client.img \ - -hdc $TESTDIR/iscsidisk2.img \ - -hdd $TESTDIR/iscsidisk3.img \ - -m 256M -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 - rm $TESTDIR/client.img -@@ -161,14 +162,14 @@ test_setup() { - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -o "plymouth dmraid" \ - -a "debug" \ -- -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ -+ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ - -f $TESTDIR/initramfs.testing $KVERSION || return 1 - - # Make server root -- dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=60 -- mke2fs -F $TESTDIR/server.ext2 -+ dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60 -+ mkfs.ext3 -j -F $TESTDIR/server.ext3 - mkdir $TESTDIR/mnt -- sudo mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt -+ sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt - - kernel=$KVERSION - ( -@@ -210,7 +211,7 @@ test_setup() { - # Make server's dracut image - $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -m "dash udev-rules base rootfs-block debug kernel-modules" \ -- -d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \ -+ -d "piix ide-gd_mod ata_piix ext3 sd_mod e1000" \ - -f $TESTDIR/initramfs.server $KVERSION || return 1 - - } diff --git a/0057-02caps-do-not-create-bin-sh-link.patch b/0057-02caps-do-not-create-bin-sh-link.patch deleted file mode 100644 index b1ddc7a..0000000 --- a/0057-02caps-do-not-create-bin-sh-link.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d6e8280cd83a08f1b224fa4745de4e3b6f5baa4c Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Mon, 9 Jul 2012 14:57:11 +0800 -Subject: [PATCH] 02caps: do not create /bin/sh link - -02caps: do not create /bin/sh link - -caps.sh use !/bin/bash explictly, so no need to ln -sf bash /bin/sh - -OTOH, 00dash will create the symlink /bin/sh, 99base will create it if -there's no /bin/sh symlink. It looks bad to creat /bin/sh in other modules. - -If a script want to use bash as command interpreter it should use !/bin/bash -or !/bin/sh in case dash is not installed. - -Signed-off-by: Dave Young ---- - modules.d/02caps/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh -index 6ecb231..c9d94ee 100755 ---- a/modules.d/02caps/module-setup.sh -+++ b/modules.d/02caps/module-setup.sh -@@ -14,6 +14,6 @@ install() { - inst_hook pre-pivot 00 "$moddir/caps.sh" - inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh - # capsh wants bash and we need bash also -- inst /bin/bash && ln -sf bash "${initdir}/bin/sh" -+ inst /bin/bash - } - diff --git a/0058-dhclient-initqueue-hook-fix.patch b/0058-dhclient-initqueue-hook-fix.patch deleted file mode 100644 index 34332bb..0000000 --- a/0058-dhclient-initqueue-hook-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a17fc9902e3ccd154765cbc8a1b7cc285072ad75 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Mon, 9 Jul 2012 14:56:35 +0800 -Subject: [PATCH] dhclient initqueue hook fix - -dhclient initqueue hook fix - -setup_net is scheduled in initqueue, sometimes it does not get chance to run -So the default route will not be set properly - -Add a check in initqueue/finished to resolve this issue. - -Signed-off-by: Dave Young ---- - modules.d/40network/dhclient-script.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 470444e..1500fe5 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -88,9 +88,11 @@ case $reason in - echo "setup_net $netif" - echo "source_hook initqueue/online $netif" - [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" -+ echo "> /tmp/setup_net_$netif.ok" - echo "rm -f $hookdir/initqueue/setup_net_$netif.sh" - } > $hookdir/initqueue/setup_net_$netif.sh - -+ echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh - >/tmp/net.$netif.up - ;; - *) echo "dhcp: $reason";; diff --git a/0059-Makefile-do-not-install-service-from-98systemd.-They.patch b/0059-Makefile-do-not-install-service-from-98systemd.-They.patch deleted file mode 100644 index 406fc0f..0000000 --- a/0059-Makefile-do-not-install-service-from-98systemd.-They.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2023d8eb5b1a92cb830059384f4935a42505eaaa Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 12:41:56 +0200 -Subject: [PATCH] Makefile: do not install service from 98systemd. They are - copied to /run - ---- - Makefile | 11 +---------- - dracut.spec | 5 ++--- - 2 files changed, 3 insertions(+), 13 deletions(-) - -diff --git a/Makefile b/Makefile -index 07741d0..e20ba06 100644 ---- a/Makefile -+++ b/Makefile -@@ -83,16 +83,7 @@ install: doc dracut-version.sh - ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 - if [ -n "$(systemdsystemunitdir)" ]; then \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ -- for i in \ -- modules.d/98systemd/dracut-initqueue.service \ -- modules.d/98systemd/dracut-pre-pivot.service \ -- modules.d/98systemd/dracut-pre-trigger.service \ -- modules.d/98systemd/dracut-pre-udev.service \ -- modules.d/98systemd/initrd-switch-root.service \ -- modules.d/98systemd/initrd-switch-root.target \ -- dracut-shutdown.service; do \ -- install -m 0644 $$i $(DESTDIR)$(systemdsystemunitdir); \ -- done; \ -+ install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \ - ln -s ../dracut-shutdown.service \ - $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ -diff --git a/dracut.spec b/dracut.spec -index 6be1c3d..c17860d 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -312,9 +312,8 @@ rm -rf $RPM_BUILD_ROOT - %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log - %dir %{_sharedstatedir}/initramfs - %if %{defined _unitdir} --%{_unitdir}/*.service --%{_unitdir}/*.target --%{_unitdir}/*/*.service -+%{_unitdir}/dracut-shutdown.service -+%{_unitdir}/shutdown.target.wants/dracut-shutdown.service - %endif - - %files network diff --git a/0060-plymouth-Use-latest-plymouth-s-populate-script.patch b/0060-plymouth-Use-latest-plymouth-s-populate-script.patch deleted file mode 100644 index 01e8ea3..0000000 --- a/0060-plymouth-Use-latest-plymouth-s-populate-script.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3c1feedfd1e175119c26f0dd29e4c03eac1f1f7c Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Sat, 7 Jul 2012 16:48:01 +0100 -Subject: [PATCH] plymouth: Use latest plymouth's populate script. - -The latest plymouth no longer relies on dracut to provide functions -needed to install binaries/libs so the check for a variable name -no longer works and the old, built-in script is used instead thus -breaking the new drm and framebuffer plymouth module installation. ---- - modules.d/50plymouth/module-setup.sh | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh -index 9cdcc63..10aa0da 100755 ---- a/modules.d/50plymouth/module-setup.sh -+++ b/modules.d/50plymouth/module-setup.sh -@@ -65,7 +65,6 @@ installkernel() { - - install() { - if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \ -- || ! grep -q PLYMOUTH_POPULATE_SOURCE_FUNCTIONS /usr/libexec/plymouth/plymouth-populate-initrd \ - || [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then - . "$moddir"/plymouth-populate-initrd.sh - else diff --git a/0061-test-export-initdir.patch b/0061-test-export-initdir.patch deleted file mode 100644 index 9459c6d..0000000 --- a/0061-test-export-initdir.patch +++ /dev/null @@ -1,488 +0,0 @@ -From 27fa604418517c8e8a8e771ce6a804d4886e9f2f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 15:30:15 +0200 -Subject: [PATCH] test: export initdir - ---- - test/TEST-01-BASIC/test.sh | 6 +++--- - test/TEST-02-SYSTEMD/test.sh | 6 +++--- - test/TEST-03-USR-MOUNT/test.sh | 6 +++--- - test/TEST-10-RAID/test.sh | 6 +++--- - test/TEST-11-LVM/test.sh | 6 +++--- - test/TEST-12-RAID-DEG/test.sh | 6 +++--- - test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++--- - test/TEST-15-BTRFSRAID/test.sh | 6 +++--- - test/TEST-16-DMSQUASH/test.sh | 4 ++-- - test/TEST-20-NFS/test.sh | 6 +++--- - test/TEST-30-ISCSI/test.sh | 8 ++++---- - test/TEST-40-NBD/test.sh | 10 +++++----- - test/TEST-50-MULTINIC/test.sh | 6 +++--- - test/old.TEST-14-IMSM/test.sh | 6 +++--- - test/test-functions | 2 +- - 15 files changed, 45 insertions(+), 45 deletions(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 35e05bb..f8522e6 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -27,7 +27,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - mkdir -p $initdir - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -@@ -49,7 +49,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mkfs.ext3 poweroff cp umount sync - inst_hook initqueue 01 ./create-root.sh -@@ -77,7 +77,7 @@ test_setup() { - - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index b535dbe..5a121c0 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -23,7 +23,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - mkdir -p $initdir - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -@@ -45,7 +45,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mkfs.ext3 poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -73,7 +73,7 @@ test_setup() { - - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index d966c3c..f3237d3 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -54,7 +54,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - mkdir -p $initdir - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -@@ -77,7 +77,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mkfs.btrfs btrfs poweroff cp umount sync - inst_hook initqueue 01 ./create-root.sh -@@ -112,7 +112,7 @@ test_setup() { - - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index ef6d0c2..d2b1921 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -25,7 +25,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - (mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run) - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -@@ -46,7 +46,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mke2fs poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -72,7 +72,7 @@ test_setup() { - grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index 034cc4c..61ebdfa 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -23,7 +23,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient -@@ -44,7 +44,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mke2fs poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -66,7 +66,7 @@ test_setup() { - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index c6038bd..05e5f8a 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -58,7 +58,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient -@@ -78,7 +78,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mke2fs poweroff cp umount dd grep - inst_hook initqueue 01 ./create-root.sh -@@ -106,7 +106,7 @@ test_setup() { - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 - eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2) - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index 658de8f..f0f7d34 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -59,7 +59,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient -@@ -79,7 +79,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mke2fs poweroff cp umount grep - inst_hook initqueue 01 ./create-root.sh -@@ -108,7 +108,7 @@ test_setup() { - - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index 5918b5e..61ccae3 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -25,7 +25,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient -@@ -45,7 +45,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mkfs.btrfs poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -74,7 +74,7 @@ test_setup() { - grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 - - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index 5cd9986..4dc133c 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -29,7 +29,7 @@ test_run() { - test_setup() { - mkdir -p $TESTDIR/overlay - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -@@ -47,7 +47,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/root-source -+ export initdir=$TESTDIR/root-source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient \ -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 57bf512..a44f6c0 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -217,7 +217,7 @@ test_setup() { - # Detect lib paths - - ( -- initdir=$TESTDIR/mnt -+ export initdir=$TESTDIR/mnt - . $basedir/dracut-functions.sh - - for _f in modules.builtin.bin modules.builtin; do -@@ -282,7 +282,7 @@ test_setup() { - - # Make client root inside server root - ( -- initdir=$TESTDIR/mnt/nfs/client -+ export initdir=$TESTDIR/mnt/nfs/client - . $basedir/dracut-functions.sh - - dracut_install sh shutdown poweroff stty cat ps ln ip \ -@@ -325,7 +325,7 @@ test_setup() { - - # Make an overlay with needed tools for the test harness - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - mkdir $TESTDIR/overlay - dracut_install poweroff shutdown -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 8c577f0..c5dba80 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -102,7 +102,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh shutdown poweroff stty cat ps ln ip \ - mount dmesg mkdir cp ping grep -@@ -118,7 +118,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mkfs.ext3 poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -153,7 +153,7 @@ test_setup() { - grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 - rm $TESTDIR/client.img - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -@@ -173,7 +173,7 @@ test_setup() { - - kernel=$KVERSION - ( -- initdir=$TESTDIR/mnt -+ export initdir=$TESTDIR/mnt - . $basedir/dracut-functions.sh - ( - cd "$initdir"; -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index f5465b6..94efb8a 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -190,7 +190,7 @@ make_encrypted_root() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - mkdir -p "$initdir" - (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) -@@ -208,7 +208,7 @@ make_encrypted_root() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install mke2fs poweroff cp umount tune2fs - inst_hook initqueue 01 ./create-root.sh -@@ -244,7 +244,7 @@ make_client_root() { - - kernel=$KVERSION - ( -- initdir=$TESTDIR/mnt -+ export initdir=$TESTDIR/mnt - . $basedir/dracut-functions.sh - mkdir -p "$initdir" - (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) -@@ -278,7 +278,7 @@ make_server_root() { - - kernel=$KVERSION - ( -- initdir=$TESTDIR/mnt -+ export initdir=$TESTDIR/mnt - . $basedir/dracut-functions.sh - mkdir -p "$initdir" - ( -@@ -323,7 +323,7 @@ test_setup() { - - # Make the test image - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index a96669e..74f10d8 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -132,7 +132,7 @@ test_setup() { - sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt - - ( -- initdir=$TESTDIR/mnt -+ export initdir=$TESTDIR/mnt - . $basedir/dracut-functions.sh - - ( -@@ -197,7 +197,7 @@ test_setup() { - - # Make client root inside server root - ( -- initdir=$TESTDIR/mnt/nfs/client -+ export initdir=$TESTDIR/mnt/nfs/client - . $basedir/dracut-functions.sh - dracut_install sh shutdown poweroff stty cat ps ln ip \ - mount dmesg mkdir cp ping grep ls -@@ -236,7 +236,7 @@ test_setup() { - - # Make an overlay with needed tools for the test harness - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/old.TEST-14-IMSM/test.sh b/test/old.TEST-14-IMSM/test.sh -index 5b9438e..cd2d715 100755 ---- a/test/old.TEST-14-IMSM/test.sh -+++ b/test/old.TEST-14-IMSM/test.sh -@@ -57,7 +57,7 @@ test_setup() { - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - ( -- initdir=$TESTDIR/overlay/source -+ export initdir=$TESTDIR/overlay/source - . $basedir/dracut-functions.sh - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient -@@ -78,7 +78,7 @@ test_setup() { - - # second, install the files needed to make the root filesystem - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install sfdisk mke2fs poweroff cp umount - inst_hook initqueue 01 ./create-root.sh -@@ -104,7 +104,7 @@ test_setup() { - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 - ( -- initdir=$TESTDIR/overlay -+ export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -diff --git a/test/test-functions b/test/test-functions -index 451837f..10d78ed 100644 ---- a/test/test-functions -+++ b/test/test-functions -@@ -6,7 +6,7 @@ export PATH - - [[ -e .testdir ]] && . .testdir - if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then -- TESTDIR=$(mktemp -d -t dracut-test.XXXXXX) -+ TESTDIR=$(mktemp -d --tmpdir="/var/tmp" -t dracut-test.XXXXXX) - fi - echo "TESTDIR=\"$TESTDIR\"" > .testdir - export TESTDIR diff --git a/0062-test-new-test-TEST-99-RPM.patch b/0062-test-new-test-TEST-99-RPM.patch deleted file mode 100644 index 4bf6c06..0000000 --- a/0062-test-new-test-TEST-99-RPM.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 4eafdbdbe8ee3486ae96bdc6b5fa34112064a3ea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 16:28:47 +0200 -Subject: [PATCH] test: new test TEST-99-RPM - -This test installs the dracut rpm together with the kernel in an -installroot. rpm -Va and rpm -qf are used, to ensure nothing modified -files in the real root. ---- - test/TEST-99-RPM/Makefile | 10 ++++++ - test/TEST-99-RPM/test.sh | 83 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 93 insertions(+) - create mode 100644 test/TEST-99-RPM/Makefile - create mode 100755 test/TEST-99-RPM/test.sh - -diff --git a/test/TEST-99-RPM/Makefile b/test/TEST-99-RPM/Makefile -new file mode 100644 -index 0000000..5513c52 ---- /dev/null -+++ b/test/TEST-99-RPM/Makefile -@@ -0,0 +1,10 @@ -+all: -+ @make -s --no-print-directory -C ../.. clean all rpm -+ @basedir=../.. testdir=../ ./test.sh --all -+setup: -+ @make --no-print-directory -C ../.. clean rpm -+ @basedir=../.. testdir=../ ./test.sh --setup -+clean: -+ @basedir=../.. testdir=../ ./test.sh --clean -+run: -+ @basedir=../.. testdir=../ ./test.sh --run -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -new file mode 100755 -index 0000000..25c1895 ---- /dev/null -+++ b/test/TEST-99-RPM/test.sh -@@ -0,0 +1,83 @@ -+#!/bin/bash -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+TEST_DESCRIPTION="rpm integrity after dracut and kernel install" -+$TESTDIR -+ -+test_run() { -+ set -x -+ export rootdir=$TESTDIR/root -+ -+ mkdir -p $rootdir -+ -+ mkdir -p "$rootdir/proc" -+ mkdir -p "$rootdir/sys" -+ mkdir -p "$rootdir/dev" -+ -+ mount --bind /proc "$rootdir/proc" -+ mount --bind /sys "$rootdir/sys" -+ mount -t devtmpfs devtmpfs "$rootdir/dev" -+ -+ yum --nogpgcheck --releasever=/ --installroot "$rootdir"/ install -y \ -+ yum \ -+ passwd \ -+ rootfiles \ -+ systemd \ -+ kernel \ -+ fedora-release \ -+ device-mapper-multipath \ -+ lvm2 \ -+ mdadm \ -+ bash \ -+ iscsi-initiator-utils \ -+ $basedir/dracut-[0-9]*.$(arch).rpm \ -+ $basedir/dracut-network-[0-9]*.$(arch).rpm -+ -+ cat >"$rootdir"/test.sh < /test.output -+find / -xdev -type f -not -path '/var/*' \ -+ -not -path '/usr/lib/modules/*/modules.*' \ -+ -not -path '/etc/*-' \ -+ -not -path '/etc/.pwd.lock' \ -+ -not -path '/run/mount/utab' \ -+ -not -path '/test.sh' \ -+ -not -path '/test.output' \ -+ -not -path '/etc/nsswitch.conf.bak' \ -+ -not -path '/etc/iscsi/initiatorname.iscsi' \ -+ -not -path '/dev/null' \ -+ -exec rpm -qf '{}' ';' | \ -+ fgrep 'not owned' &> /test.output -+exit -+EOF -+ -+ chmod 0755 "$rootdir/test.sh" -+ -+ chroot "$rootdir" /test.sh -+ -+ if [[ -s "$rootdir"/test.output ]]; then -+ failed=1 -+ echo TEST Failed >&2 -+ cat "$rootdir"/test.output >&2 -+ fi -+ -+ umount "$rootdir/proc" -+ umount "$rootdir/sys" -+ umount "$rootdir/dev" -+ -+ [[ $failed ]] && return 1 -+ return 0 -+ -+} -+ -+test_setup() { -+ return 0 -+} -+ -+test_cleanup() { -+ return 0 -+} -+ -+. $testdir/test-functions diff --git a/0063-resume-move-resume-process-to-initqueue.patch b/0063-resume-move-resume-process-to-initqueue.patch deleted file mode 100644 index 56ebab0..0000000 --- a/0063-resume-move-resume-process-to-initqueue.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 450b5f336d1f433d333b78979388aa2477bc487e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 17:06:51 +0200 -Subject: [PATCH] resume: move resume process to initqueue - ---- - modules.d/95resume/parse-resume.sh | 2 ++ - modules.d/95resume/resume-genrules.sh | 14 +++++++------- - 2 files changed, 9 insertions(+), 7 deletions(-) - -diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh -index 32680c3..b460a16 100755 ---- a/modules.d/95resume/parse-resume.sh -+++ b/modules.d/95resume/parse-resume.sh -@@ -15,6 +15,8 @@ case "$resume" in - resume="/dev/disk/by-label/${resume#LABEL=}" ;; - UUID=*) \ - resume="/dev/disk/by-uuid/${resume#UUID=}" ;; -+ PARTUUID=*) \ -+ resume="/dev/disk/by-partuuid/${resume#PARTUUID=}" ;; - esac - - if splash=$(getarg splash=); then -diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh -index ee4eacb..34511d7 100755 ---- a/modules.d/95resume/resume-genrules.sh -+++ b/modules.d/95resume/resume-genrules.sh -@@ -21,18 +21,18 @@ if [ -n "$resume" ]; then - - { - if [ -x /usr/sbin/resume ]; then -- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '%s'\"\n" \ -+ printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '%s'\"\n" \ - ${resume#/dev/} "$a_splash" "$resume"; -- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '%s'\"\n" \ -+ printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '%s'\"\n" \ - ${resume#/dev/} "$a_splash" "$resume"; - fi -- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \ -+ printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /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" \ -+ printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /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' \ -+ printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job"; udevadm settle; }\n' \ - "$resume" "$resume" >> $hookdir/initqueue/settled/resume.sh - - printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \ -@@ -43,9 +43,9 @@ if [ -n "$resume" ]; then - elif ! getarg noresume; then - { - if [ -x /usr/sbin/resume ]; then -- printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '\$tempnode'\"\n" "$a_splash" -+ printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '\$tempnode'\"\n" "$a_splash" - fi - echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \ -- " RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\""; -+ " RUN+=\"/sbin/initqueue /bin/sh -c 'echo %M:%m > /sys/power/resume'\""; - } >> /etc/udev/rules.d/99-resume.rules - fi diff --git a/0064-TEST-99-RPM-test-trap.patch b/0064-TEST-99-RPM-test-trap.patch deleted file mode 100644 index 7241ec5..0000000 --- a/0064-TEST-99-RPM-test-trap.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 43bac63e33a31f4d86ca8f16b439dd33336a374b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 20:44:48 +0200 -Subject: [PATCH] TEST-99-RPM test trap - ---- - test/TEST-99-RPM/test.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 25c1895..66f0beb 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -14,6 +14,9 @@ test_run() { - mkdir -p "$rootdir/sys" - mkdir -p "$rootdir/dev" - -+trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf "$rootdir"; }; exit $ret;' EXIT -+trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf "$rootdir"; }; exit 1;' SIGINT -+ - mount --bind /proc "$rootdir/proc" - mount --bind /sys "$rootdir/sys" - mount -t devtmpfs devtmpfs "$rootdir/dev" diff --git a/0065-systemd-service-cleanup.patch b/0065-systemd-service-cleanup.patch deleted file mode 100644 index ba91614..0000000 --- a/0065-systemd-service-cleanup.patch +++ /dev/null @@ -1,280 +0,0 @@ -From 792b189317068202aba16d1fc2371d605a6c715c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 20:46:20 +0200 -Subject: [PATCH] systemd service cleanup - ---- - modules.d/95rootfs-block/block-genrules.sh | 28 ++++++++++++------------ - modules.d/98systemd/dracut-cmdline.service | 4 +--- - modules.d/98systemd/dracut-initqueue.service | 4 +--- - modules.d/98systemd/dracut-initqueue.sh | 1 - - modules.d/98systemd/dracut-pre-pivot.service | 7 +++--- - modules.d/98systemd/dracut-pre-pivot.sh | 11 ---------- - modules.d/98systemd/dracut-pre-trigger.service | 4 +--- - modules.d/98systemd/dracut-pre-udev.service | 4 +--- - modules.d/98systemd/initrd-switch-root.service | 6 ++++- - modules.d/98systemd/initrd-switch-root.target | 2 +- - modules.d/98systemd/module-setup.sh | 10 ++++++--- - modules.d/98systemd/service-to-run.sh | 6 +++++ - modules.d/98systemd/udevadm-cleanup-db.service | 20 +++++++++++++++++ - 13 files changed, 60 insertions(+), 47 deletions(-) - create mode 100755 modules.d/98systemd/service-to-run.sh - create mode 100644 modules.d/98systemd/udevadm-cleanup-db.service - -diff --git a/modules.d/95rootfs-block/block-genrules.sh b/modules.d/95rootfs-block/block-genrules.sh -index fe6e331..7f894ee 100755 ---- a/modules.d/95rootfs-block/block-genrules.sh -+++ b/modules.d/95rootfs-block/block-genrules.sh -@@ -13,22 +13,22 @@ if [ "${root%%:*}" = "block" ]; then - printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \ - "${root#block:}" "${root#block:}" > $hookdir/initqueue/settled/blocksymlink.sh - -- if [ -d /lib/systemd/system/ ]; then -- echo "${root#block:} $NEWROOT ${fstype:-auto} ${rflags:-defaults} 1 1" >> /etc/fstab -- { -- echo '[Unit]' -- echo 'Description=New Root File System' -- echo 'DefaultDependencies=no' -- echo 'Before=switch-root.service' -- echo '[Mount]' -- echo "What=${root#block:}" -- echo "Where=$NEWROOT" -+ # if [ -d /lib/systemd/system/ ]; then -+ # echo "${root#block:} $NEWROOT ${fstype:-auto} ${rflags:-defaults} 1 1" >> /etc/fstab -+ # { -+ # echo '[Unit]' -+ # echo 'Description=New Root File System' -+ # echo 'DefaultDependencies=no' -+ # echo 'Before=initrd-switch-root.service' -+ # echo '[Mount]' -+ # echo "What=${root#block:}" -+ # echo "Where=$NEWROOT" - -- } >/lib/systemd/system/${NEWROOT#/}.mount -+ # } >/lib/systemd/system/${NEWROOT#/}.mount - -- mkdir -p /lib/systemd/system/switch-root.target.wants -- ln -s ../${NEWROOT#/}.mount /lib/systemd/system/switch-root.target.wants/${NEWROOT#/}.mount -- fi -+ # mkdir -p /lib/systemd/system/initrd-switch-root.target.requires -+ # ln -s ../${NEWROOT#/}.mount /lib/systemd/system/initrd-switch-root.target.requires/${NEWROOT#/}.mount -+ # fi - - wait_for_dev "${root#block:}" - fi -diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service -index 13671e4..1ed50a9 100644 ---- a/modules.d/98systemd/dracut-cmdline.service -+++ b/modules.d/98systemd/dracut-cmdline.service -@@ -16,10 +16,8 @@ Wants=systemd-journald.socket - ConditionPathExists=/etc/initrd-release - - [Service] --Environment=HOME=/ --WorkingDirectory=/ --ExecStart=-/bin/dracut-cmdline - Type=oneshot -+ExecStart=-/bin/dracut-cmdline - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service -index 5168677..e611e93 100644 ---- a/modules.d/98systemd/dracut-initqueue.service -+++ b/modules.d/98systemd/dracut-initqueue.service -@@ -15,10 +15,8 @@ Wants=systemd-udev-trigger.service - ConditionPathExists=/etc/initrd-release - - [Service] --Environment=HOME=/ --WorkingDirectory=/ -+Type=oneshot - ExecStart=-/bin/dracut-initqueue --Type=simple - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh -index bc63582..cfdb12d 100755 ---- a/modules.d/98systemd/dracut-initqueue.sh -+++ b/modules.d/98systemd/dracut-initqueue.sh -@@ -106,5 +106,4 @@ done - - export -p > /dracut-state.sh - --systemctl isolate initrd-switch-root.target - exit 0 -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index 27cb7de..61257cf 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -10,14 +10,13 @@ - [Unit] - Description=Dracut pre-pivot and cleanup hook - DefaultDependencies=no --Before=initrd-switch-root.service -+After=dracut-initqueue.service - ConditionPathExists=/etc/initrd-release - - [Service] --Environment=HOME=/ --WorkingDirectory=/ --ExecStart=-/bin/dracut-pre-pivot - Type=oneshot -+ExecStart=-/bin/dracut-pre-pivot -+ExecStopPost=-/usr/bin/systemctl isolate initrd-switch-root.target - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 06642d0..31dded5 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -34,20 +34,9 @@ done - - echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf - --udevadm control --stop-exec-queue -- --for i in systemd-udevd.service; do -- systemctl is-active $i >/dev/null 2>&1 && systemctl stop $i --done -- --udevadm info --cleanup-db -- - # remove helper symlink - [ -h /dev/root ] && rm -f /dev/root - - getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root" - --cp -avr /lib/systemd/system/dracut*.service /run/systemd/system/ -- --export -p > /dracut-state.sh - exit 0 -diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service -index 86c7c5e..b2dcf68 100644 ---- a/modules.d/98systemd/dracut-pre-trigger.service -+++ b/modules.d/98systemd/dracut-pre-trigger.service -@@ -16,10 +16,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service - ConditionPathExists=/etc/initrd-release - - [Service] --Environment=HOME=/ --WorkingDirectory=/ --ExecStart=-/bin/dracut-pre-trigger - Type=oneshot -+ExecStart=-/bin/dracut-pre-trigger - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service -index a320498..cc14f88 100644 ---- a/modules.d/98systemd/dracut-pre-udev.service -+++ b/modules.d/98systemd/dracut-pre-udev.service -@@ -16,10 +16,8 @@ Wants=dracut-cmdline.service - ConditionPathExists=/etc/initrd-release - - [Service] --Environment=HOME=/ --WorkingDirectory=/ --ExecStart=-/bin/dracut-pre-udev - Type=oneshot -+ExecStart=-/bin/dracut-pre-udev - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index b00292f..84fc11e 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -9,9 +9,13 @@ - Description=Switch Root - DefaultDependencies=no - ConditionPathExists=/etc/initrd-release -+OnFailure=emergency.service - - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} --ExecStopPost=-/usr/bin/systemctl isolate default.target -+ExecStopPost=-/usr/bin/systemctl restart systemd-journald.service -+StandardInput=null -+StandardOutput=null -+StandardError=null -diff --git a/modules.d/98systemd/initrd-switch-root.target b/modules.d/98systemd/initrd-switch-root.target -index 5f39711..feb7162 100644 ---- a/modules.d/98systemd/initrd-switch-root.target -+++ b/modules.d/98systemd/initrd-switch-root.target -@@ -13,4 +13,4 @@ DefaultDependencies=no - Requires=initrd-switch-root.service - Before=initrd-switch-root.service - AllowIsolate=yes -- -+Wants=systemd-journald.service -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 0387ec4..f9bb799 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -63,7 +63,7 @@ install() { - $systemdsystemunitdir/systemd-ask-password-console.service \ - $systemdsystemunitdir/halt.service \ - $systemdsystemunitdir/poweroff.service \ -- $systemdsystemunitdir/reboot.service \ -+ $systemdsystemunitdir/systemd-reboot.service \ - $systemdsystemunitdir/kexec.service \ - $systemdsystemunitdir/fsck@.service \ - $systemdsystemunitdir/systemd-udevd.service \ -@@ -142,8 +142,12 @@ install() { - - inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot - inst_simple "$moddir/dracut-pre-pivot.service" ${systemdsystemunitdir}/dracut-pre-pivot.service -- mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants" -- ln -fs ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants/dracut-pre-pivot.service" -+ ln -fs ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-pivot.service" - -+ inst_simple "$moddir/udevadm-cleanup-db.service" ${systemdsystemunitdir}/udevadm-cleanup-db.service -+ mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.requires" -+ ln -fs ../udevadm-cleanup-db.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service" -+ -+ inst_script "$moddir/service-to-run.sh" $systemdutildir/system-generators/service-to-run - } - -diff --git a/modules.d/98systemd/service-to-run.sh b/modules.d/98systemd/service-to-run.sh -new file mode 100755 -index 0000000..3e46ba4 ---- /dev/null -+++ b/modules.d/98systemd/service-to-run.sh -@@ -0,0 +1,6 @@ -+#!/bin/sh -+ -+cp -a /lib/systemd/system/dracut*.service /run/systemd/system/ -+cp -a /lib/systemd/system/initrd-* /run/systemd/system/ -+cp -a /lib/systemd/system/udevadm*.service /run/systemd/system/ -+ -diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service -new file mode 100644 -index 0000000..368a0dd ---- /dev/null -+++ b/modules.d/98systemd/udevadm-cleanup-db.service -@@ -0,0 +1,20 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Cleanup udevd DB -+DefaultDependencies=no -+ConditionPathExists=/etc/initrd-release -+Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket -+Before=initrd-switch-root.service -+ -+[Service] -+Type=oneshot -+ExecStart=-/usr/bin/udevadm info --cleanup-db -+StandardInput=null -+StandardOutput=null -+StandardError=null diff --git a/0066-plymouth-add-plymouth-wait-quit.service-to-initrd.patch b/0066-plymouth-add-plymouth-wait-quit.service-to-initrd.patch deleted file mode 100644 index 895a72e..0000000 --- a/0066-plymouth-add-plymouth-wait-quit.service-to-initrd.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0028ffac74574e39e54507f4903ca93b042a04a1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 9 Jul 2012 20:49:24 +0200 -Subject: [PATCH] plymouth: add plymouth-wait-quit.service to initrd - ---- - modules.d/50plymouth/module-setup.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh -index 10aa0da..14d9e59 100755 ---- a/modules.d/50plymouth/module-setup.sh -+++ b/modules.d/50plymouth/module-setup.sh -@@ -76,5 +76,9 @@ install() { - inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh - inst_hook emergency 50 "$moddir"/plymouth-emergency.sh - dracut_install readlink -+ -+ if [[ -x $systemdutildir/systemd ]]; then -+ dracut_install -o $systemdsystemunitdir/plymouth-quit-wait.service -+ fi - } - diff --git a/0067-TEST-01-BASIC-turn-on-systemd-debugging.patch b/0067-TEST-01-BASIC-turn-on-systemd-debugging.patch deleted file mode 100644 index 3a60a83..0000000 --- a/0067-TEST-01-BASIC-turn-on-systemd-debugging.patch +++ /dev/null @@ -1,22 +0,0 @@ -From fe5f8d0074a4a4bba11053450c71acce607f8b22 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 10 Jul 2012 09:17:48 +0200 -Subject: [PATCH] TEST-01-BASIC: turn on systemd debugging - ---- - test/TEST-01-BASIC/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index f8522e6..22feab5 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -14,7 +14,7 @@ test_run() { - -m 256M -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -watchdog ib700 -watchdog-action poweroff \ -- -append "root=LABEL=dracut rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing || return 1 - grep -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 - } diff --git a/0068-TEST-01-BASIC-enable-selinux.patch b/0068-TEST-01-BASIC-enable-selinux.patch deleted file mode 100644 index 774a551..0000000 --- a/0068-TEST-01-BASIC-enable-selinux.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9ede75b1ce0ecbeb103fe5960d3d91f53e5bbb91 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 10 Jul 2012 10:32:43 +0200 -Subject: [PATCH] TEST-01-BASIC: enable selinux - ---- - test/TEST-01-BASIC/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 22feab5..850da77 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -14,7 +14,7 @@ test_run() { - -m 256M -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -watchdog ib700 -watchdog-action poweroff \ -- -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing || return 1 - grep -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 - } diff --git a/0069-install-dracut-install.c-redirect-stderr-to-stdout-a.patch b/0069-install-dracut-install.c-redirect-stderr-to-stdout-a.patch deleted file mode 100644 index 3432206..0000000 --- a/0069-install-dracut-install.c-redirect-stderr-to-stdout-a.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a92311074b487608bfd632ae3b443067d237b6f8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 10 Jul 2012 10:53:28 +0200 -Subject: [PATCH] install/dracut-install.c: redirect stderr to stdout and skip - loader - -skip if ldd was run on the loader ---- - install/dracut-install.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 1d5748d..ee6950a 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -268,7 +268,7 @@ static int resolve_deps(const char *src) - } - - /* run ldd */ -- asprintf(&cmd, "ldd %s", src); -+ asprintf(&cmd, "ldd %s 2>&1", src); - fptr = popen(cmd, "r"); - - while (!feof(fptr)) { -@@ -282,6 +282,9 @@ static int resolve_deps(const char *src) - if (strstr(buf, "not a dynamic executable")) - break; - -+ if (strstr(buf, "loader cannot load itself")) -+ break; -+ - p = strstr(buf, "/"); - if (p) { - int r; diff --git a/0070-systemd-initrd-switch-root.service-stop-journald-rat.patch b/0070-systemd-initrd-switch-root.service-stop-journald-rat.patch deleted file mode 100644 index 1610e83..0000000 --- a/0070-systemd-initrd-switch-root.service-stop-journald-rat.patch +++ /dev/null @@ -1,23 +0,0 @@ -From ad401d1eaf51677ac324523f9e11869cb29fee11 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 10 Jul 2012 16:19:56 +0200 -Subject: [PATCH] systemd/initrd-switch-root.service: stop journald, rather - than restart - ---- - modules.d/98systemd/initrd-switch-root.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index 84fc11e..493b085 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -15,7 +15,7 @@ OnFailure=emergency.service - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} --ExecStopPost=-/usr/bin/systemctl restart systemd-journald.service -+ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service - StandardInput=null - StandardOutput=null - StandardError=null diff --git a/0071-systemd-install-all-dracut-units-in-etc-and-let-the-.patch b/0071-systemd-install-all-dracut-units-in-etc-and-let-the-.patch deleted file mode 100644 index f39d691..0000000 --- a/0071-systemd-install-all-dracut-units-in-etc-and-let-the-.patch +++ /dev/null @@ -1,108 +0,0 @@ -From bef2fd9722c6f2fd972515c41963639e3bae0bc7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 10 Jul 2012 16:20:23 +0200 -Subject: [PATCH] systemd: install all dracut units in /etc and let the - generator cp to /run - -All custom units, which should appear in the system later on should be -installed in /etc/systemd. They should have a guard like: -ConditionPathExists=/etc/initrd-release - -So, we can later query via systemctl: - -$ systemctl status dracut-initqueue.service -dracut-initqueue.service - Dracut initqueue hook - Loaded: loaded (/run/systemd/system/dracut-initqueue.service; enabled-runtime) - Active: inactive (dead) since Tue, 10 Jul 2012 16:01:22 +0200; 1min 37s ago - start condition failed at Tue, 10 Jul 2012 16:01:23 +0200; 1min 36s ago - Main PID: 173 (code=exited, status=0/SUCCESS) - CGroup: name=systemd:/system/dracut-initqueue.service - -Jul 10 16:01:22 lenovo dracut-initqueue[173]: Checking, if btrfs device complete -Jul 10 16:01:22 lenovo dracut-initqueue[173]: Remounting /dev/disk/by-uuid/ade13292-d23f-45be-b732-fa9a391a56b0 with -o compress=lzo,ssd,rw -Jul 10 16:01:22 lenovo dracut-initqueue[173]: Mounted root filesystem /dev/sda3 ---- - modules.d/98systemd/module-setup.sh | 41 ++++++++++++++++----------------- - modules.d/98systemd/service-to-run.sh | 6 ++--- - 2 files changed, 22 insertions(+), 25 deletions(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index f9bb799..5cb236c 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -112,42 +112,41 @@ install() { - - ln -fs $systemdutildir/systemd "$initdir/init" - -- rm -f "${initdir}${systemdsystemunitdir}/emergency.service" - inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service -- -- rm -f "${initdir}${systemdsystemunitdir}/rescue.service" - inst_simple "$moddir/rescue.service" ${systemdsystemunitdir}/rescue.service -+ ln -fs "basic.target" "${initdir}${systemdsystemunitdir}/default.target" -+ -+ dracutsystemunitdir="/etc/systemd/system" - -- inst_simple "$moddir/initrd-switch-root.target" ${systemdsystemunitdir}/initrd-switch-root.target -- inst_simple "$moddir/initrd-switch-root.service" ${systemdsystemunitdir}/initrd-switch-root.service -- ln -fs basic.target "${initdir}${systemdsystemunitdir}/default.target" -+ mkdir -p "${initdir}${dracutsystemunitdir}/basic.target.wants" - -- mkdir -p "${initdir}${systemdsystemunitdir}/basic.target.wants" -+ inst_simple "$moddir/initrd-switch-root.target" ${dracutsystemunitdir}/initrd-switch-root.target -+ inst_simple "$moddir/initrd-switch-root.service" ${dracutsystemunitdir}/initrd-switch-root.service - - inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline -- inst_simple "$moddir/dracut-cmdline.service" ${systemdsystemunitdir}/dracut-cmdline.service -- ln -fs ../dracut-cmdline.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-cmdline.service" -+ inst_simple "$moddir/dracut-cmdline.service" ${dracutsystemunitdir}/dracut-cmdline.service -+ ln -fs ../dracut-cmdline.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-cmdline.service" - - inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev -- inst_simple "$moddir/dracut-pre-udev.service" ${systemdsystemunitdir}/dracut-pre-udev.service -- ln -fs ../dracut-pre-udev.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-udev.service" -+ inst_simple "$moddir/dracut-pre-udev.service" ${dracutsystemunitdir}/dracut-pre-udev.service -+ ln -fs ../dracut-pre-udev.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-udev.service" - - inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger -- inst_simple "$moddir/dracut-pre-trigger.service" ${systemdsystemunitdir}/dracut-pre-trigger.service -- ln -fs ../dracut-pre-trigger.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-trigger.service" -+ inst_simple "$moddir/dracut-pre-trigger.service" ${dracutsystemunitdir}/dracut-pre-trigger.service -+ ln -fs ../dracut-pre-trigger.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-trigger.service" - - inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue -- inst_simple "$moddir/dracut-initqueue.service" ${systemdsystemunitdir}/dracut-initqueue.service -- ln -fs ../dracut-initqueue.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-initqueue.service" -+ inst_simple "$moddir/dracut-initqueue.service" ${dracutsystemunitdir}/dracut-initqueue.service -+ ln -fs ../dracut-initqueue.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-initqueue.service" - - inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot -- inst_simple "$moddir/dracut-pre-pivot.service" ${systemdsystemunitdir}/dracut-pre-pivot.service -- ln -fs ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-pivot.service" -+ inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service -+ ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-pivot.service" - -- inst_simple "$moddir/udevadm-cleanup-db.service" ${systemdsystemunitdir}/udevadm-cleanup-db.service -- mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.requires" -- ln -fs ../udevadm-cleanup-db.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service" -+ inst_simple "$moddir/udevadm-cleanup-db.service" ${dracutsystemunitdir}/udevadm-cleanup-db.service -+ mkdir -p "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires" -+ ln -fs ../udevadm-cleanup-db.service "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service" - -- inst_script "$moddir/service-to-run.sh" $systemdutildir/system-generators/service-to-run -+ inst_script "$moddir/service-to-run.sh" "${systemdutildir}/system-generators/service-to-run" - } - -diff --git a/modules.d/98systemd/service-to-run.sh b/modules.d/98systemd/service-to-run.sh -index 3e46ba4..797958e 100755 ---- a/modules.d/98systemd/service-to-run.sh -+++ b/modules.d/98systemd/service-to-run.sh -@@ -1,6 +1,4 @@ - #!/bin/sh -- --cp -a /lib/systemd/system/dracut*.service /run/systemd/system/ --cp -a /lib/systemd/system/initrd-* /run/systemd/system/ --cp -a /lib/systemd/system/udevadm*.service /run/systemd/system/ -+mkdir -p /run/systemd/system/ -+cp -a -t /run/systemd/system/ /etc/systemd/system/* - diff --git a/0072-test-server-init.sh-redirect-stdin-out-err-to-dev-co.patch b/0072-test-server-init.sh-redirect-stdin-out-err-to-dev-co.patch deleted file mode 100644 index 6c9ffa7..0000000 --- a/0072-test-server-init.sh-redirect-stdin-out-err-to-dev-co.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 4dda0095a1aabb86486f1e4c1b9a8b32250cc960 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 08:40:45 +0200 -Subject: [PATCH] test/*/server-init.sh: redirect stdin,out,err to - /dev/console - ---- - test/TEST-20-NFS/server-init.sh | 2 +- - test/TEST-30-ISCSI/server-init.sh | 2 ++ - test/TEST-40-NBD/server-init.sh | 2 ++ - test/TEST-50-MULTINIC/server-init.sh | 2 +- - 4 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-20-NFS/server-init.sh b/test/TEST-20-NFS/server-init.sh -index c3c0238..58fdeee 100755 ---- a/test/TEST-20-NFS/server-init.sh -+++ b/test/TEST-20-NFS/server-init.sh -@@ -1,5 +1,5 @@ - #!/bin/sh --exec >/dev/console 2>&1 -+exec /dev/console 2>&1 - set -x - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - export TERM=linux -diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh -index 6f24b60..091f4ee 100755 ---- a/test/TEST-30-ISCSI/server-init.sh -+++ b/test/TEST-30-ISCSI/server-init.sh -@@ -1,4 +1,6 @@ - #!/bin/sh -+exec /dev/console 2>&1 -+set -x - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - export TERM=linux - export PS1='nfstest-server:\w\$ ' -diff --git a/test/TEST-40-NBD/server-init.sh b/test/TEST-40-NBD/server-init.sh -index e8f899c..8d2dd6d 100755 ---- a/test/TEST-40-NBD/server-init.sh -+++ b/test/TEST-40-NBD/server-init.sh -@@ -1,4 +1,6 @@ - #!/bin/sh -+exec /dev/console 2>&1 -+set -x - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - export TERM=linux - export PS1='nbdtest-server:\w\$ ' -diff --git a/test/TEST-50-MULTINIC/server-init.sh b/test/TEST-50-MULTINIC/server-init.sh -index 01470e1..43d7f40 100755 ---- a/test/TEST-50-MULTINIC/server-init.sh -+++ b/test/TEST-50-MULTINIC/server-init.sh -@@ -1,5 +1,5 @@ - #!/bin/sh --exec >/dev/console 2>&1 -+exec /dev/console 2>&1 - set -x - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - export TERM=linux diff --git a/0073-systemd-initrd-switch-root.target-add-ConditionPathE.patch b/0073-systemd-initrd-switch-root.target-add-ConditionPathE.patch deleted file mode 100644 index 8419cbb..0000000 --- a/0073-systemd-initrd-switch-root.target-add-ConditionPathE.patch +++ /dev/null @@ -1,18 +0,0 @@ -From fc5b6b03281b10fc7c4de460574f1d5efb5f309a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 08:41:31 +0200 -Subject: [PATCH] systemd/initrd-switch-root.target: add ConditionPathExist - ---- - modules.d/98systemd/initrd-switch-root.target | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/98systemd/initrd-switch-root.target b/modules.d/98systemd/initrd-switch-root.target -index feb7162..74647a5 100644 ---- a/modules.d/98systemd/initrd-switch-root.target -+++ b/modules.d/98systemd/initrd-switch-root.target -@@ -14,3 +14,4 @@ Requires=initrd-switch-root.service - Before=initrd-switch-root.service - AllowIsolate=yes - Wants=systemd-journald.service -+ConditionPathExists=/etc/initrd-release diff --git a/0074-kernel-modules-module-setup.sh-also-install-lib-modp.patch b/0074-kernel-modules-module-setup.sh-also-install-lib-modp.patch deleted file mode 100644 index 9feb309..0000000 --- a/0074-kernel-modules-module-setup.sh-also-install-lib-modp.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9f5c98a76a2c319045c7f6091a1083da1b74f740 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 08:42:21 +0200 -Subject: [PATCH] kernel-modules/module-setup.sh: also install - /lib/modprobe.d/*.conf - -In theory we should only install /lib/modprobe.d/*.conf and only for -host-only the /etc/modprobe.d. ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 8822fa7..1744e53 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -77,7 +77,7 @@ installkernel() { - install() { - local _f i - [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf -- dracut_install $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf') -+ dracut_install $(find -L /{etc,lib}/modprobe.d/ -maxdepth 1 -type f -name '*.conf') - inst_hook cmdline 01 "$moddir/parse-kernel.sh" - inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh - } diff --git a/0075-nfs-install-modprobe-config-file.patch b/0075-nfs-install-modprobe-config-file.patch deleted file mode 100644 index 12c2d2f..0000000 --- a/0075-nfs-install-modprobe-config-file.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 83a420674b7c1328ffb944678619595a431ffa48 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Wed, 11 Jul 2012 13:08:18 +0800 -Subject: [PATCH] nfs: install modprobe config file - -install nfs modprobe config file - -For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load -nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf -in which there's below alias: -alias nfs4 nfs - -Dracut also need this file to auto load nfs kernel module. - -Tested booting to a fedora 17 nfsroot share. - -Signed-off-by: Dave Young ---- - modules.d/95nfs/module-setup.sh | 6 ++++++ - modules.d/95nfs/parse-nfsroot.sh | 7 ------- - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index b170de5..0c07725 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -35,6 +35,12 @@ install() { - mount.nfs4 umount rpc.idmapd sed /etc/netconfig - dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf - -+ if [ -f /lib/modprobe.d/nfs.conf ]; then -+ dracut_install /lib/modprobe.d/nfs.conf -+ else -+ echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf -+ fi -+ - inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*' - - _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ -diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh -index 4e69edc..769d233 100755 ---- a/modules.d/95nfs/parse-nfsroot.sh -+++ b/modules.d/95nfs/parse-nfsroot.sh -@@ -88,13 +88,6 @@ nfsroot_to_var $netroot - # Set fstype, might help somewhere - fstype=${nfs#/dev/} - --# NFS actually supported? Some more uglyness here: nfs3 or nfs4 might not --# be in the module... --if ! incol2 /proc/filesystems $fstype ; then -- modprobe nfs -- incol2 /proc/filesystems $fstype || die "nfsroot type $fstype requested but kernel/initrd does not support nfs" --fi -- - # Rewrite root so we don't have to parse this uglyness later on again - netroot="$fstype:$server:$path:$options" - diff --git a/0076-test-add-support-for-make-V-1-TESTS-01-20-40-check.patch b/0076-test-add-support-for-make-V-1-TESTS-01-20-40-check.patch deleted file mode 100644 index e2d5b3e..0000000 --- a/0076-test-add-support-for-make-V-1-TESTS-01-20-40-check.patch +++ /dev/null @@ -1,307 +0,0 @@ -From 3e1d48fd1279b46a837ed3835f6e686ac9120c4d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 09:33:32 +0200 -Subject: [PATCH] test: add support for: make V=1 TESTS="01 20 40" check - -$ sudo make V=1 clean check -now runs the testsuite in verbose mode - -$ sudo make TESTS="01 20 40" clean check -now only runs the 01, 20 and 40 tests. ---- - test/Makefile | 5 +++-- - test/TEST-01-BASIC/Makefile | 6 +++--- - test/TEST-02-SYSTEMD/Makefile | 6 +++--- - test/TEST-03-USR-MOUNT/Makefile | 6 +++--- - test/TEST-10-RAID/Makefile | 6 +++--- - test/TEST-11-LVM/Makefile | 6 +++--- - test/TEST-12-RAID-DEG/Makefile | 6 +++--- - test/TEST-13-ENC-RAID-LVM/Makefile | 6 +++--- - test/TEST-15-BTRFSRAID/Makefile | 6 +++--- - test/TEST-16-DMSQUASH/Makefile | 6 +++--- - test/TEST-20-NFS/Makefile | 6 +++--- - test/TEST-30-ISCSI/Makefile | 6 +++--- - test/TEST-40-NBD/Makefile | 6 +++--- - test/TEST-50-MULTINIC/Makefile | 6 +++--- - test/TEST-99-RPM/Makefile | 6 +++--- - test/test-functions | 13 +++++++++++++ - 16 files changed, 58 insertions(+), 44 deletions(-) - -diff --git a/test/Makefile b/test/Makefile -index 38bfecc..f4881b5 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -4,14 +4,15 @@ check: - @for i in TEST-[0-9]*; do \ - [ -d $$i ] || continue ; \ - [ -f $$i/Makefile ] || continue ; \ -- make -C $$i all ; \ -+ if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ -+ $(MAKE) -C $$i all ; \ - done - - clean: - @for i in TEST-[0-9]*; do \ - [ -d $$i ] || continue ; \ - [ -f $$i/Makefile ] || continue ; \ -- make -C $$i clean ; \ -+ $(MAKE) -C $$i clean ; \ - done - - all: -diff --git a/test/TEST-01-BASIC/Makefile b/test/TEST-01-BASIC/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-01-BASIC/Makefile -+++ b/test/TEST-01-BASIC/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-02-SYSTEMD/Makefile b/test/TEST-02-SYSTEMD/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-02-SYSTEMD/Makefile -+++ b/test/TEST-02-SYSTEMD/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-03-USR-MOUNT/Makefile b/test/TEST-03-USR-MOUNT/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-03-USR-MOUNT/Makefile -+++ b/test/TEST-03-USR-MOUNT/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-10-RAID/Makefile b/test/TEST-10-RAID/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-10-RAID/Makefile -+++ b/test/TEST-10-RAID/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-11-LVM/Makefile b/test/TEST-11-LVM/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-11-LVM/Makefile -+++ b/test/TEST-11-LVM/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-12-RAID-DEG/Makefile b/test/TEST-12-RAID-DEG/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-12-RAID-DEG/Makefile -+++ b/test/TEST-12-RAID-DEG/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-13-ENC-RAID-LVM/Makefile b/test/TEST-13-ENC-RAID-LVM/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-13-ENC-RAID-LVM/Makefile -+++ b/test/TEST-13-ENC-RAID-LVM/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-15-BTRFSRAID/Makefile b/test/TEST-15-BTRFSRAID/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-15-BTRFSRAID/Makefile -+++ b/test/TEST-15-BTRFSRAID/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-16-DMSQUASH/Makefile b/test/TEST-16-DMSQUASH/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-16-DMSQUASH/Makefile -+++ b/test/TEST-16-DMSQUASH/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-20-NFS/Makefile b/test/TEST-20-NFS/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-20-NFS/Makefile -+++ b/test/TEST-20-NFS/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-30-ISCSI/Makefile b/test/TEST-30-ISCSI/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-30-ISCSI/Makefile -+++ b/test/TEST-30-ISCSI/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-40-NBD/Makefile b/test/TEST-40-NBD/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-40-NBD/Makefile -+++ b/test/TEST-40-NBD/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-50-MULTINIC/Makefile b/test/TEST-50-MULTINIC/Makefile -index bc0ddb6..3cc8993 100644 ---- a/test/TEST-50-MULTINIC/Makefile -+++ b/test/TEST-50-MULTINIC/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. all -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. all -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/TEST-99-RPM/Makefile b/test/TEST-99-RPM/Makefile -index 5513c52..3cc8993 100644 ---- a/test/TEST-99-RPM/Makefile -+++ b/test/TEST-99-RPM/Makefile -@@ -1,8 +1,8 @@ - all: -- @make -s --no-print-directory -C ../.. clean all rpm -- @basedir=../.. testdir=../ ./test.sh --all -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: -- @make --no-print-directory -C ../.. clean rpm -+ @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup - clean: - @basedir=../.. testdir=../ ./test.sh --clean -diff --git a/test/test-functions b/test/test-functions -index 10d78ed..968551f 100644 ---- a/test/test-functions -+++ b/test/test-functions -@@ -37,6 +37,7 @@ while (($# > 0)); do - echo "[SKIPPED]" - exit 0; - fi -+ if [ "$V" != "1" ]; then - ( - test_setup && test_run - ret=$? -@@ -45,7 +46,19 @@ while (($# > 0)); do - rm -f .testdir - exit $ret - ) test.log 2>&1 -+ else -+ set -o pipefail -+ ( -+ test_setup && test_run -+ ret=$? -+ test_cleanup -+ rm -fr "$TESTDIR" -+ rm -f .testdir -+ exit $ret -+ ) &1 | tee test.log -+ fi - ret=$? -+ set +o pipefail - if [ $ret -eq 0 ]; then - rm test.log - echo "[OK]" diff --git a/0077-dracut-shutdown.service-s-reboot.service-systemd-reb.patch b/0077-dracut-shutdown.service-s-reboot.service-systemd-reb.patch deleted file mode 100644 index f942362..0000000 --- a/0077-dracut-shutdown.service-s-reboot.service-systemd-reb.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0d5727039578d58dd5f9d2e718e3433a3da876b0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 10:00:10 +0200 -Subject: [PATCH] dracut-shutdown.service: - s/reboot.service/systemd-reboot.service/ - ---- - dracut-shutdown.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-shutdown.service b/dracut-shutdown.service -index f96418b..da3a537 100644 ---- a/dracut-shutdown.service -+++ b/dracut-shutdown.service -@@ -8,7 +8,7 @@ - [Unit] - Description=Restore /run/initramfs - After=getty@tty1.service prefdm.service --Before=reboot.service shutdown.target -+Before=systemd-reboot.service shutdown.target - DefaultDependencies=no - ConditionPathExists=/run/initramfs/.need_shutdown - ConditionPathExists=!/run/initramfs/bin/sh diff --git a/0078-test-TEST-04-FULL-SYSTEMD-full-test-with-systemd-and.patch b/0078-test-TEST-04-FULL-SYSTEMD-full-test-with-systemd-and.patch deleted file mode 100644 index 222723e..0000000 --- a/0078-test-TEST-04-FULL-SYSTEMD-full-test-with-systemd-and.patch +++ /dev/null @@ -1,443 +0,0 @@ -From badda27f61706a4ceed2098b2057c3ec0206617d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 15:15:41 +0200 -Subject: [PATCH] test/TEST-04-FULL-SYSTEMD: full test with systemd and /usr - mount - ---- - test/TEST-04-FULL-SYSTEMD/99-idesymlinks.rules | 8 + - test/TEST-04-FULL-SYSTEMD/Makefile | 10 + - test/TEST-04-FULL-SYSTEMD/create-root.sh | 39 ++++ - test/TEST-04-FULL-SYSTEMD/cryptroot-ask.sh | 6 + - test/TEST-04-FULL-SYSTEMD/fstab | 2 + - test/TEST-04-FULL-SYSTEMD/hard-off.sh | 3 + - test/TEST-04-FULL-SYSTEMD/test-init.sh | 29 +++ - test/TEST-04-FULL-SYSTEMD/test.sh | 273 ++++++++++++++++++++++++ - 8 files changed, 370 insertions(+) - create mode 100644 test/TEST-04-FULL-SYSTEMD/99-idesymlinks.rules - create mode 100644 test/TEST-04-FULL-SYSTEMD/Makefile - create mode 100755 test/TEST-04-FULL-SYSTEMD/create-root.sh - create mode 100755 test/TEST-04-FULL-SYSTEMD/cryptroot-ask.sh - create mode 100644 test/TEST-04-FULL-SYSTEMD/fstab - create mode 100755 test/TEST-04-FULL-SYSTEMD/hard-off.sh - create mode 100755 test/TEST-04-FULL-SYSTEMD/test-init.sh - create mode 100755 test/TEST-04-FULL-SYSTEMD/test.sh - -diff --git a/test/TEST-04-FULL-SYSTEMD/99-idesymlinks.rules b/test/TEST-04-FULL-SYSTEMD/99-idesymlinks.rules -new file mode 100644 -index 0000000..d557790 ---- /dev/null -+++ b/test/TEST-04-FULL-SYSTEMD/99-idesymlinks.rules -@@ -0,0 +1,8 @@ -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" -diff --git a/test/TEST-04-FULL-SYSTEMD/Makefile b/test/TEST-04-FULL-SYSTEMD/Makefile -new file mode 100644 -index 0000000..3cc8993 ---- /dev/null -+++ b/test/TEST-04-FULL-SYSTEMD/Makefile -@@ -0,0 +1,10 @@ -+all: -+ $(MAKE) -s --no-print-directory -C ../.. all -+ V=$(V) basedir=../.. testdir=../ ./test.sh --all -+setup: -+ @$(MAKE) --no-print-directory -C ../.. all -+ @basedir=../.. testdir=../ ./test.sh --setup -+clean: -+ @basedir=../.. testdir=../ ./test.sh --clean -+run: -+ @basedir=../.. testdir=../ ./test.sh --run -diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh -new file mode 100755 -index 0000000..2e33920 ---- /dev/null -+++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh -@@ -0,0 +1,39 @@ -+#!/bin/sh -+# don't let udev and this script step on eachother's toes -+for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do -+ > "/etc/udev/rules.d/$x" -+done -+rm /etc/lvm/lvm.conf -+udevadm control --reload-rules -+set -e -+# save a partition at the beginning for future flagging purposes -+sfdisk -C 10240 -H 2 -S 32 -L /dev/sda </dev/sda1 -+sync -+poweroff -f -+ -diff --git a/test/TEST-04-FULL-SYSTEMD/cryptroot-ask.sh b/test/TEST-04-FULL-SYSTEMD/cryptroot-ask.sh -new file mode 100755 -index 0000000..db27c5b ---- /dev/null -+++ b/test/TEST-04-FULL-SYSTEMD/cryptroot-ask.sh -@@ -0,0 +1,6 @@ -+#!/bin/sh -+ -+[ -b /dev/mapper/$2 ] && exit 0 -+echo -n test >/keyfile -+/sbin/cryptsetup luksOpen $1 $2 /dev/watchdog -+export PATH=/sbin:/bin:/usr/sbin:/usr/bin -+strstr() { [ "${1#*$2*}" != "$1" ]; } -+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) -+plymouth --quit -+exec /dev/console 2>&1 -+ -+ismounted() { -+ while read a m a; do -+ [ "$m" = "$1" ] && return 0 -+ done < /proc/mounts -+ return 1 -+} -+ -+if ismounted /usr; then -+ echo "dracut-root-block-success" >/dev/sdc -+fi -+export TERM=linux -+export PS1='initramfs-test:\w\$ ' -+[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab -+[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab -+stty sane -+echo "made it to the rootfs!" -+if strstr "$CMDLINE" "rd.shell"; then -+ strstr "$(setsid --help)" "control" && CTTY="-c" -+ setsid $CTTY sh -i -+fi -+echo "Powering down." -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -new file mode 100755 -index 0000000..921189f ---- /dev/null -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -0,0 +1,273 @@ -+#!/bin/bash -+ -+TEST_DESCRIPTION="Full systemd serialization/deserialization test with /usr mount" -+ -+KVERSION=${KVERSION-$(uname -r)} -+ -+# Uncomment this to debug failures -+#DEBUGFAIL="rd.shell rd.break" -+ -+client_run() { -+ local test_name="$1"; shift -+ local client_opts="$*" -+ -+ echo "CLIENT TEST START: $test_name" -+ -+ dd if=/dev/zero of=$TESTDIR/result bs=1M count=1 -+ $testdir/run-qemu \ -+ -hda $TESTDIR/root.btrfs \ -+ -hdb $TESTDIR/usr.btrfs \ -+ -hdc $TESTDIR/result \ -+ -m 256M -nographic \ -+ -net none -kernel /boot/vmlinuz-$KVERSION \ -+ -append "root=LABEL=dracut $client_opts quiet systemd.log_level=debug systemd.log_target=console loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -initrd $TESTDIR/initramfs.testing -+ -+ if (($? != 0)); then -+ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" -+ return 1 -+ fi -+ -+ if ! grep -m 1 -q dracut-root-block-success $TESTDIR/result; then -+ echo "CLIENT TEST END: $test_name [FAILED]" -+ return 1 -+ fi -+ echo "CLIENT TEST END: $test_name [OK]" -+ -+} -+ -+test_run() { -+ client_run "no option specified" || return 1 -+ client_run "readonly root" "ro" || return 1 -+ client_run "writeable root" "rw" || return 1 -+ return 0 -+} -+ -+test_setup() { -+ rm -f $TESTDIR/root.btrfs -+ rm -f $TESTDIR/usr.btrfs -+ # Create the blank file to use as a root filesystem -+ dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=320 -+ dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=320 -+ -+ kernel=$KVERSION -+ # Create what will eventually be our root filesystem onto an overlay -+ ( -+ export initdir=$TESTDIR/overlay/source -+ mkdir -p $initdir -+ . $basedir/dracut-functions.sh -+ -+ for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run run/lock run/initramfs; do -+ if [ -L "/$d" ]; then -+ inst_symlink "/$d" -+ else -+ inst_dir "/$d" -+ fi -+ done -+ -+ ln -sfn /run "$initdir/var/run" -+ ln -sfn /run/lock "$initdir/var/lock" -+ -+ dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -+ mount dmesg ifconfig dhclient mkdir cp ping dhclient \ -+ umount strace less setsid -+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do -+ [ -f ${_terminfodir}/l/linux ] && break -+ done -+ dracut_install -o ${_terminfodir}/l/linux -+ inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script" -+ inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" -+ dracut_install grep -+ inst_simple ./fstab /etc/fstab -+ rpm -ql systemd | xargs -r $DRACUT_INSTALL ${initdir+-D "$initdir"} -o -a -l -+ inst /lib/systemd/system/systemd-journal-flush.service -+ inst /etc/sysconfig/init -+ # activate kmsg import -+ echo 'ImportKernel=yes' >> $initdir/etc/systemd/journald.conf -+ -+ # make a journal directory -+ mkdir -p $initdir/var/log/journal -+ -+ # install some basic config files -+ dracut_install -o \ -+ /etc/sysconfig/init \ -+ /etc/passwd \ -+ /etc/shadow \ -+ /etc/group \ -+ /etc/shells \ -+ /etc/nsswitch.conf \ -+ /etc/pam.conf \ -+ /etc/securetty \ -+ /etc/os-release \ -+ /etc/localtime -+ -+ # we want an empty environment -+ > $initdir/etc/environment -+ > $initdir/etc/machine-id -+ -+ # set the hostname -+ echo systemd-testsuite > $initdir/etc/hostname -+ -+ # setup the testsuite target -+ cat >$initdir/etc/systemd/system/testsuite.target <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/rc.d/rc.local < -Date: Wed, 11 Jul 2012 15:23:21 +0200 -Subject: [PATCH] test: silence "make all" - ---- - test/TEST-01-BASIC/Makefile | 4 ++-- - test/TEST-02-SYSTEMD/Makefile | 4 ++-- - test/TEST-03-USR-MOUNT/Makefile | 4 ++-- - test/TEST-04-FULL-SYSTEMD/Makefile | 4 ++-- - test/TEST-10-RAID/Makefile | 4 ++-- - test/TEST-11-LVM/Makefile | 4 ++-- - test/TEST-12-RAID-DEG/Makefile | 4 ++-- - test/TEST-13-ENC-RAID-LVM/Makefile | 4 ++-- - test/TEST-15-BTRFSRAID/Makefile | 4 ++-- - test/TEST-16-DMSQUASH/Makefile | 4 ++-- - test/TEST-20-NFS/Makefile | 4 ++-- - test/TEST-30-ISCSI/Makefile | 4 ++-- - test/TEST-40-NBD/Makefile | 4 ++-- - test/TEST-50-MULTINIC/Makefile | 4 ++-- - test/TEST-99-RPM/Makefile | 4 ++-- - 15 files changed, 30 insertions(+), 30 deletions(-) - -diff --git a/test/TEST-01-BASIC/Makefile b/test/TEST-01-BASIC/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-01-BASIC/Makefile -+++ b/test/TEST-01-BASIC/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-02-SYSTEMD/Makefile b/test/TEST-02-SYSTEMD/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-02-SYSTEMD/Makefile -+++ b/test/TEST-02-SYSTEMD/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-03-USR-MOUNT/Makefile b/test/TEST-03-USR-MOUNT/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-03-USR-MOUNT/Makefile -+++ b/test/TEST-03-USR-MOUNT/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-04-FULL-SYSTEMD/Makefile b/test/TEST-04-FULL-SYSTEMD/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-04-FULL-SYSTEMD/Makefile -+++ b/test/TEST-04-FULL-SYSTEMD/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-10-RAID/Makefile b/test/TEST-10-RAID/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-10-RAID/Makefile -+++ b/test/TEST-10-RAID/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-11-LVM/Makefile b/test/TEST-11-LVM/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-11-LVM/Makefile -+++ b/test/TEST-11-LVM/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-12-RAID-DEG/Makefile b/test/TEST-12-RAID-DEG/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-12-RAID-DEG/Makefile -+++ b/test/TEST-12-RAID-DEG/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-13-ENC-RAID-LVM/Makefile b/test/TEST-13-ENC-RAID-LVM/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-13-ENC-RAID-LVM/Makefile -+++ b/test/TEST-13-ENC-RAID-LVM/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-15-BTRFSRAID/Makefile b/test/TEST-15-BTRFSRAID/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-15-BTRFSRAID/Makefile -+++ b/test/TEST-15-BTRFSRAID/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-16-DMSQUASH/Makefile b/test/TEST-16-DMSQUASH/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-16-DMSQUASH/Makefile -+++ b/test/TEST-16-DMSQUASH/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-20-NFS/Makefile b/test/TEST-20-NFS/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-20-NFS/Makefile -+++ b/test/TEST-20-NFS/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-30-ISCSI/Makefile b/test/TEST-30-ISCSI/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-30-ISCSI/Makefile -+++ b/test/TEST-30-ISCSI/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-40-NBD/Makefile b/test/TEST-40-NBD/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-40-NBD/Makefile -+++ b/test/TEST-40-NBD/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-50-MULTINIC/Makefile b/test/TEST-50-MULTINIC/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-50-MULTINIC/Makefile -+++ b/test/TEST-50-MULTINIC/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup -diff --git a/test/TEST-99-RPM/Makefile b/test/TEST-99-RPM/Makefile -index 3cc8993..aad2705 100644 ---- a/test/TEST-99-RPM/Makefile -+++ b/test/TEST-99-RPM/Makefile -@@ -1,6 +1,6 @@ - all: -- $(MAKE) -s --no-print-directory -C ../.. all -- V=$(V) basedir=../.. testdir=../ ./test.sh --all -+ @$(MAKE) -s --no-print-directory -C ../.. all -+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all - setup: - @$(MAKE) --no-print-directory -C ../.. all - @basedir=../.. testdir=../ ./test.sh --setup diff --git a/0080-systemd-fixed-initrd-switch-root.service.patch b/0080-systemd-fixed-initrd-switch-root.service.patch deleted file mode 100644 index 885f4a6..0000000 --- a/0080-systemd-fixed-initrd-switch-root.service.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f60cd2593f39b381be3948811a20107029e717d0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 15:25:30 +0200 -Subject: [PATCH] systemd: fixed initrd-switch-root.service - ---- - modules.d/98systemd/initrd-switch-root.service | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index 493b085..bdc4587 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -10,11 +10,13 @@ Description=Switch Root - DefaultDependencies=no - ConditionPathExists=/etc/initrd-release - OnFailure=emergency.service -+After=initrd-switch-root.target -+Before=systemd-journal-flush.service - - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf --ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} -+ExecStart=/usr/bin/systemctl switch-root ${NEWROOT} ${NEWINIT} - ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service - StandardInput=null - StandardOutput=null diff --git a/0081-dracut.sh-for-include-copy-also-the-symbolic-links.patch b/0081-dracut.sh-for-include-copy-also-the-symbolic-links.patch deleted file mode 100644 index c85c703..0000000 --- a/0081-dracut.sh-for-include-copy-also-the-symbolic-links.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 98eb6d57dffda383620f237eaee08c97bf35d863 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 15:25:49 +0200 -Subject: [PATCH] dracut.sh: for --include copy also the symbolic links - ---- - dracut.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 9be7cac..afd076a 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -934,9 +934,9 @@ while pop include_src src && pop include_target tgt; do - mkdir -m 0755 -p "$s" - chmod --reference="$i" "$s" - fi -- cp --reflink=auto --sparse=auto -pfLr -t "$s" "$i"/* -+ cp --reflink=auto --sparse=auto -fa -t "$s" "$i"/* - else -- cp --reflink=auto --sparse=auto -pfLr -t "$s" "$i" -+ cp --reflink=auto --sparse=auto -fa -t "$s" "$i" - fi - done - fi diff --git a/0082-install-dracut-install.c-check-for-empty-or-destdir.patch b/0082-install-dracut-install.c-check-for-empty-or-destdir.patch deleted file mode 100644 index 521d392..0000000 --- a/0082-install-dracut-install.c-check-for-empty-or-destdir.patch +++ /dev/null @@ -1,65 +0,0 @@ -From f6c2faebfafb95ae7ce14fe678582077af20c3c0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 15:47:10 +0200 -Subject: [PATCH] install/dracut-install.c: check for empty or "/" destdir - ---- - install/dracut-install.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index ee6950a..9351472 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -182,7 +182,7 @@ static int cp(const char *src, const char *dst) - int pid; - int ret; - -- if(use_clone) { -+ if (use_clone) { - struct stat sb; - int dest_desc, source_desc; - -@@ -197,8 +197,8 @@ static int cp(const char *src, const char *dst) - goto normal_copy; - - dest_desc = -- open(dst, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, -- (sb.st_mode) & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)); -+ open(dst, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, -+ (sb.st_mode) & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)); - - if (dest_desc < 0) { - close(source_desc); -@@ -379,7 +379,6 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - } - } - -- - i = strdup(dst); - hashmap_put(items, i, i); - -@@ -731,15 +730,21 @@ int main(int argc, char **argv) - - umask(0022); - -- if (destrootdir == NULL) { -+ if (destrootdir == NULL || strlen(destrootdir) == 0) { - destrootdir = getenv("DESTROOTDIR"); -- if (destrootdir == NULL) { -+ if (destrootdir == NULL || strlen(destrootdir) == 0) { - log_error("Environment DESTROOTDIR or argument -D is not set!"); - usage(EXIT_FAILURE); - } - destrootdir = strdup(destrootdir); - } - -+ if (strcmp(destrootdir, "/") == 0) { -+ log_error("Environment DESTROOTDIR or argument -D is set to '/'!"); -+ usage(EXIT_FAILURE); -+ -+ } -+ - items = hashmap_new(string_hash_func, string_compare_func); - items_failed = hashmap_new(string_hash_func, string_compare_func); - diff --git a/0083-systemd-initrd-switch-root.service-add-back-force-to.patch b/0083-systemd-initrd-switch-root.service-add-back-force-to.patch deleted file mode 100644 index 949fb14..0000000 --- a/0083-systemd-initrd-switch-root.service-add-back-force-to.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2499c305f92cc00474de9790d99abcdc1360d4dd Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 11 Jul 2012 16:36:05 +0200 -Subject: [PATCH] systemd/initrd-switch-root.service: add back "--force" to - switch-root - -otherwise systemd does umount /run et.al. ---- - modules.d/98systemd/initrd-switch-root.service | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index bdc4587..e38f04d 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -16,8 +16,10 @@ Before=systemd-journal-flush.service - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf --ExecStart=/usr/bin/systemctl switch-root ${NEWROOT} ${NEWINIT} -+# we have to use "--force" here, otherwise systemd would umount /run -+ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} - ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service -+ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf - StandardInput=null - StandardOutput=null - StandardError=null diff --git a/0084-watchdog-watchdog-stop.sh-forgot-to-add-script.patch b/0084-watchdog-watchdog-stop.sh-forgot-to-add-script.patch deleted file mode 100644 index dcdb945..0000000 --- a/0084-watchdog-watchdog-stop.sh-forgot-to-add-script.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 982032fd26d4b671f36a46c0a8564122cc7fde8a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 12 Jul 2012 07:01:27 +0200 -Subject: [PATCH] watchdog/watchdog-stop.sh: forgot to add script - ---- - modules.d/04watchdog/watchdog-stop.sh | 2 ++ - 1 file changed, 2 insertions(+) - create mode 100755 modules.d/04watchdog/watchdog-stop.sh - -diff --git a/modules.d/04watchdog/watchdog-stop.sh b/modules.d/04watchdog/watchdog-stop.sh -new file mode 100755 -index 0000000..91d45d6 ---- /dev/null -+++ b/modules.d/04watchdog/watchdog-stop.sh -@@ -0,0 +1,2 @@ -+#!/bin/sh -+[ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog diff --git a/0085-systemd-initrd-switch-root.service-add-some-more-dep.patch b/0085-systemd-initrd-switch-root.service-add-some-more-dep.patch deleted file mode 100644 index 7e1f2af..0000000 --- a/0085-systemd-initrd-switch-root.service-add-some-more-dep.patch +++ /dev/null @@ -1,31 +0,0 @@ -From e6bec9b793314d248085e7dd50d9d79d9a01486e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 12 Jul 2012 08:56:17 +0200 -Subject: [PATCH] systemd/initrd-switch-root.service: add some more - dependencies - ---- - modules.d/98systemd/initrd-switch-root.service | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index e38f04d..f9fd10b 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -12,14 +12,14 @@ ConditionPathExists=/etc/initrd-release - OnFailure=emergency.service - After=initrd-switch-root.target - Before=systemd-journal-flush.service -+Before=sysinit.target local-fs.target swap.target emergency.service emergency.target - - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf - # we have to use "--force" here, otherwise systemd would umount /run - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} --ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service --ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf -+ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service ; /bin/rm -f /run/initramfs/switch-root.conf - StandardInput=null - StandardOutput=null - StandardError=null diff --git a/0086-systemd-service-to-run.sh-do-not-copy-the-target-sub.patch b/0086-systemd-service-to-run.sh-do-not-copy-the-target-sub.patch deleted file mode 100644 index 43111a3..0000000 --- a/0086-systemd-service-to-run.sh-do-not-copy-the-target-sub.patch +++ /dev/null @@ -1,20 +0,0 @@ -From f31049c17f76048799017de52cb65c8906070b3e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 12 Jul 2012 08:56:36 +0200 -Subject: [PATCH] systemd/service-to-run.sh: do not copy the target subdirs - ---- - modules.d/98systemd/service-to-run.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/service-to-run.sh b/modules.d/98systemd/service-to-run.sh -index 797958e..e09acc5 100755 ---- a/modules.d/98systemd/service-to-run.sh -+++ b/modules.d/98systemd/service-to-run.sh -@@ -1,4 +1,5 @@ - #!/bin/sh - mkdir -p /run/systemd/system/ --cp -a -t /run/systemd/system/ /etc/systemd/system/* -+cp -d -t /run/systemd/system/ /etc/systemd/system/* -+exit 0 - diff --git a/0087-test-TEST-04-FULL-SYSTEMD-default-to-basic.target-an.patch b/0087-test-TEST-04-FULL-SYSTEMD-default-to-basic.target-an.patch deleted file mode 100644 index 81e4542..0000000 --- a/0087-test-TEST-04-FULL-SYSTEMD-default-to-basic.target-an.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 3d115217e4db6fc54c9cda87088f3fb212285158 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 12 Jul 2012 08:59:43 +0200 -Subject: [PATCH] test/TEST-04-FULL-SYSTEMD: default to basic.target and - output more debug - ---- - test/TEST-04-FULL-SYSTEMD/test-init.sh | 13 ++++++++++++- - test/TEST-04-FULL-SYSTEMD/test.sh | 19 ++++++++++++------- - 2 files changed, 24 insertions(+), 8 deletions(-) - -diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh -index cc26017..d41f0b0 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test-init.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh -@@ -13,9 +13,19 @@ ismounted() { - return 1 - } - --if ismounted /usr; then -+systemctl --failed --no-legend --no-pager > /failed -+ -+if ismounted /usr && [ -f /run/systemd/system/initrd-switch-root.service ] && [ ! -s /failed ]; then - echo "dracut-root-block-success" >/dev/sdc - fi -+ -+set -x -+ cat /proc/mounts -+ tree /run -+ dmesg -+ cat /failed -+set +x -+ - export TERM=linux - export PS1='initramfs-test:\w\$ ' - [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab -@@ -23,6 +33,7 @@ export PS1='initramfs-test:\w\$ ' - stty sane - echo "made it to the rootfs!" - if strstr "$CMDLINE" "rd.shell"; then -+# while sleep 1; do sleep 1;done - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i - fi -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 921189f..9a679a7 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -6,7 +6,9 @@ KVERSION=${KVERSION-$(uname -r)} - - # Uncomment this to debug failures - #DEBUGFAIL="rd.shell rd.break" -- -+#DEBUGFAIL="rd.shell" -+#DEBUGOUT="quiet systemd.log_level=debug systemd.log_target=console loglevel=77 rd.info rd.debug" -+DEBUGOUT="loglevel=0 systemd.log_level=debug systemd.log_target=kmsg" - client_run() { - local test_name="$1"; shift - local client_opts="$*" -@@ -20,7 +22,7 @@ client_run() { - -hdc $TESTDIR/result \ - -m 256M -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ -- -append "root=LABEL=dracut $client_opts quiet systemd.log_level=debug systemd.log_target=console loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - - if (($? != 0)); then -@@ -57,7 +59,7 @@ test_setup() { - mkdir -p $initdir - . $basedir/dracut-functions.sh - -- for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run run/lock run/initramfs; do -+ for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run; do - if [ -L "/$d" ]; then - inst_symlink "/$d" - else -@@ -70,7 +72,8 @@ test_setup() { - - dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - mount dmesg ifconfig dhclient mkdir cp ping dhclient \ -- umount strace less setsid -+ umount strace less setsid tree systemctl -+ - for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do - [ -f ${_terminfodir}/l/linux ] && break - done -@@ -112,8 +115,8 @@ test_setup() { - cat >$initdir/etc/systemd/system/testsuite.target <$initdir/etc/systemd/system/testsuite.service < -Date: Thu, 12 Jul 2012 10:20:28 +0200 -Subject: [PATCH] kernel-modules/module-setup.sh: add hid_generic to kernel - modules - ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 1744e53..f309de8 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -43,7 +43,7 @@ installkernel() { - hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap omapdrm sdhci_dove ahci_platform pata_imx sata_mv - - # install keyboard support -- hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd xhci-hcd -+ hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd xhci-hcd hid_generic - # install unix socket support - hostonly='' instmods unix - instmods "=drivers/pcmcia" =ide "=drivers/usb/storage" diff --git a/0089-Fixes-for-systemd-187-which-does-the-right-thing-for.patch b/0089-Fixes-for-systemd-187-which-does-the-right-thing-for.patch deleted file mode 100644 index bc8232b..0000000 --- a/0089-Fixes-for-systemd-187-which-does-the-right-thing-for.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 030ade759004cb2bf81148bfdcd0ef821f7bd429 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 16 Jul 2012 10:13:53 +0200 -Subject: [PATCH] Fixes for systemd-187, which does the right thing for - switch-root - ---- - dracut.spec | 2 +- - modules.d/98systemd/initrd-switch-root.service | 4 +--- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index c17860d..0e853fd 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -84,7 +84,7 @@ Requires: file - Requires: udev > 166 - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Requires: systemd >= 186 -+Conflicts: systemd <= 187 - %else - Requires: util-linux-ng >= 2.21 - %endif -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index f9fd10b..7b59e15 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -11,15 +11,13 @@ DefaultDependencies=no - ConditionPathExists=/etc/initrd-release - OnFailure=emergency.service - After=initrd-switch-root.target --Before=systemd-journal-flush.service --Before=sysinit.target local-fs.target swap.target emergency.service emergency.target - - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf - # we have to use "--force" here, otherwise systemd would umount /run - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} --ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service ; /bin/rm -f /run/initramfs/switch-root.conf -+ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf - StandardInput=null - StandardOutput=null - StandardError=null diff --git a/0090-dracut.spec-add-suse-version-ifdefs.patch b/0090-dracut.spec-add-suse-version-ifdefs.patch deleted file mode 100644 index 636ffa6..0000000 --- a/0090-dracut.spec-add-suse-version-ifdefs.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 7a1f355fb51426ec69002cf23ada0aea7fe285c7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 16 Jul 2012 10:33:27 +0200 -Subject: [PATCH] dracut.spec: add suse version ifdefs - ---- - dracut.spec | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index 0e853fd..9108d1a 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -111,7 +111,7 @@ Provides: dracut-generic = %{version}-%{release} - This package requires everything which is needed to build a generic - all purpose initramfs with network support with dracut. - --%if 0%{?fedora} || 0%{?rhel} >= 6 -+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} - %package fips - Summary: Dracut modules to build a dracut initramfs with an integrity check - Requires: %{name} = %{version}-%{release} -@@ -185,7 +185,7 @@ make install DESTDIR=$RPM_BUILD_ROOT \ - - echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh - --%if 0%{?fedora} == 0 && 0%{?rhel} == 0 -+%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0 - rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips - rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni - %endif -@@ -210,7 +210,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log - touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log - mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs - --%if 0%{?fedora} || 0%{?rhel} -+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} - install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf - install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/40-fips.conf - %endif -@@ -258,11 +258,13 @@ rm -rf $RPM_BUILD_ROOT - %endif - %dir /etc/dracut.conf.d - %{_mandir}/man8/dracut.8* -+%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 - %{_mandir}/man8/mkinitrd.8* -+%{_mandir}/man1/lsinitrd.1* -+%endif - %{_mandir}/man7/dracut.kernel.7* - %{_mandir}/man7/dracut.cmdline.7* - %{_mandir}/man5/dracut.conf.5* --%{_mandir}/man1/lsinitrd.1* - %{dracutlibdir}/modules.d/00bootchart - %{dracutlibdir}/modules.d/04watchdog - %{dracutlibdir}/modules.d/05busybox -@@ -329,7 +331,7 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/modules.d/45ifcfg - %{dracutlibdir}/modules.d/95znet - --%if 0%{?fedora} || 0%{?rhel} -+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} - %files fips - %defattr(-,root,root,0755) - %{dracutlibdir}/modules.d/01fips diff --git a/0091-dracut-functions.sh-output-more-info-if-dependency-m.patch b/0091-dracut-functions.sh-output-more-info-if-dependency-m.patch deleted file mode 100644 index 2d18c12..0000000 --- a/0091-dracut-functions.sh-output-more-info-if-dependency-m.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0f283709c9bbcdc064e1212c42173a3ff9552525 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 16 Jul 2012 12:21:56 +0200 -Subject: [PATCH] dracut-functions.sh: output more info, if dependency modules - are omitted - ---- - dracut-functions.sh | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 3f56316..306b93a 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1024,7 +1024,10 @@ check_mount() { - - [[ $2 ]] || mods_checked_as_dep+=" $_mod " - -- strstr " $omit_dracutmodules " " $_mod " && return 1 -+ if strstr " $omit_dracutmodules " " $_mod "; then -+ dinfo "Dracut module '$_mod' will not be installed, because it's in the list to be omitted!" -+ return 1 -+ fi - - if [ "${#host_fs_types[*]}" -gt 0 ]; then - module_check_mount $_mod || return 1 -@@ -1040,7 +1043,10 @@ check_mount() { - strstr " $force_add_dracutmodules " " $_moddep " || \ - force_add_dracutmodules+=" $_moddep " - # if a module we depend on fail, fail also -- check_module $_moddep || return 1 -+ if ! check_module $_moddep; then -+ derror "Dracut module '$_mod' depends on '$_moddep', which can't be installed" -+ return 1 -+ fi - done - - strstr " $mods_to_load " " $_mod " || \ -@@ -1067,7 +1073,10 @@ check_module() { - - [[ $2 ]] || mods_checked_as_dep+=" $_mod " - -- strstr " $omit_dracutmodules " " $_mod " && return 1 -+ if strstr " $omit_dracutmodules " " $_mod "; then -+ dinfo "Dracut module '$_mod' will not be installed, because it's in the list to be omitted!" -+ return 1 -+ fi - - if strstr " $dracutmodules $add_dracutmodules $force_add_dracutmodules" " $_mod "; then - if strstr " $force_add_dracutmodules" " $_mod"; then -@@ -1095,7 +1104,10 @@ check_module() { - strstr " $force_add_dracutmodules " " $_moddep " || \ - force_add_dracutmodules+=" $_moddep " - # if a module we depend on fail, fail also -- check_module $_moddep || return 1 -+ if ! check_module $_moddep; then -+ derror "Dracut module '$_mod' depends on '$_moddep', which can't be installed" -+ return 1 -+ fi - done - - strstr " $mods_to_load " " $_mod " || \ diff --git a/0092-Fix-fips-module-list.patch b/0092-Fix-fips-module-list.patch deleted file mode 100644 index c5df148..0000000 --- a/0092-Fix-fips-module-list.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4ee59ab3ed59475923a1fed0a8a52f5a03799c93 Mon Sep 17 00:00:00 2001 -From: Milan Broz -Date: Mon, 16 Jul 2012 16:28:47 +0200 -Subject: [PATCH] Fix fips module list. - -If dracut is build only with fips/fips-aesni (no crypto module), -FIPS mode fails because of missing GCM modules. - -Just add proper modules to list (kernel have both maker as FIPS compliant already). - -Signed-off-by: Milan Broz ---- - modules.d/01fips/module-setup.sh | 2 +- - modules.d/02fips-aesni/module-setup.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index 2d238fb..2517964 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -12,7 +12,7 @@ depends() { - - installkernel() { - local _fipsmodules _mod -- _fipsmodules="aead aes_generic xts aes-x86_64 ansi_cprng cbc ccm chainiv ctr" -+ _fipsmodules="aead aes_generic xts aes-x86_64 ansi_cprng cbc ccm chainiv ctr gcm ghash_generic" - _fipsmodules+=" des deflate ecb eseqiv hmac seqiv sha256 sha256_generic sha512 sha512_generic" - _fipsmodules+=" cryptomgr crypto_null tcrypt dm-mod dm-crypt" - -diff --git a/modules.d/02fips-aesni/module-setup.sh b/modules.d/02fips-aesni/module-setup.sh -index f8fb705..fb4010d 100755 ---- a/modules.d/02fips-aesni/module-setup.sh -+++ b/modules.d/02fips-aesni/module-setup.sh -@@ -12,7 +12,7 @@ depends() { - - installkernel() { - local _fipsmodules _mod -- _fipsmodules="aesni-intel" -+ _fipsmodules="aesni-intel ghash_clmulni_intel" - - mkdir -m 0755 -p "${initdir}/etc/modprobe.d" - diff --git a/0093-systemd-dracut-pre-pivot.service-force-clean-stop-of.patch b/0093-systemd-dracut-pre-pivot.service-force-clean-stop-of.patch deleted file mode 100644 index 135a340..0000000 --- a/0093-systemd-dracut-pre-pivot.service-force-clean-stop-of.patch +++ /dev/null @@ -1,80 +0,0 @@ -From a43f97c4e35d0d9c7e6e315e11c909e86936e1cc Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 17 Jul 2012 11:06:25 +0200 -Subject: [PATCH] systemd/dracut-pre-pivot.service: force clean stop of udevd - and cleanup-db - ---- - modules.d/98systemd/dracut-pre-pivot.service | 2 +- - modules.d/98systemd/dracut-pre-pivot.sh | 3 +++ - modules.d/98systemd/module-setup.sh | 4 ---- - modules.d/98systemd/udevadm-cleanup-db.service | 20 -------------------- - 4 files changed, 4 insertions(+), 25 deletions(-) - delete mode 100644 modules.d/98systemd/udevadm-cleanup-db.service - -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index 61257cf..317b476 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -16,7 +16,7 @@ ConditionPathExists=/etc/initrd-release - [Service] - Type=oneshot - ExecStart=-/bin/dracut-pre-pivot --ExecStopPost=-/usr/bin/systemctl isolate initrd-switch-root.target -+ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd-switch-root.target - StandardInput=null - StandardOutput=syslog - StandardError=syslog+console -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 31dded5..44afe54 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -39,4 +39,7 @@ echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf - - getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root" - -+/usr/bin/udevadm control --exit || warn "/usr/bin/udevadm control --exit failed" -+/usr/bin/udevadm info --cleanup-db || warn "/usr/bin/udevadm info --cleanup-db failed" -+ - exit 0 -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 5cb236c..05faf87 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -143,10 +143,6 @@ install() { - inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service - ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-pivot.service" - -- inst_simple "$moddir/udevadm-cleanup-db.service" ${dracutsystemunitdir}/udevadm-cleanup-db.service -- mkdir -p "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires" -- ln -fs ../udevadm-cleanup-db.service "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service" -- - inst_script "$moddir/service-to-run.sh" "${systemdutildir}/system-generators/service-to-run" - } - -diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service -deleted file mode 100644 -index 368a0dd..0000000 ---- a/modules.d/98systemd/udevadm-cleanup-db.service -+++ /dev/null -@@ -1,20 +0,0 @@ --# This file is part of systemd. --# --# systemd is free software; you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation; either version 2.1 of the License, or --# (at your option) any later version. -- --[Unit] --Description=Cleanup udevd DB --DefaultDependencies=no --ConditionPathExists=/etc/initrd-release --Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket --Before=initrd-switch-root.service -- --[Service] --Type=oneshot --ExecStart=-/usr/bin/udevadm info --cleanup-db --StandardInput=null --StandardOutput=null --StandardError=null diff --git a/0094-systemd-initrd-switch-root.service-call-switch-root-.patch b/0094-systemd-initrd-switch-root.service-call-switch-root-.patch deleted file mode 100644 index 54bb820..0000000 --- a/0094-systemd-initrd-switch-root.service-call-switch-root-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3780d7e44982b0e801622f5ad90ce0e80792b69e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 17 Jul 2012 11:09:17 +0200 -Subject: [PATCH] systemd/initrd-switch-root.service: call switch-root with - --no-block - ---- - modules.d/98systemd/initrd-switch-root.service | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service -index 7b59e15..7d1a648 100644 ---- a/modules.d/98systemd/initrd-switch-root.service -+++ b/modules.d/98systemd/initrd-switch-root.service -@@ -11,12 +11,13 @@ DefaultDependencies=no - ConditionPathExists=/etc/initrd-release - OnFailure=emergency.service - After=initrd-switch-root.target -+AllowIsolate=yes - - [Service] - Type=oneshot - EnvironmentFile=/run/initramfs/switch-root.conf - # we have to use "--force" here, otherwise systemd would umount /run --ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} -+ExecStart=-/usr/bin/systemctl --no-block --force switch-root ${NEWROOT} ${NEWINIT} - ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf - StandardInput=null - StandardOutput=null diff --git a/0095-dracut.conf.d-fedora.conf.example-disable-systemd-fo.patch b/0095-dracut.conf.d-fedora.conf.example-disable-systemd-fo.patch deleted file mode 100644 index 75e0735..0000000 --- a/0095-dracut.conf.d-fedora.conf.example-disable-systemd-fo.patch +++ /dev/null @@ -1,20 +0,0 @@ -From b94ae0561f4a431a33af167837b84dcb4dd06bde Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 17 Jul 2012 11:09:51 +0200 -Subject: [PATCH] dracut.conf.d/fedora.conf.example: disable systemd for now - ---- - dracut.conf.d/fedora.conf.example | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index 4cb1890..012bdd6 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -9,5 +9,5 @@ prefix="/" - systemdutildir=/usr/lib/systemd - systemdsystemunitdir=/usr/lib/systemd/system - udevdir=/usr/lib/udev --add_dracutmodules+=" systemd " -+#add_dracutmodules+=" systemd " - realinitpath="/usr/lib/systemd/systemd" diff --git a/dracut.spec b/dracut.spec index 1223ba9..d2ec019 100644 --- a/dracut.spec +++ b/dracut.spec @@ -9,8 +9,8 @@ %endif Name: dracut -Version: 020 -Release: 97.git20120717%{?dist} +Version: 021 +Release: 1%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -29,101 +29,6 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 -Patch1: 0001-dracut-install.c-try-clone-ioctl-for-more-speed.patch -Patch2: 0002-move-dracut-install-to-dracutbasedir.patch -Patch3: 0003-98usrmount-force-mounting-usr-read-only-option-rd.us.patch -Patch4: 0004-99base-don-t-require-fs-lib-to-detect-rootfstype.patch -Patch5: 0005-new-option-rd.skipfsck-to-skip-fsck-for-rootfs-and-u.patch -Patch6: 0006-95rootfs-block-skip-checks-rel.-to-fsck-if-rd.skipfs.patch -Patch7: 0007-dracut-functions.sh-set-LC_ALL-C-to-get-correct-pars.patch -Patch8: 0008-do-not-umount-root-remount-it.-do-not-mount-ro-if-no.patch -Patch9: 0009-dracut-install.c-give-info-that-SOURCE-argument-is-m.patch -Patch10: 0010-dracut.sh-do-not-lazy-resolve-include-directories.patch -Patch11: 0011-dracut-functions.sh-dracut.sh-use-xargs-with-r.patch -Patch12: 0012-add-hardlink-nohardlink-options.patch -Patch13: 0013-new-testsuite-test-TEST-03-USR-MOUNT.patch -Patch14: 0014-TEST-01-BASIC-grow-the-root-disk.patch -Patch15: 0015-fs-lib-fs-lib.sh-skip-fsck-for-xfs-and-btrfs.-remoun.patch -Patch16: 0016-rootfs-block-mount-root.sh-warn-if-ro-mount-failed-a.patch -Patch17: 0017-TEST-02-SYSTEMD-enlarge-the-root-disk.patch -Patch18: 0018-dracut-functions.sh-create-initdir-if-it-does-not-ex.patch -Patch19: 0019-dracut-install.c-for-lazy-install-shebangs-do-not-ch.patch -Patch20: 0020-usrmount-mount-usr.sh-give-emergency_shell-if-usr-mo.patch -Patch21: 0021-dracut-functions.sh-forgot-set-version-kernel-for-mo.patch -Patch22: 0022-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch -Patch23: 0023-base-init.sh-error-out-early-if-dev-proc-or-sys-cann.patch -Patch24: 0024-add-lsinitrd-and-mkinitrd-man-pages.patch -Patch25: 0025-manpages-simplify-AUTHORS.patch -Patch26: 0026-dracut.sh-use-getopt-to-parse-arguments.patch -Patch27: 0027-usrmount-mount-usr.sh-check-the-right-path-with-ismo.patch -Patch28: 0028-TEST-03-USR-MOUNT-change-test-to-use-a-seperate-disk.patch -Patch29: 0029-TEST-30-ISCSI-put-back-in-hard-off.sh-for-tests.patch -Patch30: 0030-lsinitrd.sh-print-usage-for-h.patch -Patch31: 0031-lsinitrd.sh-get-rid-of-awk-call.patch -Patch32: 0032-lsinitrd.sh-fixed-version-file-extraction.patch -Patch33: 0033-Makefile-mkinitrd-man-page-install-typo.patch -Patch34: 0034-fips-change-module-list.patch -Patch35: 0035-i18n-module-setup.sh-s-error-info-if-no-keymap-is-co.patch -Patch36: 0036-fips-add-instmods-silent-check-mode-c-s.patch -Patch37: 0037-install-user-group-adm-for-journal.patch -Patch38: 0038-network-factor-out-parse_ifname_opts-for-ifname-genr.patch -Patch39: 0039-systemd-exit-with-sane-state.patch -Patch40: 0040-dracut.asc-add-lsinitrd-and-mkinitrd.patch -Patch41: 0041-dracut.8.asc-fixup-NOTE-sections.patch -Patch42: 0042-dracut.cmdline.7.asc-fixup.patch -Patch43: 0043-network-do-not-rename-other-interfaces-and-document-.patch -Patch44: 0044-mkinitrd.8.asc-mark-paragraph-as-important.patch -Patch45: 0045-network-ifname-genrules.sh-check-for-multiple-ifname.patch -Patch46: 0046-dracut.sh-keep-vim-syntax-highlighting-happy.patch -Patch47: 0047-systemd-check-that-prefix-does-not-contain-run.patch -Patch48: 0048-fixed-bash-sh-requirements.patch -Patch49: 0049-dracut.spec-dracut.conf.d-fedora.conf.example-no-das.patch -Patch50: 0050-systemd-module-setup.sh-also-include-systemd-udevd-u.patch -Patch51: 0051-dracut.conf.d-fedora.conf.example-removed-readonly-f.patch -Patch52: 0052-dracut-functions.sh-bail-out-if-initdir-is-not-set.patch -Patch53: 0053-dracut.sh-corrected-error-messages-if-mktemp-failed.patch -Patch54: 0054-require-systemd-186.patch -Patch55: 0055-systemd-udev-trigger.service-and-systemd-udev-settle.patch -Patch56: 0056-TEST-30-ISCSI-convert-to-ext3.patch -Patch57: 0057-02caps-do-not-create-bin-sh-link.patch -Patch58: 0058-dhclient-initqueue-hook-fix.patch -Patch59: 0059-Makefile-do-not-install-service-from-98systemd.-They.patch -Patch60: 0060-plymouth-Use-latest-plymouth-s-populate-script.patch -Patch61: 0061-test-export-initdir.patch -Patch62: 0062-test-new-test-TEST-99-RPM.patch -Patch63: 0063-resume-move-resume-process-to-initqueue.patch -Patch64: 0064-TEST-99-RPM-test-trap.patch -Patch65: 0065-systemd-service-cleanup.patch -Patch66: 0066-plymouth-add-plymouth-wait-quit.service-to-initrd.patch -Patch67: 0067-TEST-01-BASIC-turn-on-systemd-debugging.patch -Patch68: 0068-TEST-01-BASIC-enable-selinux.patch -Patch69: 0069-install-dracut-install.c-redirect-stderr-to-stdout-a.patch -Patch70: 0070-systemd-initrd-switch-root.service-stop-journald-rat.patch -Patch71: 0071-systemd-install-all-dracut-units-in-etc-and-let-the-.patch -Patch72: 0072-test-server-init.sh-redirect-stdin-out-err-to-dev-co.patch -Patch73: 0073-systemd-initrd-switch-root.target-add-ConditionPathE.patch -Patch74: 0074-kernel-modules-module-setup.sh-also-install-lib-modp.patch -Patch75: 0075-nfs-install-modprobe-config-file.patch -Patch76: 0076-test-add-support-for-make-V-1-TESTS-01-20-40-check.patch -Patch77: 0077-dracut-shutdown.service-s-reboot.service-systemd-reb.patch -Patch78: 0078-test-TEST-04-FULL-SYSTEMD-full-test-with-systemd-and.patch -Patch79: 0079-test-silence-make-all.patch -Patch80: 0080-systemd-fixed-initrd-switch-root.service.patch -Patch81: 0081-dracut.sh-for-include-copy-also-the-symbolic-links.patch -Patch82: 0082-install-dracut-install.c-check-for-empty-or-destdir.patch -Patch83: 0083-systemd-initrd-switch-root.service-add-back-force-to.patch -Patch84: 0084-watchdog-watchdog-stop.sh-forgot-to-add-script.patch -Patch85: 0085-systemd-initrd-switch-root.service-add-some-more-dep.patch -Patch86: 0086-systemd-service-to-run.sh-do-not-copy-the-target-sub.patch -Patch87: 0087-test-TEST-04-FULL-SYSTEMD-default-to-basic.target-an.patch -Patch88: 0088-kernel-modules-module-setup.sh-add-hid_generic-to-ke.patch -Patch89: 0089-Fixes-for-systemd-187-which-does-the-right-thing-for.patch -Patch90: 0090-dracut.spec-add-suse-version-ifdefs.patch -Patch91: 0091-dracut-functions.sh-output-more-info-if-dependency-m.patch -Patch92: 0092-Fix-fips-module-list.patch -Patch93: 0093-systemd-dracut-pre-pivot.service-force-clean-stop-of.patch -Patch94: 0094-systemd-initrd-switch-root.service-call-switch-root-.patch -Patch95: 0095-dracut.conf.d-fedora.conf.example-disable-systemd-fo.patch BuildRequires: dash bash git @@ -180,6 +85,7 @@ Requires: file Requires: udev > 166 %if 0%{?fedora} || 0%{?rhel} > 6 Requires: util-linux >= 2.21 +Conflicts: systemd < 187 %else Requires: util-linux-ng >= 2.21 %endif @@ -451,6 +357,11 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Fri Jul 20 2012 Harald Hoyer 021-1 +- version 21 +- systemd in the initramfs reenabled +- new option "--kver" + * Wed Jul 18 2012 Fedora Release Engineering - 020-97.git20120717 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild