Lot of fixes after many tests

This commit is contained in:
Alexandre Aubin 2017-08-30 05:30:18 +02:00
parent 49595c6649
commit 6b0e32f88e
9 changed files with 124 additions and 27 deletions

42
config
View file

@ -1,8 +1,24 @@
#!/bin/bash
# Identity
DEBSIGN_KEYID=59A3E6FF
DEBFULLNAME="YunoHost Contributors"
DEBEMAIL="contrib@yunohost.org"
MAIL="rebuildd@yunohost.org"
REPO_URL="repo.yunohost.org"
# Codenames, components and architectures
AVAILABLE_CODENAMES="jessie stretch"
AVAILABLE_COMPONENTS="stable testing unstable extra"
AVAILABLE_ARCH="amd64 i386 armhf"
DEFAULT_CODENAME="jessie"
DEFAULT_COMPONENT="unstable"
DEFAULT_ARCH="amd64"
# Folders...
HOME_VINAIGRETTE="/home/vinaigrette"
GIT_REPOS="$HOME_VINAIGRETTE/repos/"
@ -10,29 +26,15 @@ BUILD_DEB="$HOME_VINAIGRETTE/build_deb"
PBUILDER_HOME="$HOME_VINAIGRETTE/pbuilder/"
PBUILDER_IMAGES="$PBUILDER_HOME/images/"
PBUILDER_RESULTS="$PBUILDER_HOME/results/"
PBUILDER_RESULTS="$PBUILDER_HOME/result/"
DAILY_PACKAGES="$PBUILDER_HOME/packages/"
BUILD_SOURCES="$PBUILDER_HOME/build-sources"
INCLUDE_CHANGES="$HOME_VINAIGRETTE/repo/include-changes"
REPO_DIR=/var/www/repo/debian
PATATE_REPO_DIR=/var/www/repo/patate
# Scripts
BUILD_SOURCES="$PBUILDER_HOME/build-sources"
INCLUDE_CHANGES="$HOME_VINAIGRETTE/repo/include-changes"
SENDXMPP="$HOME_VINAIGRETTE/sendxmpp"
AVAILABLE_CODENAMES="wheezy jessie stretch"
DEFAULT_CODENAME="jessie"
AVAILABLE_COMPONENTS="old-stable stable testing unstable extra"
DEFAULT_COMPONENT="unstable"
AVAILABLE_ARCH="amd64 i386 armhf"
DEFAULT_ARCH="amd64"
DEPS="pbuilder reprepro"
DEPS="dpkg-parsechangelog pbuilder mk-build-deps debuild debclean reprepo sendxmpp"

25
init.sh
View file

@ -1,10 +1,33 @@
cd /home/vinaigrette/repos/
apt-get install nginx pbuilder reprepro rebuildd gawk -y
cd /home/vinaigrette/
source config
gpg --import keys/$DEBSIGN_KEYID.key
gpg --import keys/$DEBSIGN_KEYID.pub
cd repos/
git clone https://github.com/yunohost/yunohost
git clone https://github.com/yunohost/yunohost-admin
git clone https://github.com/yunohost/ssowat
git clone https://github.com/yunohost/moulinette
mkdir -p /var/www/repo/debian/conf/
cd /home/vinaigrette/
cp distributions /var/www/repo/debian/conf/
cp /home/vinaigrette/rebuildd/rebuildd.conf /etc/rebuildd/rebuilddrc
cat keys/$DEBSIGN_KEYID.pub | apt-key add
cat /home/vinaigrette/sources.list >> /etc/apt/sources.list
ln -s /home/vinaigrette/pbuilder/images /var/cache/pbuilder/images
ln -s /var/cache/pbuilder/result /home/vinaigrette/pbuilder/result
echo "127.0.0.1 $REPO_URL" >> /etc/hosts
cp /home/vinaigrette/nginx/repo.conf /etc/nginx/sites-enabled/repo.conf
service nginx reload
rebuildd init

27
nginx/repo.conf Normal file
View file

@ -0,0 +1,27 @@
server {
listen 80;
listen [::]:80;
server_name repo.yunohost.org;
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/letsencrypt;
}
# Document root
root /var/www/repo/debian;
index index.html;
location /debian {
autoindex on;
alias /var/www/repo/debian;
default_type text/plain;
}
location ~ /(conf|logs)/ {
deny all;
}
access_log /var/log/nginx/repo_access.log;
error_log /var/log/nginx/repo_error.log;
}

View file

@ -5,7 +5,7 @@ package=$2
version=$3
arch=$4
source /home/vinaigrette/repo/config
source /home/vinaigrette/config
source /home/vinaigrette/package_helpers.sh
# Build only binary-only limited to architecture dependent packages

44
rebuildd/rebuildd.conf Normal file
View file

@ -0,0 +1,44 @@
[build]
check_every = 30
max_threads = 1
max_jobs = 5
kill_timeout = 90
source_cmd = /home/vinaigrette/rebuildd/get-sources ${d} ${p} ${v}
build_cmd = /home/vinaigrette/rebuildd/build-binaries ${d} ${p} ${v} ${a}
post_build_cmd = /home/vinaigrette/rebuildd/upload-binaries ${d} ${p} ${v} ${a} ${j}
dists = jessie stretch
work_dir = /var/cache/rebuildd/build
database_uri = sqlite:///var/lib/rebuildd/rebuildd.db
build_more_recent = 1
more_archs = i386 armhf all any
no_system_arch = 0
[mail]
from = rebuildd@yunohost.org
mailto = rebuildd@yunohost.org
subject_prefix = [rebuildd]
smtp_host = localhost
smtp_port = 25
[telnet]
port = 9999
ip = 127.0.0.1
prompt = rebuildd@localhost->
motd = Connected on rebuildd on localhost
[http]
port = 9998
ip = 0.0.0.0
log_lines_nb = 30
templates_dir = /usr/share/rebuildd/templates
cache = 1
logfile = /var/log/rebuildd/httpd.log
[log]
file = /var/log/rebuildd/rebuildd.log
time_format = %Y-%m-%d %H:%M:%S
logs_dir = /var/log/rebuildd/build_logs
mail_failed = 1
mail_successful = 0

View file

@ -95,7 +95,7 @@ export HOME=$HOME_PBUILDER
xmpp_msg="[rebuildd] Completed build of ${package}/${version} in ${COMPONENT} for ${CODENAME}/${arch}. See http://rebuild.yunohost.org/job/${job}"
echo -n "$xmpp_msg" \
| sendxmpp -u gitbot -j im.yunohost.org -p $XMPP_BOT_KEY \
| $SENDXMPP -u gitbot -j im.yunohost.org -p $XMPP_BOT_KEY \
-c dev@conference.yunohost.org -r GitBot
exit $status

View file

@ -2,7 +2,7 @@
changes_file=$1
source /home/vinaigrette/repo/config
source /home/vinaigrette/config
source /home/vinaigrette/package_helpers.sh
INCOMING_DIR=${REPO_DIR}/incoming

View file

@ -6,9 +6,8 @@ package=$3
version=$4
changes_file=$5
source /usr/local/lib/helpers/debian/package.sh
MAIL="rebuildd@yunohost.org"
source /home/vinaigrette/config
source /home/vinaigrette/package_helpers.sh
# Only care about packages being added
if [[ $action != accepted ]]; then

2
sources.list Normal file
View file

@ -0,0 +1,2 @@
deb-src http://repo.yunohost.org/debian jessie stable testing unstable extra
#deb-src http://repo.yunohost.org/debian stretch extra