From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25E03C10F13 for ; Tue, 16 Apr 2019 18:45:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02EFC206BA for ; Tue, 16 Apr 2019 18:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730088AbfDPSpO (ORCPT ); Tue, 16 Apr 2019 14:45:14 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:41774 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbfDPSpN (ORCPT ); Tue, 16 Apr 2019 14:45:13 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1hGT4w-0007aC-8U; Tue, 16 Apr 2019 14:45:10 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.2/8.14.6) with ESMTP id x3GIbFpK001705; Tue, 16 Apr 2019 14:37:15 -0400 Received: (from linville@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id x3GIbFnZ001704; Tue, 16 Apr 2019 14:37:15 -0400 Date: Tue, 16 Apr 2019 14:37:15 -0400 From: "John W. Linville" To: Kevin Locke Cc: netdev@vger.kernel.org, Jesse Brandeburg Subject: Re: [PATCH v2] ethtool: Add bash-completion script Message-ID: <20190416183714.GA14097@tuxdriver.com> References: <4dedb8b19e812805abdd4ffbdfddac5df755b8a5.1555004349.git.kevin@kevinlocke.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4dedb8b19e812805abdd4ffbdfddac5df755b8a5.1555004349.git.kevin@kevinlocke.name> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Apr 11, 2019 at 11:39:32AM -0600, Kevin Locke wrote: > To aid users constructing a valid ethtool invocation, create a > [bash-completion] script to provide [programmable completion] of ethtool > arguments. It supports all current command options. > > The script is named shell-completion/bash/ethtool, similar to [kmod], > and installed to `pkg-config --variable=completionsdir bash-completion` > (with fallback to $datadir/bash-completion/completions) by default. > This can be disabled by passing --without-bash-completion-dir or changed > by passing --with-bash-completion-dir=$anypath to ./configure. It > requires pkg-config 0.18 or later to be installed on the build system > which runs aclocal (for the PKG_CHECK_MODULES m4 macro). > > To install the script manually for the current user, copy or link > shell-completion/bash to $BASH_COMPLETION_USER_DIR/completions > (default $XDG_DATA_HOME/bash-completion/completions > (default ~/.local/share/bash-completion/completions)). > To install system-wide, copy shell-completion/bash to completionsdir > from pkg-config (default /usr/share/bash-completion/completions) > discussed above. Restarting bash may be necessary to pick up changes to > the script (if a previous version had already been loaded). > > Note: In [scop/bash-completion#289] the bash-completion maintainer > suggested shipping this completion with ethtool rather than > bash-completion, due to assumptions about the ethtool command-line > format made by the script. That pull request also contains an extensive > test suite in Python which is not included in this commit, but may be > ported to a format suitable for inclusion if there is sufficient > interest and agreement about how to achieve that. > > [bash-completion]: https://github.com/scop/bash-completion > [programmable completion]: https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html > [kmod]: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/tree/ > [scop/bash-completion#289]: https://github.com/scop/bash-completion/pull/289 > > Signed-off-by: Kevin Locke > Reviewed-by: Jesse Brandeburg > --- > > Changes in v2: > * Describe manual install and ./configure arguments in commit message. Overall, it looks good to me. But when I build with "make distcheck", I get this output: ... make[3]: Leaving directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make[2]: Leaving directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make[1]: Leaving directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make[1]: Entering directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make[2]: Entering directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' /usr/bin/mkdir -p '/home/linville/git/ethtool/ethtool-5.0/_inst/sbin' /usr/bin/install -c ethtool '/home/linville/git/ethtool/ethtool-5.0/_inst/sbin' /usr/bin/mkdir -p '/usr/share/bash-completion/completions' /usr/bin/install -c -m 644 ../../shell-completion/bash/ethtool '/usr/share/bash-completion/completions' /usr/bin/install: cannot create regular file '/usr/share/bash-completion/completions/ethtool': Permission denied make[2]: *** [Makefile:2005: install-dist_bashcompletionDATA] Error 1 make[2]: Leaving directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make[1]: *** [Makefile:2438: install-am] Error 2 make[1]: Leaving directory '/home/linville/git/ethtool/ethtool-5.0/_build/sub' make: *** [Makefile:2347: distcheck] Error 1 It looks like somewhere you are using "$(bashcompletiondir)" instead of "$(DESTDIR)$(bashcompletiondir)", but I can't seem to find it. Perhaps you can find the change required to avoid this build error? Thanks, John -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready.