[fish] Update to fish-2.1.0-5 from review (bz #1041924)

amluto amluto at fedoraproject.org
Fri Dec 20 18:07:11 UTC 2013


commit 97c0154ea82fded2830aeefdaadfc4398fc40080
Author: Andy Lutomirski <luto at amacapital.net>
Date:   Fri Dec 20 10:05:51 2013 -0800

    Update to fish-2.1.0-5 from review  (bz #1041924)

 .gitignore                   |    1 +
 fish-1.23.0-ARG_MAX.patch    |   18 -----
 fish-add-link-cxxflags.patch |   65 +++++++++++++++++
 fish-remove-usr-local.patch  |   14 ++++
 fish-use-python3.patch       |   27 +++++++
 fish.spec                    |  159 ++++++++++++++++++++++--------------------
 sources                      |    2 +-
 7 files changed, 191 insertions(+), 95 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 53eeeab..aac070d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 fish-1.23.1.tar.bz2
+/fish-2.1.0.tar.gz
diff --git a/fish-add-link-cxxflags.patch b/fish-add-link-cxxflags.patch
new file mode 100644
index 0000000..bd1e5ca
--- /dev/null
+++ b/fish-add-link-cxxflags.patch
@@ -0,0 +1,65 @@
+--- fish-2.1.0/Makefile.in.orig	2013-12-13 09:12:28.963387757 -0800
++++ fish-2.1.0/Makefile.in	2013-12-13 09:12:55.599383681 -0800
+@@ -742,7 +742,7 @@
+ #
+ 
+ fish: $(FISH_OBJS) fish.o
+-	$(CXX) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
++	$(CXX) $(CXXFLAGS) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
+ 
+ 
+ #
+@@ -750,7 +750,7 @@
+ #
+ 
+ fish_pager: $(FISH_PAGER_OBJS)
+-	$(CXX) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
++	$(CXX) $(CXXFLAGS) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
+ 
+ 
+ #
+@@ -758,7 +758,7 @@
+ #
+ 
+ fishd: $(FISHD_OBJS)
+-	$(CXX) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
++	$(CXX) $(CXXFLAGS) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
+ 
+ 
+ #
+@@ -766,7 +766,7 @@
+ #
+ 
+ fish_tests: $(FISH_TESTS_OBJS)
+-	$(CXX) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
++	$(CXX) $(CXXFLAGS) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
+ 
+ 
+ #
+@@ -776,7 +776,7 @@
+ #
+ 
+ mimedb: $(MIME_OBJS)
+-	$(CXX) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
++	$(CXX) $(CXXFLAGS) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
+ 
+ 
+ #
+@@ -784,7 +784,7 @@
+ #
+ 
+ fish_indent: $(FISH_INDENT_OBJS)
+-	$(CXX) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
++	$(CXX) $(CXXFLAGS) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
+ 
+ 
+ #
+@@ -792,7 +792,7 @@
+ #
+ 
+ key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o
+-	$(CXX) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
++	$(CXX) $(CXXFLAGS) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
+ 
+ 
+ #
diff --git a/fish-remove-usr-local.patch b/fish-remove-usr-local.patch
new file mode 100644
index 0000000..233f6df
--- /dev/null
+++ b/fish-remove-usr-local.patch
@@ -0,0 +1,14 @@
+--- fish-2.1.0/configure.orig	2013-12-13 09:08:36.716424191 -0800
++++ fish-2.1.0/configure	2013-12-13 09:09:04.875419686 -0800
+@@ -2922,7 +2922,10 @@
+ #
+ # It also helps FreeBSD which puts libiconv in /usr/local/lib
+ 
+-for i in /usr/pkg /sw /opt /opt/local /usr/local; do
++# This is problematic for RPM, though -- builds have no business
++# looking in /usr/local.
++
++for i in ; do
+ 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $i/include include directory" >&5
+ $as_echo_n "checking for $i/include include directory... " >&6; }
diff --git a/fish-use-python3.patch b/fish-use-python3.patch
new file mode 100644
index 0000000..6ae8acb
--- /dev/null
+++ b/fish-use-python3.patch
@@ -0,0 +1,27 @@
+diff -up fish-2.1.0/share/tools/create_manpage_completions.py.orig fish-2.1.0/share/tools/create_manpage_completions.py
+--- fish-2.1.0/share/tools/create_manpage_completions.py.orig	2013-10-19 13:10:26.000000000 -0700
++++ fish-2.1.0/share/tools/create_manpage_completions.py	2013-12-13 09:35:05.528351152 -0800
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # -*- coding: utf-8 -*-
+ 
+ # Run me like this: ./create_manpage_completions.py /usr/share/man/man{1,8}/* > man_completions.fish
+diff -up fish-2.1.0/share/tools/deroff.py.orig fish-2.1.0/share/tools/deroff.py
+--- fish-2.1.0/share/tools/deroff.py.orig	2013-10-19 13:10:26.000000000 -0700
++++ fish-2.1.0/share/tools/deroff.py	2013-12-13 09:35:26.421351108 -0800
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # -*- coding: utf-8 -*-
+ 
+ """ Deroff.py, ported to Python from the venerable deroff.c """
+diff -up fish-2.1.0/share/tools/web_config/webconfig.py.orig fish-2.1.0/share/tools/web_config/webconfig.py
+--- fish-2.1.0/share/tools/web_config/webconfig.py.orig	2013-10-19 13:10:26.000000000 -0700
++++ fish-2.1.0/share/tools/web_config/webconfig.py	2013-12-13 09:35:32.681351122 -0800
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ # Whether we're Python 2
+ import sys, os
diff --git a/fish.spec b/fish.spec
index fe09d53..905e889 100644
--- a/fish.spec
+++ b/fish.spec
@@ -1,102 +1,109 @@
-Summary:                A friendly interactive shell
 Name:                   fish
-Version:                1.23.1
-Release:                4%{?dist}
-License:                GPLv2
+Version:                2.1.0
+Release:                5%{?dist}
+Summary:                A friendly interactive shell
+
 Group:                  System Environment/Shells
-URL:                    http://fishshell.org/
-Source0:                http://fishshell.org/files/%{version}/fish-%{version}.tar.bz2
-# Emailed to upstream
-Patch0:                 fish-1.23.0-ARG_MAX.patch
-BuildRoot:              %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:          ncurses-devel gettext groff doxygen
-BuildRequires:          autoconf
+License:                GPLv2
+URL:                    http://fishshell.com/
+Source0:                http://fishshell.com/files/%{version}/fish-%{version}.tar.gz
+Patch0:                 fish-remove-usr-local.patch
+Patch1:                 fish-add-link-cxxflags.patch
+Patch2:                 fish-use-python3.patch
+
+BuildRequires:          ncurses-devel gettext groff doxygen python3
+
+# brp-python-bytecompile doesn't parse script #! lines...
+%global __python %{__python3}
 
 %description
-fish is a shell geared towards interactive use. Its features are
-focused on user friendliness and discoverability. The language syntax
-is simple but incompatible with other shell languages.
+fish is a fully-equipped command line shell (like bash or zsh) that is
+smart and user-friendly. fish supports powerful features like syntax
+highlighting, autosuggestions, and tab completions that just work, with
+nothing to learn or configure.
+
 
 %prep
 %setup -q
-%patch0 -p1 -b .ARG_MAX
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+# This requires Python2, but nothing uses it.
+rm create_wajig_completions.py
+
 
 %build
-# The docdir argument is to make the name of the documentation
-# directory 'fish-VERSION', instead of the default, which is simply
-# 'fish'.
-%configure --without-xsel docdir=%{_datadir}/doc/%{name}-%{version}
-make %{?_smp_mflags}
+%configure --docdir=%{_pkgdocdir}
+make %{?_smp_mflags} all fish_tests
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR="$RPM_BUILD_ROOT"
+%make_install
+
+# Fish has magical manpages (visible from inside fish) that live in
+# /usr/share/fish/man/man1.  Compress them (rpm won't do it automatically).
+gzip %{buildroot}%{_datadir}/fish/man/man1/*.1
+
+%find_lang %{name}
 
-# Find translation files
-%find_lang %{name}.\*
 
-# In case...
-mv $RPM_BUILD_ROOT%{_datadir}/fish/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1/
+%check
+./fish_tests |grep -q 'Encountered 0 errors'
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %post
 # Add fish to the list of allowed shells in /etc/shells
-if ! grep %{_bindir}/fish %{_sysconfdir}/shells >/dev/null; then
-        echo %{_bindir}/fish >>%{_sysconfdir}/shells
+if [ "$1" = 1 ]; then
+  if ! [ -f "%{_sysconfdir}/shells" ] || ! grep -q '^%{_bindir}/fish$' "%{_sysconfdir}/shells"; then
+    echo '%{_bindir}/fish' >>"%{_sysconfdir}/shells"
+  fi
 fi
 
+
 %postun
 # Remove fish from the list of allowed shells in /etc/shells
 if [ "$1" = 0 ]; then
-        grep -v %{_bindir}/fish %{_sysconfdir}/shells >%{_sysconfdir}/fish.tmp
-        mv %{_sysconfdir}/fish.tmp %{_sysconfdir}/shells
+  sed -i -e '\#^%{_bindir}/fish$#d' "%{_sysconfdir}/shells"
 fi
 
-%files -f %{name}.\*.lang
 
-%defattr(-,root,root,-)
-%doc %{_datadir}/doc/%{name}-%{version}
+%files -f %{name}.lang
+%doc README.md
+%doc CHANGELOG
+%doc CONTRIBUTING.md
 %{_mandir}/man1/*.1*
-%exclude %{_mandir}/man1/count*
-%exclude %{_mandir}/man1/alias*
-%exclude %{_mandir}/man1/bg*
-%exclude %{_mandir}/man1/bind*
-%exclude %{_mandir}/man1/break*
-%exclude %{_mandir}/man1/builtin*
-%exclude %{_mandir}/man1/cd*
-%exclude %{_mandir}/man1/command*
-%exclude %{_mandir}/man1/complete*
-%exclude %{_mandir}/man1/continue*
-%exclude %{_mandir}/man1/dirs*
-%exclude %{_mandir}/man1/eval*
-%exclude %{_mandir}/man1/exec*
-%exclude %{_mandir}/man1/exit*
-%exclude %{_mandir}/man1/fg*
-%exclude %{_mandir}/man1/help*
-%exclude %{_mandir}/man1/jobs*
-%exclude %{_mandir}/man1/popd*
-%exclude %{_mandir}/man1/pushd*
-%exclude %{_mandir}/man1/read*
-%exclude %{_mandir}/man1/return*
-%exclude %{_mandir}/man1/set*
-%exclude %{_mandir}/man1/source*
-%exclude %{_mandir}/man1/trap*
-%exclude %{_mandir}/man1/type*
-%exclude %{_mandir}/man1/ulimit*
-%exclude %{_mandir}/man1/umask*
-%attr(0755,root,root) %{_bindir}/fish
-%attr(0755,root,root) %{_bindir}/fishd
-%attr(0755,root,root) %{_bindir}/fish_pager
-%attr(0755,root,root) %{_bindir}/fish_indent
-%attr(0755,root,root) %{_bindir}/set_color
-%attr(0755,root,root) %{_bindir}/mimedb
+%{_bindir}/*
 %config(noreplace) %{_sysconfdir}/fish
 %{_datadir}/fish/
 
+
 %changelog
+* Fri Dec 20 2013 Andy Lutomirski <luto at mit.edu> - 2.1.0-5
+- Add BR: python3 (for __pycache__)
+- Remove --without-xsel: fish dropped it in favor of a runtime check
+
+* Fri Dec 13 2013 Andy Lutomirski <luto at mit.edu> - 2.1.0-4
+- Stop looking in /usr/local (#1185 upstream)
+- Link with CXXFLAGS (#1062 upstream)
+- Use /usr/bin/python3 in scripts intead of /usr/bin/env
+- Add fish_tests to the build process
+- Split up the %%doc lines
+
+* Wed Dec 11 2013 Andy Lutomirski <luto at mit.edu> - 2.1.0-3
+- Use %%make_install instead of make install DESTDIR=...
+- Removed rm -rf %%{buildroot}
+- Added Requires: python
+
+* Tue Dec 10 2013 Andy Lutomirski <luto at mit.edu> - 2.1.0-2
+- Drop 'help' patch
+- Misc cleanups
+
+* Mon Dec 9 2013 Andy Lutomirski <luto at mit.edu> - 2.1.0-1
+- Update to 2.1.0 and update a lot of the specfile
+- Fix bogus changelog dates
+- Add a patch to make 'help' work on F19 (upstream #1065)
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.23.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
@@ -122,7 +129,7 @@ fi
 * Mon Jul 07 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1.23.0-5
 - fix conditional comparison
 
-* Fri Jul 06 2008 Oliver Falk <oliver at linux-kernel.at>	- 1.23.0-4
+* Sun Jul 06 2008 Oliver Falk <oliver at linux-kernel.at> - 1.23.0-4
 - Rebuild
 
 * Wed May 21 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1.23.0-3
@@ -131,25 +138,25 @@ fi
 * Mon Feb 18 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.23.0-2
 - Autorebuild for GCC 4.3
 
-* Mon Jan 14 2008 Oliver Falk <oliver at linux-kernel.at>	- 1.23.0-1
+* Mon Jan 14 2008 Oliver Falk <oliver at linux-kernel.at> - 1.23.0-1
 - Update to fix #208780
 - Remove openfix patch, included upstream now
 
-* Wed Oct 31 2007 Oliver Falk <oliver at linux-kernel.at>	- 1.22.3-5
+* Wed Oct 31 2007 Oliver Falk <oliver at linux-kernel.at> - 1.22.3-5
 - Fix glibc's open check, by providing mode, instead of working
   around...
 
-* Wed Oct 31 2007 Oliver Falk <oliver at linux-kernel.at>	- 1.22.3-4
+* Wed Oct 31 2007 Oliver Falk <oliver at linux-kernel.at> - 1.22.3-4
 - Update URL; Fixes bz#359451
 
-* Thu Aug 16 2007 Oliver Falk <oliver at linux-kernel.at>	- 1.22.3-3
+* Thu Aug 16 2007 Oliver Falk <oliver at linux-kernel.at> - 1.22.3-3
 - Workaround glibc's open check
 - Problem reported upstream; Should be fixed there
 
-* Tue Aug 07 2007 Oliver Falk <oliver at linux-kernel.at>	- 1.22.3-2
+* Tue Aug 07 2007 Oliver Falk <oliver at linux-kernel.at> - 1.22.3-2
 - Fix BR autoconf
 
-* Tue Aug 07 2007 Oliver Falk <oliver at linux-kernel.at>	- 1.22.3-1
+* Tue Aug 07 2007 Oliver Falk <oliver at linux-kernel.at> - 1.22.3-1
 - Update; Bug #236868
 - Add missing doxygen BR
 
@@ -180,7 +187,7 @@ fi
 * Tue Sep 06 2005 Axel Liljencrantz <axel at liljencrantz.se> 1.13.2-0
 - 1.13.2
 
-* Fri Aug 30 2005 Axel Liljencrantz <axel at liljencrantz.se> 1.13.1-0
+* Tue Aug 30 2005 Axel Liljencrantz <axel at liljencrantz.se> 1.13.1-0
 - 1.13.1
 
 * Sun Aug 28 2005 Axel Liljencrantz <axel at liljencrantz.se> 1.13.0-0
diff --git a/sources b/sources
index 83cae90..ea4ee7f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ead6b7c6cdb21f35a3d4aa1d5fa596f1  fish-1.23.1.tar.bz2
+3a29aebde522b8f52d9975d7423db99e  fish-2.1.0.tar.gz


More information about the scm-commits mailing list