* buildfarm scripts for the packages
authorWilfried Göesgens <willi@citadel.org>
Sat, 15 Dec 2007 22:38:06 +0000 (22:38 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 15 Dec 2007 22:38:06 +0000 (22:38 +0000)
13 files changed:
contrib/build.sh [new file with mode: 0755]
contrib/configs/deb-amd64/libical_targets [new file with mode: 0644]
contrib/configs/deb-amd64/libsieve_targets [new file with mode: 0644]
contrib/configs/deb-amd64/targets [new file with mode: 0644]
contrib/configs/deb-amd64/tinymce_targets [new file with mode: 0644]
contrib/configs/deb-i386/libical_targets [new file with mode: 0644]
contrib/configs/deb-i386/libsieve_targets [new file with mode: 0644]
contrib/configs/deb-i386/targets [new file with mode: 0644]
contrib/configs/deb-i386/tinymce_targets [new file with mode: 0644]
contrib/contrib.sh [new file with mode: 0755]
contrib/copysource.sh [new file with mode: 0755]
contrib/include.sh [new file with mode: 0755]
contrib/upgradebuilds.sh [new file with mode: 0755]

diff --git a/contrib/build.sh b/contrib/build.sh
new file mode 100755 (executable)
index 0000000..87e6e26
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+apt-get update
+
+source include.sh
+apt-get update
+WD=`pwd`
+# get everything built.
+for i in `cat $TARGETS`; do 
+    cd $WD
+    DISTRO=`dirname $i`
+    VSERVER_BASE=`basename $i`
+    DISTVER=`basename $i |sed "s;CitadelBuild.;;"`
+    DISTVER=`cd $APACHE_ROOT/public_html/$DISTRO/; ls -d ?$DISTVER `
+    echo "****** building $DISTRO $DISTVER ******"
+    CleanBuild $VSERVER_BASE $CHECKOUT_DIR 
+
+    echo "****** building $DISTRO $DISTVER libcitadel ******"
+    cd $WD
+    GetSource $VSERVER_BASE $CHECKOUT_DIR libcitadel
+    BuildSource $VSERVER_BASE $CHECKOUT_DIR libcitadel
+    InstallContrib  $VSERVER_BASE $CHECKOUT_DIR libcitadel
+
+    echo "****** building $DISTRO $DISTVER Webcit ******"
+    cd $WD
+    GetSource $VSERVER_BASE $CHECKOUT_DIR webcit
+    BuildSource $VSERVER_BASE $CHECKOUT_DIR webcit
+
+    echo "****** building $DISTRO $DISTVER Citadel ******"
+    cd $WD
+    GetSource $VSERVER_BASE $CHECKOUT_DIR citadel
+    BuildSource $VSERVER_BASE $CHECKOUT_DIR citadel
+
+done
+
+# put it public.
+for i in `cat $TARGETS`; do 
+    echo "****** installing $DISTRO $DISTVER ******"
+
+    cd $WD
+    DISTRO=`dirname $i`
+    VSERVER_BASE=`basename $i`
+    DISTVER=`basename $i |sed "s;CitadelBuild.;;"`
+    DISTVER=`cd $APACHE_ROOT/public_html/$DISTRO/; ls -d ?$DISTVER `
+
+    CleanApache "$DISTRO/$DISTVER"
+
+    cd $WD
+    UpperResults $VSERVER_BASE "$DISTRO/$DISTVER"
+done
+
+
+
+chroot ${VSERVER_ROOT}/apache/ /bin/bash -c "cd ${CIT_APACHE_DIR}/; ./refresh.sh"
diff --git a/contrib/configs/deb-amd64/libical_targets b/contrib/configs/deb-amd64/libical_targets
new file mode 100644 (file)
index 0000000..ac785b2
--- /dev/null
@@ -0,0 +1,6 @@
+ubuntu/CitadelBuildGutsy
+ubuntu/CitadelBuildFeisty
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildEtch
+debian/CitadelBuildSid
diff --git a/contrib/configs/deb-amd64/libsieve_targets b/contrib/configs/deb-amd64/libsieve_targets
new file mode 100644 (file)
index 0000000..9c456bb
--- /dev/null
@@ -0,0 +1,5 @@
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildEtch
+debian/CitadelBuildSid
+
diff --git a/contrib/configs/deb-amd64/targets b/contrib/configs/deb-amd64/targets
new file mode 100644 (file)
index 0000000..f7d237c
--- /dev/null
@@ -0,0 +1,6 @@
+debian/CitadelBuildEtch
+debian/CitadelBuildSid
+ubuntu/CitadelBuildGutsy
+ubuntu/CitadelBuildFeisty
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
diff --git a/contrib/configs/deb-amd64/tinymce_targets b/contrib/configs/deb-amd64/tinymce_targets
new file mode 100644 (file)
index 0000000..ae113e8
--- /dev/null
@@ -0,0 +1,5 @@
+ubuntu/CitadelBuildBreezy
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildSarge
+debian/CitadelBuildSarge_bdb44
diff --git a/contrib/configs/deb-i386/libical_targets b/contrib/configs/deb-i386/libical_targets
new file mode 100644 (file)
index 0000000..2f48888
--- /dev/null
@@ -0,0 +1,10 @@
+ubuntu/CitadelBuildGutsy
+ubuntu/CitadelBuildFeisty
+ubuntu/CitadelBuildBreezy
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildEtch
+debian/CitadelBuildEtch_bdb44
+debian/CitadelBuildSarge
+debian/CitadelBuildSarge_bdb44
+debian/CitadelBuildSid
diff --git a/contrib/configs/deb-i386/libsieve_targets b/contrib/configs/deb-i386/libsieve_targets
new file mode 100644 (file)
index 0000000..ae113e8
--- /dev/null
@@ -0,0 +1,5 @@
+ubuntu/CitadelBuildBreezy
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildSarge
+debian/CitadelBuildSarge_bdb44
diff --git a/contrib/configs/deb-i386/targets b/contrib/configs/deb-i386/targets
new file mode 100644 (file)
index 0000000..2f48888
--- /dev/null
@@ -0,0 +1,10 @@
+ubuntu/CitadelBuildGutsy
+ubuntu/CitadelBuildFeisty
+ubuntu/CitadelBuildBreezy
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildEtch
+debian/CitadelBuildEtch_bdb44
+debian/CitadelBuildSarge
+debian/CitadelBuildSarge_bdb44
+debian/CitadelBuildSid
diff --git a/contrib/configs/deb-i386/tinymce_targets b/contrib/configs/deb-i386/tinymce_targets
new file mode 100644 (file)
index 0000000..ae113e8
--- /dev/null
@@ -0,0 +1,5 @@
+ubuntu/CitadelBuildBreezy
+ubuntu/CitadelBuildDapper
+ubuntu/CitadelBuildEdgy
+debian/CitadelBuildSarge
+debian/CitadelBuildSarge_bdb44
diff --git a/contrib/contrib.sh b/contrib/contrib.sh
new file mode 100755 (executable)
index 0000000..7e5978f
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+source include.sh
+
+# First get the chroot up and running with: 
+#apt-get install bzip2 perl-doc lib32stdc++6 manpages-dev autoconf automake1.9 libtool flex   libc6-dev-i386 lib32gcc1  groff debhelper po-debconf bison autotools-dev libdb4.3-dev  libldap2-dev libncurses5-dev libpam0g-dev  libssl-dev cdbs g++ locales dpatch fakeroot patchutils
+WD=`pwd`
+
+for i in `cat $TARGETS`; do 
+    cd $WD
+    DISTRO=`dirname $i`
+    VSERVER_BASE=`basename $i`
+    DISTVER=`basename $i |sed "s;CitadelBuild.;;"`
+    DISTVER=`cd $APACHE_ROOT/public_html/$DISTRO/; ls -d ?$DISTVER `
+     echo "*** building $DISTRO $DISTVER ical *****"
+   
+    CleanBuild $VSERVER_BASE $CONTRIB_DIR
+
+    cd $WD
+    if grep -q $VSERVER_BASE libical_targets; then
+       GetSource $VSERVER_BASE $CONTRIB_DIR libical
+       BuildSource $VSERVER_BASE $CONTRIB_DIR libical
+       InstallContrib  $VSERVER_BASE $CONTRIB_DIR libical
+    fi
+
+    echo "*** building $DISTRO $DISTVER sieve *****"
+    cd $WD
+    if grep -q $VSERVER_BASE libsieve_targets; then
+       GetSource $VSERVER_BASE $CONTRIB_DIR libsieve
+       BuildSource $VSERVER_BASE $CONTRIB_DIR libsieve
+       InstallContrib  $VSERVER_BASE $CONTRIB_DIR libsieve
+    fi
+    echo "**** done. ****"
+    echo "*** building $DISTRO $DISTVER tinymce *****"
+    cd $WD
+    if grep -q $VSERVER_BASE tinymce_targets; then
+       GetSource $VSERVER_BASE $CONTRIB_DIR tinymce
+       BuildSource $VSERVER_BASE $CONTRIB_DIR tinymce
+       InstallContrib  $VSERVER_BASE $CONTRIB_DIR tinymce
+    fi
+    echo "**** done. ****"
+done
+
+#for i in `cat $TARGETS`; do 
+#    echo "*** installing $DISTRO *****"
+#    
+#done
+
+
+chroot ${VSERVER_ROOT}/apache/ /bin/bash -c "cd ${CIT_APACHE_DIR}/; ./refresh.sh"
diff --git a/contrib/copysource.sh b/contrib/copysource.sh
new file mode 100755 (executable)
index 0000000..f5f6cb6
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+cp ~vs/citadelPrepare/home/checkout/tmp/webcit_*   ~vs/apache/home/debiancitadel/public_html/source/
+cp ~vs/citadelPrepare/home/checkout/tmp/citadel_*  ~vs/apache/home/debiancitadel/public_html/source/
+
+chroot ~vs/apache  /bin/bash -c "cd /home/debiancitadel/; ./refreshsource.sh"
diff --git a/contrib/include.sh b/contrib/include.sh
new file mode 100755 (executable)
index 0000000..8fce698
--- /dev/null
@@ -0,0 +1,64 @@
+export VSERVER_ROOT=/var/lib/vservers/
+export CIT_APACHE_DIR=/home/debiancitadel/
+export APACHE_ROOT=${VSERVER_ROOT}/apache/${CIT_APACHE_DIR}
+export TARGETS=/home/citbuild/targets
+export CHECKOUT_DIR=/home/checkout/
+export CONTRIB_DIR=/home/contrib/
+
+# retrieve the debian sources.
+# $1: the VSERVER_BASE
+# $2: the inner Directory, aka CHECKOUT_DIR
+# $3: the Program Component.
+GetSource()
+{
+    cd ${VSERVER_ROOT}/$1/${2}; apt-get source $3
+}
+
+# compile the sources of one component.
+# $1: the VSERVER_BASE
+# $2: the inner Directory, aka CHECKOUT_DIR
+# $3: the Program Component.
+BuildSource ()
+{
+    chroot ${VSERVER_ROOT}/$1/ /bin/bash -c "cd ${2}/${3}*; fakeroot dpkg-buildpackage"
+}
+
+# Install a contrib library into the build system.
+# $1: the VSERVER_BASE
+# $2: the inner Directory, aka CHECKOUT_DIR
+# $3: the Program Component.
+InstallContrib ()
+{
+    chroot ${VSERVER_ROOT}/$1/ /bin/bash -c "cd ${2}; dpkg -i ${3}*.deb"
+}
+
+
+# $1: the VSERVER_BASE
+# $2: the distro dir on the webserver
+UpperResults()
+{
+    mv ${VSERVER_ROOT}/${1}/${CHECKOUT_DIR}/*.deb $APACHE_ROOT/public_html/$2/
+    cp ${VSERVER_ROOT}/${1}/${CONTRIB_DIR}/*.deb $APACHE_ROOT/public_html/$2/
+}
+
+# $1: the VSERVER_BASE
+# $2: the inner Directory, aka CHECKOUT_DIR
+CleanBuild()
+{
+    rm -rf ${VSERVER_ROOT}/$1/${2}/*
+}
+
+
+# $1: the distro dir on the webserver
+CleanApache()
+{
+    rm -f $APACHE_ROOT/public_html/$1/*.deb
+}
+
+
+# Install a contrib library into the build system.
+# $1: the VSERVER_BASE
+UpgradeBuildTarget ()
+{
+    chroot ${VSERVER_ROOT}/$1/ /bin/bash -c "apt-get update; apt-get upgrade"
+}
diff --git a/contrib/upgradebuilds.sh b/contrib/upgradebuilds.sh
new file mode 100755 (executable)
index 0000000..fda4f93
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+source include.sh
+apt-get update
+WD=`pwd`
+# get everything built.
+for i in `cat $TARGETS`; do 
+    cd $WD
+    DISTRO=`dirname $i`
+    VSERVER_BASE=`basename $i`
+    DISTVER=`basename $i |sed "s;CitadelBuild.;;"`
+    DISTVER=`cd $APACHE_ROOT/public_html/$DISTRO/; ls -d ?$DISTVER `
+    echo "****** upgrading $DISTRO ******"
+
+    UpgradeBuildTarget $i
+
+
+done