From patchwork Sat Feb 2 00:39:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10793881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CADC6C2 for ; Sat, 2 Feb 2019 00:39:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D9BD328A0 for ; Sat, 2 Feb 2019 00:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C933328A3; Sat, 2 Feb 2019 00:39:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD4A1328A0 for ; Sat, 2 Feb 2019 00:39:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BB048211C64A9; Fri, 1 Feb 2019 16:39:04 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6CE11211C649C for ; Fri, 1 Feb 2019 16:39:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 16:39:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,550,1539673200"; d="scan'208";a="140001127" Received: from vverma7-desk1.lm.intel.com ([10.232.112.170]) by fmsmga002.fm.intel.com with ESMTP; 01 Feb 2019 16:39:02 -0800 From: Vishal Verma To: Subject: [ndctl PATCH] ndctl, rpmbuild: Add a dummy readme file to ndctl_keysdir Date: Fri, 1 Feb 2019 17:39:00 -0700 Message-Id: <20190202003900.8487-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Vishal Verma --- 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 diff --git a/configure.ac b/configure.ac index b08ddaf..d27a2b1 100644 --- a/configure.ac +++ b/configure.ac @@ -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 \ diff --git a/ndctl.spec.in b/ndctl.spec.in index 5ceb27a..8abccbf 100644 --- a/ndctl.spec.in +++ b/ndctl.spec.in @@ -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 diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am index cd3312b..3287dbb 100644 --- a/ndctl/Makefile.am +++ b/ndctl/Makefile.am @@ -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 diff --git a/ndctl/keys.readme b/ndctl/keys.readme new file mode 100644 index 0000000..506678a --- /dev/null +++ b/ndctl/keys.readme @@ -0,0 +1 @@ +See 'ndctl setup-passphrase --help'