X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.spec;h=efdb5a17c3d9e483897f419cafe87253ef79156e;hb=5384be47dcba1b150938c72d7e06f16ee123d973;hp=2a5d35681d020a21dfb69e434ab3cff7440f3d60;hpb=001298417a81dc8620666bf5ea03cff38f137b45;p=packages%2Frpm.git diff --git a/rpm.spec b/rpm.spec index 2a5d356..efdb5a1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,5 +1,7 @@ # # 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 @@ -10,11 +12,12 @@ %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" @@ -28,7 +31,13 @@ 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 @@ -43,7 +52,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 5.4.10 -Release: 0.23 +Release: 33 License: LGPL Group: Base # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm @@ -79,6 +88,7 @@ Source23: rpm.noautoreqdep 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 @@ -92,7 +102,7 @@ Patch9: %{name}-lua.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 @@ -126,6 +136,15 @@ Patch43: %{name}-fix-___build_pre-macro.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 @@ -229,19 +248,31 @@ Patch1037: rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch 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 @@ -270,11 +301,15 @@ BuildRequires: tetex-pdftex # 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 @@ -386,10 +421,11 @@ Summary: RPMs library 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 @@ -412,9 +448,9 @@ Group: Development/Libraries 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} @@ -476,9 +512,9 @@ Group: Development/Libraries 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 @@ -795,6 +831,15 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %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 @@ -836,6 +881,9 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %patch1037 -p1 %patch1038 -p1 %patch1039 -p1 +%patch1040 -p1 +%patch1041 -p1 +%patch1042 -p1 install %{SOURCE2} macros/pld.in install %{SOURCE8} scripts/php.prov.in @@ -871,12 +919,15 @@ sed -i \ 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 \ @@ -891,7 +942,7 @@ sed -i \ --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' \ @@ -905,7 +956,7 @@ sed -i \ %{?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 @@ -1053,6 +1104,7 @@ install %{SOURCE15} $RPM_BUILD_ROOT%{_bindir}/banner.sh 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 @@ -1121,16 +1173,16 @@ if [ -f %{_sysconfdir}/rpm/sysinfo ]; then 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" @@ -1158,6 +1210,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %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/* @@ -1255,7 +1308,17 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %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*