From ff92ab891c47418e12a678d8ed1cd27293e98bb0 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 26 Jul 2017 14:32:11 -0400 Subject: [PATCH] ceph-iscsi: alternate attempt to build source tarball Signed-off-by: Jason Dillaman --- ceph-iscsi-cli/build/build_rpm | 12 +++++++++--- ceph-iscsi-config/build/build_rpm | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) 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 -- 2.39.5