]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- umask for mkdir in pretrans
[packages/rpm.git] / rpm.spec
index 9e03849197fca35288141cc58d789c13a710035d..81b7fed41b942c509cc8f37bc42c8f482bbb862a 100644 (file)
--- 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
@@ -22,7 +22,7 @@
 #   /usr/lib/rpm/osgideps.pl
 #   /usr/lib/rpm/perldeps.pl
 #   /usr/lib/rpm/vcheck
-#   /usr/share/man/man8/rpmconstant.8.gz
+#   /usr/share/man/man8/rpmconstant.8
 #
 # Conditional build:
 %bcond_with    static          # build static rpm+rpmi
@@ -34,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,16 +62,17 @@ Summary(pt_BR.UTF-8):       Gerenciador de pacotes RPM
 Summary(ru.UTF-8):     Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
-Version:       5.0.2
+Version:       5.0.3
 Release:       0.2
 License:       LGPL
 Group:         Base
 Source0:       http://rpm5.org/files/rpm/rpm-5.0/%{name}-%{version}.tar.gz
-# Source0-md5: 596aaf5cd9dea7195f625530bc89e684
+# Source0-md5: b3df4e54e84cf3344ce6b76fa2a8d5bf
 Source1:       %{name}.groups
 Source2:       %{name}.platform
 Source3:       %{name}-install-tree
 Source4:       %{name}-find-spec-bcond
+Source5:       %{name}-hrmib-cache
 Source6:       %{name}-groups-po.awk
 Source7:       %{name}-compress-doc
 Source8:       %{name}-check-files
@@ -101,6 +103,7 @@ Source111:  %{name}-macros-amd64
 
 #Patch0:               %{name}-pl.po.patch
 Patch1:                %{name}-man_pl.patch
+Patch2:                %{name}-popt-downgrade.patch
 Patch3:                %{name}-rpmpopt.patch
 Patch4:                %{name}-perl-macros.patch
 Patch5:                %{name}-perl-req-perlfile.patch
@@ -109,6 +112,7 @@ 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
 
 Patch14:       %{name}-etc_dir.patch
 Patch16:       %{name}-php-deps.patch
@@ -140,7 +144,7 @@ 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
@@ -159,6 +163,7 @@ BuildRequires:      neon-devel >= 0.25.5
 %endif
 BuildRequires: patch >= 2.2
 BuildRequires: popt-devel >= %{reqpopt_ver}
+%{?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
@@ -468,8 +473,6 @@ 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
@@ -628,6 +631,7 @@ Python para manipular pacotes e bancos de dados RPM.
 # APPLIED ALREADY? translationproject.org is used now
 #%%patch0 -p1
 %patch1 -p1
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
@@ -636,6 +640,7 @@ Python para manipular pacotes e bancos de dados RPM.
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%{?with_system_lua:%patch11 -p1}
 # CHECK ME - macrofiles: ~/etc could be used
 #%%patch14 -p1
 %patch16 -p1
@@ -700,8 +705,8 @@ awk -f %{SOURCE6} %{SOURCE1}
 # 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}" \
@@ -723,7 +728,7 @@ awk -f %{SOURCE6} %{SOURCE1}
        --with-db=%{?with_db:external}%{!?with_db:no} \
        --with-sqlite=%{?with_sqlite:external}%{!?with_sqlite:no} \
        --with-dbapi=%{!?with_sqlite_dbapi:db}%{?with_sqlite_dbapi:sqlite} \
-       --with-lua=internal \
+       --with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \
        --with-pcre=no \
        --with-keyutils=none \
        --without-path-versioned \
@@ -737,7 +742,7 @@ awk -f %{SOURCE6} %{SOURCE1}
 
 %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} \
@@ -879,6 +884,7 @@ 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
@@ -995,12 +1001,16 @@ for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so librpmbuil
        ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
 done
 
+# Append rpm.platform contents to /usr/lib/rpm/${arch}-linux/macros
+for m in $RPM_BUILD_ROOT%{_rpmlibdir}/*/macros ; do
+       cat %{SOURCE2} | %{__sed} 's#@LIB@#%{_lib}#' >> $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
@@ -1032,10 +1042,14 @@ rm -f /var/lib/rpm/__db*
 %pretrans
 # this needs to be a dir
 if [ -f %{_sysconfdir}/rpm/sysinfo ]; then
+       umask 022
        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
 
@@ -1073,6 +1087,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
@@ -1082,6 +1100,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
This page took 0.044004 seconds and 4 git commands to generate.