From 4e55c7c4502d751c6f491ed0026d199bdd5734c084d7da5705dbd5a6ef9b7708 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 27 Apr 2016 11:55:31 +0000 Subject: [PATCH 1/6] . OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=67 --- bash-completion.changes | 6 ++++++ bash-completion.spec | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/bash-completion.changes b/bash-completion.changes index ee33bc1..31cd427 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 27 11:54:07 UTC 2016 - werner@suse.de + +- Add documentation for this packages below to get the reference + of the e.g. the variable COMP_FILEDIR_FALLBACK (boo#977336) + ------------------------------------------------------------------- Wed Jan 27 15:42:34 UTC 2016 - werner@suse.de diff --git a/bash-completion.spec b/bash-completion.spec index f4c34af..f04b461 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -47,6 +47,8 @@ Patch8: respect-variables-boo940837.patch Patch9: rm-completion-smart-boo958462.patch # PATCH-FIX-SUSE boo#963140 Patch10: backticks-bsc963140.patch +BuildRequires: asciidoc +BuildRequires: libxslt-tools BuildRequires: pkg-config Requires: bash BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -73,9 +75,17 @@ of the programmable completion feature of Bash 2.04 and later. %build %configure make %{?_smp_mflags} +pushd doc + mkdir html + a2x -D html -d book -f xhtml --asciidoc-opts="--unsafe" main.txt +popd %install %make_install +pushd doc + mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/html + install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}/html/ +popd # shipping in latest systemd now rm -f %{buildroot}%{_datadir}/bash-completion/completions/udevadm From a4bd526705867e24b49c256d2d4b5cf70ff677e626d14f3df227dca4f95b8bd4 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 27 Apr 2016 12:44:05 +0000 Subject: [PATCH 2/6] boo#977336 OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=68 --- bash-completion.changes | 7 +++ bash-completion.spec | 3 ++ sh-script-completion-boo977336.patch | 66 ++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 sh-script-completion-boo977336.patch diff --git a/bash-completion.changes b/bash-completion.changes index 31cd427..a70a7f6 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 27 12:42:50 UTC 2016 - werner@suse.de + +- Add patch sh-script-completion-boo977336.patch to make _filedir + work with COMP_FILEDIR_FALLBACK even if local directries exists + this is for bug boo##977336 + ------------------------------------------------------------------- Wed Apr 27 11:54:07 UTC 2016 - werner@suse.de diff --git a/bash-completion.spec b/bash-completion.spec index f04b461..1290809 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -47,6 +47,8 @@ Patch8: respect-variables-boo940837.patch Patch9: rm-completion-smart-boo958462.patch # PATCH-FIX-SUSE boo#963140 Patch10: backticks-bsc963140.patch +# PATCH-FIX-SUSE boo#977336 +Patch11: sh-script-completion-boo977336.patch BuildRequires: asciidoc BuildRequires: libxslt-tools BuildRequires: pkg-config @@ -71,6 +73,7 @@ of the programmable completion feature of Bash 2.04 and later. %patch8 -b .p8 %patch9 -b .p9 %patch10 -b .p10 -p1 +%patch11 -b .p11 -p0 %build %configure diff --git a/sh-script-completion-boo977336.patch b/sh-script-completion-boo977336.patch new file mode 100644 index 0000000..aff41e8 --- /dev/null +++ b/sh-script-completion-boo977336.patch @@ -0,0 +1,66 @@ +This allows to use COMP_FILEDIR_FALLBACK=yes even if +local sub directories exists (boo#977336) + +--- + bash_completion | 35 ++++++++++++++++++----------------- + 1 file changed, 18 insertions(+), 17 deletions(-) + +--- bash_completion ++++ bash_completion 2016-04-27 12:00:15.278198877 +0000 +@@ -558,38 +558,39 @@ _quote_readline_by_ref() + # + _filedir() + { +- local IFS=$'\n' xspec ++ local IFS=$'\n' + + _tilde "$cur" || return 0 + _dollar "$cur" || return 0 + + local -a toks +- local quoted x tmp +- +- _quote_readline_by_ref "$cur" quoted +- x=$( compgen -d -- "$cur" ) && +- while read -r tmp; do +- toks+=( "$tmp" ) +- done <<< "$x" ++ local x tmp + + if [[ "$1" != -d ]]; then ++ local quoted ++ _quote_readline_by_ref "$cur" quoted ++ + # Munge xspec to contain uppercase version too + # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 +- xspec=${1:+"!*.@($1|${1^^})"} ++ local xspec=${1:+"!*.@($1|${1^^})"} + x=$( compgen -f -X "$xspec" -- $quoted ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" +- fi + +- # If the filter failed to produce anything, try without it if configured to +- [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ +- -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ +- x=$( compgen -f -- $quoted ) && +- while read -r tmp; do +- toks+=( "$tmp" ) +- done <<< "$x" ++ # If the filter failed to produce anything, try without it if configured to ++ [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ ++ -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ ++ x=$( compgen -f -- $quoted ) && ++ while read -r tmp; do ++ toks+=( "$tmp" ) ++ done <<< "$x" ++ fi + ++ x=$( compgen -d -- "$cur" ) && ++ while read -r tmp; do ++ toks+=( "$tmp" ) ++ done <<< "$x" + + if [[ ${#toks[@]} -ne 0 ]]; then + # 2>/dev/null for direct invocation, e.g. in the _filedir unit test From 6547a3fd332390a64d7db43cbfc4ed3a86fdd45225801df26c69b3e3a97ff15d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 28 Apr 2016 06:58:03 +0000 Subject: [PATCH 3/6] Accepting request 391870 from home:sbrabec:branches:shells - Remove completions conflicting with util-linux (boo#977259#c3). Blocks https://build.opensuse.org/request/show/391761 OBS-URL: https://build.opensuse.org/request/show/391870 OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=69 --- bash-completion.changes | 5 +++++ bash-completion.spec | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/bash-completion.changes b/bash-completion.changes index a70a7f6..509a81b 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 27 20:34:12 CEST 2016 - sbrabec@suse.com + +- Remove completions conflicting with util-linux (boo#977259#c3). + ------------------------------------------------------------------- Wed Apr 27 12:42:50 UTC 2016 - werner@suse.de diff --git a/bash-completion.spec b/bash-completion.spec index 1290809..9cf73b3 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -93,6 +93,21 @@ popd # shipping in latest systemd now rm -f %{buildroot}%{_datadir}/bash-completion/completions/udevadm rm -f %{buildroot}%{_datadir}/bash-completion/completions/nmcli +# shipping in latest util-linux now +rm -f %{buildroot}%{_datadir}/bash-completion/completions/cal +rm -f %{buildroot}%{_datadir}/bash-completion/completions/chsh +rm -f %{buildroot}%{_datadir}/bash-completion/completions/dmesg +rm -f %{buildroot}%{_datadir}/bash-completion/completions/eject +rm -f %{buildroot}%{_datadir}/bash-completion/completions/hexdump +rm -f %{buildroot}%{_datadir}/bash-completion/completions/hwclock +rm -f %{buildroot}%{_datadir}/bash-completion/completions/ionice +rm -f %{buildroot}%{_datadir}/bash-completion/completions/look +rm -f %{buildroot}%{_datadir}/bash-completion/completions/mount +rm -f %{buildroot}%{_datadir}/bash-completion/completions/newgrp +rm -f %{buildroot}%{_datadir}/bash-completion/completions/renice +rm -f %{buildroot}%{_datadir}/bash-completion/completions/rtcwake +rm -f %{buildroot}%{_datadir}/bash-completion/completions/su +rm -f %{buildroot}%{_datadir}/bash-completion/completions/umount %files %defattr(-,root,root) From 60c29acfe3577867bcc8225dc10447f667fe5f5197929b68dba0a5dfacb553b9 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 May 2016 13:41:14 +0000 Subject: [PATCH 4/6] Split off sub packages devel and doc to avoid dependency cycles OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=70 --- bash-completion.changes | 5 ++++ bash-completion.spec | 64 +++++++++++++++++++++++++++++------------ 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/bash-completion.changes b/bash-completion.changes index 509a81b..06531e3 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 18 13:40:01 UTC 2016 - werner@suse.de + +- Split off sub packages devel and doc to avoid dependency cycles + ------------------------------------------------------------------- Wed Apr 27 20:34:12 CEST 2016 - sbrabec@suse.com diff --git a/bash-completion.spec b/bash-completion.spec index 9cf73b3..82046ad 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -60,6 +60,24 @@ BuildArch: noarch bash-completion is a collection of shell functions that take advantage of the programmable completion feature of Bash 2.04 and later. +%package devel +Summary: The Configuration of Programmable Completion for Bash +Group: Development/Libraries/C and C++ +Provides: bash-completion:%{_datadir}/pkgconfig/bash-completion.pc + +%description devel +This package contains the package configuration file of the +package bash-completion. + +%package doc +Summary: The Documentation of Programmable Completion for Bash +Group: Development/Libraries/C and C++ +Provides: bash-completion:%{_defaultdocdir}/%{name}/AUTHORS + +%description doc +This package contains the package documentation file of the +package bash-completion. + %prep %setup -q %patch0 -b .p0 @@ -86,34 +104,42 @@ popd %install %make_install pushd doc - mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/html - install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}/html/ + mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc + install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}-doc/ popd # shipping in latest systemd now -rm -f %{buildroot}%{_datadir}/bash-completion/completions/udevadm -rm -f %{buildroot}%{_datadir}/bash-completion/completions/nmcli +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/udevadm +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/nmcli # shipping in latest util-linux now -rm -f %{buildroot}%{_datadir}/bash-completion/completions/cal -rm -f %{buildroot}%{_datadir}/bash-completion/completions/chsh -rm -f %{buildroot}%{_datadir}/bash-completion/completions/dmesg -rm -f %{buildroot}%{_datadir}/bash-completion/completions/eject -rm -f %{buildroot}%{_datadir}/bash-completion/completions/hexdump -rm -f %{buildroot}%{_datadir}/bash-completion/completions/hwclock -rm -f %{buildroot}%{_datadir}/bash-completion/completions/ionice -rm -f %{buildroot}%{_datadir}/bash-completion/completions/look -rm -f %{buildroot}%{_datadir}/bash-completion/completions/mount -rm -f %{buildroot}%{_datadir}/bash-completion/completions/newgrp -rm -f %{buildroot}%{_datadir}/bash-completion/completions/renice -rm -f %{buildroot}%{_datadir}/bash-completion/completions/rtcwake -rm -f %{buildroot}%{_datadir}/bash-completion/completions/su -rm -f %{buildroot}%{_datadir}/bash-completion/completions/umount +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/cal +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/chsh +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/dmesg +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/eject +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hexdump +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hwclock +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/ionice +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/look +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/newgrp +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/renice +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/rtcwake +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/su +rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount %files %defattr(-,root,root) -%doc AUTHORS COPYING README +%doc COPYING %{_datadir}/bash-completion %config %{_sysconfdir}/profile.d/bash_completion.sh + +%files devel +%defattr(-,root,root) %{_datadir}/pkgconfig/bash-completion.pc +%files doc +%defattr(-,root,root) +%doc AUTHORS README +%{_defaultdocdir}/%{name}-doc/ + %changelog From a3a947c9087ed10c63cc8a0371ef4c717eb04adca36dc431b53078c9c3012130 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 May 2016 13:47:35 +0000 Subject: [PATCH 5/6] Split off sub packages devel and doc to avoid dependency cycles OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=71 --- bash-completion.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bash-completion.spec b/bash-completion.spec index 82046ad..ab71263 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -104,9 +104,11 @@ popd %install %make_install pushd doc - mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc - install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}-doc/ + mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/html + install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}/html/ popd +install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{name}/ +install -m 0644 README %{buildroot}%{_defaultdocdir}/%{name}/ # shipping in latest systemd now rm -vf %{buildroot}%{_datadir}/bash-completion/completions/udevadm @@ -130,6 +132,9 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount %files %defattr(-,root,root) %doc COPYING +%exclude %{_defaultdocdir}/%{name}/AUTHORS +%exclude %{_defaultdocdir}/%{name}/README +%exclude %{_defaultdocdir}/%{name}/html/ %{_datadir}/bash-completion %config %{_sysconfdir}/profile.d/bash_completion.sh @@ -139,7 +144,8 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount %files doc %defattr(-,root,root) -%doc AUTHORS README -%{_defaultdocdir}/%{name}-doc/ +%{_defaultdocdir}/%{name}/AUTHORS +%{_defaultdocdir}/%{name}/README +%{_defaultdocdir}/%{name}/html/ %changelog From 1d0440fe8b94ab2a3c321564986e5c7225496044bbf869857bc486f1974c7a3d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 May 2016 13:47:47 +0000 Subject: [PATCH 6/6] Split off sub packages devel and doc to avoid dependency cycles OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=72 --- bash-completion.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash-completion.changes b/bash-completion.changes index 06531e3..5cfc181 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Wed May 18 13:40:01 UTC 2016 - werner@suse.de -- Split off sub packages devel and doc to avoid dependency cycles +- Split off sub packages devel and doc to avoid dependency cycles ------------------------------------------------------------------- Wed Apr 27 20:34:12 CEST 2016 - sbrabec@suse.com