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