From 0d3d1aa2682fb92e53ff23ff9d476473604da771 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Sep 13 2013 13:51:54 +0000 Subject: import bash-completion-2.1-5.el7.src.rpm --- diff --git a/.bash-completion.metadata b/.bash-completion.metadata new file mode 100644 index 0000000..03464d0 --- /dev/null +++ b/.bash-completion.metadata @@ -0,0 +1 @@ +b74bf7d83646e1412bb07dbb1de09db1c9715599 SOURCES/bash-completion-2.1.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/CHANGES.package.old b/SOURCES/CHANGES.package.old new file mode 100644 index 0000000..f592d86 --- /dev/null +++ b/SOURCES/CHANGES.package.old @@ -0,0 +1,253 @@ +* Fri Mar 12 2010 Ville Skyttä - 1:1.1-7 +- Autoinstall dpkg and dselect completions. + +* Thu Mar 11 2010 Todd Zullinger - 1:1.1-6 +- Apply upstream post 1.1 service argument fix (#572794). + +* Sat Dec 26 2009 Ville Skyttä - 1:1.1-5 +- Apply upstream post 1.1 generic vncviewer fixes. +- Autoinstall vncviewer completion also on tigervnc. +- Autoinstall chsh completion also on util-linux. + +* Tue Dec 15 2009 Ville Skyttä - 1:1.1-4 +- Fix autoinstall of completions named other than the package (#546905). +- Use environment-modules upstream completion instead of ours if available. +- Autoinstall mysqladmin completion also on MySQL-client-community. + +* Tue Nov 17 2009 Ville Skyttä - 1:1.1-3 +- Prepare for smooth coexistence with yum upstream completion. + +* Sun Nov 8 2009 Ville Skyttä - 1:1.1-2 +- Use yum-utils completion instead of ours if available. + +* Mon Oct 19 2009 Ville Skyttä - 1:1.1-1 +- Update to 1.1. +- bash 4 quoting fix, mock and repomanage completions included upstream. + +* Sun Sep 20 2009 Ville Skyttä - 1:1.0-5 +- Use svn completion from subversion instead of ours if available (#496456). + +* Fri Jul 24 2009 Fedora Release Engineering - 1:1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat Apr 18 2009 Ville Skyttä - 1:1.0-3 +- Do not install cowsay completion, an updated version is shipped with it. + +* Tue Apr 7 2009 Ville Skyttä - 1:1.0-2 +- Apply upstream patch to fix quoting issues with bash 4.x (#490322). + +* Mon Apr 6 2009 Ville Skyttä - 1:1.0-1 +- 1.0. + +* Mon Mar 23 2009 Ville Skyttä - 20080705-4.20090314gitf4f0984 +- Add dependency on coreutils for triggers (#490768). +- Update and improve mock completion. + +* Sun Mar 15 2009 Ville Skyttä - 20080705-3.20090314gitf4f0984 +- git snapshot f4f0984, fixes #484578 (another issue), #486998. + +* Mon Feb 23 2009 Fedora Release Engineering - 20080705-3.20090211git47d0c5b +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 11 2009 Ville Skyttä - 20080705-2.20090211git47d0c5b +- git snapshot 47d0c5b, fixes #484578. +- lzop and repomanage completions included upstream. + +* Sun Jan 18 2009 Ville Skyttä - 20080705-2.20090115bzr1252 +- r1252 snapshot; all patches applied upstream. +- Do not install mercurial completion, an updated version is shipped with it. +- Improve lzop and repomanage completion. + +* Tue Jan 6 2009 Ville Skyttä - 20080705-1 +- 20080705; new upstream at http://bash-completion.alioth.debian.org/ +- Perl, Debian, and scp patches applied upstream. +- Patch to improve man completion: more sections, better filename handling. +- Patch to speed up yum install/deplist completion (#478784). +- Patch to fix and speed up rpm installed packages completion. +- Update mock completion. + +* Thu Sep 25 2008 Ville Skyttä +- More Matroska associations (#463829, based on patch from Yanko Kaneti). + +* Thu Sep 11 2008 Ville Skyttä - 20060301-13 +- Borrow/improve/adapt to Fedora some patches from Mandriva: improved support + for getent and rpm --eval, better rpm backup file avoidance, lzma support. +- Patch/unpatch to fix gzip and bzip2 options completion. +- Patch to add --rsyncable to gzip options completion. +- Add and trigger-install support for lzop. +- Associate *.sqlite with sqlite3. + +* Wed Jul 23 2008 Ville Skyttä - 20060301-12 +- Fix plague-client completion install (#456355, Ricky Zhou). +- Trigger-install support for sitecopy. + +* Tue Apr 29 2008 Ville Skyttä - 20060301-11 +- Media player association improvements (#444467). + +* Sat Feb 23 2008 Ville Skyttä - 20060301-10 +- Patch to fix filename completion with svn (#430059). +- Trigger-install support for dsniff. +- Drop disttag. + +* Mon Dec 31 2007 Ville Skyttä - 20060301-8 +- Associate VDR recording files with media players. +- Update mock completion. + +* Fri Nov 16 2007 Ville Skyttä - 20060301-7 +- Add JPEG2000 extensions for display(1) (#304771). +- Update mock completion. + +* Sat Sep 22 2007 Ville Skyttä - 20060301-6 +- Patch to improve perl completion (#299571, Jim Radford, + http://use.perl.org/~Alias/journal/33508). + +* Mon Aug 13 2007 Ville Skyttä - 20060301-5 +- License: GPLv2+ + +* Sun Jun 24 2007 Jeff Sheltren - 20060301-4 +- Update triggers to work with older versions of RPM + +* Wed Feb 28 2007 Ville Skyttä - 20060301-3 +- Fix scp with single quotes (#217178). +- Borrow fix for bzip2 w/spaces, and apropos and whatis support from Debian. + +* Thu Aug 31 2006 Ville Skyttä - 20060301-2 +- Trigger-install support for gcl, lilypond, mercurial and svk. +- Improve mock completion a bit. + +* Thu Mar 2 2006 Ville Skyttä - 20060301-1 +- 20060301, patches and profile.d scriptlet applied/included upstream. +- Convert docs to UTF-8. + +* Wed Feb 8 2006 Ville Skyttä - 20050721-4 +- Don't source ourselves in non-interactive shells (#180419, Behdad Esfahbod). +- Trigger-install snippets for clisp, gnatmake, isql, ri, sbcl, and snownews. + +* Sat Feb 4 2006 Ville Skyttä +- Add mtr(8) completion using known hosts (#179918, Yanko Kaneti). + +* Sun Jan 8 2006 Ville Skyttä - 20050721-3 +- Patch to hopefully fix quoting problems with bash 3.1 (#177056). + +* Mon Nov 28 2005 Ville Skyttä - 20050721-2 +- Work around potential login problem in profile.d snippet (#174355). + +* Sat Nov 26 2005 Ville Skyttä +- Don't mark the main source file as %config. +- Make profile.d snippet non-executable (#35714) and noreplace. +- Add mock, plague-client and repomanage completion. +- Allow "cvs stat" completion. +- Macroize trigger creation. + +* Fri Jul 22 2005 Ville Skyttä - 20050721-1 +- 20050721. + +* Wed Jul 20 2005 Ville Skyttä - 20050720-1 +- 20050720, all patches applied upstream. + +* Mon Jul 18 2005 Ville Skyttä - 20050712-1 +- 20050712. +- Add more OO.o2 extensions, and *.pdf for evince (#163520, Horst von Brand). +- Add/fix support for some multimedia formats and players. +- Fix tarball completion. + +* Sat Jan 22 2005 Ville Skyttä - 0:20050121-2 +- Update to 20050121. + +* Thu Jan 13 2005 Ville Skyttä - 0:20050112-1 +- Update to 20050112, openssl patch applied upstream. + +* Wed Jan 5 2005 Ville Skyttä - 0:20050103-1 +- Update to 20050103. + +* Sat Nov 27 2004 Ville Skyttä - 0:20041017-5 +- Change version scheme, bump release to provide Extras upgrade path. + +* Sat Nov 6 2004 Ville Skyttä 0:0.0-0.fdr.4.20041017 +- Do the right thing with bash >= 3 too in profile.d snippet (bug 2228, thanks + to Thorsten Leemhuis). + +* Mon Oct 18 2004 Ville Skyttä 0:0.0-0.fdr.3.20041017 +- Update to 20041017, adds dhclient, lvm, and bittorrent completion. + +* Mon Jul 12 2004 Ville Skyttä 0:0.0-0.fdr.3.20040711 +- Update to 20040711, patches applied upstream. + +* Sun Jul 4 2004 Ville Skyttä 0:0.0-0.fdr.3.20040704 +- Update to 20040704. +- Change to symlinked /etc/bash_completion.d snippets, add patch to read them. + +* Wed May 26 2004 Ville Skyttä 0:0.0-0.fdr.3.20040526 +- Update to 20040526. + +* Thu Apr 1 2004 Ville Skyttä 0:0.0-0.fdr.3.20040331 +- Add command-specific contrib snippet copying triggers. + +* Thu Apr 1 2004 Ville Skyttä 0:0.0-0.fdr.2.20040331 +- Update to 20040331. + +* Sun Feb 15 2004 Ville Skyttä 0:0.0-0.fdr.2.20040214 +- Update to 20040214. + +* Wed Feb 11 2004 Ville Skyttä 0:0.0-0.fdr.2.20040210 +- Update to 20040210. + +* Fri Jan 2 2004 Ville Skyttä 0:0.0-0.fdr.2.20040101 +- Update to 20040101. +- Update %description. + +* Sat Dec 27 2003 Ville Skyttä 0:0.0-0.fdr.2.20031225 +- Update to 20031225. + +* Sat Dec 20 2003 Ville Skyttä 0:0.0-0.fdr.2.20031215 +- Don't pull in *.rpm* from %{_sysconfdir}/bash_completion.d. + +* Mon Dec 15 2003 Ville Skyttä 0:0.0-0.fdr.1.20031215 +- Update to 20031215. + +* Sun Nov 30 2003 Ville Skyttä 0:0.0-0.fdr.1.20031125 +- Update to 20031125. + +* Thu Nov 13 2003 Ville Skyttä 0:0.0-0.fdr.1.20031112 +- Update to 20031112. + +* Wed Oct 22 2003 Ville Skyttä 0:0.0-0.fdr.1.20031022 +- Update to 20031022. + +* Tue Oct 7 2003 Ville Skyttä 0:0.0-0.fdr.1.20031007 +- Update to 20031007. + +* Tue Sep 30 2003 Ville Skyttä 0:0.0-0.fdr.1.20030929 +- Update to 20030929. + +* Fri Sep 12 2003 Ville Skyttä 0:0.0-0.fdr.1.20030911 +- Update to 20030911. + +* Thu Aug 21 2003 Ville Skyttä 0:0.0-0.fdr.1.20030821 +- Update to 20030821. +- Drop .nosrc.rpm patch, already applied upstream. + +* Sat Aug 16 2003 Ville Skyttä 0:0.0-0.fdr.1.20030811 +- Update to 20030811. +- Patch to make rpm --rebuild work with .nosrc.rpm's. + +* Sun Aug 3 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030803 +- Update to 20030803. + +* Wed Jul 23 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030721 +- Update to 20030721. + +* Sun Jul 13 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030713 +- Update to 20030713. + +* Mon Jun 30 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030630 +- Update to 20030630. + +* Sun Jun 8 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030607 +- Update to 20030607. + +* Tue May 27 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030527 +- Update to 20030527. + +* Sat May 24 2003 Ville Skyttä - 0:0.0-0.fdr.1.20030505 +- First build. diff --git a/SOURCES/bash-completion-1.99-noblacklist.patch b/SOURCES/bash-completion-1.99-noblacklist.patch new file mode 100644 index 0000000..f3cd42e --- /dev/null +++ b/SOURCES/bash-completion-1.99-noblacklist.patch @@ -0,0 +1,12 @@ +diff -up bash-completion-1.99/bash_completion~ bash-completion-1.99/bash_completion +--- bash-completion-1.99/bash_completion~ 2012-01-08 01:03:46.000000000 +0200 ++++ bash-completion-1.99/bash_completion 2012-01-08 13:50:33.412012530 +0200 +@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR + + # Blacklisted completions, causing problems with our code. + # +-_blacklist_glob='@(acroread.sh)' ++_blacklist_glob='@()' + + # Turn on extended globbing and programmable completion + shopt -s extglob progcomp diff --git a/SOURCES/bash-completion-2.0-redefine_filedir.bash b/SOURCES/bash-completion-2.0-redefine_filedir.bash new file mode 100644 index 0000000..af6d5bb --- /dev/null +++ b/SOURCES/bash-completion-2.0-redefine_filedir.bash @@ -0,0 +1,48 @@ +# This is a copy of the _filedir function in bash_completion, included +# and (re)defined separately here because some versions of Adobe +# Reader, if installed, are known to override this function with an +# incompatible version, causing various problems. +# +# https://bugzilla.redhat.com/677446 +# http://forums.adobe.com/thread/745833 + +_filedir() +{ + local i IFS=$'\n' xspec + + _tilde "$cur" || return 0 + + local -a toks + local quoted x tmp + + _quote_readline_by_ref "$cur" quoted + x=$( compgen -d -- "$quoted" ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" + + if [[ "$1" != -d ]]; then + # Munge xspec to contain uppercase version too + # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 + 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 [[ ${#toks[@]} -ne 0 ]]; then + # 2>/dev/null for direct invocation, e.g. in the _filedir unit test + compopt -o filenames 2>/dev/null + COMPREPLY+=( "${toks[@]}" ) + fi +} # _filedir() diff --git a/SOURCES/bash-completion-2.1-util-linux-223.patch b/SOURCES/bash-completion-2.1-util-linux-223.patch new file mode 100644 index 0000000..d6b922e --- /dev/null +++ b/SOURCES/bash-completion-2.1-util-linux-223.patch @@ -0,0 +1,264 @@ +diff -up bash-completion-2.1/bash_completion~ bash-completion-2.1/bash_completion +--- bash-completion-2.1/bash_completion~ 2013-04-05 13:55:51.000000000 +0300 ++++ bash-completion-2.1/bash_completion 2013-04-06 11:43:56.292170674 +0300 +@@ -59,7 +59,7 @@ complete -d pushd + # start of section containing compspecs that can be handled within bash + + # user commands see only users +-complete -u write chfn groups slay w sux runuser ++complete -u groups slay w sux + + # bg completes with stopped jobs + complete -A stopped -P '"%' -S '"' bg +diff -up bash-completion-2.1/completions/Makefile.am~ bash-completion-2.1/completions/Makefile.am +--- bash-completion-2.1/completions/Makefile.am~ 2013-04-05 13:55:51.000000000 +0300 ++++ bash-completion-2.1/completions/Makefile.am 2013-04-06 11:49:59.955323723 +0300 +@@ -27,7 +27,6 @@ bashcomp_DATA = a2x \ + brctl \ + btdownloadheadless.py \ + bzip2 \ +- cal \ + cancel \ + cardctl \ + ccache \ +@@ -43,7 +42,6 @@ bashcomp_DATA = a2x \ + chpasswd \ + chronyc \ + chrpath \ +- chsh \ + cksfv \ + cleanarch \ + clisp \ +@@ -65,7 +63,6 @@ bashcomp_DATA = a2x \ + desktop-file-validate \ + dhclient \ + dict \ +- dmesg \ + dnsspoof \ + dot \ + dpkg \ +@@ -76,7 +73,6 @@ bashcomp_DATA = a2x \ + dumpe2fs \ + e2freefrag \ + e2label \ +- eject \ + eog \ + ether-wake \ + evince \ +@@ -120,12 +116,10 @@ bashcomp_DATA = a2x \ + gzip \ + hcitool \ + hddtemp \ +- hexdump \ + hid2hci \ + hping2 \ + htop \ + htpasswd \ +- hwclock \ + iconv \ + id \ + idn \ +@@ -137,7 +131,6 @@ bashcomp_DATA = a2x \ + installpkg \ + interdiff \ + invoke-rc.d \ +- ionice \ + ip \ + iperf \ + ipmitool \ +@@ -177,7 +170,6 @@ bashcomp_DATA = a2x \ + list_lists \ + list_members \ + list_owners \ +- look \ + lpq \ + lpr \ + lrzip \ +@@ -225,7 +217,6 @@ bashcomp_DATA = a2x \ + nc \ + ncftp \ + nethogs \ +- newgrp \ + newlist \ + newusers \ + ngrep \ +@@ -283,7 +274,6 @@ bashcomp_DATA = a2x \ + rdesktop \ + remove_members \ + removepkg \ +- renice \ + reportbug \ + reptyr \ + resolvconf \ +@@ -298,7 +288,6 @@ bashcomp_DATA = a2x \ + rpmcheck \ + rrdtool \ + rsync \ +- rtcwake \ + sbcl \ + sbopkg \ + screen \ +@@ -320,7 +309,6 @@ bashcomp_DATA = a2x \ + sshow \ + strace \ + strings \ +- su \ + sudo \ + svcadm \ + svk \ +@@ -478,7 +466,6 @@ CLEANFILES = \ + mplayer2 \ + msgsnarf \ + muttng \ +- ncal \ + pbzip2 \ + pccardctl \ + pdlzip \ +@@ -603,10 +590,6 @@ symlinks: $(targetdir) $(DATA) + rm -f $(targetdir)/$$file && \ + $(LN_S) bzip2 $(targetdir)/$$file ; \ + done +- for file in ncal ; do \ +- rm -f $(targetdir)/$$file && \ +- $(LN_S) cal $(targetdir)/$$file ; \ +- done + for file in pccardctl ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) cardctl $(targetdir)/$$file ; \ +@@ -669,10 +652,6 @@ symlinks: $(targetdir) $(DATA) + rm -f $(targetdir)/$$file && \ + $(LN_S) hcitool $(targetdir)/$$file ; \ + done +- for file in hd ; do \ +- rm -f $(targetdir)/$$file && \ +- $(LN_S) hexdump $(targetdir)/$$file ; \ +- done + for file in hping hping3 ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) hping2 $(targetdir)/$$file ; \ +diff -up bash-completion-2.1/completions/Makefile.in~ bash-completion-2.1/completions/Makefile.in +--- bash-completion-2.1/completions/Makefile.in~ 2013-04-05 13:56:55.000000000 +0300 ++++ bash-completion-2.1/completions/Makefile.in 2013-04-06 11:51:40.564047943 +0300 +@@ -198,7 +198,6 @@ bashcomp_DATA = a2x \ + brctl \ + btdownloadheadless.py \ + bzip2 \ +- cal \ + cancel \ + cardctl \ + ccache \ +@@ -214,7 +213,6 @@ bashcomp_DATA = a2x \ + chpasswd \ + chronyc \ + chrpath \ +- chsh \ + cksfv \ + cleanarch \ + clisp \ +@@ -236,7 +234,6 @@ bashcomp_DATA = a2x \ + desktop-file-validate \ + dhclient \ + dict \ +- dmesg \ + dnsspoof \ + dot \ + dpkg \ +@@ -247,7 +244,6 @@ bashcomp_DATA = a2x \ + dumpe2fs \ + e2freefrag \ + e2label \ +- eject \ + eog \ + ether-wake \ + evince \ +@@ -291,12 +287,10 @@ bashcomp_DATA = a2x \ + gzip \ + hcitool \ + hddtemp \ +- hexdump \ + hid2hci \ + hping2 \ + htop \ + htpasswd \ +- hwclock \ + iconv \ + id \ + idn \ +@@ -308,7 +302,6 @@ bashcomp_DATA = a2x \ + installpkg \ + interdiff \ + invoke-rc.d \ +- ionice \ + ip \ + iperf \ + ipmitool \ +@@ -348,7 +341,6 @@ bashcomp_DATA = a2x \ + list_lists \ + list_members \ + list_owners \ +- look \ + lpq \ + lpr \ + lrzip \ +@@ -396,7 +388,6 @@ bashcomp_DATA = a2x \ + nc \ + ncftp \ + nethogs \ +- newgrp \ + newlist \ + newusers \ + ngrep \ +@@ -454,7 +445,6 @@ bashcomp_DATA = a2x \ + rdesktop \ + remove_members \ + removepkg \ +- renice \ + reportbug \ + reptyr \ + resolvconf \ +@@ -469,7 +459,6 @@ bashcomp_DATA = a2x \ + rpmcheck \ + rrdtool \ + rsync \ +- rtcwake \ + sbcl \ + sbopkg \ + screen \ +@@ -491,7 +480,6 @@ bashcomp_DATA = a2x \ + sshow \ + strace \ + strings \ +- su \ + sudo \ + svcadm \ + svk \ +@@ -649,7 +637,6 @@ CLEANFILES = \ + mplayer2 \ + msgsnarf \ + muttng \ +- ncal \ + pbzip2 \ + pccardctl \ + pdlzip \ +@@ -984,10 +971,6 @@ symlinks: $(targetdir) $(DATA) + rm -f $(targetdir)/$$file && \ + $(LN_S) bzip2 $(targetdir)/$$file ; \ + done +- for file in ncal ; do \ +- rm -f $(targetdir)/$$file && \ +- $(LN_S) cal $(targetdir)/$$file ; \ +- done + for file in pccardctl ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) cardctl $(targetdir)/$$file ; \ +@@ -1050,10 +1033,6 @@ symlinks: $(targetdir) $(DATA) + rm -f $(targetdir)/$$file && \ + $(LN_S) hcitool $(targetdir)/$$file ; \ + done +- for file in hd ; do \ +- rm -f $(targetdir)/$$file && \ +- $(LN_S) hexdump $(targetdir)/$$file ; \ +- done + for file in hping hping3 ; do \ + rm -f $(targetdir)/$$file && \ + $(LN_S) hping2 $(targetdir)/$$file ; \ diff --git a/SPECS/bash-completion.spec b/SPECS/bash-completion.spec new file mode 100644 index 0000000..4a5dbea --- /dev/null +++ b/SPECS/bash-completion.spec @@ -0,0 +1,178 @@ +# Expected failures in mock, hangs in koji +%bcond_with tests +# The *.py files we ship are not python scripts, #813651 +%global _python_bytecompile_errors_terminate_build 0 + +Name: bash-completion +Version: 2.1 +Release: 5%{?dist} +Epoch: 1 +Summary: Programmable completion for Bash + +License: GPLv2+ +URL: http://bash-completion.alioth.debian.org/ +Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 +Source2: CHANGES.package.old +# https://bugzilla.redhat.com/677446, see also noblacklist patch +Source3: %{name}-2.0-redefine_filedir.bash +# https://bugzilla.redhat.com/677446, see also redefine_filedir source +Patch0: %{name}-1.99-noblacklist.patch +# Commands included in util-linux >= 2.23-rc2 +Patch1: %{name}-2.1-util-linux-223.patch + +BuildArch: noarch +%if %{with tests} +BuildRequires: dejagnu +BuildRequires: screen +BuildRequires: tcllib +%endif +Requires: bash >= 4.1 + +%description +bash-completion is a collection of shell functions that take advantage +of the programmable completion feature of bash. + + +%prep +%setup -q +%patch0 -p1 +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +%patch1 -p1 +%endif +install -pm 644 %{SOURCE2} . + + +%build +%configure +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +# Updated completion shipped in cowsay package: +rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink} +%if 0%{?fedora} < 19 && 0%{?rhel} < 7 +# systemd >= 198 ships this one: +install -pm 644 completions/_udevadm \ + $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/udevadm +%endif +%if 0%{?fedora} > 17 || 0%{?rhel} >= 7 +# NetworkManager >= 0.9.8.0 ships this one: +rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/nmcli +%endif + +install -Dpm 644 %{SOURCE3} \ + $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir + + +%if %{with tests} +%check +# For some tests involving non-ASCII filenames +export LANG=en_US.UTF-8 +# This stuff borrowed from dejagnu-1.4.4-17 (tests need a terminal) +tmpfile=$(mktemp) +screen -D -m sh -c '( make check ; echo $? ) >'$tmpfile +cat $tmpfile +result=$(tail -n 1 $tmpfile) +rm -f $tmpfile +exit $result +%endif + + +%files +%doc AUTHORS CHANGES CHANGES.package.old COPYING README +# Temporarily not noreplace for < 1.90 to 1.90+ updates (changed location) +%config %{_sysconfdir}/profile.d/bash_completion.sh +%{_sysconfdir}/bash_completion.d/ +%{_datadir}/bash-completion/ +%{_datadir}/pkgconfig/bash-completion.pc + + +%changelog +* Fri Sep 13 2013 Roman Rakus - 2.1-5 +- Added one more missing conditional + Resolves: #1007839 + +* Fri Sep 13 2013 Roman Rakus - 2.1-4 +- Added conditionals to not add completions for some commands; the packages + has their own completions + Resolves: #1007839 + +* Thu Sep 12 2013 Roman Rakus - 2.1-3 +- Build for RHEL-7 + +* Tue Apr 9 2013 Ville Skyttä - 1:2.1-2 +- Don't install nmcli completion on F-18+ (#950071). + +* Mon Apr 8 2013 Ville Skyttä - 1:2.1-1 +- Update to 2.1 (fixes #860510, #906469, #912113, #919246, #928253). +- Don't ship completions included in util-linux 2.23-rc2 for F-19+. + +* Wed Feb 13 2013 Fedora Release Engineering - 1:2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1:2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 19 2012 Ville Skyttä - 1:2.0-1 +- Update to 2.0 (fixes #817902, #831835). +- Don't try to python-bytecompile our non-python *.py (#813651). + +* Sun Jan 8 2012 Ville Skyttä - 1:1.99-1 +- Update to 1.99. + +* Fri Nov 4 2011 Ville Skyttä - 1:1.90-1 +- Update to 1.90. +- Specfile cleanups. +- Move pre-1.2 %%changelog entries to CHANGES.package.old. + +* Mon Sep 5 2011 Ville Skyttä - 1:1.3-6 +- Apply upstream patch providing a config and profile hook to make it + easier to disable bash-completion on per user basis. + +* Mon Aug 15 2011 Ville Skyttä - 1:1.3-5 +- Fix ant completion when complete-ant-cmd.pl is N/A (#729771). +- Fix bash < 4 _filedir_xspec uppercase expansion issue (#726220). +- Drop _filedir_xspec self-parsing with bash >= 4 for speedups (#479936). +- Do install triggers with lua where available to speed up package install. +- Add completion for sum (#717341). + +* Tue May 10 2011 Ville Skyttä - 1:1.3-4 +- Work around problems caused by Adobe Reader overriding _filedir (#677446). + +* Tue Apr 12 2011 Ville Skyttä - 1:1.3-3 +- Patch to not test command availability for each snippet, improves load time. +- Apply upstream libreoffice flat XML extensions fix for #692548. +- Apply upstream MANPAGER fix for #689180. +- Apply upstream (la)tex *.dbj fix for #678122. + +* Mon Feb 07 2011 Fedora Release Engineering - 1:1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 7 2011 Ville Skyttä - 1:1.3-1 +- Update to 1.3. + +* Wed Oct 13 2010 Ville Skyttä - 1:1.2-5 +- Install util-linux completions unconditionally. +- Make trigger target package rename etc tracking easier to maintain, and + handle man-db/man (#642193, Yanko Kaneti), mysql/MySQL-client-community, + and tigervnc/vnc renames better. +- Move pre-1.0 %%changelog entries to CHANGES.package.old. + +* Tue Oct 5 2010 Ville Skyttä - 1:1.2-4 +- More IPv6 address completion fixes, #630658. + +* Tue Sep 28 2010 Ville Skyttä - 1:1.2-3 +- Apply upstream ~username completion fix for #628130. +- Apply upstream rpm completion improvements for #630328. +- Apply upstream IPv6 address completion fix for #630658. +- Drop some completions that are included in respective upstream packages. +- Fix qdbus/dcop uninstall trigger. + +* Mon Jun 28 2010 Ville Skyttä - 1:1.2-2 +- Apply upstream post 1.2 /etc/init.d/* completion improvements to fix #608351. + +* Wed Jun 16 2010 Ville Skyttä - 1:1.2-1 +- Update to 1.2, all patches applied upstream. +- Fixes #444469, #538433, #541423, and #601813, works around #585384.