Blame SPECS/bash-completion.spec

1c7eb3
# Expected failures in mock, hangs in koji
1c7eb3
%bcond_with tests
1c7eb3
# The *.py files we ship are not python scripts, #813651
1c7eb3
%global _python_bytecompile_errors_terminate_build 0
1c7eb3
1c7eb3
Name:           bash-completion
1c7eb3
Version:        2.1
1c7eb3
Release:        8%{?dist}
1c7eb3
Epoch:          1
1c7eb3
Summary:        Programmable completion for Bash
1c7eb3
1c7eb3
License:        GPLv2+
1c7eb3
URL:            http://bash-completion.alioth.debian.org/
1c7eb3
Source0:        http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
1c7eb3
Source2:        CHANGES.package.old
1c7eb3
# https://bugzilla.redhat.com/677446, see also noblacklist patch
1c7eb3
Source3:        %{name}-2.0-redefine_filedir.bash
1c7eb3
Source4:        script_list
1c7eb3
# https://bugzilla.redhat.com/677446, see also redefine_filedir source
1c7eb3
Patch0:         %{name}-1.99-noblacklist.patch
1c7eb3
# Commands included in util-linux >= 2.23-rc2
1c7eb3
Patch1:         %{name}-2.1-util-linux-223.patch
1c7eb3
1c7eb3
BuildArch:      noarch
1c7eb3
%if %{with tests}
1c7eb3
BuildRequires:  dejagnu
1c7eb3
BuildRequires:  screen
1c7eb3
BuildRequires:  tcllib
1c7eb3
%endif
1c7eb3
Requires:       bash >= 4.1
1c7eb3
1c7eb3
%description
1c7eb3
bash-completion is a collection of shell functions that take advantage
1c7eb3
of the programmable completion feature of bash.
1c7eb3
1c7eb3
1c7eb3
%prep
1c7eb3
%setup -q
1c7eb3
%patch0 -p1
1c7eb3
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
1c7eb3
%patch1 -p1
1c7eb3
%endif
1c7eb3
install -pm 644 %{SOURCE2} .
1c7eb3
1c7eb3
1c7eb3
%build
1c7eb3
%configure
1c7eb3
make %{?_smp_mflags}
1c7eb3
1c7eb3
1c7eb3
%install
1c7eb3
make install DESTDIR=$RPM_BUILD_ROOT
1c7eb3
1c7eb3
# Updated completion shipped in cowsay package:
1c7eb3
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
1c7eb3
%if 0%{?fedora} < 19 && 0%{?rhel} < 7
1c7eb3
# systemd >= 198 ships this one:
1c7eb3
install -pm 644 completions/_udevadm \
1c7eb3
    $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/udevadm
1c7eb3
%endif
1c7eb3
%if 0%{?fedora} > 17 || 0%{?rhel} >= 7
1c7eb3
# NetworkManager >= 0.9.8.0 ships this one:
1c7eb3
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/nmcli
1c7eb3
%endif
1c7eb3
%if 0%{?rhel} >= 7
1c7eb3
# remove all completions in file script_list
1c7eb3
for script in $(cat %{SOURCE4}); do
1c7eb3
 rm -f $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/$script
1c7eb3
done
1c7eb3
%endif
1c7eb3
1c7eb3
install -Dpm 644 %{SOURCE3} \
1c7eb3
    $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir
1c7eb3
1c7eb3
1c7eb3
%if %{with tests}
1c7eb3
%check
1c7eb3
# For some tests involving non-ASCII filenames
1c7eb3
export LANG=en_US.UTF-8
1c7eb3
# This stuff borrowed from dejagnu-1.4.4-17 (tests need a terminal)
1c7eb3
tmpfile=$(mktemp)
1c7eb3
screen -D -m sh -c '( make check ; echo $? ) >'$tmpfile
1c7eb3
cat $tmpfile
1c7eb3
result=$(tail -n 1 $tmpfile)
1c7eb3
rm -f $tmpfile
1c7eb3
exit $result
1c7eb3
%endif
1c7eb3
1c7eb3
1c7eb3
%files
1c7eb3
%doc AUTHORS CHANGES CHANGES.package.old COPYING README
1c7eb3
# Temporarily not noreplace for < 1.90 to 1.90+ updates (changed location)
1c7eb3
%config %{_sysconfdir}/profile.d/bash_completion.sh
1c7eb3
%{_sysconfdir}/bash_completion.d/
1c7eb3
%{_datadir}/bash-completion/
1c7eb3
%{_datadir}/pkgconfig/bash-completion.pc
1c7eb3
1c7eb3
1c7eb3
%changelog
1c7eb3
* Tue Feb 14 2017 Siteshwar Vashisht <svashisht@redhat.com> - 1:2.1-8
1c7eb3
- Enable completions for umount
1c7eb3
  Resolves: #1400223
