summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-01-24 16:47:32 +0300
committerAndrei Belov <defan@nginx.com>2019-01-24 16:47:32 +0300
commit9e383ecaf21138e51bceee89eb1cd1b342a980ad (patch)
tree7d8dde5a9c7f6cff8393999ceb4f3e1b8d8549be
parent3b7f28f23cf9592a24272bccfba325414cc07fb1 (diff)
downloadunit-9e383ecaf21138e51bceee89eb1cd1b342a980ad.tar.gz
unit-9e383ecaf21138e51bceee89eb1cd1b342a980ad.tar.bz2
Packages: disabled debugsource generation on relevant platforms.
In particular, this fixes unit-go package building on Fedora >= 29.
-rw-r--r--pkg/rpm/unit.module.spec.in11
-rw-r--r--pkg/rpm/unit.spec.in11
2 files changed, 22 insertions, 0 deletions
diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in
index 03d4addb..8b8a3433 100644
--- a/pkg/rpm/unit.module.spec.in
+++ b/pkg/rpm/unit.module.spec.in
@@ -44,6 +44,10 @@ This package contains %%SUMMARY%%.
%debug_package
%endif
+%if 0%{?fedora}
+%define _debugsource_template %{nil}
+%endif
+
%prep
%setup -qcTn %{name}-%{unit_version}
tar --strip-components=1 -zxf %{SOURCE0}
@@ -78,6 +82,13 @@ DESTDIR=%{buildroot} make %%MODULE_INSTARGS%%
DESTDIR=%{buildroot} make %%MODULE_INSTARGS%%
%check
+%{__rm} -rf %{buildroot}/usr/src
+cd %{bdir}
+grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
+cat /dev/null > debugsources.list
+%if 0%{?suse_version} >= 1500
+cat /dev/null > debugsourcefiles.list
+%endif
%clean
%{__rm} -rf %{buildroot}
diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in
index d69a3dc9..05ee79af 100644
--- a/pkg/rpm/unit.spec.in
+++ b/pkg/rpm/unit.spec.in
@@ -67,6 +67,10 @@ dynamically via an API.
%debug_package
%endif
+%if 0%{?fedora}
+%define _debugsource_template %{nil}
+%endif
+
%package devel
Summary: NGINX Unit (development files)
Version: %%VERSION%%
@@ -147,6 +151,13 @@ export QA_SKIP_BUILD_ROOT
%if %{dotests}
cd %{bdir} && make tests && ./build/tests
%endif
+%{__rm} -rf %{buildroot}/usr/src
+cd %{bdir}
+grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
+cat /dev/null > debugsources.list
+%if 0%{?suse_version} >= 1500
+cat /dev/null > debugsourcefiles.list
+%endif
%clean
%{__rm} -rf %{buildroot}