Пакет man-db: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
Summary: Tools for searching and reading man pages
Name: man-db
Version: 2.9.0
Release: alt3
# GPLv2+ .. man-db
# GPLv3+ .. gnulib
License: GPLv2+ and GPLv3+
Group: System/Base
URL: http://www.nongnu.org/man-db/

Packager: Alexey Gladkov <legion@altlinux.ru>

Source0: %name-%version.tar
Source1: man-db.crondaily
Source2: man-db.sysconfig
Source3: man-db.filetrigger

Patch0: man-db-2.8.5-change-owner-of-man-cache.patch

# http://lists.nongnu.org/archive/html/man-db-devel/2017-01/msg00013.html
Patch1: man-db-2.7.6.1-fix-override-dir-handling.patch

Patch2: man-db-2.7.6.1-e2k-mcst-path.patch
Patch3: man-db-2.9.0-catman-use-path-env.patch

Obsoletes: man < 2.0
Obsoletes: man-whatis < 2.0
Provides: man-whatis = %version

Provides: man = %version
Provides: man-pages-reader = %version

# previous versions of the package contain the files: apropos.1, man.1, whatis.1
Conflicts: man-pages-ru-extra < 0.1-alt5

Requires: coreutils, grep, groff-base, gzip, less, xz

BuildRequires: gnu-config
BuildRequires: gdbm-devel
BuildRequires: gettext
BuildRequires: groff-base groff-ps
BuildRequires: less
BuildRequires: libpipeline-devel
BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: po4a
BuildRequires: perl
BuildRequires: xz

%description
The man-db package includes five tools for browsing man-pages:
man, whatis, apropos, manpath and lexgrog. man formats and displays
manual pages. whatis searches the manual page names. apropos searches the
manual page names and descriptions. manpath determines search path
for manual pages. lexgrog directly reads header information in
manual pages.

%package cron
Summary: Periodic update of man-db cache
Group: System/Base

Requires: %name = %version-%release
Requires: crontabs

BuildArch: noarch

%description cron
This package provides periodic update of man-db cache.

%global cache /var/cache/man
%define _unpackaged_files_terminate_build 1

%prep
%setup

%patch0 -p1
%patch1 -p1
%ifarch %e2k
%patch2 -p1
%endif
%patch3 -p1

%build
%autoreconf -f

%configure \
    --with-systemdtmpfilesdir=%_tmpfilesdir \
    --with-systemdsystemunitdir=no \
    --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \
    --disable-setuid \
    --enable-cache-owner=root \
    --with-browser=elinks \
    --with-lzip=lzip \
    --with-xz=xz \
    --with-override-dir=overrides

%make CC="%__cc %optflags" %{?_smp_mflags} V=1

%check
%make check

%install
%make install \
	INSTALL='install -p' \
	DESTDIR=%buildroot \
	prefix=%_prefix

# move the documentation to the relevant place
mv %buildroot%_datadir/doc/man-db/* ./

# remove zsoelim man page - part of groff package
rm %buildroot%_man1dir/zsoelim.1

# remove libtool archives
rm %buildroot%_libdir/man-db/*.la

# install cache directory
install -d -m 0755  %buildroot/%cache

# install cron script for man-db creation/update
mkdir -p %buildroot%_sysconfdir/cron.daily
install -D -p -m 0755 %SOURCE1 %buildroot%_sysconfdir/cron.daily/man-db.cron

# config for cron script
mkdir -p %buildroot%_sysconfdir/sysconfig
install -D -p -m 0644 %SOURCE2 %buildroot%_sysconfdir/sysconfig/man-db

# install filetrigger
mkdir -p %buildroot%_rpmlibdir
install -D -p -m 0755 %SOURCE3 %buildroot%_rpmlibdir/man-db.filetrigger

(
    cd %buildroot
    find .%_datadir/man -mindepth 1 -maxdepth 1 ! -name 'man*' -printf '%%%%lang(%%f) %%p/man*/*\n' |
        sed -e 's, \./, /,'
) > %name.files

