]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-iscsi: alternate attempt to build source tarball 800/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 26 Jul 2017 18:32:11 +0000 (14:32 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 26 Jul 2017 18:48:39 +0000 (14:48 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ceph-iscsi-cli/build/build_rpm
ceph-iscsi-config/build/build_rpm

index 8b1cd41450a1a91159e84af1ef4f27f80ee80e90..daa1fbaacd0e98e32779be355a2644809d467a00 100644 (file)
@@ -11,7 +11,6 @@ fi
 
 # Install the dependencies
 sudo yum install -y mock
-sudo yum-builddep -y ${PROJECT}.spec
 
 ## Get some basic information about the system and the repository
 # Get version
@@ -20,9 +19,16 @@ VERSION="$(git describe --abbrev=0 --tags HEAD)"
 REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./')"
 
 # Create dummy dist tar
-tar cfv dist/${PROJECT}-${VERSION}.tar.gz \
+tar cf dist/${PROJECT}-${VERSION}.tar.gz \
        --exclude .git --exclude dist \
-       --transform "s/^/${PROJECT}-${VERSION}\//" *
+       --transform "s,^,${PROJECT}-${VERSION}/," *
+tar tfv dist/${PROJECT}-${VERSION}.tar.gz
+
+# Update spec version
+sed -i "s/^Version:.*$/Version:\t${VERSION}/g" $WORKSPACE/${PROJECT}.spec
+sed -i "s/^Release:.*$/Release:\t${REVISION}%{?dist}/g" $WORKSPACE/${PROJECT}.spec
+# for debugging
+cat $WORKSPACE/${PROJECT}.spec
 
 # Update setup.py version
 sed -i "s/version=\"[^\"]*\"/version=\"${VERSION}\"/g" $WORKSPACE/setup.py
index 33222e03803e6953467e8ef9ee4ab8be7efa7264..ab6f12a5328a21c378f7fcac4e7c1d9a997dc4d7 100644 (file)
@@ -11,7 +11,6 @@ fi
 
 # Install the dependencies
 sudo yum install -y mock
-sudo yum-builddep -y ${PROJECT}.spec
 
 ## Get some basic information about the system and the repository
 # Get version
@@ -20,9 +19,16 @@ VERSION="$(git describe --abbrev=0 --tags HEAD)"
 REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./')"
 
 # Create dummy dist tar
-tar cfv dist/${PROJECT}-${VERSION}.tar.gz \
+tar cf dist/${PROJECT}-${VERSION}.tar.gz \
        --exclude .git --exclude dist \
-       --transform "s/^/${PROJECT}-${VERSION}\//" *
+       --transform "s,^,${PROJECT}-${VERSION}/," *
+tar tfv dist/${PROJECT}-${VERSION}.tar.gz
+
+# Update spec version
+sed -i "s/^Version:.*$/Version:\t${VERSION}/g" $WORKSPACE/${PROJECT}.spec
+sed -i "s/^Release:.*$/Release:\t${REVISION}%{?dist}/g" $WORKSPACE/${PROJECT}.spec
+# for debugging
+cat $WORKSPACE/${PROJECT}.spec
 
 # Update setup.py version
 sed -i "s/version=\"[^\"]*\"/version=\"${VERSION}\"/g" $WORKSPACE/setup.py