From 812ff6ca9fcd3e629e49d4328905f33eee8ca3f5 Mon Sep 17 00:00:00 2001 From: Qiaowei Ren Date: Thu, 4 Jan 2018 13:43:33 +0800 Subject: initial code repo This patch creates initial code repo. For ceph, luminous stable release will be used for base code, and next changes and optimization for ceph will be added to it. For opensds, currently any changes can be upstreamed into original opensds repo (https://github.com/opensds/opensds), and so stor4nfv will directly clone opensds code to deploy stor4nfv environment. And the scripts for deployment based on ceph and opensds will be put into 'ci' directory. Change-Id: I46a32218884c75dda2936337604ff03c554648e4 Signed-off-by: Qiaowei Ren --- src/ceph/make-debs.sh | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 src/ceph/make-debs.sh (limited to 'src/ceph/make-debs.sh') diff --git a/src/ceph/make-debs.sh b/src/ceph/make-debs.sh new file mode 100755 index 0000000..705d88d --- /dev/null +++ b/src/ceph/make-debs.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Copyright (C) 2015 Red Hat +# +# Author: Loic Dachary +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library Public License for more details. +# +set -xe + +base=${1:-/tmp/release} +codename=$(lsb_release -sc) +releasedir=$base/$(lsb_release -si)/WORKDIR +rm -fr $releasedir +mkdir -p $releasedir +# +# remove all files not under git so they are not +# included in the distribution. +# +git clean -dxf +# +# git describe provides a version that is +# a) human readable +# b) is unique for each commit +# c) compares higher than any previous commit +# d) contains the short hash of the commit +# +vers=$(git describe --match "v*" | sed s/^v//) +./make-dist $vers +# +# rename the tarbal to match debian conventions and extract it +# +mv ceph-$vers.tar.bz2 $releasedir/ceph_$vers.orig.tar.bz2 +tar -C $releasedir -jxf $releasedir/ceph_$vers.orig.tar.bz2 +# +# copy the debian directory over and remove -dbg packages +# because they are large and take time to build +# +cp -a debian $releasedir/ceph-$vers/debian +cd $releasedir +perl -ni -e 'print if(!(/^Package: .*-dbg$/../^$/))' ceph-$vers/debian/control +perl -pi -e 's/--dbg-package.*//' ceph-$vers/debian/rules +# +# always set the debian version to 1 which is ok because the debian +# directory is included in the sources and the upstream version will +# change each time it is modified. +# +dvers="$vers-1" +# +# update the changelog to match the desired version +# +cd ceph-$vers +chvers=$(head -1 debian/changelog | perl -ne 's/.*\(//; s/\).*//; print') +if [ "$chvers" != "$dvers" ]; then + DEBEMAIL="contact@ceph.com" dch -D $codename --force-distribution -b -v "$dvers" "new version" +fi +# +# create the packages +# a) with ccache to speed things up when building repeatedly +# b) do not sign the packages +# c) use half of the available processors +# +: ${NPROC:=$(($(nproc) / 2))} +if test $NPROC -gt 1 ; then + j=-j${NPROC} +fi +PATH=/usr/lib/ccache:$PATH dpkg-buildpackage $j -uc -us +cd ../.. +mkdir -p $codename/conf +cat > $codename/conf/distributions < $codename/version -- cgit 1.2.3-korg