3 # - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
6 %bcond_without apidocs # Doxygen based API documentation
7 %bcond_without python3 # Python (3) bindings
8 %bcond_without plugins # plugins (all, including: audit, imaevm, selinux, systemd)
9 %bcond_without recommends_tags # use of Recommends tag (disable for bootstrapping)
10 %bcond_with imaevm # IMA/EVM signing support (requires libimaevm from ima-evm-utils)
11 %bcond_without audit # audit plugin
12 %bcond_without selinux # SELinux plugin
13 %bcond_without systemd # systemd inhibit plugin
15 %define db_ver 5.3.28.0
19 %if "%{_rpmversion}" >= "4.12" && "%{_rpmversion}" < "5"
20 %define with_recommends_tags 1
23 %if %{without plugins}
25 %undefine with_selinux
26 %undefine with_systemd
28 Summary: RPM Package Manager
29 Summary(de.UTF-8): RPM Packet-Manager
30 Summary(es.UTF-8): Gestor de paquetes RPM
31 Summary(pl.UTF-8): Aplikacja do zarządzania pakietami RPM
32 Summary(pt_BR.UTF-8): Gerenciador de pacotes RPM
33 Summary(ru.UTF-8): Менеджер пакетов от RPM
34 Summary(uk.UTF-8): Менеджер пакетів від RPM
39 License: GPL v2 / LGPL v2.1
41 Source0: http://ftp.rpm.org/releases/rpm-4.16.x/%{name}-%{version}.tar.bz2
42 # Source0-md5: 576277fafa5d0681a8a92c8716aca5f0
43 Source1: ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
44 # Source1-md5: 23914bb49fafe7153cee87126d966461
47 Source4: %{name}.sysconfig
48 Source5: %{name}.groups
49 Source6: %{name}-groups-po.awk
50 Source7: %{name}-install-tree
51 Source9: %{name}-user_group.sh
52 # http://svn.pld-linux.org/banner.sh/
54 Source11: %{name}.noautoprov
55 Source12: %{name}.noautoprovfiles
56 Source13: %{name}.noautoreq
57 Source14: %{name}.noautoreqfiles
59 Patch0: %{name}-man_pl.patch
60 Patch1: %{name}-popt-aliases.patch
61 Patch2: %{name}-perl-macros.patch
62 Patch3: %{name}-perl-req-perlfile.patch
63 Patch4: %{name}-scripts-closefds.patch
64 Patch6: %{name}-perl_req-INC_dirs.patch
65 Patch7: %{name}-debuginfo.patch
66 Patch8: %{name}-libtool-deps.patch
67 Patch9: %{name}-builddir-readlink.patch
68 Patch10: %{name}-changelog_order_check_nonfatal.patch
69 Patch11: %{name}-postun-nofail.patch
70 Patch12: %{name}-clean-docdir.patch
71 Patch13: %{name}-perl-magic.patch
72 Patch14: %{name}-ignore-missing-macro-files.patch
74 Patch16: rpm5-db-compat.patch
75 Patch17: python-internal-build.patch
76 Patch18: missing-macros.patch
77 Patch19: pkgconfig.patch
78 Patch20: uname-deps.patch
79 Patch22: ix86-platforms.patch
80 Patch23: shortcircuited-deps.patch
81 Patch24: cpuinfo-deps.patch
82 Patch25: rpmio-read-proc-files.patch
83 Patch26: allow-at-in-ver-rel.patch
84 Patch27: no-exeonly-for-elf-reqprov.patch
85 Patch28: default-patch-flags.patch
86 Patch29: %{name}-noarch_py_prov.patch
87 Patch30: missing-ghost-terminate-build.patch
88 Patch31: missing-doc-terminate-build.patch
89 Patch32: noexpand.patch
90 Patch33: sqlite-db-backend.patch
91 Patch34: skip-symlinks.patch
93 Patch36: build-locale.patch
95 BuildRequires: acl-devel
96 %{?with_audit:BuildRequires: audit-libs-devel}
97 BuildRequires: autoconf >= 2.63
98 BuildRequires: automake >= 1:1.10
99 BuildRequires: bzip2-devel >= 1.0.2-17
100 BuildRequires: db-devel >= %{db_ver}
101 %{?with_systemd:BuildRequires: dbus-devel >= 1.3}
102 BuildRequires: elfutils-devel >= 0.108
103 BuildRequires: gettext-tools >= 0.19.2
104 BuildRequires: libarchive-devel
105 BuildRequires: libcap-devel
106 BuildRequires: libmagic-devel
107 BuildRequires: libgcrypt-devel
108 BuildRequires: libgomp-devel >= 6:4.5
109 %{?with_imaevm:BuildRequires: libimaevm-devel >= 1.0}
110 %{?with_selinux:BuildRequires: libselinux-devel >= 2.1.0}
111 # needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
112 BuildRequires: libstdc++-devel
113 BuildRequires: libtool >= 1:1.4.2-9
114 BuildRequires: lua-devel >= 5.2
115 BuildRequires: patch >= 2.2
116 BuildRequires: pkgconfig
117 BuildRequires: popt-devel >= %{popt_ver}
118 BuildRequires: python3-modules >= 1:3.2
120 BuildRequires: python3-devel >= 1:3.2
121 BuildRequires: rpm-pythonprov
122 BuildRequires: rpmbuild(macros) >= 1.750
124 BuildRequires: rpm-build >= 4.6
125 BuildRequires: sqlite3-devel >= 3.22.0
127 BuildRequires: xz-devel
128 BuildRequires: zlib-devel
129 BuildRequires: zstd-devel
131 BuildRequires: doxygen
132 BuildRequires: ghostscript
133 BuildRequires: graphviz
134 BuildRequires: tetex-pdftex
136 Requires(posttrans): coreutils
137 Requires: %{name}-base = %{epoch}:%{version}-%{release}
138 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
139 Requires: rpm-pld-macros >= 2.002
140 Requires: FHS >= 3.0-2
142 Requires: popt >= %{popt_ver}
143 %if %{with recommends_tags}
144 Recommends: rpm-plugin-audit
145 Recommends: rpm-plugin-prioreset
146 Recommends: rpm-plugin-syslog
147 Recommends: rpm-plugin-systemd-inhibit
149 Obsoletes: rpm-utils-perl < 1:4.15
150 Obsoletes: rpm-utils-static < 1:4.15
151 Conflicts: glibc < 2.2.92
152 # db4.6 poldek needed
153 Conflicts: poldek < 0.21-0.20070703.00.3
154 # segfaults with lzma 0.42.2
155 Conflicts: lzma-libs < 4.999.3
156 Conflicts: util-vserver < 0.30.216-1.pre3034.7
157 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
159 %define _binary_payload w9.gzdio
161 # don't require very fresh rpm.macros to build
162 %define find_lang sh ./scripts/find-lang.sh $RPM_BUILD_ROOT
163 %define ix86 i386 i486 i586 i686 athlon geode pentium3 pentium4
164 %define ppc ppc ppc7400 ppc7450
165 %define x8664 amd64 ia32e x86_64
167 %define _rpmlibdir /usr/lib/rpm
170 RPM is a powerful package manager, which can be used to build,
171 install, query, verify, update, and uninstall individual software
172 packages. A package consists of an archive of files, and package
173 information, including name, version, and description.
175 %description -l de.UTF-8
176 RPM ist ein kräftiger Packet-Manager, der verwendet sein kann zur
177 Installation, Anfrage, Verifizierung, Aktualisierung und
178 Uninstallation individueller Softwarepakete. Ein Paket besteht aus
179 einem Archiv Dateien und Paketinformation, inklusive Name, Version und
182 %description -l es.UTF-8
183 RPM es un poderoso administrador de paquetes, que puede ser usado para
184 construir, instalar, pesquisar, verificar, actualizar y desinstalar
185 paquetes individuales de software. Un paquete consiste en un
186 almacenaje de archivos, y información sobre el paquete, incluyendo
187 nombre, versión y descripción.
189 %description -l pl.UTF-8
190 RPM jest doskonałym programem zarządzającym pakietami. Umożliwia on
191 przebudowanie, instalację czy weryfikację dowolnego pakietu.
192 Informacje dotyczące każdego pakietu, takie jak jego opis, lista
193 plików wchodzących w skład pakietu, zależności od innych pakietów, są
194 przechowywane w bazie danych i można je uzyskać za pomocą opcji
195 odpytywania programu rpm.
197 %description -l pt_BR.UTF-8
198 RPM é um poderoso gerenciador de pacotes, que pode ser usado para
199 construir, instalar, pesquisar, verificar, atualizar e desinstalar
200 pacotes individuais de software. Um pacote consiste de um conjunto de
201 arquivos e informações adicionais, incluindo nome, versão e descrição
202 do pacote, permissões dos arquivos, etc.
204 %description -l ru.UTF-8
205 RPM - это мощный менеджер пакетов, который может быть использован для
206 создания, инсталляции, запросов (query), проверки, обновления и
207 удаления программных пакетов. Пакет состоит из файлового архива и
208 служебной информации, включающей название, версию, описание и другие
211 %description -l uk.UTF-8
212 RPM - це потужний менеджер пакетів, що може бути використаний для
213 створення, інсталяції, запитів (query), перевірки, поновлення та
214 видалення програмних пакетів. Пакет складається з файлового архіву та
215 службової інформації, що містить назву, версію, опис та іншу
216 інформацію про пакет.
219 Summary: RPM base package - scripts used by rpm packages themselves
220 Summary(pl.UTF-8): Podstawowy pakiet RPM - skrypty używane przez same pakiety rpm
223 Obsoletes: rpm-scripts < 4.4
224 Obsoletes: vserver-rpm < 1
227 The RPM base package contains scripts used by rpm packages themselves.
229 - scripts for adding/removing groups and users needed for rpm
231 - banner.sh to display %%banner messages from rpm scriptlets.
233 %description base -l pl.UTF-8
234 Pakiet podstawowy RPM zwiera skrypty używane przez same pakiety rpm.
236 - skrypty dodające/usuwające grupy i użytkowników dla pakietów rpm,
237 - banner.sh do pokazywania komunikatów %%banner dla skryptletów rpm.
240 Summary: RPMs library
241 Summary(pl.UTF-8): Biblioteki RPM-a
243 Requires: db >= %{db_ver}
244 Requires: libmagic >= 1.15-2
245 Requires: popt >= %{popt_ver}
246 Requires: sqlite3-libs >= 3.22.0
247 Obsoletes: rpm-libs < 4.0.2-4
248 # avoid SEGV caused by mixed db versions
249 Conflicts: poldek < 0.18.1-16
254 %description lib -l pl.UTF-8
258 Summary: Header files for rpm libraries
259 Summary(de.UTF-8): Header-Dateien für rpm Libraries
260 Summary(es.UTF-8): Archivos de inclusión y bibliotecas para programas de manipulación de paquetes rpm
261 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek rpm
262 Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para programas de manipulação de pacotes RPM
263 Summary(ru.UTF-8): Хедеры и библиотеки для программ, работающих с rpm-пакетами
264 Summary(uk.UTF-8): Хедери та бібліотеки для програм, що працюють з пакетами rpm
265 Group: Development/Libraries
266 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
267 Requires: bzip2-devel
268 Requires: db-devel >= %{db_ver}
269 Requires: elfutils-devel
270 Requires: libmagic-devel
271 Requires: libgcrypt-devel
273 Requires: libselinux-devel
274 Requires: libsemanage-devel
275 Requires: libsepol-devel
277 Requires: popt-devel >= %{popt_ver}
281 The RPM packaging system includes C libraries that make it easy to
282 manipulate RPM packages and databases. They are intended to ease the
283 creation of graphical package managers and other tools that need
284 intimate knowledge of RPM packages. This package contains header files
287 %description devel -l de.UTF-8
288 Der RPM-Packensystem enthält eine C-Library, die macht es einfach
289 RPM-Pakete und Dateibanken zu manipulieren. Er eignet sich für
290 Vereinfachung des Schaffens grafischer Paket-Manager und anderer
291 Werkzeuge, die intime Kenntnis von RPM-Paketen brauchen.
293 %description devel -l es.UTF-8
294 El sistema de empaquetado RPM incluye una biblioteca C que vuelve
295 fácil la manipulación de paquetes y bases de datos RPM. Su objetivo es
296 facilitar la creación de administradores gráficos de paquetes y otras
297 herramientas que necesiten un conocimiento profundo de paquetes RPM.
299 %description devel -l pl.UTF-8
300 System RPM zawiera biblioteki C, które ułatwiają manipulowanie
301 pakietami RPM oraz bazami danych. W zamiarze ma to uprościć tworzenie
302 graficznych programów zarządzających pakietami oraz innych narzędzi,
303 które wymagają szczegółowej wiedzy na temat pakietów RPM. Ten pakiet
304 zawiera pliki nagłówkowe wspomnianych bibliotek.
306 %description devel -l pt_BR.UTF-8
307 O sistema de empacotamento RPM inclui uma biblioteca C que torna fácil
308 a manipulação de pacotes e bases de dados RPM. Seu objetivo é
309 facilitar a criação de gerenciadores gráficos de pacotes e outras
310 ferramentas que precisem de conhecimento profundo de pacotes RPM.
312 %description devel -l ru.UTF-8
313 Система управления пакетами RPM содержит библиотеку C, которая
314 упрощает манипуляцию пакетами RPM и соответствующими базами данных.
315 Эта библиотека предназначена для облегчения создания графических
316 пакетных менеджеров и других утилит, которым необходимо работать с
319 %description devel -l uk.UTF-8
320 Система керування пакетами RPM містить бібліотеку C, котра спрощує
321 роботу з пакетами RPM та відповідними базами даних. Ця бібліотека
322 призначена для полегшення створення графічних пакетних менеджерів та
323 інших утиліт, що працюють з пакетами RPM.
326 Summary: Additional utilities for managing RPM packages and database
327 Summary(de.UTF-8): Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
328 Summary(pl.UTF-8): Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
329 Group: Applications/File
330 Requires: %{name} = %{epoch}:%{version}-%{release}
331 Requires: popt >= %{popt_ver}
332 %if %{with recommends_tags}
336 Conflicts: filesystem-debuginfo < 3.0-16
339 Additional utilities for managing RPM packages and database.
341 %description utils -l de.UTF-8
342 Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken.
344 %description utils -l pl.UTF-8
345 Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami.
348 Summary: Scripts for building binary RPM packages
349 Summary(de.UTF-8): Scripts fürs Bauen binärer RPM-Pakete
350 Summary(pl.UTF-8): Skrypty pomocnicze do budowania binarnych RPM-ów
351 Summary(pt_BR.UTF-8): Scripts e programas executáveis usados para construir pacotes
352 Summary(ru.UTF-8): Скрипты и утилиты, необходимые для сборки пакетов
353 Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів
354 Group: Applications/File
355 Requires(pretrans): coreutils
356 Requires(pretrans): findutils
357 Requires: %{name}-utils = %{epoch}:%{version}-%{release}
358 Requires: rpm-pld-macros-build >= 1.744
362 Requires: chrpath >= 0.10-4
366 Requires: file >= 4.17
370 Requires: gcc >= 3.0.3
374 Requires: glibc-devel
381 Requires: tar >= 1:1.22
385 Provides: rpmbuild(noauto) = 3
387 Conflicts: automake < 1:1.7.9-2
388 Conflicts: libtool < 2:1.5-13
392 Scripts for building binary RPM packages.
394 %description build -l de.UTF-8
395 Scripts fürs Bauen binärer RPM-Pakete.
397 %description build -l pl.UTF-8
398 Skrypty pomocnicze do budowania binarnych RPM-ów.
400 %description build -l pt_BR.UTF-8
401 Este pacote contém scripts e programas executáveis que são usados para
402 construir pacotes usando o RPM.
404 %description build -l ru.UTF-8
405 Различные вспомогательные скрипты и исполняемые программы, которые
406 используются для сборки RPM'ов.
408 %description build -l uk.UTF-8
409 Різноманітні допоміжні скрипти та утиліти, які використовуються для
413 Summary: Additional utilities for checking Perl provides/requires in RPM packages
414 Summary(de.UTF-8): Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
415 Summary(pl.UTF-8): Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
416 Group: Applications/File
417 Requires: %{name} = %{epoch}:%{version}-%{release}
418 Requires: perl-Encode
420 Requires: perl-modules
422 %description perlprov
423 Additional utilities for checking Perl provides/requires in RPM
426 %description perlprov -l de.UTF-8
427 Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen.
429 %description perlprov -l pl.UTF-8
430 Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w
434 Summary: Python macros, which simplifies creation of RPM packages with Python software
435 Summary(pl.UTF-8): Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
436 Group: Applications/File
437 Requires: %{name} = %{epoch}:%{version}-%{release}
439 Requires: python3-modules
440 Requires: python3-setuptools
442 %description pythonprov
443 Python macros, which simplifies creation of RPM packages with Python
446 %description pythonprov -l pl.UTF-8
447 Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w
450 %package -n python3-rpm
451 Summary: Python 3 interface to RPM library
452 Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki RPM-a
453 Summary(pt_BR.UTF-8): Módulo Python 3 para aplicativos que manipulam pacotes RPM
454 Group: Development/Languages/Python
455 Requires: %{name} = %{epoch}:%{version}-%{release}
457 Obsoletes: python-rpm < 1:4.16.0
458 Obsoletes: rpm-python < 4.0.2-50
460 %description -n python3-rpm
461 The python3-rpm package contains a module which permits applications
462 written in the Python 3 programming language to use the interface
463 supplied by RPM (RPM Package Manager) libraries.
465 This package should be installed if you want to develop Python 3
466 programs that will manipulate RPM packages and databases.
468 %description -n python3-rpm -l pl.UTF-8
469 Pakiet python3-rpm zawiera moduł, który pozwala aplikacjom napisanym w
470 Pythonie 3 na używanie interfejsu dostarczanego przez biblioteki
473 Pakiet ten powinien zostać zainstalowany, jeśli chcesz pisać w
474 Pythonie 3 programy manipulujące pakietami i bazami danych rpm.
476 %description -n python3-rpm -l pt_BR.UTF-8
477 O pacote python3-rpm contém um módulo que permite que aplicações
478 escritas em Python 3 utilizem a interface fornecida pelas bibliotecas
479 RPM (RPM Package Manager).
481 Esse pacote deve ser instalado se você quiser desenvolver programas em
482 Python 3 para manipular pacotes e bancos de dados RPM.
484 %package plugin-audit
485 Summary: Plugin for logging audit events on package operations
486 Summary(pl.UTF-8): Wtyczka do logowania zdarzeń audytowych przy operacjach na pakietach
488 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
490 %description plugin-audit
491 Plugin for libaudit support.
493 %description plugin-audit -l pl.UTF-8
494 Wtyczka do obsługi libaudit.
496 %package plugin-syslog
497 Summary: Plugin for syslog functionality
498 Summary(pl.UTF-8): Wtyczka do funkcjonalności sysloga
500 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
502 %description plugin-syslog
503 This plugin exports RPM actions to the system log.
505 %description plugin-syslog -l pl.UTF-8
506 Ta wtyczka eksportuje akcje RPM-a do logu systemowego.
508 %package plugin-systemd-inhibit
509 Summary: Plugin for systemd inhibit functionality
510 Summary(pl.UTF-8): Wtyczka do funkcjonalności systemd inhibit
512 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
513 Requires: dbus >= 1.3
515 %description plugin-systemd-inhibit
516 This plugin blocks systemd from entering idle, sleep or shutdown while
517 an rpm transaction is running using the systemd-inhibit mechanism.
519 %description plugin-systemd-inhibit -l pl.UTF-8
520 Ta wtyczka blokuje systemd przed wejściem w stan bezczynności (idle),
521 uśpienia (sleep) lub zamykania (shutdown) podczas trwania transakcji
522 RPM-a, korzystając z mechanizmu systemd-inhibit.
525 Summary: Plugin for IMA file signatures
526 Summary(pl.UTF-8): Wtyczka do sygnatur plików IMA
528 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
530 %description plugin-ima
531 This plugin adds support for enforcing and verifying IMA file
532 signatures in an rpm.
534 %description plugin-ima -l pl.UTF-8
535 Ta wtyczka dodaje obsługę wymuszania i weryfikacji podpisów plików
538 %package plugin-prioreset
539 Summary: Plugin for resetting scriptlet priorities for SysV init
540 Summary(pl.UTF-8): Wtyczka do resetowania priorytetu skryptletów przy inicie SysV
542 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
544 %description plugin-prioreset
545 This plugin is useful on legacy SysV init systems if you run rpm
546 transactions with nice/ionice priorities. Should not be used on
549 %description plugin-prioreset -l pl.UTF-8
550 Ta wtyczka jest przydatna w systemach ze starym procesem init w wersji
551 SysV, jeżeli transakcje RPM-a są uruchamiane z priorytetami
552 nice/ionice. Nie powinna być używana w systemach z systemd.
554 %package plugin-selinux
555 Summary: Plugin for SELinux functionality
556 Summary(pl.UTF-8): Wtyczka do funkcjonalności SELinux
558 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
559 Requires: libselinux >= 2.1.0
561 %description plugin-selinux
562 Plugin for SELinux functionality.
564 %description plugin-selinux -l pl.UTF-8
565 Wtyczka do funkcjonalności SELinux.
568 Summary: Package signing support
569 Summary(pl.UTF-8): Obsługa podpisywania pakietów
571 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
574 This package contains support for digitally signing RPM packages.
576 %description sign -l pl.UTF-8
577 Ten pakiet zawiera obsługę cyfrowego podpisywania pakietów RPM.
580 Summary: RPM API documentation and guides
581 Summary(pl.UTF-8): Documentacja API RPM-a i przewodniki
586 Documentation for RPM API and guides in HTML format generated from rpm
589 %description apidocs -l pl.UTF-8
590 Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
591 źrodeł RPM-a przez doxygen.
594 %setup -q -n %{name}-%{version}%{?subver}
633 install %{SOURCE15} scripts/perl.prov.in
635 %{__mv} scripts/perl.req{,.in}
637 # generate Group translations to *.po
638 awk -f %{SOURCE6} %{SOURCE5}
640 %{__sed} -i -e '1s,/usr/bin/python,%{__python3},' scripts/pythondistdeps.py
649 # rpm checks for CPU type at runtime, but it looks better
651 -e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
652 -e 's|@host_cpu@|%{_target_cpu}|' \
653 -e 's|@host_os@|%{_target_os}|' \
658 WITH_PERL_VERSION=no \
659 __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \
660 __GPG=%{_bindir}/gpg \
664 %{!?with_plugins:--disable-plugins} \
665 %{!?with_systemd:--disable-inhibit-plugin} \
666 --disable-silent-rules \
671 --with-audit%{!?with_audit:=no} \
673 %{?with_imaevm:--with-imaevm} \
675 %{?with_python3:--enable-python} \
676 --with-selinux%{!?with_selinux:=no} \
681 %{__make} -C po update-gmo
689 rm -rf $RPM_BUILD_ROOT
690 install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/{rpm,pki/rpm-gpg}} \
691 $RPM_BUILD_ROOT{/var/lib/{banner,rpm},/usr/lib/.build-id}
693 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/PLD-3.0-Th-GPG-key.asc
696 pkgconfigdir=%{_pkgconfigdir} \
697 DESTDIR=$RPM_BUILD_ROOT
700 %ifnarch %{ix86} %{x8664} x32
701 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros
702 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/geode-linux/macros
703 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i386-linux/macros
704 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i486-linux/macros
705 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i586-linux/macros
706 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i686-linux/macros
707 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium3-linux/macros
708 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium4-linux/macros
711 %ifnarch %{x8664} x32
712 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/amd64-linux/macros
713 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia32e-linux/macros
714 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x32-linux/macros
715 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros
719 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/m68k-linux/macros
720 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc32dy4-linux/macros
721 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros
722 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8260-linux/macros
723 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8560-linux/macros
724 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc-linux/macros
725 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros
729 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/aarch64-linux/macros
733 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/arm*-linux/macros
736 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/alpha*-linux/macros
737 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia64-linux/macros
738 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/mips*-linux/macros
739 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/riscv64-linux/macros
740 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros
741 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros
742 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros
744 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
746 %{_target_cpu}-%{_target_vendor}-linux-gnux32
748 %{_target_cpu}-%{_target_vendor}-linux
752 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
754 install -d $RPM_BUILD_ROOT%{_rpmlibdir}/pld
756 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
757 cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
758 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rpm
760 cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/banner.sh
762 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros
763 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang
764 cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov
765 cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles
766 cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq
767 cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles
770 %{__mv} $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
771 ln -sf /bin/rpm $RPM_BUILD_ROOT%{_bindir}/rpmquery
772 ln -sf /bin/rpm $RPM_BUILD_ROOT%{_bindir}/rpmverify
774 # move essential libs to /lib (libs that /bin/rpm links to)
775 for a in librpm.so librpmbuild.so librpmio.so librpmsign.so; do
776 mv -f $RPM_BUILD_ROOT%{_libdir}/${a}.* $RPM_BUILD_ROOT/%{_lib}
777 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${a}.*.*.*) $RPM_BUILD_ROOT%{_libdir}/${a}
780 # init an empty database for %ghost'ing for all supported backends
781 for be in sqlite bdb ndb; do
783 --macros=$RPM_BUILD_ROOT%{_rpmlibdir}/macros \
784 --rcfile=$RPM_BUILD_ROOT%{_rpmlibdir}/rpmrc \
785 --dbpath=${PWD}/${be} \
786 --define "_db_backend ${be}" \
788 cp -va ${be}/. $RPM_BUILD_ROOT/var/lib/rpm/
792 # Remove anything that rpm make install might put there
793 %{__rm} -rf $RPM_BUILD_ROOT%{py3_sitedir}
799 %{__rm} $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
801 # wrong location, not used anyway
802 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log}
807 rm -rf $RPM_BUILD_ROOT
810 if [ -e /var/lib/rpm/Packages ]; then
811 if [ ! -e /var/lib/rpm.rpmbackup-%{version}-%{release} ] && \
812 /bin/cp -a /var/lib/rpm /var/lib/rpm.rpmbackup-%{version}-%{release}; then
814 echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup-%{version}-%{release}"
818 echo 'If poldek aborts after migration with rpmdb error, this is expected behaviour,'
819 echo 'you should ignore it and restart poldek'
821 %{__rm} -rf /var/lib/rpm/log >/dev/null 2>/dev/null || :
822 %{__rm} -rf /var/lib/rpm/tmp >/dev/null 2>/dev/null || :
823 # Unlock database for rebuild, safe since this is posttrans
824 %{__rm} -f /var/lib/rpm/.rpm.lock >/dev/null 2>/dev/null || :
825 if ! /usr/bin/rpmdb --rebuilddb; then
827 echo "rpm database conversion failed!"
828 echo "You have to run '/usr/bin/rpmdb --rebuilddb' manually"
835 if [ -d /var/cache/hrmib ]; then
836 %{__rm} -rf /var/cache/hrmib
837 echo "HR-MIB is not supported by this rpm version."
838 echo "/var/cache/hrmib has been removed."
841 %post lib -p /sbin/ldconfig
842 %postun lib -p /sbin/ldconfig
845 find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
847 %files -f %{name}.lang
848 %defattr(644,root,root,755)
849 %doc ChangeLog CREDITS README
851 %dir /etc/pki/rpm-gpg
852 /etc/pki/rpm-gpg/PLD-3.0-Th-GPG-key.asc
854 %attr(755,root,root) /bin/rpm
855 %attr(755,root,root) %{_bindir}/rpmdb
856 %attr(755,root,root) %{_bindir}/rpmkeys
857 %attr(755,root,root) %{_bindir}/rpmquery
858 %attr(755,root,root) %{_bindir}/rpmverify
860 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
861 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
862 # this is ok to be replaced
863 %config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
865 %{_mandir}/man8/rpm.8*
866 %{_mandir}/man8/rpmdb.8*
867 %{_mandir}/man8/rpmkeys.8*
868 %{_mandir}/man8/rpm-misc.8*
869 %{?with_plugins:%{_mandir}/man8/rpm-plugins.8*}
870 %lang(fr) %{_mandir}/fr/man8/rpm.8*
871 %lang(ja) %{_mandir}/ja/man8/rpm.8*
872 %lang(ko) %{_mandir}/ko/man8/rpm.8*
873 %lang(pl) %{_mandir}/pl/man8/rpm.8*
874 %lang(ru) %{_mandir}/ru/man8/rpm.8*
875 %lang(sk) %{_mandir}/sk/man8/rpm.8*
878 %ghost %config(missingok,noreplace) /var/lib/rpm/*
879 %ghost /var/lib/rpm/.*.lock
881 %{_rpmlibdir}/rpmpopt*
884 %dir %{_rpmlibdir}/macros.d
885 %dir %{_rpmlibdir}/platform
886 %{_rpmlibdir}/platform/noarch-*
887 %ifarch %{ix86} %{x8664} x32
888 %{_rpmlibdir}/platform/athlon*
889 %{_rpmlibdir}/platform/geode*
890 %{_rpmlibdir}/platform/i?86*
891 %{_rpmlibdir}/platform/pentium*
894 %{_rpmlibdir}/platform/amd64*
895 %{_rpmlibdir}/platform/ia32e*
896 %{_rpmlibdir}/platform/x86_64*
897 %{_rpmlibdir}/platform/x32*
900 %{_rpmlibdir}/platform/alpha*
903 %{_rpmlibdir}/platform/aarch64*
906 %{_rpmlibdir}/platform/arm*
909 %{_rpmlibdir}/platform/ia64*
911 %ifarch mips mipsel mips64 mips64el
912 %{_rpmlibdir}/platform/mips*
915 %{_rpmlibdir}/platform/ppc*
917 %ifarch sparc sparc64
918 %{_rpmlibdir}/platform/sparc*
921 %dir %{_rpmlibdir}/pld
923 %attr(755,root,root) %{_rpmlibdir}/rpmdb_dump
924 %attr(755,root,root) %{_rpmlibdir}/rpmdb_load
926 # valgrind suppression file for rpm
927 %{_rpmlibdir}/rpm.supp
929 %dir /usr/lib/.build-id
932 %defattr(644,root,root,755)
933 %dir %{_sysconfdir}/rpm
934 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpm
936 %attr(755,root,root) %{_bindir}/banner.sh
937 %attr(755,root,root) %{_rpmlibdir}/user_group.sh
941 %defattr(644,root,root,755)
942 %attr(755,root,root) /%{_lib}/librpm.so.9
943 %attr(755,root,root) /%{_lib}/librpm.so.%{sover}
944 %attr(755,root,root) /%{_lib}/librpmbuild.so.9
945 %attr(755,root,root) /%{_lib}/librpmbuild.so.%{sover}
946 %attr(755,root,root) /%{_lib}/librpmio.so.9
947 %attr(755,root,root) /%{_lib}/librpmio.so.%{sover}
948 %attr(755,root,root) /%{_lib}/librpmsign.so.9
949 %attr(755,root,root) /%{_lib}/librpmsign.so.%{sover}
950 %{?with_plugins:%dir %{_libdir}/rpm-plugins}
953 %defattr(644,root,root,755)
954 %attr(755,root,root) %{_libdir}/librpm.so
955 %attr(755,root,root) %{_libdir}/librpmbuild.so
956 %attr(755,root,root) %{_libdir}/librpmio.so
957 %attr(755,root,root) %{_libdir}/librpmsign.so
959 %{_libdir}/librpmbuild.la
960 %{_libdir}/librpmio.la
961 %{_libdir}/librpmsign.la
963 %{_pkgconfigdir}/rpm.pc
966 %defattr(644,root,root,755)
967 %attr(755,root,root) %{_bindir}/rpm2archive
968 %attr(755,root,root) %{_bindir}/rpm2cpio
969 %attr(755,root,root) %{_bindir}/rpmgraph
970 %attr(755,root,root) %{_rpmlibdir}/rpm2cpio.sh
971 %attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
972 %attr(755,root,root) %{_rpmlibdir}/tgpg
973 %attr(755,root,root) %{_rpmlibdir}/debugedit
974 %attr(755,root,root) %{_rpmlibdir}/rpmdeps
975 %{_mandir}/man8/rpm2archive.8*
976 %{_mandir}/man8/rpm2cpio.8*
977 %{_mandir}/man8/rpmdeps.8*
978 %{_mandir}/man8/rpmgraph.8*
979 %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
980 %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
981 %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
982 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
983 %lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
984 %lang(ja) %{_mandir}/ja/man8/rpmgraph.8*
985 %lang(pl) %{_mandir}/pl/man8/rpmgraph.8*
988 %defattr(644,root,root,755)
989 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
990 %attr(755,root,root) %{_rpmlibdir}/brp-*
991 %attr(755,root,root) %{_rpmlibdir}/check-files
992 %attr(755,root,root) %{_rpmlibdir}/install-build-tree
993 %attr(755,root,root) %{_rpmlibdir}/elfdeps
994 %attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
995 # needs hacked pkg-config to return anything
996 %attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
997 %attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
999 %attr(755,root,root) %{_rpmlibdir}/fontconfig.prov
1000 # must be here for "Requires: rpm-*prov" to work
1001 #%{_rpmlibdir}/macros.d/cmake
1002 #%{_rpmlibdir}/macros.d/gstreamer
1003 #%{_rpmlibdir}/macros.d/libtool
1004 #%{_rpmlibdir}/macros.d/perl
1005 #%{_rpmlibdir}/macros.d/pkgconfig
1006 #%{_rpmlibdir}/macros.d/python
1007 #%{_rpmlibdir}/macros.d/selinux
1008 #%{_rpmlibdir}/macros.d/tcl
1009 #%{_rpmlibdir}/macros.rpmbuild
1011 %attr(755,root,root) %{_rpmlibdir}/check-buildroot
1012 %attr(755,root,root) %{_rpmlibdir}/check-prereqs
1013 %attr(755,root,root) %{_rpmlibdir}/check-rpaths
1014 %attr(755,root,root) %{_rpmlibdir}/check-rpaths-worker
1015 %attr(755,root,root) %{_rpmlibdir}/find-provides
1016 %attr(755,root,root) %{_rpmlibdir}/find-requires
1017 %attr(755,root,root) %{_rpmlibdir}/ocamldeps.sh
1018 %attr(755,root,root) %{_rpmlibdir}/script.req
1019 %attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
1021 %dir %{_rpmlibdir}/fileattrs
1022 %{_rpmlibdir}/fileattrs/debuginfo.attr
1023 %{_rpmlibdir}/fileattrs/desktop.attr
1024 %{_rpmlibdir}/fileattrs/elf.attr
1025 %{_rpmlibdir}/fileattrs/font.attr
1026 %{_rpmlibdir}/fileattrs/libtool.attr
1027 %{_rpmlibdir}/fileattrs/metainfo.attr
1028 %{_rpmlibdir}/fileattrs/ocaml.attr
1029 %{_rpmlibdir}/fileattrs/perl.attr
1030 %{_rpmlibdir}/fileattrs/perllib.attr
1031 %{_rpmlibdir}/fileattrs/pkgconfig.attr
1032 %{_rpmlibdir}/fileattrs/python.attr
1033 %{_rpmlibdir}/fileattrs/pythondist.attr
1034 %{_rpmlibdir}/fileattrs/script.attr
1036 %attr(755,root,root) %{_bindir}/gendiff
1037 %attr(755,root,root) %{_bindir}/rpmbuild
1038 %attr(755,root,root) %{_bindir}/rpmspec
1040 %{_mandir}/man1/gendiff.1*
1041 %lang(pl) %{_mandir}/pl/man1/gendiff.1*
1042 %{_mandir}/man8/rpmbuild.8*
1043 %lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
1044 %lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
1045 %{_mandir}/man8/rpmspec.8*
1048 %defattr(644,root,root,755)
1049 %attr(755,root,root) %{_rpmlibdir}/perl.*
1052 %defattr(644,root,root,755)
1053 %attr(755,root,root) %{_rpmlibdir}/pythondistdeps.py
1056 %files -n python3-rpm
1057 %defattr(644,root,root,755)
1058 %dir %{py3_sitedir}/rpm
1059 %attr(755,root,root) %{py3_sitedir}/rpm/*.so
1060 %{py3_sitedir}/rpm/*.py
1061 %{py3_sitedir}/rpm-%{version}-py*.egg-info
1062 %{py3_sitedir}/rpm/__pycache__
1067 %defattr(644,root,root,755)
1068 %attr(755,root,root) %{_libdir}/rpm-plugins/audit.so
1069 %{_mandir}/man8/rpm-plugin-audit.8*
1071 %files plugin-syslog
1072 %defattr(644,root,root,755)
1073 %attr(755,root,root) %{_libdir}/rpm-plugins/syslog.so
1074 %{_mandir}/man8/rpm-plugin-syslog.8*
1077 %files plugin-systemd-inhibit
1078 %defattr(644,root,root,755)
1079 %attr(755,root,root) %{_libdir}/rpm-plugins/systemd_inhibit.so
1080 %{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
1084 %defattr(644,root,root,755)
1085 %attr(755,root,root) %{_libdir}/rpm-plugins/ima.so
1086 %{_mandir}/man8/rpm-plugin-ima.8*
1088 %files plugin-prioreset
1089 %defattr(644,root,root,755)
1090 %attr(755,root,root) %{_libdir}/rpm-plugins/prioreset.so
1091 %{_mandir}/man8/rpm-plugin-prioreset.8*
1093 %files plugin-selinux
1094 %defattr(644,root,root,755)
1095 %attr(755,root,root) %{_libdir}/rpm-plugins/selinux.so
1096 %{_mandir}/man8/rpm-plugin-selinux.8*
1100 %defattr(644,root,root,755)
1101 %attr(755,root,root) %{_bindir}/rpmsign
1102 %{_mandir}/man8/rpmsign.8*
1106 %defattr(644,root,root,755)
1107 %doc doc/librpm/html/*