1c7eb3
1c7eb3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:2.1-7
1c7eb3
- Mass rebuild 2013-12-27
1c7eb3
1c7eb3
* Fri Nov 1 2013 Petr Stodulka <pstodulk@redhat.com> - 2.1-6
1c7eb3
- Install only available completions (#810343 - comment 15)
1c7eb3
  without "tar" and remove the other.
1c7eb3
1c7eb3
* Fri Sep 13 2013 Roman Rakus <rrakus@redhat.com> - 2.1-5
1c7eb3
- Added one more missing conditional
1c7eb3
  Resolves: #1007839
1c7eb3
1c7eb3
* Fri Sep 13 2013 Roman Rakus <rrakus@redhat.com> - 2.1-4
1c7eb3
- Added conditionals to not add completions for some commands; the packages
1c7eb3
  has their own completions
1c7eb3
  Resolves: #1007839
1c7eb3
1c7eb3
* Thu Sep 12 2013 Roman Rakus <rrakus@redhat.com> - 2.1-3
1c7eb3
- Build for RHEL-7
1c7eb3
1c7eb3
* Tue Apr  9 2013 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-2
1c7eb3
- Don't install nmcli completion on F-18+ (#950071).
1c7eb3
1c7eb3
* Mon Apr  8 2013 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-1
1c7eb3
- Update to 2.1 (fixes #860510, #906469, #912113, #919246, #928253).
1c7eb3
- Don't ship completions included in util-linux 2.23-rc2 for F-19+.
1c7eb3
1c7eb3
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0-3
1c7eb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1c7eb3
1c7eb3
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0-2
1c7eb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1c7eb3
1c7eb3
* Tue Jun 19 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:2.0-1
1c7eb3
- Update to 2.0 (fixes #817902, #831835).
1c7eb3
- Don't try to python-bytecompile our non-python *.py (#813651).
1c7eb3
1c7eb3
* Sun Jan  8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
1c7eb3
- Update to 1.99.
1c7eb3
1c7eb3
* Fri Nov  4 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.90-1
1c7eb3
- Update to 1.90.
1c7eb3
- Specfile cleanups.
1c7eb3
- Move pre-1.2 %%changelog entries to CHANGES.package.old.
1c7eb3
1c7eb3
* Mon Sep  5 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.3-6
1c7eb3
- Apply upstream patch providing a config and profile hook to make it
1c7eb3
  easier to disable bash-completion on per user basis.
1c7eb3
1c7eb3
* Mon Aug 15 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.3-5
1c7eb3
- Fix ant completion when complete-ant-cmd.pl is N/A (#729771).
1c7eb3
- Fix bash < 4 _filedir_xspec uppercase expansion issue (#726220).
1c7eb3
- Drop _filedir_xspec self-parsing with bash >= 4 for speedups (#479936).
1c7eb3
- Do install triggers with lua where available to speed up package install.
1c7eb3
- Add completion for sum (#717341).
1c7eb3
1c7eb3
* Tue May 10 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.3-4
1c7eb3
- Work around problems caused by Adobe Reader overriding _filedir (#677446).
1c7eb3
1c7eb3
* Tue Apr 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.3-3
1c7eb3
- Patch to not test command availability for each snippet, improves load time.
1c7eb3
- Apply upstream libreoffice flat XML extensions fix for #692548.
1c7eb3
- Apply upstream MANPAGER fix for #689180.
1c7eb3
- Apply upstream (la)tex *.dbj fix for #678122.
1c7eb3
1c7eb3
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.3-2
1c7eb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1c7eb3
1c7eb3
* Mon Feb  7 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.3-1
1c7eb3
- Update to 1.3.
1c7eb3
1c7eb3
* Wed Oct 13 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-5
1c7eb3
- Install util-linux completions unconditionally.
1c7eb3
- Make trigger target package rename etc tracking easier to maintain, and
1c7eb3
  handle man-db/man (#642193, Yanko Kaneti), mysql/MySQL-client-community,
1c7eb3
  and tigervnc/vnc renames better.
1c7eb3
- Move pre-1.0 %%changelog entries to CHANGES.package.old.
1c7eb3
1c7eb3
* Tue Oct  5 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-4
1c7eb3
- More IPv6 address completion fixes, #630658.
1c7eb3
1c7eb3
* Tue Sep 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-3
1c7eb3
- Apply upstream ~username completion fix for #628130.
1c7eb3
- Apply upstream rpm completion improvements for #630328.
1c7eb3
- Apply upstream IPv6 address completion fix for #630658.
1c7eb3
- Drop some completions that are included in respective upstream packages.
1c7eb3
- Fix qdbus/dcop uninstall trigger.
1c7eb3
1c7eb3
* Mon Jun 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-2
1c7eb3
- Apply upstream post 1.2 /etc/init.d/* completion improvements to fix #608351.
1c7eb3
1c7eb3
* Wed Jun 16 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-1
1c7eb3
- Update to 1.2, all patches applied upstream.
1c7eb3
- Fixes #444469, #538433, #541423, and #601813, works around #585384.