From dd4da51b4e4f947dbec7384a5e93ffcbefe46098 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 3 Jun 2015 12:02:13 -0400 Subject: [PATCH] get rid of rpm stuff in build_deb Signed-off-by: Alfredo Deza --- ceph-build/build/build_deb | 84 ++++++++++++++---------------------- ceph-build/build/build_rpm | 87 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 52 deletions(-) create mode 100644 ceph-build/build/build_rpm diff --git a/ceph-build/build/build_deb b/ceph-build/build/build_deb index f5fa1fbf..a6609ee8 100644 --- a/ceph-build/build/build_deb +++ b/ceph-build/build/build_deb @@ -30,62 +30,42 @@ cp -a dist release/${vers} echo $DIST > release/${vers}/debian_dists echo "${vers}-1" > release/${vers}/debian_version -case $HOST in +cd release/$vers -gitbuilder-cdep-deb* | tala* | mira*) +# Dirty Hack: +baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true) +if [ $baddist -eq 1 ] +then + sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true + sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true - cd release/$vers - - # Dirty Hack: - baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true) - if [ $baddist -eq 1 ] - then - sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true - sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true - - fi - - # unpack sources - dpkg-source -x ceph_${vers}-1.dsc - if [ $baddist -eq 1 ] - then - rm -vf *.orig.tar.gz || true - grep -v babeltrace ceph-${vers}/debian/control | grep -v liblttng > ceph-${vers}/debian/control.new - mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control - fi - ( cd ceph-${vers} - #DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p' | cut -d'-' -f1) - DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') - #BP_VERSION=${DEB_VERSION}-1${BPTAG} - BP_VERSION=${DEB_VERSION}${BPTAG} - DEBEMAIL="gary.lowell@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" - ) - dpkg-source -b ceph-${vers} - - echo "Building Debian" - cd "$WORKSPACE" - #$bindir/build_dsc.sh ./release $vers 1 $DIST - sudo $bindir/build_debs.sh ./release /srv/debian-base $vers - - #Collect Artifacts - mkdir -p dist/debian - cp -a release/$vers/*.changes dist/debian/. - cp -a release/$vers/*.deb dist/debian/. - cp -a release/$vers/*.dsc dist/debian/. - cp -a release/$vers/*.diff.gz dist/debian/. - cp -a release/$vers/*.tar.gz dist/debian/. +fi - ;; +# unpack sources +dpkg-source -x ceph_${vers}-1.dsc +if [ $baddist -eq 1 ] +then + rm -vf *.orig.tar.gz || true + grep -v babeltrace ceph-${vers}/debian/control | grep -v liblttng > ceph-${vers}/debian/control.new + mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control +fi +( cd ceph-${vers} + DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') + BP_VERSION=${DEB_VERSION}${BPTAG} + DEBEMAIL="gary.lowell@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" +) +dpkg-source -b ceph-${vers} -*) - echo "Building RPMs" - $bindir/build_rpms.sh ./release $vers +echo "Building Debian" +cd "$WORKSPACE" +sudo $bindir/build_debs.sh ./release /srv/debian-base $vers - #Collect Artifacts - mkdir -p dist/rpm/${DIST} - mv release/${vers}/rpm/*/SRPMS ./dist/rpm/${DIST}/. - mv release/${vers}/rpm/*/RPMS/* ./dist/rpm/${DIST}/. - ;; +#Collect Artifacts +mkdir -p dist/debian +cp -a release/$vers/*.changes dist/debian/. +cp -a release/$vers/*.deb dist/debian/. +cp -a release/$vers/*.dsc dist/debian/. +cp -a release/$vers/*.diff.gz dist/debian/. +cp -a release/$vers/*.tar.gz dist/debian/. -esac echo "End Date: $(date)" diff --git a/ceph-build/build/build_rpm b/ceph-build/build/build_rpm new file mode 100644 index 00000000..bfeb99d4 --- /dev/null +++ b/ceph-build/build/build_rpm @@ -0,0 +1,87 @@ +#export GNUPGHOME=/home/jenkins-build/build/gnupg.autobuild/ +export GNUPGHOME=/home/jenkins-build/build/gnupg.ceph-release/ +export KEYID=17ED316D +HOST=$(hostname --short) +echo "Building on $(hostname) Date: $(date)" +echo " DIST=${DIST}" +echo " BPTAG=${BPTAG}" +echo " KEYID=${KEYID}" +echo " WS=$WORKSPACE" +echo " PWD=$(pwd)" +echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP" +echo "*****" +env +echo "*****" + +if [ ! -d /srv/ceph-build ] ; then + echo "Build tools are not installed" + exit 1 +fi +bindir=/srv/ceph-build + +vers=`cat ./dist/version` +# create a release directory for ceph-build tools +mkdir -p release +cp -a dist release/${vers} +echo $DIST > release/${vers}/debian_dists +echo "${vers}-1" > release/${vers}/debian_version + +case $HOST in + +gitbuilder-cdep-deb* | tala* | mira*) + + cd release/$vers + + # Dirty Hack: + baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true) + if [ $baddist -eq 1 ] + then + sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true + sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true + + fi + + # unpack sources + dpkg-source -x ceph_${vers}-1.dsc + if [ $baddist -eq 1 ] + then + rm -vf *.orig.tar.gz || true + grep -v babeltrace ceph-${vers}/debian/control | grep -v liblttng > ceph-${vers}/debian/control.new + mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control + fi + ( cd ceph-${vers} + #DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p' | cut -d'-' -f1) + DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') + #BP_VERSION=${DEB_VERSION}-1${BPTAG} + BP_VERSION=${DEB_VERSION}${BPTAG} + DEBEMAIL="gary.lowell@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" + ) + dpkg-source -b ceph-${vers} + + echo "Building Debian" + cd "$WORKSPACE" + #$bindir/build_dsc.sh ./release $vers 1 $DIST + sudo $bindir/build_debs.sh ./release /srv/debian-base $vers + + #Collect Artifacts + mkdir -p dist/debian + cp -a release/$vers/*.changes dist/debian/. + cp -a release/$vers/*.deb dist/debian/. + cp -a release/$vers/*.dsc dist/debian/. + cp -a release/$vers/*.diff.gz dist/debian/. + cp -a release/$vers/*.tar.gz dist/debian/. + + ;; + +*) + echo "Building RPMs" + $bindir/build_rpms.sh ./release $vers + + #Collect Artifacts + mkdir -p dist/rpm/${DIST} + mv release/${vers}/rpm/*/SRPMS ./dist/rpm/${DIST}/. + mv release/${vers}/rpm/*/RPMS/* ./dist/rpm/${DIST}/. + ;; + +esac +echo "End Date: $(date)" -- 2.39.5