2006-12-19 00:17:44 +01:00
|
|
|
#
|
2011-02-19 18:30:04 +01:00
|
|
|
# spec file for package rpm
|
2006-12-19 00:17:44 +01:00
|
|
|
#
|
2017-01-19 16:41:55 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-19 00:17:44 +01:00
|
|
|
#
|
2008-08-08 17:23:33 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-08-30 18:55:27 +02:00
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
Name: rpm
|
2012-01-28 15:20:26 +01:00
|
|
|
BuildRequires: binutils
|
|
|
|
BuildRequires: bzip2
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: file-devel
|
2012-01-28 15:20:26 +01:00
|
|
|
BuildRequires: findutils
|
|
|
|
BuildRequires: gcc
|
2013-06-20 15:48:24 +02:00
|
|
|
BuildRequires: gettext-devel
|
2012-11-12 11:30:04 +01:00
|
|
|
BuildRequires: glibc-devel
|
2012-01-28 15:20:26 +01:00
|
|
|
BuildRequires: gzip
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libbz2-devel
|
|
|
|
BuildRequires: libcap-devel
|
|
|
|
BuildRequires: libelf-devel
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: libsemanage-devel
|
|
|
|
BuildRequires: libtool
|
2015-08-10 15:16:09 +02:00
|
|
|
BuildRequires: lua-devel
|
2012-01-28 15:20:26 +01:00
|
|
|
BuildRequires: make
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: ncurses-devel
|
2012-01-28 15:20:26 +01:00
|
|
|
BuildRequires: patch
|
|
|
|
BuildRequires: perl-base
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: popt-devel
|
2012-11-12 11:30:04 +01:00
|
|
|
BuildRequires: rpm-build
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: xz-devel
|
|
|
|
BuildRequires: zlib-devel
|
2009-08-28 15:54:03 +02:00
|
|
|
#!BuildIgnore: rpmlint-Factory
|
2006-12-19 00:17:44 +01:00
|
|
|
Provides: rpminst
|
2012-11-04 11:17:25 +01:00
|
|
|
PreReq: %fillup_prereq
|
2006-12-19 00:17:44 +01:00
|
|
|
Summary: The RPM Package Manager
|
2011-12-11 22:58:21 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: System/Packages
|
2017-02-20 14:21:27 +01:00
|
|
|
Version: 4.13.0.1
|
2011-12-11 22:58:21 +01:00
|
|
|
Release: 0
|
2017-01-20 11:19:43 +01:00
|
|
|
Source: http://ftp.rpm.org/releases/rpm-4.13.x/rpm-%{version}.tar.bz2
|
2006-12-19 00:17:44 +01:00
|
|
|
Source1: RPM-HOWTO.tar.bz2
|
|
|
|
Source4: rpm-suse_macros
|
|
|
|
Source5: rpmsort
|
|
|
|
Source8: rpmconfigcheck
|
|
|
|
Source9: sysconfig.services-rpm
|
2008-10-06 16:13:13 +02:00
|
|
|
Source10: beecrypt-4.1.2.tar.bz2
|
2011-05-16 18:07:44 +02:00
|
|
|
Source11: db-4.8.30.tar.bz2
|
2010-01-14 14:59:15 +01:00
|
|
|
Source12: baselibs.conf
|
2017-03-29 14:08:58 +02:00
|
|
|
Source13: rpmconfigcheck.service
|
2008-10-06 16:13:13 +02:00
|
|
|
Patch1: beecrypt-4.1.2.diff
|
|
|
|
Patch2: db.diff
|
2015-01-23 18:36:17 +01:00
|
|
|
Patch3: rpm-4.12.0.1-fix-bashisms.patch
|
2016-02-09 10:44:11 +01:00
|
|
|
Patch4: beecrypt-4.1.2-build.diff
|
2017-10-27 16:36:12 +02:00
|
|
|
Patch5: usr-lib-sysimage-rpm.patch
|
2006-12-19 00:17:44 +01:00
|
|
|
# quilt patches start here
|
2009-08-28 15:54:03 +02:00
|
|
|
Patch11: debugedit.diff
|
2013-02-20 18:32:28 +01:00
|
|
|
Patch13: ignore-auxv.diff
|
2008-09-12 20:37:28 +02:00
|
|
|
Patch12: localetag.diff
|
|
|
|
Patch14: nameversioncompare.diff
|
2011-07-20 13:43:02 +02:00
|
|
|
Patch15: dbfsync.diff
|
|
|
|
Patch16: dbrointerruptable.diff
|
|
|
|
Patch17: extcond.diff
|
|
|
|
Patch18: refreshtestarch.diff
|
|
|
|
Patch19: rpmrctests.diff
|
|
|
|
Patch20: waitlock.diff
|
|
|
|
Patch21: suspendlock.diff
|
|
|
|
Patch24: brp.diff
|
|
|
|
Patch25: brpcompress.diff
|
|
|
|
Patch26: checkfilesnoinfodir.diff
|
|
|
|
Patch27: finddebuginfo.diff
|
|
|
|
Patch28: findksyms.diff
|
|
|
|
Patch29: findlang.diff
|
|
|
|
Patch30: macrosin.diff
|
|
|
|
Patch31: modalias.diff
|
|
|
|
Patch32: platformin.diff
|
|
|
|
Patch33: rpmpopt.diff
|
|
|
|
Patch34: rpmrc.diff
|
|
|
|
Patch35: taggedfileindex.diff
|
|
|
|
Patch36: rpmqpack.diff
|
|
|
|
Patch37: convertdb1static.diff
|
|
|
|
Patch38: build.diff
|
|
|
|
Patch41: debugedit-comp-dir.diff
|
|
|
|
Patch42: perlprov.diff
|
|
|
|
Patch43: rpm-shorten-changelog.diff
|
|
|
|
Patch44: debugsource-package.diff
|
|
|
|
Patch45: whatrequires-doc.diff
|
|
|
|
Patch46: remove-brp-strips.diff
|
|
|
|
Patch47: requires-ge-macro.diff
|
|
|
|
Patch48: debugedit-canon-fix.diff
|
|
|
|
Patch49: finddebuginfo-absolute-links.diff
|
|
|
|
Patch50: firmware.diff
|
|
|
|
Patch51: specfilemacro.diff
|
|
|
|
Patch52: modalias-encode.diff
|
|
|
|
Patch53: disttag-macro.diff
|
|
|
|
Patch54: buildidprov.diff
|
|
|
|
Patch55: debugsubpkg.diff
|
|
|
|
Patch56: debuglink.diff
|
|
|
|
Patch57: debuginfo-mono.patch
|
|
|
|
Patch58: lazystatfs.diff
|
|
|
|
Patch60: safeugid.diff
|
|
|
|
Patch61: noprereqdeprec.diff
|
2012-08-28 15:31:44 +02:00
|
|
|
Patch65: initscriptsprov.diff
|
|
|
|
Patch66: remove-translations.diff
|
|
|
|
Patch67: headeradddb.diff
|
|
|
|
Patch68: dbprivate.diff
|
|
|
|
Patch69: nobuildcolor.diff
|
|
|
|
Patch70: fileattrs.diff
|
|
|
|
Patch71: nomagiccheck.diff
|
|
|
|
Patch73: assumeexec.diff
|
|
|
|
Patch74: mono-find-requires.diff
|
|
|
|
Patch75: rpm-deptracking.patch
|
|
|
|
Patch76: python3-abi-kind.diff
|
|
|
|
Patch77: langnoc.diff
|
|
|
|
Patch78: headerchk2.diff
|
2017-03-09 09:40:16 +01:00
|
|
|
# PATCH-FEATURE-UPSTREAM 4.14 0e87aed1785d0531c40b23889f8338744f6abb3a
|
|
|
|
Patch80: 0001-set-SOURCE_DATE_EPOCH-from-changelog.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM 4.14 57f94a582602f0353cdb17a02dc12c4461d4f32d
|
|
|
|
Patch81: 0002-Extend-changelog-to-support-full-timestamps-903.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM 4.14 8d84878ee05b2e63858af3a5a49d98e9e2933b1b
|
|
|
|
Patch82: 0003-Allow-SOURCE_DATE_EPOCH-to-override-file-timestamps.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM 4.14 b8a54d6a1e9bb6140b6b47e23dc707e4b967537e
|
|
|
|
Patch83: 0004-Allow-SOURCE_DATE_EPOCH-to-override-RPMTAG_BUILDTIME.patch
|
2013-09-05 16:43:27 +02:00
|
|
|
Patch85: brp-compress-no-img.patch
|
2013-11-20 12:31:44 +01:00
|
|
|
Patch92: find-lang-python.patch
|
2014-02-20 16:37:39 +01:00
|
|
|
Patch93: weakdepscompat.diff
|
2014-02-21 13:32:18 +01:00
|
|
|
Patch94: checksepwarn.diff
|
2016-04-21 15:24:43 +02:00
|
|
|
Patch98: normalize_blocksize.diff
|
|
|
|
Patch99: enable-postin-scripts-error.diff
|
2016-05-19 14:15:30 +02:00
|
|
|
Patch100: rpm-findlang-inject-metainfo.patch
|
2017-01-19 16:41:55 +01:00
|
|
|
Patch101: nobfd.diff
|
2017-01-20 11:19:43 +01:00
|
|
|
Patch102: emptymanifest.diff
|
2017-05-01 23:01:09 +02:00
|
|
|
Patch103: find-lang-qt-qm.patch
|
2017-06-14 16:12:41 +02:00
|
|
|
Patch104: perlprov-package.diff
|
2017-07-05 16:33:40 +02:00
|
|
|
Patch105: changes-doc.diff
|
2013-11-29 14:43:44 +01:00
|
|
|
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
2006-12-19 00:17:44 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
#
|
2008-03-28 17:11:41 +01:00
|
|
|
# avoid bootstrapping problem
|
|
|
|
%define _binary_payload w9.bzdio
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
RPM Package Manager is the main tool for managing the software packages
|
2014-08-18 15:03:18 +02:00
|
|
|
of the SUSE Linux distribution.
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
RPM can be used to install and remove software packages. With rpm, it
|
|
|
|
is easy to update packages. RPM keeps track of all these manipulations
|
|
|
|
in a central database. This way it is possible to get an overview of
|
|
|
|
all installed packages. RPM also supports database queries.
|
|
|
|
|
|
|
|
%package devel
|
2008-08-21 17:44:07 +02:00
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
2013-01-10 13:05:35 +01:00
|
|
|
Group: System/Packages
|
2006-12-19 00:17:44 +01:00
|
|
|
Requires: rpm = %{version}
|
2012-01-17 12:13:52 +01:00
|
|
|
# for people confusing the one with the other
|
|
|
|
Recommends: rpm-build = %{version}
|
2008-10-22 17:28:47 +02:00
|
|
|
Requires: popt-devel
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the RPM C library and header files. These
|
|
|
|
development files will simplify the process of writing programs which
|
|
|
|
manipulate RPM packages and databases and are intended to make it
|
|
|
|
easier to create graphical package managers or any other tools that
|
|
|
|
need an intimate knowledge of RPM packages in order to function.
|
|
|
|
|
2012-01-17 12:13:52 +01:00
|
|
|
%package build
|
|
|
|
Summary: Tools and Scripts to create rpm packages
|
2013-01-10 13:05:35 +01:00
|
|
|
Group: System/Packages
|
2012-01-17 12:13:52 +01:00
|
|
|
Requires: rpm = %{version}
|
2012-03-14 11:19:44 +01:00
|
|
|
Provides: rpm:%_bindir/rpmbuild
|
|
|
|
Provides: rpmbuild
|
2012-01-17 12:13:52 +01:00
|
|
|
# SUSE's build essentials
|
|
|
|
Requires: binutils
|
2012-03-14 11:19:44 +01:00
|
|
|
Requires: bzip2
|
2012-11-04 09:54:42 +01:00
|
|
|
Requires: coreutils
|
|
|
|
Requires: diffutils
|
2017-03-20 17:57:43 +01:00
|
|
|
Requires: dwz
|
2012-10-28 06:21:04 +01:00
|
|
|
Requires: file
|
2012-03-14 11:19:44 +01:00
|
|
|
Requires: findutils
|
2012-10-28 06:21:04 +01:00
|
|
|
Requires: gawk
|
2012-01-17 12:13:52 +01:00
|
|
|
Requires: gcc
|
2015-02-27 13:23:20 +01:00
|
|
|
#Requires: gcc-PIE
|
2012-01-17 12:13:52 +01:00
|
|
|
Requires: gettext-tools
|
|
|
|
Requires: glibc-devel
|
2012-11-04 09:54:42 +01:00
|
|
|
Requires: glibc-locale
|
|
|
|
Requires: grep
|
2012-03-14 11:19:44 +01:00
|
|
|
Requires: gzip
|
|
|
|
Requires: make
|
|
|
|
Requires: patch
|
2012-01-17 12:13:52 +01:00
|
|
|
Requires: perl-base
|
2012-11-04 09:54:42 +01:00
|
|
|
Requires: sed
|
2013-06-20 11:47:13 +02:00
|
|
|
Requires: systemd-rpm-macros
|
2012-07-19 10:52:30 +02:00
|
|
|
Requires: tar
|
2012-09-13 16:06:11 +02:00
|
|
|
Requires: util-linux
|
2013-03-30 14:54:06 +01:00
|
|
|
Requires: which
|
2012-03-14 11:19:44 +01:00
|
|
|
Requires: xz
|
2012-11-04 09:54:42 +01:00
|
|
|
# drop candidates
|
|
|
|
Requires: cpio
|
|
|
|
Requires: file
|
2006-12-19 00:17:44 +01:00
|
|
|
|
2012-01-17 12:13:52 +01:00
|
|
|
%description build
|
|
|
|
If you want to build a rpm, you need this package. It provides rpmbuild
|
2016-05-31 14:02:53 +02:00
|
|
|
and requires some packages that are usually required.
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n rpm-%{version}
|
|
|
|
rm -rf sqlite
|
|
|
|
rm -rf beecrypt
|
|
|
|
tar xjf %{SOURCE10}
|
2009-08-28 15:54:03 +02:00
|
|
|
tar xjf %{SOURCE11}
|
2011-05-16 18:07:44 +02:00
|
|
|
ln -s db-4.8.30 db
|
2015-02-27 13:22:00 +01:00
|
|
|
cd db
|
|
|
|
%patch2 -p1
|
|
|
|
cd ..
|
2006-12-19 00:17:44 +01:00
|
|
|
ln -s beecrypt-4.1.2 beecrypt
|
2011-05-16 18:07:44 +02:00
|
|
|
chmod -R u+w db/*
|
2006-12-19 00:17:44 +01:00
|
|
|
rm -f rpmdb/db.h
|
2015-02-27 13:22:00 +01:00
|
|
|
%patch -P 1
|
2015-01-23 18:36:17 +01:00
|
|
|
%patch3 -p1
|
2016-02-09 10:44:11 +01:00
|
|
|
%patch -P 4
|
2017-10-16 15:34:53 +02:00
|
|
|
%patch5 -p1
|
2014-09-16 14:03:10 +02:00
|
|
|
%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
|
|
|
|
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
|
2017-09-20 17:29:49 +02:00
|
|
|
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38
|
2013-07-12 17:55:33 +02:00
|
|
|
%patch -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
2017-01-20 11:19:43 +01:00
|
|
|
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58
|
2014-09-16 14:03:10 +02:00
|
|
|
%patch -P 60 -P 61 -P 65 -P 66 -P 67 -P 68 -P 69
|
2017-09-20 17:29:49 +02:00
|
|
|
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78
|
2017-03-09 09:40:16 +01:00
|
|
|
%patch -P 80 -P 81 -P 82 -P 83 -P 85
|
2017-09-20 17:29:49 +02:00
|
|
|
%patch -P 92 -P 93 -P 94 -P 98 -P 99
|
2017-07-05 16:33:40 +02:00
|
|
|
%patch -P 100 -P 101 -P 102 -P 103 -P 104 -P 105
|
2013-11-07 13:37:02 +01:00
|
|
|
|
2013-12-02 17:47:02 +01:00
|
|
|
%ifarch aarch64 ppc64le
|
2013-05-06 20:20:13 +02:00
|
|
|
%patch6464
|
2013-04-23 00:00:49 +02:00
|
|
|
%endif
|
2014-02-20 14:18:41 +01:00
|
|
|
|
2013-02-20 18:32:28 +01:00
|
|
|
cp config.guess config.sub db/dist/
|
|
|
|
cp config.guess config.sub beecrypt/
|
2009-08-28 15:54:03 +02:00
|
|
|
#chmod 755 scripts/find-supplements{,.ksyms}
|
|
|
|
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
|
|
|
|
#chmod 755 scripts/firmware.prov
|
|
|
|
#chmod 755 scripts/debuginfo.prov
|
2006-12-19 00:17:44 +01:00
|
|
|
tar -xjvf %{SOURCE1}
|
2013-11-28 11:41:40 +01:00
|
|
|
sed -e 's/@suse_version@/%{?suse_version}%{!?suse_version:0}/' \
|
|
|
|
-e 's/@sles_version@/%{?sles_version}%{!?sles_version:0}/' \
|
|
|
|
-e 's/@ul_version@/%{?ul_version}%{!?ul_version:0}/' \
|
2016-05-31 14:02:53 +02:00
|
|
|
-e '/@is_opensuse@%{?is_opensuse:nomatch}/d' \
|
|
|
|
-e 's/@is_opensuse@/%{?is_opensuse}%{!?is_opensuse:0}/' \
|
|
|
|
-e '/@leap_version@%{?leap_version:nomatch}/d' \
|
|
|
|
-e 's/@leap_version@/%{?leap_version}%{!?leap_version:0}/' \
|
2013-11-28 11:41:40 +01:00
|
|
|
< %{SOURCE4} > suse_macros
|
2011-05-16 18:07:44 +02:00
|
|
|
rm -f m4/libtool.m4
|
|
|
|
rm -f m4/lt*.m4
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%build
|
2012-01-18 15:30:38 +01:00
|
|
|
export CFLAGS="%{optflags} -ffunction-sections"
|
2007-07-23 20:54:09 +02:00
|
|
|
export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
|
2012-10-10 15:16:36 +02:00
|
|
|
%ifarch alpha
|
2011-09-29 20:22:32 +02:00
|
|
|
export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
|
2006-12-19 00:17:44 +01:00
|
|
|
%endif
|
2011-09-29 20:22:32 +02:00
|
|
|
|
|
|
|
%ifarch %arm
|
|
|
|
BUILDTARGET="--build=%{_target_cpu}-suse-linux-gnueabi"
|
|
|
|
%else
|
|
|
|
BUILDTARGET="--build=%{_target_cpu}-suse-linux"
|
|
|
|
%endif
|
|
|
|
|
2010-03-26 11:56:28 +01:00
|
|
|
#cp -p /usr/share/gettext/config.rpath .
|
2009-08-28 15:54:03 +02:00
|
|
|
cp autogen.sh beecrypt
|
|
|
|
pushd beecrypt
|
2011-11-21 15:59:28 +01:00
|
|
|
./autogen.sh --disable-dependency-tracking --with-pic --without-python $BUILDTARGET
|
2010-07-20 20:12:09 +02:00
|
|
|
make %{?_smp_mflags}
|
2009-08-28 15:54:03 +02:00
|
|
|
popd
|
2011-09-29 20:22:32 +02:00
|
|
|
|
2012-11-04 09:54:42 +01:00
|
|
|
export PYTHON=python%{with_python}
|
|
|
|
autoreconf -fi
|
|
|
|
sed -i -e 's,{PYTHON_VERSION}mu,{PYTHON_VERSION}mu python${PYTHON_VERSION}m,' configure
|
|
|
|
./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
|
2017-07-05 16:33:40 +02:00
|
|
|
--libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --with-lua \
|
2012-08-28 15:31:44 +02:00
|
|
|
--with-vendor=suse \
|
2014-04-25 15:42:44 +02:00
|
|
|
--with-rundir=/run \
|
2014-09-16 14:03:10 +02:00
|
|
|
--without-archive \
|
2011-09-29 20:22:32 +02:00
|
|
|
--with-selinux --with-internal-beecrypt \
|
|
|
|
--with-acl --with-cap --enable-shared %{?with_python: --enable-python} $BUILDTARGET
|
2011-09-23 11:03:13 +02:00
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
rm po/de.gmo
|
2011-05-17 16:07:47 +02:00
|
|
|
make %{?_smp_mflags}
|
2009-08-28 15:54:03 +02:00
|
|
|
make convertdb1
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%install
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir -p %{buildroot}/usr/lib
|
|
|
|
mkdir -p %{buildroot}/usr/share/locale
|
|
|
|
ln -s ../share/locale %{buildroot}/usr/lib/locale
|
|
|
|
%make_install
|
|
|
|
install -m 755 convertdb1 %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 644 db3/db.h %{buildroot}/usr/include/rpm
|
2007-03-23 17:13:50 +01:00
|
|
|
# remove .la file and the static variant of libpopt
|
|
|
|
# have to remove the dependency from other .la files as well
|
2012-01-18 15:30:38 +01:00
|
|
|
for f in %{buildroot}/%{_libdir}/*.la; do
|
2007-03-23 17:13:50 +01:00
|
|
|
sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f
|
|
|
|
done
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir -p %{buildroot}/usr/sbin
|
2017-03-29 14:08:58 +02:00
|
|
|
install -m 755 %{SOURCE8} %{buildroot}/usr/sbin
|
|
|
|
mkdir -p %{buildroot}/usr/lib/systemd/system
|
|
|
|
install -m 644 %{SOURCE13} %{buildroot}/usr/lib/systemd/system/
|
2012-01-18 15:30:38 +01:00
|
|
|
cp -a suse_macros %{buildroot}/usr/lib/rpm
|
2014-01-31 15:07:52 +01:00
|
|
|
mkdir -p %{buildroot}/usr/lib/rpm/macros.d
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir -p %{buildroot}/usr/lib/rpm/suse
|
|
|
|
ln -s ../suse_macros %{buildroot}/usr/lib/rpm/suse/macros
|
2009-08-28 15:54:03 +02:00
|
|
|
for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir -p %{buildroot}/usr/src/packages/$d
|
|
|
|
chmod 755 %{buildroot}/usr/src/packages/$d
|
2009-08-28 15:54:03 +02:00
|
|
|
done
|
2012-01-18 15:30:38 +01:00
|
|
|
for d in %{buildroot}/usr/lib/rpm/platform/*-linux/macros ; do
|
2009-08-28 15:54:03 +02:00
|
|
|
dd=${d%%-linux/macros}
|
|
|
|
dd=${dd##*/}
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir %{buildroot}/usr/src/packages/RPMS/$dd
|
|
|
|
chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd
|
2009-08-28 15:54:03 +02:00
|
|
|
done
|
2017-10-27 16:36:12 +02:00
|
|
|
mkdir -p %{buildroot}/usr/lib/sysimage/rpm
|
2012-01-18 15:30:38 +01:00
|
|
|
mkdir -p %{buildroot}/var/lib/rpm
|
|
|
|
gzip -9 %{buildroot}/%{_mandir}/man[18]/*.[18]
|
2006-12-19 00:17:44 +01:00
|
|
|
export RPM_BUILD_ROOT
|
|
|
|
%ifarch s390x
|
|
|
|
[ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux
|
|
|
|
%endif
|
|
|
|
chmod 755 doc/manual
|
2007-08-10 17:16:08 +02:00
|
|
|
rm -rf doc/manual/Makefile*
|
2012-01-18 15:30:38 +01:00
|
|
|
rm -f %{buildroot}/usr/lib/rpmpopt
|
|
|
|
rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk}
|
|
|
|
rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo
|
|
|
|
mkdir -p %{buildroot}/var/adm/fillup-templates
|
|
|
|
install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/
|
|
|
|
rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
|
|
|
|
install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
|
|
|
|
rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc
|
|
|
|
mkdir -p %{buildroot}/etc/rpm
|
|
|
|
chmod 755 %{buildroot}/etc/rpm
|
2007-07-23 20:54:09 +02:00
|
|
|
# remove some nonsense or non-working scripts
|
2012-01-18 15:30:38 +01:00
|
|
|
pushd %{buildroot}/usr/lib/rpm/
|
2007-07-23 20:54:09 +02:00
|
|
|
for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
|
|
|
|
magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
|
|
|
|
brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
|
2013-07-12 16:11:14 +02:00
|
|
|
brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
|
2007-07-23 20:54:09 +02:00
|
|
|
do
|
2009-08-28 15:54:03 +02:00
|
|
|
rm -f $f
|
2007-07-23 20:54:09 +02:00
|
|
|
done
|
|
|
|
for i in /usr/share/automake-*/*; do
|
|
|
|
if test -f "$i" && test -f "${i##*/}"; then
|
|
|
|
rm -f "${i##*/}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
2013-12-02 17:47:02 +01:00
|
|
|
%ifarch aarch64 ppc64le
|
2013-04-23 00:00:49 +02:00
|
|
|
install -m 755 config.guess %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 755 config.sub %{buildroot}/usr/lib/rpm
|
|
|
|
%endif
|
2007-07-23 20:54:09 +02:00
|
|
|
gzip -9 CHANGES
|
2012-01-18 15:30:38 +01:00
|
|
|
rm -rf %{buildroot}/%{_libdir}/python%{py_ver}
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.la
|
|
|
|
rm -f %{buildroot}%{_libdir}/rpm-plugins/*.la
|
|
|
|
sh %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm
|
2012-06-10 14:06:11 +02:00
|
|
|
# On arm the kernel architecture is ignored. Not the best idea, but lets stay compatible with other distros
|
2013-07-02 11:53:17 +02:00
|
|
|
%ifarch armv7hl armv6hl
|
|
|
|
# rpm is using the host_cpu as default for the platform, but armv6/7hl is not known by the kernel.
|
2011-10-01 00:47:43 +02:00
|
|
|
# so we need to enforce the platform here.
|
2013-07-02 11:53:17 +02:00
|
|
|
echo -n "%{_target_cpu}-suse-linux-gnueabi" > %{buildroot}/etc/rpm/platform
|
2012-06-10 14:06:11 +02:00
|
|
|
%endif
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_only -an services}
|
2017-10-16 15:34:53 +02:00
|
|
|
|
2017-10-27 16:36:12 +02:00
|
|
|
# var/lib/rpm migration: set forwards compatible symlink for /usr/lib/sysimage/rpm so scriptlets in same transaction will still work
|
2017-10-16 15:34:53 +02:00
|
|
|
if (test ! -L var/lib/rpm) && (test -f var/lib/rpm/Packages) ; then
|
2017-10-27 16:36:12 +02:00
|
|
|
rmdir usr/lib/sysimage/rpm
|
|
|
|
ln -s ../../var/lib/rpm usr/lib/sysimage/rpm
|
2017-10-16 15:34:53 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-27 16:36:12 +02:00
|
|
|
test -f usr/lib/sysimage/rpm/Packages || rpmdb --initdb
|
2017-10-16 15:34:53 +02:00
|
|
|
|
|
|
|
%posttrans
|
|
|
|
# var/lib/rpm migration
|
|
|
|
if test ! -L var/lib/rpm ; then
|
|
|
|
if test -s var/lib/rpm/packages.rpm ; then
|
|
|
|
echo "converting rpm-3 database to rpm-4 format..."
|
|
|
|
usr/lib/rpm/convertdb1 var/lib/rpm/packages.rpm
|
|
|
|
mv -f var/lib/rpm/packages.rpm var/lib/rpm/packages.rpm3
|
|
|
|
rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm
|
|
|
|
fi
|
|
|
|
# delete no longer maintained databases
|
2017-10-27 16:36:12 +02:00
|
|
|
rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion
|
2017-10-16 15:34:53 +02:00
|
|
|
|
|
|
|
if test -f var/lib/rpm/Packages ; then
|
2017-10-27 16:36:12 +02:00
|
|
|
echo "migrating rpmdb from /var/lib/rpm to /usr/lib/sysimage/rpm..."
|
2017-10-16 15:34:53 +02:00
|
|
|
|
|
|
|
# remove forwards compatible symlink
|
2017-10-27 16:36:12 +02:00
|
|
|
if test -L usr/lib/sysimage/rpm ; then
|
|
|
|
rm -f usr/lib/sysimage/rpm
|
|
|
|
mkdir -p usr/lib/sysimage/rpm
|
2017-10-16 15:34:53 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-27 16:36:12 +02:00
|
|
|
mv -f var/lib/rpm/.[!.]* usr/lib/sysimage/rpm/
|
|
|
|
mv -f var/lib/rpm/* usr/lib/sysimage/rpm/
|
2017-10-16 15:34:53 +02:00
|
|
|
fi
|
2017-10-27 16:36:12 +02:00
|
|
|
rmdir var/lib/rpm && ln -s ../../usr/lib/sysimage/rpm var/lib/rpm
|
2006-12-19 00:17:44 +01:00
|
|
|
fi
|
|
|
|
|
2011-01-14 14:07:20 +01:00
|
|
|
%files -f rpm.lang
|
2006-12-19 00:17:44 +01:00
|
|
|
%defattr(-,root,root)
|
2007-07-23 20:54:09 +02:00
|
|
|
%doc CHANGES.gz COPYING GROUPS
|
2006-12-19 00:17:44 +01:00
|
|
|
%doc doc/manual
|
2014-02-20 15:36:24 +01:00
|
|
|
%doc RPM-HOWTO
|
2006-12-19 00:17:44 +01:00
|
|
|
/etc/rpm
|
|
|
|
/bin/rpm
|
|
|
|
/usr/bin/*
|
2012-01-17 12:13:52 +01:00
|
|
|
%exclude /usr/bin/rpmbuild
|
2017-03-29 14:08:58 +02:00
|
|
|
/usr/sbin/rpmconfigcheck
|
|
|
|
/usr/lib/systemd/system/rpmconfigcheck.service
|
2006-12-19 00:17:44 +01:00
|
|
|
/usr/lib/rpm
|
2011-05-16 18:07:44 +02:00
|
|
|
%{_libdir}/rpm-plugins
|
2009-08-28 15:54:03 +02:00
|
|
|
%{_libdir}/librpm.so.*
|
|
|
|
%{_libdir}/librpmbuild.so.*
|
|
|
|
%{_libdir}/librpmio.so.*
|
2011-05-16 18:07:44 +02:00
|
|
|
%{_libdir}/librpmsign.so.*
|
2006-12-19 00:17:44 +01:00
|
|
|
%doc %{_mandir}/man[18]/*.[18]*
|
2017-10-27 16:36:12 +02:00
|
|
|
%dir /usr/lib/sysimage
|
|
|
|
%dir /usr/lib/sysimage/rpm
|
|
|
|
%dir /var/lib/rpm
|
2011-10-19 18:38:28 +02:00
|
|
|
%dir %attr(755,root,root) /usr/src/packages/BUILD
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/SPECS
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/SOURCES
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/SRPMS
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/RPMS
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/BUILDROOT
|
|
|
|
%dir %attr(755,root,root) /usr/src/packages/RPMS/*
|
2006-12-19 00:17:44 +01:00
|
|
|
/var/adm/fillup-templates/sysconfig.services-rpm
|
|
|
|
|
2012-01-17 12:13:52 +01:00
|
|
|
%files build
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/bin/rpmbuild
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
%files devel
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
/usr/include/rpm
|
|
|
|
%{_libdir}/librpm.so
|
|
|
|
%{_libdir}/librpmbuild.so
|
|
|
|
%{_libdir}/librpmio.so
|
2011-05-16 18:07:44 +02:00
|
|
|
%{_libdir}/librpmsign.so
|
2009-08-28 15:54:03 +02:00
|
|
|
%{_libdir}/pkgconfig/rpm.pc
|
2007-11-23 01:38:16 +01:00
|
|
|
|
2007-03-15 01:49:23 +01:00
|
|
|
%changelog
|