Blame SOURCES/clevis-7-dracut.patch

9fc9a3
From bcb46fe1e40b390cb39353b75806bf3e05177ef0 Mon Sep 17 00:00:00 2001
9fc9a3
From: Nathaniel McCallum <npmccallum@redhat.com>
9fc9a3
Date: Mon, 13 Nov 2017 11:28:14 -0500
9fc9a3
Subject: [PATCH] Fix dracut unlocker
9fc9a3
9fc9a3
We weren't generating the path to clevis-luks-askpass correctly in the
9fc9a3
dracut module.
9fc9a3
9fc9a3
Fixes: #23
9fc9a3
---
9fc9a3
 src/dracut/Makefile.am                             | 10 ++++------
9fc9a3
 src/dracut/clevis-hook.sh.in                       |  2 +-
9fc9a3
 src/dracut/{module-setup.sh => module-setup.sh.in} |  2 +-
9fc9a3
 3 files changed, 6 insertions(+), 8 deletions(-)
9fc9a3
 rename src/dracut/{module-setup.sh => module-setup.sh.in} (96%)
9fc9a3
9fc9a3
diff --git a/src/dracut/Makefile.am b/src/dracut/Makefile.am
9fc9a3
index 5a3a0f4..e26b61f 100644
9fc9a3
--- a/src/dracut/Makefile.am
9fc9a3
+++ b/src/dracut/Makefile.am
9fc9a3
@@ -1,12 +1,10 @@
9fc9a3
 dracutdir = @dracutmodulesdir@/60$(PACKAGE_NAME)
9fc9a3
-nodist_dracut_SCRIPTS = clevis-hook.sh
9fc9a3
-dist_dracut_SCRIPTS = module-setup.sh
9fc9a3
-
9fc9a3
-CLEANFILES=clevis-hook.sh
9fc9a3
-EXTRA_DIST=clevis-hook.sh.in
9fc9a3
+nodist_dracut_SCRIPTS = clevis-hook.sh module-setup.sh
9fc9a3
+EXTRA_DIST=clevis-hook.sh.in module-setup.sh.in
9fc9a3
+CLEANFILES=clevis-hook.sh module-setup.sh
9fc9a3
 
9fc9a3
 %: %.in
9fc9a3
 	$(AM_V_GEN)mkdir -p $(dir $@)
9fc9a3
 	$(AM_V_GEN)$(SED) \
9fc9a3
-		-e 's,@libexedir\@,$(libexecdir),g' \
9fc9a3
+		-e 's,@libexecdir\@,$(libexecdir),g' \
9fc9a3
 		$(srcdir)/$@.in > $@
9fc9a3
diff --git a/src/dracut/clevis-hook.sh.in b/src/dracut/clevis-hook.sh.in
9fc9a3
index 5d0c814..cb257c9 100755
9fc9a3
--- a/src/dracut/clevis-hook.sh.in
9fc9a3
+++ b/src/dracut/clevis-hook.sh.in
9fc9a3
@@ -1,2 +1,2 @@
9fc9a3
 #!/bin/bash
9fc9a3
-@libexec@/clevis-luks-askpass
9fc9a3
+@libexecdir@/clevis-luks-askpass
9fc9a3
diff --git a/src/dracut/module-setup.sh b/src/dracut/module-setup.sh.in
9fc9a3
similarity index 96%
9fc9a3
rename from src/dracut/module-setup.sh
9fc9a3
rename to src/dracut/module-setup.sh.in
9fc9a3
index 92fe08e..5087d56 100755
9fc9a3
--- a/src/dracut/module-setup.sh
9fc9a3
+++ b/src/dracut/module-setup.sh.in
9fc9a3
@@ -37,7 +37,7 @@ install() {
9fc9a3
         clevis-decrypt-http \
9fc9a3
         clevis-decrypt-tang \
9fc9a3
         clevis-decrypt-sss \
9fc9a3
-        clevis-luks-askpass \
9fc9a3
+        @libexecdir@/clevis-luks-askpass \
9fc9a3
         clevis-decrypt \
9fc9a3
         luksmeta \
9fc9a3
         clevis \