]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- package our rpmrc
[packages/rpm.git] / rpm.spec
index 64ed7b6906ddf9b621e0581a6a964f6f08df5df1..d20a55da99bbf4009562a46c079a4f8e3b8cbc3b 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,5 +1,6 @@
 #
 # TODO:
+# - rebuild database after upgrading from rpm5
 # - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
 #
 # Conditional build:
@@ -34,12 +35,13 @@ Summary(uk.UTF-8):  Менеджер пакетів від RPM
 Name:          rpm
 Version:       4.15.1
 Release:       0.1
+Epoch:         1
 License:       GPL v2 / LGPL v2.1
 Group:         Base
 Source0:       http://ftp.rpm.org/releases/rpm-4.15.x/%{name}-%{version}.tar.bz2
 # Source0-md5: ed72147451a5ed93b2a48e2f8f5413c3
 Source1:       %{name}.groups
-Source2:       macros.pld.in
+Source2:       macros.pld
 Source3:       %{name}-install-tree
 Source4:       %{name}-find-spec-bcond
 Source5:       %{name}-hrmib-cache
@@ -70,6 +72,7 @@ Source28:     %{name}db_reset.c
 Source29:      dbupgrade.sh
 Source30:      rubygems.rb
 Source31:      gem_helper.rb
+Source32:      rpmrc.pld
 Patch0:                %{name}-man_pl.patch
 Patch1:                %{name}-popt-aliases.patch
 Patch2:                %{name}-perl-macros.patch
@@ -89,7 +92,8 @@ Patch15:      %{name}-perl-magic.patch
 Patch16:       %{name}-ignore-missing-macro-files.patch
 Patch17:       x32.patch
 Patch18:       %{name}-fix-compress-doc.patch
-Patch19:       vendor-pld.patch
+Patch20:       rpm5-db-compat.patch
+Patch21:       python-internal-build.patch
 URL:           https://rpm.org/
 BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver}
 BuildRequires: %{reqdb_pkg}-sql-devel >= %{reqdb_pkgver}
@@ -130,8 +134,8 @@ BuildRequires:      graphviz
 BuildRequires: tetex-pdftex
 %endif
 Requires(posttrans):   coreutils
-Requires:      %{name}-base = %{version}-%{release}
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-base = %{epoch}:%{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Requires:      FHS >= 3.0-2
 Requires:      openssl >= %{openssl_ver}
 Requires:      popt >= %{reqpopt_ver}
@@ -262,7 +266,7 @@ Summary(pt_BR.UTF-8):       Arquivos de inclusão e bibliotecas para programas de mani
 Summary(ru.UTF-8):     Хедеры и библиотеки для программ, работающих с rpm-пакетами
 Summary(uk.UTF-8):     Хедери та бібліотеки для програм, що працюють з пакетами rpm
 Group:         Development/Libraries
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Requires:      %{reqdb_pkg}-devel >= %{reqdb_pkgver}
 Requires:      bzip2-devel
 Requires:      elfutils-devel
@@ -326,7 +330,7 @@ Summary:    Additional utilities for managing RPM packages and database
 Summary(de.UTF-8):     Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken
 Summary(pl.UTF-8):     Dodatkowe narzędzia do zarządzania bazą RPM-a i pakietami
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      popt >= %{reqpopt_ver}
 %if %{with recommends_tags}
 Recommends:    bzip2
@@ -354,7 +358,7 @@ Group:              Applications/File
 Requires(pretrans):    coreutils
 Requires(pretrans):    findutils
 Requires:      %{name}-build-macros >= 1.712
-Requires:      %{name}-utils = %{version}-%{release}
+Requires:      %{name}-utils = %{epoch}:%{version}-%{release}
 Requires:      /bin/id
 Requires:      awk
 Requires:      bzip2
@@ -413,7 +417,7 @@ construir pacotes usando o RPM.
 Summary:       Additional utilities for checking Java provides/requires in RPM packages
 Summary(pl.UTF-8):     Dodatkowe narzędzia do sprawdzania zależności kodu w Javie w pakietach RPM
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      file
 Requires:      findutils >= 1:4.2.26
 Requires:      mktemp
@@ -432,7 +436,7 @@ Summary:    Additional utilities for checking Perl provides/requires in RPM package
 Summary(de.UTF-8):     Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
 Summary(pl.UTF-8):     Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      perl-Encode
 Requires:      perl-devel
 Requires:      perl-modules
@@ -452,7 +456,7 @@ pakietach RPM.
 Summary:       Python macros, which simplifies creation of RPM packages with Python software
 Summary(pl.UTF-8):     Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Pythonie
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      python
 Requires:      python-modules
 Requires:      python-setuptools
@@ -469,7 +473,7 @@ Pythonie.
 Summary:       Additional utilities for checking PHP PEAR provides/requires in RPM packages
 Summary(pl.UTF-8):     Dodatkowe narzędzia do sprawdzania zależności skryptów php w RPM
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      sed >= 4.0
 Suggests:      php-pear-PHP_CompatInfo
 
@@ -485,7 +489,7 @@ pakietach RPM.
 Summary:       Ruby tools, which simplify creation of RPM packages with Ruby software
 Summary(pl.UTF-8):     Makra ułatwiające tworzenie pakietów RPM z programami napisanymi w Ruby
 Group:         Applications/File
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      ruby
 Requires:      ruby-modules
 Requires:      ruby-rubygems
@@ -503,7 +507,7 @@ Summary:    Python interface to RPM library
 Summary(pl.UTF-8):     Pythonowy interfejs do biblioteki RPM-a
 Summary(pt_BR.UTF-8):  Módulo Python para aplicativos que manipulam pacotes RPM
 Group:         Development/Languages/Python
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      python
 Obsoletes:     rpm-python
 
@@ -535,7 +539,7 @@ Summary:    Python 3 interface to RPM library
 Summary(pl.UTF-8):     Interfejs Pythona 3 do biblioteki RPM-a
 Summary(pt_BR.UTF-8):  Módulo Python 3 para aplicativos que manipulam pacotes RPM
 Group:         Development/Languages/Python
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      python3
 
 %description -n python3-rpm
@@ -564,7 +568,7 @@ Python 3 para manipular pacotes e bancos de dados RPM.
 %package plugin-audit
 Summary:       Plugin for logging audit events on package operations
 Group:         System/Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description plugin-audit
 Plugin for libaudit support
@@ -572,7 +576,7 @@ Plugin for libaudit support
 %package plugin-syslog
 Summary:       Plugin for syslog functionality
 Group:         System/Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description plugin-syslog
 This plugin exports RPM actions to the system log.
@@ -580,7 +584,7 @@ This plugin exports RPM actions to the system log.
 %package plugin-systemd-inhibit
 Summary:       Plugin for systemd inhibit functionality
 Group:         System/Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description plugin-systemd-inhibit
 This plugin blocks systemd from entering idle, sleep or shutdown while
@@ -589,7 +593,7 @@ an rpm transaction is running using the systemd-inhibit mechanism.
 %package plugin-ima
 Summary:       Plugin for IMA file signatures
 Group:         Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description plugin-ima
 This plugin adds support for enforcing and verifying IMA file
@@ -598,7 +602,7 @@ signatures in an rpm.
 %package plugin-prioreset
 Summary:       Plugin for resetting scriptlet priorities for SysV init
 Group:         Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description plugin-prioreset
 This plugin is useful on legacy SysV init systems if you run rpm
@@ -608,7 +612,7 @@ systemd systems.
 %package plugin-selinux
 Summary:       Plugin for SELinux functionality
 Group:         Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Requires:      libselinux >= 2.1.0
 
 %description plugin-selinux
@@ -617,7 +621,7 @@ Plugin for SELinux functionality.
 %package sign
 Summary:       Package signing support
 Group:         Base
-Requires:      %{name}-lib = %{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description sign
 This package contains support for digitally signing RPM packages.
@@ -657,9 +661,9 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch16 -p1
 %patch17 -p1
 #%patch18 -p1
-#%patch19 -p1
+%patch20 -p1
+%patch21 -p1
 
-install %{SOURCE2} pld.in
 install %{SOURCE8} scripts/php.prov.in
 install %{SOURCE9} scripts/php.req.in
 install %{SOURCE11} scripts/perl.prov.in
@@ -748,7 +752,7 @@ cd python
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/{rpm,pki/rpm-gpg}} \
-       $RPM_BUILD_ROOT{/var/lib/banner,/var/cache/hrmib}
+       $RPM_BUILD_ROOT{/var/lib/{banner,rpm},/var/cache/hrmib}
 
 cp -p %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/PLD-3.0-Th-GPG-key.asc
 
@@ -797,6 +801,10 @@ rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros
 
 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
 
+install -d $RPM_BUILD_ROOT%{_rpmlibdir}/pld
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_rpmlibdir}/pld/macros
+cp -p %{SOURCE32} $RPM_BUILD_ROOT%{_rpmlibdir}/pld/rpmrc
+
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
@@ -842,6 +850,8 @@ for a in librpm.so librpmbuild.so librpmio.so librpmsign.so; do
        ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${a}.*.*.*) $RPM_BUILD_ROOT%{_libdir}/${a}
 done
 
+#./rpmdb --macros=macros --rcfile=rpmrc --dbpath=/home/users/baggins/devel/PLD/rpm/BUILD/rpm-4.15.1/x/ --initdb
+
 %if %{with python2}
 # Remove anything that rpm make install might put there
 %{__rm} -rf $RPM_BUILD_ROOT%{py_sitedir}
@@ -932,10 +942,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %lang(ru) %{_mandir}/ru/man8/rpm.8*
 %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 /var/lib/rpm
 
 # exported package NVRA (stamped with install tid)
 # net-snmp hrSWInstalledName queries, bash-completions
@@ -945,7 +952,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_rpmlibdir}/rpmrc
 %{_rpmlibdir}/macros
 %dir %{_rpmlibdir}/macros.d
-#%{_rpmlibdir}/macros.d/pld
+%dir %{_rpmlibdir}/platform
 %{_rpmlibdir}/platform/noarch-*
 %ifarch %{ix86} %{x8664} x32
 %{_rpmlibdir}/platform/athlon*
@@ -975,12 +982,18 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_rpmlibdir}/platform/sparc*
 %endif
 
+%{_rpmlibdir}/pld/macros
+%{_rpmlibdir}/pld/rpmrc
+
 %attr(755,root,root) %{_rpmlibdir}/hrmib-cache
 
 %attr(755,root,root) %{_rpmlibdir}/dbupgrade.sh
 %attr(755,root,root) %{_rpmlibdir}/rpmdb_checkversion
 %attr(755,root,root) %{_rpmlibdir}/rpmdb_reset
 
+# valgrind suppression file for rpm
+%{_rpmlibdir}/rpm.supp
+
 %files base
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/rpm
@@ -1068,11 +1081,29 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 #%{_rpmlibdir}/macros.d/tcl
 #%{_rpmlibdir}/macros.rpmbuild
 
+%attr(755,root,root) %{_rpmlibdir}/check-buildroot
+%attr(755,root,root) %{_rpmlibdir}/check-prereqs
+%attr(755,root,root) %{_rpmlibdir}/check-rpaths
+%attr(755,root,root) %{_rpmlibdir}/check-rpaths-worker
+%attr(755,root,root) %{_rpmlibdir}/debuginfo.prov
+%attr(755,root,root) %{_rpmlibdir}/desktop-file.prov
+%attr(755,root,root) %{_rpmlibdir}/find-provides
+%attr(755,root,root) %{_rpmlibdir}/find-requires
+%attr(755,root,root) %{_rpmlibdir}/metainfo.prov
+%attr(755,root,root) %{_rpmlibdir}/ocaml-find-provides.sh
+%attr(755,root,root) %{_rpmlibdir}/ocaml-find-requires.sh
+%attr(755,root,root) %{_rpmlibdir}/script.req
+%attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
+# Fedora has this in -build, but shouldn't this be in -devel?
+%attr(755,root,root) %{_rpmlibdir}/config.guess
+%attr(755,root,root) %{_rpmlibdir}/config.sub
+
 %dir %{_rpmlibdir}/fileattrs
 %{_rpmlibdir}/fileattrs/debuginfo.attr
 %{_rpmlibdir}/fileattrs/desktop.attr
 %{_rpmlibdir}/fileattrs/elf.attr
 %{_rpmlibdir}/fileattrs/font.attr
+%{_rpmlibdir}/fileattrs/java.attr
 %{_rpmlibdir}/fileattrs/libtool.attr
 %{_rpmlibdir}/fileattrs/metainfo.attr
 %{_rpmlibdir}/fileattrs/ocaml.attr
@@ -1177,23 +1208,3 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %defattr(644,root,root,755)
 %doc doc/librpm/html/*
 %endif
-
-%if 0
-%attr(755,root,root) %{_rpmlibdir}/check-buildroot
-%attr(755,root,root) %{_rpmlibdir}/check-prereqs
-%attr(755,root,root) %{_rpmlibdir}/check-rpaths
-%attr(755,root,root) %{_rpmlibdir}/check-rpaths-worker
-%attr(755,root,root) %{_rpmlibdir}/config.guess
-%attr(755,root,root) %{_rpmlibdir}/config.sub
-%attr(755,root,root) %{_rpmlibdir}/debuginfo.prov
-%attr(755,root,root) %{_rpmlibdir}/desktop-file.prov
-%attr(755,root,root) %{_rpmlibdir}/find-provides
-%attr(755,root,root) %{_rpmlibdir}/find-requires
-%attr(755,root,root) %{_rpmlibdir}/metainfo.prov
-%attr(755,root,root) %{_rpmlibdir}/ocaml-find-provides.sh
-%attr(755,root,root) %{_rpmlibdir}/ocaml-find-requires.sh
-# valgrind suppression file for rpm
-%{_rpmlibdir}/rpm.supp
-%attr(755,root,root) %{_rpmlibdir}/script.req
-%attr(755,root,root) %{_rpmlibdir}/sepdebugcrcfix
-%endif
This page took 0.048345 seconds and 4 git commands to generate.