From: Vishal Verma <vishal.l.verma@intel.com>
To: <nvdimm@lists.linux.dev>
Cc: <linux-cxl@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>
Subject: [ndctl PATCH] ndctl: install bash-completion symlinks
Date: Tue, 16 Nov 2021 18:17:48 -0700 [thread overview]
Message-ID: <20211117011748.3109100-1-vishal.l.verma@intel.com> (raw)
Install symlinks for other utilities (daxctl, cxl-cli) in the
completions directory so that the dynamic completion loader can pick up
their respective names. Without this, completions for daxctl and cxl
would only work after a prior invocation of ndctl's completion.
Reported-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
configure.ac | 1 +
Makefile.am | 3 +++
ndctl.spec.in | 4 +++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 00497ae..9ac785f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_PREFIX_DEFAULT([/usr])
AC_PROG_SED
AC_PROG_MKDIR_P
+AC_PROG_LN_S
AC_ARG_ENABLE([docs],
AS_HELP_STRING([--disable-docs],
diff --git a/Makefile.am b/Makefile.am
index fa2010a..bd0037e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,9 @@ sles/ndctl.spec: sles/header ndctl.spec.in Makefile.am version.m4
if ENABLE_BASH_COMPLETION
bashcompletiondir = $(BASH_COMPLETION_DIR)
dist_bashcompletion_DATA = contrib/ndctl
+install-data-hook:
+ $(LN_S) -f $(BASH_COMPLETION_DIR)/ndctl $(DESTDIR)/$(BASH_COMPLETION_DIR)/daxctl
+ $(LN_S) -f $(BASH_COMPLETION_DIR)/ndctl $(DESTDIR)/$(BASH_COMPLETION_DIR)/cxl
endif
modprobe_file = contrib/nvdimm-security.conf
diff --git a/ndctl.spec.in b/ndctl.spec.in
index 4b08c05..27ca097 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -140,7 +140,7 @@ make check
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_bindir}/ndctl
%{_mandir}/man1/ndctl*
-%{bashcompdir}/
+%{bashcompdir}/ndctl
%{_unitdir}/ndctl-monitor.service
%{_sysconfdir}/ndctl/keys/keys.readme
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
@@ -153,12 +153,14 @@ make check
%{_bindir}/daxctl
%{_mandir}/man1/daxctl*
%{_datadir}/daxctl/daxctl.conf
+%{bashcompdir}/daxctl
%files -n cxl-cli
%defattr(-,root,root)
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_bindir}/cxl
%{_mandir}/man1/cxl*
+%{bashcompdir}/cxl
%files -n LNAME
%defattr(-,root,root)
base-commit: 1baaa9035ca5402561a94b9d322b2edbcba4f249
--
2.31.1
reply other threads:[~2021-11-17 1:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211117011748.3109100-1-vishal.l.verma@intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).