coreutils/coreutils.spec

238 lines
6.2 KiB
RPMSpec
Raw Normal View History

%{?build_selinux}%{?!build_selinux:%bcond_with selinux}
2012-02-01 14:36:01 +04:00
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Name: coreutils
2025-01-17 22:12:11 +00:00
Version: 9.6
Release: 1
2012-02-01 14:36:01 +04:00
License: GPLv3+
Group: System/Base
2024-06-10 10:19:41 +00:00
URL: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
Patch0: coreutils-8.24-CVE-2018-17942.patch
2012-02-01 14:36:01 +04:00
# fileutils
Patch101: coreutils-8.2-spacedir.patch
2016-04-17 16:42:37 +03:00
Patch1155: coreutils-8.24-force-option--override--interactive-option.patch
Patch118: fileutils-8.17-ls_h.patch
2012-02-01 14:36:01 +04:00
Patch500: coreutils-8.3-mem.patch
2016-04-17 16:42:37 +03:00
# add --color option to md5sum and shaXsum
Patch201: coreutils-8.22-sum-color.patch
2012-02-01 14:36:01 +04:00
# sh-utils
#add info about TZ envvar to date manpage
2016-04-17 16:42:37 +03:00
Patch703: coreutils-8.21-dateman.patch
2012-02-01 14:36:01 +04:00
# RMS will never accept the PAM patch because it removes his historical
# rant about Twenex and the wheel group, so we'll continue to maintain
# it here indefinitely.
Patch706: coreutils-8.7-pam.patch
Patch713: coreutils-4.5.3-langinfo.patch
# (sb) lin18nux/lsb compliance - normally from here:
# http://www.openi18n.org/subgroups/utildev/patch/
# this one is actually a merger of 5.2 and 5.3, as join segfaults
# compiled with gcc4 and the 5.1/5.2 patch
# fwang: we often get this patch from fedora
2016-04-17 16:42:37 +03:00
Patch800: coreutils-8.24-i18n.patch
2012-02-01 14:36:01 +04:00
Patch909: coreutils-5.1.0-64bit-fixes.patch
# https://qa.mandriva.com/show_bug.cgi?id=38577
Patch911: coreutils-8.3-groupfix.patch
2015-02-03 00:07:40 +10:00
#SELINUX Patch - implements Redhat changes
#(upstream did some SELinux implementation unlike with RedHat patch)
2016-04-17 16:42:37 +03:00
Patch950: coreutils-8.24-selinux.patch
2015-02-03 00:07:40 +10:00
2016-04-17 16:42:37 +03:00
Patch1011: coreutils-8.24-DIR_COLORS-mdkconf.patch
2012-02-01 14:36:01 +04:00
#(peroyvind): fix a test that fails to compile with -Werror=format-security
2016-04-17 16:42:37 +03:00
Patch1014: coreutils-8.22-check-string-format.patch
2012-02-01 14:36:01 +04:00
# fedora patches
#add note about no difference between binary/text mode on Linux - md5sum manpage
2016-04-17 16:42:37 +03:00
Patch2101: coreutils-8.22-manpages.patch
2012-02-01 14:36:01 +04:00
#temporarily workaround probable kernel issue with TCSADRAIN(#504798)
2012-09-12 19:48:53 +04:00
Patch2102: coreutils-8.19-sttytcsadrain.patch
2012-02-01 14:36:01 +04:00
#do display processor type for uname -p/-i based on uname(2) syscall
Patch2103: coreutils-8.2-uname-processortype.patch
#Fix mkstemp on sparc64
Patch2105: coreutils-mkstemp.patch
#getgrouplist() patch from Ulrich Drepper.
2016-04-17 16:42:37 +03:00
Patch2908: coreutils-8.24-getgrouplist.patch
2012-02-01 14:36:01 +04:00
#Prevent buffer overflow in who(1) (bug #158405).
Patch2912: coreutils-overflow.patch
2014-07-01 16:33:49 +04:00
%if %{with selinux}
2014-07-01 16:33:49 +04:00
BuildRequires: libselinux-devel >= 2.1.6-7
%endif
2014-07-04 00:50:12 +11:00
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
2012-02-01 14:36:01 +04:00
BuildRequires: gettext
2014-07-04 00:50:12 +11:00
BuildRequires: strace
BuildRequires: tar
BuildRequires: texinfo
2012-02-01 14:36:01 +04:00
BuildRequires: pam-devel
2012-08-24 00:56:32 +00:00
BuildRequires: acl-devel
2014-12-21 17:41:37 +03:00
BuildRequires: attr-devel
2012-08-24 00:56:32 +00:00
BuildRequires: gmp-devel
2012-02-01 14:36:01 +04:00
BuildRequires: libcap-devel
%rename mktemp
2012-02-01 14:36:01 +04:00
Provides: stat = %{version}
Provides: %{_bindir}/env
Provides: /bin/env
Provides: %{_bindir}/tr
Provides: /bin/rm
Provides: /bin/cp
Provides: /bin/stty
Provides: /bin/ln
2012-09-12 19:48:53 +04:00
Provides: /bin/mktemp
Requires: coreutils-doc
2012-02-01 14:36:01 +04:00
%description
This package is the union of the old GNU fileutils, sh-utils, and
textutils packages.
These tools are the GNU versions of common useful and popular
file & 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.
2014-07-04 00:50:12 +11:00
%files -f %{name}.lang
%config(noreplace) %{_sysconfdir}/D*
%doc README
/bin/*
2014-07-04 00:50:12 +11:00
%{_bindir}/*
%{_sbindir}/chroot
%dir %{_libdir}/coreutils
%{_libdir}/coreutils/libstdbuf.so
#----------------------------------------------------------------------------
%package doc
2012-02-01 14:36:01 +04:00
Summary: Coreutils documentation in info format
2014-07-04 00:50:12 +11:00
Group: Documentation
Requires: coreutils
2012-02-01 14:36:01 +04:00
BuildArch: noarch
2014-07-04 00:50:12 +11:00
%description doc
2012-02-01 14:36:01 +04:00
This package contains coreutils documentation in GNU info format.
2014-07-04 00:50:12 +11:00
%files doc
%doc ABOUT-NLS ChangeLog.bz2 NEWS THANKS TODO
%{_infodir}/coreutils*
%{_mandir}/man*/*
#----------------------------------------------------------------------------
2012-02-01 14:36:01 +04:00
%prep
%setup -q
2025-01-17 22:12:11 +00:00
#patch0 -p1
2012-02-01 14:36:01 +04:00
# fileutils
# (tpg) seems to be fixed
#%patch101 -p1 -b .space~
2025-01-17 22:12:11 +00:00
#patch1155 -p1 -b .override~
#patch118 -p1 -b .lsh~
2012-02-01 14:36:01 +04:00
# textutils
2025-01-17 22:12:11 +00:00
#patch500 -p1
2012-02-01 14:36:01 +04:00
# sh-utils
2025-01-17 22:12:11 +00:00
#patch703 -p1 -b .dateman~
#patch713 -p1 -b .langinfo~
2012-02-01 14:36:01 +04:00
# li18nux/lsb
2025-01-17 22:12:11 +00:00
#patch800 -p1 -b .i18n~
2012-02-01 14:36:01 +04:00
2025-01-17 22:12:11 +00:00
#patch909 -p1 -b .64bit~
#patch911 -p1 -b .groups~
2012-02-01 14:36:01 +04:00
2025-01-17 22:12:11 +00:00
#if %{with selinux}
#patch950 -p1 -b .selinux
#endif
2025-01-17 22:12:11 +00:00
#patch1011 -p1 -b .colors_mdkconf~
#patch1014 -p1 -b .str_fmt~
2012-02-01 14:36:01 +04:00
2025-01-17 22:12:11 +00:00
#patch2101 -p1 -b .manpages~
#patch2102 -p1 -b .tcsadrain~
#patch2103 -p1 -b .sysinfo~
2025-01-17 22:12:11 +00:00
#ifnarch %{arm}
#patch2105 -p1 -b .sparc~
#endif
2012-02-01 14:36:01 +04:00
2025-01-17 22:12:11 +00:00
#patch2908 -p1 -b .getgrouplist~
#patch2912 -p1 -b .overflow~
2012-02-01 14:36:01 +04:00
2016-04-17 16:42:37 +03:00
chmod a+x tests/misc/sort-mb-tests.sh
2012-02-01 14:36:01 +04:00
chmod +w ./src/dircolors.h
./src/dcgen ./src/dircolors.hin > ./src/dircolors.h
export DEFAULT_POSIX2_VERSION=199209
aclocal -I m4
automake --gnits --add-missing
autoconf
bzip2 -9 ChangeLog
%build
export CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE=1"
%configure2_5x \
--enable-largefile \
--enable-pam \
--enable-no-install-program=arch,hostname,uptime,kill \
%if %{with selinux}
2014-07-01 16:33:49 +04:00
--with-selinux \
2015-02-03 00:13:11 +10:00
%else
--without-selinux \
%endif
2012-02-01 14:36:01 +04:00
--disable-rpath \
--disable-silent-rules
%make
%check
#(proyvind): check suite randomly fails on build hosts, unable to reproduce
# locally, so just disable for now.. :(
2013-07-31 09:55:38 +04:00
#%make check
2012-02-01 14:36:01 +04:00
%install
%makeinstall_std
# man pages are not installed with make install
make mandir=%{buildroot}%{_mandir} install-man
# let be compatible with old fileutils, sh-utils and textutils packages :
mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},%{_sysconfdir}/pam.d}
for f in basename cat chgrp chmod chown cp cut date dd df echo env expr false id link ln ls mkdir mknod mktemp mv nice pwd rm rmdir sleep sort stat stty sync touch true uname unlink tac
do
mv %{buildroot}/{%{_bindir},bin}/$f
done
2012-02-01 14:36:01 +04:00
# chroot was in /usr/sbin :
mv %{buildroot}/{%{_bindir},%{_sbindir}}/chroot
# {cat,sort,cut} were previously moved from bin to /usr/bin and linked into
for f in cut env expr tac; do
ln -s /bin/$f %{buildroot}%{_bindir}/$f
done
2012-02-01 14:36:01 +04:00
install -m644 src/dircolors.hin -D %{buildroot}%{_sysconfdir}/DIR_COLORS
#TV# find_lang look for LC_MESSAGES, not LC_TIME:
find %{buildroot}%{_datadir}/locale/ -name coreutils.mo | fgrep LC_TIME | xargs rm -f
%find_lang %{name}