719e63
# this file is encoded in UTF-8  -*- coding: utf-8 -*-
719e63
719e63
Summary: Powerful interactive shell
719e63
Name: zsh
719e63
Version: 5.0.2
eb5f7e
Release: 25%{?dist}.1
719e63
License: MIT
719e63
URL: http://zsh.sourceforge.net/
719e63
Group: System Environment/Shells
719e63
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
719e63
Source1: zlogin.rhs
719e63
Source2: zlogout.rhs
719e63
Source3: zprofile.rhs
719e63
Source4: zshrc.rhs
719e63
Source5: zshenv.rhs
719e63
Source6: dotzshrc
719e63
Source7: zshprompt.pl
e0e421
Source8: http://cgit.freedesktop.org/systemd/systemd/plain/shell-completion/systemd-zsh-completion.zsh
719e63
Patch0: zsh-serial.patch
704a93
704a93
# make the wait built-in work for already exited processes (#1150554)
704a93
Patch2: zsh-5.0.2-wait-for-exited.patch
704a93
719e63
Patch4: zsh-4.3.6-8bit-prompts.patch
719e63
Patch5: zsh-test-C02-dev_fd-mock.patch
c0c4d7
a57977
# signal safety when updating global state (#1163823)
a57977
Patch6: zsh-5.0.2-signal-safety.patch
a57977
c0c4d7
# fix NOEXEC option in execsimple() optimisation (#1146512)
c0c4d7
Patch7: zsh-5.0.2-noexec.patch
c0c4d7
704a93
# optimize matching of multiple * in wildcards (#1130418)
704a93
Patch8: zsh-5.0.2-wildcard-opt.patch
704a93
a57977
# use heap rather than stack allocation for variable length arrays (#1130418)
a57977
Patch9: zsh-5.0.2-disable-alloca.patch
a57977
a57977
# shell emulation doc addition (#1147545)
a57977
Patch10: zsh-5.0.2-emul-man-page.patch
a57977
719e63
# Tmp.
719e63
Patch11: zsh-5.0.2.texi-itemx.patch
e0e421
Patch12: http://ausil.fedorapeople.org/aarch64/zsh/zsh-aarch64.patch
704a93
a57977
# suppress a warning about closing an already closed file descriptor (#1131191)
a57977
Patch13: zsh-5.0.2-close-fd.patch
a57977
704a93
# fix SIGSEGV of the syntax check in ksh emulation mode (#1222867)
704a93
Patch14: zsh-5.0.2-ksh-syntax-check.patch
704a93
a57977
# fix command substitutions to parse contents as they are read in (#1241023)
a57977
Patch15: zsh-5.0.2-cmd-subst.patch
a57977
ebecab
# fix malloc() signal leak in lexsave() (#1267912)
ebecab
Patch16: zsh-5.0.2-malloc-signal.patch
ebecab
ebecab
# queue signals while processing a job exit (#1291782)
ebecab
Patch17: zsh-5.0.2-sigchld-deadlock.patch
ebecab
c6dbd9
# prevent zsh from crashing when printing the "out of memory" message (#1302229)
c6dbd9
Patch18: zsh-5.0.2-oom-fatal-error.patch
c6dbd9
ebecab
# signal-handling related fixes collected from upstream (#1198671)
ebecab
Patch19: zsh-5.0.2-signal-handling.patch
ebecab
c6dbd9
# improve options handling in the _arguments completion utility (#1334312)
c6dbd9
Patch20: zsh-5.0.2-comp-args.patch
c6dbd9
c6dbd9
# fix off-by-one error in completion utility cache code (#1344599)
c6dbd9
Patch21: zsh-5.0.2-comp-cache.patch
c6dbd9
719e63
BuildRequires: coreutils sed ncurses-devel libcap-devel
e0e421
BuildRequires: texinfo texi2html gawk hostname
719e63
Requires(post): /sbin/install-info grep
719e63
Requires(preun): /sbin/install-info
719e63
Requires(postun): coreutils grep
719e63
719e63
%description
719e63
The zsh shell is a command interpreter usable as an interactive login
719e63
shell and as a shell script command processor.  Zsh resembles the ksh
719e63
shell (the Korn shell), but includes many enhancements.  Zsh supports
719e63
command line editing, built-in spelling correction, programmable
719e63
command completion, shell functions (with autoloading), a history
719e63
mechanism, and more.
719e63
719e63
%package html
719e63
Summary: Zsh shell manual in html format
719e63
Group: System Environment/Shells
719e63
719e63
%description html
719e63
The zsh shell is a command interpreter usable as an interactive login
719e63
shell and as a shell script command processor.  Zsh resembles the ksh
719e63
shell (the Korn shell), but includes many enhancements.  Zsh supports
719e63
command line editing, built-in spelling correction, programmable
719e63
command completion, shell functions (with autoloading), a history
719e63
mechanism, and more.
719e63
719e63
This package contains the Zsh manual in html format.
719e63
719e63
%prep
719e63
719e63
%setup -q
719e63
%patch0 -p1 -b .serial
704a93
%patch2 -p1
719e63
%patch4 -p1
719e63
%patch5 -p1
a57977
%patch6 -p1
c0c4d7
%patch7 -p1
704a93
%patch8 -p1
a57977
%patch9 -p1
a57977
%patch10 -p1
719e63
%patch11 -p1
e0e421
%patch12 -p1
a57977
%patch13 -p1
704a93
%patch14 -p1
a57977
%patch15 -p1
ebecab
%patch16 -p1
ebecab
%patch17 -p1
c6dbd9
%patch18 -p1
ebecab
%patch19 -p1
c6dbd9
%patch20 -p1
c6dbd9
%patch21 -p1
719e63
719e63
cp -p %SOURCE7 .
719e63
719e63
%build
719e63
%define _bindir /bin
719e63
# Avoid stripping...
719e63
export LDFLAGS=""
719e63
%configure --enable-etcdir=%{_sysconfdir} --with-tcsetpgrp  --enable-maildir-support
719e63
719e63
make all html
719e63
719e63
%check
719e63
# Run the testsuite
719e63
# the completion tests hang on s390 and s390x
719e63
  ( cd Test
719e63
    mkdir skipped
719e63
%ifarch s390 s390x ppc ppc64
719e63
    mv Y*.ztst skipped
719e63
%endif
719e63
%ifarch s390 s390x ppc64
719e63
    # FIXME: This is a real failure, Debian apparently just don't test.
719e63
    # RHBZ: 460043
719e63
    mv D02glob.ztst skipped
719e63
%endif
719e63
    # FIXME: This hangs in mock
719e63
    # Running test: Test loading of all compiled modules
719e63
    mv V01zmodload.ztst skipped
719e63
    true )
