#
# Conditional build:
-# _without_static - don't build static version
-# _with_bash_history - build with additional history in /var/log/hist ;)
-
+# _without_static - don't build static version
+# _with_bash_history - build with additional history in /var/log/hist ;)
+#
Summary: GNU Bourne Again Shell (bash)
Summary(es): GNU Bourne Again Shell (bash)
Summary(fr): Le shell Bourne Again de GNU
Summary(uk): GNU Bourne Again Shell (bash)
Name: bash
Version: 2.05b
-Release: 2%{?_with_bash_history:inv}
+Release: 10%{?_with_bash_history:inv}
License: GPL
Group: Applications/Shells
-Source0: ftp://prep.ai.mit.edu/pub/gnu/bash/%{name}-%{version}.tar.gz
+Source0: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz
+# Source0-md5: 5238251b4926d778dfe162f6ce729733
Source1: %{name}rc
Source2: %{name}-skel-.%{name}_logout
Source3: %{name}-skel-.%{name}_profile
Source4: %{name}-skel-.%{name}rc
Source5: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source5-md5: d2aacf89c4a444c5da648da69afdb01a
Patch0: %{name}-paths.patch
Patch1: %{name}-security.patch
Patch2: %{name}-autoconf.patch
Patch8: %{name}-DESTDIR.patch
Patch9: %{name}-rlimit_locks.patch
Patch10: %{name}-sighup.patch
-%{?_with_bash_history:Patch11:bash-backup_history.patch}
+Patch11: %{name}-backup_history.patch
+Patch12: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-001
+Patch13: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-002
+Patch14: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-003
+Patch15: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-004
+Patch16: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-005
+Patch17: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-006
+Patch18: ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-007
+Patch19: %{name}-pmake.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: ncurses-static >= 5.2
BuildRequires: readline-static >= 4.3
%endif
-Requires(post): grep
-Requires(preun): grep
+Requires(post,preun): grep
+Requires(preun): fileutils
Requires: readline >= 4.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: bash-doc
Summary(pl): Statycznie zlinkowany GNU Bourne Again Shell (bash)
Group: Applications/Shells
Requires: %{name}
-Requires(post): grep
-Requires(preun): grep
+Requires(post,preun): grep
+Requires(preun): fileutils
%description static
Bash is a GNU project sh-compatible shell or command language
%patch9 -p1
%patch10 -p1
%{?_with_bash_history:%patch11 -p1}
+%patch12 -p0
+%patch13 -p0
+%patch14 -p0
+%patch15 -p0
+%patch16 -p0
+%patch17 -p0
+%patch18 -p0
+%patch19 -p1
echo %{version} > _distribution
echo %{release} > _patchlevel
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/{bin,etc/skel}
-
%{?_with_bash_history:install -d $RPM_BUILD_ROOT/var/log/bash_hist}
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
%{?_without_static:#}install bash.static $RPM_BUILD_ROOT/bin
rm -rf $RPM_BUILD_ROOT
%post
+umask 022
if [ ! -f /etc/shells ]; then
echo "/bin/bash" > /etc/shells
echo "/bin/rbash" >> /etc/shells
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%preun
+if [ "$1" = "0" ]; then
+ umask 022
+ grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
+ mv -f /etc/shells.new /etc/shells
+fi
+
%post static
+umask 022
if [ ! -f /etc/shells ]; then
echo "/bin/bash.static" > /etc/shells
else
fi
fi
-%preun
-if [ "$1" = "0" ]; then
- grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
- mv -f /etc/shells.new /etc/shells
-fi
-
%preun static
if [ "$1" = "0" ]; then
+ umask 022
grep -v /bin/bash.static /etc/shells > /etc/shells.new
mv -f /etc/shells.new /etc/shells
fi
%attr(755,root,root) /bin/rbash
%attr(755,root,root) %{_bindir}/bashbug
-%{?_with_bash_history:%attr(750,root,root) %dir /var/log/bash_hist}
-%{_infodir}/bash.info.gz
+%{?_with_bash_history:%attr(751,root,root) %dir /var/log/bash_hist}
+%{_infodir}/bash.info*
%{_mandir}/man1/*
%lang(es) %{_mandir}/es/man1/*
%lang(fr) %{_mandir}/fr/man1/*
%lang(nl) %{_mandir}/nl/man1/*
%lang(pl) %{_mandir}/pl/man1/*
-
%{?_without_static:#}%files static
%{?_without_static:#}%defattr(644,root,root,755)
%{?_without_static:#}%attr(755,root,root) /bin/bash.static