From: Jason Dillaman Date: Wed, 26 Jul 2017 18:32:11 +0000 (-0400) Subject: ceph-iscsi: alternate attempt to build source tarball X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff92ab891c47418e12a678d8ed1cd27293e98bb0;p=ceph-build.git ceph-iscsi: alternate attempt to build source tarball Signed-off-by: Jason Dillaman --- diff --git a/ceph-iscsi-cli/build/build_rpm b/ceph-iscsi-cli/build/build_rpm index 8b1cd414..daa1fbaa 100644 --- a/ceph-iscsi-cli/build/build_rpm +++ b/ceph-iscsi-cli/build/build_rpm @@ -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 diff --git a/ceph-iscsi-config/build/build_rpm b/ceph-iscsi-config/build/build_rpm index 33222e03..ab6f12a5 100644 --- a/ceph-iscsi-config/build/build_rpm +++ b/ceph-iscsi-config/build/build_rpm @@ -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