#
# TODO:
+# pluto_> btw. /usr/lib/rpm/find-debuginfo.sh needs fix. it extract debuginfo also from kernel modules.
+# pluto_> there's a filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f
+# pluto_> and we need to add ! -path /lib/modules/...
# - python(abi) cap is not provided automatically because /usr/lib*/libpython2*.so.*
# matches ELF first
# - repackaging when lzma is not installed (todo: fix digest signature of header)
# Conditional build:
%bcond_with static # build static rpm+rpmi
%bcond_without apidocs # don't generate documentation with doxygen
+%bcond_with internal_db # internal db (db 4.5.20)
%if "%{pld_release}" == "ac"
%bcond_without autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
-%bcond_without internal_db # internal db (db 4.5.20)
%bcond_with nptl # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
%else
%bcond_with autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
-%bcond_with internal_db # internal db (db 4.5.20)
%bcond_without nptl # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
%endif
%bcond_without python # don't build python bindings
# 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"
+%ifarch sparc sparcv9 sparc64
+%undefine with_apidocs
+%endif
+
# versions of required libraries
%if "%{pld_release}" == "th"
%define reqdb_ver 4.7.25
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 4.5
-Release: 0.59
+Release: 28
License: LGPL
Group: Base
Source0: %{name}-%{version}.tar.gz
Source17: %{name}-java-requires
# http://svn.pld-linux.org/banner.sh/
Source18: banner.sh
+Source19: %{name}-macros.gstreamer
+Patch1000: %{name}-new-debuginfo.patch
Patch1067: %{name}-disable-features.patch
Patch1070: %{name}-rpmrc-ac.patch
#Patch0: %{name}-pl.po.patch
Patch4: %{name}-perl-macros.patch
Patch6: %{name}-noexpand.patch
Patch7: %{name}-scripts-closefds.patch
+Patch8: %{name}-db.patch
Patch9: %{name}-gettext-in-header.patch
Patch10: %{name}-compress-doc.patch
Patch11: %{name}-rpm5-patchset-8074.patch
Patch12: %{name}-system_libs.patch
+Patch13: %{name}-unglobal.patch
Patch14: %{name}-etc_dir.patch
Patch15: %{name}-system_libs-more.patch
Patch17: %{name}-ldconfig-always.patch
Patch32: %{name}-pld-autodep.patch
Patch33: %{name}-arch-x86_64.patch
Patch34: %{name}-epoch0.patch
+Patch35: %{name}-disable-features-ti.patch
Patch36: %{name}-debuginfo.patch
Patch37: %{name}-doxygen_hack.patch
Patch39: %{name}-popt-coreutils.patch
Patch57: %{name}-as_needed-fix.patch
Patch58: %{name}-repackage-wo-lzma.patch
Patch59: %{name}-libtool-deps.patch
+Patch61: %{name}-lzma-mem.patch
Patch62: %{name}-lzma-size_t.patch
Patch63: %{name}-tar_as_secondary_source.patch
Patch64: %{name}-man_pl.patch
Patch66: %{name}-v3-support.patch
Patch67: %{name}-cleanbody.patch
Patch69: %{name}-popt-aliases.patch
-#Patch71: %{name}-rpm5-patchset-10061.patch
+# reverse arrows patch
+Patch70: %{name}-rpm5-patchset-10061.patch
+Patch71: %{name}-installbeforeerase.patch
+Patch72: %{name}-postun-nofail.patch
Patch73: %{name}-namespace-probe.patch
Patch74: %{name}-noversiondir.patch
Patch75: %{name}-rpmte-segv.patch
Patch84: %{name}-hirmib-ts.patch
Patch85: %{name}-perl_req-heredocs_pod.patch
Patch86: %{name}-rpmv3-support.patch
+Patch87: %{name}-mono.patch
+Patch88: %{name}-poptexecpath.patch
+Patch89: %{name}-lzma-compress-level.patch
+Patch90: %{name}-gstreamer.patch
+Patch91: %{name}-gendiff.patch
+Patch92: %{name}-set-failed-on-reopen.patch
+Patch93: %{name}-debugedit-workaround.patch
+Patch94: %{name}-shescape-memfault.patch
+Patch95: %{name}-gid-uucp.patch
+Patch96: %{name}-disable-hkp.patch
+Patch97: %{name}-sigpad.patch
+Patch98: %{name}-debugdir.patch
+Patch99: %{name}-pkgconfig.patch
URL: http://rpm5.org/
BuildRequires: autoconf >= 2.57
BuildRequires: automake >= 1.4
BuildRequires: libxml2-devel
BuildRequires: neon-devel >= 0.25.5
%endif
-BuildRequires: ossp-uuid-devel >= 1.6.2-4
+BuildRequires: ossp-uuid-devel >= 1.6.2-6
BuildRequires: patch >= 2.2
BuildRequires: popt-devel >= %{reqpopt_ver}
%{?with_python:BuildRequires: python-devel >= 1:2.3}
Provides: rpm-db-ver = %{reqdb_ver}
Obsoletes: rpm-getdeps
%{!?with_static:Obsoletes: rpm-utils-static}
+Obsoletes: tmpwatch-rpmrepackage
Conflicts: glibc < 2.2.92
Conflicts: poldek < 0.21-0.20070703.00.11
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%{?with_selinux:Requires: libselinux >= 1.18}
Requires: ossp-uuid >= 1.6.2-4
Requires: popt >= %{reqpopt_ver}
-%{?with_nptl:Requires: uname(release) >= 2.6.0}
+%{?with_internal_db:%{?with_nptl:Requires: uname(release) >= 2.6.0}}
Requires: zlib >= 1.2.3
-%{?with_suggest_tags:Suggests: lzma >= 1:4.42.0}
+%{?with_suggest_tags:Suggests: lzma}
Obsoletes: rpm-libs
# avoid installing with incompatible (non-tukaani) lzma
-Conflicts: lzma < 1:4.42.0
+# avoid incompatible (-M0 not supported) lzma
+Conflicts: lzma < 1:4.999.5-0.alpha.2
# avoid SEGV caused by mixed db versions
Conflicts: poldek < 0.18.1-16
Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів
Group: Applications/File
Requires(pretrans): findutils
-Requires: %{name}-build-macros >= 1.433-2
+Requires: %{name}-build-macros >= 1.514
Requires: %{name}-utils = %{version}-%{release}
Requires: /bin/id
Requires: awk
%prep
%setup -q
+%patch1000 -p1
#%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1 -R
%patch12 -p1
+%patch13 -p1
%patch14 -p1
%patch17 -p1
sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
%endif
%if "%{pld_release}" == "ti"
%patch20 -p1
+%patch35 -p1
%endif
%patch51 -p1
#%patch52 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
+%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch66 -p1
%patch67 -p1
%patch69 -p1
-#%patch71 -p0
+%patch71 -p1
+%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p0
-%if "%{pld_release}" == "ac"
-%patch76 -p1
-%endif
+# having .py sources in -debuginfo needs more testing
+#%patch76 -p1
%patch77 -p0
%patch79 -p1
%patch80 -p1
%patch84 -p1
%patch85 -p1
%patch86 -p1
+%patch70 -p0
+%patch87 -p1
+%patch88 -p1
+%patch89 -p1
+%patch90 -p1
+%patch91 -p1
+%patch92 -p1
+%patch93 -p1
+%patch94 -p1
+%patch95 -p1
+%patch96 -p1
+%patch97 -p1
+%patch98 -p1
+%patch99 -p1
mv -f po/{sr,sr@Latn}.po
rm -rf sqlite zlib popt
cd ..
%endif
-# config.guess doesn't handle athlon, so we have to change it by hand.
# rpm checks for CPU type at runtime, but it looks better
-sed -i -e 's|@host@|%{_target_cpu}-%{_target_vendor}-linux-gnu|' -e 's|@host_cpu@|%{_target_cpu}|' macros.in
+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
# pass CC and CXX too in case of building with some older configure macro
# disable perl-RPM2 build, we have it in separate spec
+CPPFLAGS=-I/usr/include/oosp-uuid
%configure \
CC="%{__newcc}" \
CXX="%{__newcxx}" \
%{?with_python:--with-python=%{py_ver}} \
%{!?with_python:--without-python} \
%{!?with_selinux:--without-selinux} \
- --%{?with_nptl:en}%{!?with_nptl:dis}able-posixmutexes \
+ %{?with_internal_db:--%{?with_nptl:en}%{!?with_nptl:dis}able-posixmutexes} \
--without-db
%{__make} \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
+install -d $RPM_BUILD_ROOT{/%{_lib},/etc/{sysconfig,tmpwatch},%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
%if "%{pld_release}" != "ti"
install -d $RPM_BUILD_ROOT/etc/pki/rpm-gpg
pylibdir=%{py_libdir} \
pkgbindir="%{_bindir}"
+cat <<'EOF' > $RPM_BUILD_ROOT/etc/tmpwatch/rpm.conf
+# Cleanup 90-days old repackage files.
+/var/spool/repackage 2160
+EOF
+
cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
# first platform file entry can't contain regexps
%{_target_cpu}-%{_target_vendor}-linux
install macros.php $RPM_BUILD_ROOT%{_rpmlibdir}/macros.php
install macros.mono $RPM_BUILD_ROOT%{_rpmlibdir}/macros.mono
install %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.java
+install %{SOURCE19} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.gstreamer
install %{SOURCE1} doc/manual/groups
install %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
fi
echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
-# TODO: poldek should abort if it can't reopen rpmdb after rpm exec:
-#Installing set #3
-#rpmdb: Program version 4.2 doesn't match environment version
-#error: db4 error(22) from dbenv->open: Invalid argument
-#error: cannot open Packages index using db3 - Invalid argument (22)
-#error: //var/lib/rpm: open rpm database failed
-#Processing dependencies...
-#There are more than one package which provide "/bin/sh":
-# if poldek is running, kill it so it will not attempt to fill whole rpmdb
-p=$(/sbin/pidof poldek)
-if [ "$p" ]; then
- echo >&2 "Killing poldek ($p), don't panic :)"
- kill $p
-fi
%triggerpostun lib -- db4.5 < %{reqdb_ver}
echo >&2 "db4.5 upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
fi
echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
-if [ "$p" ]; then
- echo >&2 "Killing poldek ($p), don't panic :)"
- kill $p
-fi
%triggerpostun -- %{name} < 4.4.9-44
%{_rpmlibdir}/hrmib-cache
%attr(755,root,root) /bin/rpm
+%config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/rpm.conf
%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
%{_libdir}/librpmdb.la
%{_libdir}/librpmio.la
%{_includedir}/rpm
+%{_pkgconfigdir}/rpm.pc
%files static
%defattr(644,root,root,755)
%ifarch %{ppc}
%{_rpmlibdir}/ppc*
%endif
-%ifarch sparc sparc64
+%ifarch sparc sparcv9 sparc64
%{_rpmlibdir}/sparc*
%endif
%ifarch %{x8664}
%{_rpmlibdir}/x86_64*
%endif
# must be here for "Requires: rpm-*prov" to work
+%{_rpmlibdir}/macros.gstreamer
%{_rpmlibdir}/macros.java
%{_rpmlibdir}/macros.mono
%{_rpmlibdir}/macros.perl