]> git.pld-linux.org Git - packages/bash.git/blobdiff - bash.spec
Up to 5.2.26
[packages/bash.git] / bash.spec
index d40946aff3ee2846631bf0b2075001bc883db42b..50da2ab235a6fcb2e664b0b36c882d8e5d1b15a1 100644 (file)
--- a/bash.spec
+++ b/bash.spec
@@ -1,31 +1,31 @@
+# NOTE: when updating patchlevel, do not forget to update 'sources' file:
+# $ md5sum bash44-??? > sources
 #
 # Conditional build:
-%bcond_without static          # don't build static version
-%bcond_with    bash_history    # build with additional history in /var/log/bash_hist ;)
-%bcond_without tests   # do not perform "make test"
-#
-%define                _ver            3.2
-%define                _patchlevel     25
-%define                _rel            2
+%bcond_without static          # static version
+%bcond_with    bash_history    # additional history in /var/log/bash_hist ;)
+%bcond_without tests           # unit testing
+
+%define                ver             5.2
+%define                patchlevel      26
+%define                rel             1
+%define                min_readline    8.2
 Summary:       GNU Bourne Again Shell (bash)
 Summary(fr.UTF-8):     Le shell Bourne Again de GNU
 Summary(pl.UTF-8):     Powłoka GNU Bourne Again Shell (bash)
 Name:          bash
-Version:       %{_ver}.%{_patchlevel}
-Release:       %{_rel}%{?with_bash_history:inv}
-License:       GPL
+Version:       %{ver}%{?patchlevel:.%{patchlevel}}
+Release:       %{rel}%{?with_bash_history:inv}
+License:       GPL v3+
 Group:         Applications/Shells
-Source0:       ftp://ftp.gnu.org/gnu/bash/%{name}-%{_ver}.tar.gz
-# Source0-md5: 00bfa16d58e034e3c2aa27f390390d30
+Source0:       https://ftp.gnu.org/gnu/bash/%{name}-%{ver}.tar.gz
+# Source0-md5: cfb4cf795fc239667f187b3d6b3d396f
 Source1:       %{name}rc
-Source2:       %{name}-skel-.%{name}_logout
-Source3:       %{name}-skel-.%{name}_profile
-Source4:       %{name}-skel-.%{name}rc
+Source2:       %{name}-skel-.bash_logout
+Source3:       %{name}-skel-.bash_profile
+Source4:       %{name}-skel-.bashrc
 Source5:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source5-md5: d2aacf89c4a444c5da648da69afdb01a
-# based on GNU TP; omitted: eo (not supported), rw (empty)
-Source6:       %{name}-translations.tar.bz2
-# Source6-md5: 99701bc1f919cfc527cb95fadbc66c93
 Patch0:                %{name}-paths.patch
 Patch1:                %{name}-security.patch
 Patch2:                %{name}-autoconf.patch
@@ -33,36 +33,37 @@ Patch3:             %{name}-info.patch
 Patch4:                %{name}-profile.patch
 Patch5:                %{name}-requires.patch
 Patch6:                %{name}-compat.patch
+Patch7:                %{name}-loadables.patch
 Patch8:                %{name}-sighup.patch
 Patch9:                %{name}-backup_history.patch
 Patch10:       %{name}-act_like_sh.patch
-%patchset_source -f ftp://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-%03g 1 %{_patchlevel}
+Patch11:       %{name}-elinks_cont.patch
+%patchset_source -f https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-%03g 1 %{patchlevel}
 URL:           http://www.gnu.org/software/bash/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.69
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: ncurses-devel >= 5.2
-BuildRequires: readline-devel >= 5.2
-BuildRequires: rpmbuild(macros) >= 1.353
+BuildRequires: readline-devel >= %{min_readline}
+BuildRequires: rpmbuild(macros) >= 1.462
 BuildRequires: sed >= 4.0
 BuildRequires: texinfo
 %if %{with static}
 # Require static library only for static build
 BuildRequires: glibc-static >= 2.2
 BuildRequires: ncurses-static >= 5.2
-BuildRequires: readline-static >= 5.2
+BuildRequires: readline-static >= %{min_readline}
 %endif
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      grep
-Requires:      readline >= 5.2
+Requires:      readline >= %{min_readline}
 Requires:      setup >= 2.4.6-2
 Obsoletes:     bash-doc
-Obsoletes:     bash2
-Obsoletes:     bash2-doc
+Obsoletes:     bash2 < 3
+Obsoletes:     bash2-doc < 3
 Obsoletes:     etcskel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _noautoprovfiles        %{_libdir}/%{name}
+
 %description
 Bash is a GNU project sh-compatible shell or command language
 interpreter. Bash (Bourne Again shell) incorporates useful features
@@ -158,8 +159,6 @@ Tools specification (IEEE Working Group 1003.2).
 Summary:       Statically linked GNU Bourne Again Shell (bash)
 Summary(pl.UTF-8):     Statycznie skonsolidowany GNU Bourne Again Shell (bash)
 Group:         Applications/Shells
-Requires(post,preun):  grep
-Requires(preun):       fileutils
 Requires:      %{name} = %{version}-%{release}
 
 %description static
@@ -183,10 +182,22 @@ Korn i C (ksh i csh). Bash jest również zaimplementowany IEEE Posix
 Shell oraz jest zgodny ze specyfikacją - IEEE Working Group 1003.2. W
 tym pakiecie jest wersja basha skonsolidowana statycznie.
 
+%package devel
+Summary:       Header files for bash plugins development
+Summary(pl.UTF-8):     Pliki nagłówkowe do tworzenia wtyczek basha
+Group:         Development/Libraries
+# doesn't require base
+
+%description devel
+Header files for bash plugins development.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do tworzenia wtyczek basha.
+
 %prep
-%setup -q -n %{name}-%{_ver} -a5
+%setup -q -n %{name}-%{ver} -a5
 # official patches
-%patchset_patch 1 %{_patchlevel}
+%{?patchlevel:%patchset_patch 1 %{patchlevel}}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -194,11 +205,13 @@ tym pakiecie jest wersja basha skonsolidowana statycznie.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 %patch8 -p1
 %{?with_bash_history:%patch9 -p1}
 %patch10 -p1
-tar xjf %SOURCE6 -C po
-sed -e 's/boldquot ru/boldquot ru af ca de es et fr hu ja nl pl pt_BR ro tr vi/' -i po/LINGUAS
+%patch11 -p1
+
+%{__sed} -i -e 's#/usr/bin/printf#/bin/printf#g' tests/intl2.sub
 
 %build
 cp -f /usr/share/automake/config.* support
@@ -216,13 +229,15 @@ for mode in %{?with_static:static} shared; do
        --enable-dparen-arithmetic \
        --enable-separate-helpfiles \
        --without-bash-malloc \
-       `[ "$mode" = "static" ] && echo "--enable-static-link"` \
+       $([ "$mode" = "static" ] && echo "--enable-static-link") \
        --with-installed-readline
 
 %{__make} \
        DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
 
-[ "$mode" = "static" ] && mv -f bash bash.static || :
+if [ "$mode" = "static" ]; then
+       %{__mv} bash bash.static
+fi
 done
 
 %{?with_tests:%{__make} tests}
@@ -235,7 +250,7 @@ install -d $RPM_BUILD_ROOT{/bin,/etc/skel,%{_datadir}/%{name}}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
 %{?with_static:install bash.static $RPM_BUILD_ROOT/bin}
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
@@ -252,6 +267,14 @@ ln -sf bash $RPM_BUILD_ROOT/bin/rbash
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
+
+# use our bugtracker, upstream will ignore reports from this anyway
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/bashbug \
+       $RPM_BUILD_ROOT%{_mandir}/man1/bashbug.1 \
+       $RPM_BUILD_ROOT%{_mandir}/*/man1/bashbug.1
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/bash
+
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 
 %find_lang %{name}
@@ -259,52 +282,29 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-umask 022
-if [ ! -f /etc/shells ]; then
-       echo "/bin/bash" > /etc/shells
-       echo "/bin/rbash" >> /etc/shells
-else
-       if ! grep -q '^/bin/bash$' /etc/shells; then
-               echo "/bin/bash" >> /etc/shells
-       fi
-       if ! grep -q '^/bin/rbash$' /etc/shells; then
-               echo "/bin/rbash" >> /etc/shells
-       fi
-fi
-
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%post  -p <lua>
+%lua_add_etc_shells /bin/bash /bin/rbash
+os.execute("/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
+%preun -p <lua>
+if arg[2] == 0 then
+       %lua_remove_etc_shells /bin/bash /bin/rbash
+end
 
-%post static
-umask 022
-if [ ! -f /etc/shells ]; then
-       echo "/bin/bash.static" > /etc/shells
-else
-       if ! grep -q '^/bin/bash.static$' /etc/shells; then
-               echo "/bin/bash.static" >> /etc/shells
-       fi
-fi
+%postun        -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
 
-%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
+%post static -p <lua>
+%lua_add_etc_shells /bin/bash.static
 
-%postun
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%preun static -p <lua>
+if arg[2] == 0 then
+       %lua_remove_etc_shells /bin/bash.static
+end
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc CHANGES NEWS README doc/{FAQ,INTRO}
+%doc AUTHORS CHANGES COMPAT NEWS POSIX README RBASH doc/{FAQ,INTRO,bash.html,bashref.html} 
 
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bashrc
 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_logout
@@ -313,11 +313,11 @@ fi
 
 %attr(755,root,root) /bin/bash
 %attr(755,root,root) /bin/rbash
-%attr(755,root,root) %{_bindir}/bashbug
 
 %{?with_bash_history:%attr(1733,root,root) %dir /var/log/bash_hist}
 %{_infodir}/bash.info*
-%{_mandir}/man1/*
+%{_mandir}/man1/bash.1*
+%{_mandir}/man1/rbash.1*
 %lang(es) %{_mandir}/es/man1/*
 %lang(fr) %{_mandir}/fr/man1/*
 %lang(it) %{_mandir}/it/man1/*
@@ -325,10 +325,59 @@ fi
 %lang(ko) %{_mandir}/ko/man1/*
 %lang(nl) %{_mandir}/nl/man1/*
 %lang(pl) %{_mandir}/pl/man1/*
-%{_datadir}/%{name}
+%dir %{_datadir}/%{name}
+%doc %{_datadir}/%{name}/*
+
+# loadables
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/accept
+%attr(755,root,root) %{_libdir}/%{name}/basename
+%attr(755,root,root) %{_libdir}/%{name}/csv
+%attr(755,root,root) %{_libdir}/%{name}/cut
+%attr(755,root,root) %{_libdir}/%{name}/dirname
+%attr(755,root,root) %{_libdir}/%{name}/dsv
+%attr(755,root,root) %{_libdir}/%{name}/fdflags
+%attr(755,root,root) %{_libdir}/%{name}/finfo
+%attr(755,root,root) %{_libdir}/%{name}/getconf
+%attr(755,root,root) %{_libdir}/%{name}/head
+%attr(755,root,root) %{_libdir}/%{name}/id
+%attr(755,root,root) %{_libdir}/%{name}/ln
+%attr(755,root,root) %{_libdir}/%{name}/logname
+%attr(755,root,root) %{_libdir}/%{name}/mkdir
+%attr(755,root,root) %{_libdir}/%{name}/mkfifo
+%attr(755,root,root) %{_libdir}/%{name}/mktemp
+%attr(755,root,root) %{_libdir}/%{name}/mypid
+%attr(755,root,root) %{_libdir}/%{name}/pathchk
+%attr(755,root,root) %{_libdir}/%{name}/print
+%attr(755,root,root) %{_libdir}/%{name}/printenv
+%attr(755,root,root) %{_libdir}/%{name}/push
+%attr(755,root,root) %{_libdir}/%{name}/realpath
+%attr(755,root,root) %{_libdir}/%{name}/rm
+%attr(755,root,root) %{_libdir}/%{name}/rmdir
+%attr(755,root,root) %{_libdir}/%{name}/seq
+%attr(755,root,root) %{_libdir}/%{name}/setpgid
+%attr(755,root,root) %{_libdir}/%{name}/sleep
+%attr(755,root,root) %{_libdir}/%{name}/stat
+%attr(755,root,root) %{_libdir}/%{name}/strftime
+%attr(755,root,root) %{_libdir}/%{name}/sync
+%attr(755,root,root) %{_libdir}/%{name}/tee
+%attr(755,root,root) %{_libdir}/%{name}/truefalse
+%attr(755,root,root) %{_libdir}/%{name}/tty
+%attr(755,root,root) %{_libdir}/%{name}/uname
+%attr(755,root,root) %{_libdir}/%{name}/unlink
+%attr(755,root,root) %{_libdir}/%{name}/whoami
 
 %if %{with static}
 %files static
 %defattr(644,root,root,755)
 %attr(755,root,root) /bin/bash.static
 %endif
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/bash
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/Makefile.inc
+%{_libdir}/%{name}/Makefile.sample
+%{_libdir}/%{name}/loadables.h
+%{_pkgconfigdir}/bash.pc
This page took 0.047679 seconds and 4 git commands to generate.