/[packages]/cauldron/rpm/current/SPECS/rpm.spec
ViewVC logotype

Contents of /cauldron/rpm/current/SPECS/rpm.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2055599 - (show annotations) (download)
Mon Apr 8 18:51:56 2024 UTC (11 days, 11 hours ago) by wally
File size: 24495 byte(s)
- basesystem rebuild for i686
1 # WARNING: This package is synced with Fedora
2
3 %define lib64arches x86_64 aarch64
4
5 %ifarch %lib64arches
6 %define _lib lib64
7 %else
8 %define _lib lib
9 %endif
10
11 %define _prefix /usr
12 %define _libdir %_prefix/%_lib
13 %define _bindir %_prefix/bin
14 %define _sysconfdir /etc
15 %define _datadir /usr/share
16 %define _defaultdocdir %_datadir/doc
17 %define _localstatedir /var
18 %define _infodir %_datadir/info
19
20 %if %{?mklibname:0}%{?!mklibname:1}
21 %define mklibname(ds) %{_lib}%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}
22 %endif
23
24 %if %{?distsuffix:0}%{?!distsuffix:1}
25 %define distsuffix .mga
26 %endif
27
28 %if %{?_real_vendor:0}%{?!_real_vendor:1}
29 %define _real_vendor mageia
30 %endif
31
32 %if %{?mkrel:0}%{?!mkrel:1}
33 %define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?mageia_release:%mageia_release}%{?subrel:.%subrel}
34 %endif
35
36 %if %{?pyver:0}%{?!pyver:1}
37 %define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")
38 %endif
39
40 %define __find_requires %{rpmhome}/%{_real_vendor}/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
41 %define __find_provides %{rpmhome}/%{_real_vendor}/find-provides
42
43 # run internal testsuite?
44 %bcond_with check
45 # build with plugins?
46 %bcond_without plugins
47 # build with fsverity support?
48 %bcond_with fsverity
49 # build with ndb backend?
50 %bcond_without ndb
51 # build with sqlite support?
52 %bcond_without sqlite
53 # build with bdb_ro support?
54 %bcond_without bdb_ro
55 # build with sequoia crypto?
56 %bcond_with sequoia
57 %bcond_with debug
58
59 # Define directory which holds rpm config files, and some binaries actually
60 # NOTE: it remains */lib even on lib64 platforms as only one version
61 # of rpm is supported anyway, per architecture
62 %define rpmhome /usr/lib/rpm
63
64 %global rpmver 4.19.1
65 #global snapver rc1
66 %global baserelease 3
67 %global sover 10
68
69 %global srcver %{rpmver}%{?snapver:-%{snapver}}
70 %global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
71 %global libmajor %sover
72 %global librpmname %mklibname rpm %{libmajor}
73 %global librpmnamedevel %mklibname -d rpm
74 %global librpmsign %mklibname rpmsign %{libmajor}
75 %global librpmbuild %mklibname rpmbuild %{libmajor}
76
77 %global rpmsetup_version 2.72
78
79
80 Summary: The RPM package management system
81 Name: rpm
82 Epoch: 1
83 Version: %{rpmver}
84 Release: %mkrel %{?snapver:0.%{snapver}.}%{baserelease}
85 Group: System/Packaging
86 Url: http://www.rpm.org/
87 Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
88 # extracted from https://pkgs.fedoraproject.org/cgit/redhat-rpm-config.git/plain/macros:
89 Source1: macros.filter
90
91 Source10: rpmdb-rebuild.service
92
93 #
94 # Fedora patches
95 #
96
97 # Patches already upstream:
98 Patch001: 0001-Fix-regression-in-Lua-scriptlet-runaway-child-detect.patch
99 # ...
100 Patch501: rpm-4.18.90-weak-user-group.patch
101
102 # These are not yet upstream
103 Patch906: rpm-4.7.1-geode-i686.patch
104
105 #
106 # End of FC patches
107 #
108
109 #
110 # Upstream patches not carried by FC:
111 #
112
113
114
115 #
116 # Mageia patches
117 #
118
119 # (tmb) stop trying to strip firmware files, they need to be intact.
120 Patch50: rpm-4.19.0-dont-try-to-strip-firmware-files.patch
121
122 # In original rpm, -bb --short-circuit does not work and run all stage
123 # From popular request, we allow to do this
124 # http://qa.mandriva.com/show_bug.cgi?id=15896
125 Patch70: rpm-4.18.0-bb-shortcircuit.patch
126
127 # don't conflict for doc files
128 # (to be able to install lib*-devel together with lib64*-devel even if they have conflicting manpages)
129 Patch83: rpm-4.12.0-no-doc-conflicts.patch
130
131 # Fix http://qa.mandriva.com/show_bug.cgi?id=19392
132 # (is this working??)
133 Patch84: rpm-4.15.0-rpmqv-ghost.patch
134
135 # without this patch, "#%%define foo bar" is surprisingly equivalent to "%%define foo bar"
136 # with this patch, "#%%define foo bar" is a fatal error
137 # Bug still valid => Send upstream for review.
138 Patch145: rpm-forbid-badly-commented-define-in-spec.patch
139
140 # (nb: see the patch for more info about this issue)
141 #Patch151: rpm-4.6.0-rc1-protect-against-non-robust-futex.patch
142
143 #
144 # Merge mageia's perl.prov improvements back into upstream:
145 #
146 # making sure automatic provides & requires for perl package are using the new
147 # macro %%perl_convert_version:
148 Patch162: use_perl_convert_version.diff
149
150 #
151 # Merge mageia's find-requires.sh improvements back into upstream:
152 #
153 # (tv) output perl-base requires instead of /usr/bin/perl with internal generator:
154 # (ngompa) This patch can be dropped once we switch fully over to dnf
155 Patch170: script-perl-base.diff
156 # (tv) do not emit requires for /bin/sh (required by glibc) or interpreters for which
157 # we have custom
158 Patch172: script-filtering.diff
159 # (tv) "resolve" /bin/env foo interpreter to actual path, rather than generating
160 # dependencies on coreutils, should trim off ~800 dependencies more
161 Patch173: script-env.diff
162 # (tv) output pkgconfig requires instead of /usr/bin/pkgconfig with internal generator:
163 # (ngompa) This patch can be dropped once we switch fully over to dnf
164 Patch174: pkgconfig.diff
165 # (tv) no not emit "rtld(GNU_HASH)" requires as we've support for it since mga1:
166 # (saves ~5K packages' dependency in synthesis)
167 Patch175: no-rtld_GNU_HASH_req.diff
168 # (tv) replace file deps by requires on packages (when interp is installed):
169 # (ngompa) This patch can be dropped once we switch fully over to dnf
170 Patch176: script-no-file-deps.diff
171 # (tv) replace file deps by requires on packages (common cases for !BRed interp):
172 # (ngompa) This patch can be dropped once we switch fully over to dnf
173 Patch177: script-no-file-deps2.diff
174 # (pt) generate ELF provides for libraries, not only for executables
175 Patch180: elf_libs_req.diff
176 # [Suse]add --assumeexec option for previous patch:
177 Patch181: assumeexec.diff
178 # (Martin Whitaker) disable the systemd-inhibit plugin when systemd-logind is not running (mga#20016):
179 Patch182: systemd-inhibit-requires-logind.patch
180
181 # (tv) Commit 816c7cf3fdae5c45de02a42a2245549778e2ca80 defaults to ignoring autodeps from docfile,
182 # which break perl autodeps from *META*:
183 Patch200: dont-filter-autodeps-from-doc-by-default.patch
184
185 # (wally) Don't own /usr/share/man/$LANG/man[1-9]/ directories when '%%find_lang foo --with-man --all-name' is used
186 Patch201: 0001-find-lang.sh-don-t-own-directories-when-with-man-all.patch
187
188 # (wally) Fix build with gcc14
189 Patch202: 0001-Fix-build-with-gcc14.patch
190
191 # Various arch enabling:
192 Patch3003: rpm_arm_mips_isa_macros.patch
193
194 # Mageia patches that are easier to rediff on top of FC patches:
195 #---------------------------------------------------------------
196
197 # Partially GPL/LGPL dual-licensed and some bits with BSD
198 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
199 License: GPLv2+
200
201 BuildRequires: autoconf
202 BuildRequires: pkgconfig(zlib)
203 BuildRequires: bzip2-devel
204 BuildRequires: pkgconfig(liblzma) >= 5
205 BuildRequires: libgomp-devel
206 BuildRequires: automake
207 BuildRequires: cmake >= 3.18
208 BuildRequires: doxygen
209 BuildRequires: elfutils-devel
210 BuildRequires: ed
211 BuildRequires: gettext-devel
212 %if %{with plugins}
213 BuildRequires: pkgconfig(dbus-1)
214 %endif
215 BuildRequires: audit-libs-devel
216 BuildRequires: pkgconfig(neon)
217 BuildRequires: pkgconfig(popt)
218 BuildRequires: magic-devel
219 BuildRequires: rpm-%{_real_vendor}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}}
220 BuildRequires: readline-devel
221 BuildRequires: pkgconfig(ncurses)
222 BuildRequires: pkgconfig(libselinux)
223 BuildRequires: pkgconfig(lua) >= 5.4
224 BuildRequires: pkgconfig(libcap)
225 BuildRequires: libacl-devel
226 BuildRequires: pkgconfig(libarchive)
227 BuildRequires: pkgconfig(python3)
228 BuildRequires: pkgconfig(libzstd)
229 %if %{with sqlite}
230 BuildRequires: pkgconfig(sqlite3)
231 %endif
232
233 # Needed for re-building the documentation and man pages
234 # normally those are shipped in the tarball pre-build
235 # but need re-building if sources are patched
236 %if 0
237 BuildRequires: pandoc
238 BuildRequires: doxygen
239 %endif
240
241
242 %if %{with sequoia}
243 %global crypto sequoia
244 BuildRequires: rpm-sequoia-devel >= 1.4.0
245 %else
246 %global crypto openssl
247 BuildRequires: pkgconfig(libssl)
248 %endif
249
250 # for testsuite:
251 BuildRequires: eatmydata
252
253 Requires: mktemp
254 Requires: setup >= 2.2.0-8
255 Requires: rpm-%{_real_vendor}-setup >= 1.85
256 # versioned deps for upgrades (mga #24767)
257 Requires: %{_lib}db5.3 >= 5.3.28-17
258 Requires: update-alternatives
259 Requires: %librpmname = %epoch:%version-%release
260 %define git_url http://rpm.org/git/rpm.git
261 Requires(pre): rpm-helper
262 Requires(pre): coreutils
263 Requires(postun): rpm-helper
264
265 # Weakly depend on stuff that used to be in main rpm package
266 Recommends: rpm-plugin-syslog
267 Recommends: rpm-plugin-ima
268 Recommends: rpm-plugin-systemd-inhibit
269
270 %if %{with fsverity}
271 #BuildRequires: fsverity-devel
272 %endif
273
274 %description
275 The RPM Package Manager (RPM) is a powerful command line driven
276 package management system capable of installing, uninstalling,
277 verifying, querying, and updating software packages. Each software
278 package consists of an archive of files along with information about
279 the package like its version, a description, etc.
280
281 %package -n %librpmname
282 Summary: Libraries for manipulating RPM packages
283 Group: System/Libraries
284 License: GPLv2+ and LGPLv2+ with exceptions
285 Provides: librpm = %version-%release
286 Provides: rpm-libs = %{version}-%{release}
287 Provides: rpm-libs%{_isa} = %{version}-%{release}
288
289 %description -n %librpmname
290 This package contains the RPM shared libraries.
291
292 %package -n %librpmbuild
293 Summary: Libraries for building RPM packages
294 Group: System/Libraries
295 License: GPLv2+ and LGPLv2+ with exceptions
296 Obsoletes: rpm-build-libs < %{version}-%{release}
297 Provides: rpm-build-libs%{_isa} = %{version}-%{release}
298
299 %description -n %librpmbuild
300 This package contains the RPM shared libraries for building packages.
301
302 %package -n %librpmsign
303 Summary: Libraries for signing RPM packages
304 Group: System/Libraries
305 License: GPLv2+ and LGPLv2+ with exceptions
306 Requires: gnupg2
307
308 %description -n %librpmsign
309 This package contains the RPM shared libraries for signing packages.
310
311 %package -n %librpmnamedevel
312 Summary: Development files for manipulating RPM packages
313 Group: Development/C
314 License: GPLv2+ and LGPLv2+ with exceptions
315 Requires: rpm = %epoch:%{version}-%{release}
316 Provides: librpm-devel = %version-%release
317 Provides: rpm-devel = %version-%release
318 Requires: %librpmname = %epoch:%version-%release
319 Requires: %librpmbuild = %epoch:%version-%release
320 Requires: %librpmsign = %epoch:%version-%release
321
322 %description -n %librpmnamedevel
323 This package contains the RPM C library and header files. These
324 development files will simplify the process of writing programs that
325 manipulate RPM packages and databases. These files are intended to
326 simplify the process of creating graphical package managers or any
327 other tools that need an intimate knowledge of RPM packages in order
328 to function.
329
330 This package should be installed if you want to develop programs that
331 will manipulate RPM packages and databases.
332
333 %package build
334 Summary: Scripts and executable programs used to build packages
335 Group: System/Packaging
336 Requires: autoconf
337 Requires: automake
338 # /usr/lib/rpm/check-files: line 31: diff: command not found
339 Requires: diffutils
340 Requires: file
341 Requires: gcc-c++
342 # We need cputoolize & amd64-* alias to x86_64-* in config.sub
343 Requires: libtool-base
344 Requires: patch
345 Requires: make
346 Requires: elfutils >= 0.167-2
347 Requires: perl(CPAN::Meta) >= 2.112.150
348 Requires: perl(ExtUtils::MakeMaker) >= 6.570_700
349 Requires: perl(YAML::Tiny)
350 Requires: rpm = %epoch:%{version}-%{release}
351 Requires: %librpmbuild = %epoch:%version
352 Requires: python3-rpm-generators
353 Requires: gawk
354 Requires: tar unzip gzip bzip2 cpio xz
355 Requires: zstd
356 Requires: debugedit >= 0.3
357 Recommends: gdb-minimal
358 # Technically rpmbuild doesn't require any external configuration, but
359 # creating distro-compatible packages does. To make the common case
360 # "just work" while allowing for alternatives, depend on a virtual
361 # provide, typically coming from redhat-rpm-config.
362 Requires: rpm-%{_real_vendor}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}}
363
364 %description build
365 The rpm-build package contains the scripts and executable programs
366 that are used to build packages using the RPM Package Manager.
367
368 %package sign
369 Summary: Package signing support
370 Group: System/Base
371
372 %description sign
373 This package contains support for digitally signing RPM packages.
374
375 %package -n python3-%{name}
376 Summary: Python 3 bindings for apps which will manipulate RPM packages
377 Group: Development/Python
378 Requires: rpm = %epoch:%{version}-%{release}
379 Provides: rpm-python = %epoch:%{version}-%{release}
380
381 %description -n python3-%{name}
382 The python3-rpm package contains a module that permits applications
383 written in the Python programming language to use the interface
384 supplied by RPM Package Manager libraries.
385
386 This package should be installed if you want to develop Python 3
387 programs that will manipulate RPM packages and databases.
388
389 %package apidocs
390 Summary: API documentation for RPM libraries
391 Group: Documentation
392 BuildArch: noarch
393
394 %description apidocs
395 This package contains API documentation for developing applications
396 that will manipulate RPM packages and databases.
397
398 %package cron
399 Summary: Create daily logs of installed packages
400 Group: System/Base
401 BuildArch: noarch
402 Requires: crontabs
403 Requires: logrotate
404 Requires: rpm = %{epoch}:%{version}-%{release}
405
406 %description cron
407 This package contains a cron job which creates daily logs of installed
408 packages on a system.
409
410 %if %{with plugins}
411 %package plugin-selinux
412 Summary: Rpm plugin for SELinux functionality
413 Group: System/Base
414 Requires: %{librpmname}%{?_isa} = %{epoch}:%{version}-%{release}
415 Requires: selinux-policy-base
416
417 %description plugin-selinux
418 This plugin adds support for enforcing and verifying SELinux labels
419 in an rpm.
420
421 %package plugin-syslog
422 Summary: Rpm plugin for syslog functionality
423 Group: System/Base
424 Requires: %{librpmname}%{?_isa} = %{epoch}:%{version}-%{release}
425
426 %description plugin-syslog
427 This plugin exports RPM actions to the system log.
428
429 %package plugin-systemd-inhibit
430 Summary: Rpm plugin for systemd inhibit functionality
431 Group: System/Base
432 Requires: %{librpmname}%{?_isa} = %{epoch}:%{version}-%{release}
433
434 %description plugin-systemd-inhibit
435 This plugin blocks systemd from entering idle, sleep or shutdown while an rpm
436 transaction is running using the systemd-inhibit mechanism.
437
438 %package plugin-ima
439 Summary: Rpm plugin for IMA file signatures
440 Group: System/Base
441 Requires: %{librpmname}%{?_isa} = %{epoch}:%{version}-%{release}
442
443 %description plugin-ima
444 This plugin adds support for enforcing and verifying IMA file signatures
445 in an rpm.
446
447 %package plugin-prioreset
448 Summary: Rpm plugin for resetting scriptlet priorities for SysV init
449 Group: System/Base
450 Requires: %{librpmname}%{?_isa} = %{epoch}:%{version}-%{release}
451
452 %description plugin-prioreset
453 %{summary}.
454
455 Useful on legacy SysV init systems if you run rpm transactions with
456 nice/ionice priorities. Should not be used on systemd systems.
457
458 %package plugin-audit
459 Summary: Rpm plugin for logging audit events on package operations
460 Requires: rpm-libs%{_isa} = %{version}-%{release}
461
462 %description plugin-audit
463 %{summary}.
464
465 %if %{with fsverity}
466 %package plugin-fsverity
467 Summary: Rpm plugin for fsverity file signatures
468 Requires: rpm-libs%{_isa} = %{version}-%{release}
469
470 %description plugin-fsverity
471 %{summary}.
472 %endif
473
474 %package plugin-fapolicyd
475 Summary: Rpm plugin for fapolicyd support
476 Requires: rpm-libs%{_isa} = %{version}-%{release}
477
478 %description plugin-fapolicyd
479 %{summary}.
480
481 See https://people.redhat.com/sgrubb/fapolicyd/ for information about
482 the fapolicyd daemon.
483
484 %package plugin-dbus-announce
485 Summary: Rpm plugin for announcing transactions on the DBUS
486 Requires: rpm-libs%{_isa} = %{version}-%{release}
487
488 %description plugin-dbus-announce
489 The plugin announces basic information about rpm transactions to the
490 system DBUS - like packages installed or removed. Other programs can
491 subscribe to the signals to get notified when packages on the system
492 change.
493
494 # with plugins
495 %endif
496
497 %prep
498 %autosetup -n rpm-%{srcver} -p1
499
500 # switch to sqlite db by default, including during build-time tests
501 %if %{with sqlite}
502 sed -i -e "/_db_backend/ s/ bdb/ sqlite/g" macros.in
503 %endif
504
505 %build
506 %define _disable_ld_no_undefined 1
507
508 %if %with debug
509 RPM_OPT_FLAGS=-g
510 %endif
511 %set_build_flags
512
513 mkdir _build
514 cd _build
515 cmake \
516 -DCMAKE_INSTALL_PREFIX=%{_usr} \
517 -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_var}/lib \
518 %{?with_bdb_ro:-DENABLE_BDB_RO=ON} \
519 %{!?with_ndb:-DENABLE_NDB=OFF} \
520 %{!?with_sqlite:-DENABLE_SQLITE=OFF} \
521 %{!?with_plugins:-DENABLE_PLUGINS=OFF} \
522 %{?with_fsverity:-DWITH_FSVERITY=ON} \
523 %{?with_libimaevm:-DWITH_IMAEVM=ON} \
524 %{!?with_libarchive:-DWITH_ARCHIVE=OFF} \
525 %{!?with_check:-DENABLE_TESTSUITE=OFF} \
526 %{!?with_sequoia:-DWITH_INTERNAL_OPENPGP=ON} \
527 %{!?with_sequoia:-DWITH_OPENSSL=ON } \
528 -DENABLE_CUTF8=OFF \
529 -DRPM_VENDOR=%{_real_vendor} \
530 ..
531
532 %install
533 cd _build
534 %make_install
535 cd ..
536
537 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
538 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}
539
540 # Built-in replacement for systemd-sysusers(8)
541 install -m 755 scripts/sysusers.sh $RPM_BUILD_ROOT/%{rpmhome}
542
543 # Save list of packages through cron
544 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
545 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
546
547 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
548 install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm
549
550 test -d doc-copy || mkdir doc-copy
551 rm -rf doc-copy/*
552 ln -f docs/manual/* doc-copy/
553 rm -f doc-copy/Makefile*
554
555 mkdir -p $RPM_BUILD_ROOT/var/spool/repackage
556
557 mkdir -p %buildroot%rpmhome/macros.d
558 install %SOURCE1 %buildroot%rpmhome/macros.d
559 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
560 mkdir -p %buildroot%_sysconfdir/rpm
561 cat > %buildroot%_sysconfdir/rpm/macros <<EOF
562 # Put your own system macros here
563 # usually contains
564
565 # Set this one according your locales
566 # %%_install_langs
567
568 EOF
569
570 cd _build
571
572 # init an empty database for %ghost'ing for all supported backends
573 for be in %{?with_ndb:ndb} %{?with_sqlite:sqlite}; do
574 mkdir ${be} || :
575 tools/rpmdb --rcfile rpmrc --define "_db_backend ${be}" --dbpath=${PWD}/${be} --initdb
576 cp -va ${be}/. $RPM_BUILD_ROOT/var/lib/rpm/
577 done
578
579 # some packages invoke find-debuginfo directly, preserve compat for now
580 ln -s ../../bin/find-debuginfo $RPM_BUILD_ROOT/usr/lib/rpm/find-debuginfo.sh
581
582 %find_lang rpm
583
584 find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
585
586 # We don't ship those historically (save ~432kb of space):
587 rm -rf %buildroot/%{rpmhome}/platform/m68k-linux
588 rm -rf %buildroot/%{rpmhome}/platform/riscv64-linux
589 %ifnarch %{ix86} x86_64
590 rm -rf %buildroot/%{rpmhome}/platform/i*86-linux
591 rm -rf %buildroot/%{rpmhome}/platform/athlon-linux
592 rm -rf %buildroot/%{rpmhome}/platform/pentium*-linux
593 rm -rf %buildroot/%{rpmhome}/platform/geode-linux
594 %endif
595 %ifnarch x86_64
596 rm -rf %buildroot/%{rpmhome}/platform/amd64-linux
597 rm -rf %buildroot/%{rpmhome}/platform/ia32e-linux
598 rm -rf %buildroot/%{rpmhome}/platform/x86_64-linux
599 %endif
600 %ifnarch %arm aarch64
601 rm -rf %buildroot/%{rpmhome}/platform/arm*
602 rm -rf %buildroot/%{rpmhome}/platform/aarch64*
603 %endif
604 # new in 4.10.0:
605 rm -rf %buildroot/%{rpmhome}/platform/alpha*-linux
606 rm -rf %buildroot/%{rpmhome}/platform/sparc*-linux
607 rm -rf %buildroot/%{rpmhome}/platform/ia64*-linux
608 rm -rf %buildroot/%{rpmhome}/platform/m68k*-linux
609 rm -rf %buildroot/%{rpmhome}/platform/mips*-linux
610 rm -rf %buildroot/%{rpmhome}/platform/ppc*-linux
611 rm -rf %buildroot/%{rpmhome}/platform/s390*-linux
612 rm -rf %buildroot/%{rpmhome}/platform/sh*-linux
613
614 # These live in python-rpm-generators now
615 rm -f $RPM_BUILD_ROOT/%{rpmhome}/pythond*
616 rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/python*
617
618 %if %{with debugedit}
619 rm -f $RPM_BUILD_ROOT/%{rpmhome}/{debugedit,sepdebugcrcfix,find-debuginfo.sh}
620 %endif
621
622 %if %{with check}
623 %check
624 #eatmydata make -j check TESTSUITEFLAGS="-j%{_smp_build_ncpus}" || (cat tests/rpmtests.log; exit 1)
625 %endif
626
627 # workaround for https://github.com/rpm-software-management/rpm/issues/2811
628 rm $RPM_BUILD_ROOT/%{_defaultdocdir}/rpm/README.md
629
630 %pre
631 /usr/share/rpm-helper/add-user rpm $1 rpm /var/lib/rpm /bin/false
632
633 %pretrans -p <lua> -n python3-rpm
634 -- (tv) temp upgrade for cauldron:
635 path = "%{python3_sitearch}/rpm-4.18.0-py3.10.egg-info"
636 st = posix.stat(path)
637 if st and st.type == "directory" then
638 os.execute("rm -rf " .. path)
639 end
640
641 %postun
642 /usr/share/rpm-helper/del-user rpm $1 rpm
643
644 # Handle rpmdb rebuild service on erasure of old to avoid ordering issues
645 # https://pagure.io/fesco/issue/2382
646 %triggerun -- rpm < 1:4.16.1.3-4
647 if [ -x /usr/bin/systemctl ]; then
648 systemctl --no-reload preset rpmdb-rebuild ||:
649 fi
650
651 %posttrans
652 if [ -f /var/lib/rpm/Packages ]; then
653 touch /var/lib/rpm/.rebuilddb
654 fi
655
656 %define rpmattr %attr(0755, rpm, rpm)
657
658 %files -f _build/rpm.lang
659 %license COPYING
660 %doc CREDITS docs/manual/[a-z]*
661 %doc %{_defaultdocdir}/rpm/CONTRIBUTING.md
662 %doc %{_defaultdocdir}/rpm/COPYING
663 %doc %{_defaultdocdir}/rpm/INSTALL
664 %doc %{_defaultdocdir}/rpm/README
665
666 %attr(0755,rpm,rpm) %{_bindir}/rpm
667 %attr(0755, rpm, rpm) %{_bindir}/rpm2cpio
668 #attr(0755, rpm, rpm) %{_bindir}/rpm2archive
669 %attr(0755, rpm, rpm) %{_bindir}/gendiff
670 %attr(0755, rpm, rpm) %{_bindir}/rpmdb
671 %attr(0755, rpm, rpm) %{_bindir}/rpmkeys
672 %attr(0755, rpm, rpm) %{_bindir}/rpmgraph
673 %{_bindir}/rpmquery
674 %{_bindir}/rpmverify
675 %{_bindir}/rpmsort
676
677 %dir %{_localstatedir}/spool/repackage
678 %dir %{rpmhome}
679 %dir /etc/rpm
680 %config(noreplace) /etc/rpm/macros
681 %attr(0755, rpm, rpm) %{rpmhome}/rpmdb_*
682 %attr(0644, rpm, rpm) %{rpmhome}/macros
683 %rpmhome/macros.d
684 %{rpmhome}/lua
685 %attr(0755, rpm, rpm) %{rpmhome}/rpm.*
686 %attr(0644, rpm, rpm) %{rpmhome}/rpmpopt*
687 %attr(0644, rpm, rpm) %{rpmhome}/rpmrc
688
689 %rpmattr %{rpmhome}/rpm2cpio.sh
690 %rpmattr %{rpmhome}/tgpg
691
692 %{_mandir}/man8/rpm.8*
693 %{_mandir}/man8/rpmdb.8*
694 %{_mandir}/man8/rpmgraph.8*
695 %{_mandir}/man8/rpmkeys.8*
696 #{_mandir}/man8/rpm2archive.8*
697 %{_mandir}/man8/rpm2cpio.8*
698 %{_mandir}/man8/rpm-misc.8*
699 %{_mandir}/man8/rpmsort.8*
700 %{_mandir}/man8/rpm-plugins.8*
701 %{_mandir}/man1/*.1*
702
703 %attr(0755, rpm, rpm) %dir %_localstatedir/lib/rpm
704
705 %{_unitdir}/rpmdb-rebuild.service
706 %attr(0644, root, root) %ghost %config(missingok,noreplace) /var/lib/rpm/*
707 %attr(0644, root, root) %ghost /var/lib/rpm/.*.lock
708
709 %{rpmhome}/platform
710 %{rpmhome}/sysusers.sh
711
712 %dir %{rpmhome}/fileattrs
713
714 %files -n %librpmname
715 %{_libdir}/librpm.so.%{libmajor}{,.*}
716 %{_libdir}/librpmio.so.%{libmajor}{,.*}
717 %if %{with plugins}
718 %dir %{_libdir}/rpm-plugins
719
720 %files plugin-syslog
721 %{_libdir}/rpm-plugins/syslog.so
722 %{_mandir}/man8/rpm-plugin-syslog.8*
723
724 %files plugin-selinux
725 %{_libdir}/rpm-plugins/selinux.so
726 %{_mandir}/man8/rpm-plugin-selinux.8*
727
728 %files plugin-systemd-inhibit
729 %{_libdir}/rpm-plugins/systemd_inhibit.so
730 %{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
731
732 %if %{with libimaevm}
733 %files plugin-ima
734 %{_libdir}/rpm-plugins/ima.so
735 %{_mandir}/man8/rpm-plugin-ima.8*
736 %endif
737
738 %if %{with fsverity}
739 %files plugin-fsverity
740 %{_libdir}/rpm-plugins/fsverity.so
741 %endif
742
743 %files plugin-fapolicyd
744 %{_libdir}/rpm-plugins/fapolicyd.so
745 %{_mandir}/man8/rpm-plugin-fapolicyd.8*
746
747 %files plugin-prioreset
748 %{_libdir}/rpm-plugins/prioreset.so
749 %{_mandir}/man8/rpm-plugin-prioreset.8*
750
751 %files plugin-audit
752 %{_libdir}/rpm-plugins/audit.so
753 %{_mandir}/man8/rpm-plugin-audit.8*
754 # with plugins
755
756 %files plugin-dbus-announce
757 %{_libdir}/rpm-plugins/dbus_announce.so
758 %{_mandir}/man8/rpm-plugin-dbus-announce.8*
759 %{_datadir}/dbus-1/system.d/org.rpm.conf
760 %endif
761
762 %files -n %librpmbuild
763 %{_libdir}/librpmbuild.so.%{libmajor}{,.*}
764
765 %files -n %librpmsign
766 %{_libdir}/librpmsign.so.%{libmajor}{,.*}
767
768 %files build
769 %doc doc-copy/*
770 %rpmattr %{_bindir}/rpmbuild
771 %rpmattr %{_bindir}/rpmspec
772 %rpmattr %{_bindir}/rpmlua
773
774 %{_mandir}/man8/rpmbuild.8*
775 %{_mandir}/man8/rpmdeps.8*
776 %{_mandir}/man8/rpmspec.8*
777 %{_mandir}/man8/rpmlua.8*
778
779 %{rpmhome}/brp-*
780 %{rpmhome}/check-*
781 %{rpmhome}/find-lang.sh
782 %{rpmhome}/*provides*
783 %{rpmhome}/*requires*
784 %{rpmhome}/*deps*
785 %{rpmhome}/*.prov
786 %{rpmhome}/*.req
787 %{rpmhome}/fileattrs/*
788 %{rpmhome}/find-debuginfo.sh
789 %{rpmhome}/rpmuncompress
790
791 %files sign
792 %{_bindir}/rpmsign
793 %{_mandir}/man8/rpmsign.8*
794
795 %files -n python3-%{name}
796 %dir %{python3_sitearch}/rpm
797 %{python3_sitearch}/rpm-%{rpmver}*.egg-info
798 %{python3_sitearch}/rpm/__init__.py
799 %{python3_sitearch}/rpm/transaction.py
800 %{python3_sitearch}/rpm/_rpm.so
801 %artifact %{python3_sitearch}/rpm/__pycache__/
802
803 # Python examples
804 %{_defaultdocdir}/rpm/examples/*.py
805
806 %files -n %librpmnamedevel
807 %{_libdir}/librp*[a-z].so
808 %{_libdir}/pkgconfig/rpm.pc
809 %{_libdir}/cmake/rpm/
810 %{_includedir}/rpm/
811
812 %files cron
813 %{_sysconfdir}/cron.daily/rpm
814 %config(noreplace) %{_sysconfdir}/logrotate.d/rpm
815
816 %files apidocs
817 %license COPYING
818 %doc %{_defaultdocdir}/rpm/API/
819

  ViewVC Help
Powered by ViewVC 1.1.30