]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
Merge branch 'master' into db52
[packages/rpm.git] / rpm.spec
index 7f18ab293b0c735036a1300b66d479ff49b5eed6..6fd5363990152d8644476954bc5007fd6ecd5d9e 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
 %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++"
@@ -37,7 +37,8 @@ ERROR
 %endif
 
 # versions of required libraries
-%define                reqdb_ver       5.3
+%define                reqdb_pkg       db5.2
+%define                reqdb_ver       5.2
 %define                reqpopt_ver     1.15
 %define                beecrypt_ver    2:4.1.2-4
 %define                sover           5.4
@@ -51,7 +52,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.10
-Release:       12
+Release:       35
 License:       LGPL
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
@@ -87,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
@@ -100,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
@@ -113,7 +115,7 @@ Patch22:    %{name}-sparc64.patch
 Patch23:       %{name}-gendiff.patch
 Patch24:       openmp.patch
 Patch25:       %{name}-URPM-build-fix.patch
-Patch26:       %{name}-db5.3.patch
+Patch26:       %{name}-db5.2.patch
 Patch27:       %{name}-helperEVR-noassert.patch
 Patch28:       %{name}-unglobal.patch
 Patch29:       %{name}-builddir-readlink.patch
@@ -134,11 +136,16 @@ 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-file-always-noisy.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
+Patch56:       rpm-macros.patch
 
 # Patches imported from Mandriva
 
@@ -244,19 +251,29 @@ Patch1038:        rpm-5.4.10-support-ignore-arch-and-os-again.patch
 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
 %{?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
@@ -285,11 +302,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
@@ -401,9 +422,9 @@ 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
@@ -428,7 +449,7 @@ 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
 %{?with_keyutils:Requires:     keyutils-devel}
 Requires:      libmagic-devel
@@ -492,7 +513,7 @@ 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
 %{?with_keyutils:Requires:     keyutils-static}
 Requires:      libmagic-static
@@ -610,10 +631,11 @@ Requires: grep
 Requires:      gzip
 Requires:      make
 Requires:      patch
-Requires:      sed
+Requires:      sed >= 4.0
 Requires:      sh-utils
-Requires:      tar
+Requires:      tar >= 1:1.22
 Requires:      textutils
+Requires:      xz
 Provides:      rpmbuild(monoautodeps)
 Provides:      rpmbuild(noauto) = 3
 %ifarch %{x8664}
@@ -805,7 +827,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch38 -p1
 %patch39 -p1
 %patch40 -p1
-%patch41 -p1
+#patch41 -p1
 %patch42 -p1
 %patch43 -p1
 %patch44 -p1
@@ -816,6 +838,11 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch49 -p1
 %patch50 -p1
 %patch51 -p1
+%patch52 -p0
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+%patch56 -p1
 
 %patch1000 -p1
 %patch1001 -p1
@@ -858,6 +885,8 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch1038 -p1
 %patch1039 -p1
 %patch1040 -p1
+%patch1041 -p1
+%patch1042 -p1
 
 install %{SOURCE2} macros/pld.in
 install %{SOURCE8} scripts/php.prov.in
@@ -899,7 +928,9 @@ sed -i \
        %{!?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 \
@@ -917,7 +948,7 @@ sed -i \
        --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-path-macros='%{_rpmlibdir}/macros:%{_rpmlibdir}/%{_target}/macros:%{_rpmlibdir}/macros.d/pld:%{_rpmlibdir}/macros.build:%{_sysconfdir}/rpm/macros.*:%{_sysconfdir}/rpm/macros:%{_sysconfdir}/rpm/%{_target}/macros:%{_sysconfdir}/rpm/macros.d/*.macros:~/etc/.rpmmacros:~/.rpmmacros' \
        --with-bugreport="http://bugs.pld-linux.org/" \
        --with-vendor=pld
 
@@ -928,7 +959,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
@@ -1076,6 +1107,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
@@ -1144,16 +1176,19 @@ 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
+
+       echo 'If poldek aborts after migration with rpmdb error, this is "normal", you should ignore it'
+
        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"
@@ -1181,6 +1216,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/*
@@ -1278,6 +1314,16 @@ 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
+%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*
This page took 0.054418 seconds and 4 git commands to generate.