@@ -179,7 +179,9 @@ AS_IF([test "x$with_keyutils" = "xyes"],
AM_CONDITIONAL([ENABLE_KEYUTILS], [test "x$with_keyutils" = "xyes"])
ndctl_keysdir=${sysconfdir}/ndctl/keys
+ndctl_keysreadme=keys.readme
AC_SUBST([ndctl_keysdir])
+AC_SUBST([ndctl_keysreadme])
my_CFLAGS="\
-Wall \
@@ -110,6 +110,7 @@ make check
%{bashcompdir}/
%{_unitdir}/ndctl-monitor.service
%dir %{_sysconfdir}/ndctl/keys/
+%{_sysconfdir}/ndctl/keys/keys.readme
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
%config(noreplace) %{_sysconfdir}/ndctl/monitor.conf
@@ -29,6 +29,8 @@ ndctl_SOURCES = ndctl.c \
if ENABLE_KEYUTILS
ndctl_SOURCES += util/keys.c \
load-keys.c
+keys_configdir = $(ndctl_keysdir)
+keys_config_DATA = $(ndctl_keysreadme)
endif
if ENABLE_DESTRUCTIVE
new file mode 100644
@@ -0,0 +1 @@
+See 'ndctl setup-passphrase --help'
At build time, ndctl_keysdir (/etc/nddctl/keys/) was empty, and thus it never gets created. Since the directory is listed in the %files section of the RPM spec, RPM checks for it and fails since it is not present. Fix this by adding a simple 'keys.readme' file to the keys dorectory that points the user to the setup-passphrase man page, and installing it during the build. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- configure.ac | 2 ++ ndctl.spec.in | 1 + ndctl/Makefile.am | 2 ++ ndctl/keys.readme | 1 + 4 files changed, 6 insertions(+) create mode 100644 ndctl/keys.readme