From: Marcin Krol Date: Fri, 19 Mar 2021 18:37:41 +0000 (+0100) Subject: - merged PLD changes X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=4cf20262cb68eff34303fc34d24eeda89678c59b;p=packages%2Frpm.git - merged PLD changes --- diff --git a/rpm.spec b/rpm.spec index 4ce9d40..d3ba0ad 100644 --- a/rpm.spec +++ b/rpm.spec @@ -3,11 +3,14 @@ # - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985 # # Conditional build: -%bcond_without apidocs # don't generate documentation with doxygen -%bcond_without python3 # don't build python bindings -%bcond_without plugins # build plugins -%bcond_without recommends_tags # build without Recommends tag (bootstrapping) -%bcond_with imaevm # build with IMA/EVM support (requires libimaevm from ima-evm-utils) +%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 imaevm # IMA/EVM signing support (requires libimaevm from ima-evm-utils) +%bcond_without audit # audit plugin +%bcond_without selinux # SELinux plugin +%bcond_with systemd # systemd inhibit plugin %define db_ver 5.3.28.0 %define popt_ver 1.15 @@ -17,6 +20,11 @@ %define with_recommends_tags 1 %endif +%if %{without plugins} +%undefine with_audit +%undefine with_selinux +%undefine with_systemd +%endif Summary: RPM Package Manager Summary(de.UTF-8): RPM Packet-Manager Summary(es.UTF-8): Gestor de paquetes RPM @@ -26,7 +34,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 4.16.1.2 -Release: 6 +Release: 8 Epoch: 1 License: GPL v2 / LGPL v2.1 Group: Base @@ -84,37 +92,37 @@ Patch33: sqlite-db-backend.patch Patch34: skip-symlinks.patch Patch35: pl-po.patch Patch36: build-locale.patch -Patch100: build-id-links.patch URL: https://rpm.org/ BuildRequires: acl-devel -BuildRequires: db-devel >= %{db_ver} +%{?with_audit:BuildRequires: audit-libs-devel} BuildRequires: autoconf >= 2.63 -BuildRequires: automake >= 1.4 +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 BuildRequires: gettext-tools >= 0.19.2 BuildRequires: libarchive-devel BuildRequires: libcap-devel BuildRequires: libmagic-devel BuildRequires: libgcrypt-devel -%if %{with plugins} -BuildRequires: audit-libs-devel -BuildRequires: dbus-devel +BuildRequires: libgomp-devel >= 6:4.5 %{?with_imaevm:BuildRequires: libimaevm-devel >= 1.0} -BuildRequires: libselinux-devel >= 2.1.0 -%endif +%{?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: patch >= 2.2 -BuildRequires: pkgconfig(lua) >= 5.1 +BuildRequires: pkgconfig BuildRequires: popt-devel >= %{popt_ver} -BuildRequires: python3-modules +BuildRequires: python3-modules >= 1:3.2 %if %{with python3} -BuildRequires: python3-devel +BuildRequires: python3-devel >= 1:3.2 BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.750 %endif +BuildRequires: rpm-build >= 4.6 BuildRequires: sqlite3-devel >= 3.22.0 BuildRequires: tcl BuildRequires: xz-devel @@ -137,9 +145,10 @@ Requires: popt >= %{popt_ver} Recommends: rpm-plugin-audit Recommends: rpm-plugin-prioreset Recommends: rpm-plugin-syslog +Recommends: rpm-plugin-systemd-inhibit %endif -Obsoletes: rpm-utils-perl -Obsoletes: rpm-utils-static +Obsoletes: rpm-utils-perl < 1:4.15 +Obsoletes: rpm-utils-static < 1:4.15 Conflicts: glibc < 2.2.92 # db4.6 poldek needed Conflicts: poldek < 0.21-0.20070703.00.3 @@ -212,8 +221,8 @@ Summary: RPM base package - scripts used by rpm packages themselves Summary(pl.UTF-8): Podstawowy pakiet RPM - skrypty używane przez same pakiety rpm Group: Base Requires: filesystem -Obsoletes: rpm-scripts -Obsoletes: vserver-rpm +Obsoletes: rpm-scripts < 4.4 +Obsoletes: vserver-rpm < 1 %description base The RPM base package contains scripts used by rpm packages themselves. @@ -235,7 +244,8 @@ Group: Libraries Requires: db >= %{db_ver} Requires: libmagic >= 1.15-2 Requires: popt >= %{popt_ver} -Obsoletes: rpm-libs +Requires: sqlite3-libs >= 3.22.0 +Obsoletes: rpm-libs < 4.0.2-4 # avoid SEGV caused by mixed db versions Conflicts: poldek < 0.18.1-16 @@ -446,7 +456,7 @@ Group: Development/Languages/Python Requires: %{name} = %{epoch}:%{version}-%{release} Requires: python3 Obsoletes: python-rpm < 1:4.16.0 -Obsoletes: rpm-python +Obsoletes: rpm-python < 4.0.2-50 %description -n python3-rpm The python3-rpm package contains a module which permits applications @@ -474,22 +484,47 @@ Python 3 para manipular pacotes e bancos de dados RPM. %package plugin-audit Summary: Plugin for logging audit events on package operations +Summary(pl.UTF-8): Wtyczka do logowania zdarzeń audytowych przy operacjach na pakietach Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} %description plugin-audit -Plugin for libaudit support +Plugin for libaudit support. + +%description plugin-audit -l pl.UTF-8 +Wtyczka do obsługi libaudit. %package plugin-syslog Summary: Plugin for syslog functionality +Summary(pl.UTF-8): Wtyczka do funkcjonalności sysloga Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} %description plugin-syslog This plugin exports RPM actions to the system log. +%description plugin-syslog -l pl.UTF-8 +Ta wtyczka eksportuje akcje RPM-a do logu systemowego. + +%package plugin-systemd-inhibit +Summary: Plugin for systemd inhibit functionality +Summary(pl.UTF-8): Wtyczka do funkcjonalności systemd inhibit +Group: Base +Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Requires: dbus >= 1.3 + +%description plugin-systemd-inhibit +This plugin blocks systemd from entering idle, sleep or shutdown while +an rpm transaction is running using the systemd-inhibit mechanism. + +%description plugin-systemd-inhibit -l pl.UTF-8 +Ta wtyczka blokuje systemd przed wejściem w stan bezczynności (idle), +uśpienia (sleep) lub zamykania (shutdown) podczas trwania transakcji +RPM-a, korzystając z mechanizmu systemd-inhibit. + %package plugin-ima Summary: Plugin for IMA file signatures +Summary(pl.UTF-8): Wtyczka do sygnatur plików IMA Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -497,17 +532,29 @@ Requires: %{name}-lib = %{epoch}:%{version}-%{release} This plugin adds support for enforcing and verifying IMA file 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. + %package plugin-prioreset Summary: Plugin for resetting scriptlet priorities for SysV init +Summary(pl.UTF-8): Wtyczka do resetowania priorytetu skryptletów przy inicie SysV Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} %description plugin-prioreset This plugin is useful on legacy SysV init systems if you run rpm -transactions with nice/ionice priorities. +transactions with nice/ionice priorities. Should not be used on +systemd systems. + +%description plugin-prioreset -l pl.UTF-8 +Ta wtyczka jest przydatna w systemach ze starym procesem init w wersji +SysV, jeżeli transakcje RPM-a są uruchamiane z priorytetami +nice/ionice. Nie powinna być używana w systemach z systemd. %package plugin-selinux Summary: Plugin for SELinux functionality +Summary(pl.UTF-8): Wtyczka do funkcjonalności SELinux Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires: libselinux >= 2.1.0 @@ -515,14 +562,21 @@ Requires: libselinux >= 2.1.0 %description plugin-selinux Plugin for SELinux functionality. +%description plugin-selinux -l pl.UTF-8 +Wtyczka do funkcjonalności SELinux. + %package sign Summary: Package signing support +Summary(pl.UTF-8): Obsługa podpisywania pakietów Group: Base Requires: %{name}-lib = %{epoch}:%{version}-%{release} %description sign This package contains support for digitally signing RPM packages. +%description sign -l pl.UTF-8 +Ten pakiet zawiera obsługę cyfrowego podpisywania pakietów RPM. + %package apidocs Summary: RPM API documentation and guides Summary(pl.UTF-8): Documentacja API RPM-a i przewodniki @@ -575,13 +629,12 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %patch34 -p1 %patch35 -p1 %patch36 -p1 -%patch100 -p1 %{__rm} po/*.gmo install %{SOURCE15} scripts/perl.prov.in -%{__mv} -f scripts/perl.req{,.in} +%{__mv} scripts/perl.req{,.in} # generate Group translations to *.po awk -f %{SOURCE6} %{SOURCE5} @@ -596,36 +649,33 @@ awk -f %{SOURCE6} %{SOURCE5} %{__automake} # rpm checks for CPU type at runtime, but it looks better -sed -i \ +%{__sed} -i \ -e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \ -e 's|@host_cpu@|%{_target_cpu}|' \ -e 's|@host_os@|%{_target_os}|' \ macros.in %configure \ + PYTHON=python3 \ WITH_PERL_VERSION=no \ __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \ __GPG=%{_bindir}/gpg \ -%if %{with python3} - PYTHON=python3 \ - --enable-python \ -%endif - --disable-inhibit-plugin \ - --disable-silent-rules \ - --enable-shared \ --enable-bdb \ --enable-bdb-ro \ --enable-ndb \ + %{!?with_plugins:--disable-plugins} \ + %{!?with_systemd:--disable-inhibit-plugin} \ + --disable-silent-rules \ --enable-sqlite \ --enable-zstd \ - --with-lua \ - %{?with_imaevm:--with-imaevm} \ - --with-cap \ --with-acl \ - --with-audit \ --with-archive \ - --with-selinux=%{!?with_plugins:no}%{?with_plugins:yes} \ - %{!?with_plugins:--disable-plugins} \ + --with-audit%{!?with_audit:=no} \ + --with-cap \ + %{?with_imaevm:--with-imaevm} \ + --with-lua \ + %{?with_python3:--enable-python} \ + --with-selinux%{!?with_selinux:=no} \ --with-vendor=tld %{__make} @@ -650,48 +700,48 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/TLD-Linux.asc # cleanup %ifnarch %{ix86} %{x8664} x32 -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/geode-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i386-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i486-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i586-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i686-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium3-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium4-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/geode-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i386-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i486-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i586-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/i686-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium3-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/pentium4-linux/macros %endif %ifnarch %{x8664} x32 -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/amd64-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia32e-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x32-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/amd64-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia32e-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x32-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros %endif %ifnarch %{ppc} -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/m68k-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc32dy4-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8260-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8560-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/m68k-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc32dy4-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc64*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8260-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc8560-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ppc*series-linux/macros %endif %ifnarch aarch64 -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/aarch64-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/aarch64-linux/macros %endif %ifnarch %{arm} -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/arm*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/arm*-linux/macros %endif -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/alpha*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia64-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/mips*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/riscv64-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros -rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/alpha*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia64-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/mips*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/riscv64-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros +%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform %ifarch x32 @@ -783,6 +833,13 @@ if [ -e /var/lib/rpm/Packages ]; then fi fi +%post +if [ -d /var/cache/hrmib ]; then + %{__rm} -rf /var/cache/hrmib + echo "HR-MIB is not supported by this rpm version." + echo "/var/cache/hrmib has been removed." +fi + %post lib -p /sbin/ldconfig %postun lib -p /sbin/ldconfig @@ -900,9 +957,12 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %attr(755,root,root) %{_libdir}/librpmbuild.so %attr(755,root,root) %{_libdir}/librpmio.so %attr(755,root,root) %{_libdir}/librpmsign.so -%{_libdir}/librpm*.la +%{_libdir}/librpm.la +%{_libdir}/librpmbuild.la +%{_libdir}/librpmio.la +%{_libdir}/librpmsign.la %{_includedir}/rpm -%{_pkgconfigdir}/*.pc +%{_pkgconfigdir}/rpm.pc %files utils %defattr(644,root,root,755) @@ -1015,6 +1075,13 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %attr(755,root,root) %{_libdir}/rpm-plugins/syslog.so %{_mandir}/man8/rpm-plugin-syslog.8* +%if %{with systemd} +%files plugin-systemd-inhibit +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/rpm-plugins/systemd_inhibit.so +%{_mandir}/man8/rpm-plugin-systemd-inhibit.8* +%endif + %files plugin-ima %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/rpm-plugins/ima.so