From: Marcin Krol Date: Wed, 1 Mar 2023 01:03:04 +0000 (+0100) Subject: - fix cryptsetup startup with LUKS2 volumes X-Git-Url: https://git.tld-linux.org/?p=packages%2Frc-scripts.git;a=commitdiff_plain;h=adc6fa950b053c0211a6cff3e4bed09e70ccfde5 - fix cryptsetup startup with LUKS2 volumes --- diff --git a/cryptsetup-locks.patch b/cryptsetup-locks.patch new file mode 100644 index 0000000..028ba32 --- /dev/null +++ b/cryptsetup-locks.patch @@ -0,0 +1,39 @@ +From: Marcin Krol +Date: Wed, 1 Mar 2023 00:57:42 +0000 (+0100) +Subject: - disable lock checks (happens on LUKS2 and fails during system boot) +X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=commitdiff_plain;h=6066bc28dc8b40335ea2a4554691900fa6813c8a + +- disable lock checks (happens on LUKS2 and fails during system boot) +--- + +diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup +index 263a39c..d5ac2c3 100755 +--- a/rc.d/init.d/cryptsetup ++++ b/rc.d/init.d/cryptsetup +@@ -105,7 +105,7 @@ init_crypto() { + continue + fi + +- if /sbin/cryptsetup isLuks "$src" 2>/dev/null; then ++ if /sbin/cryptsetup --disable-locks isLuks "$src" 2>/dev/null; then + if key_is_random "$key"; then + nls "%s: LUKS requires non-random key, skipping" "$dst" + ret=1 +@@ -114,7 +114,7 @@ init_crypto() { + if [ -n "$params" ]; then + nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst" + fi +- /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1 ++ /sbin/cryptsetup --disable-locks ${key:+-d $key} luksOpen "$src" "$dst" <&1 + fi + rc=$? + if [ $rc -ne 0 ]; then +@@ -144,7 +144,7 @@ halt_crypto() { + [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue + if [ -b "/dev/mapper/$dst" ]; then + if LC_ALL=C /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then +- /sbin/cryptsetup remove "$dst" ++ /sbin/cryptsetup --disable-locks remove "$dst" + else + fnval=1 + fi diff --git a/rc-scripts.spec b/rc-scripts.spec index c179d7a..359020c 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,12 +8,13 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 4 +Release: 5 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz # Source0-md5: bc6f66a2511cf866e852d40349d7b609 Patch0: color-fix.patch +Patch1: cryptsetup-locks.patch URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake @@ -103,6 +104,7 @@ programcıklar içerir. %prep %setup -q %patch0 -p1 +%patch1 -p1 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch: #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"