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
|
|
|
#
|
2021-01-05 16:40:08 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
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.
|
|
|
|
|
2020-04-14 12:13:22 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:44 +01:00
|
|
|
#
|
|
|
|
|
2012-08-30 18:55:27 +02:00
|
|
|
|
2017-11-24 10:11:43 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
2017-11-30 16:38:01 +01:00
|
|
|
%{?!_fillupdir:%define _fillupdir /var/adm/fillup-templates}
|
2017-11-24 10:11:43 +01:00
|
|
|
|
2019-10-02 15:28:11 +02:00
|
|
|
%global librpmsover 9
|
2019-09-23 11:21:52 +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
|
2017-12-05 11:46:24 +01:00
|
|
|
BuildRequires: libdw-devel
|
2011-12-11 22:58:21 +01:00
|
|
|
BuildRequires: libelf-devel
|
2020-01-17 11:28:50 +01:00
|
|
|
BuildRequires: libgcrypt-devel
|
2011-12-11 22:58:21 +01:00
|
|
|
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
|
2019-06-13 16:33:20 +02:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2009-08-28 15:54:03 +02:00
|
|
|
#!BuildIgnore: rpmlint-Factory
|
2006-12-19 00:17:44 +01:00
|
|
|
Provides: rpminst
|
2017-12-06 10:36:50 +01:00
|
|
|
Requires(post): %fillup_prereq
|
2018-07-04 14:04:51 +02:00
|
|
|
Requires: rpm-config-SUSE
|
2018-07-20 13:18:27 +02:00
|
|
|
# awk is needed for rpm --last
|
|
|
|
Requires: /usr/bin/awk
|
2006-12-19 00:17:44 +01:00
|
|
|
Summary: The RPM Package Manager
|
2018-03-28 11:23:52 +02:00
|
|
|
License: GPL-2.0-or-later
|
2011-12-11 22:58:21 +01:00
|
|
|
Group: System/Packages
|
2021-09-24 10:49:04 +02:00
|
|
|
Version: 4.17.0
|
2011-12-11 22:58:21 +01:00
|
|
|
Release: 0
|
2019-06-13 16:33:20 +02:00
|
|
|
URL: https://rpm.org/
|
|
|
|
#Git-Clone: https://github.com/rpm-software-management/rpm
|
2021-09-28 12:29:03 +02:00
|
|
|
Source: http://ftp.rpm.org/releases/rpm-4.17.x/rpm-%{version}.tar.bz2
|
2006-12-19 00:17:44 +01:00
|
|
|
Source1: RPM-HOWTO.tar.bz2
|
2021-09-24 10:49:04 +02:00
|
|
|
Source2: https://sourceware.org/ftp/debugedit/5.0/debugedit-5.0.tar.xz
|
|
|
|
Source3: python-rpm-packaging.tar.bz2
|
2006-12-19 00:17:44 +01:00
|
|
|
Source5: rpmsort
|
|
|
|
Source8: rpmconfigcheck
|
|
|
|
Source9: sysconfig.services-rpm
|
2010-01-14 14:59:15 +01:00
|
|
|
Source12: baselibs.conf
|
2017-03-29 14:08:58 +02:00
|
|
|
Source13: rpmconfigcheck.service
|
2006-12-19 00:17:44 +01:00
|
|
|
# quilt patches start here
|
2021-09-24 10:49:04 +02:00
|
|
|
Patch5: usr-lib-sysimage-rpm.patch
|
2013-02-20 18:32:28 +01:00
|
|
|
Patch13: ignore-auxv.diff
|
2008-09-12 20:37:28 +02:00
|
|
|
Patch12: localetag.diff
|
2011-07-20 13:43:02 +02:00
|
|
|
Patch16: dbrointerruptable.diff
|
|
|
|
Patch18: refreshtestarch.diff
|
|
|
|
Patch24: brp.diff
|
|
|
|
Patch25: brpcompress.diff
|
|
|
|
Patch26: checkfilesnoinfodir.diff
|
|
|
|
Patch29: findlang.diff
|
|
|
|
Patch30: macrosin.diff
|
|
|
|
Patch32: platformin.diff
|
|
|
|
Patch33: rpmpopt.diff
|
|
|
|
Patch34: rpmrc.diff
|
|
|
|
Patch36: rpmqpack.diff
|
|
|
|
Patch38: build.diff
|
|
|
|
Patch43: rpm-shorten-changelog.diff
|
|
|
|
Patch45: whatrequires-doc.diff
|
|
|
|
Patch46: remove-brp-strips.diff
|
|
|
|
Patch47: requires-ge-macro.diff
|
|
|
|
Patch51: specfilemacro.diff
|
|
|
|
Patch60: safeugid.diff
|
|
|
|
Patch61: noprereqdeprec.diff
|
2012-08-28 15:31:44 +02:00
|
|
|
Patch66: remove-translations.diff
|
|
|
|
Patch67: headeradddb.diff
|
|
|
|
Patch69: nobuildcolor.diff
|
|
|
|
Patch70: fileattrs.diff
|
|
|
|
Patch71: nomagiccheck.diff
|
|
|
|
Patch73: assumeexec.diff
|
|
|
|
Patch75: rpm-deptracking.patch
|
|
|
|
Patch77: langnoc.diff
|
|
|
|
Patch78: headerchk2.diff
|
2013-09-05 16:43:27 +02:00
|
|
|
Patch85: brp-compress-no-img.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
|
|
|
Patch99: enable-postin-scripts-error.diff
|
2016-05-19 14:15:30 +02:00
|
|
|
Patch100: rpm-findlang-inject-metainfo.patch
|
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
|
2018-07-04 14:04:51 +02:00
|
|
|
Patch117: findsupplements.diff
|
2020-01-17 13:48:49 +01:00
|
|
|
Patch122: db_conversion.diff
|
2020-10-27 11:36:01 +01:00
|
|
|
Patch123: nextiteratorheaderblob.diff
|
2021-03-30 11:39:11 +02:00
|
|
|
Patch131: posttrans.diff
|
2021-10-06 16:02:17 +02:00
|
|
|
Patch132: verbosearg.diff
|
2021-10-14 18:17:41 +02:00
|
|
|
Patch133: zstdpool.diff
|
2021-10-15 09:44:17 +02:00
|
|
|
Patch134: zstdthreaded.diff
|
2021-09-24 10:49:04 +02:00
|
|
|
Patch200: finddebuginfo.diff
|
|
|
|
Patch201: finddebuginfo-absolute-links.diff
|
|
|
|
Patch202: debugsubpkg.diff
|
|
|
|
Patch203: debuglink.diff
|
|
|
|
Patch204: debuginfo-mono.patch
|
2021-09-24 11:12:48 +02:00
|
|
|
Patch205: singlefilemode.diff
|
2021-09-24 10:49:04 +02:00
|
|
|
Patch300: python-rpm-packaging.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.
|
|
|
|
|
2019-09-23 11:21:52 +02:00
|
|
|
%package -n librpmbuild%{librpmsover}
|
|
|
|
Summary: Library for building RPM packages
|
|
|
|
# Was part of rpm before
|
|
|
|
Group: System/Libraries
|
|
|
|
Conflicts: rpm < %{version}
|
|
|
|
|
|
|
|
%description -n librpmbuild%{librpmsover}
|
|
|
|
Thie package contains a library with functions for building RPM packages.
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
%package devel
|
2017-12-19 11:34:07 +01:00
|
|
|
Summary: Development files for librpm
|
|
|
|
Group: Development/Libraries/C and C++
|
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
|
2021-03-30 11:16:14 +02:00
|
|
|
Requires: librpmbuild%{librpmsover} = %{version}
|
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-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
|
2020-04-02 15:57:28 +02:00
|
|
|
# Mandatory generators
|
|
|
|
Requires: (%{name}-build-perl if perl-base)
|
|
|
|
Requires: (%{name}-build-python if python3-base)
|
2019-11-08 16:07:03 +01:00
|
|
|
# The point of the split
|
|
|
|
Conflicts: rpm < 4.15.0
|
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
|
|
|
|
2020-04-02 15:57:28 +02:00
|
|
|
%package build-python
|
|
|
|
Summary: RPM dependency generator for Python
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Requires: python3-base
|
2021-01-19 15:08:27 +01:00
|
|
|
# To avoid widespread breakage by package mistakenly ignoring
|
|
|
|
# their requirement of python-rpm-macros (bsc#1180125)
|
|
|
|
Requires: python-rpm-macros
|
2020-04-02 15:57:28 +02:00
|
|
|
|
|
|
|
%description build-python
|
|
|
|
Provides and requires generator for .py files and modules.
|
2020-05-19 09:23:00 +02:00
|
|
|
|
2020-04-02 15:57:28 +02:00
|
|
|
%package build-perl
|
|
|
|
Summary: RPM dependency generator for Perl
|
|
|
|
Group: Development/Languages/Perl
|
|
|
|
Requires: perl-base
|
|
|
|
|
|
|
|
%description build-perl
|
|
|
|
Provides and requires generator for .pl files and modules.
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n rpm-%{version}
|
2021-09-24 10:49:04 +02:00
|
|
|
tar -xjf %{SOURCE1}
|
|
|
|
tar -xJf %{SOURCE2}
|
|
|
|
tar -xjf %{SOURCE3}
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
rm -rf sqlite
|
2021-09-24 10:49:04 +02:00
|
|
|
%patch -P 5 -P 12 -P 13 -P 16 -P 18
|
|
|
|
%patch -P 24 -P 25 -P 26 -P 29
|
|
|
|
%patch -P 30 -P 32 -P 33 -P 34 -P 36 -P 38
|
|
|
|
%patch -P 43 -P 45 -P 46 -P 47
|
|
|
|
%patch -P 51
|
|
|
|
%patch -P 60 -P 61 -P 66 -P 67 -P 69
|
2019-10-02 15:28:11 +02:00
|
|
|
%patch -P 70 -P 71 -P 73 -P 75 -P 77 -P 78
|
2017-12-05 11:46:24 +01:00
|
|
|
%patch -P 85
|
|
|
|
%patch -P 93 -P 94 -P 99
|
2020-05-19 09:23:00 +02:00
|
|
|
%patch -P 100 -P 102 -P 103
|
2021-09-24 10:49:04 +02:00
|
|
|
%patch -P 117
|
2021-10-15 09:44:17 +02:00
|
|
|
%patch -P 122 -P 123 -P 131 -P 132 -P 133 -P 134
|
2021-09-24 10:49:04 +02:00
|
|
|
|
|
|
|
# debugedit patches
|
|
|
|
pushd debugedit-5.0
|
2021-09-24 11:12:48 +02:00
|
|
|
%patch -P 200 -P 201 -P 202 -P 203 -P 204 -P 205
|
2021-09-24 10:49:04 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
# python-rpm-packaging patches
|
|
|
|
pushd python-rpm-packaging
|
|
|
|
%patch -P 300
|
|
|
|
popd
|
2013-11-07 13:37:02 +01:00
|
|
|
|
2018-02-15 13:14:27 +01:00
|
|
|
%ifarch aarch64 ppc64le riscv64
|
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
|
|
|
|
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
|
2018-01-22 13:12:56 +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
|
2021-09-24 10:49:04 +02:00
|
|
|
export __FIND_DEBUGINFO=/usr/lib/rpm/find-debuginfo
|
2011-09-29 20:22:32 +02:00
|
|
|
|
2012-11-04 09:54:42 +01:00
|
|
|
autoreconf -fi
|
|
|
|
./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
|
2019-10-02 15:28:11 +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 \
|
2019-10-02 15:28:11 +02:00
|
|
|
--with-selinux \
|
2020-01-17 11:28:50 +01:00
|
|
|
--with-crypto=libgcrypt \
|
2019-10-02 15:28:11 +02:00
|
|
|
--with-acl \
|
|
|
|
--with-cap \
|
2020-01-17 15:07:00 +01:00
|
|
|
--enable-shared \
|
2020-01-17 13:14:54 +01:00
|
|
|
--enable-ndb \
|
|
|
|
--enable-bdb-ro \
|
2019-10-02 15:28:11 +02:00
|
|
|
--enable-zstd \
|
2021-09-24 10:49:04 +02:00
|
|
|
--enable-sqlite=no \
|
2020-01-17 15:07:00 +01:00
|
|
|
%{?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}
|
2006-12-19 00:17:44 +01:00
|
|
|
|
2021-09-27 15:01:27 +02:00
|
|
|
%if "%{NAME}" != "python-rpm"
|
2021-09-24 10:49:04 +02:00
|
|
|
pushd debugedit-5.0
|
|
|
|
./configure --bindir=/usr/lib/rpm
|
|
|
|
touch find-debuginfo.1
|
|
|
|
make
|
|
|
|
popd
|
2021-09-27 15:01:27 +02:00
|
|
|
%endif
|
2021-09-24 10:49:04 +02:00
|
|
|
|
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
|
2017-12-05 11:46:24 +01:00
|
|
|
mkdir -p %{buildroot}/bin
|
2021-02-09 10:39:40 +01:00
|
|
|
%if !0%{?usrmerged}
|
2017-12-05 11:46:24 +01:00
|
|
|
ln -s /usr/bin/rpm %{buildroot}/bin/rpm
|
2021-02-09 10:39:40 +01:00
|
|
|
%endif
|
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/
|
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
|
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
|
|
|
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
|
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
|
2017-11-24 10:11:43 +01:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}
|
|
|
|
install -c -m0644 %{SOURCE9} %{buildroot}%{_fillupdir}/
|
2012-01-18 15:30:38 +01:00
|
|
|
rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
|
|
|
|
install -m 755 %{SOURCE5} %{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 \
|
2020-05-15 08:54:59 +02:00
|
|
|
ocaml-find-provides.sh ocaml-find-requires.sh fileattrs/ocaml.attr \
|
2007-07-23 20:54:09 +02:00
|
|
|
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
|
2018-02-15 13:14:27 +01:00
|
|
|
%ifarch aarch64 ppc64le riscv64
|
2021-02-09 10:40:20 +01:00
|
|
|
install -m 755 build-aux/config.guess %{buildroot}/usr/lib/rpm
|
|
|
|
install -m 755 build-aux/config.sub %{buildroot}/usr/lib/rpm
|
2013-04-23 00:00:49 +02:00
|
|
|
%endif
|
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
|
2021-09-24 10:49:04 +02:00
|
|
|
|
2020-01-17 15:07:00 +01:00
|
|
|
# make ndb the default database backend
|
|
|
|
echo "setting the default database backend to 'ndb'"
|
2021-09-24 10:49:04 +02:00
|
|
|
sed -i -e '/_db_backend/s/sqlite/ndb/' %{buildroot}/usr/lib/rpm/macros
|
|
|
|
|
|
|
|
# install debugedit files
|
|
|
|
pushd debugedit-5.0
|
|
|
|
make install-exec DESTDIR="%{buildroot}"
|
|
|
|
popd
|
|
|
|
|
|
|
|
# install python-rpm-packaging files
|
|
|
|
cp -a python-rpm-packaging/fileattrs/*.attr %{buildroot}/usr/lib/rpm/fileattrs
|
|
|
|
cp -a python-rpm-packaging/scripts/* %{buildroot}/usr/lib/rpm
|
|
|
|
chmod 755 %{buildroot}/usr/lib/rpm/brp-python-bytecompile
|
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
|
2020-01-17 15:07:00 +01:00
|
|
|
if test ! -L var/lib/rpm -a ! -f usr/lib/sysimage/rpm/Packages -a ! -f usr/lib/sysimage/rpm/Packages.db ; then
|
|
|
|
if test -f var/lib/rpm/Packages -o -f var/lib/rpm/Packages.db ; then
|
|
|
|
rmdir usr/lib/sysimage/rpm
|
|
|
|
ln -s ../../../var/lib/rpm usr/lib/sysimage/rpm
|
|
|
|
fi
|
2017-10-16 15:34:53 +02:00
|
|
|
fi
|
|
|
|
|
2020-01-17 15:07:00 +01:00
|
|
|
test -f usr/lib/sysimage/rpm/Packages -o -f usr/lib/sysimage/rpm/Packages.db || rpmdb --initdb
|
2019-12-11 15:45:53 +01:00
|
|
|
test -e var/lib/rpm || ln -s ../../usr/lib/sysimage/rpm var/lib/rpm
|
2017-10-16 15:34:53 +02:00
|
|
|
|
|
|
|
%posttrans
|
|
|
|
# var/lib/rpm migration
|
|
|
|
if test ! -L var/lib/rpm ; then
|
|
|
|
# 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
|
|
|
|
2020-01-17 15:07:00 +01:00
|
|
|
if test -f var/lib/rpm/Packages -o -f var/lib/rpm/Packages.db ; 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
|
2019-12-11 15:28:50 +01:00
|
|
|
test -d var/lib/rpm && rmdir var/lib/rpm
|
|
|
|
test -e 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)
|
2018-02-27 10:46:36 +01:00
|
|
|
%license COPYING
|
2021-09-24 10:49:04 +02:00
|
|
|
%doc docs/manual
|
2014-02-20 15:36:24 +01:00
|
|
|
%doc RPM-HOWTO
|
2006-12-19 00:17:44 +01:00
|
|
|
/etc/rpm
|
2021-02-09 10:39:40 +01:00
|
|
|
%if !0%{?usrmerged}
|
2006-12-19 00:17:44 +01:00
|
|
|
/bin/rpm
|
2021-02-09 10:39:40 +01:00
|
|
|
%endif
|
2020-04-02 15:57:28 +02:00
|
|
|
%{_bindir}/gendiff
|
|
|
|
%{_bindir}/rpm
|
|
|
|
%{_bindir}/rpm2cpio
|
|
|
|
%{_bindir}/rpmdb
|
|
|
|
%{_bindir}/rpmgraph
|
|
|
|
%{_bindir}/rpmkeys
|
|
|
|
%{_bindir}/rpmqpack
|
|
|
|
%{_bindir}/rpmquery
|
|
|
|
%{_bindir}/rpmsign
|
|
|
|
%{_bindir}/rpmverify
|
2017-03-29 14:08:58 +02:00
|
|
|
/usr/sbin/rpmconfigcheck
|
|
|
|
/usr/lib/systemd/system/rpmconfigcheck.service
|
2020-04-02 15:57:28 +02:00
|
|
|
%dir /usr/lib/rpm
|
|
|
|
/usr/lib/rpm/macros
|
|
|
|
/usr/lib/rpm/macros.d/
|
|
|
|
/usr/lib/rpm/platform/
|
|
|
|
/usr/lib/rpm/rpm.supp
|
|
|
|
/usr/lib/rpm/rpmdb_*
|
|
|
|
/usr/lib/rpm/rpmpopt-*
|
|
|
|
/usr/lib/rpm/rpmrc
|
|
|
|
/usr/lib/rpm/rpmsort
|
|
|
|
/usr/lib/rpm/suse
|
|
|
|
/usr/lib/rpm/tgpg
|
2011-05-16 18:07:44 +02:00
|
|
|
%{_libdir}/rpm-plugins
|
2009-08-28 15:54:03 +02:00
|
|
|
%{_libdir}/librpm.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
|
2019-12-11 14:07:59 +01:00
|
|
|
%ghost /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/*
|
2017-11-24 10:11:43 +01:00
|
|
|
%{_fillupdir}/sysconfig.services-rpm
|
2006-12-19 00:17:44 +01:00
|
|
|
|
2019-09-23 11:21:52 +02:00
|
|
|
%files -n librpmbuild%{librpmsover}
|
|
|
|
%{_libdir}/librpmbuild.so.%{librpmsover}
|
|
|
|
%{_libdir}/librpmbuild.so.%{librpmsover}.*
|
|
|
|
|
2012-01-17 12:13:52 +01:00
|
|
|
%files build
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/bin/rpmbuild
|
2020-04-02 15:57:28 +02:00
|
|
|
/usr/lib/rpm/pkgconfigdeps.sh
|
2020-10-27 11:36:01 +01:00
|
|
|
/usr/lib/rpm/ocamldeps.sh
|
2019-08-15 12:00:24 +02:00
|
|
|
/usr/lib/rpm/elfdeps
|
|
|
|
/usr/lib/rpm/rpmdeps
|
|
|
|
/usr/lib/rpm/debugedit
|
|
|
|
/usr/lib/rpm/sepdebugcrcfix
|
|
|
|
/usr/bin/rpmspec
|
|
|
|
/usr/lib/rpm/brp-*
|
2021-09-24 10:49:04 +02:00
|
|
|
%exclude /usr/lib/rpm/brp-python-hardlink
|
|
|
|
%exclude /usr/lib/rpm/brp-python-bytecompile
|
2019-08-15 12:00:24 +02:00
|
|
|
/usr/lib/rpm/check-*
|
|
|
|
/usr/lib/rpm/*find*
|
2020-04-02 15:57:28 +02:00
|
|
|
/usr/lib/rpm/fileattrs/
|
2021-09-24 10:49:04 +02:00
|
|
|
%exclude /usr/lib/rpm/fileattrs/python.attr
|
2020-04-02 15:57:28 +02:00
|
|
|
%exclude /usr/lib/rpm/fileattrs/pythondist.attr
|
|
|
|
%exclude /usr/lib/rpm/fileattrs/perl*.attr
|
|
|
|
/usr/lib/rpm/*.prov
|
|
|
|
%exclude /usr/lib/rpm/perl.prov
|
|
|
|
/usr/lib/rpm/*.req
|
|
|
|
%exclude /usr/lib/rpm/perl.req
|
|
|
|
%ifarch aarch64 ppc64le riscv64
|
|
|
|
/usr/lib/rpm/config.guess
|
|
|
|
/usr/lib/rpm/config.sub
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files build-python
|
|
|
|
%defattr(-,root,root)
|
2021-09-24 10:49:04 +02:00
|
|
|
/usr/lib/rpm/fileattrs/python.attr
|
2019-11-08 16:07:03 +01:00
|
|
|
/usr/lib/rpm/fileattrs/pythondist.attr
|
|
|
|
/usr/lib/rpm/pythondistdeps.py
|
2021-09-24 10:49:04 +02:00
|
|
|
/usr/lib/rpm/brp-python-hardlink
|
|
|
|
/usr/lib/rpm/brp-python-bytecompile
|
2012-01-17 12:13:52 +01:00
|
|
|
|
2020-04-02 15:57:28 +02:00
|
|
|
%files build-perl
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/lib/rpm/fileattrs/perl*.attr
|
|
|
|
/usr/lib/rpm/perl.prov
|
|
|
|
/usr/lib/rpm/perl.req
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
%files devel
|
|
|
|
%defattr(644,root,root,755)
|
2020-04-02 15:57:28 +02:00
|
|
|
/usr/include/rpm
|
|
|
|
%{_libdir}/librpm.so
|
|
|
|
%{_libdir}/librpmbuild.so
|
|
|
|
%{_libdir}/librpmio.so
|
|
|
|
%{_libdir}/librpmsign.so
|
|
|
|
%{_libdir}/pkgconfig/rpm.pc
|
2007-11-23 01:38:16 +01:00
|
|
|
|
2007-03-15 01:49:23 +01:00
|
|
|
%changelog
|