719e63
  ZTST_verbose=1 make test
719e63
719e63
%install
719e63
rm -rf $RPM_BUILD_ROOT
719e63
%makeinstall install.info \
719e63
  fndir=$RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/functions \
719e63
  sitefndir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions \
719e63
  scriptdir=$RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/scripts \
719e63
  sitescriptdir=$RPM_BUILD_ROOT%{_datadir}/zsh/scripts
719e63
e0e421
install -p %SOURCE8 $RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/functions/_systemd
e0e421
719e63
rm -f ${RPM_BUILD_ROOT}%{_bindir}/zsh-%{version}
719e63
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
719e63
719e63
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}
719e63
for i in %{SOURCE4} %{SOURCE1} %{SOURCE2} %{SOURCE5} %{SOURCE3}; do
719e63
    install -m 644 $i ${RPM_BUILD_ROOT}%{_sysconfdir}/"$(basename $i .rhs)"
719e63
done
719e63
719e63
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/skel
719e63
install -m 644 %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/skel/.zshrc
719e63
719e63
# This is just here to shut up rpmlint, and is very annoying.
719e63
# Note that we can't chmod everything as then rpmlint will complain about
719e63
# those without a she-bang line.
719e63
for i in checkmail harden run-help zcalc zkbd; do
719e63
    sed -i -e 's!/usr/local/bin/zsh!%{_bindir}/zsh!' \
719e63
      ${RPM_BUILD_ROOT}%{_datadir}/zsh/*/functions/$i
719e63
    chmod +x ${RPM_BUILD_ROOT}%{_datadir}/zsh/*/functions/$i
719e63
done
719e63
719e63
719e63
%clean
719e63
rm -rf $RPM_BUILD_ROOT
719e63
719e63
%post
719e63
if [ ! -f %{_sysconfdir}/shells ] ; then
719e63
    echo "%{_bindir}/zsh" > %{_sysconfdir}/shells
719e63
else
719e63
    grep -q "^%{_bindir}/zsh$" %{_sysconfdir}/shells || echo "%{_bindir}/zsh" >> %{_sysconfdir}/shells
719e63
fi
719e63
719e63
if [ -f %{_infodir}/zsh.info.gz ]; then
719e63
# This is needed so that --excludedocs works.
719e63
/sbin/install-info %{_infodir}/zsh.info.gz %{_infodir}/dir \
719e63
  --entry="* zsh: (zsh).			An enhanced bourne shell."
