2010-10-18 17:19:28 +00:00
|
|
|
#!/bin/bash -x
|
2010-03-01 04:19:04 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
vers=`grep AM_INIT_AUTOMAKE configure.ac | head -1 | cut '-d ' -f 2 | sed 's/)//'`
|
|
|
|
echo vers $vers
|
|
|
|
|
|
|
|
repo=$1
|
2010-10-18 17:19:28 +00:00
|
|
|
debsubver=$2
|
|
|
|
force=$3
|
|
|
|
|
|
|
|
[ -z "$debsubver" ] && debsubver=1
|
2010-03-01 04:19:04 +00:00
|
|
|
|
2010-10-12 19:47:24 +00:00
|
|
|
[ -z "$repo" ] && echo stable or testing or unstable or rc && exit 1
|
2010-03-01 04:19:04 +00:00
|
|
|
|
|
|
|
if git diff --quiet ; then
|
|
|
|
echo repository is clean
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "**** REPOSITORY IS DIRTY ****"
|
|
|
|
echo
|
|
|
|
if [ "$force" != "force" ]; then
|
|
|
|
echo "add 'force' argument if you really want to continue."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "forcing."
|
|
|
|
fi
|
|
|
|
|
2010-07-05 23:02:28 +00:00
|
|
|
gitver=`git rev-parse HEAD 2>/dev/null | cut -c 1-8`
|
2010-03-01 04:19:04 +00:00
|
|
|
echo gitver $gitver
|
|
|
|
|
2010-10-12 19:47:24 +00:00
|
|
|
if [ "$repo" = "stable" ]; then
|
2010-10-18 17:19:28 +00:00
|
|
|
cephver="$vers"
|
2010-03-01 04:19:04 +00:00
|
|
|
else
|
2010-10-12 19:47:24 +00:00
|
|
|
versuffix=`date "+%Y%m%d%H%M"`
|
2010-10-18 17:19:28 +00:00
|
|
|
cephver="${vers}-$repo${versuffix}-$gitver"
|
2010-03-01 04:19:04 +00:00
|
|
|
fi
|
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
echo final vers $cephver
|
2010-03-01 04:19:04 +00:00
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
if [ -d "release/$cephver" ]; then
|
|
|
|
echo "release/$cephver already exists; reusing that release tarball"
|
|
|
|
cd release/$cephver
|
|
|
|
tar zxvf ceph_$cephver.orig.tar.gz
|
|
|
|
else
|
|
|
|
echo making sure .git_version is up to date
|
|
|
|
cd src
|
|
|
|
./check_version .git_version
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo building tarball
|
|
|
|
make dist
|
|
|
|
|
|
|
|
echo extracting
|
|
|
|
mkdir -p release/$cephver
|
|
|
|
cd release/$cephver
|
|
|
|
|
|
|
|
tar zxf ../../ceph-$vers.tar.gz
|
|
|
|
[ "$vers" != "$cephver" ] && mv ceph-$vers ceph-$cephver
|
|
|
|
tar zcf ceph_$cephver.orig.tar.gz ceph-$cephver
|
|
|
|
cp -a ceph_$cephver.orig.tar.gz ceph-$cephver.tar.gz
|
|
|
|
fi
|
2010-03-01 04:19:04 +00:00
|
|
|
|
2010-03-10 05:38:30 +00:00
|
|
|
# add debian dir
|
2010-10-18 17:19:28 +00:00
|
|
|
echo "copying latest debian dir"
|
|
|
|
cp -a ../../debian ceph-$cephver
|
|
|
|
|
|
|
|
debver="$cephver-$debsubver"
|
2010-03-10 05:38:30 +00:00
|
|
|
|
2010-03-01 04:19:04 +00:00
|
|
|
for dist in sid squeeze lenny
|
|
|
|
do
|
|
|
|
echo building $dist dsc
|
|
|
|
# mkdir $dist
|
|
|
|
# cd $dist
|
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
bpver="$debver"
|
|
|
|
[ "$dist" = "squeeze" ] && bpver="$debver~bpo60+1"
|
|
|
|
[ "$dist" = "lenny" ] && bpver="$debver~bpo50+1"
|
2010-03-01 04:19:04 +00:00
|
|
|
|
|
|
|
comment=""
|
2010-10-19 16:11:25 +00:00
|
|
|
# [ "$debsubver" != "1" ] && comment="package fixes "
|
2010-03-01 04:19:04 +00:00
|
|
|
[ -n "$versuffix" ] && comment="git snapshot "
|
|
|
|
[ "$dist" != "sid" ] && comment="${comment}$dist backport"
|
|
|
|
|
|
|
|
if [ -n "$comment" ]; then
|
2010-10-18 17:19:28 +00:00
|
|
|
cd ceph-$cephver
|
|
|
|
DEBEMAIL="sage@newdream.net" dch -D $dist --force-distribution -b -v "$bpver" "$comment"
|
2010-03-01 04:19:04 +00:00
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
[ "$dist" = "lenny" ] && sed -i 's/, libgoogle-perftools-dev//' ceph-$cephver/debian/control
|
2010-10-15 22:34:38 +00:00
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
dpkg-source -b ceph-$cephver
|
2010-03-01 04:19:04 +00:00
|
|
|
|
|
|
|
# cd ..
|
|
|
|
done
|
|
|
|
|
2010-10-18 17:19:28 +00:00
|
|
|
rm -r ceph-$cephver
|
|
|
|
echo finished release $debver
|
2010-07-08 21:27:57 +00:00
|
|
|
|
|
|
|
cd ../..
|
2010-10-18 17:19:28 +00:00
|
|
|
echo $cephver > .last_release
|