#
# TODO:
+# - check if glob() patch needs resurrecting/rewriting
# - check if we want shell autodeps: Requires: executable(ln) executable(mv)
-# - %{_arch} = i686 not as used to be i386:
+# - %{_arch} = i686 not as used to be i386 (platform file thing?):
# 5.0.2: rpm -E '%_target_base_arch %_arch'
# i386 i686
# 4.4.9: rpm -E '%_target_base_arch %_arch'
# i386 i386
# - python(abi) cap is not provided automatically because /usr/lib*/libpython2*.so.*
# matches ELF first
-# - rpmbuild computes digest when writing package to temporary file, then adds a few
-# tags (incl. digest) and writes whole package to destination file;
-# repackaging uses unchanged "immutable header" image from original rpm, also
-# preserving payload format and compressor from original rpm, _not_ current settings
-# - TODO: add macros for some ppc, mipsel, alpha and sparc
+# - add macros for some ppc, mipsel, alpha and sparc
# - uppackaged list:
-# /usr/lib/rpm/http.req
-# /usr/lib/rpm/install-sh
-# /usr/lib/rpm/mono-find-provides
-# /usr/lib/rpm/mono-find-requires
-# /usr/lib/rpm/osgideps.pl
-# /usr/lib/rpm/perldeps.pl
-# /usr/lib/rpm/vcheck
-# /usr/share/man/man8/rpmconstant.8
+# /usr/bin/multiarch-dispatch
+# /usr/bin/multiarch-platform
+# /usr/include/multiarch-dispatch.h
+# /usr/lib/rpm/bin/api-sanity-autotest.pl
+# /usr/lib/rpm/bin/api-sanity-checker.pl
+# /usr/lib/rpm/bin/chroot
+# /usr/lib/rpm/bin/cp
+# /usr/lib/rpm/bin/dbconvert
+# /usr/lib/rpm/bin/find
+# /usr/lib/rpm/bin/mgo
+# /usr/lib/rpm/bin/pom2spec
+# /usr/lib/rpm/bin/sqlite3
+# /usr/lib/rpm/check-multiarch-files
+# /usr/lib/rpm/dbconvert.sh
+# /usr/lib/rpm/gem_helper.rb
+# /usr/lib/rpm/gstreamer.sh
+# /usr/lib/rpm/kmod-deps.sh
+# /usr/lib/rpm/macros.d/cmake
+# /usr/lib/rpm/macros.d/gstreamer
+# /usr/lib/rpm/macros.d/kernel
+# /usr/lib/rpm/macros.d/mandriva
+# /usr/lib/rpm/macros.d/ruby
+# /usr/lib/rpm/macros.d/tcl
+# /usr/lib/rpm/mkmultiarch
+# /usr/lib/rpm/pythoneggs.py
+# /usr/lib/rpm/rubygems.rb
+#
+# - headerGet() making poldek segfault http://rpm5.org/cvs/tktview?tn=38,1
+# - rpm doesn't exit when no sources/patches available http://rpm5.org/cvs/tktview?tn=40,1
+# - http://rpm5.org/cvs/tktview?tn=41&_submit=Show
+# - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
#
# Conditional build:
%bcond_with static # build static rpm+rpmi
-%bcond_without apidocs # don't generate documentation with doxygen
-%bcond_with autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
+%bcond_with apidocs # don't generate documentation with doxygen
%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_with neon # build with HTTP/WebDAV support (neon library)
+%bcond_without neon # build with HTTP/WebDAV support (neon library)
%bcond_without db # BerkeleyDB
-%bcond_with sqlite # build with SQLite support
+%bcond_without sqlite # build with SQLite support
%bcond_with sqlite_dbapi # default database backend is sqlite
%bcond_without system_lua # use system lua
# force_cc - force using __cc other than "%{_target_cpu}-pld-linux-gcc"
%endif
# versions of required libraries
-%define reqdb_ver 4.7.25
-%define reqpopt_ver 1.10.8
+%define reqdb_ver 5.3
+%define reqpopt_ver 1.15
%define beecrypt_ver 2:4.1.2-4
-%define sover 5.0
+%define sover 5.4
Summary: RPM Package Manager
Summary(de.UTF-8): RPM Packet-Manager
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 5.1.4
-Release: 0.5
+Version: 5.4.10
+Release: 0.1
License: LGPL
Group: Base
-Source0: http://rpm5.org/files/rpm/rpm-5.1/%{name}-%{version}.tar.gz
-# Source0-md5: 9a04c22ce1dffc81a7e43d39b002aaa1
+# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
+Source0: %{name}-%{version}.tar.gz
+# Source0-md5: 5d099161bdd3203265ab32ffad3360b5
Source1: %{name}.groups
Source2: %{name}.platform
Source3: %{name}-install-tree
Source17: banner.sh
Source18: %{name}-pld.macros
Source19: ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
-# Source19-md5: 08b29584dd349aac9caa7610131a0a88
+# Source19-md5: 08b29584dd349aac9caa7610131a0a88
Source20: %{name}-mimetypedeps
Source100: %{name}-macros-athlon
Source101: %{name}-macros-i386
Source109: %{name}-macros-x86_64
Source110: %{name}-macros-ia32e
Source111: %{name}-macros-amd64
+# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
+Source112: cpu-os-macros.tar.gz
+# Source112-md5: 6fc7b779cd5476996fdc7872863e2106
Patch0: %{name}-branch.patch
Patch1: %{name}-man_pl.patch
Patch3: %{name}-rpmpopt.patch
Patch4: %{name}-perl-macros.patch
Patch5: %{name}-perl-req-perlfile.patch
-Patch6: %{name}-noexpand.patch
Patch7: %{name}-scripts-closefds.patch
Patch8: %{name}-php-macros.patch
Patch9: %{name}-gettext-in-header.patch
Patch16: %{name}-php-deps.patch
Patch17: %{name}-macros.patch
Patch18: %{name}-macros-th.patch
-
-Patch23: %{name}-pkgconfigdeps.patch
+Patch19: %{name}-glob.patch
Patch26: %{name}-notsc.patch
Patch27: %{name}-hack-norpmlibdep.patch
-Patch32: %{name}-pld-autodep.patch
Patch34: %{name}-epoch0.patch
Patch35: %{name}-perl_req-INC_dirs.patch
Patch36: %{name}-debuginfo.patch
Patch37: %{name}-doxygen_hack.patch
+Patch41: vendor-pld.patch
+
Patch42: %{name}-old-fileconflicts-behaviour.patch
Patch46: %{name}-mono.patch
Patch47: %{name}-javadeps.patch
-Patch52: %{name}-morearchs.patch
-
Patch55: %{name}-truncate-cvslog.patch
Patch59: %{name}-libtool-deps.patch
Patch60: %{name}-mimetype.patch
Patch61: %{name}-sparc64.patch
+Patch62: %{name}-gendiff.patch
+Patch70: %{name}-configure-autoconf.patch
+Patch72: openmp.patch
+Patch73: rpm-URPM-build-fix.patch
+Patch74: rpm-db5.3.patch
URL: http://rpm5.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1.4
BuildRequires: bzip2-devel >= 1.0.2-17
%{?with_db:BuildRequires: db-devel >= %{reqdb_ver}}
BuildRequires: elfutils-devel >= 0.108
-BuildRequires: gettext-autopoint >= 0.11.4-2
+#BuildRequires: gettext-autopoint >= 0.11.4-2
BuildRequires: gettext-devel >= 0.11.4-2
-BuildRequires: lzma-devel >= 4.999.3
+BuildRequires: keyutils-devel
BuildRequires: libmagic-devel
%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
%{?with_system_lua:BuildRequires: lua51-devel >= 5.1.2}
%{?with_python:BuildRequires: python-devel >= 1:2.3}
BuildRequires: python-modules >= 1:2.3
-BuildRequires: rpm-perlprov
%{?with_python:BuildRequires: rpm-pythonprov}
%{?with_sqlite:BuildRequires: sqlite3-devel}
+BuildRequires: tcl
BuildRequires: zlib-devel
+BuildRequires: xz-devel
%if %{with apidocs}
BuildRequires: doxygen
BuildRequires: ghostscript
Requires: bzip2-devel
%{?with_db:Requires: db-devel >= %{reqdb_ver}}
Requires: elfutils-devel
+Requires: keyutils-devel
Requires: libmagic-devel
%{?with_selinux:Requires: libselinux-devel}
Requires: popt-devel >= %{reqpopt_ver}
Requires: bzip2-static
%{?with_db:Requires: db-static >= %{reqdb_ver}}
Requires: elfutils-static
+Requires: keyutils-static
Requires: libmagic-static
Requires: popt-static >= %{reqpopt_ver}
Requires: zlib-static
%prep
%setup -q -n %{name}-%{version}%{?subver}
-%patch0 -p1
+#patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
-%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
+# compress doc in upstream
%patch10 -p1
%{?with_system_lua:%patch11 -p1}
# CHECK ME - macrofiles: ~/etc could be used
install %{SOURCE9} scripts/php.prov.in
install %{SOURCE10} scripts/php.req.in
install %{SOURCE12} scripts/perl.prov
-%patch23 -p1
%ifarch i386 i486
# disable TSC
%patch26 -p1
%endif
%patch27 -p1
-%patch32 -p1
%patch34 -p1
%patch35 -p0
%patch36 -p1
%patch37 -p1
+%patch41 -p1
%patch42 -p1
%patch46 -p1
-%patch47 -p1
-# OLD COMMENTED OUT
-#%%patch52 -p1 -- morearchs (rpmrc patch) adds ppc7400, ppc7400
+# port to new implementation
+#%patch47 -p1
%patch55 -p1
%patch59 -p1
%patch17 -p1
%patch18 -p1
-%patch60 -p1
+# Maybe, at last we can remove this?
+#patch19 -p1
+# port to new implementation
+#%patch60 -p1
%ifarch sparc64
%patch61 -p1
%endif
+%patch62 -p1
+%patch70 -p1
+%patch72 -p1 -b .wiget
+%patch73 -p1
+%patch74 -p1
cd scripts
mv -f perl.req perl.req.in
CXX="%{__newcxx}" \
CPP="%{__newcpp}" \
WITH_PERL_VERSION=no \
- %{?with_autoreqdep:--enable-adding-packages-names-in-autogenerated-dependancies} \
--enable-shared \
--enable-static \
%{!?with_apidocs:--without-apidocs} \
--with-bzip2=external \
--with-beecrypt=external \
--with-lzma=external \
+ --with-xz=external \
--with-neon=%{?with_neon:external}%{!?with_neon:no} \
--with-file=external \
--with-popt=external \
--with-db=%{?with_db:external}%{!?with_db:no} \
- --with-sqlite=%{?with_sqlite:external}%{!?with_sqlite:no} \
+ --with-sqlite=%{?with_sqlite:yes}%{!?with_sqlite:no} \
--with-dbapi=%{!?with_sqlite_dbapi:db}%{?with_sqlite_dbapi:sqlite} \
--with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \
- --with-pcre=no \
+ --with-pcre=external \
--with-keyutils=none \
--without-path-versioned \
--with-path-macros='%{_rpmlibdir}/macros:%{_rpmlibdir}/macros.pld:%{_rpmlibdir}/macros.build:%{_rpmlibdir}/%%{_target}/macros:%{_sysconfdir}/rpm/macros.*:%{_sysconfdir}/rpm/macros:%{_sysconfdir}/rpm/%%{_target}/macros:~/etc/rpmmacros:~/etc/.rpmmacros:~/.rpmmacros' \
# move rpm to /bin
mv $RPM_BUILD_ROOT%{_bindir}/rpm $RPM_BUILD_ROOT/bin
# move essential libs to /lib (libs that /bin/rpm links to)
-for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so librpmbuild-%{sover}.so; do
+for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so librpmbuild-%{sover}.so librpmmisc-%{sover}.so librpmconstant-%{sover}.so; do
mv -f $RPM_BUILD_ROOT%{_libdir}/$a $RPM_BUILD_ROOT/%{_lib}
ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
done
# wrong location, not used anyway
rm $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log,xinetd}
# utils dropped in 4.4.8 -- their manuals
-rm $RPM_BUILD_ROOT%{_mandir}/{,*/}/man8/rpmgraph.8
-# unpackaged in 4.4.9, reasons unknown
-rm $RPM_BUILD_ROOT%{_rpmlibdir}/symclash.{sh,py}
+rm $RPM_BUILD_ROOT%{_mandir}/*/man8/rpmgraph.8
%find_lang %{name}
%{_sysconfdir}/pki/rpm-gpg/PLD-3.0-Th-GPG-key.asc
%attr(755,root,root) /bin/rpm
-#%attr(755,root,root) %{_bindir}/rpmdb
-#%attr(755,root,root) %{_bindir}/rpmquery
-#%attr(755,root,root) %{_bindir}/rpmsign
-#%attr(755,root,root) %{_bindir}/rpmverify
-%dir %{_sysconfdir}/rpm
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
%dir %{_sysconfdir}/rpm/sysinfo
# these are ok to be replaced
%lang(sk) %{_mandir}/sk/man8/rpm.8*
%dir /var/lib/rpm
+%dir /var/lib/rpm/log
+%dir /var/lib/rpm/tmp
+%config(noreplace) %verify(not md5 mtime size) /var/lib/rpm/DB_CONFIG
%dir %attr(700,root,root) /var/spool/repackage
%dir /var/lock/rpm
/var/lock/rpm/transaction
# net-snmp hrSWInstalledName queries, bash-completions
%dir /var/cache/hrmib
-#%attr(755,root,root) %{_rpmlibdir}/rpmd
-#%{!?with_static:%attr(755,root,root) %{_rpmlibdir}/rpm[eiu]}
-#%attr(755,root,root) %{_rpmlibdir}/rpmk
-#%attr(755,root,root) %{_rpmlibdir}/rpm[qv]
-
+%{_rpmlibdir}/qf
%{_rpmlibdir}/rpmpopt*
%{_rpmlibdir}/macros
%{_rpmlibdir}/macros.pld
+%{_rpmlibdir}/cpuinfo.yaml
%attr(755,root,root) %{_rpmlibdir}/hrmib-cache
%files base
%defattr(644,root,root,755)
+%dir %{_sysconfdir}/rpm
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpm
%dir %{_rpmlibdir}
%attr(755,root,root) %{_bindir}/banner.sh
%attr(755,root,root) /%{_lib}/librpmdb-%{sover}.so
%attr(755,root,root) /%{_lib}/librpmio-%{sover}.so
%attr(755,root,root) /%{_lib}/librpmbuild-%{sover}.so
+%attr(755,root,root) /%{_lib}/librpmmisc-%{sover}.so
+%attr(755,root,root) /%{_lib}/librpmconstant-%{sover}.so
%files devel
%defattr(644,root,root,755)
%files utils
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rpm2cpio
-%attr(755,root,root) %{_bindir}/rpmcache
%attr(755,root,root) %{_bindir}/rpmconstant
-%attr(755,root,root) %{_bindir}/rpmdigest
-%attr(755,root,root) %{_bindir}/rpmgrep
-%attr(755,root,root) %{_bindir}/rpmrepo
-%attr(755,root,root) %{_bindir}/rpmmtree
-%attr(755,root,root) %{_rpmlibdir}/debugedit
%attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
-%attr(755,root,root) %{_rpmlibdir}/rpmcmp
%attr(755,root,root) %{_rpmlibdir}/rpmdb_loadcvt
-%attr(755,root,root) %{_rpmlibdir}/rpmdeps
%attr(755,root,root) %{_rpmlibdir}/tgpg
-%{_mandir}/man1/rpmgrep.1*
+%dir %{_rpmlibdir}/bin
+%attr(755,root,root) %{_rpmlibdir}/bin/debugedit
+%attr(755,root,root) %{_rpmlibdir}/bin/mtree
+%attr(755,root,root) %{_rpmlibdir}/bin/rpmcache
+%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
+%attr(755,root,root) %{_rpmlibdir}/bin/rpmrepo
%{_mandir}/man8/rpm2cpio.8*
%{_mandir}/man8/rpmcache.8*
+%{_mandir}/man8/rpmconstant.8*
%{_mandir}/man8/rpmdeps.8*
%{_mandir}/man8/rpmmtree.8*
%lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
%attr(755,root,root) %{_rpmlibdir}/brp-*
%attr(755,root,root) %{_rpmlibdir}/check-files
-# %attr(755,root,root) %{_rpmlibdir}/check-prereqs
%attr(755,root,root) %{_rpmlibdir}/compress-doc
-#%attr(755,root,root) %{_rpmlibdir}/config.*
%attr(755,root,root) %{_rpmlibdir}/cross-build
%attr(755,root,root) %{_rpmlibdir}/find-spec-bcond
%attr(755,root,root) %{_rpmlibdir}/getpo.sh
%attr(755,root,root) %{_rpmlibdir}/install-build-tree
-%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
%attr(755,root,root) %{_rpmlibdir}/u_pkg.sh
%attr(755,root,root) %{_rpmlibdir}/executabledeps.sh
%attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
%attr(755,root,root) %{_rpmlibdir}/mimetypedeps.sh
# needs hacked pkg-config to return anything
%attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
-#%attr(755,root,root) %{_rpmlibdir}/rpmb
-#%attr(755,root,root) %{_rpmlibdir}/rpmt
+%dir %{_rpmlibdir}/bin
+%attr(755,root,root) %{_rpmlibdir}/bin/install-sh
+%attr(755,root,root) %{_rpmlibdir}/bin/mkinstalldirs
+%attr(755,root,root) %{_rpmlibdir}/vcheck
%{_rpmlibdir}/noarch-*
%ifarch %{ix86}
%{_rpmlibdir}/i?86*
%{_rpmlibdir}/macros.perl
%{_rpmlibdir}/macros.php
# not used yet ... these six depend on perl
-#%attr(755,root,root) %{_rpmlibdir}/http.req
-#%attr(755,root,root) %{_rpmlibdir}/magic.prov
-#%attr(755,root,root) %{_rpmlibdir}/magic.req
-#%{_rpmlibdir}/sql.prov
-#%{_rpmlibdir}/sql.req
-#%{_rpmlibdir}/tcl.req
+%attr(755,root,root) %{_rpmlibdir}/http.req
+%attr(755,root,root) %{_rpmlibdir}/mono*
+%dir %{_rpmlibdir}/macros.d
+%{_rpmlibdir}/macros.d/java
+%{_rpmlibdir}/macros.d/libtool
+%{_rpmlibdir}/macros.d/mono
+%{_rpmlibdir}/macros.d/perl
+%{_rpmlibdir}/macros.d/php
+%{_rpmlibdir}/macros.d/pkgconfig
+%{_rpmlibdir}/macros.d/python
+%{_rpmlibdir}/macros.d/selinux
+%{_rpmlibdir}/macros.rpmbuild
+
%attr(755,root,root) %{_bindir}/gendiff
%attr(755,root,root) %{_bindir}/rpmbuild
+%attr(755,root,root) %{_rpmlibdir}/bin/rpmspecdump
+%attr(755,root,root) %{_rpmlibdir}/bin/wget
+
+%dir %{_rpmlibdir}/helpers
+%attr(755,root,root) %{_rpmlibdir}/helpers/makeshlibs
%{_mandir}/man1/gendiff.1*
%{_mandir}/man8/rpmbuild.8*
%files perlprov
%defattr(644,root,root,755)
%attr(755,root,root) %{_rpmlibdir}/perl.*
-#%attr(755,root,root) %{_rpmlibdir}/perldeps.pl
-#%attr(755,root,root) %{_rpmlibdir}/find-perl-*
-#%attr(755,root,root) %{_rpmlibdir}/find-*.perl
-#%attr(755,root,root) %{_rpmlibdir}/find-prov.pl
-#%attr(755,root,root) %{_rpmlibdir}/find-req.pl
-#%attr(755,root,root) %{_rpmlibdir}/get_magic.pl
+%attr(755,root,root) %{_rpmlibdir}/osgideps.pl
+%attr(755,root,root) %{_rpmlibdir}/perldeps.pl
%files pythonprov
%defattr(644,root,root,755)