719e63
fi
719e63
719e63
:
719e63
719e63
%preun
719e63
if [ "$1" = 0 ] ; then
719e63
    if [ -f %{_infodir}/zsh.info.gz ]; then
719e63
    # This is needed so that --excludedocs works.
719e63
    /sbin/install-info --delete %{_infodir}/zsh.info.gz %{_infodir}/dir \
719e63
      --entry="* zsh: (zsh).			An enhanced bourne shell."
719e63
    fi
719e63
fi
719e63
:
719e63
719e63
%postun
719e63
if [ "$1" = 0 ] ; then
719e63
    if [ -f %{_sysconfdir}/shells ] ; then
719e63
        TmpFile=`%{_bindir}/mktemp /tmp/.zshrpmXXXXXX`
719e63
        grep -v '^%{_bindir}/zsh$' %{_sysconfdir}/shells > $TmpFile
719e63
        cp -f $TmpFile %{_sysconfdir}/shells
719e63
        rm -f $TmpFile
719e63
    fi
719e63
fi
719e63
719e63
%files
719e63
%defattr(-,root,root)
719e63
%doc README LICENCE Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ FEATURES MACHINES
719e63
%doc NEWS Etc/zsh-development-guide Etc/completion-style-guide zshprompt.pl
719e63
%attr(755,root,root) %{_bindir}/zsh
719e63
%{_mandir}/*/*
719e63
%{_infodir}/*
719e63
%{_datadir}/zsh
719e63
%{_libdir}/zsh
719e63
%config(noreplace) %{_sysconfdir}/skel/.z*
719e63
%config(noreplace) %{_sysconfdir}/z*
719e63
719e63
%files html
719e63
%defattr(-,root,root)
719e63
%doc Doc/*.html
719e63
719e63
%changelog
eb5f7e
* Mon Oct 17 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-25.el7_3.1
eb5f7e
- fix crash while parsing the here-document syntax (#1374752)
eb5f7e
c6dbd9
* Thu Jul 14 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-25
c6dbd9
- improve use of new command substitution in completion (#1356388)
c6dbd9
c6dbd9
* Fri Jun 10 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-24
c6dbd9
- fix off-by-one error in completion utility cache code (#1344599)
c6dbd9
c6dbd9
* Mon May 23 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-23
ebecab
- fix parse error on a script with unescaped exclamation mark (#1338689)
ebecab
c6dbd9
* Tue May 17 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-22
c6dbd9
- fix alias expansion in history for command substitution (#1321303)
c6dbd9
c6dbd9
* Mon May 09 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-21
c6dbd9
- improve options handling in the _arguments completion utility (#1334312)
c6dbd9
c6dbd9
* Tue Mar 29 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-20
c6dbd9
- turn off history word marking in command substitution (#1321303)
c6dbd9
c6dbd9
* Tue Mar 01 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-19
ebecab
- signal-handling related fixes collected from upstream (#1198671)
c6dbd9
c6dbd9
* Wed Feb 17 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-18
c6dbd9
- prevent zsh from crashing when printing the "out of memory" message (#1302229)
c6dbd9
c6dbd9
* Wed Feb 17 2016 Kamil Dudka <kdudka@redhat.com> - 5.0.2-17
ebecab
- queue signals while processing a job exit (#1291782)
c6dbd9
c6dbd9
* Mon Nov 02 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-16
ebecab
- fix malloc() signal leak in lexsave() (#1267912)
ebecab
c6dbd9
* Thu Oct 08 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-15
c6dbd9
- fix crash in ksh mode with -n and $HOME (#1267251)
c6dbd9
a57977
* Fri Aug 14 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-14
a57977
- fix alias handling in command substitution (#1253555)
a57977
a57977
* Thu Jul 30 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-13
a57977
- fix parser regression introduced by the fix for bug #1241023
a57977
a57977
* Wed Jul 08 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-12
a57977
- fix command substitutions to parse contents as they are read in (#1241023)
a57977
a57977
* Fri May 22 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-11
704a93
- fix SIGSEGV of the syntax check in ksh emulation mode (#1222867)
a57977
a57977
* Mon May 18 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-10
a57977
- signal safety when updating global state (#1163823)
a57977
a57977
* Tue May 05 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-9
a57977
- signal safety when updating global state in execshfunc() (#1163823)
704a93
- make the wait built-in work for already exited processes (#1162198)
a57977
- replace an incorrect comment in /etc/zshenv (#1164312)
704a93
- optimize matching of multiple * in wildcards (#1130418)
a57977
- use heap rather than stack allocation for variable length arrays (#1165118)
a57977
- shell emulation doc addition (#1147545)
a57977
- suppress a warning about closing an already closed file descriptor (#1131191)
704a93
a57977
* Thu Mar 19 2015 Kamil Dudka <kdudka@redhat.com> - 5.0.2-8
c0c4d7
- fix NOEXEC option in execsimple() optimisation (#1146512)
c0c4d7
e0e421
* Tue Jan 28 2014 James Antill <james@fedoraproject.org> - 5.0.2-7
e0e421
- Remove unneeded build require on tetex.
e0e421
- Resolves: rhbz#1037828
e0e421
- Depend on hostname package instead of /bin/hostname.
e0e421
e0e421
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 5.0.2-6
e0e421
- Mass rebuild 2014-01-24
e0e421
e0e421
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 5.0.2-5
e0e421
- Mass rebuild 2013-12-27
e0e421
e0e421
* Tue Jun 25 2013 Dominic Hopf <dmaphy@fedoraproject.org> - 5.0.2-4
e0e421
- up-to-date systemd completion (#949003)
e0e421
- apply patch for building for aarch64 (#926864)
e0e421
719e63
* Mon Apr 15 2013 James Antill <james@fedoraproject.org> - 5.0.2-3
719e63
- Fix the changelog dates.
719e63
- Fix the texi itemx bug.
719e63
- Resolves: bug#927863
719e63
719e63
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.2-2
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
719e63
719e63
* Tue Jan 08 2013 Dominic Hopf <dmaphy@fedoraproject.org> - 5.0.2-1
719e63
- Update to new upstream version: Zsh 5.0.2
719e63
719e63
* Wed Nov 21 2012 Dominic Hopf <dmaphy@fedoraproject.org> - 5.0.0-1
719e63
- Update to new upstream version: Zsh 5.0.0
719e63
719e63
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.17-2
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
719e63
719e63
* Sun Mar 04 2012 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.17-1
719e63
- Update to new upstream version: Zsh 4.3.17
719e63
719e63
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.15-2
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
719e63
719e63
* Sat Dec 24 2011 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.15-1
719e63
- Update to new upstream version: Zsh 4.3.15
719e63
719e63
* Sat Dec 17 2011 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.14-2
719e63
- change the License field to MIT (RHBZ#768548)
719e63
719e63
* Sat Dec 10 2011 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.14-1
719e63
- Update to new upstream version: Zsh 4.3.14
719e63
719e63
* Sat Dec 03 2011 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.13-1
719e63
- Update to new upstream version: Zsh 4.3.13
719e63
719e63
* Sat Aug 13 2011 Dominic Hopf <dmaphy@fedoraproject.org> - 4.3.12-1
719e63
- Update to new upstream version: Zsh 4.3.12
719e63
719e63
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.11-2
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
719e63
719e63
* Thu Jan 20 2011 Christopher Ailon <caillon@redhat.com> - 4.3.11-1
719e63
- Rebase to upstream version 4.3.11
719e63
719e63
* Tue Dec 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 4.3.10-6
719e63
- Rebuild for FTBFS https://bugzilla.redhat.com/show_bug.cgi?id=631197
719e63
- Remove deprecated PreReq, the packages aren't needed at runtime and they're
719e63
  already in Requires(post,preun,etc): lines.
719e63
719e63
* Mon Mar 22 2010 James Antill <james@fedoraproject.org> - 4.3.10-5
719e63
- Add pathmunge to our /etc/zshrc, for profile.d compat.
719e63
- Resolves: bug#548960
719e63
719e63
* Fri Aug  7 2009 James Antill <james@fedoraproject.org> - 4.3.10-4
719e63
- Allow --excludedocs command to work!
719e63
- Resolves: bug#515986
719e63
719e63
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.10-3
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
719e63
719e63
* Mon Jul 20 2009 James Antill <james@fedoraproject.org> - 4.3.10-1
719e63
- Import new upstream 4.3.10
719e63
719e63
* Wed Jun 10 2009 Karsten Hopp <karsten@redhat.com> 4.3.9-4.1
719e63
- skip D02glob test on s390, too
719e63
719e63
* Mon Mar  2 2009 James Antill <james@fedoraproject.org> - 4.3.9-4
719e63
- Remove D02glob testcase on ppc/ppc64, and hope noone cares
719e63
719e63
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.9-2
719e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild