coreutils/coreutils.spec

430 lines
14 KiB
RPMSpec

%define i18npatch_version 9.0
Name: coreutils
Version: 9.0
Release: 2mamba
Summary: A GNU set of tools commonly used in shell scripts
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.gnu.org/software/coreutils/
Source0: ftp://ftp.gnu.org/gnu/coreutils/%{name}-%{version}.tar.xz
Source1: coreutils-pam-su
Patch0: %{name}-7.6-langinfo.patch
# http://www.linuxfromscratch.org/patches/downloads/coreutils
Patch2: http://www.linuxfromscratch.org/patches/downloads/coreutils/coreutils-%{i18npatch_version}-i18n-1.patch
# or http://pkgs.fedoraproject.org/cgit/coreutils.git/plain/coreutils-i18n.patch
#Patch2: coreutils-8.22-i18n.patch
Patch3: %{name}-5.2.1-su_paths.patch
Patch5: %{name}-8.4-pam.patch
Patch6: %{name}-6.9-uname_element_unknown.patch
Patch7: %{name}-6.9-su_setrootpaths.patch
Patch8: %{name}-6.9-rename_futimens.patch
Patch9: %{name}-8.4-cross_compile.patch
Patch10: %{name}-8.14-uname-1.patch
Patch11: coreutils-8.32-ls-removed-dir.patch
Patch12: coreutils-9.0-chmod-symlink.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libcap-devel
BuildRequires: libgmp-devel
BuildRequires: libopenssl-devel
BuildRequires: libselinux-devel
## AUTOBUILDREQ-END
%if "%{stage1}" != "1"
BuildRequires: perl-Digest-SHA1
%endif
BuildRequires: gettext-devel
BuildRequires: bison
BuildRequires: autoconf >= 2.58
BuildRequires: automake >= 1.8
Requires(post):%{__install_info}
%if "%{stage1}" != "1"
Requires: perl-Digest-SHA1
%endif
Provides: fileutils = %{version}
Provides: sh-utils = %{version}
Provides: textutils = %{?epoch:%epoch:}%{version}
Provides: mktemp
Provides: /bin/basename
Provides: /bin/cat
Provides: /bin/chgrp
Provides: /bin/chmod
Provides: /bin/chown
Provides: /bin/cp
Provides: /bin/cut
Provides: /bin/date
Provides: /bin/dd
Provides: /bin/df
Provides: /bin/echo
Provides: /bin/env
Provides: /bin/false
Provides: /bin/true
Provides: /bin/ln
Provides: /bin/ls
Provides: /bin/mktemp
Provides: /bin/mkdir
Provides: /bin/mknod
Provides: /bin/mv
Provides: /bin/nice
Provides: /bin/pwd
Provides: /bin/rm
Provides: /bin/rmdir
Provides: /bin/sleep
Provides: /bin/sort
Provides: /bin/stty
Provides: /bin/sync
Provides: /bin/touch
Provides: /bin/uname
Obsoletes: textutils < 8.32-3mamba
Requires(post): filesystem >= 2.3-5mamba
%description
These are the GNU core utilities.
This package is the union of the old GNU fileutils, sh-utils, and textutils packages.
These tools're the GNU versions of common useful and popular file and text utilities which are used for:
- file management
- shell scripts
- modifying text file (spliting, joining, comparing, modifying, ...)
Most of these programs have significant advantages over their Unix counterparts, such as greater speed, additional options, and fewer arbitrary limits.
%debug_package
%prep
%setup -q
%patch0 -p1 -b .langinfo
# lin18nux/LSB compliance
%patch2 -p1 -b .i18n
# RMS will never accept the PAM patch because it removes his historical
# rant about Twenex and the wheel group, so we'll (Fedora) continue to
# maintain it here indefinitely
#%patch5 -p1 -b .pam
#%patch11 -p1
%patch12 -p1
# docs should say /var/run/[uw]tmp not /etc/[uw]tmp
sed -i 's,/etc/utmp,/var/run/utmp,g;
s,/etc/wtmp,/var/run/wtmp,g' doc/coreutils.texi
%build
export CFLAGS="%{optflags} -fpic -D_GNU_SOURCE=1"
# see: ./lib/config.h
CONFIG_OPTS="DEFAULT_POSIX2_VERSION=200112"
%if "%{_host}" != "%{_build}"
# disable help2man execution
sed -i "s|\.x\.1:|disabled.x.1:|" man/Makefile.in
cat > config.cache << _EOF
fu_cv_sys_stat_statvfs=yes
gl_cv_func_sleep_works=yes
_EOF
%endif
touch aclocal.m4 configure config.hin Makefile.in */Makefile.in
#aclocal -I m4 &&
#autoconf --force &&
#automake-1.10 --copy --add-missing &&
%configure ${CONFIG_OPTS} \
--enable-install-program=arch \
%if "%{_host}" != "%{_build}"
--cache-file=config.cache
%endif
# export CPPFLAGS="-DUSE_PAM"
#LDFLAGS="-lpam -lpam_misc" \
%make all -j1 \
%if "%{_host}" != "%{_build}"
LIB_SELINUX="-lsepol -lselinux"
%endif
[ -f ChangeLog -a ! -f ChangeLog.bz2 ] && bzip2 -9f ChangeLog
## don't run basic-1 test, since it breaks when run in the background
#sed -i '/basic-1/d' tests/Makefile*
#chmod a+x tests/misc/sort-mb-tests
## FIXME: cut test fails; disabling it
#sed -i '/misc\/cut/d' tests/Makefile*
## run the test suite
#%if "%{_host}" == "%{_build}"
#%ifnarch arm
##env RUN_EXPENSIVE_TESTS=yes make check
#make check || make check
#%endif
#%endif
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
#install -d %{buildroot}{/bin,%_bindir,%_sbindir}
#for f in basename cat chgrp chmod chown cp cut date dd df echo env false \
# link ln ls mkdir mknod mktemp mv nice pwd rm rmdir sleep sort stty sync \
# touch true uname unlink; do
# [ -f %{buildroot}%{_bindir}/$f ] && mv %{buildroot}{%_bindir,/bin}/$f
#done
## mktemp,cat: create a link for backward compatibility
#ln -sf /bin/mktemp %{buildroot}%{_bindir}/mktemp
#ln -sf /bin/cut %{buildroot}%{_bindir}/cut
install -d %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/chroot %{buildroot}%{_sbindir}
# These tools come from other packages
for f in hostname groups kill uptime; do
rm -f %{buildroot}{%_bindir/$f,%_mandir/man1/${f}.1}
done
#install src/su %{buildroot}/bin/su
#install -D -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/pam.d/su
#ln -sf ../../bin/env %{buildroot}%{_bindir}/env
#ln -sf ../usr/bin/install %{buildroot}/bin/install
%find_lang %{name}
%post
%install_info %{name}.info
:
%preun
%uninstall_info %{name}.info
:
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%{_sbindir}/*
%{_libexecdir}/coreutils/libstdbuf.so
%{_infodir}/*
%{_mandir}/man1/*
%doc AUTHORS THANKS
%changelog
* Mon Nov 01 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 9.0-2mamba
- added chmod symlink patch to fix new error with rpmbuild
* Sun Oct 31 2021 Automatic Build System <autodist@mambasoft.it> 9.0-1mamba
- automatic version update by autodist
* Sun Apr 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 8.32-5mamba
- added patch to restore ls-removed-dir 8.31 behaviour (also fixes build on aarch64)
* Sat Apr 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 8.32-4mamba
- added legacy provices in /bin directory
* Sat Apr 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 8.32-3mamba
- remove /bin directory
* Tue Nov 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 8.32-2mamba
- remove uname patch
- rebuilt with debug package
* Sat Mar 07 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 8.32-1mamba
- update to 8.32
* Wed Mar 13 2019 Automatic Build System <autodist@mambasoft.it> 8.31-1mamba
- automatic version update by autodist
* Sat Aug 04 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 8.30-2mamba
- install the arch command
* Sat Jul 07 2018 Automatic Build System <autodist@mambasoft.it> 8.30-1mamba
- automatic version update by autodist
* Sun Dec 31 2017 Automatic Build System <autodist@mambasoft.it> 8.29-1mamba
- automatic version update by autodist
* Sat Sep 09 2017 Automatic Build System <autodist@mambasoft.it> 8.28-1mamba
- automatic version update by autodist
* Mon Apr 24 2017 Automatic Build System <autodist@mambasoft.it> 8.27-1mamba
- automatic version update by autodist
* Sat Dec 10 2016 Automatic Build System <autodist@mambasoft.it> 8.26-1mamba
- automatic version update by autodist
* Tue Jul 12 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 8.25-2mamba
- rebuilt
* Sat Jan 23 2016 Automatic Build System <autodist@mambasoft.it> 8.25-1mamba
- automatic version update by autodist
* Sun Jul 05 2015 Automatic Build System <autodist@mambasoft.it> 8.24-1mamba
- automatic version update by autodist
* Tue Jul 22 2014 Automatic Build System <autodist@mambasoft.it> 8.23-1mamba
- automatic version update by autodist
* Thu Dec 19 2013 Automatic Build System <autodist@mambasoft.it> 8.22-1mamba
- automatic version update by autodist
* Tue Jun 18 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 8.21-2mamba
- provide /usr/bin/cat symlink required to build openjdk
* Mon Feb 18 2013 Automatic Build System <autodist@mambasoft.it> 8.21-1mamba
- update to 8.21
* Mon Dec 03 2012 Automatic Build System <autodist@mambasoft.it> 8.20-1mamba
- update to 8.20
* Tue Aug 21 2012 Automatic Build System <autodist@mambasoft.it> 8.19-1mamba
- automatic version update by autodist
* Sun Aug 19 2012 Automatic Build System <autodist@mambasoft.it> 8.18-1mamba
- automatic version update by autodist
* Wed May 23 2012 Automatic Build System <autodist@mambasoft.it> 8.17-1mamba
- automatic version update by autodist
* Wed Apr 04 2012 Automatic Build System <autodist@mambasoft.it> 8.16-1mamba
- automatic version update by autodist
* Wed Jan 25 2012 Automatic Build System <autodist@mambasoft.it> 8.15-1mamba
- automatic version update by autodist
* Fri Oct 14 2011 Automatic Build System <autodist@mambasoft.it> 8.14-1mamba
- update to 8.14
* Fri Jul 22 2011 Automatic Build System <autodist@mambasoft.it> 8.12-1mamba
- automatic update by autodist
* Sun Feb 13 2011 Automatic Build System <autodist@mambasoft.it> 8.10-1mamba
- automatic update by autodist
* Wed Jan 05 2011 Automatic Build System <autodist@mambasoft.it> 8.9-1mamba
- automatic update by autodist
* Thu Dec 23 2010 Automatic Build System <autodist@mambasoft.it> 8.8-1mamba
- automatic update to 8.8 by autodist
* Sun Nov 14 2010 Automatic Build System <autodist@mambasoft.it> 8.7-1mamba
- automatic update to 8.7 by autodist
* Fri Oct 29 2010 Automatic Build System <autodist@mambasoft.it> 8.6-1mamba
- automatic update by autodist
* Mon Jul 12 2010 Automatic Build System <autodist@mambasoft.it> 8.5-2mamba
- automatic rebuild by autodist
* Sat May 08 2010 Automatic Build System <autodist@mambasoft.it> 8.5-1mamba
- automatic update to 8.5 by autodist
* Fri Apr 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 8.4-2mamba
- re-enabled the pam patch from fedora
* Thu Jan 14 2010 Automatic Build System <autodist@mambasoft.it> 8.4-1mamba
- automatic update to 8.4 by autodist
* Fri Jan 08 2010 Automatic Build System <autodist@mambasoft.it> 8.3-1mamba
- automatic update to 8.3 by autodist
* Mon Dec 21 2009 Automatic Build System <autodist@mambasoft.it> 8.2-1mamba
- automatic update by autodist
* Sun Oct 11 2009 Automatic Build System <autodist@mambasoft.it> 7.6-1mamba
- automatic update to 7.6 by autodist
* Thu Sep 10 2009 Automatic Build System <autodist@mambasoft.it> 7.5-1mamba
- automatic update by autodist
* Fri May 08 2009 Automatic Build System <autodist@mambasoft.it> 7.4-1mamba
- automatic update to 7.4 by autodist
* Wed Apr 15 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 7.2-1mamba
- automatic update to 7.2 by autodist
* Tue Jul 01 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 6.12-1mamba
- update to 6.12
- add provide for mktemp
- updated i18n patch from Fedora CVS (http://cvs.fedoraproject.org)
- dropped rename_futimens patch applied upstream
* Wed Jan 23 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 6.9-7mamba
- rebuild with rpm 4.4.9
* Tue Jul 03 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 6.9-6mamba
- removed unused prereq for shadow-common
* Mon Jul 02 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 6.9-5mamba
- su pam file fixed (remove use of pam_stack.so in favour of include directive)
* Mon Apr 30 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 6.9-4mamba
- fix exit errors on pre and post scripts
* Thu Apr 19 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 6.9-3mamba
- restore the su_setrootpaths patch for setting non-login root path
* Tue Apr 17 2007 Davide Madrisan <davide.madrisan@gmail.com> 6.9-2mamba
- fixed the output of uname
* Wed Apr 04 2007 Davide Madrisan <davide.madrisan@gmail.com> 6.9-1mamba
- update to version 6.9
- dropped the patch used to allow tools to accept obsolete options defined
in POSIX 1003.2-1992
- dropped coreutils-5.2.1-su_setrootpaths.patch: merged upstream
- dropped the now obsolete coreutils-6.9-uname.patch used to fix uname output
* Tue Sep 06 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-12qilnx
- fixes for ppc build
* Thu Jul 21 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-11qilnx
- su: set root paths (/sbin,/usr/sbin) for non simulated login escalations
* Wed May 18 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-10qilnx
- added %%config before /etc/pam.d/su
* Wed May 18 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-9qilnx
- added su with pam support, will replace shadow-tools's su
* Thu Apr 14 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-8qilnx
- obsoletes `textutils' present in old QiLinux releases
* Fri Apr 08 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-7qilnx
- fixed uname output
* Fri Apr 08 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-6qilnx
- allow old options if the environment variable POSIXLY_CORRECT in not set
* Tue Apr 05 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-5qilnx
- added patch to made coreutils LSB compliant
* Wed Oct 27 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-4qilnx
- moved install to /bin and made symlink in /usr/bin
* Fri Sep 17 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-3qilnx
- fixed the symlink to /bin/env in /usr/bin/env
* Thu Sep 02 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-2qilnx
- fixed path for some coreutils tools
* Mon Mar 15 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.1-1qilnx
- new version rebuild
* Tue Feb 24 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.2.0-1qilnx
- package updated to last stable version available
* Wed Nov 05 2003 Davide Madrisan <davide.madrisan@qilinux.it> 5.0.91-1qilnx
- rebuilt with version 5.0.91
* Fri May 09 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.5.12-2qilnx
- removed hostname executable and man page (the one from net-tools will be used)
- removed su (conflicting with shadow-utils)
- removed /bin/kill, /bin/groups, /bin/uptime
* Fri May 09 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.5.12-1qilnx
- first build as a replacement of old sh-utils, file-utils, text-utils packages