From: Ricardo Dias Date: Fri, 1 Jul 2016 09:16:07 +0000 (+0100) Subject: buildpackages: fix RPM generation script to support opensuse spec file X-Git-Tag: v11.1.1~58^2^2~115^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=494b623602f0b09f10d788e6de6ddcf8d92700e3;p=ceph.git buildpackages: fix RPM generation script to support opensuse spec file Signed-off-by: Ricardo Dias (cherry picked from commit 4692f995ba6967796d5dd2f5fd85fde8705a1ccc) --- diff --git a/tasks/buildpackages/make-rpm.sh b/tasks/buildpackages/make-rpm.sh index 6e566a347dff8..2ff0c9442d1c4 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 )