diff options
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/deb_script/deb_build.sh | 104 | ||||
-rw-r--r-- | packaging/deb_script/files/control | 19 | ||||
-rw-r--r-- | packaging/deb_script/files/control_ib | 19 | ||||
-rw-r--r-- | packaging/deb_script/files/postinst | 42 | ||||
-rwxr-xr-x | packaging/deb_script/files/rules | 13 |
5 files changed, 197 insertions, 0 deletions
diff --git a/packaging/deb_script/deb_build.sh b/packaging/deb_script/deb_build.sh new file mode 100644 index 0000000..3fe533d --- /dev/null +++ b/packaging/deb_script/deb_build.sh @@ -0,0 +1,104 @@ +#!/bin/bash +set -x +VERSION=$1 +BUILD_ROOT=`pwd` + +function download_src(){ +#download the package +wget http://bits.gluster.com//pub/gluster/glusterfs/src/glusterfs-$VERSION.tar.gz +} + +function make_orig() +{ +#cp as orig. +cp glusterfs-$VERSION.tar.gz glusterfs-$VERSION.orig.tar.gz +cp glusterfs-$VERSION.tar.gz glusterfs_$VERSION.orig.tar.gz +} + +function file_untar() +{ +#untar +tar -zxvf glusterfs-$VERSION.tar.gz +} + +function create_debian_dir() +{ +cd glusterfs-$VERSION +#dh_make +dh_make<<EOF +s + +EOF +} + + +function rmfiles_debian_dir(){ +#remove files +rm -rf $BUILD_ROOT/glusterfs-$VERSION/debian/copyright docs README.* *.?x +rm -rf $BUILD_ROOT/glusterfs-$VERSION/debian/docs +rm -rf $BUILD_ROOT/glusterfs-$VERSION/debian/README.* +rm -rf $BUILD_ROOT/glusterfs-$VERSION/debian/*.?x +rm -rf $BUILD_ROOT/glusterfs-$VERSION/debian/glusterfs* +} + + +function edfiles_debian_dir(){ +cd $BUILD_ROOT +#modify +sed -i "s/3.2.3/$VERSION/g" $BUILD_ROOT/glusterfs-$VERSION/debian/changelog + +#cp control +cp $BUILD_ROOT/files/control $BUILD_ROOT/glusterfs-$VERSION/debian + +#cp postinst +cp $BUILD_ROOT/files/postinst $BUILD_ROOT/glusterfs-$VERSION/debian + +#cp rules +cp $BUILD_ROOT/files/rules $BUILD_ROOT/glusterfs-$VERSION/debian +} + +function start_debbuild(){ +#move +cd $BUILD_ROOT/glusterfs-$VERSION +apt-get -y remove libibverbs-dev libibverbs1 +#start the build +DEB_BUILD_OPTIONS=noopt,nostrip debuild +} + + + +function start_debbuild_with_rdma(){ +#move +cd $BUILD_ROOT/glusterfs-$VERSION +apt-get -y install libibverbs-dev libibverbs1 + +#cp control +cp $BUILD_ROOT/files/control_ib $BUILD_ROOT/glusterfs-$VERSION/debian/control + +#start the build +DEB_BUILD_OPTIONS=noopt,nostrip debuild +} + +function mv_files(){ +mkdir $BUILD_ROOT/glfs-$VERSION +mv $BUILD_ROOT/glusterfs_$VERSION-1_amd64.deb $BUILD_ROOT/glfs-$VERSION +} + +function mv_ib_files(){ +mkdir $BUILD_ROOT/glfs-$VERSION -p +cp $BUILD_ROOT/glusterfs_$VERSION-1_amd64.deb $BUILD_ROOT/glfs-$VERSION/glusterfs_$VERSION-1_with_rdma_amd64.deb +} + +############Main part################ + +download_src +make_orig +file_untar +create_debian_dir +rmfiles_debian_dir +edfiles_debian_dir +start_debbuild +mv_files +start_debbuild_with_rdma +mv_ib_files +##################### diff --git a/packaging/deb_script/files/control b/packaging/deb_script/files/control new file mode 100644 index 0000000..5bc7aa4 --- /dev/null +++ b/packaging/deb_script/files/control @@ -0,0 +1,19 @@ +Source: glusterfs +Section: admin +Priority: extra +Maintainer: lakshmipathi <lakshmipathi@gluster.com> +Build-Depends: debhelper (>= 7), autotools-dev +Standards-Version: 3.8.3 +Homepage: http://www.gluster.com + +Package: glusterfs +Architecture: amd64 +Depends: ${shlibs:Depends}, ${misc:Depends},nfs-common +Description: clustered file-system + GlusterFS is a clustered file-system capable of scaling to several + peta-bytes. It aggregates various storage bricks over Infiniband RDMA + or TCP/IP interconnect into one large parallel network file + system. GlusterFS is one of the most sophisticated file system in + terms of features and extensibility. It borrows a powerful concept + called Translators from GNU Hurd kernel. Much of the code in GlusterFS + is in userspace and easily manageable. diff --git a/packaging/deb_script/files/control_ib b/packaging/deb_script/files/control_ib new file mode 100644 index 0000000..5729bf7 --- /dev/null +++ b/packaging/deb_script/files/control_ib @@ -0,0 +1,19 @@ +Source: glusterfs +Section: admin +Priority: extra +Maintainer: lakshmipathi <lakshmipathi@gluster.com> +Build-Depends: debhelper (>= 7), autotools-dev +Standards-Version: 3.8.3 +Homepage: http://www.gluster.com + +Package: glusterfs +Architecture: amd64 +Depends: ${shlibs:Depends}, ${misc:Depends},nfs-common,libibverbs-dev, libibverbs1 +Description: clustered file-system + GlusterFS is a clustered file-system capable of scaling to several + peta-bytes. It aggregates various storage bricks over Infiniband RDMA + or TCP/IP interconnect into one large parallel network file + system. GlusterFS is one of the most sophisticated file system in + terms of features and extensibility. It borrows a powerful concept + called Translators from GNU Hurd kernel. Much of the code in GlusterFS + is in userspace and easily manageable. diff --git a/packaging/deb_script/files/postinst b/packaging/deb_script/files/postinst new file mode 100644 index 0000000..15c0913 --- /dev/null +++ b/packaging/deb_script/files/postinst @@ -0,0 +1,42 @@ +#!/bin/sh +# postinst script for glusterfs +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + mkdir -p /usr/local/libexec/glusterfs/ + rm -rf /usr/local/libexec/glusterfs/gsyncd + ln -s /usr/lib/glusterfs/glusterfs/gsyncd /usr/local/libexec/glusterfs/gsyncd + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/packaging/deb_script/files/rules b/packaging/deb_script/files/rules new file mode 100755 index 0000000..917d9bf --- /dev/null +++ b/packaging/deb_script/files/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ |