Accepting request 709948 from Base:System
Add support for zstd payloads and build_*flags macros Note that this will require adding `Preinstall: libzstd1` to the `openSUSE:Factory` definition because libzstd is now a dependency of rpm itself. OBS-URL: https://build.opensuse.org/request/show/709948 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=272
This commit is contained in:
commit
3ba328e670
63
adopt-language-specific-build_fooflags-macros-from-F.patch
Normal file
63
adopt-language-specific-build_fooflags-macros-from-F.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From 9a50846ceeef2add2344dd463c5562bd69496a23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Mon, 6 May 2019 14:44:30 +0300
|
||||||
|
Subject: [PATCH] Adopt language-specific %build_fooflags macros from Fedora
|
||||||
|
|
||||||
|
%{optflags} has been the catchall for all compiler options but this
|
||||||
|
is quite limiting as there's no way to add for example C++ specific
|
||||||
|
options distro-wide. This adds separate %build_cflags, %build_cxxflags,
|
||||||
|
%build_fflags for the gcc-supported languages, and additionally
|
||||||
|
%build_ldflags for distro-wide LDFLAGS setting.
|
||||||
|
|
||||||
|
Based on Florian Weimer's work in Fedoras redhat-rpm-config macros.
|
||||||
|
---
|
||||||
|
macros.in | 26 +++++++++++++++++++++++---
|
||||||
|
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/macros.in b/macros.in
|
||||||
|
index 2ab108776..b6cb52951 100644
|
||||||
|
--- a/macros.in
|
||||||
|
+++ b/macros.in
|
||||||
|
@@ -999,6 +999,24 @@ package or when debugging this package.\
|
||||||
|
%_target_vendor %{_host_vendor}
|
||||||
|
%_target_os %{_host_os}
|
||||||
|
|
||||||
|
+#==============================================================================
|
||||||
|
+# ---- compiler flags.
|
||||||
|
+
|
||||||
|
+# C compiler flags. This is traditionally called CFLAGS in makefiles.
|
||||||
|
+# Historically also available as %%{optflags}, and %%build sets the
|
||||||
|
+# environment variable RPM_OPT_FLAGS to this value.
|
||||||
|
+%build_cflags %{optflags}
|
||||||
|
+
|
||||||
|
+# C++ compiler flags. This is traditionally called CXXFLAGS in makefiles.
|
||||||
|
+%build_cxxflags %{optflags}
|
||||||
|
+
|
||||||
|
+# Fortran compiler flags. Makefiles use both FFLAGS and FCFLAGS as
|
||||||
|
+# the corresponding variable names.
|
||||||
|
+%build_fflags %{optflags} %{?_fmoddir:-I%{_fmoddir}}
|
||||||
|
+
|
||||||
|
+# Link editor flags. This is usually called LDFLAGS in makefiles.
|
||||||
|
+#%build_ldflags -Wl,-z,relro %{?_lto_cflags}
|
||||||
|
+
|
||||||
|
#==============================================================================
|
||||||
|
# ---- specfile macros.
|
||||||
|
# Macro(s) here can be used reliably for reproducible builds.
|
||||||
|
@@ -1010,9 +1028,11 @@ package or when debugging this package.\
|
||||||
|
#
|
||||||
|
%_configure ./configure
|
||||||
|
%configure \
|
||||||
|
- CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||||
|
- CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||||
|
- FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
||||||
|
+ CFLAGS="${CFLAGS:-%{?build_cflags}}" ; export CFLAGS ; \
|
||||||
|
+ CXXFLAGS="${CXXFLAGS:-%{?build_cxxflags}}" ; export CXXFLAGS ; \
|
||||||
|
+ FFLAGS="${FFLAGS:-%{?build_fflags}}" ; export FFLAGS ; \
|
||||||
|
+ FCFLAGS="${FCFLAGS:-%{?build_fflags}}" ; export FCFLAGS ; \
|
||||||
|
+ LDFLAGS="${LDFLAGS:-%{?build_ldflags}}" ; export LDFLAGS ; \
|
||||||
|
%{_configure} --host=%{_host} --build=%{_build} \\\
|
||||||
|
--program-prefix=%{?_program_prefix} \\\
|
||||||
|
--disable-dependency-tracking \\\
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -26,6 +26,8 @@ Release: 0
|
|||||||
Summary: Python Bindings for Manipulating RPM Packages
|
Summary: Python Bindings for Manipulating RPM Packages
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
|
URL: https://rpm.org/
|
||||||
|
#Git-Clone: https://github.com/rpm-software-management/rpm
|
||||||
Source99: rpm.spec
|
Source99: rpm.spec
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: file-devel
|
BuildRequires: file-devel
|
||||||
@ -42,6 +44,7 @@ BuildRequires: popt-devel
|
|||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: pkgconfig(libzstd)
|
||||||
Requires: rpm = %{version}
|
Requires: rpm = %{version}
|
||||||
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%{_sourcedir}/rpm.spec)}
|
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%{_sourcedir}/rpm.spec)}
|
||||||
%if "%{python_flavor}" == "python2"
|
%if "%{python_flavor}" == "python2"
|
||||||
|
12
rpm.changes
12
rpm.changes
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 7 15:03:15 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Enable decompression and creation of zstd-based payloads.
|
||||||
|
- Add homepage and repo URL.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 14 10:11:34 UTC 2019 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
- Add adopt-language-specific-build_fooflags-macros-from-F.patch
|
||||||
|
(9a50846ceeef2add2344dd463c5562bd69496a23) from master.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 16 08:40:11 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
|
Tue Apr 16 08:40:11 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
|
||||||
|
|
||||||
|
5
rpm.spec
5
rpm.spec
@ -45,6 +45,7 @@ BuildRequires: popt-devel
|
|||||||
BuildRequires: rpm-build
|
BuildRequires: rpm-build
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: pkgconfig(libzstd)
|
||||||
#!BuildIgnore: rpmlint-Factory
|
#!BuildIgnore: rpmlint-Factory
|
||||||
Provides: rpminst
|
Provides: rpminst
|
||||||
Requires(post): %fillup_prereq
|
Requires(post): %fillup_prereq
|
||||||
@ -56,6 +57,8 @@ License: GPL-2.0-or-later
|
|||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Version: 4.14.2.1
|
Version: 4.14.2.1
|
||||||
Release: 0
|
Release: 0
|
||||||
|
URL: https://rpm.org/
|
||||||
|
#Git-Clone: https://github.com/rpm-software-management/rpm
|
||||||
Source: http://ftp.rpm.org/releases/rpm-4.14.x/rpm-%{version}.tar.bz2
|
Source: http://ftp.rpm.org/releases/rpm-4.14.x/rpm-%{version}.tar.bz2
|
||||||
Source1: RPM-HOWTO.tar.bz2
|
Source1: RPM-HOWTO.tar.bz2
|
||||||
Source5: rpmsort
|
Source5: rpmsort
|
||||||
@ -129,6 +132,7 @@ Patch117: findsupplements.diff
|
|||||||
Patch118: dwz-compression.patch
|
Patch118: dwz-compression.patch
|
||||||
Patch119: getncpus.diff
|
Patch119: getncpus.diff
|
||||||
Patch120: rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
Patch120: rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
||||||
|
Patch121: adopt-language-specific-build_fooflags-macros-from-F.patch
|
||||||
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
||||||
Patch6465: auto-config-update-riscv64.diff
|
Patch6465: auto-config-update-riscv64.diff
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -228,6 +232,7 @@ rm -f rpmdb/db.h
|
|||||||
%patch -P 100 -P 102 -P 103 -P 108
|
%patch -P 100 -P 102 -P 103 -P 108
|
||||||
%patch -P 109 -P 114 -P 117 -P 118
|
%patch -P 109 -P 114 -P 117 -P 118
|
||||||
%patch -P 119 -P 120
|
%patch -P 119 -P 120
|
||||||
|
%patch121 -p1
|
||||||
|
|
||||||
%ifarch aarch64 ppc64le riscv64
|
%ifarch aarch64 ppc64le riscv64
|
||||||
%patch6464
|
%patch6464
|
||||||
|
Loading…
x
Reference in New Issue
Block a user