diff --git a/0181-no_systemd_cryptsetup.patch b/0181-no_systemd_cryptsetup.patch deleted file mode 100644 index 3ca49ae..0000000 --- a/0181-no_systemd_cryptsetup.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 56f390967ff87515f7269f4793b9a651f0e3b87c Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Mon, 21 Sep 2015 12:37:14 +0200 -Subject: [PATCH] 90crypt: Don't use systemd for crypt - -- rd.luks.key is not implemented (properly) if systemd is enabled, - so ignore systemd in 90crypt -- Source of this patch: - https://github.com/jsynacek/dracut/commit/058aa18e3ec2bd6b34e6afff0f2653d742dea0f5 -- Fixes boo#915849 - -Signed-off-by: Fabian Vogt ---- - modules.d/90crypt/crypt-run-generator.sh | 31 ------------------------------- - modules.d/90crypt/module-setup.sh | 9 --------- - modules.d/90crypt/parse-crypt.sh | 20 -------------------- - 3 files changed, 60 deletions(-) - delete mode 100755 modules.d/90crypt/crypt-run-generator.sh - -Index: dracut-043/modules.d/90crypt/crypt-run-generator.sh -=================================================================== ---- dracut-043.orig/modules.d/90crypt/crypt-run-generator.sh -+++ /dev/null -@@ -1,31 +0,0 @@ --#!/bin/sh -- --. /lib/dracut-lib.sh --type crypttab_contains >/dev/null 2>&1 || . /lib/dracut-crypt-lib.sh -- --dev=$1 --luks=$2 -- --crypttab_contains "$luks" && exit 0 -- --allowdiscards="-" -- --# parse for allow-discards --if strstr "$(cryptsetup --help)" "allow-discards"; then -- if discarduuids=$(getargs "rd.luks.allow-discards"); then -- discarduuids=$(str_replace "$discarduuids" 'luks-' '') -- if strstr " $discarduuids " " ${luks##luks-}"; then -- allowdiscards="allow-discards" -- fi -- elif getargbool 0 rd.luks.allow-discards; then -- allowdiscards="allow-discards" -- fi --fi -- --echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab -- --if command -v systemctl >/dev/null; then -- systemctl daemon-reload -- systemctl start cryptsetup.target --fi --exit 0 -Index: dracut-043/modules.d/90crypt/module-setup.sh -=================================================================== ---- dracut-043.orig/modules.d/90crypt/module-setup.sh -+++ dracut-043/modules.d/90crypt/module-setup.sh -@@ -89,14 +89,5 @@ install() { - inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" - inst_simple "/tmp/dracut_block_uuid.map" "/usr/lib/dracut/modules.d/90crypt/block_uuid.map" - -- inst_multiple -o \ -- $systemdutildir/system-generators/systemd-cryptsetup-generator \ -- $systemdutildir/systemd-cryptsetup \ -- $systemdsystemunitdir/systemd-ask-password-console.path \ -- $systemdsystemunitdir/systemd-ask-password-console.service \ -- $systemdsystemunitdir/cryptsetup.target \ -- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \ -- systemd-ask-password systemd-tty-ask-password-agent -- inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator - dracut_need_initqueue - } -Index: dracut-043/modules.d/90crypt/parse-crypt.sh -=================================================================== ---- dracut-043.orig/modules.d/90crypt/parse-crypt.sh -+++ dracut-043/modules.d/90crypt/parse-crypt.sh -@@ -25,7 +25,6 @@ else - - luksid=${luksid##luks-} - -- if [ -z "$DRACUT_SYSTEMD" ]; then - { - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' - printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid -@@ -33,17 +32,6 @@ else - printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask) - printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout - } >> /etc/udev/rules.d/70-luks.rules.new -- else -- if ! crypttab_contains "$luksid"; then -- { -- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' -- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid -- printf -- 'RUN+="%s --settled --unique --onetime ' $(command -v initqueue) -- printf -- '--name systemd-cryptsetup-%%k %s start ' $(command -v systemctl) -- printf -- 'systemd-cryptsetup@luks$$(dev_unit_name -$env{ID_FS_UUID}).service"\n' -- } >> /etc/udev/rules.d/70-luks.rules.new -- fi -- fi - - uuid=$luksid - while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done -@@ -56,19 +44,11 @@ else - } >> $hookdir/emergency/90-crypt.sh - done - elif getargbool 0 rd.auto; then -- if [ -z "$DRACUT_SYSTEMD" ]; then - { - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) - printf -- '--unique --settled --onetime --name cryptroot-ask-%%k ' - printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout - } >> /etc/udev/rules.d/70-luks.rules.new -- else -- { -- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) -- printf -- '--unique --settled --onetime --name crypt-run-generator-%%k ' -- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v crypt-run-generator) -- } >> /etc/udev/rules.d/70-luks.rules.new -- fi - fi - - echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new -Index: dracut-043/modules.d/90crypt/crypt-lib.sh -=================================================================== ---- dracut-043.orig/modules.d/90crypt/crypt-lib.sh -+++ dracut-043/modules.d/90crypt/crypt-lib.sh -@@ -90,7 +90,7 @@ ask_for_password() { - - [ "$tty_echo_off" = yes ] && stty $stty_orig - fi -- } 9>/.console_lock -+ } <> /dev/tty0 >&0 2>&1 9>/.console_lock - - [ $ret -ne 0 ] && echo "Wrong password" >&2 - return $ret diff --git a/99-debug.conf b/99-debug.conf new file mode 100644 index 0000000..c356fc8 --- /dev/null +++ b/99-debug.conf @@ -0,0 +1,10 @@ +# Below adds additional tools to the initrd which are not urgently necessary to +# bring up the system, but help to debug problems. +# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools +# are installed and add more if you need them. This specifically helps if you +# use: +# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount| +# mount|pre-pivot|cleanup] +# boot parameter or if you are forced to enter the dracut emergency shell. + +# add_dracutmodules+=debug diff --git a/dracut.changes b/dracut.changes index 1afeaba..53fd149 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 24 16:28:01 UTC 2016 - trenn@suse.de + +- Move dist config file to /usr/lib/dracut/dracut.conf.d (bsc#972143) +- Remove stale, unused patch file: +0181-no_systemd_cryptsetup.patch +- Still create a debug config example in /etc/dracut.conf.d + ------------------------------------------------------------------- Fri Feb 12 11:34:33 UTC 2016 - fvogt@suse.com diff --git a/dracut.spec b/dracut.spec index eec82a1..e4d8add 100644 --- a/dracut.spec +++ b/dracut.spec @@ -1,7 +1,7 @@ # # spec file for package dracut # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Source3: mkinitrd_setup_dummy Source4: purge-kernels Source5: purge-kernels.service Source6: dracut-installkernel +Source7: 99-debug.conf #Network: Patch12: 0019-40network-Fix-race-condition-when-wait-for-networks.patch @@ -101,7 +102,6 @@ Patch163: 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch Patch168: 0168-remove_plymouth_logo_file.patch Patch180: 0180-i18n_add_correct_fontmaps.patch -Patch181: 0181-no_systemd_cryptsetup.patch Patch182: 0182-fix-include-parsing.patch Patch183: 0183-fix_add_drivers_hang.patch @@ -311,7 +311,8 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/dracut/overlay mkdir -p %{buildroot}%{_localstatedir}/log touch %{buildroot}%{_localstatedir}/log/dracut.log -install -m 0644 dracut.conf.d/suse.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/01-dist.conf +install -D -m 0644 dracut.conf.d/suse.conf.example %{buildroot}/usr/lib/dracut/dracut.conf.d/01-dist.conf +install -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/dracut.conf.d/99-debug.conf install -m 0644 dracut.conf.d/fips.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/40-fips.conf %ifarch %ix86 x86_64 @@ -395,8 +396,10 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra %config(noreplace) %{_sysconfdir}/dracut.conf %dir %{_sysconfdir}/dracut.conf.d +%dir /usr/lib/dracut/dracut.conf.d +%config %{_sysconfdir}/dracut.conf.d/99-debug.conf %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} -%config %{_sysconfdir}/dracut.conf.d/01-dist.conf +/usr/lib/dracut/dracut.conf.d/01-dist.conf %endif %ifarch %ix86 x86_64 %config %{_sysconfdir}/dracut.conf.d/02-early-microcode.conf