From 3b7affb30afcce09fcedc684d20404ddf5e03b50 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sun, 27 Mar 2011 10:47:57 +0000 Subject: [PATCH] adding nightly build to the source --- .gitattributes | 5 +++ nightlybuild/HEADER.html | 24 +++++++++++++ nightlybuild/README.html | 0 nightlybuild/READMEFIRST | 10 ++++++ nightlybuild/build.sh | 78 ++++++++++++++++++++++++++++++++++++++++ nightlybuild/nightly.key | 30 ++++++++++++++++ 6 files changed, 147 insertions(+) create mode 100644 nightlybuild/HEADER.html create mode 100644 nightlybuild/README.html create mode 100644 nightlybuild/READMEFIRST create mode 100755 nightlybuild/build.sh create mode 100644 nightlybuild/nightly.key diff --git a/.gitattributes b/.gitattributes index 3fa5c938..d8b84c21 100644 --- a/.gitattributes +++ b/.gitattributes @@ -442,6 +442,11 @@ man/top_http_users.8 -text man/top_http_users.fr.8 -text man/top_mysql_users.8 -text man/top_mysql_users.fr.8 -text +nightlybuild/HEADER.html -text +nightlybuild/README.html -text +nightlybuild/READMEFIRST -text +nightlybuild/build.sh -text +nightlybuild/nightly.key -text po/alternc-admintools.pot -text po/fr/LC_MESSAGES/.svnignore -text po/fr/LC_MESSAGES/alternc-admintools.po -text diff --git a/nightlybuild/HEADER.html b/nightlybuild/HEADER.html new file mode 100644 index 00000000..53058959 --- /dev/null +++ b/nightlybuild/HEADER.html @@ -0,0 +1,24 @@ +

AlternC Nightly build repositories

+ +Ce dossier contient les contructions quotidiennes automatique d'AlternC +
+La dernière version a un lien symbolique depuis latest/ +
+pour utiliser ce dépôt, créer un fichier /etc/apt/sources.list.d/alternc-nightly.list comme suit +

+This folder contains the automatic nightly build of AlternC +
+The latest version is linked inside latest/ symlink +
+To use this repository, create a file named /etc/apt/sources.list.d/alternc-nightly.list as follow : +
+
+ deb http://nightly.alternc.org/ latest/
+
+
+Le dépôt et les packages sont signés avec la clé pgp des nightly d'AlternC : +

+The repository and the packages are signed by the pgp key of AlternC nightly build user : +
+ wget http://nightly.alternc.org/nightly.key | apt-key add - 
+
diff --git a/nightlybuild/README.html b/nightlybuild/README.html new file mode 100644 index 00000000..e69de29b diff --git a/nightlybuild/READMEFIRST b/nightlybuild/READMEFIRST new file mode 100644 index 00000000..fdb4e609 --- /dev/null +++ b/nightlybuild/READMEFIRST @@ -0,0 +1,10 @@ +To use the build system : + +- create a user (nightly) +- create 2 folders in his home : buildroot and www +- point a virtualhost into www in your webserver +- copy build.sh to the home and the other files to www +- launch build.sh when you want to build the packages + +You may need to change the pgp-key-id into build.sh (2 times) and into nightly.key + diff --git a/nightlybuild/build.sh b/nightlybuild/build.sh new file mode 100755 index 00000000..1e7bc90d --- /dev/null +++ b/nightlybuild/build.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +VERSION="1.0" +# We launch this script inside the home directory of the "nigthly build user" +cd ~ + +# Shall we build or not ? +links -dump "http://alternc.org/svn/" | head -1 >new +if [ "`cat new`" == "`cat old`" ] +then + echo "No need to build : no change in the source since last launch" + exit 0 +fi +mv -f new old + +DATE="`date +%Y%m%d%H%M`" + +mkdir ~/www/$DATE + +echo "BuildRoot cleanup" +cd ~/buildroot/ && rm -rf * + +echo "Building AlternC" +svn export -q http://alternc.org/svn/alternc/trunk/ alternc +cd alternc +mv debian/changelog debian/changelog.orig +cat >debian/changelog < `date -R` + +EOF +cat debian/changelog.orig >>debian/changelog +debuild -k0x1994905A >/dev/null +cd .. +rm -rf alternc +mv *.deb *.dsc *.build *.changes *.tar.gz ~/www/$DATE + +for module in awstats mailman changepass procmail + do + echo "Building AlternC-${module}" + svn export -q http://alternc.org/svn/alternc-${module}/trunk/ alternc-${module} + cd alternc-${module} + mv debian/changelog debian/changelog.orig + cat >debian/changelog < `date -R` + +EOF + cat debian/changelog.orig >>debian/changelog + debuild -k0x1994905A >/dev/null + cd .. + rm -rf alternc-${module} + mv *.deb *.dsc *.build *.changes *.tar.gz ~/www/$DATE +done + +rm ~/www/latest +ln -sf ~/www/$DATE ~/www/latest + +cd ~/www +apt-ftparchive packages $DATE/ | tee $DATE/Packages | gzip -c9 >$DATE/Packages.gz +(echo "Suite: $DATE" +echo "Codename: latest" +echo "Components: main" +echo "Origin: AlternC" +echo "Label: AlternC Nightly Build dated $DATE" +echo "Architectures: i386 amd64" +echo "Description: This repository contains a nightly build of all AlternC packages" +apt-ftparchive release $DATE/ ) >$DATE/Release + +gpg -ba $DATE/Release +mv $DATE/Release.asc $DATE/Release.gpg + diff --git a/nightlybuild/nightly.key b/nightlybuild/nightly.key new file mode 100644 index 00000000..a653e8f1 --- /dev/null +++ b/nightlybuild/nightly.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.10 (GNU/Linux) + +mQENBE2OldQBCACYJij0nH7tRTDQvaCnS7hMtPF5D6Z6xaZqN7vyZp4tCOv/q7fe +gg9tu73xbietC6wg9jRYI3ezzgdJKEbvZQ+oBIwIEiPgd3AXJb20IFAH/Mmrikxf +WKpU/cstQuky6lFBsNBrSL4hAXi1i2yvwwsU1uAOC+tfX39RmRknaRjBHW5pUIiG +ViWWqO1Ep+ATIudSbZI92Sv78BaPlWgqI4NzKfPRWnMWtyoCsqFxAnhYCusvFohh +jdbp1JL6ss0Fi0Jnym3ZH56Uj+Kepp5em/jxsC/iqPGF6xMFx73PVwEqChKOx3UC +dPIe+u21if/CkgFZC+Xm0hpJr1iP9lUROPpjABEBAAG0K05pZ2h0bHkgQnVpbGQg +QWx0ZXJuQyA8bmlnaHRseUBhbHRlcm5jLm9yZz6JATgEEwECACIFAk2OldQCGwMG +CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEJVPvUkZlJBa3iQH/RdIB+b+6/Ks +EIYpzjlYEY41ymBMTGI5FKulzIAt3O0Qp9yDL1q7NuA+2LNUIDH3FJVnKXeHiIXA +N2T21j+hP22l99E+wkzF4+jSgTUcJs5G3i7v+Zgij+8UxUsbaYITSXy5x2BNYGuA +rTGXQC7tVIough0mZJqyjrLNDCCbO8xQBVfr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