]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: fix RPM generation script to support opensuse spec file
authorRicardo Dias <rdias@suse.com>
Fri, 1 Jul 2016 09:16:07 +0000 (10:16 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 1 Sep 2016 08:32:10 +0000 (10:32 +0200)
Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit 4692f995ba6967796d5dd2f5fd85fde8705a1ccc)

tasks/buildpackages/make-rpm.sh

index 6e566a347dff802c6b77bd76924f3c355e600fe4..2ff0c9442d1c4bdd696843a2ce4c75d422cfc4d2 100755 (executable)
@@ -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
     )