#
# TODO:
+# - make key infrastructure code fallback from keyutils to plain mode in case keyctl
+# returns -ENOSYS
# - add macros for some ppc, mipsel, alpha and sparc
#
# - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
%bcond_without python # don't build python bindings
%bcond_without selinux # build without selinux support
%bcond_without suggest_tags # build without Suggest tag (bootstrapping)
-%bcond_without neon # build with HTTP/WebDAV support (neon library)
+%bcond_with neon # build with HTTP/WebDAV support (neon library)
%bcond_without db # BerkeleyDB
%bcond_without sqlite # build with SQLite support
%bcond_with sqlite_dbapi # default database backend is sqlite
-%bcond_without system_lua # use system lua
+%bcond_with system_lua # use system lua
+%bcond_with keyutils # build with keyutils support
# force_cc - force using __cc other than "%{_target_cpu}-pld-linux-gcc"
# force_cxx - force using __cxx other than "%{_target_cpu}-pld-linux-g++"
# force_cpp - force using __cpp other than "%{_target_cpu}-pld-linux-gcc -E"
ERROR
%endif
+%if %{with sqlite}
+# Error: /lib64/librpmio-5.4.so: undefined symbol: sqlite3_enable_load_extension
+%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
+%endif
+
# versions of required libraries
+%define reqdb_pkg db5.3
%define reqdb_ver 5.3
%define reqpopt_ver 1.15
%define beecrypt_ver 2:4.1.2-4
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 5.4.10
-Release: 0.22
+Release: 33
License: LGPL
Group: Base
# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
Source24: rpm.noautoreqfiles
Source25: %{name}-php-requires.php
Source26: rpmdb_checkversion.c
+Source27: macros.lang
Patch0: %{name}-branch.patch
Patch1: %{name}-man_pl.patch
Patch2: %{name}-popt-aliases.patch
Patch10: %{name}-php-deps.patch
Patch11: %{name}-notsc.patch
Patch12: %{name}-hack-norpmlibdep.patch
-Patch13: %{name}-epoch0.patch
+Patch13: %{name}-dont-copy-descriptive-tags.patch
Patch14: %{name}-perl_req-INC_dirs.patch
Patch15: %{name}-debuginfo.patch
Patch16: vendor-pld.patch
Patch44: %{name}-missing-patch-file-fails-build.patch
Patch45: %{name}-remove-misleading-missing-patch-message.patch
Patch46: %{name}-file-magic-can-be-mixed-case.patch
+Patch47: %{name}-query-always-noisy.patch
+Patch48: %{name}-verify-ghosts-broken-logic.patch
+Patch49: %{name}-python-enable-compat-RPMSENSE.patch
+Patch50: %{name}-dont-treat-gstreamer-modules-as-font.patch
+Patch51: %{name}-gst-inspect-typo.patch
+Patch52: %{name}-null-term-ascii-digest.patch
+Patch53: %{name}-lua-enable-extra-libs.patch
+Patch54: %{name}-fix-filedigests-verify.patch
+Patch55: %{name}-disable-hmac-verify.patch
# Patches imported from Mandriva
Patch1038: rpm-5.4.10-support-ignore-arch-and-os-again.patch
# status: ready for merge
Patch1039: rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
+# we want that patch too, a bit of builder infrastructure relies on NOSIGNATURES
+Patch1040: rpm-5.4.9-support-signatures-and-digest-disablers.patch
+# lack insight on actual functionality, which anyways seems broken, so let's
+# disable it to avoid errors from berkeley db..
+# status: keep locally
+Patch1041: rpm-5.4.9-disable-l10ndir.patch
+# status: ready for merge
+Patch1042: rpm-5.4.9-fix-rpm_qa-pattern.patch
URL: http://rpm5.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1.4
BuildRequires: beecrypt-devel >= %{beecrypt_ver}
BuildRequires: bzip2-devel >= 1.0.2-17
-%{?with_db:BuildRequires: db-devel >= %{reqdb_ver}}
+%{?with_db:BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_ver}}
BuildRequires: elfutils-devel >= 0.108
#BuildRequires: gettext-autopoint >= 0.11.4-2
BuildRequires: gettext-devel >= 0.11.4-2
-BuildRequires: keyutils-devel
+%{?with_keyutils:BuildRequires: keyutils-devel}
BuildRequires: libmagic-devel
-%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
+%if %{with selinux}
+BuildRequires: libselinux-devel >= 2.1.0
+BuildRequires: libsepol-devel >= 2.1.0
+BuildRequires: libsemanage-devel >= 2.1.0
+%endif
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 1:1.4.2-9
# Require static library only for static build
BuildRequires: beecrypt-static >= %{beecrypt_ver}
BuildRequires: bzip2-static >= 1.0.2-17
-%{?with_db:BuildRequires: db-static >= %{reqdb_ver}}
+%{?with_db:BuildRequires: %{reqdb_pkg}-static >= %{reqdb_ver}}
BuildRequires: elfutils-static
BuildRequires: glibc-static >= 2.2.94
BuildRequires: libmagic-static
-%{?with_selinux:BuildRequires: libselinux-static >= 1.18}
+%if %{with selinux}
+BuildRequires: libselinux-static >= 2.1.0
+BuildRequires: libsepol-static >= 2.1.0
+BuildRequires: libsemanage-static >= 2.1.0
+%endif
BuildRequires: popt-static >= %{reqpopt_ver}
BuildRequires: zlib-static
%endif
Summary(pl.UTF-8): Biblioteki RPM-a
Group: Libraries
Requires: beecrypt >= %{beecrypt_ver}
-%{?with_db:Requires: db >= %{reqdb_ver}}
+%{?with_db:Requires: %{reqdb_pkg} >= %{reqdb_ver}}
Requires: libmagic >= 1.15-2
-%{?with_selinux:Requires: libselinux >= 1.18}
+%{?with_selinux:Requires: libselinux >= 2.1.0}
Requires: popt >= %{reqpopt_ver}
+%{?with_sqlite:Requires: sqlite3 >= %{sqlite_build_version}}
Obsoletes: rpm-libs
# avoid SEGV caused by mixed db versions
Conflicts: poldek < 0.18.1-16
Requires: %{name}-lib = %{version}-%{release}
Requires: beecrypt-devel >= %{beecrypt_ver}
Requires: bzip2-devel
-%{?with_db:Requires: db-devel >= %{reqdb_ver}}
+%{?with_db:Requires: %{reqdb_pkg}-devel >= %{reqdb_ver}}
Requires: elfutils-devel
-Requires: keyutils-devel
+%{?with_keyutils:Requires: keyutils-devel}
Requires: libmagic-devel
%{?with_selinux:Requires: libselinux-devel}
Requires: popt-devel >= %{reqpopt_ver}
Requires: %{name}-devel = %{version}-%{release}
Requires: beecrypt-static >= %{beecrypt_ver}
Requires: bzip2-static
-%{?with_db:Requires: db-static >= %{reqdb_ver}}
+%{?with_db:Requires: %{reqdb_pkg}-static >= %{reqdb_ver}}
Requires: elfutils-static
-Requires: keyutils-static
+%{?with_keyutils:Requires: keyutils-static}
Requires: libmagic-static
Requires: popt-static >= %{reqpopt_ver}
Requires: zlib-static
%patch44 -p1
%patch45 -p1
%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p0
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
%patch1000 -p1
%patch1001 -p1
%patch1037 -p1
%patch1038 -p1
%patch1039 -p1
+%patch1040 -p1
+%patch1041 -p1
+%patch1042 -p1
install %{SOURCE2} macros/pld.in
install %{SOURCE8} scripts/php.prov.in
CXX="%{__newcxx}" \
CPP="%{__newcpp}" \
WITH_PERL_VERSION=no \
+ __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \
--enable-shared \
--enable-static \
%{!?with_apidocs:--without-apidocs} \
%{?with_python:--with-python=%{py_ver} --with-python-lib-dir=%{py_sitedir}} \
%{!?with_python:--without-python} \
- --with%{!?with_selinux:out}-selinux \
+ --with-selinux=%{!?with_selinux:no}%{?with_selinux:external} \
+ --with-sepol=%{!?with_selinux:not}%{?with_selinux:external} \
+ --with-semanage=%{!?with_selinux:no}%{?with_selinux:external} \
--with-libelf \
--with-zlib=external \
--with-bzip2=external \
--with-dbapi=%{!?with_sqlite_dbapi:db}%{?with_sqlite_dbapi:sqlite} \
--with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \
--with-pcre=external \
- --with-keyutils=none \
+ --with-keyutils=%{?with_keyutils:external}%{!?with_keyutils:no} \
--with-uuid=%{_libdir}:%{_includedir}/ossp-uuid \
--without-path-versioned \
--with-extra-path-macros='%{_sysconfdir}/rpm/macros.d/*.macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/macros.build:~/etc/.rpmmacros:~/.rpmmacros' \
%{?with_apidocs:%{__make} apidocs}
-%{__cc} %{rpmcflags} tools/rpmdb_checkversion.c -o tools/rpmdb_checkversion -ldb
+%{__cc} %{rpmcflags} tools/rpmdb_checkversion.c -o tools/rpmdb_checkversion -ldb-%{reqdb_ver}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo
install %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros
+install %{SOURCE27} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang
install %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc
install %{SOURCE20} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov
install %{SOURCE21} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles
fi
%posttrans
-if [ -x %{_rpmlibdir}/bin/rpmdb_checkversion ] && \
- ! %{_rpmlibdir}/bin/rpmdb_checkversion -h /var/lib/rpm -d /var/lib/rpm ; then
- if [ ! -e /var/lib/rpm.rpmbackup-%{version}-%{release} ] && \
- /bin/cp -a /var/lib/rpm /var/lib/rpm.rpmbackup-%{version}-%{release} ; then
+if [ -e /var/lib/rpm/Packages ] && [ -x %{_rpmlibdir}/bin/rpmdb_checkversion ] && \
+ ! %{_rpmlibdir}/bin/rpmdb_checkversion -h /var/lib/rpm -d /var/lib/rpm; then
+ if [ ! -e /var/lib/rpm.rpmbackup-%{version}-%{release} ] && [ -x /bin/cp ] && \
+ /bin/cp -a /var/lib/rpm /var/lib/rpm.rpmbackup-%{version}-%{release}; then
echo
echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup-%{version}-%{release}"
echo
fi
if [ -x %{_rpmlibdir}/bin/dbconvert ]; then
- if ! %{_rpmlibdir}/bin/dbconvert --rebuilddb ; then
+ if ! %{_rpmlibdir}/bin/dbconvert --rebuilddb; then
echo
echo "rpm database conversion failed!"
echo "You have to run %{_rpmlibdir}/bin/dbconvert manually"
%attr(755,root,root) /bin/rpm
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
%dir %{_sysconfdir}/rpm/sysinfo
# these are ok to be replaced
%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo/*
%attr(755,root,root) %{_rpmlibdir}/bin/rpmcmp
%attr(755,root,root) %{_rpmlibdir}/bin/rpmdeps
%attr(755,root,root) %{_rpmlibdir}/bin/rpmdigest
-%attr(755,root,root) %{_rpmlibdir}/bin/rpmkey
+%if %{with selinux}
+%attr(755,root,root) %{_rpmlibdir}/bin/semodule
+%attr(755,root,root) %{_rpmlibdir}/bin/spooktool
+%endif
+%if %{without system_lua}
+%attr(755,root,root) %{_rpmlibdir}/bin/lua
+%attr(755,root,root) %{_rpmlibdir}/bin/luac
+%attr(755,root,root) %{_rpmlibdir}/bin/rpmlua
+%attr(755,root,root) %{_rpmlibdir}/bin/rpmluac
+%endif
+%{?with_keyutils:%attr(755,root,root) %{_rpmlibdir}/bin/rpmkey}
%attr(755,root,root) %{_rpmlibdir}/bin/rpmrepo
%{_mandir}/man8/rpm2cpio.8*
%{_mandir}/man8/rpmcache.8*