%find_lang %name
%find_lang %name-gnulib

cat %name.lang %name-gnulib.lang >> %name.files

# clear the old cache
%post
%__rm -rf -- %cache/*

%files -f %name.files
%doc README NEWS docs/COPYING
%config(noreplace) %_sysconfdir/man_db.conf
%config(noreplace) %_tmpfilesdir/man-db.conf
%_sbindir/*
%_bindir/*
%_libdir/man-db
%_libexecdir/man-db
%_rpmlibdir/man-db.filetrigger
%attr(2755,root,man) %verify(not mtime) %dir %cache
%_man1dir/*.1*
%_man5dir/*.5*
%_man8dir/*.8*

%files cron
%config(noreplace) %_sysconfdir/cron.daily/man-db.cron
%config(noreplace) %_sysconfdir/sysconfig/man-db

%changelog
* Sun May 03 2020 Vladimir D. Seleznev <vseleznv@altlinux.org> 2.9.0-alt3
- NMU: Add missing requires: xz (ALT#38217).

* Wed Nov 13 2019 Alexey Gladkov <legion@altlinux.ru> 2.9.0-alt2
- The catman sometime needs to execute other utilities.

* Tue Nov 05 2019 Alexey Gladkov <legion@altlinux.ru> 2.9.0-alt1
- New version (2.9.0).

* Thu Jul 11 2019 Alexey Gladkov <legion@altlinux.ru> 2.8.5-alt2
- Return patch for e2k.

* Sat Jun 29 2019 Alexey Gladkov <legion@altlinux.ru> 2.8.5-alt1
- New version (2.8.5)
- Switch to release tarballs.
- Use %%_tmpfilesdir.

* Fri Jun 21 2019 Andrey Savchenko <bircoph@altlinux.org> 2.7.6.1-alt5
- Add MCST-specific man path on e2k

* Thu May 04 2017 Igor Vlasenko <viy@altlinux.ru> 2.7.6.1-alt4.1
- NMU: added Provides: man-whatis

* Thu May 04 2017 Alexey Gladkov <legion@altlinux.ru> 2.7.6.1-alt4
- Obsoletes man-whatis.

* Wed May 03 2017 Alexey Gladkov <legion@altlinux.ru> 2.7.6.1-alt3
- Add conflict on old versions of man-pages-ru-extra.

* Tue May 02 2017 Alexey Gladkov <legion@altlinux.ru> 2.7.6.1-alt2
- Remove systemd dependency.

* Wed Apr 26 2017 Alexey Gladkov <legion@altlinux.ru> 2.7.6.1-alt1
- First build for ALTLinux.

* Thu Jan 19 2017 Nikola Forro <nforro@redhat.com> - 2.7.6.1-2
- set owner of man cache to root instead of man

* Thu Jan 19 2017 Nikola Forro <nforro@redhat.com> - 2.7.6.1-1
- update to 2.7.6.1
  resolves #1403618

* Mon Mar 14 2016 Nikola Forro <nforro@redhat.com> - 2.7.5-3
- suppress potential locale warning when installing with glibc-minimal-langpack
  resolves #1314633

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Nikola Forro <nforro@redhat.com> - 2.7.5-1
- update to 2.7.5
  resolves #1279867

* Tue Oct 13 2015 Nikola Forro <nforro@redhat.com> - 2.7.4-2
- add cron subpackage

* Tue Oct 13 2015 Nikola Forro <nforro@redhat.com> - 2.7.4-1
- update to 2.7.4
  resolves #1270078

* Mon Sep 21 2015 Nikola Forro <nforro@redhat.com> - 2.7.3-3
- fix replace.sed prerequisite syntax
  resolves #1263930

* Thu Sep 10 2015 Nikola Forro <nforro@redhat.com> - 2.7.3-2
- use file triggers instead of crontabs for updating cache

* Thu Sep 10 2015 Nikola Forro <nforro@redhat.com> - 2.7.3-1
- update to 2.7.3
  resolves #1261678

* Mon Aug 24 2015 Nikola Forro <nforro@redhat.com> - 2.7.2-3
- try to get terminal width from /dev/tty
  resolves #1255930

* Mon Aug 24 2015 Nikola Forro <nforro@redhat.com> - 2.7.2-2
- rebuilt with latest libpipeline

* Mon Aug 24 2015 Nikola Forro <nforro@redhat.com> - 2.7.2-1
- update to 2.7.2
  resolves #1256177

* Tue Aug 04 2015 Nikola Forro <nforro@redhat.com> - 2.7.1-8
- fix inaccurate description of "man -f"
  resolves #1249377

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed May 20 2015 jchaloup <jchaloup@redhat.com> - 2.7.1-6
- Test for /run/systemd only if mandb.timer is actually installed
  resolves: #1223244

* Tue May 12 2015 Colin Walters <walters@redhat.com> - 2.7.1-5
- Test for /run/systemd to detect systemd state rather than invoking
  rpm in %%pre - it is not really supported by rpm.

* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.7.1-4
- Rebuilt for Fedora 23 Change
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code

* Fri Jan 02 2015 jchaloup <jchaloup@redhat.com> - 2.7.1-3
- switching back to crontabs
  resolves: #1177993
  resolves: #1171450
- rpm verify reports for /var/cache/man
  resolves: #1173496

* Thu Nov 13 2014 jchaloup <jchaloup@redhat.com> - 2.7.1-2
- src/man.c (do_extern): Pass the -l option through
  resolves: #1161747

* Wed Nov 12 2014 jchaloup <jchaloup@redhat.com> - 2.7.1-1
- update to 2.7.1
  resolves: #1163167

* Wed Oct 15 2014 jchaloup <jchaloup@redhat.com> - 2.7.0.2-5
- switch man and root in init/systemd/man-db.conf
  related: #1151558

* Mon Oct 13 2014 jchaloup <jchaloup@redhat.com> - 2.7.0.2-4
- preun missing condition on number of man-db packages installed
  related: #1151558

* Sun Oct 12 2014 jchaloup <jchaloup@redhat.com> - 2.7.0.2-3
- remove executable flag for *.service and *.timer file
  resolves: #1151558 

* Wed Oct 08 2014 jchaloup <jchaloup@redhat.com> - 2.7.0.2-2
- replacing cron with systemd.timer
  resolves: #1148559
- adding zsoelim to {_libexecdir}/man-db/zsoelim
  related: #1145493

* Wed Oct 08 2014 jchaloup <jchaloup@redhat.com> - 2.7.0.2-1
- Update to 2.7.0.2
  resolves: #1145493

* Thu Sep 18 2014 jchaloup <jchaloup@redhat.com> - 2.6.7.1-7
- resolves: #1043401
  Don't store canonicalised versions of manpath elements

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.7.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Fri Jul 18 2014 Tom Callaway <spot@fedoraproject.org> - 2.6.7.1-5
- fix license handling

* Tue Jul 01 2014 jchaloup <jchaloup@redhat.com> - 2.6.7.1-4
- related: #1110274
  swapping root for man in man-db.conf

* Wed Jun 25 2014 jchaloup <jchaloup@redhat.com> - 2.6.7.1-3
- resolves: #1110274
  Add systemd tmpfiles snippet to clean up old cat files after (upstream patch)

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Apr 17 2014 Peter Schiffer <pschiffe@redhat.com> - 2.6.7.1-1
- resolves: #1087279
  updated to 2.6.7.1

* Wed Feb 19 2014 Peter Schiffer <pschiffe@redhat.com> - 2.6.6-1
- resolves: #1057495
  updated to 2.6.6

* Wed Aug 07 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.6.5-3
- Add a missing requirement on crontabs to spec file
- Mark the cron job as config(noreplace)
- Fix RHBZ#989077

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Jun 27 2013 Peter Schiffer <pschiffe@redhat.com> - 2.6.5-1
- updated to 2.6.5

* Tue Jun 25 2013 Peter Schiffer <pschiffe@redhat.com> - 2.6.4-1
- resolves: #977255
  updated to 2.6.4

* Mon Apr  8 2013 Peter Schiffer <pschiffe@redhat.com> - 2.6.3-6
- resolves: #948695
  fixed double free
- fixed certain man pages to match options with --help and --usage

* Thu Mar 21 2013 Peter Schiffer <pschiffe@redhat.com> - 2.6.3-5
- temporarily disabled one unstable unit test

* Thu Mar 21 2013 Peter Schiffer <pschiffe@redhat.com> - 2.6.3-4
- fixed some compiler warnings and memory leaks

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Oct 30 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.3-2
- resolves: #870680
  use less as the default pager

* Wed Oct 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.3-1
- resolves: #858577
  updated to 2.6.3
- cleaned .spec file
- resolves: #855632
  fixed SIGABRT crash
- adds support for man-pages-overrides

* Tue Jul 31 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.2-5
- resolves: #841431
  ignore cached man pages if they don't exist anymore

* Fri Jul 20 2012 Dan Horák <dan[at]danny.cz> - 2.6.2-4
- fully patch the autotools files, fixes FTBFS due updated automake

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jul 12 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.2-2
- resolves: #829553
  clear the old man cache on install or update

* Tue Jul 10 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.2-1
- resolves: #833312
  update to 2.6.2
- resolves: #657409
  fixed warning when invoking col by the mandb program in cron
- resolves: #829935
  enabled support for man pages compressed with lzip
- resolves: #821778
  added virtual provides for bundled gnulib library
- resolves: #824825
  apropos returns correct exit code for invalid man page

* Tue Apr 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-4
- related: #693458
  updated patch for .so links because previous one wasn't working very well

* Tue Apr 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-3
- added autoconf, automake, libtool and gettext-devel to the build requires

* Tue Apr 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-2
- resolves: #677669
  added support for wildcards in path
- resolves: #693458
  fixed error with .so links

* Thu Apr 05 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-1
- resolves: #790771
  update to 2.6.1
- resolves: #806086
  removed hard-dependency on cron, update man db after install or update

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Oct 05 2011 Peter Schiffer <pschiffe@redhat.com> - 2.6.0.2-3
- resolves: #702904
  fixed double free or corruption issue
- resolves: #739207
  require groff-base instead of groff
- rebuilt for gdbm-1.9.1-1

* Sun May 29 2011 Ville Skyttä <ville.skytta@iki.fi> - 2.6.0.2-2
- Own the %%{_libdir}/man-db dir.

* Thu Apr 21 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 2.6.0.2-1
- update to 2.6.0.2
- remove obsolete patches
- add libpipe dependency

* Wed Mar 23 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-6
- Build with zlib support.
- Use elinks as default HTML browser.
   thanks Ville Skyttä

* Wed Mar 23 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-5
* Resolves: #684977
  backport upstream patch

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jan 27 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-3
- Resolves: #659292
  use ionice in man cron job

* Wed Nov 24 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-2
- Resolves: #655385 - use old format of nroff output

* Mon Nov 22 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-1
- update to 2.5.9

* Fri Oct  1 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-8
- add less buildrequire

* Wed Sep 29 2010 jkeating - 2.5.7-7
- Rebuilt for gcc bug 634757

* Fri Sep 24 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-6
- Resolves: #630506 (change the description)
- minor spec file changes

* Mon Aug 30 2010 Dennis Gilmore <dennis@ausil.us> - 2.5.7-5
- Provide Versioned man

* Mon Aug 16 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-4
- remove obsolete conflict flag

* Mon Aug 16 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-3
- provides man tag
- resolves: #621688
  remove problematic man-pages (now in man-pages-de package)

* Fri Apr 16 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-2
- add conflicts tag

* Wed Feb 17 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.7-1
- initial build