From ffbb9b4d0f3627432f2f97f1343b75c0cf256741 Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Apr 15 2011 20:51:24 +0000 Subject: Merge branch 'master' into el6 --- diff --git a/.gitignore b/.gitignore index e6e76c0..e0ef701 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -bash-completion-1.2.tar.bz2 /CHANGES.package.old +/bash-completion-1.3.tar.bz2 diff --git a/bash-completion-1.2-init.d.patch b/bash-completion-1.2-init.d.patch deleted file mode 100644 index d1fef29..0000000 --- a/bash-completion-1.2-init.d.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/contrib/service b/contrib/service -index 9ebd117..6efd7c1 100644 ---- a/contrib/service -+++ b/contrib/service -@@ -32,9 +32,11 @@ _service() - return 0 - } && - complete -F _service service --[ -d /etc/init.d/ ] && complete -F _service -o default \ -- $(for i in /etc/init.d/*; do -- complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done) -+for svc in /etc/init.d/*; do -+ [ ! -x "$svc" ] || complete -p "${svc##*/}" &>/dev/null || \ -+ complete -F _service -o default "${svc##*/}" -+done -+unset svc - - # Local variables: - # mode: shell-script diff --git a/bash-completion-1.2-known_hosts-ipv6-630658.patch b/bash-completion-1.2-known_hosts-ipv6-630658.patch deleted file mode 100644 index 137ca8d..0000000 --- a/bash-completion-1.2-known_hosts-ipv6-630658.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bash_completion -+++ b/bash_completion -@@ -1259,16 +1259,16 @@ _known_hosts_real() - awkcur=${awkcur//\./\\\.} - curd=$awkcur - -- if [[ "$awkcur" == [0-9]*.* ]]; then -- # Digits followed by a dot - just search for that -- awkcur="^$awkcur.*" -+ if [[ "$awkcur" == [0-9]*[.:]* ]]; then -+ # Digits followed by a dot or a colon - just search for that -+ awkcur="^$awkcur[.:]*" - elif [[ "$awkcur" == [0-9]* ]]; then -- # Digits followed by no dot - search for digits followed -- # by a dot -- awkcur="^$awkcur.*\." -+ # Digits followed by no dot or colon - search for digits followed -+ # by a dot or a colon -+ awkcur="^$awkcur.*[.:]" - elif [ -z "$awkcur" ]; then -- # A blank - search for a dot or an alpha character -- awkcur="[a-z.]" -+ # A blank - search for a dot, a colon, or an alpha character -+ awkcur="[a-z.:]" - else - awkcur="^$awkcur" - fi -@@ -1278,8 +1278,7 @@ _known_hosts_real() - COMPREPLY=( "${COMPREPLY[@]}" $( awk 'BEGIN {FS=","} - /^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \ - gsub(" .*$", "", $i); \ -- gsub("[\\[\\]]", "", $i); \ -- gsub(":[0-9]+$", "", $i); \ -+ sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \ - if ($i ~ /'"$awkcur"'/) {print $i} \ - }}' "${kh[@]}" 2>/dev/null ) ) - fi diff --git a/bash-completion-1.2-rpm-630328.patch b/bash-completion-1.2-rpm-630328.patch deleted file mode 100644 index a1aa20d..0000000 --- a/bash-completion-1.2-rpm-630328.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/contrib/rpm b/contrib/rpm -index 20f9852..d268cab 100644 ---- a/contrib/rpm -+++ b/contrib/rpm -@@ -142,7 +142,7 @@ _rpm() - -- "$cur" ) ) - return 0 - ;; -- --define|-D) -+ --define|-D|--fileid|--hdrid|--pkgid) - # argument required but no completions available - return 0 - ;; -@@ -180,12 +180,11 @@ _rpm() - # options common to all query types - opts="$opts --changelog --configfiles --conflicts --docfiles - --dump --enhances --filesbypkg --filecaps --fileclass -- --filecolor --fileprovide --filerequire --filesbypkg -- --info --list --obsoletes --pipe --provides -- --queryformat --rcfile --requires --scripts --suggests -- --triggeredby --triggers --whatprovides --whatrequires --xml" -+ --filecolor --fileprovide --filerequire --filesbypkg --info -+ --list --obsoletes --pipe --provides --queryformat --rcfile -+ --requires --scripts --suggests --triggers --xml" - -- if [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then -+ if [[ $COMP_LINE == *\ -@(*([^ -])f|-file )* ]]; then - # -qf completion - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "$opts --dbpath --fscontext \ -@@ -193,23 +192,26 @@ _rpm() - else - _filedir - fi -- elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then -+ elif [[ $COMP_LINE == *\ -@(*([^ -])g|-group )* ]]; then - # -qg completion - _rpm_groups -- elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then -+ elif [[ $COMP_LINE == *\ -@(*([^ -])p|-package )* ]]; then - # -qp; uninstalled package completion - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "$opts --ftpport --ftpproxy \ -- --httpport --httpproxy" -- "$cur" ) ) -+ --httpport --httpproxy --nomanifest" -- "$cur" ) ) - else - _filedir 'rpm' - fi - else - # -q; installed package completion - if [[ "$cur" == -* ]]; then -- COMPREPLY=( $( compgen -W "$opts --dbpath --fscontext \ -- --last --root --state" -- "$cur" ) ) -- elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then -+ COMPREPLY=( $( compgen -W "$opts --all --file --fileid -+ --dbpath --fscontext --ftswalk --group --hdrid --last -+ --package --pkgid --root --specfile --state -+ --triggeredby --whatprovides --whatrequires" \ -+ -- "$cur" ) ) -+ elif [[ $COMP_LINE != *\ -@(*([^ -])a|-all )* ]]; then - _rpm_installed_packages "$nodig" "$nosig" - fi - fi -@@ -229,11 +231,11 @@ _rpm() - --nofiles --noscripts --nomd5 --querytags --specfile \ - --whatrequires --whatprovides" -- "$cur" ) ) - # check whether we're doing file completion -- elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then -+ elif [[ $COMP_LINE == *\ -@(*([^ -])f|-file )* ]]; then - _filedir -- elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then -+ elif [[ $COMP_LINE == *\ -@(*([^ -])g|-group )* ]]; then - _rpm_groups -- elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then -+ elif [[ $COMP_LINE == *\ -@(*([^ -])p|-package )* ]]; then - _filedir 'rpm' - else - _rpm_installed_packages "$nodig" "$nosig" diff --git a/bash-completion-1.2-tilde-username-628130.patch b/bash-completion-1.2-tilde-username-628130.patch deleted file mode 100644 index ef56fd4..0000000 --- a/bash-completion-1.2-tilde-username-628130.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/bash_completion b/bash_completion -index 53eea33..e1e926b 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -618,7 +618,7 @@ _filedir() - { - local i IFS=$'\t\n' xspec - -- __expand_tilde_by_ref cur -+ _tilde "$cur" || return 0 - - local -a toks - local quoted tmp -@@ -803,7 +803,26 @@ _available_interfaces() - } - - -+# Perform tilde (~) completion -+# @return True (0) if completion needs further processing, -+# False (> 0) if tilde is followed by a valid username, completions -+# are put in COMPREPLY and no further processing is necessary. -+_tilde() { -+ local result=0 -+ # Does $1 start with tilde (~) and doesn't contain slash (/)? -+ if [[ ${1:0:1} == "~" && $1 == ${1//\/} ]]; then -+ # Try generate username completions -+ COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) ) -+ result=${#COMPREPLY[@]} -+ fi -+ return $result -+} -+ -+ - # Expand variable starting with tilde (~) -+# We want to expand ~foo/... to /home/foo/... to avoid problems when -+# word-to-complete starting with a tilde is fed to commands and ending up -+# quoted instead of expanded. - # Only the first portion of the variable from the tilde up to the first slash - # (~../) is expanded. The remainder of the variable, containing for example - # a dollar sign variable ($) or asterisk (*) is not expanded. -diff --git a/test/lib/completions/ls.exp b/test/lib/completions/ls.exp -index 171f6e1..fa47f85 100644 ---- a/test/lib/completions/ls.exp -+++ b/test/lib/completions/ls.exp -@@ -19,4 +19,15 @@ if {[assert_exec {ls --help} "" "" "unsupported"]} { - sync_after_int - - -+set test "~part should complete to ~full" -+assert_bash_exec {compgen -u} {} /@ users -+find_unique_completion_pair $users part full -+# If home directory exists, append slash "/", else space " " -+set trail [expr {[llength [glob -nocomplain ~$full]] ? "/" : " "}] -+assert_complete "~$full$trail" "ls ~$part" $test -+ -+ -+sync_after_int -+ -+ - teardown -diff --git a/test/unit/_tilde.exp b/test/unit/_tilde.exp -new file mode 100644 -index 0000000..54394cb ---- /dev/null -+++ b/test/unit/_tilde.exp -@@ -0,0 +1,51 @@ -+# @param string $part Reference to variable to hold partial unique username -+# @param string $full Reference to variable to hold full unique username -+proc setup {part full} { -+ upvar $part _part -+ upvar $full _full -+ -+ assert_bash_exec {compgen -u} {} /@ users -+ find_unique_completion_pair $users _part _full -+ save_env -+} -+ -+ -+proc teardown {} { -+ assert_env_unmodified { -+ /COMPREPLY=/d -+ } -+} -+ -+ -+setup part full -+ -+ -+set test "function should run without errors" -+assert_bash_exec {_tilde > /dev/null} $test -+ -+ -+sync_after_int -+ -+ -+set test "function should not pollute environment" -+# NOTE: A possible environment pollution is detected by assert_env_modified() in teardown() -+assert_bash_exec {foo() { local aa="~"; _tilde "$aa"; }; foo; unset foo} $test -+ -+ -+sync_after_int -+ -+ -+set test "~full should complete to ~full unmodified" -+set cmd [format {_tilde "~%s"; printf "%%s" "${COMPREPLY[@]}"} $full] -+assert_bash_list "~$full" $cmd $test -+ -+ -+sync_after_int -+ -+ -+set test "~part should complete to ~full" -+set cmd [format {_tilde "~%s"; printf "%%s" "${COMPREPLY[@]}"} $part] -+assert_bash_list "~$full" $cmd $test -+ -+ -+teardown diff --git a/bash-completion-1.3-gendiff.patch b/bash-completion-1.3-gendiff.patch new file mode 100644 index 0000000..8a898de --- /dev/null +++ b/bash-completion-1.3-gendiff.patch @@ -0,0 +1,29 @@ +commit d066ace4cbca7f5da611f0fee2497e24e9d84f67 +Author: Ville Skyttä +Date: Mon Feb 7 20:59:01 2011 +0200 + + Do file completion after gendiff output redirection. + + Common use case is "gendiff DIR EXTENSION > FILE". + +diff --git a/completions/rpm b/completions/rpm +index bbab036..5838365 100644 +--- a/completions/rpm ++++ b/completions/rpm +@@ -294,9 +294,13 @@ have gendiff && + _gendiff() + { + COMPREPLY=() +- local cur cword +- _get_comp_words_by_ref cur cword +- [[ $cword != 1 ]] || _filedir -d ++ local cur prev cword ++ _get_comp_words_by_ref cur prev cword ++ if [[ $cword -eq 1 ]]; then ++ _filedir -d ++ elif [[ $prev == *\> ]]; then ++ _filedir ++ fi + } && + complete -F _gendiff gendiff + diff --git a/bash-completion-1.3-helpersdir.patch b/bash-completion-1.3-helpersdir.patch new file mode 100644 index 0000000..fbd12bf --- /dev/null +++ b/bash-completion-1.3-helpersdir.patch @@ -0,0 +1,19 @@ +diff -up bash-completion-1.3/completions/perl~ bash-completion-1.3/completions/perl +--- bash-completion-1.3/completions/perl~ 2011-01-21 11:36:11.000000000 +0200 ++++ bash-completion-1.3/completions/perl 2011-02-07 21:24:10.050008940 +0200 +@@ -4,13 +4,13 @@ have perl && + { + _perlmodules() + { +- COMPREPLY=( $( compgen -P "$prefix" -W "$( $1 ${BASH_SOURCE[0]%/*}/helpers/perl modules $cur )" -- "$cur" ) ) ++ COMPREPLY=( $( compgen -P "$prefix" -W "$( $1 $(dirname $(readlink -f ${BASH_SOURCE[0]}))/helpers/perl modules $cur )" -- "$cur" ) ) + __ltrim_colon_completions "$prefix$cur" + } + + _perlfunctions() + { +- COMPREPLY=( $( compgen -P "$prefix" -W "$( ${BASH_SOURCE[0]%/*}/helpers/perl functions $cur )" -- "$cur" ) ) ++ COMPREPLY=( $( compgen -P "$prefix" -W "$( $(dirname $(readlink -f ${BASH_SOURCE[0]}))/helpers/perl functions $cur )" -- "$cur" ) ) + } + + _perl() diff --git a/bash-completion-1.3-latexdbj-678122.patch b/bash-completion-1.3-latexdbj-678122.patch new file mode 100644 index 0000000..a7ca11f --- /dev/null +++ b/bash-completion-1.3-latexdbj-678122.patch @@ -0,0 +1,19 @@ +commit 2eb713ff764b8a3d4baf2c1353d5474d5c3c74ed +Author: Ted Pavlic +Date: Fri Apr 15 23:47:04 2011 +0300 + + Add *.dbj to (la)tex filename completions (RedHat: #678122). + +diff --git a/bash_completion b/bash_completion +index 9d1e7ee..0062535 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -90,7 +90,7 @@ complete -f -X '!*.@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)| + complete -f -X '!*.@(okular|@(?(e|x)ps|?(E|X)PS|pdf|PDF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM|fdf|FDF)?(.?(gz|GZ|bz2|BZ2)))' okular + complete -f -X '!*.@(?(e)ps|pdf)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr + complete -f -X '!*.texi*' makeinfo texi2html +-complete -f -X '!*.@(?(la)tex|texi|dtx|ins|ltx)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi ++complete -f -X '!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi + complete -f -X '!*.mp3' mpg123 mpg321 madplay + complete -f -X '!*@(.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.part)' xine aaxine fbxine + complete -f -X '!*@(.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.part)' kaffeine dragon diff --git a/bash-completion-1.3-libreoffice-692548.patch b/bash-completion-1.3-libreoffice-692548.patch new file mode 100644 index 0000000..71cdd6d --- /dev/null +++ b/bash-completion-1.3-libreoffice-692548.patch @@ -0,0 +1,25 @@ +commit e10848b7e5613cf07d00f05d0bcafdc0625042ff +Author: Matej Cepl +Date: Thu Mar 31 22:45:21 2011 +0300 + + Complete oo{writer,impress,calc,draw} on LibreOffice FlatXML extensions (RedHat: #692548). + +diff --git a/bash_completion b/bash_completion +index 97da0e4..2b05b80 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -108,10 +108,10 @@ complete -f -X '!*.@([eE][xX][eE]?(.[sS][oO])|[cC][oO][mM]|[sS][cC][rR])' wine + complete -f -X '!*.@(zip|z|gz|tgz)' bzme + # konqueror not here on purpose, it's more than a web/html browser + complete -f -X '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon dillo elinks amaya firefox mozilla-firefox iceweasel google-chrome chromium-browser epiphany +-complete -f -X '!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|odt|ott|odm)' oowriter +-complete -f -X '!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|odp|otp)' ooimpress +-complete -f -X '!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|ods|ots)' oocalc +-complete -f -X '!*.@(sxd|std|sda|sdd|odg|otg)' oodraw ++complete -f -X '!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm)' oowriter ++complete -f -X '!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)' ooimpress ++complete -f -X '!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|?(f)ods|ots)' oocalc ++complete -f -X '!*.@(sxd|std|sda|sdd|?(f)odg|otg)' oodraw + complete -f -X '!*.@(sxm|smf|mml|odf)' oomath + complete -f -X '!*.odb' oobase + complete -f -X '!*.[rs]pm' rpm2cpio diff --git a/bash-completion-1.3-manpager-689180.patch b/bash-completion-1.3-manpager-689180.patch new file mode 100644 index 0000000..00cbe9e --- /dev/null +++ b/bash-completion-1.3-manpager-689180.patch @@ -0,0 +1,12 @@ +diff -up bash-completion-1.3/completions/perl~ bash-completion-1.3/completions/perl +--- bash-completion-1.3/completions/perl~ 2011-01-21 11:36:11.000000000 +0200 ++++ bash-completion-1.3/completions/perl 2011-04-15 23:32:36.110480132 +0300 +@@ -112,7 +112,7 @@ _perldoc() + if [[ "$cur" != */* ]]; then + _perlmodules + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \ +- '$( PAGER=/bin/cat man perl | \ ++ '$( MANPAGER=/bin/cat PAGER=/bin/cat man perl | \ + sed -ne "/perl.*Perl overview/,/perlwin32/p" | \ + awk "\$NF=2 { print \$1}" | command grep perl )' -- "$cur" ) ) + fi diff --git a/bash-completion-1.3-yeswehave.patch b/bash-completion-1.3-yeswehave.patch new file mode 100644 index 0000000..7945304 --- /dev/null +++ b/bash-completion-1.3-yeswehave.patch @@ -0,0 +1,16 @@ +diff -up bash-completion-1.3/bash_completion.orig bash-completion-1.3/bash_completion +--- bash-completion-1.3/bash_completion.orig 2011-02-06 21:16:00.000000000 +0200 ++++ bash-completion-1.3/bash_completion 2011-04-12 21:34:55.527355045 +0300 +@@ -171,7 +171,11 @@ have() + unset -v have + # Completions for system administrator commands are installed as well in + # case completion is attempted via `sudo command ...'. +- PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && ++ # In this packaged setup we don't need to do the availability test below ++ # because only completions for commands that are actually available should ++ # be in /etc/bash_completion.d anyway; not doing the test improves our load ++ # time significantly. ++ #PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && + have="yes" + } + diff --git a/bash-completion-plague-client b/bash-completion-plague-client index 31a8802..a1eafb5 100644 --- a/bash-completion-plague-client +++ b/bash-completion-plague-client @@ -8,7 +8,7 @@ _plague_client() local cur COMPREPLY=() - cur=`_get_cword` + _get_comp_words_by_ref cur [ $COMP_CWORD = 1 ] && \ COMPREPLY=( $( compgen -W 'build detail finish help is_paused \ @@ -16,5 +16,5 @@ _plague_client() update_builders' -- $cur ) ) return 0 -} +} && complete -F _plague_client plague-client diff --git a/bash-completion.spec b/bash-completion.spec index 8330628..855462d 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -2,8 +2,8 @@ %bcond_with tests Name: bash-completion -Version: 1.2 -Release: 5%{?dist} +Version: 1.3 +Release: 3%{?dist} Epoch: 1 Summary: Programmable completion for Bash @@ -13,14 +13,18 @@ URL: http://bash-completion.alioth.debian.org/ Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 Source1: %{name}-plague-client Source2: CHANGES.package.old -# From upstream post-1.2 git -Patch0: %{name}-1.2-init.d.patch -# From upstream post-1.2 git, #628130 -Patch1: %{name}-1.2-tilde-username-628130.patch -# From upstream post-1.2 git, #630328 -Patch2: %{name}-1.2-rpm-630328.patch -# From upstream post-1.2 git, #630658 -Patch3: %{name}-1.2-known_hosts-ipv6-630658.patch +# Non-upstream: adjust helpers dir location to our modified layout +Patch0: %{name}-1.3-helpersdir.patch +# Non-upstream: see comments in patch +Patch1: %{name}-1.3-yeswehave.patch +# From upstream post 1.3 git +Patch2: %{name}-1.3-gendiff.patch +# From upstream post 1.3 git +Patch3: %{name}-1.3-manpager-689180.patch +# From upstream post 1.3 git +Patch4: %{name}-1.3-libreoffice-692548.patch +# From upstream post 1.3 git +Patch5: %{name}-1.3-latexdbj-678122.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -44,90 +48,91 @@ of the programmable completion feature of bash. %patch1 -p1 %patch2 -p1 %patch3 -p1 -install -pm 644 %{SOURCE1} contrib/plague-client +%patch4 -p1 +%patch5 -p1 install -pm 644 %{SOURCE2} . + +%build +%configure +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT %{name}-files.list +make install DESTDIR=$RPM_BUILD_ROOT + +cd $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d + # Updated completions shipped upstream: -rm contrib/cowsay -rm contrib/_modules # environment-modules >= 3.2.7 -%if 0%{?fedora} || 0%{?rhel} > 5 -rm contrib/_mock # mock >= 1.1.1 -rm contrib/_subversion # subversion >= 1.6.5-2 -rm contrib/_yum-utils # yum-utils >= 1.1.24 -rm contrib/_yum # yum >= 3.2.25-2 -%endif +rm cowsay # 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 .. +( echo ; cat xmodmap ; echo ; cat xrandr ; echo ; cat xrdb ) >> xhost +mv xhost xorg-x11-server-utils ; rm xmodmap xrandr xrdb # Not applicable to Fedora and derivatives: -rm contrib/apache2ctl -rm contrib/apt-build -rm contrib/aptitude -rm contrib/cardctl -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 -rm contrib/reportbug -rm contrib/sysv-rc +rm apache2ctl +rm apt-build +rm aptitude +rm cardctl +rm heimdal +rm kldload +rm lilo +rm links +rm lintian +rm pkg_install +rm pkgtools +rm portupgrade +rm reportbug +rm sysv-rc # Not handled due to other reasons (e.g. no known packages) (yet?): -rm contrib/larch -rm contrib/p4 - - -%build -%configure -make bash_completion.sh - - -%install -rm -rf $RPM_BUILD_ROOT %{name}-ghosts.list - -install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d -install -pm 644 bash_completion $RPM_BUILD_ROOT%{_sysconfdir} -install -pm 644 bash_completion.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d +rm larch +rm p4 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name} -install -pm 644 contrib/* $RPM_BUILD_ROOT%{_datadir}/%{name} - -install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d +mv * $RPM_BUILD_ROOT%{_datadir}/%{name} +install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/plague-client # Always installed (not triggered) completions for practically always # installed packages or non-triggerable common ones: for f in bash-builtins configure coreutils dd getent iconv ifupdown \ - module-init-tools rpm service util-linux ; do - mv $RPM_BUILD_ROOT{%{_datadir}/%{name}/$f,%{_sysconfdir}/bash_completion.d} + module-init-tools rpm service sh util-linux ; do + mv $RPM_BUILD_ROOT%{_datadir}/%{name}/$f . done -d=$(pwd) -# ghost list +cd - # $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d + +%if 0%{?rhel} == 5 + # mock >= 1.1.1, subversion >= 1.6.5-2, yum-utils >= 1.1.24, yum >= 3.2.25-2 +install -pm 644 completions/_{mock,subversion,yum-utils,yum} \ + $RPM_BUILD_ROOT%{_datadir}/%{name} +%endif + +# file list +filelist=$(pwd)/%{name}-files.list cd $RPM_BUILD_ROOT%{_datadir}/%{name} for f in * ; do + [ $f = helpers ] && continue ln -s %{_datadir}/%{name}/$f $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d - echo "%ghost %{_sysconfdir}/bash_completion.d/$f" >> $d/%{name}-ghosts.list + echo "%ghost %{_sysconfdir}/bash_completion.d/$f" >> $filelist + echo "%{_datadir}/%{name}/$f" >> $filelist done -cd - +cd - # $RPM_BUILD_ROOT%{_datadir}/%{name} + +# avoid dependency on perl (will only be invoked if perl is installed) +chmod -x $RPM_BUILD_ROOT%{_datadir}/%{name}/helpers/perl %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) @@ -161,6 +166,8 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger apt %bashcomp_trigger aptitude %bashcomp_trigger aspell +%bashcomp_trigger autoconf +%bashcomp_trigger automake %bashcomp_trigger autorpm %bashcomp_trigger bind-utils %bashcomp_trigger bitkeeper @@ -174,6 +181,7 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger clisp %bashcomp_trigger cpan2dist perl-CPANPLUS %bashcomp_trigger cpio +%bashcomp_trigger crontab cronie,vixie-cron %{_bindir}/crontab %bashcomp_trigger cryptsetup cryptsetup-luks %bashcomp_trigger cups %bashcomp_trigger cvs @@ -183,8 +191,11 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger dpkg %bashcomp_trigger dselect %bashcomp_trigger dsniff +%bashcomp_trigger dvd+rw-tools +%bashcomp_trigger e2fsprogs %bashcomp_trigger findutils %bashcomp_trigger freeciv +%bashcomp_trigger freerdp %bashcomp_trigger fuse %bashcomp_trigger gcc %bashcomp_trigger gcl @@ -197,8 +208,10 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger gzip %bashcomp_trigger hping2 hping3 %bashcomp_trigger imagemagick ImageMagick +%bashcomp_trigger iftop %bashcomp_trigger info %bashcomp_trigger ipmitool +%bashcomp_trigger iproute2 iproute %bashcomp_trigger ipsec openswan %bashcomp_trigger iptables %bashcomp_trigger ipv6calc @@ -209,6 +222,8 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger ldapvi %bashcomp_trigger lftp %bashcomp_trigger lisp cmucl +%bashcomp_trigger lrzip +%bashcomp_trigger lsof %bashcomp_trigger lvm lvm2 %bashcomp_trigger lzma xz-lzma-compat %bashcomp_trigger lzop @@ -222,7 +237,7 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger minicom %bashcomp_trigger mkinitrd -%if 0%{?rhel} && 0%{?rhel} < 6 +%if 0%{?rhel} == 5 %triggerin -- mock if [ -e %{_sysconfdir}/bash_completion.d/mock.bash ] ; then # Upstream completion in mock >= 1.1.1 @@ -245,6 +260,7 @@ fi %bashcomp_trigger net-tools %bashcomp_trigger nmap %bashcomp_trigger ntpdate +%bashcomp_trigger open-iscsi iscsi-initiator-utils %bashcomp_trigger openldap openldap-clients %bashcomp_trigger openssl %bashcomp_trigger perl @@ -276,11 +292,12 @@ fi %bashcomp_trigger sitecopy %bashcomp_trigger smartctl smartmontools %bashcomp_trigger snownews +%bashcomp_trigger sqlite3 sqlite %bashcomp_trigger ssh openssh-clients %bashcomp_trigger sshfs fuse-sshfs %bashcomp_trigger strace -%if 0%{?rhel} && 0%{?rhel} < 6 +%if 0%{?rhel} == 5 %triggerin -- subversion if [ -e %{_sysconfdir}/bash_completion.d/subversion ] ; then # Upstream completion in subversion >= 1.6.5-2 @@ -293,6 +310,7 @@ fi %endif %bashcomp_trigger svk perl-SVK +%bashcomp_trigger sysbench %bashcomp_trigger tar %bashcomp_trigger tcpdump %bashcomp_trigger unace @@ -313,7 +331,7 @@ fi %bashcomp_trigger xz %bashcomp_trigger yp-tools -%if 0%{?rhel} && 0%{?rhel} < 6 +%if 0%{?rhel} == 5 %triggerin -- yum if [ -e %{_sysconfdir}/bash_completion.d/yum.bash ] ; then # Upstream completion in yum >= 3.2.25-2 @@ -338,7 +356,7 @@ fi %bashcomp_trigger yum-arch -%files -f %{name}-ghosts.list +%files -f %{name}-files.list %defattr(-,root,root,-) %doc AUTHORS CHANGES CHANGES.package.old COPYING README TODO %config(noreplace) %{_sysconfdir}/profile.d/bash_completion.sh @@ -354,11 +372,26 @@ fi %{_sysconfdir}/bash_completion.d/module-init-tools %{_sysconfdir}/bash_completion.d/rpm %{_sysconfdir}/bash_completion.d/service +%{_sysconfdir}/bash_completion.d/sh %{_sysconfdir}/bash_completion.d/util-linux -%{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/helpers/ +%attr(755,root,root) %{_datadir}/%{name}/helpers/perl %changelog +* 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 diff --git a/sources b/sources index ba0246d..b42ecbf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -88c022a98a02a02293716f840eadd884 bash-completion-1.2.tar.bz2 fcd2bf5bafefa45ebede53805bb397f7 CHANGES.package.old +a1262659b4bbf44dc9e59d034de505ec bash-completion-1.3.tar.bz2