Commit 20d019d8 authored by Bernd Schubert's avatar Bernd Schubert

debian builds

Build most debian packages (missing is admon) and fix a few issues lintian
complained about, such as executable .c and .h files

git-svn-id: https://svn.itwm.fhg.de/svn/fsdevel/projects@1950 06d474eb-e7fd-0310-b1d4-fdbe02cb80bc
parent cf5f0e37
#!/bin/sh
set -e
RELEASE_STR="`date +%F|tr - .`.`date +%T| tr -d :`"
packages="fhgfs_storage fhgfs_utils fhgfs_client_module fhgfs_client_opentk_module \
fhgfs_helperd fhgfs_meta fhgfs_mgmtd fhgfs_opentk_lib"
the_usage()
{
echo >&2
echo "usage: `basename $0` [-p] [-s release-string ] [-v buildversion]" >&2
echo " -p Run as complete project checkout with a different directory structure"
echo " -s Release string. Default is to use the current date"
echo " -v Build for this buildversion (tag), defaults to trunk"
echo
echo >&2
}
run_cmd()
{
cmd="$@"
echo "$cmd"
eval $cmd
res=$?
if [ $res -ne 0 ]; then
echo " failed: $res"
echo "Aborting"
exit 1
fi
}
VERSION="trunk"
PROJECT_CHECK_OUT=0
while getopts "dps:v:" opt; do
case $opt in
d)
NO_DEBUG=""
;;
p)
PROJECT_CHECK_OUT=1
;;
s)
export RELEASE_STR="$OPTARG"
;;
v)
VERSION=$OPTARG
;;
:)
echo "Option -$OPTARG requires an argument." >&2
the_usage
exit 1
;;
*)
echo "Invalid option: -$OPTARG" >&2
the_usage
exit 1
;;
esac
done
opentk="fhgfs_opentk_lib"
common="fhgfs_common"
pushd `dirname $0`/../
ROOT=`pwd`
if [ $PROJECT_CHECK_OUT -eq 1 ]; then
if [ "$VERSION" = "trunk" ]; then
EXTRA_DIR="trunk"
else
EXTRA_DIR="tags/$VERSION"
fi
run_cmd "export WITHOUT_OPENTK=1"
run_cmd "export FHGFS_CLIENT_OPENTK_PATH=${ROOT}/fhgfs_client_opentk_module/$EXTRA_DIR"
run_cmd "export FHGFS_OPENTK_PATH=${ROOT}/fhgfs_opentk_lib/$EXTRA_DIR"
run_cmd "export FHGFS_COMMON_PATH=${ROOT}/fhgfs_common/$EXTRA_DIR"
run_cmd "export FHGFS_ONLINE_CFG_PATH=${ROOT}/fhgfs_online_cfg/$EXTRA_DIR"
run_cmd "export FHGFS_SETUP_PATH=${ROOT}/fhgfs_setup/$EXTRA_DIR"
run_cmd "export ADMON_GUI_PATH=${ROOT}/fhgfs_admon_gui/$EXTRA_DIR/fhgfs_admon_GUI"
run_cmd "export FHGFS_VERSION=$RELEASE_STR"
fi
# build dependency libs
make_dep_lib()
{
lib="$1"
echo ${lib}
pwd
run_cmd "make -C ${lib}/${EXTRA_DIR}/build clean >/dev/null"
run_cmd "make -C ${lib}/${EXTRA_DIR}/build >/dev/null"
}
# clean packages up here first, do not do it below, as we need
# common and opentk
for package in $packages; do
echo $package clean
make -C ${package}/${EXTRA_DIR}/build clean >/dev/null
done
# build common and opentk, as others depend on them
make_dep_lib $opentk
make_dep_lib $common
export DEBIAN_ARCHIVE_DIR=`mktemp -d /tmp/debian_archive.XXXXXXXXX`
logfile=`mktemp`
# build debs here
for package in $packages; do
echo $package
set +e
run_cmd "make -C ${package}/${EXTRA_DIR}/build deb >$logfile 2>$logfile"
deb=`cat $logfile | grep "Wrote package files"`
set -e
if [ -z "$deb" ]; then
echo
echo "Building the deb of $package failed! Check $logfile. Aborting!"
echo
exit 1
fi
done
echo "Wrote DEBs to $DEBIAN_ARCHIVE_DIR"
echo
rm -f $logfile
......@@ -2,6 +2,8 @@
set -e
RELEASE_STR=`date +%F|tr - .`.`date +%T| tr -d :`
packages="fhgfs_admon fhgfs_utils fhgfs_client_module fhgfs_client_opentk_module \
fhgfs_helperd fhgfs_meta fhgfs_mgmtd fhgfs_opentk_lib fhgfs_storage"
......@@ -82,9 +84,7 @@ if [ $PROJECT_CHECK_OUT -eq 1 ]; then
run_cmd "export FHGFS_ONLINE_CFG_PATH=${ROOT}/fhgfs_online_cfg/$EXTRA_DIR"
run_cmd "export FHGFS_SETUP_PATH=${ROOT}/fhgfs_setup/$EXTRA_DIR"
run_cmd "export ADMON_GUI_PATH=${ROOT}/fhgfs_admon_gui/$EXTRA_DIR/fhgfs_admon_GUI"
if [ -n "$RELEASE_STR" ]; then
run_cmd "export FHGFS_VERSION=$RELEASE_STR"
fi
run_cmd "export FHGFS_VERSION=$RELEASE_STR"
fi
......
File mode changed from 100755 to 100644
......@@ -219,6 +219,9 @@ endif
rpm:
./make-rpm
deb:
./make-deb
help:
@echo 'This makefile creates two kernel modules:'
@echo 'fhgfs_client.ko and fhgfs_client_opentk.ko'
......@@ -258,7 +261,8 @@ help:
@echo ' install - install the kernel modules'
@echo ' clean - delete previously compiled files'
@echo ' prepare_release - build and copy files into the RELEASE_PATH directory'
@echo ' rpm - create a rpm file and write it to buildroot/RPMS/'
@echo ' rpm - create a rpm package file'
@echo ' deb - build debian package file'
#
# --- Normal make part [END] ---
......
File mode changed from 100755 to 100644
__NAME__ (__FHGFS_VERSION__) stable; urgency=low
* initial native debian packaging
-- FhGFS Maintainers <packages@fhgfs.com> Wed, 16 Mar 2011 15:47:00 +0100
Source: fhgfs-client
Section: misc
Priority: optional
Maintainer: FhGFS Maintainers <packages@fhgfs.com>
Build-Depends: debhelper (>= 7.0.0), lsb-release
Standards-Version: 3.8.0
Package: fhgfs-client
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: FhGFS client opentk sources
This package contains binary objects of the closed source part of FhGFS and
open source code to allow to build the client kernel module.
Files: *
Copyright: Fraunhofer ITWM
License: FhGFS EULA
The complete text of this license can be found at
http://www.fhgfs.com/docs/FraunhoferFS_EULA.txt
#!/usr/bin/make -f
DEB_BUILD_ROOT = debian/__NAME__
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# nothing to do for us
touch configure-stamp
build: build-stamp
build-stamp: $(QUILT_STAMPFN) configure-stamp
dh_testdir
# nothing to do for us
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
make FHGFS_CLIENT_OPENTK_PATH=__FHGFS_CLIENT_OPENTK_PATH__ \
RELEASE_PATH=$(DEB_BUILD_ROOT)/opt/fhgfs/src/client \
FHGFS_VERSION=__FHGFS_VERSION__ \
KDIR=__KDIR__ \
WITHOUT_OPENTK=1 V=1 clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
make FHGFS_CLIENT_OPENTK_PATH=__FHGFS_CLIENT_OPENTK_PATH__ \
RELEASE_PATH=$(DEB_BUILD_ROOT)/opt/fhgfs/src/client \
FHGFS_VERSION=__FHGFS_VERSION__ \
KDIR=__KDIR__ \
WITHOUT_OPENTK=1 V=1 prepare_release
install -D dist/etc/init.d/fhgfs_client.init.debian debian/__NAME__.init
install -D dist/etc/default/fhgfs_client debian/__NAME__.default
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installinit --no-restart-on-upgrade --no-start -- start 99 2 3 4 5 . stop 99 2 3 4 5 .
# dh_install
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_lintian
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
......@@ -48,7 +48,7 @@ BuildRoot: %{_tmppath}/%NAME%-root
requires: fhgfs-client-opentk-src
%description
The package contains binary objects of the closed source part of FhGFS and
This package contains binary objects of the closed source part of FhGFS and
open source code to allow to build the client kernel module.
......
#!/bin/bash
set -e
NAME="fhgfs-client"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}.${RELEASE_STR}.debian${DEBIAN_VERSION}"
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_CLIENT_OPENTK_PATH=${FHGFS_CLIENT_OPENTK_PATH:-"../../fhgfs_client_opentk_module"}
FHGFS_CLIENT_OPENTK_PATH=`readlink -f $FHGFS_CLIENT_OPENTK_PATH` # make absolute
CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s#__FHGFS_CLIENT_OPENTK_PATH__#$FHGFS_CLIENT_OPENTK_PATH#" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/" \
-e "s#__KDIR__#$KDIR#" \
${RULES}.in > ${RULES}
chmod +x debian/rules
#cp debian/package.lintian-overrides.in debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/" debian/${NAME}.lintian-overrides
# build the package and supress lintian warnings. Lintian in Lenny cannot
# do that itself yet
# NOTE: package not signed yet! (-us -uc)
debuild -us -uc 2>&1 | egrep -v "dir-or-file-in-opt | file-in-unusual-dir"
debuild clean
if [ -z "$DEBIAN_ARCHIVE_DIR" ]; then
DEBIAN_ARCHIVE_DIR=`mktemp -d /tmp/debian_archive.XXXXXXXXX`
fi
mv ../*.build ../*.changes ../*.deb ../*.dsc ../*.tar.gz $DEBIAN_ARCHIVE_DIR/
echo "Wrote package files to $DEBIAN_ARCHIVE_DIR"
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -190,6 +190,9 @@ clean:
rpm:
./make-rpm
deb:
./make-deb
help:
@echo 'Optional Arguments:'
@echo ' KDIR=<path>: Kernel build directory.'
......@@ -209,7 +212,8 @@ help:
@echo 'Targets:'
@echo ' all (default) - build only'
@echo ' prepare_release - build and copy files into the RELEASE_PATH directory'
@echo ' rpm - create a rpm file and write it to buildroot/RPMS/'
@echo ' rpm - create a rpm package file'
@echo ' deb - create a debian package file'
......
__NAME__ (__FHGFS_VERSION__) stable; urgency=low
* initial native debian packaging
-- FhGFS Maintainers <packages@fhgfs.com> Wed, 16 Mar 2011 15:47:00 +0100
Source: fhgfs-client-opentk-src
Section: misc
Priority: optional
Maintainer: FhGFS Maintainers <packages@fhgfs.com>
Build-Depends: debhelper (>= 7.0.0), lsb-release
Standards-Version: 3.8.0
Package: fhgfs-client-opentk-src
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: FhGFS client opentk sources
This package contains the opentk source code to allow to
build the client kernel modules.
Files: *
Copyright: Fraunhofer ITWM
License: FhGFS EULA
The complete text of this license can be found at
http://www.fhgfs.com/docs/FraunhoferFS_EULA.txt
#!/usr/bin/make -f
DEB_BUILD_ROOT = debian/__NAME__
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# nothing to do for us
touch configure-stamp
build: build-stamp
build-stamp: $(QUILT_STAMPFN) configure-stamp
dh_testdir
# nothing to do for us
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
make clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
make FHGFS_VERSION='__FHGFS_VERSION__' \
RELEASE_PATH=$(DEB_BUILD_ROOT)/opt/fhgfs/src/client prepare_release
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_lintian
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
......@@ -49,7 +49,7 @@ BuildArch: noarch
#requires:
%description
The package contains the opentk source code to allow to
This package contains the opentk source code to allow to
build the client kernel modules.
%prep
......
#!/bin/bash
set -e
NAME="fhgfs-client-opentk-src"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}.${RELEASE_STR}.debian${DEBIAN_VERSION}"
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/" \
${RULES}.in > ${RULES}
chmod +x debian/rules
#cp debian/package.lintian-overrides.in debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/" debian/${NAME}.lintian-overrides
# build the package and supress lintian warnings. Lintian in Lenny cannot
# do that itself yet
# NOTE: package not signed yet! (-us -uc)
debuild -us -uc 2>&1 | egrep -v "dir-or-file-in-opt | file-in-unusual-dir"
debuild clean
if [ -z "$DEBIAN_ARCHIVE_DIR" ]; then
DEBIAN_ARCHIVE_DIR=`mktemp -d /tmp/debian_archive.XXXXXXXXX`
fi
mv ../*.build ../*.changes ../*.deb ../*.dsc ../*.tar.gz $DEBIAN_ARCHIVE_DIR/
echo "Wrote package files to $DEBIAN_ARCHIVE_DIR"
File mode changed from 100755 to 100644
......@@ -61,6 +61,9 @@ clean:
rpm:
./make-rpm
deb:
./make-deb
help:
@echo 'Optional Arguments:'
@echo ' FHGFS_DEBUG=1:'
......@@ -79,7 +82,8 @@ help:
@echo 'Targets:'
@echo ' all (default) - build only'
@echo ' prepare_release - build and copy files into the RELEASE_PATH directory'
@echo ' rpm - create a rpm file and write it to buildroot/RPMS/'
@echo ' rpm - create a rpm package file'
@echo ' deb - create a debian package file'
@echo ' help - print this help message'
......
__NAME__ (__FHGFS_VERSION__) stable; urgency=low
* initial native debian packaging
-- FhGFS Maintainers <packages@fhgfs.com> Wed, 16 Mar 2011 15:47:00 +0100
Source: fhgfs-helperd
Section: misc
Priority: optional
Maintainer: FhGFS Maintainers <packages@fhgfs.com>
Build-Depends: debhelper (>= 7.0.0), lsb-release
Standards-Version: 3.8.0
Package: fhgfs-helperd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, fhgfs-opentk-lib
Description: FhGFS helper daemon
The package contains the FhGFS helper daemon. The helper daemon is responsible
to write (kernel) client messages to the client log file.
Files: *
Copyright: Fraunhofer ITWM
License: FhGFS EULA
The complete text of this license can be found at
http://www.fhgfs.com/docs/FraunhoferFS_EULA.txt
#!/usr/bin/make -f
DEB_BUILD_ROOT = debian/__NAME__
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir