diff --git a/.cvsignore b/.cvsignore index b4138f1..ca062e8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -bash-completion-1.1.tar.bz2 -CHANGES-1.1 +bash-completion-1.2.tar.bz2 diff --git a/bash-completion-1.1-service.patch b/bash-completion-1.1-service.patch deleted file mode 100644 index e1555db..0000000 --- a/bash-completion-1.1-service.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3a205c536c3c811b393d635799d19cf9209ca84a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Tue, 3 Nov 2009 23:36:01 +0200 -Subject: [PATCH] Fix service argument completion. - ---- - bash_completion | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/bash_completion b/bash_completion -index e1c4054..6f1978c 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -757,7 +757,7 @@ deinstall clean clean-depends kernel buildworld' make - _services - else - COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ -- s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\1/p" \ -+ s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \ - $sysvdir/${prev##*/} 2>/dev/null`' -- "$cur" ) ) - fi - --- -1.7.0 - diff --git a/bash-completion-1.1-vncviewer.patch b/bash-completion-1.1-vncviewer.patch deleted file mode 100644 index 6de66a7..0000000 --- a/bash-completion-1.1-vncviewer.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/contrib/vncviewer b/contrib/vncviewer -index 1e6e3eb..d3e5c59 100644 ---- a/contrib/vncviewer -+++ b/contrib/vncviewer -@@ -1,22 +1,27 @@ - # bash completion for vncviewer - - have vncviewer && --_vncviewer_bootstrap() { -+_vncviewer_bootstrap() -+{ - local fname - case "$(_realcommand vncviewer)" in -- # If `vncviewer' not installed, default file-dir completion -- '') _filedir `_get_cword` ;; - *xvnc4viewer) fname=_xvnc4viewer ;; -- *tightvncviewer|*) fname=_tightvncviewer ;; -+ *tightvncviewer) fname=_tightvncviewer ;; -+ *) fname=_vncviewer ;; - esac -- if [ $fname ]; then -- # Install real completion for subsequent completions -- complete -F $fname vncviewer -- $fname # Generate completions once for now -- unset -f _vncviewer_bootstrap -- fi -+ -+ # Install real completion for subsequent completions -+ complete -F $fname vncviewer -+ $fname # Generate completions once for now -+ unset -f _vncviewer_bootstrap - } && --complete -F _vncviewer_bootstrap vncviewer -+complete -F _vncviewer_bootstrap vncviewer && -+_vncviewer() -+{ -+ COMPREPLY=() -+ local cur=`_get_cword` -+ _known_hosts_real "$cur" -+} - - have tightvncviewer && - _tightvncviewer() diff --git a/bash-completion.spec b/bash-completion.spec index e2a155e..d9a1332 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,6 +1,9 @@ +# Expected failures in mock, hangs in koji +%bcond_with tests + Name: bash-completion -Version: 1.1 -Release: 6%{?dist} +Version: 1.2 +Release: 1%{?dist} Epoch: 1 Summary: Programmable completion for Bash @@ -9,54 +12,57 @@ License: GPLv2+ URL: http://bash-completion.alioth.debian.org/ Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 Source1: %{name}-plague-client -# Sources 2 and 3 missing from upstream 1.1 tarball. -Source2: http://bash-completion.alioth.debian.org/files/CHANGES-1.1 -# http://git.debian.org/?p=bash-completion/bash-completion.git;a=blob_plain;f=bash_completion.sh;h=915960b614ef7644f9abaa99ed9ef0faa7ac5477;hb=HEAD -Source3: bash_completion.sh -# From upstream post 1.1. -Patch0: %{name}-1.1-vncviewer.patch -Patch1: %{name}-1.1-service.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: bash >= 2.05-12 +%if %{with tests} +BuildRequires: dejagnu +BuildRequires: screen +BuildRequires: tcllib +%endif +Requires: bash >= 3.2 # For symlinking in triggers, #490768 Requires: coreutils %description bash-completion is a collection of shell functions that take advantage -of the programmable completion feature of bash 2. +of the programmable completion feature of bash. %prep %setup -q -%patch0 -p1 -%patch1 -p1 install -pm 644 %{SOURCE1} contrib/plague-client -install -pm 644 %{SOURCE2} CHANGES -install -pm 644 %{SOURCE3} bash_completion.sh # Updated completions shipped upstream: rm contrib/cowsay +# mock too, but only in >= 1.1.1 +# modules too, but only in >= 3.2.7 # subversion too, but only in >= 1.6.5-2 -# yum-utils (repomanage) too, but only in >= 1.1.24 +# yum-utils too, but only in >= 1.1.24 # yum too, but only in >= 3.2.25-2 -# Combine to per-package files: -( echo ; cat contrib/update-alternatives ) >> contrib/chkconfig -rm contrib/update-alternatives +# Combine to per-package files to work around #585384: +cd contrib +( echo ; cat update-alternatives ) >> chkconfig +rm update-alternatives +( echo ; cat sysctl ) >> procps +rm sysctl +( echo ; cat chsh ; echo ; cat mount ; echo ; cat rtcwake ) >> util-linux +rm chsh mount rtcwake +( echo ; cat xrandr ) >> xhost +mv xhost xorg-x11-server-utils ; rm xrandr +cd .. # Not applicable to Fedora and derivatives: rm contrib/apache2ctl rm contrib/apt-build rm contrib/aptitude rm contrib/cardctl -rm contrib/dpkg -rm contrib/dselect rm contrib/heimdal rm contrib/kldload rm contrib/lilo rm contrib/links +rm contrib/lintian rm contrib/pkg_install rm contrib/pkgtools rm contrib/portupgrade @@ -69,6 +75,8 @@ rm contrib/p4 %build +%configure +make bash_completion.sh %install @@ -85,7 +93,8 @@ install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d # Always installed (not triggered) completions for practically always # installed packages or non-triggerable common ones: -for f in bash-builtins configure dd getent iconv rpm ; do +for f in bash-builtins configure coreutils dd getent iconv ifupdown \ + module-init-tools rpm service ; do mv $RPM_BUILD_ROOT{%{_datadir}/%{name}/$f,%{_sysconfdir}/bash_completion.d} done @@ -99,6 +108,22 @@ done cd - +%if %{with tests} +%check +# Should be done/fixed upstream +mkdir test/log test/tmp +# 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 + + %clean rm -rf $RPM_BUILD_ROOT @@ -114,6 +139,7 @@ rm -rf $RPM_BUILD_ROOT [ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/%1 || :\ %{nil} +%bashcomp_trigger abook %bashcomp_trigger ant %bashcomp_trigger apt %bashcomp_trigger aptitude @@ -122,24 +148,27 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger bind-utils %bashcomp_trigger bitkeeper %bashcomp_trigger bittorrent -%bashcomp_trigger bluez-utils bluez +%bashcomp_trigger bluez %bashcomp_trigger brctl bridge-utils %bashcomp_trigger bzip2 %bashcomp_trigger cfengine %bashcomp_trigger chkconfig -%bashcomp_trigger chsh util-linux-ng,util-linux %bashcomp_trigger cksfv %bashcomp_trigger clisp %bashcomp_trigger cpan2dist perl-CPANPLUS %bashcomp_trigger cpio +%bashcomp_trigger cryptsetup cryptsetup-luks %bashcomp_trigger cups %bashcomp_trigger cvs -%bashcomp_trigger dcop kdelibs3 +%bashcomp_trigger cvsps %bashcomp_trigger dhclient %bashcomp_trigger dict dictd +%bashcomp_trigger dpkg +%bashcomp_trigger dselect %bashcomp_trigger dsniff %bashcomp_trigger findutils %bashcomp_trigger freeciv +%bashcomp_trigger fuse %bashcomp_trigger gcc %bashcomp_trigger gcl %bashcomp_trigger gdb @@ -149,13 +178,17 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger gpg gnupg %bashcomp_trigger gpg2 gnupg2 %bashcomp_trigger gzip +%bashcomp_trigger hping2 hping3 %bashcomp_trigger imagemagick ImageMagick %bashcomp_trigger info %bashcomp_trigger ipmitool +%bashcomp_trigger ipsec openswan %bashcomp_trigger iptables +%bashcomp_trigger ipv6calc %bashcomp_trigger isql unixODBC %bashcomp_trigger jar java-1.6.0-openjdk-devel %bashcomp_trigger java java-1.6.0-openjdk +%bashcomp_trigger k3b %bashcomp_trigger ldapvi %bashcomp_trigger lftp %bashcomp_trigger lisp cmucl @@ -168,19 +201,29 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger mc %bashcomp_trigger mcrypt %bashcomp_trigger mdadm +%bashcomp_trigger medusa %bashcomp_trigger minicom %bashcomp_trigger mkinitrd -%bashcomp_trigger mock + +%triggerin -- mock +if [ -e %{_sysconfdir}/bash_completion.d/mock.bash ] ; then + # Upstream completion in mock >= 1.1.1 + rm -f %{_sysconfdir}/bash_completion.d/_mock || : +elif [ ! -e %{_sysconfdir}/bash_completion.d/_mock ] ; then + ln -s %{_datadir}/%{name}/_mock %{_sysconfdir}/bash_completion.d || : +fi +%triggerun -- mock +[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/_mock || : %triggerin -- environment-modules if [ -e %{_datadir}/Modules/init/bash_completion ] ; then # Upstream completion in environment-modules >= 3.2.7 - rm -f %{_sysconfdir}/bash_completion.d/modules || : -elif [ ! -e %{_sysconfdir}/bash_completion.d/modules ] ; then - ln -s %{_datadir}/%{name}/modules %{_sysconfdir}/bash_completion.d || : + rm -f %{_sysconfdir}/bash_completion.d/_modules || : +elif [ ! -e %{_sysconfdir}/bash_completion.d/_modules ] ; then + ln -s %{_datadir}/%{name}/_modules %{_sysconfdir}/bash_completion.d || : fi %triggerun -- environment-modules -[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/modules || : +[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/_modules || : %bashcomp_trigger monodevelop %bashcomp_trigger mplayer @@ -191,6 +234,7 @@ fi %bashcomp_trigger mysqladmin mysql,MySQL-client-community %bashcomp_trigger ncftp %bashcomp_trigger net-tools +%bashcomp_trigger nmap %bashcomp_trigger ntpdate %bashcomp_trigger openldap openldap-clients %bashcomp_trigger openssl @@ -198,26 +242,17 @@ fi %bashcomp_trigger pine %bashcomp_trigger pkg-config pkgconfig %bashcomp_trigger plague-client +%bashcomp_trigger pm-utils %bashcomp_trigger postfix %bashcomp_trigger postgresql %bashcomp_trigger povray +%bashcomp_trigger procps %bashcomp_trigger python -%bashcomp_trigger qdbus qt +%bashcomp_trigger qdbus qt,kdelibs3 %bashcomp_trigger qemu %bashcomp_trigger quota-tools quota %bashcomp_trigger rcs %bashcomp_trigger rdesktop - -%triggerin -- yum-utils -if [ -e %{_sysconfdir}/bash_completion.d/yum-utils.bash ] ; then - # Upstream completion in yum-utils >= 1.1.24 - rm -f %{_sysconfdir}/bash_completion.d/repomanage || : -elif [ ! -e %{_sysconfdir}/bash_completion.d/repomanage ] ; then - ln -s %{_datadir}/%{name}/repomanage %{_sysconfdir}/bash_completion.d || : -fi -%triggerun -- yum-utils -[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/repomanage || : - %bashcomp_trigger resolvconf %bashcomp_trigger rfkill %bashcomp_trigger ri ruby-ri @@ -233,6 +268,7 @@ fi %bashcomp_trigger smartctl smartmontools %bashcomp_trigger snownews %bashcomp_trigger ssh openssh-clients +%bashcomp_trigger sshfs fuse-sshfs %bashcomp_trigger strace %triggerin -- subversion @@ -246,22 +282,24 @@ fi [ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/_subversion || : %bashcomp_trigger svk perl-SVK -%bashcomp_trigger sysctl procps %bashcomp_trigger tar %bashcomp_trigger tcpdump %bashcomp_trigger unace %bashcomp_trigger unrar +%bashcomp_trigger util-linux util-linux-ng,util-linux %bashcomp_trigger vncviewer tigervnc,vnc %bashcomp_trigger vpnc %bashcomp_trigger wireless-tools %bashcomp_trigger wodim +%bashcomp_trigger wol +%bashcomp_trigger wtf bsd-games %bashcomp_trigger wvdial -%bashcomp_trigger xhost xorg-x11-server-utils %bashcomp_trigger xm xen %bashcomp_trigger xmllint libxml2 %bashcomp_trigger xmlwf expat %bashcomp_trigger xmms -%bashcomp_trigger xrandr xorg-x11-server-utils +%bashcomp_trigger xorg-x11-server-utils +%bashcomp_trigger xsltproc libxslt %bashcomp_trigger xz %bashcomp_trigger yp-tools @@ -275,6 +313,16 @@ fi %triggerun -- yum [ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/_yum || : +%triggerin -- yum-utils +if [ -e %{_sysconfdir}/bash_completion.d/yum-utils.bash ] ; then + # Upstream completion in yum-utils >= 1.1.24 + rm -f %{_sysconfdir}/bash_completion.d/_yum-utils || : +elif [ ! -e %{_sysconfdir}/bash_completion.d/_yum-utils ] ; then + ln -s %{_datadir}/%{name}/_yum-utils %{_sysconfdir}/bash_completion.d || : +fi +%triggerun -- yum-utils +[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/_yum-utils || : + %bashcomp_trigger yum-arch @@ -286,14 +334,25 @@ fi %dir %{_sysconfdir}/bash_completion.d/ %{_sysconfdir}/bash_completion.d/bash-builtins %{_sysconfdir}/bash_completion.d/configure +%{_sysconfdir}/bash_completion.d/coreutils %{_sysconfdir}/bash_completion.d/dd %{_sysconfdir}/bash_completion.d/getent %{_sysconfdir}/bash_completion.d/iconv +%{_sysconfdir}/bash_completion.d/ifupdown +%{_sysconfdir}/bash_completion.d/module-init-tools %{_sysconfdir}/bash_completion.d/rpm +%{_sysconfdir}/bash_completion.d/service %{_datadir}/%{name}/ %changelog +* 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. + +* 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). diff --git a/bash_completion.sh b/bash_completion.sh deleted file mode 100644 index 915960b..0000000 --- a/bash_completion.sh +++ /dev/null @@ -1,12 +0,0 @@ -# Check for interactive bash and that we haven't already been sourced. -[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return - -# Check for recent enough version of bash. -bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} -if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then - if [ -r /etc/bash_completion ]; then - # Source completion code. - . /etc/bash_completion - fi -fi -unset bash bminor bmajor diff --git a/sources b/sources index 8d9c57e..5eb8c96 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -1b5ed247ed904d0a2ec6a6d2c5876c52 bash-completion-1.1.tar.bz2 -7daa098026ae41f6c51a3f03035218f3 CHANGES-1.1 +88c022a98a02a02293716f840eadd884 bash-completion-1.2.tar.bz2