From: Nathan Cutler Date: Fri, 2 Mar 2018 21:01:17 +0000 (+0100) Subject: buildpackages: ensure spec file has correct tarball name X-Git-Tag: 1.1.0~211^2~52 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=29dbd22fcd5d2a943a4c2a4ade41928c7d60f542;p=teuthology.git buildpackages: ensure spec file has correct tarball name We are using this script to build various versions of ceph.spec.in, which do various things for different build environments. Ignore whatever the spec file is trying to do with the tarball name and force it to the name of the tarball at hand. Signed-off-by: Nathan Cutler --- diff --git a/teuthology/task/buildpackages/make-rpm.sh b/teuthology/task/buildpackages/make-rpm.sh index 6830957d3b..d2686a2814 100755 --- a/teuthology/task/buildpackages/make-rpm.sh +++ b/teuthology/task/buildpackages/make-rpm.sh @@ -117,10 +117,6 @@ function build_package() { make dist-bzip2 else # kraken and above - if [ "$suse" = true ]; then - sed -i -e 's/^%autosetup -p1$/%autosetup -p1 -n @TARBALL_BASENAME@/' \ - ceph.spec.in - fi ./make-dist fi # Set up build area @@ -138,6 +134,7 @@ function build_package() { mkdir -p ${buildarea}/RPMS mkdir -p ${buildarea}/BUILD CEPH_TARBALL=( ceph-*.tar.bz2 ) + CEPH_TARBALL_BASE=$(echo $CEPH_TARBALL | sed -e 's/.tar.bz2$//') cp -a $CEPH_TARBALL ${buildarea}/SOURCES/. cp -a rpm/*.patch ${buildarea}/SOURCES || true ( @@ -149,8 +146,11 @@ function build_package() { -e 's/%bcond_with ceph_test_package/%bcond_without ceph_test_package/g' \ -e '0,/^Release:/s/.//' \ -e '/^Source9/d' \ + -e "0,/^Source0:/s/Source0:.*/Source0: $CEPH_TARBALL/" \ + -e "s/^%autosetup -p1.*/%autosetup -p1 -n $CEPH_TARBALL_BASE/g" \ ceph.spec fi + cat ceph.spec buildarea=`readlink -fn ${releasedir}` ### rpm wants absolute path PATH=$ccache:$PATH rpmbuild -ba --nosignature \ --define '_srcdefattr (-,root,root)' \