# - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
#
# Conditional build:
-%bcond_without apidocs # Doxygen based API documentation
-%bcond_without python3 # Python (3) bindings
-%bcond_without plugins # plugins (all, including: audit, imaevm, selinux, systemd)
-%bcond_without recommends_tags # use of Recommends tag (disable for bootstrapping)
+%bcond_with apidocs # Doxygen based API documentation
+%bcond_with python3 # Python (3) bindings
+%bcond_with plugins # plugins (all, including: audit, imaevm, selinux, systemd)
+%bcond_with recommends_tags # use of Recommends tag (disable for bootstrapping)
%bcond_with imaevm # IMA/EVM signing support (requires libimaevm from ima-evm-utils)
-%bcond_without audit # audit plugin
-%bcond_without selinux # SELinux plugin
+%bcond_with audit # audit plugin
+%bcond_with selinux # SELinux plugin
%bcond_with systemd # systemd inhibit plugin
+%bcond_with fsverity # fsverity plugin
-%define db_ver 5.3.28.0
%define popt_ver 1.15
-%define sover 9.1.3
+%define sover 9.3.0
%if "%{_rpmversion}" >= "4.12" && "%{_rpmversion}" < "5"
%define with_recommends_tags 1
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 4.16.1.3
-Release: 17
+Version: 4.17.1.1
+Release: 1
Epoch: 1
License: GPL v2 / LGPL v2.1
Group: Base
-Source0: http://ftp.rpm.org/releases/rpm-4.16.x/%{name}-%{version}.tar.bz2
-# Source0-md5: 576277fafa5d0681a8a92c8716aca5f0
+Source0: http://ftp.rpm.org/releases/rpm-4.17.x/%{name}-%{version}.tar.bz2
+# Source0-md5: 30e5806bdcb06a17cabf23d8f07b6b0f
Source1: https://ftp.tld-linux.org/TLD/TLD-Linux.asc
# Source1-md5: 5b5caff8c570489ad5bf950734546c24
Source2: macros.local
Source13: %{name}.noautoreq
Source14: %{name}.noautoreqfiles
Source15: perl.prov
+Source16: libtooldeps.sh
+Source17: libtool.attr
Patch0: %{name}-man_pl.patch
Patch1: %{name}-popt-aliases.patch
Patch2: %{name}-perl-macros.patch
Patch5: %{name}-dir-macros-relative.patch
Patch6: %{name}-perl_req-INC_dirs.patch
Patch7: %{name}-debuginfo.patch
-Patch8: %{name}-libtool-deps.patch
Patch9: %{name}-builddir-readlink.patch
Patch10: %{name}-changelog_order_check_nonfatal.patch
Patch11: %{name}-postun-nofail.patch
Patch24: cpuinfo-deps.patch
Patch25: rpmio-read-proc-files.patch
Patch26: allow-at-in-ver-rel.patch
-Patch27: no-exeonly-for-elf-reqprov.patch
Patch28: default-patch-flags.patch
Patch29: %{name}-noarch_py_prov.patch
Patch30: missing-ghost-terminate-build.patch
Patch31: missing-doc-terminate-build.patch
Patch32: noexpand.patch
-Patch33: sqlite-db-backend.patch
Patch34: skip-symlinks.patch
Patch35: pl-po.patch
Patch36: build-locale.patch
-Patch37: %{name}-pl.po-update.patch
-Patch38: no-exe-for-elf-debuginfo.patch
-Patch39: no-exe-for-elf-req.patch
-Patch40: python-3.10-abi.patch
+Patch37: no-exe-for-elf-req.patch
+Patch38: gem-in-package-builddir.patch
+Patch39: sqlite-log-crash.patch
URL: https://rpm.org/
BuildRequires: acl-devel
%{?with_audit:BuildRequires: audit-libs-devel}
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.10
BuildRequires: bzip2-devel >= 1.0.2-17
-BuildRequires: db-devel >= %{db_ver}
-%{?with_systemd:BuildRequires: dbus-devel >= 1.3}
-BuildRequires: elfutils-devel >= 0.108
+%{?with_plugins:BuildRequires: dbus-devel >= 1.3}
+BuildRequires: elfutils-devel >= 0.159
BuildRequires: gettext-tools >= 0.19.2
%{?with_imaevm:BuildRequires: ima-evm-utils-devel >= 1.0}
BuildRequires: libarchive-devel
BuildRequires: libcap-devel
-BuildRequires: libmagic-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgomp-devel >= 6:4.5
+BuildRequires: libmagic-devel
%{?with_selinux:BuildRequires: libselinux-devel >= 2.1.0}
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 1:1.4.2-9
-BuildRequires: lua-devel >= 5.2
+BuildRequires: lua-devel >= 5.3
BuildRequires: patch >= 2.2
BuildRequires: pkgconfig
BuildRequires: popt-devel >= %{popt_ver}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.750
%endif
-BuildRequires: rpm-build >= 4.6
+BuildRequires: rpm-build
BuildRequires: sqlite3-devel >= 3.22.0
BuildRequires: tcl
BuildRequires: xz-devel
-BuildRequires: zlib-devel
-BuildRequires: zstd-devel
+BuildRequires: zlib-devel >= 1.0.5
+BuildRequires: zstd-devel >= 1.3.8
%if %{with apidocs}
BuildRequires: doxygen
BuildRequires: ghostscript
Requires(posttrans): coreutils
Requires: %{name}-base = %{epoch}:%{version}-%{release}
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
-Requires: rpm-tld-macros >= 2.002
Requires: FHS >= 3.0-2
Requires: libgcrypt
Requires: popt >= %{popt_ver}
-%if %{with recommends_tags}
-Recommends: rpm-plugin-audit
-Recommends: rpm-plugin-prioreset
-Recommends: rpm-plugin-syslog
-Recommends: rpm-plugin-systemd-inhibit
-%endif
+Requires: rpm-tld-macros >= 2.002
Obsoletes: rpm-utils-perl < 1:4.15
Obsoletes: rpm-utils-static < 1:4.15
Conflicts: glibc < 2.2.92
Summary: RPMs library
Summary(pl.UTF-8): Biblioteki RPM-a
Group: Libraries
-Requires: db >= %{db_ver}
+Requires: elfutils >= 0.159
+Requires: elfutils-libelf >= 0.159
Requires: libmagic >= 1.15-2
Requires: popt >= %{popt_ver}
Requires: sqlite3-libs >= 3.22.0
+Requires: zlib >= 1.0.5
+Requires: zstd >= 1.3.8
Obsoletes: rpm-libs < 4.0.2-4
# avoid SEGV caused by mixed db versions
Conflicts: poldek < 0.18.1-16
Summary(uk.UTF-8): Хедери та бібліотеки для програм, що працюють з пакетами rpm
Group: Development/Libraries
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
+Requires: acl-devel
+%{?with_audit:Requires: audit-libs-devel}
Requires: bzip2-devel
-Requires: db-devel >= %{db_ver}
-Requires: elfutils-devel
-Requires: libmagic-devel
+Requires: elfutils-devel >= 0.159
+Requires: libcap-devel
Requires: libgcrypt-devel
+Requires: libgomp-devel >= 6:4.5
+Requires: libmagic-devel
%if %{with selinux}
Requires: libselinux-devel
Requires: libsemanage-devel
Requires: libsepol-devel
%endif
+Requires: lua-devel >= 5.3
Requires: popt-devel >= %{popt_ver}
-Requires: zlib-devel
+Requires: sqlite3-devel >= 3.22.0
+Requires: xz-devel
+Requires: zlib-devel >= 1.0.5
+Requires: zstd-devel >= 1.3.8
Obsoletes: rpm-static < 1:4.15
%description devel
Group: Applications/File
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: popt >= %{popt_ver}
-%if %{with recommends_tags}
-Recommends: bzip2
-Recommends: gzip
-%endif
Conflicts: filesystem-debuginfo < 3.0-16
%description utils
Requires(pretrans): coreutils
Requires(pretrans): findutils
Requires: %{name}-utils = %{epoch}:%{version}-%{release}
-Requires: rpm-tld-macros-build >= 1.744
Requires: /bin/id
Requires: awk
Requires: bzip2
Requires: chrpath >= 0.10-4
Requires: cpio
+Requires: debugedit
Requires: diffutils
Requires: elfutils
Requires: file >= 4.17
Requires: fileutils
Requires: findutils
+Requires: rpm-tld-macros-build >= 1.744
%ifarch athlon
Requires: gcc >= 3.0.3
%else
Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w
pakietach RPM.
-%package pythonprov
-Summary: Python macros, which simplifies creation of RPM packages with Python software
-Summary(pl.UTF-8): Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
-Group: Applications/File
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: python3
-Requires: python3-modules
-Requires: python3-setuptools
-
-%description pythonprov
-Python macros, which simplifies creation of RPM packages with Python
-software.
-
-%description pythonprov -l pl.UTF-8
-Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w
-Pythonie.
-
%package -n python3-rpm
Summary: Python 3 interface to RPM library
Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki RPM-a
signatures in an rpm.
%description plugin-ima -l pl.UTF-8
-Ta wtyczka dodaje obsługę wymuszania i weryfikacji podpisów plików
-IMA w RPM-ie.
+Ta wtyczka dodaje obsługę wymuszania i weryfikacji podpisów plików IMA
+w RPM-ie.
%package plugin-prioreset
Summary: Plugin for resetting scriptlet priorities for SysV init
%description plugin-selinux -l pl.UTF-8
Wtyczka do funkcjonalności SELinux.
+%package plugin-fsverity
+Summary: Plugin for fsverity file signatures
+Summary(pl.UTF-8): Wtyczka do sygnatur plików fsverity
+Group: Base
+Requires: %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-fsverity
+Plugin for fsverity file signatures.
+
+%description plugin-fsverity -l pl.UTF-8
+Wtyczka do sygnatur plików fsverity.
+
+%package plugin-fapolicyd
+Summary: Plugin for fapolicyd support
+Summary(pl.UTF-8): Wtyczka do obsługi fapolicyd
+Group: Base
+Requires: %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-fapolicyd
+Plugin for fapolicyd support.
+
+See https://people.redhat.com/sgrubb/fapolicyd/ for information about
+the fapolicyd daemon.
+
+%description plugin-fapolicyd -l pl.UTF-8
+Wtyczka do obsługi fapolicyd.
+
+Informacje na temat demona fapolicyd można znaleźć pod adresem
+<https://people.redhat.com/sgrubb/fapolicyd/>.
+
+%package plugin-dbus-announce
+Summary: Plugin for announcing transactions on the DBUS
+Summary(pl.UTF-8): Wtyczka ogłaszająca transakcje przez DBUS
+Group: Base
+Requires: %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-dbus-announce
+The plugin announces basic information about rpm transactions to the
+system DBUS - like packages installed or removed. Other programs can
+subscribe to the signals to get notified when packages on the system
+change.
+
+%description plugin-dbus-announce -l pl.UTF-8
+Ta wtyczka ogłasza przez podstawowe szynę systemową DBUS informacje o
+transakcjach RPM-a, takie jak pakiety, które są instalowane lub
+usuwane. Inne programy mogą zasubskrybować sygnały powiadamiające o
+zmianach w pakietach systemowych.
+
%package sign
Summary: Package signing support
Summary(pl.UTF-8): Obsługa podpisywania pakietów
%patch5 -p1
%patch6 -p0
%patch7 -p1
-%patch8 -p1
-%patch9 -p1
+#%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
-%patch27 -p1
%patch28 -p1
-%patch29 -p1
+#%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
-%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
-%patch40 -p1
%{__rm} po/*.gmo
# generate Group translations to *.po
awk -f %{SOURCE6} %{SOURCE5}
-%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' scripts/pythondistdeps.py
-
%build
%{__libtoolize}
%{__aclocal}
WITH_PERL_VERSION=no \
__GST_INSPECT=%{_bindir}/gst-inspect-1.0 \
__GPG=%{_bindir}/gpg \
- --enable-bdb \
--enable-bdb-ro \
--enable-ndb \
%{!?with_plugins:--disable-plugins} \
--with-archive \
--with-audit%{!?with_audit:=no} \
--with-cap \
+ --with-fapolicyd \
%{?with_imaevm:--with-imaevm} \
- --with-lua \
%{?with_python3:--enable-python} \
--with-selinux%{!?with_selinux:=no} \
--with-vendor=tld
cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq
cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles
+cp -p %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/libtooldeps.sh
+cp -p %{SOURCE17} $RPM_BUILD_ROOT%{_rpmlibdir}/fileattrs/libtool.attr
+
# move rpm to /bin
%{__mv} $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
ln -sf /bin/rpm $RPM_BUILD_ROOT%{_bindir}/rpmquery
cd ..
%endif
+%if %{with plugins}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
+%endif
# wrong location, not used anyway
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log}
%attr(755,root,root) %{_bindir}/rpm2cpio
%attr(755,root,root) %{_bindir}/rpmgraph
%attr(755,root,root) %{_rpmlibdir}/rpm2cpio.sh
-%attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
%attr(755,root,root) %{_rpmlibdir}/tgpg
-%attr(755,root,root) %{_rpmlibdir}/debugedit
%attr(755,root,root) %{_rpmlibdir}/rpmdeps
%{_mandir}/man8/rpm2archive.8*
%{_mandir}/man8/rpm2cpio.8*
# needs hacked pkg-config to return anything
%attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
-
%attr(755,root,root) %{_rpmlibdir}/fontconfig.prov
-# must be here for "Requires: rpm-*prov" to work
-#%{_rpmlibdir}/macros.d/cmake
-#%{_rpmlibdir}/macros.d/gstreamer
-#%{_rpmlibdir}/macros.d/libtool
-#%{_rpmlibdir}/macros.d/perl
-#%{_rpmlibdir}/macros.d/pkgconfig
-#%{_rpmlibdir}/macros.d/python
-#%{_rpmlibdir}/macros.d/selinux
-#%{_rpmlibdir}/macros.d/tcl
-#%{_rpmlibdir}/macros.rpmbuild
-
%attr(755,root,root) %{_rpmlibdir}/check-buildroot
%attr(755,root,root) %{_rpmlibdir}/check-prereqs
%attr(755,root,root) %{_rpmlibdir}/check-rpaths
%attr(755,root,root) %{_rpmlibdir}/find-requires
%attr(755,root,root) %{_rpmlibdir}/ocamldeps.sh
%attr(755,root,root) %{_rpmlibdir}/script.req
-%attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
%dir %{_rpmlibdir}/fileattrs
%{_rpmlibdir}/fileattrs/debuginfo.attr
%{_rpmlibdir}/fileattrs/libtool.attr
%{_rpmlibdir}/fileattrs/metainfo.attr
%{_rpmlibdir}/fileattrs/ocaml.attr
-%{_rpmlibdir}/fileattrs/perl.attr
-%{_rpmlibdir}/fileattrs/perllib.attr
%{_rpmlibdir}/fileattrs/pkgconfig.attr
-%{_rpmlibdir}/fileattrs/python.attr
-%{_rpmlibdir}/fileattrs/pythondist.attr
%{_rpmlibdir}/fileattrs/script.attr
%attr(755,root,root) %{_bindir}/gendiff
%files perlprov
%defattr(644,root,root,755)
+%{_rpmlibdir}/fileattrs/perl.attr
+%{_rpmlibdir}/fileattrs/perllib.attr
%attr(755,root,root) %{_rpmlibdir}/perl.*
-%files pythonprov
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_rpmlibdir}/pythondistdeps.py
-
%if %{with python3}
%files -n python3-rpm
%defattr(644,root,root,755)
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/selinux.so
%{_mandir}/man8/rpm-plugin-selinux.8*
+
+%if %{with fsverity}
+%files plugin-fsverity
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/fsverity.so
+%endif
+
+%files plugin-fapolicyd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/fapolicyd.so
+%{_mandir}/man8/rpm-plugin-fapolicyd.8*
+
+%if %{with systemd}
+%files plugin-dbus-announce
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/rpm-plugins/dbus_announce.so
+%{_mandir}/man8/rpm-plugin-dbus-announce.8*
+%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
+%endif
%endif
%files sign
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc doc/librpm/html/*
+%doc docs/librpm/html/*
%endif