From 494b623602f0b09f10d788e6de6ddcf8d92700e3 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Fri, 1 Jul 2016 10:16:07 +0100 Subject: [PATCH] buildpackages: fix RPM generation script to support opensuse spec file Signed-off-by: Ricardo Dias (cherry picked from commit 4692f995ba6967796d5dd2f5fd85fde8705a1ccc) --- tasks/buildpackages/make-rpm.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/buildpackages/make-rpm.sh b/tasks/buildpackages/make-rpm.sh index 6e566a347df..2ff0c9442d1 100755 --- a/tasks/buildpackages/make-rpm.sh +++ b/tasks/buildpackages/make-rpm.sh @@ -87,7 +87,7 @@ function build_package() { # options (otherwise parts of the source tree will be left out). # if [ "$suse" = true ] ; then - sudo zypper -n install bzip2 + sudo zypper -n install bzip2 else sudo yum install -y bzip2 fi @@ -133,6 +133,10 @@ function build_package() { cd ${buildarea}/SPECS ccache=$(echo /usr/lib*/ccache) # Build RPMs + if [ "$suse" = true ]; then + sed -i -e '0,/%package/s//%debug_package\n&/' \ + -e 's/%{epoch}://g' -e '/^Epoch:/d' ceph.spec + fi buildarea=`readlink -fn ${releasedir}` ### rpm wants absolute path PATH=$ccache:$PATH rpmbuild -ba --define "_unpackaged_files_terminate_build 0" --define "_topdir ${buildarea}" ceph.spec ) -- 2.39.5