From 8c493c15eb35a2b798024771cde25ec73e818a72 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 12 Nov 2022 00:21:35 -0500 Subject: [PATCH] Install bash-completion in default location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desired location for bash-complete files is no longer in /etc. Use the recently added macros from redhat-rpm-config¹ to get the path. Shorten the install command by using the completion file from the source directory instead of the %buildroot copy. ¹ https://src.fedoraproject.org/rpms/redhat-rpm-config/c/483a3b8 (Add macros.shell-completions, 2022-06-25) --- python-argcomplete.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python-argcomplete.spec b/python-argcomplete.spec index 9993360..a3414f3 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -8,7 +8,7 @@ Name: python-argcomplete Summary: Bash tab completion for argparse Version: 2.0.0 -Release: 4%{?dist} +Release: 5%{?dist} License: ASL 2.0 URL: https://github.com/kislyuk/argcomplete Source0: %pypi_source argcomplete @@ -64,8 +64,7 @@ sed -i -e "s|python |python3 |" test/test.py %install %py3_install -mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ -install -p -m0644 %{buildroot}%{python3_sitelib}/argcomplete/bash_completion.d/python-argcomplete %{buildroot}%{_sysconfdir}/bash_completion.d/ +install -Dp -m0644 argcomplete/bash_completion.d/%{name} %{buildroot}%{bash_completions_dir}/%{name} %if %{with check} %check @@ -86,9 +85,12 @@ export INPUTRC=$PWD/.inputrc %{_bindir}/python-argcomplete-check-easy-install-script %{_bindir}/python-argcomplete-tcsh %{_bindir}/register-python-argcomplete -%{_sysconfdir}/bash_completion.d/python-argcomplete +%{bash_completions_dir}/%{name} %changelog +* Sat Nov 12 2022 Todd Zullinger - 2.0.0-5 +- Install bash-completion in default location + * Fri Jul 22 2022 Fedora Release Engineering - 2.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild