#
# Conditional build:
%bcond_without apidocs # don't generate documentation with doxygen
-%bcond_without python2 # don't build python bindings
+%bcond_with python2 # don't build python bindings
%bcond_without python3 # don't build python bindings
%bcond_without plugins # build plugins
%bcond_without recommends_tags # build without Recommends tag (bootstrapping)
%define db_ver 5.3.28.0
%define popt_ver 1.15
%define openssl_ver 1.1.1d
-%define sover 9.0.1
+%define sover 9.1.0
Summary: RPM Package Manager
Summary(de.UTF-8): RPM Packet-Manager
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 4.15.1
+Version: 4.16.0
Release: 0.1
Epoch: 1
License: GPL v2 / LGPL v2.1
Group: Base
-Source0: http://ftp.rpm.org/releases/rpm-4.15.x/%{name}-%{version}.tar.bz2
-# Source0-md5: ed72147451a5ed93b2a48e2f8f5413c3
+Source0: http://ftp.rpm.org/releases/rpm-4.16.x/%{name}-%{version}.tar.bz2
+# Source0-md5: 434e166a812e35ef181f6dd176326920
Source1: ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
# Source1-md5: 23914bb49fafe7153cee87126d966461
Source2: macros.local
Patch16: %{name}-add-compress-doc.patch
Patch17: rpm5-db-compat.patch
Patch18: python-internal-build.patch
-Patch19: create-build-tree-after-parse.patch
URL: https://rpm.org/
BuildRequires: db-devel >= %{db_ver}
BuildRequires: autoconf >= 2.63
BuildRequires: patch >= 2.2
BuildRequires: popt-devel >= %{popt_ver}
%{?with_python2:BuildRequires: python-devel >= 1:2.3}
-%{?with_python3:BuildRequires: python3-devel}
BuildRequires: python-modules >= 1:2.3
+%{?with_python3:BuildRequires: python3-devel}
%if %{with python2} || %{with python3}
BuildRequires: rpm-pythonprov
%endif
Summary(uk.UTF-8): Хедери та бібліотеки для програм, що працюють з пакетами rpm
Group: Development/Libraries
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
-Requires: db-devel >= %{db_ver}
Requires: bzip2-devel
+Requires: db-devel >= %{db_ver}
Requires: elfutils-devel
Requires: libmagic-devel
Requires: openssl-devel >= %{openssl_ver}
%description -n python3-rpm -l pl.UTF-8
Pakiet python3-rpm zawiera moduł, który pozwala aplikacjom napisanym w
-Pythonie 3 na używanie interfejsu dostarczanego przez biblioteki RPM-a.
+Pythonie 3 na używanie interfejsu dostarczanego przez biblioteki
+RPM-a.
Pakiet ten powinien zostać zainstalowany, jeśli chcesz pisać w
Pythonie 3 programy manipulujące pakietami i bazami danych rpm.
%package plugin-audit
Summary: Plugin for logging audit events on package operations
-Group: System/Base
+Group: Base
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
%description plugin-audit
%package plugin-syslog
Summary: Plugin for syslog functionality
-Group: System/Base
+Group: Base
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
%description plugin-syslog
%package plugin-systemd-inhibit
Summary: Plugin for systemd inhibit functionality
-Group: System/Base
+Group: Base
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
%description plugin-systemd-inhibit
%patch16 -p1
%patch17 -p1
%patch18 -p1
-%patch19 -p1
install %{SOURCE16} scripts/perl.prov.in
install %{SOURCE17} tools/rpmdb_checkversion.c
install %{SOURCE18} tools/rpmdb_reset.c
-%{__sed} -i -e '1s,/usr/bin/python,%{__python},' scripts/pythondistdeps.py
+%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' scripts/pythondistdeps.py
%build
%{__libtoolize}
%{_mandir}/man8/rpmdb.8*
%{_mandir}/man8/rpmkeys.8*
%{_mandir}/man8/rpm-misc.8*
+%{?with_plugins:%{_mandir}/man8/rpm-plugins.8*}
%lang(fr) %{_mandir}/fr/man8/rpm.8*
%lang(ja) %{_mandir}/ja/man8/rpm.8*
%lang(ko) %{_mandir}/ko/man8/rpm.8*
%attr(755,root,root) %{_rpmlibdir}/dbupgrade.sh
%attr(755,root,root) %{_rpmlibdir}/rpmdb_checkversion
%attr(755,root,root) %{_rpmlibdir}/rpmdb_reset
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_dump
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_load
# valgrind suppression file for rpm
%{_rpmlibdir}/rpm.supp
%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}/rpmdb_loadcvt
%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*
%{_mandir}/man8/rpmdeps.8*
%{_mandir}/man8/rpmgraph.8*
%attr(755,root,root) %{_rpmlibdir}/check-prereqs
%attr(755,root,root) %{_rpmlibdir}/check-rpaths
%attr(755,root,root) %{_rpmlibdir}/check-rpaths-worker
-%attr(755,root,root) %{_rpmlibdir}/debuginfo.prov
-%attr(755,root,root) %{_rpmlibdir}/desktop-file.prov
%attr(755,root,root) %{_rpmlibdir}/find-provides
%attr(755,root,root) %{_rpmlibdir}/find-requires
-%attr(755,root,root) %{_rpmlibdir}/metainfo.prov
-%attr(755,root,root) %{_rpmlibdir}/ocaml-find-provides.sh
-%attr(755,root,root) %{_rpmlibdir}/ocaml-find-requires.sh
+%attr(755,root,root) %{_rpmlibdir}/ocamldeps.sh
%attr(755,root,root) %{_rpmlibdir}/script.req
%attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
-# Fedora has this in -build, but shouldn't this be in -devel?
-%attr(755,root,root) %{_rpmlibdir}/config.guess
-%attr(755,root,root) %{_rpmlibdir}/config.sub
%dir %{_rpmlibdir}/fileattrs
%{_rpmlibdir}/fileattrs/debuginfo.attr
%files pythonprov
%defattr(644,root,root,755)
-%attr(755,root,root) %{_rpmlibdir}/pythondeps.sh
+#%attr(755,root,root) %{_rpmlibdir}/pythondeps.sh
%attr(755,root,root) %{_rpmlibdir}/pythondistdeps.py
%if %{with python2}
%files plugin-audit
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/audit.so
+%{_mandir}/man8/rpm-plugin-audit.8*
%files plugin-syslog
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/syslog.so
+%{_mandir}/man8/rpm-plugin-syslog.8*
%files plugin-systemd-inhibit
%defattr(644,root,root,755)
%files plugin-ima
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/ima.so
+%{_mandir}/man8/rpm-plugin-ima.8*
%files plugin-prioreset
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/prioreset.so
+%{_mandir}/man8/rpm-plugin-prioreset.8*
%files plugin-selinux
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/rpm-plugins/selinux.so
+%{_mandir}/man8/rpm-plugin-selinux.8*
%endif
%files sign
return marker;
}
---- rpm-4.15.1/fileattrs/python.attr~ 2019-06-26 23:17:31.000000000 +0900
-+++ rpm-4.15.1/fileattrs/python.attr 2020-01-04 23:33:40.929651751 +0900
-@@ -1,4 +1,4 @@
- %__python_provides %{_rpmconfigdir}/pythondeps.sh --provides
- %__python_requires %{_rpmconfigdir}/pythondeps.sh --requires
--%__python_path ((/lib(64)?/python[[:digit:]]\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(^%{_bindir}/python[[:digit:]]\\.[[:digit:]]+))$
-+%__python_path ((/lib(64|x32)?/python[[:digit:]]\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(^%{_bindir}/python[[:digit:]]\\.[[:digit:]]+))$
- %__python_magic [Pp]ython.*(executable|byte-compiled)
--- rpm-4.15.1/fileattrs/pythondist.attr~ 2019-06-26 23:17:31.000000000 +0900
+++ rpm-4.15.1/fileattrs/pythondist.attr 2020-01-04 23:34:05.680366882 +0900
@@ -1,3 +1,3 @@
%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
-%__pythondist_path /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
+%__pythondist_path /lib(64|x32)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
+--- rpm-4.16.0/fileattrs/python.attr.orig 2020-08-31 11:14:07.991087349 +0200
++++ rpm-4.16.0/fileattrs/python.attr 2020-10-03 10:47:16.560360859 +0200
+@@ -14,14 +14,15 @@
+ %__python_requires() %{lua:
+ -- Match buildroot paths of the form
+ -- /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and
+- -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
++ -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ and
++ -- /PATH/OF/BUILDROOT/usr/libx32/pythonMAJOR.MINOR/
+ -- generating a line of the form:
+ -- python(abi) = MAJOR.MINOR
+ local path = rpm.expand('%1')
+- if path:match('/usr/lib%d*/python%d+%.%d+/.*') then
+- local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1')
++ if path:match('/usr/lib%w*/python%d+%.%d+/.*') then
++ local requires = path:gsub('.*/usr/lib%w*/python(%d+%.%d+)/.*', 'python(abi) = %1')
+ print(requires)
+ end
+ }
+
+-%__python_path ^((%{_prefix}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$
++%__python_path ^((%{_prefix}/lib(64|x32)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$