summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas F Herbert <therbert@redhat.com>2017-09-13 15:26:46 -0400
committerChris Luke <chris_luke@comcast.com>2017-09-21 14:09:01 +0000
commit5349f94d992886afd6bf0137004758933b4a858e (patch)
tree0f412a84fb82d04a461451de607e2cf42bbf2b28
parent0e4956869b7b919957433f04cc8fe52a2f391251 (diff)
Unpack into temporary directory with longer name.
JIRA VPP-498 This commit is a fix so downstream builds in Centos and RHEL mock environment will work. This is a workaround for a bug in the debugedit code in rpm-build package 4.13 and earlier. Change-Id: Ia6361f7487c5afe9948a2d2fe929942ba5b9c0f1 Signed-off-by: Thomas F Herbert <therbert@redhat.com>
-rw-r--r--extras/rpm/vpp.spec12
1 files changed, 10 insertions, 2 deletions
diff --git a/extras/rpm/vpp.spec b/extras/rpm/vpp.spec
index a319ba736c4..501297b3651 100644
--- a/extras/rpm/vpp.spec
+++ b/extras/rpm/vpp.spec
@@ -3,7 +3,8 @@
%define _unitdir /lib/systemd/system
%define _topdir %(pwd)
%define _builddir %{_topdir}
-%define _mu_build_dir %{_topdir}/%{name}-%{_version}/build-root
+%define _tmp_build_dir %{name}-%{_version}.0
+%define _mu_build_dir %{_topdir}/%{_tmp_build_dir}/build-root
%define _vpp_tag %{getenv:TAG}
%if "%{_vpp_tag}" == ""
%define _vpp_tag vpp
@@ -119,13 +120,20 @@ Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, pyth
This package contains the python bindings for the vpp api
%prep
-%setup -q -n %{name}-%{_version}
+# Unpack into dir with longer name as work around of debugedit bug in in rpm-build 4.13
+rm -rf %{name}-%{_version}
+rm -rf %{_tmpbuild_dir}
+/usr/bin/xz -dc '%{_sourcedir}/%{name}-%{_version}-%{_release}.tar.xz' | /usr/bin/tar -xf -
+mv %{name}-%{_version} %{_tmp_build_dir}
+cd '%{_tmp_build_dir}'
+/usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
%pre
# Add the vpp group
groupadd -f -r vpp
%build
+cd '%{_tmp_build_dir}'
%if %{with aesni}
make bootstrap
make -C build-root PLATFORM=vpp TAG=%{_vpp_tag} install-packages