X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.spec;h=fccfa6a13c8284605ad3cafa78a8e11e4823d4d2;hb=9dce4e74d45a93d4cf8b31ddcf4c54c3aeb2ef57;hp=49f5eb3586feaedb20d841eb07691acf28119386;hpb=afbcf91a5cd3ada9e94e670bec845a2da4655584;p=packages%2Frpm.git diff --git a/rpm.spec b/rpm.spec index 49f5eb3..fccfa6a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,6 +1,6 @@ # # TODO: -# - manuals are not compressed +# - check if we want shell autodeps: Requires: executable(ln) executable(mv) # - %{_arch} = i686 not as used to be i386: # 5.0.2: rpm -E '%_target_base_arch %_arch' # i386 i686 @@ -21,17 +21,8 @@ # /usr/lib/rpm/mono-find-requires # /usr/lib/rpm/osgideps.pl # /usr/lib/rpm/perldeps.pl -# /usr/lib/rpm/rpm2cpio -# /usr/lib/rpm/symclash.py -# /usr/lib/rpm/symclash.sh # /usr/lib/rpm/vcheck -# /usr/share/man/ja/man8/rpmcache.8 -# /usr/share/man/ja/man8/rpmgraph.8 -# /usr/share/man/man8/rpmcache.8 -# /usr/share/man/man8/rpmconstant.8 -# /usr/share/man/man8/rpmgraph.8 -# /usr/share/man/pl/man8/rpmcache.8 -# /usr/share/man/pl/man8/rpmgraph.8 +# /usr/share/man/man8/rpmconstant.8.gz # # Conditional build: %bcond_with static # build static rpm+rpmi @@ -43,6 +34,7 @@ %bcond_without db # BerkeleyDB %bcond_with 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" # 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" @@ -61,7 +53,6 @@ ERROR %define reqdb_ver 4.6.18 %define reqpopt_ver 1.10.8 %define beecrypt_ver 2:4.1.2-4 -%define find_lang_rev 1.27 %define sover 5.0 Summary: RPM Package Manager Summary(de.UTF-8): RPM Packet-Manager @@ -72,7 +63,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 5.0.2 -Release: 0.1 +Release: 0.7 License: LGPL Group: Base Source0: http://rpm5.org/files/rpm/rpm-5.0/%{name}-%{version}.tar.gz @@ -81,7 +72,7 @@ Source1: %{name}.groups Source2: %{name}.platform Source3: %{name}-install-tree Source4: %{name}-find-spec-bcond -Source5: %{name}-find-lang +Source5: %{name}-hrmib-cache Source6: %{name}-groups-po.awk Source7: %{name}-compress-doc Source8: %{name}-check-files @@ -120,6 +111,8 @@ Patch7: %{name}-scripts-closefds.patch Patch8: %{name}-php-macros.patch Patch9: %{name}-gettext-in-header.patch Patch10: %{name}-compress-doc.patch +Patch11: %{name}-lua.patch +Patch12: %{name}-scaremem.patch Patch14: %{name}-etc_dir.patch Patch16: %{name}-php-deps.patch @@ -132,6 +125,7 @@ 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 @@ -150,16 +144,13 @@ Patch59: %{name}-libtool-deps.patch Patch61: %{name}-sparc64.patch URL: http://rpm5.org/ -BuildRequires: autoconf >= 2.57 +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}} BuildRequires: elfutils-devel >= 0.108 -%ifnarch sparc64 -# -fPIE/-pie -BuildRequires: gcc >= 5:3.4 -%endif +BuildRequires: gettext-autopoint >= 0.11.4-2 BuildRequires: gettext-devel >= 0.11.4-2 BuildRequires: libmagic-devel %{?with_selinux:BuildRequires: libselinux-devel >= 1.18} @@ -172,8 +163,9 @@ BuildRequires: neon-devel >= 0.25.5 %endif BuildRequires: patch >= 2.2 BuildRequires: popt-devel >= %{reqpopt_ver} -%{?with_python:BuildRequires: python-devel >= 1:2.5} -BuildRequires: python-modules >= 1:2.5 +%{?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} @@ -205,6 +197,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # don't require very fresh rpm.macros to build %define __gettextize gettextize --copy --force --intl ; cp -f po/Makevars{.template,} +%define find_lang sh ./scripts/find-lang.sh $RPM_BUILD_ROOT %define ix86 i386 i486 i586 i686 athlon pentium3 pentium4 %define ppc ppc ppc7400 ppc7450 %define x8664 amd64 ia32e x86_64 @@ -215,6 +208,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define __newcpp %{?force_cpp}%{!?force_cpp:%{_target_cpu}-pld-linux-gcc -E} %define _rpmlibdir /usr/lib/rpm +%define _noautocompressdoc RPM-GPG-KEY %define specflags -fno-strict-aliasing @@ -272,6 +266,7 @@ Summary: RPM base package - scripts used by rpm packages themselves Summary(pl.UTF-8): Podstawowy pakiet RPM - skrypty używane przez same pakiety rpm Group: Base Requires: filesystem +Obsoletes: rpm-scripts Obsoletes: vserver-rpm %description base @@ -293,14 +288,14 @@ Summary(pl.UTF-8): Biblioteki RPM-a Group: Libraries Requires: beecrypt >= %{beecrypt_ver} %{?with_db:Requires: db >= %{reqdb_ver}} -%{?with_selinux:Requires: libselinux >= 1.18} Requires: libmagic >= 1.15-2 +%{?with_selinux:Requires: libselinux >= 1.18} Requires: popt >= %{reqpopt_ver} -Obsoletes: rpm-libs +%{?with_suggest_tags:Suggests: lzma} Obsoletes: rpm-apidocs +Obsoletes: rpm-libs # avoid SEGV caused by mixed db versions Conflicts: poldek < 0.18.1-16 -%{?with_suggest_tags:Suggests: lzma} %description lib RPMs library. @@ -418,6 +413,7 @@ Summary(pl.UTF-8): Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami Group: Applications/File Requires: %{name} = %{version}-%{release} Requires: popt >= %{reqpopt_ver} +Conflicts: filesystem-debuginfo < 3.0-16 %description utils Additional utilities for managing RPM packages and database. @@ -473,12 +469,10 @@ Summary(ru.UTF-8): Скрипты и утилиты, необходимые дл Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів Group: Applications/File Requires(pre): findutils -Requires: %{name}-build-macros >= 1.314 +Requires: %{name}-build-macros >= 1.433-2 Requires: %{name}-utils = %{version}-%{release} Requires: /bin/id Requires: awk -# we need fixed binutils for -feliminate-dwarf2-dups -Requires: binutils >= 3:2.17.50.0.3-2 Requires: bzip2 Requires: chrpath >= 0.10-4 Requires: cpio @@ -487,7 +481,11 @@ Requires: elfutils Requires: file >= 4.17 Requires: fileutils Requires: findutils -Requires: gcc >= 5:3.4 +%ifarch athlon +Requires: gcc >= 3.0.3 +%else +Requires: gcc +%endif Requires: glibc-devel Requires: grep Requires: gzip @@ -498,7 +496,6 @@ Requires: sed Requires: sh-utils Requires: tar Requires: textutils -Provides: rpmbuild(find_lang) = %{find_lang_rev} Provides: rpmbuild(monoautodeps) Provides: rpmbuild(noauto) = 3 %ifarch %{x8664} @@ -642,6 +639,8 @@ Python para manipular pacotes e bancos de dados RPM. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%{?with_system_lua:%patch11 -p1} +%patch12 -p1 # CHECK ME - macrofiles: ~/etc could be used #%%patch14 -p1 %patch16 -p1 @@ -653,7 +652,6 @@ echo '%%define __php_provides /usr/lib/rpm/php.prov' > macros.php echo '%%define __php_requires /usr/lib/rpm/php.req' >> macros.php echo '%%define __mono_provides /usr/lib/rpm/mono-find-provides' > macros.mono echo '%%define __mono_requires /usr/lib/rpm/mono-find-requires' >> macros.mono -install %{SOURCE5} scripts/find-lang.sh install %{SOURCE9} scripts/php.prov.in install %{SOURCE10} scripts/php.req.in install %{SOURCE12} scripts/perl.prov @@ -665,6 +663,7 @@ install %{SOURCE12} scripts/perl.prov %endif %patch27 -p1 %patch32 -p1 +%patch34 -p1 %patch35 -p0 %patch36 -p1 %patch37 -p1 @@ -672,7 +671,7 @@ install %{SOURCE12} scripts/perl.prov %patch46 -p1 %patch47 -p1 # OLD COMMENTED OUT -#%%patch52 -p1 +#%%patch52 -p1 -- morearchs (rpmrc patch) adds ppc7400, ppc7400 %patch55 -p1 %patch58 -p1 %patch59 -p1 @@ -695,12 +694,6 @@ awk -f %{SOURCE6} %{SOURCE1} #done %build -rev=$(awk '/^#.*Id:.*/{print $4}' scripts/find-lang.sh) -if [ "$rev" != "%find_lang_rev" ]; then - : Update find_lang_rev define to $rev, and retry - exit 1 -fi - %{__libtoolize} %{__autopoint} %{__aclocal} @@ -712,8 +705,8 @@ fi # 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 +%{?with_system_lua:CPPFLAGS=-I/usr/include/lua51} # pass CC and CXX too in case of building with some older configure macro -# disable perl-RPM2 build, we have it in separate spec %configure \ CC="%{__newcc}" \ CXX="%{__newcxx}" \ @@ -734,8 +727,8 @@ fi --with-popt=external \ --with-db=%{?with_db:external}%{!?with_db:no} \ --with-sqlite=%{?with_sqlite:external}%{!?with_sqlite:no} \ - --with-dbapi=%{!?sqlite_dbapi:db}%{?sqlite_dbapi:sqlite} \ - --with-lua=internal \ + --with-dbapi=%{!?with_sqlite_dbapi:db}%{?with_sqlite_dbapi:sqlite} \ + --with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \ --with-pcre=no \ --with-keyutils=none \ --without-path-versioned \ @@ -749,7 +742,7 @@ fi %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner} +install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib} %{__make} install \ pkgconfigdir=%{_pkgconfigdir} \ @@ -834,7 +827,7 @@ echo "ia64-[^-]*-linux(-gnu)?" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform echo "powerpc64-[^-]*-linux(-gnu)?" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform echo "ppc64-[^-]*-linux(-gnu)?" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform %endif -%ifarch ppc +%ifarch %{ppc} ppc64 echo "powerpc-[^-]*-linux(-gnu)?" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform echo "ppc-[^-]*-linux(-gnu)?" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform %endif @@ -870,6 +863,7 @@ echo "noarch-[^-]*-.*" >> $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform rm $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides* rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl +rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh # not installed since 4.4.8 (-tools-perl subpackage) install scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir} @@ -890,11 +884,19 @@ install %{SOURCE13} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh install %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires install scripts/find-php* $RPM_BUILD_ROOT%{_rpmlibdir} install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir} +install %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/rpm install %{SOURCE17} $RPM_BUILD_ROOT%{_bindir}/banner.sh -install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo +install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo + +touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Conflictname +touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Dirnames +install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Filelinktos +touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Obsoletename +touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Providename +touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Requirename cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <> $m +done # remove arch dependant macros which have no use on noarch -#%{__sed} -i -e ' -#/{__spec_install_post_strip}/d -#/{__spec_install_post_chrpath}/d -#/{__spec_install_post_compress_modules}/d -#' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros +%{__sed} -i -e ' +/{__spec_install_post_strip}/d +/{__spec_install_post_chrpath}/d +/{__spec_install_post_compress_modules}/d +' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros + +# Bourne shell script vs ELF executable linked with rpm,rpmdb,rpmio +mv $RPM_BUILD_ROOT{%{_rpmlibdir},%{_bindir}}/rpm2cpio %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} %py_comp $RPM_BUILD_ROOT%{py_sitedir} @@ -1013,8 +1022,10 @@ rm $RPM_BUILD_ROOT%{py_sitedir}/rpm/*.{la,a,py} # wrong location, not used anyway rm $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log,xinetd} -# manuals for utils dropped in 4.4.8 (?) -#rm $RPM_BUILD_ROOT%{_mandir}/{,*/}/man8/{rpmcache,rpmgraph}.8 +# 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} %find_lang %{name} @@ -1025,10 +1036,23 @@ rm -f manual/Makefile* %clean rm -rf $RPM_BUILD_ROOT +%triggerpostun lib -- %{name}-lib < %{version} +rm -f /var/lib/rpm/__db* + +%pretrans +# this needs to be a dir +if [ -f %{_sysconfdir}/rpm/sysinfo ]; then + mv -f %{_sysconfdir}/rpm/sysinfo{,.rpmsave} + mkdir %{_sysconfdir}/rpm/sysinfo +fi + +%triggerpostun -- %{name} < 4.4.9-44 +%{_rpmlibdir}/hrmib-cache + %post lib -p /sbin/ldconfig %postun lib -p /sbin/ldconfig -%pre build +%pretrans build find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %files -f %{name}.lang @@ -1043,8 +1067,9 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %dir %{_sysconfdir}/rpm %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros +%dir %{_sysconfdir}/rpm/sysinfo # these are ok to be replaced -%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo +%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo/* %config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform @@ -1061,6 +1086,10 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %dir /var/lock/rpm /var/lock/rpm/transaction +# exported package NVRA (stamped with install tid) +# 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 @@ -1070,6 +1099,8 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %{_rpmlibdir}/macros %{_rpmlibdir}/macros.pld +%attr(755,root,root) %{_rpmlibdir}/hrmib-cache + %files base %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpm @@ -1080,25 +1111,28 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %files lib %defattr(644,root,root,755) -%attr(755,root,root) /%{_lib}/librpm*-*.so -%attr(755,root,root) %{_libdir}/librpm*-*.so +%attr(755,root,root) /%{_lib}/librpm-%{sover}.so +%attr(755,root,root) /%{_lib}/librpmdb-%{sover}.so +%attr(755,root,root) /%{_lib}/librpmio-%{sover}.so +%attr(755,root,root) /%{_lib}/librpmbuild-%{sover}.so %files devel %defattr(644,root,root,755) -%{_includedir}/rpm -%{_libdir}/librpm*.la -%{_pkgconfigdir}/*.pc %attr(755,root,root) %{_libdir}/librpm.so %attr(755,root,root) %{_libdir}/librpm-%{sover}.so +%attr(755,root,root) %{_libdir}/librpmbuild.so +%attr(755,root,root) %{_libdir}/librpmbuild-%{sover}.so %attr(755,root,root) %{_libdir}/librpmconstant.so %attr(755,root,root) %{_libdir}/librpmconstant-%{sover}.so +%attr(755,root,root) %{_libdir}/librpmdb.so +%attr(755,root,root) %{_libdir}/librpmdb-%{sover}.so %attr(755,root,root) %{_libdir}/librpmio.so %attr(755,root,root) %{_libdir}/librpmio-%{sover}.so %attr(755,root,root) %{_libdir}/librpmmisc.so %attr(755,root,root) %{_libdir}/librpmmisc-%{sover}.so -%attr(755,root,root) %{_libdir}/librpmdb.so -%attr(755,root,root) %{_libdir}/librpmdb-%{sover}.so -%attr(755,root,root) %{_libdir}/librpmbuild.so +%{_libdir}/librpm*.la +%{_includedir}/rpm +%{_pkgconfigdir}/*.pc %files static %defattr(644,root,root,755) @@ -1117,17 +1151,14 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f %attr(755,root,root) %{_rpmlibdir}/tgpg %attr(755,root,root) %{_rpmlibdir}/rpmdb_loadcvt %{_mandir}/man8/rpm2cpio.8* +%{_mandir}/man8/rpmcache.8* %{_mandir}/man8/rpmdeps.8* -#%{_mandir}/man8/rpmcache.8* -#%{_mandir}/man8/rpmgraph.8* %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8* -#%lang(ja) %{_mandir}/ja/man8/rpmcache.8* -#%lang(ja) %{_mandir}/ja/man8/rpmgraph.8* +%lang(ja) %{_mandir}/ja/man8/rpmcache.8* %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8* %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8* +%lang(pl) %{_mandir}/pl/man8/rpmcache.8* %lang(pl) %{_mandir}/pl/man8/rpmdeps.8* -#%lang(pl) %{_mandir}/pl/man8/rpmcache.8* -#%lang(pl) %{_mandir}/pl/man8/rpmgraph.8* %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8* %files utils-perl @@ -1151,7 +1182,6 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f #%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}/find-lang.sh %attr(755,root,root) %{_rpmlibdir}/getpo.sh %attr(755,root,root) %{_rpmlibdir}/install-build-tree %attr(755,root,root) %{_rpmlibdir}/mkinstalldirs