]> git.pld-linux.org Git - packages/coreutils.git/blame_incremental - coreutils.spec
- up to 8.28; fixes CVE-2017-7476
[packages/coreutils.git] / coreutils.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with advcopy # progress bar in cp (orphaned patch)
4%bcond_with multicall # Compile all the tools in a single binary
5%bcond_with tests # do not perform "make test check"
6
7Summary: GNU Core-utils - basic command line utilities
8Summary(pl.UTF-8): GNU Core-utils - podstawowe narzędzia działające z linii poleceń
9Name: coreutils
10Version: 8.28
11Release: 1
12License: GPL v3+
13Group: Applications/System
14Source0: http://ftp.gnu.org/gnu/coreutils/%{name}-%{version}.tar.xz
15# Source0-md5: e7cb20d0572cc40d9f47ede6454406d1
16Source1: %{name}-non-english-man-pages.tar.bz2
17# Source1-md5: f7c986ebc74ccb8d08ed70141063f14c
18Source2: DIR_COLORS
19Source3: DIR_COLORS.256color
20Source4: colorls.sh
21Source5: colorls.csh
22Source6: mktemp.1.pl
23Source7: %{name}.sh
24Patch0: %{name}-info.patch
25Patch1: %{name}-getgid.patch
26Patch2: %{name}-uname-cpuinfo.patch
27Patch3: %{name}-date-man.patch
28
29Patch6: %{name}-fmt-wchars.patch
30Patch7: %{name}-sparc64.patch
31# http://translationproject.org/latest/coreutils/pl.po (pass through msgcat to generate shorter diff)
32Patch8: %{name}-pl.po-update.patch
33# from http://www.beatex.org/web/advancedcopy.html, edited by shadzik
34Patch9: %{name}-advcopy.patch
35Patch10: tests.patch
36URL: http://www.gnu.org/software/coreutils/
37BuildRequires: acl-devel
38BuildRequires: attr-devel
39BuildRequires: autoconf >= 2.64
40BuildRequires: automake >= 1:1.11.2
41BuildRequires: gcc >= 5:3.2
42BuildRequires: gettext-tools >= 0.18.1
43BuildRequires: gmp-devel
44BuildRequires: help2man
45BuildRequires: libcap-devel
46BuildRequires: libselinux-devel
47BuildRequires: rpmbuild(find_lang) >= 1.24
48BuildRequires: tar >= 1:1.22
49BuildRequires: texinfo >= 4.2
50BuildRequires: xz
51%if %{with tests}
52BuildRequires: strace
53%endif
54Requires: setup >= 2.4.6-2
55Provides: fileutils
56Provides: mktemp = %{version}-%{release}
57Provides: sh-utils
58Provides: stat
59Provides: textutils
60Obsoletes: fileutils
61Obsoletes: mktemp
62Obsoletes: sh-utils
63Obsoletes: stat
64Obsoletes: textutils
65Conflicts: shadow < 1:4.0.3-6
66Conflicts: tetex < 1:2.0.2
67# ensure util-linux has su included
68Conflicts: util-linux < 2.22
69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%description
72These are the GNU core utilities. This package is the union of the GNU
73fileutils, sh-utils, and textutils packages.
74
75Most of these programs have significant advantages over their Unix
76counterparts, such as greater speed, additional options, and fewer
77arbitrary limits.
78
79The programs that can be built with this package are:
80
81 [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
82 dd df dir dircolors dirname du echo env expand expr factor false fmt
83 fold install groups head hostid id join link ln logname ls md5sum
84 mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv
85 printf ptx pwd realpath rm rmdir seq sha1sum shred sleep sort split
86 stat stty sum sync tac tail tee test touch tr true tsort tty uname
87 unexpand uniq unlink users vdir wc who whoami yes
88
89%description -l pl.UTF-8
90Narzędzia podstawowe (core utilities) GNU to połączone paczki GNU
91fileutils, sh-utils i textutils.
92
93Większość z zawartych programów jest znacznie ulepszona w porównaniu
94z ich uniksowymi odpowiednikami, np. szybciej działają, mają dodatkowe
95opcje i mniej ograniczeń.
96
97Programy zawarte w tym pakiecie to:
98
99 [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
100 dd df dir dircolors dirname du echo env expand expr factor false fmt
101 fold ginstall groups head hostid id join link ln logname ls md5sum
102 mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv
103 printf ptx pwd realpath rm rmdir seq sha1sum shred sleep sort split
104 stat stty sum sync tac tail tee test touch tr true tsort tty uname
105 unexpand uniq unlink users vdir wc who whoami yes
106
107%prep
108%setup -q -a1
109%patch8 -p1
110%patch0 -p1
111%patch1 -p1
112%patch2 -p1
113%patch3 -p1
114
115%patch6 -p1
116%ifarch sparc64
117%patch7 -p1
118%endif
119%if %{with advcopy}
120# progress-bar patch, -g,--progress-bar //if in doubt, comment it out
121%patch9 -p1
122%endif
123%patch10 -p1
124
125%{__mv} man/pt_BR man/pt
126
127%{__perl} -pi -e 's@GNU/Linux@PLD Linux@' m4/host-os.m4
128
129# allow rebuilding *.gmo
130%{__rm} po/stamp-po
131
132# 8-bit-pfx test fails under C locale:
133# LC_ALL=C echo -e "ça\nçb\n"|LC_ALL=C fmt -p 'ç'
134# fmt: memory exhausted
135%{__sed} -i -e 25,27d tests/fmt/base.pl
136
137# /etc/resolv.conf is blocked in pld builders, try some other file
138%{__sed} -i -e 's,/etc/resolv.conf,/etc/hosts,' gnulib-tests/test-read-file.c
139
140# getgid needs to be fixed:
141# getgid: missing operand
142# Try `getgid --help' for more information.
143%{__rm} tests/misc/help-version.sh
144%{__sed} -i -e '/misc\/help-version/d' tests/local.mk
145
146# fails on some filesystems (like XFS), where readdir returns d_type=DT_UNKNOWN
147%{__rm} tests/ls/stat-free-color.sh
148%{__sed} -i -e '/ls\/stat-free-color/d' tests/local.mk
149
150# filesystem layout dependant (fails on some xfs fs)
151%{__rm} tests/dd/sparse.sh
152%{__sed} -i -e '/dd\/sparse/d' tests/local.mk
153
154# mksh is too smart for those, won't let programs fail on ulimit
155# would need bash here
156%{__rm} tests/misc/sort-merge-fdlimit.sh
157%{__sed} -i -e '/misc\/sort-merge-fdlimit/d' tests/local.mk
158%{__rm} tests/split/r-chunk.sh
159%{__sed} -i -e '/split\/r-chunk/d' tests/local.mk
160
161%build
162build-aux/gen-lists-of-programs.sh --autoconf > m4/cu-progs.m4
163build-aux/gen-lists-of-programs.sh --automake > src/cu-progs.mk
164%{__gettextize}
165%{__aclocal} -I m4
166%{__autoconf}
167%{__autoheader}
168%{__automake}
169%configure \
170 CFLAGS="%{rpmcflags} -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT" \
171 DEFAULT_POSIX2_VERSION=199209 \
172 %{?with_multicall:--enable-single-binary=symlinks} \
173 --disable-silent-rules \
174 --enable-install-program=arch \
175 --enable-no-install-program=hostname,kill,uptime
176
177%{__make} -j1
178
179%if %{with tests}
180sed -i -e 's#COLUMNS##g' tests/envvar-check
181LC_ALL=C LANG=C %{__make} -j1 tests check
182%endif
183
184%install
185rm -rf $RPM_BUILD_ROOT
186install -d $RPM_BUILD_ROOT{/bin,/sbin,%{_bindir},%{_sbindir},/etc/shrc.d}
187
188%{__make} install \
189 DESTDIR=$RPM_BUILD_ROOT
190
191%{__mv} $RPM_BUILD_ROOT%{_bindir}/{arch,basename,cat,chgrp,chmod,chown,cp,date,dd,\
192df,echo,false,id,link,ln,ls,mkdir,mknod,mktemp,mv,nice,printf,pwd,readlink,rm,rmdir,\
193sleep,sort,stat,stty,sync,touch,true,unlink,uname} $RPM_BUILD_ROOT/bin
194
195%if %{with multicall}
196%{__mv} $RPM_BUILD_ROOT{%{_bindir},/bin}/coreutils
197ln -s ../../bin/coreutils $RPM_BUILD_ROOT%{_bindir}
198%endif
199
200%{__mv} $RPM_BUILD_ROOT%{_bindir}/chroot $RPM_BUILD_ROOT%{_sbindir}
201
202cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
203cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
204cp -p %{SOURCE4} %{SOURCE5} %{SOURCE7} $RPM_BUILD_ROOT/etc/shrc.d
205
206for d in cs da de es fi fr hu id it ja ko nl pl pt ru zh_CN; do
207 install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
208 cp -p man/$d/*.1 $RPM_BUILD_ROOT%{_mandir}/$d/man1
209done
210cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/pl/man1/mktemp.1
211# unwanted (-f left intentionally - some manuals could have no translations)
212rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/{hostname,kill,su,uptime}.1
213# always remove, never packaged but sometimes installed
214rm -f $RPM_BUILD_ROOT%{_infodir}/dir
215
216%find_lang %{name}
217
218%clean
219rm -rf $RPM_BUILD_ROOT
220
221%post -p /sbin/postshell
222-/usr/sbin/fix-info-dir -c %{_infodir}
223
224%postun -p /sbin/postshell
225-/usr/sbin/fix-info-dir -c %{_infodir}
226
227%files -f %{name}.lang
228%defattr(644,root,root,755)
229%doc AUTHORS ChangeLog NEWS README THANKS THANKS-to-translators TODO
230%attr(755,root,root) /bin/arch
231%attr(755,root,root) /bin/basename
232%attr(755,root,root) /bin/cat
233%attr(755,root,root) /bin/chgrp
234%attr(755,root,root) /bin/chmod
235%attr(755,root,root) /bin/chown
236%attr(755,root,root) /bin/cp
237%attr(755,root,root) /bin/date
238%attr(755,root,root) /bin/dd
239%attr(755,root,root) /bin/df
240%attr(755,root,root) /bin/echo
241%attr(755,root,root) /bin/false
242%attr(755,root,root) /bin/id
243%attr(755,root,root) /bin/link
244%attr(755,root,root) /bin/ln
245%attr(755,root,root) /bin/ls
246%attr(755,root,root) /bin/mkdir
247%attr(755,root,root) /bin/mknod
248%attr(755,root,root) /bin/mktemp
249%attr(755,root,root) /bin/mv
250%attr(755,root,root) /bin/nice
251%attr(755,root,root) /bin/printf
252%attr(755,root,root) /bin/pwd
253%attr(755,root,root) /bin/readlink
254%attr(755,root,root) /bin/rm
255%attr(755,root,root) /bin/rmdir
256%attr(755,root,root) /bin/sleep
257%attr(755,root,root) /bin/sort
258%attr(755,root,root) /bin/stat
259%attr(755,root,root) /bin/stty
260%attr(755,root,root) /bin/sync
261%attr(755,root,root) /bin/touch
262%attr(755,root,root) /bin/true
263%attr(755,root,root) /bin/uname
264%attr(755,root,root) /bin/unlink
265%attr(755,root,root) %{_bindir}/[
266%attr(755,root,root) %{_bindir}/b2sum
267%attr(755,root,root) %{_bindir}/base32
268%attr(755,root,root) %{_bindir}/base64
269%attr(755,root,root) %{_bindir}/chcon
270%attr(755,root,root) %{_bindir}/cksum
271%attr(755,root,root) %{_bindir}/comm
272%attr(755,root,root) %{_bindir}/csplit
273%attr(755,root,root) %{_bindir}/cut
274%attr(755,root,root) %{_bindir}/dir
275%attr(755,root,root) %{_bindir}/dircolors
276%attr(755,root,root) %{_bindir}/dirname
277%attr(755,root,root) %{_bindir}/du
278%attr(755,root,root) %{_bindir}/env
279%attr(755,root,root) %{_bindir}/expand
280%attr(755,root,root) %{_bindir}/expr
281%attr(755,root,root) %{_bindir}/factor
282%attr(755,root,root) %{_bindir}/fmt
283%attr(755,root,root) %{_bindir}/fold
284%attr(755,root,root) %{_bindir}/getgid
285%attr(755,root,root) %{_bindir}/groups
286%attr(755,root,root) %{_bindir}/head
287%attr(755,root,root) %{_bindir}/hostid
288%attr(755,root,root) %{_bindir}/install
289%attr(755,root,root) %{_bindir}/join
290%attr(755,root,root) %{_bindir}/logname
291%attr(755,root,root) %{_bindir}/md5sum
292%attr(755,root,root) %{_bindir}/mkfifo
293%attr(755,root,root) %{_bindir}/nl
294%attr(755,root,root) %{_bindir}/nohup
295%attr(755,root,root) %{_bindir}/nproc
296%attr(755,root,root) %{_bindir}/numfmt
297%attr(755,root,root) %{_bindir}/od
298%attr(755,root,root) %{_bindir}/paste
299%attr(755,root,root) %{_bindir}/pathchk
300%attr(755,root,root) %{_bindir}/pinky
301%attr(755,root,root) %{_bindir}/pr
302%attr(755,root,root) %{_bindir}/printenv
303%attr(755,root,root) %{_bindir}/ptx
304%attr(755,root,root) %{_bindir}/realpath
305%attr(755,root,root) %{_bindir}/runcon
306%attr(755,root,root) %{_bindir}/seq
307%attr(755,root,root) %{_bindir}/sha1sum
308%attr(755,root,root) %{_bindir}/sha224sum
309%attr(755,root,root) %{_bindir}/sha256sum
310%attr(755,root,root) %{_bindir}/sha384sum
311%attr(755,root,root) %{_bindir}/sha512sum
312%attr(755,root,root) %{_bindir}/shred
313%attr(755,root,root) %{_bindir}/shuf
314%attr(755,root,root) %{_bindir}/split
315%attr(755,root,root) %{_bindir}/stdbuf
316%attr(755,root,root) %{_bindir}/sum
317%attr(755,root,root) %{_bindir}/tac
318%attr(755,root,root) %{_bindir}/tail
319%attr(755,root,root) %{_bindir}/tee
320%attr(755,root,root) %{_bindir}/test
321%attr(755,root,root) %{_bindir}/timeout
322%attr(755,root,root) %{_bindir}/tr
323%attr(755,root,root) %{_bindir}/truncate
324%attr(755,root,root) %{_bindir}/tsort
325%attr(755,root,root) %{_bindir}/tty
326%attr(755,root,root) %{_bindir}/unexpand
327%attr(755,root,root) %{_bindir}/uniq
328%attr(755,root,root) %{_bindir}/users
329%attr(755,root,root) %{_bindir}/vdir
330%attr(755,root,root) %{_bindir}/wc
331%attr(755,root,root) %{_bindir}/who
332%attr(755,root,root) %{_bindir}/whoami
333%attr(755,root,root) %{_bindir}/yes
334%attr(755,root,root) %{_sbindir}/chroot
335%if %{with multicall}
336%attr(755,root,root) /bin/coreutils
337%attr(755,root,root) %{_bindir}/coreutils
338%{_mandir}/man1/coreutils.1*
339%endif
340%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/DIR_COLORS
341%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/DIR_COLORS.256color
342%config(noreplace) /etc/shrc.d/colorls.csh
343%config(noreplace) /etc/shrc.d/colorls.sh
344%config(noreplace) /etc/shrc.d/%{name}.sh
345%dir %{_libdir}/coreutils
346%attr(755,root,root) %{_libdir}/coreutils/libstdbuf.so
347%{_mandir}/man1/arch.1*
348%{_mandir}/man1/b2sum.1*
349%{_mandir}/man1/base32.1*
350%{_mandir}/man1/base64.1*
351%{_mandir}/man1/basename.1*
352%{_mandir}/man1/cat.1*
353%{_mandir}/man1/chcon.1*
354%{_mandir}/man1/chgrp.1*
355%{_mandir}/man1/chmod.1*
356%{_mandir}/man1/chown.1*
357%{_mandir}/man1/chroot.1*
358%{_mandir}/man1/cksum.1*
359%{_mandir}/man1/comm.1*
360%{_mandir}/man1/cp.1*
361%{_mandir}/man1/csplit.1*
362%{_mandir}/man1/cut.1*
363%{_mandir}/man1/date.1*
364%{_mandir}/man1/dd.1*
365%{_mandir}/man1/df.1*
366%{_mandir}/man1/dir.1*
367%{_mandir}/man1/dircolors.1*
368%{_mandir}/man1/dirname.1*
369%{_mandir}/man1/du.1*
370%{_mandir}/man1/echo.1*
371%{_mandir}/man1/env.1*
372%{_mandir}/man1/expand.1*
373%{_mandir}/man1/expr.1*
374%{_mandir}/man1/factor.1*
375%{_mandir}/man1/false.1*
376%{_mandir}/man1/fmt.1*
377%{_mandir}/man1/fold.1*
378%{_mandir}/man1/getgid.1*
379%{_mandir}/man1/groups.1*
380%{_mandir}/man1/head.1*
381%{_mandir}/man1/hostid.1*
382%{_mandir}/man1/id.1*
383%{_mandir}/man1/install.1*
384%{_mandir}/man1/join.1*
385%{_mandir}/man1/link.1*
386%{_mandir}/man1/ln.1*
387%{_mandir}/man1/logname.1*
388%{_mandir}/man1/ls.1*
389%{_mandir}/man1/md5sum.1*
390%{_mandir}/man1/mkdir.1*
391%{_mandir}/man1/mkfifo.1*
392%{_mandir}/man1/mknod.1*
393%{_mandir}/man1/mktemp.1*
394%{_mandir}/man1/mv.1*
395%{_mandir}/man1/nice.1*
396%{_mandir}/man1/nl.1*
397%{_mandir}/man1/nohup.1*
398%{_mandir}/man1/nproc.1*
399%{_mandir}/man1/numfmt.1*
400%{_mandir}/man1/od.1*
401%{_mandir}/man1/paste.1*
402%{_mandir}/man1/pathchk.1*
403%{_mandir}/man1/pinky.1*
404%{_mandir}/man1/pr.1*
405%{_mandir}/man1/printenv.1*
406%{_mandir}/man1/printf.1*
407%{_mandir}/man1/ptx.1*
408%{_mandir}/man1/pwd.1*
409%{_mandir}/man1/readlink.1*
410%{_mandir}/man1/realpath.1*
411%{_mandir}/man1/rm.1*
412%{_mandir}/man1/rmdir.1*
413%{_mandir}/man1/runcon.1*
414%{_mandir}/man1/seq.1*
415%{_mandir}/man1/sha1sum.1*
416%{_mandir}/man1/sha224sum.1*
417%{_mandir}/man1/sha256sum.1*
418%{_mandir}/man1/sha384sum.1*
419%{_mandir}/man1/sha512sum.1*
420%{_mandir}/man1/shred.1*
421%{_mandir}/man1/shuf.1*
422%{_mandir}/man1/sleep.1*
423%{_mandir}/man1/sort.1*
424%{_mandir}/man1/split.1*
425%{_mandir}/man1/stat.1*
426%{_mandir}/man1/stdbuf.1*
427%{_mandir}/man1/stty.1*
428%{_mandir}/man1/sum.1*
429%{_mandir}/man1/sync.1*
430%{_mandir}/man1/tac.1*
431%{_mandir}/man1/tail.1*
432%{_mandir}/man1/tee.1*
433%{_mandir}/man1/test.1*
434%{_mandir}/man1/timeout.1*
435%{_mandir}/man1/touch.1*
436%{_mandir}/man1/tr.1*
437%{_mandir}/man1/true.1*
438%{_mandir}/man1/truncate.1*
439%{_mandir}/man1/tsort.1*
440%{_mandir}/man1/tty.1*
441%{_mandir}/man1/uname.1*
442%{_mandir}/man1/unexpand.1*
443%{_mandir}/man1/uniq.1*
444%{_mandir}/man1/unlink.1*
445%{_mandir}/man1/users.1*
446%{_mandir}/man1/vdir.1*
447%{_mandir}/man1/wc.1*
448%{_mandir}/man1/who.1*
449%{_mandir}/man1/whoami.1*
450%{_mandir}/man1/yes.1*
451%lang(cs) %{_mandir}/cs/man1/*
452%lang(da) %{_mandir}/da/man1/*
453%lang(de) %{_mandir}/de/man1/*
454%lang(es) %{_mandir}/es/man1/*
455%lang(fi) %{_mandir}/fi/man1/*
456%lang(fr) %{_mandir}/fr/man1/*
457%lang(hu) %{_mandir}/hu/man1/*
458%lang(id) %{_mandir}/id/man1/*
459%lang(it) %{_mandir}/it/man1/*
460%lang(ja) %{_mandir}/ja/man1/*
461%lang(ko) %{_mandir}/ko/man1/*
462%lang(nl) %{_mandir}/nl/man1/*
463%lang(pl) %{_mandir}/pl/man1/*
464%lang(pt) %{_mandir}/pt/man1/*
465%lang(ru) %{_mandir}/ru/man1/*
466%lang(zh_CN) %{_mandir}/zh_CN/man1/*
467%{_infodir}/coreutils.info*
This page took 0.04744 seconds and 4 git commands to generate.