</generator>
<source>
<project>pld</project>
- <branch>Ac</branch>
+ <branch>Th</branch>
</source>
<body>
<builder>
m.set_headers(to = config.bot_email,
subject = subject)
m.set_header("Message-ID", "<%s@pld.src.builder>" % r.id)
- m.set_header("X-mailer", "$Id$")
+ m.set_header("X-mailer", "$Id: report.py,v 1.37 2011/10/01 18:54:51 glen Exp $")
m.set_header("X-builder", "PLD")
# get header of xml message from file
return
for batch in r.batches:
+ # TODO: move this check to sub and use acl.conf
+ if "upgrade" in r.flags:
+ log.notice("TEST: builder=%s (from %s)" % (config.builder, user.get_login()))
+ builder = acl.user(config.builder)
+ if not builder.can_do("src", batch.spec, batch.branch):
+ log.notice("TEST: package blocked. user %s is not allowed to src:%s:%s on %s" \
+ % (user.get_login(), batch.spec, batch.branch, config.builder))
if not user.can_do("src", config.builder, batch.branch):
fail_mail("user %s is not allowed to src:%s:%s" \
Subject: build request
Message-Id: <$id@$(hostname)>
X-New-PLD-Builder: request
-X-Requester-Version: \$Id$
+X-Requester-Version: \$Id: make-request.sh,v 1.101 2011/12/29 10:02:08 glen Exp $
$(echo -E "$req" | gpg --clearsign --default-key $default_key $gpg_opts)
EOF
+++ /dev/null
-#!/bin/sh
-
-dir=$(cd "$(dirname "$0")"; pwd)
-rpmdir=$(rpm -E %_topdir)
-dist=th
-
-pkgs_head="
- dahdi-linux
- ipset
- iscsitarget
- lirc
- madwifi-ng
- open-vm-tools
- r8168
- VirtualBox
- xorg-driver-video-nvidia
- xorg-driver-video-nvidia-legacy3
- xtables-addons
- xorg-driver-video-fglrx
-"
-
-pkgs_longterm="
- $pkgs_head
- openvswitch
-"
-pkgs_longterm_only="
- e1000e
- igb
-"
-
-# autotag from rpm-build-macros
-# displays latest used tag for a specfile
-autotag() {
- local out s
- for s in "$@"; do
- # strip branches
- s=${s%:*}
- # ensure package ends with .spec
- s=${s%.spec}.spec
- out=$(cvs status -v $s | awk "!/Sticky/&&/auto-$dist-/{if (!a++) print \$1}")
- echo "$s:$out"
- done
-}
-
-get_last_tags() {
- local pkg spec
-
- echo >&2 "Fetching package tags: $*..."
- for pkg in "$@"; do
- echo >&2 "$pkg... "
- if [ ! -e $pkg/$pkg.spec ]; then
- $rpmdir/builder -g $pkg -ns -r HEAD 1>&2
- fi
- if [ ! -e $pkg/$pkg.spec ]; then
- # just print it out, to fallback to base pkg name
- echo "$pkg"
- else
- spec=$(autotag $pkg/$pkg.spec)
- echo >&2 "... $spec"
- echo $spec
- fi
- done
-}
-
-cd $rpmdir
-case "$1" in
- head)
- for pkg in $pkgs_head; do
- $rpmdir/builder -g $pkg -ns
- echo ./relup.sh -ui $a/$a.spec && make-request.sh -d th $a.spec
- done
- ;;
- longterm)
- cd $rpmdir
- specs=$(get_last_tags $pkgs_longterm)
- $dir/make-request.sh -r -d $dist --kernel longterm --without userspace $specs
-
- specs=$pkgs_longterm_only
- $dir/make-request.sh -r -d $dist --kernel longterm $specs
- ;;
- *)
- # try to parse all args, filling them with last autotag
- while [ $# -gt 0 ]; do
- case "$1" in
- --kernel|--with|--without)
- args="$1 $2"
- shift
- ;;
- -*)
- args="$args $1"
- ;;
- *)
- specs="$specs $1"
- ;;
- esac
- shift
- done
- specs=$(get_last_tags $specs)
- $dir/make-request.sh -r -d $dist $args $specs
- ;;
-esac
+++ /dev/null
-#!/bin/sh
-arg="$@"
-
-specs=""
-opt=""
-
-for i in $arg; do
- case "$i" in
- *.spec)
- specs="$specs $1"
- shift
- ;;
- *)
- opt="$opt $i"
- shift
- ;;
- esac
-done
-
-for i in $specs; do
- dir=$(dirname $i)
- pkg=$(basename $i)
- cd $dir || exit 1
- specfile="$pkg"
- tag=$(cvs status -v $specfile |grep "th-" | head -n 1 | awk ' { print $1 } ')
- if [ -z "$tag" ]; then
- echo "Th tag not found for $specfile."
- continue
- fi
- echo "Rebuilding $i from tag $tag..."
- set -x
- make-request.sh -d th $opt $pkg:$tag
- set +x
-done
-
+# vim:ft=mycnf
#
# Access Control Lists for PLD builder
#
#
# privs: list of privileges. List is scanned left to right. If no
# match is found access is denied. ! before item denies access.
-# Items have format <what-action>:<which-builder>[:<what-branch>],
-# where all three are shell wildcards and by default any branch is allowed.
-# <what-branch> may be only specified for: src, binary, ready and upgrade
+# Items have format <what-action>:<which-builder>, where both are
+# shell wildcards.
#
# Actions:
# src -- build src rpm (only makes sense if <which-builder> is src
# Example:
# Allow access for binary builders, except for security builders.
# Also allow building src rpms (without it binary:* wouldn't make much
-# sense). Lowest priority allowe will be 3.
+# sense)
#
# [foo]
# gpg_emails = foo@pld-linux.org Foo.Bar@blah.com
# mailto foo-builder@blah.com
-# privs = src:src !binary:security-* binary:* 3:*
+# privs = src:src !binary:security-* binary:*
#
-[bin_builder_roke]
-gpg_emails = bin_builder@roke.freak
-privs = notify:*
+[bin_th]
+gpg_emails = builder-th-bin@pld-linux.org
+privs = notify:th-*
-[src_builder_roke]
-gpg_emails = srpms_builder@roke.freak
-privs = sign_queue:* notify:*
+[src_th]
+gpg_emails = builder-th@pld-linux.org
+privs = sign_queue:* notify:th-* !src:test src:th-*
+
+# used for blacklisting pkgs
+# TODO: figure out how to get this listed as src_th
+[th-src]
+gpg_emails = builder-th-fake@pld-linux.org
+privs = sign_queue:* notify:th-* !src:test !src:google-chrome src:*
+
+[adamg]
+gpg_emails = adamg@pld-linux.org
+mailto = adamg@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[adasi]
+gpg_emails = adasi@culm.net
+mailto = adasi@culm.net
+privs = src:th-src binary:th-* upgrade:th-*
+
+[aflinta]
+gpg_emails = aflinta@at.kernel.pl
+mailto = aflinta@at.kernel.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[agaran]
+gpg_emails = agaran@pwii.pl
+mailto = agaran@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[ankry]
+gpg_emails = ankry@green.mif.pg.gda.pl
+mailto = ankry@green.mif.pg.gda.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[arekm]
+gpg_emails = misiek@pld.org.pl
+mailto = arekm@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-* command-no-chroot:th-*
+
+[averne]
+gpg_emails = averne@averne.net
+mailto = averne@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[blues]
+gpg_emails = blues@ds.pg.gda.pl
+mailto = blues@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[baggins]
+gpg_emails = baggins@pld-linux.org
+mailto = baggins@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-* command-no-chroot:th-*
+
+[cieciwa]
+gpg_emails = cieciwa@alpha.zarz.agh.edu.pl
+mailto = cieciwa@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[ciesiel]
+gpg_emails = ciesiel@pld-linux.org
+mailto = ciesiel@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[czarny]
+gpg_emails = dhubleizh@o2.pl
+mailto = czarny@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[djurban]
+gpg_emails = djurban@averne.net
+mailto = djurban@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[domelu]
+gpg_emails = domelu@domelu.net
+mailto = domelu@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[freetz]
+gpg_emails = freetz@gmx.net
+mailto = freetz@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[gausus]
+gpg_emails = mjb@recesja.icm.edu.pl
+mailto = gausus@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[glen]
+gpg_emails = glen@delfi.ee
+mailto = glen@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-* command-no-chroot:th-*
+
+[hawk]
+gpg_emails = hawk@pld-linux.org
+mailto = hawk@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[grzegol]
+gpg_emails = grzegol@pld.org.pl
+mailto = grzegol@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[gotar]
+gpg_emails = gotar@pld-linux.org
+mailto = gotar@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[havner]
+gpg_emails = havner@pld-linux.org
+mailto = havner@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[jajcus]
+gpg_emails = jajcus@pld-linux.org
+mailto = jajcus@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[krzak]
+gpg_emails = krzak@linux.net.pl
+mailto = krzak@linux.net.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[marcus]
+gpg_emails = marcus@kernel.pl
+mailto = marcus@kernel.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[matkor]
+gpg_emails = matkor@pld-linux.org
+mailto = matkor@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[megabajt]
+gpg_emails = megabajt@pld-linux.org
+mailto = megabajt@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[mmazur]
+gpg_emails = mmazur@kernel.pl
+mailto = mmazur@kernel.pl
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[paladine]
+gpg_emails = paladine@op.pl
+mailto = paladine@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[paszczus]
+gpg_emails = paszczus@pld-linux.org
+mailto = paszczus@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[patrys]
+gpg_emails = patrys@pld-linux.org
+mailto = patrys@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[pluto]
+gpg_emails = pluto@agmk.net
+mailto = pluto@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[radek]
+gpg_emails = radek@pld-linux.org
+mailto = radek@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[saq]
+gpg_emails = pawel@sakowski.pl
+mailto = pawel@sakowski.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[shadzik]
+gpg_emails = swiatek@informatik.hu-berlin.de
+mailto = shadzik@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[speedy]
+gpg_emails = speedy@ziew.org
+mailto = speedy@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[spider]
+gpg_emails = spider@linux.pl
+mailto = spider@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[tiwek]
+gpg_emails = tiwek@manta.univ.gda.pl
+mailto = tiwek@koti.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[twittner]
+gpg_emails = twittner@pld-linux.org
+mailto = twittner@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[undefine]
+gpg_emails = undefine@wmid.amu.edu.pl
+mailto = undefine@wmid.amu.edu.pl
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[wiget]
+gpg_emails = wiget@pld-linux.org
+mailto = wiget@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[wolf]
+gpg_emails = wolf@pld-linux.org
+mailto = wolf@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[wrobell]
+gpg_emails = wrobell@pld-linux.org
+mailto = wrobell@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[qboosh]
+gpg_emails = qboosh@pld-linux.org
+mailto = qboosh@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-* command:th-*
+
+[rotom]
+gpg_emails = rotom@pld-linux.org
+mailto = rotom@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[wolvverine]
+gpg_emails = wolvverine@pld-linux.org
+mailto = wolvverine@pld-linux.org
+privs = src:th-src binary:th-*
+# upgrade:th-*
+
+[areq]
+gpg_emails = areq@pld-linux.org
+mailto = areq@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[arvenil]
+gpg_emails = arvenil@pld-linux.org
+mailto = arvenil@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[dzeus]
+gpg_emails = dzeus@dc.net.pl
+mailto = dzeus@dc.net.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[stbr]
+gpg_emails = stbr@pld-linux.org
+mailto = stbr@pld-linux.org
+privs = src:th-src binary:th-* 3:*
+
+[blekot]
+gpg_emails = lukaszgl@post.pl
+mailto = lukaszgl@post.pl
+privs = src:th-src binary:th-* upgrade:th-*
+
+[duddits]
+gpg_emails = pawel@dlugosz.eu
+mailto = pawel@dlugosz.eu
+privs = src:th-src binary:th-* upgrade:th-*
+
+[pawelz]
+gpg_emails = pawelz@pld-linux.org
+mailto = pawelz@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[cactus]
+gpg_emails = uzi18@o2.pl
+mailto = cactus@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[amateja]
+gpg_emails = amateja@pimpek.one.pl
+mailto = amateja@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[uzsolt]
+gpg_emails = udvzsolt@gmail.com
+mailto = uzsolt@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[lisu]
+gpg_emails = lisu87@gmail.com
+mailto = lisu@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[zbyniu]
+gpg_emails = zbyniu@pld-linux.org
+mailto = zbyniu@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[atler]
+gpg_emails = atler@pld-linux.org
+mailto = atler@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[sparky]
+gpg_emails = sparky@pld-linux.org
+mailto = sparky@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[marti]
+gpg_emails = mrybak@thinkspire.org
+mailto = mrybak@thinkspire.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[kiesiu]
+gpg_emails = kiesiu@pld-linux.org
+mailto = kiesiu@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
+
+[draenog]
+gpg_emails = draenog@pld-linux.org
+mailto = draenog@pld-linux.org
+privs = src:th-src binary:th-* upgrade:th-*
-[malekith]
-gpg_emails = malekith@pld-linux.org
-mailto = malekith@roke.freak
-privs = src:roke-src binary:roke-*:AC-branch
[all]
-# Builder email (put in From: field when this builder is sending mails).
-email = builder-th@pld-linux.org
-
-# Admin's email (she gets mails about errors and such).
+# builder email (in From:)
+email = builder-th-src@pld-linux.org
admin_email = th-admin@pld-linux.org
-
-# To be placed in Cc: of status and error reports (a mailing list usually).
-builder_list =
-
-# List of binary builders. This thing must be present on both src and bin
-# builders.
-binary_builders = th-athlon
-
-# Name of the src builder (this field is ignored on binary builders).
+# list of binary builders
+binary_builders = th-x86_64 th-i486 th-i686
+# th-athlon th-ppc
+# the only src builder
src_builder = th-src
-
-# Logs always go to spool/log, if you want syslog in addition,
-# specify facility here (user or local0-7 is the best choice probably).
-# If you don't want syslog, leave it empty.
+# logs always go to spool/log, if you want syslog in addition,
+# specify facility here (user or local0-7 is the best choice probably)
+# if you don't want syslog, leave it empty
syslog =
-
-# Wrapper command for sudo chroot (used eg on sparc).
+# wrapper command for sudo chroot ...
#sudo_chroot_wrapper = sparc32
sudo_chroot_wrapper =
+# to be placed in Cc: of status and error reports
+builder_list = pld-logs-th@lists.pld-linux.org
-# Keep rpms in /spools/ready inside chroots for how long (in hours).
-max_keep_time = 168
-
-# TCP port number for request_handler_server.py. ignored on bin builders
-request_handler_server_port = 1234
-
-# Send '*.uploadinfo' files along with built rpms (used by pld-ftp-admin), but
-# probably not usefull for small, 'personal' builders. [yes/no]
-gen_upinfo = yes
-
-# CIA bot (see cia.navi.cx).
-#bot_email = cia@pld-linux.org
+# bot
+bot_email = cia@pld-linux.org
# ------ Binary builders config:
-# How many jobs can be run at once (how many concurrent builds).
+# how much jobs can be run at once
job_slots = 1
-
-# Maximal load, above which builds won't get started.
+# maximal load, at which rpm processing can start
max_load = 10.0
-
-# make -jX for single build
-max_jobs = 1
-
-# Nice control.
+# nice control
#nice = 0
-# Where to look for queue.gz and counter (published through www by src builder).
-control_url = http://src.th.pld-linux.org/
-
-# Src builder's email for sending status notifications (build ok/failed).
-#notify_email = builder-th-src@pld-linux.org
+max_jobs = 1
-# Where to cache rpm's from binary builders locally
-rpm_cache_dir = /spools/ready
+# where to look for queue.gz and counter
+control_url = http://roke.freak/builder/
+# email where to send status notifications
+notify_email = th-admin@pld-linux.org
# ------ SRC builder config:
-# List of name-version-release tag prefixes.
-#tag_prefixes = auto- auto-ac- auto-th-
+# list of name-version-release tag prefixes
+#tag_prefixes = auto- auto-ac-
tag_prefixes = auto-th-
-# ------ Configs for particular builders:
-
[th-src]
arch = i686
chroot = /home/pld/builderth/chroots/chroot-src/
rpmqa_url = scp://pldth@ep09.pld-linux.org:ftp/.stat/builder/th/
rpmqa_filename = rpmqa-SRPMS.txt
-[th-athlon]
-arch = athlon
-chroot = /home/users/builderth/chroot-athlon/
-buildlogs_url = /dev/null
-notify_url = http://src.th.pld-linux.org:1234/
-ftp_url = scp://pldth@ep09.pld-linux.org:ftp/.incoming/athlon/
-test_ftp_url = /dev/null
-rpmqa_url = /dev/null
-rpmqa_filename = nothing
-
-
# foo@bar.com SeCr3t
bl@roke.freak foobar123
+blogs-th@buildlogs.pld-linux.org domination
+
+++ /dev/null
-Roadmap:
-
- Makefile -- nothing interesting.
-
- PLD_Builder/ -- all python stuff live here.
-
- admin/ -- scripts for chroot admin.
-
- architektura.txt -- docs, in Polish.
-
- client/ -- scripts for clients, i.e. developers sending requests
-
- config/ -- configuration
-
- go.py -- testing script, don't touch
-
- bin/ -- scripts for builder account outside chroot
-
- request-handler.sh
- Script to be run from procmail on src builder. It process incoming
- request, authorizes it and stores in spool/queue.
-
- src-builder.sh
- Script to be run from cron on src builder. It looks for new
- requests in spool/queue, gets them from there, builds SRPM, and
- stores request for binary builders in spool/req_queue (which is
- mirrored in www/ directory, signed and compressed). SRPMS and
- buildlogs are queued for transmission.
-
- request-fetcher.sh
- Run on binary builder.
- Fetch queue.gz from src-builder, and distribute requests for all
- builders hosted on given account (to spool/queue-<builder> files).
-
- rpm-builder.sh <builder>
- Run on binary builder.
- Tries to aquire locks for <builder> and for job-slot. If that suceeds,
- proccess one request from spool/queue-<builder>.
-
- load-balancer.sh
- Run on binary builder.
- Checks spool/got_lock. Then run rpm-builder.sh in order determined
- from this file (if b1 had lock last time before b2, first run
- rpm-builder.sh b1 and then rpm-builder.sh b2), so builders get
- the same number of requests.
-
- file-sender.sh
- Run on both binary and src builder.
- Sends files queued in spool/{ftp,buildlogs}.
-
-Working directories:
- lock/
- spool/
- log/
+++ /dev/null
-new bin builder setup
-
-packages and chroot
-~~~~~~~~~~~~~~~~~~~
-1. install pld-builder from th repoeistory on target host
-
-2. create chroot /srv/chroot
-(you can symlink to real dest for the sake of copy-paste from here)
-mkdir -p /srv/chroot
-
-- if you're using rpm < 4.5-29, make system rpmdb linked to target rpmdb, as
- rpm gets it all very messy. see LP#395177.
-mv /var/lib/rpm{,-host}
-ln -s /srv/chroot/var/lib/rpm /var/lib/rpm
-install -d /srv/chroot/var/lib/rpm
-rpm -r /srv/chroot --initdb
-
-therwise it's just:
-rpm -r /srv/chroot --initdb
-
-- install distro gpg key as default th config packages are signed and sign verify enabled in config:
-rpm -r /srv/chroot --import /etc/pki/rpm-gpg/PLD-*.asc
-
-- setup minimal /dev
-install -d /srv/chroot/dev
-cp -a /dev/{full,null,random,urandom,zero} /srv/chroot/dev
-
-- install vserver-packages, but as it is usually hidden, so you must unhide it
- with --noignore:
-poldek -r /srv/chroot -u vserver-packages -Q --noignore
-
-- install pld-builder-chroot from th repos
-poldek -r /srv/chroot -u pld-builder-chroot -Q --sn th --sn th-ready
-
-- make rpmdb readable for builder user
-chmod -R a+rX /srv/chroot/var/lib/rpm
-
-- setup /srv/chroot/etc/resolv.conf so if you enter manually you can work with poldek
-cat /etc/resolv.conf > /srv/chroot/etc/resolv.conf
-
-- restore rpmdb hack
-rm -f /var/lib/rpm
-mv /var/lib/rpm{-host,}
-
-gpg keys
-~~~~~~~~
-1. import src builder key to bin builder so it can download queue.gz
-
-src-builder$ gpg --export builder-th-src@pld-linux.org --armor > th-src.asc
-bin-builder$ gpg --import < th-src.asc
-
-2. generate new key for bin builder and import it to src builder so it can
- accept spool/notify messages
-
-3. import that public key to src builder keyring
-bin-builder$ gpg --gen-key
-bin-builder$ gpg --export KEYID --armor > th-i686.asc
-src-builder$ gpg --import < th-i686.asc
-
-ssh keys
-~~~~~~~~
-
-generate key on bin builder and add it to authorized_keys of ftp account
-
-i.e account where you push your uploads:
-[th-i686]
-ftp_url = scp://fpldth@ep09.pld-linux.org:ftp/.tree/.incoming/i686/
-
-bin-builder$ ssh-keygen
-bin-builder$ ssh-copy-id -i .ssh/id_rsa.pub fpldth@ep09.pld-linux.org
-
-buildlogs
-~~~~~~~~~
-buildlogs are copied with rsync. ask buildlogs.pld-linux.org admin to allow your ip
-also you need to setup password that is used to authenticate in rsync-passwords
-
-sudo access
-~~~~~~~~~~~
-make sure builder user (who runs crons) can sudo chroot to the chroots:
-builder ALL=(ALL) NOPASSWD: /usr/sbin/chroot /home/users/builder/chroot-th *
-
-testing
-~~~~~~~
-
-keep /var/lib/pld-builder/spool/log running with tail -f
-run the cronjobs under builder account.
+++ /dev/null
-- Write spec preprocessor, that processes given spec file and expands
- macros. Next we should process the output, look for all BuildRequires:
- lines, and install them, instead of running rpmbuild --nobuild to see
- what's missing, since it chokes when stuff is used in %(...), on missing
- includes and so on.
-
- get_br.py is close, but doesn't handle:
- %if foo
- BuildRequires: ...
- %endif
- which in fact requires expression parser :<
-
-- implement:
- <command type='shell' id='...'>shell code</command>
- <command type='upgrade' id='...' /> (run poldek --up; poldek -Q --shcmd 'upgrade -G *')
- First requires command-shell:<builder>, second command-upgrade:<builder>.
- This should be class in requester.py, with kind='command', also look for
- kind checking elsewhere in the code (grep for 'kind.*group')
-
-- make default configs reasonable
-
-- fix make-request.sh to be more user-friendly and configurable
-
-- add possibility of tagging stuff for source builder
-
-- jabber daemon. it should connect to jabber server and login to
- conference room. Next open unix socket, so other scripts can write it,
- and jabber server forwards this to conference room.
-
- Next step for such daemon would be to create second unix socket, where
- scripts log what thay are doing so, we can do things like tail on
- current buildlog.
-
-- add log.debug (log only with special options) to log.py, and use it
-
-- if magic comment found in spec: single-build -- aquire all job-slots
-
-- allow blocking some packages
-
-- fetch src.rpm once for all builders on this account, separate fetching
- src.rpms, so we can build and fetch at the same time
-
-- unify buildlogs.py and ftp.py, both are file queues
-
-- ability to just copy src.rpm from ftp and make it the base for a request to
- bin builders
+++ /dev/null
-1. Developer wysyła zlecenie, z użyciem client/make-request.sh, na adres
-srpm buildera.
-
-2. Na koncie srpm buildera skrypt request_handler.py wołany z procmaila obsługuje
- zlecenie.
- a) sprawdza podpis gpg, wyciÄ…ga wszystkie Good sinature from <...>
- jeśli brak -- wypad
- b) szuka w swoim acl.conf czy osoba z Good signature from może robić
- cokolwiek, w.p.p wypad
- c) xml-parsuje zlecenie (request.py)
- i. jeśli jest to <notifcation ...>, sparawdza uprawnienie
- notify:<builder>, i jeśli OK, to zmienia odpowiednio
- kolejkę spool/req_queue. Jeśli wszystki buildery
- zakończyły już budowanie danej grupy usuwane są src rpmy
- z www/srpms/<group-id>/. Generuje stronÄ™ ze statystykami
- (www/queue.html).
- ii. jeśli jest to <group ...> to sprawdza czy użytkownik,
- który wysłał zlecenie ma uprawnienia src:<nazwa-src-buildera>,
- oraz binary:<builder> dla każdego buildera dla którego jest
- zlecenie. Jeśli OK, to wrzuca zlecenie do spool/queue
-
-3. Na koncie srpm buildera z crona chodzi skrypt srpm_builder.py.
- a) Czyta spool/queue, jeśli są tam jakieś zlecenia, sortuje wg. priorytetu
- (niższy numer == ważniejsze zlecenie), a następnie sortuje wg. czasu
- przybycia zlecenia (starsze == ważniejsze), wyciąga je z kolejki i zapisuje
- kolejkÄ™.
- b) Obsługuje tylko <group ...>.
- c) Buduje w chroot wszystkie pakiety z grupy, kolejkujÄ…c pliki w spool/ftp/
- oraz spool/buildlogs/. Dodatkowo srpmy sÄ… wrzucane do www/srpms/<group-id>/
- skÄ…d ciÄ…gnÄ… je bin-buildery.
- d) jeśli nie powiodło się budowanie żadnego pakietu to wypad
- e) zleceniu nadawany jest numer
- f) zlecenie jest wrzucane do spool/req_queue
- g) kolejka jest podpisywana kluczem srpm buildera, gzipowana i wrzucana do
- www/queue.gz
- h) numer zapisywany jest w www/max_req_no
- i) generowanie strony ze statystykami
-
-4. Na kontach srpm buildera i bin-builderów chodzi
- file_sender.py. Monitoruje on kolejki spool/{buildlogs,ftp}. SÄ… w
- nich pliki, jak:
-
- faa1f592-437f-446d-b1e6-ac41976c5775
- faa1f592-437f-446d-b1e6-ac41976c5775.info
- faa1f592-437f-446d-b1e6-ac41976c5775.desc
-
- Plik .desc jest kontrolny dla file_sender.py. Zawiera email zlecajÄ…cego
- (do alarmowania), czas skolejkowania (pliki są wysyłane dokładnie
- w kolejności wrzucania do kolejki), oraz cel (url), gdzie należy
- przesłać plik.
-
- Plik .info jest tylko dla buildlogów. Jeśli taki plik istnieje to jest
- przesyłany po przesłaniu właściwego pliku (tego bez rozszerzenia). Jest
- w nim zapisany status buildloga (OK|FAIL). helpers/buildlogs-mover.sh
- używa tych plików.
-
- Pliki .info i .desc kończa się linią, zawierającą słowo END. Skrypty
- nic z nimi nie robią jeśli nie ma tam tego słowa (transmisja
- niedokończona).
-
- URLe wspierane jako cel to:
-
- rsync://user@host/modul/sci/ezka/plik
- scp://user@host/sciezka/plik
- /absolutna/sciezka/do/pliku
-
- W pliki config/rsync-passwords są hasła do rsync, w formacie:
-
- user@host hasło
-
- scp działa po kluczach (z ~/.ssh)
-
-5. Na koncie bin-buildera chodzi skrypt request_fetcher.py.
- a) ściąga $control_url/max_req_no i porównuje ze spool/last_req_no.
- jeśli takie same to wypad.
- b) ściąga $control_url/queue.gz, dekompresuje, sprawdza podpis (w
- config/acl.conf dla podpisującego użytkownika musi być
- "sign_queue:all") [sidenote: konto bin buildera nie potrzebuje
- kluczy gpg innych niż swój i srpm buildera, nie potrzebuje też
- acl.conf pełnego, tylko srpm_builder z sign_queue:all]
- c) wrzuca zlecenia do spool/queue
- d) zapisuje największy numer zlecenia wrzuconego w spool/last_req_no.
-
-6. Na koncie bin-buildera chodzi skrypt rpm_builder.py.
- a) sprawdzenie loadu, jeśli za wysoki to papa
- b) lockowanie build-slot-N, gdzie N < job_slots, jeśli sie nie da
- to papa
- c) lockowanie building-rpm-for-<builder> (tylko jeden build w chroot
- na raz)
- d) Czyta spool/queue, jeśli są tam jakieś zlecenia, sortuje wg. priorytetu
- (niższy numer == ważniejsze zlecenie), a następnie sortuje wg. czasu
- przybycia zlecenia (starsze == ważniejsze), wyciąga je z kolejki i zapisuje
- kolejkÄ™.
- e) buduje pakiety, wrzuca pliki do spool/{buildlogs,ftp}. Jeśli nie ma flagi
- test-build to pakiety wrzuca też do /spools/ready/ w chroot (i generuje
- tam idx poldka)
-
-Budowanie pakietów:
- 1. ściągnięcie srpm
- 2. instalacja srpm
- 3. próba budowania (z --nobuild), wyłapanie "foo is needed by ...",
- instalacja wszystkich takich foo. UWAGA: to nie zawsze działa, np. jeśli
- rpm wywali się z braku pliku do %include. trzeba napisać osobny parser.
- 4. budowanie
- 5. jeśli nie test-build to przerzucenie pakietów do /spools/ready/
- 6. jeśli upgrade, to próba upgrejdu, wywalenie wszystkich przeszkadzających
- pakietów, chyba, że trzeba by wywalić poldka, lub rpm-build.
- 7. upgrade
+++ /dev/null
-W katalogu client jest skrypt nazywajÄ…cy siÄ™ make-request.sh. Odpalamy go
-bez argumentów po czym zaglądamy do pliku ~/.requestrc. Najlepszy będzie
-przykład więc poniżej ustawienia, które trzeba zmienić:
-
- requester=mmazur
- default_key=mmazur@kernel.pl
-
-Przy czym:
-
- [mmazur@home mmazur]$ gpg --list-secret-keys|grep '@'
- sec 1024D/A1490DA4 2003-08-14 Mariusz Mazur <mmazur@kernel.pl>
-
-Mam nadzieję, że teraz jest jasne skąd się ten email bierze.
-
-Na razie obowiÄ…zujÄ…cymi ustawieniami sÄ…:
-
- build_mode=ready
- f_upgrade=yes
-
-Po wyrównaniu ilości pakietów na ftpie z tym co jest w Ra przechodzimy na
-ustawienia:
-
- build_mode=test
- f_upgrade=no
-
-Ale tym na razie nie trzeba się martwić, bo gdy przyjdzie czas, to będę
-o tym trąbił.
-
-Teraz ćwiczenia praktyczne:
-
- make-request.sh kernel.spec:LINUX_2_6
- make-request.sh qt.spec kadu.spec
- make-request.sh -b 'th-i* th-x86_64' nasm.spec
-
-Pierwszy przykład to puszczenie zlecenia na pakiet kernel z brancha LINUX_2_6.
-Drugi to puszczenie w jednym zleceniu qt i kadu, przy czym jeśli budowanie
-qt się wywróci, to automatyka nawet nie będzie próbowała budować kadu.
-Ostatni przykład to puszczenie nasma tylko i wyłącznie na buildery x86
-(th-i* rozwija się na to samo, co th-i?86). Zwracam uwagę, że przy
-listowaniu tych buidlerów trzeba je wycytować, żeby szły jako jeden
-argument.
-
-Każdy dostaje mailem informacje o zleceniach które wysyła (przy czym maile
-z tymi informacjami przychodzÄ… nie na adres w ~/.requestrc, ale na adres
-zdefiniowany w konfigach buildera, więc sugerowałbym wybieranie aliasa
-@pld-linux.org, żeby móc to samemu zmieniać, bez konieczności interwencji
-kogoś z bezpośrednim dostępem do odpowiedniego buildera). Jeśli chcesz być
-informowany o wszystkich zleceniach, to musisz się zapisać na listę
-pld-logs-builder@pld-linux.org i/lub śledzić co się dzieje na
-http://src.th.pld-linux.org/queue.html
-
-Ponieważ póki co domyślnie pakiety lądują w katalogu ready na ftpie i po
-zbudowaniu nowe wersje są automatycznie upgrejdowane na builderze, więc
-przez pewien czas pewnie przydatne będzie poniższe wywołanie:
-
- make-request.sh -t nasm.spec
-
-Skutek będzie taki, że pakiet się zbuduje, ale nie zostanie automatycznie
-zupgrejdowany na builderach, a zamiast w ready wyląduje w test (póki co
-cieciwa używa tego do budowania sobie w spokoju jajek 2.6).
-
-Zasady puszczania do Th:
-
-- Puszczamy zawsze z HEAD i bez bcondów. Odstępstwa od tej zasady są
- akceptowalne tylko i wyłącznie w dobrze uzasadnionych przypadkach. HEAD ma
- na celu łatwiejszą orientację w zawartości ftpa. Natomiast brak bcondów jest
- wedle zasady "src.rpm ma się budować w środowisku, jakie jest dostępne na
- ftpie (wyjątek to oczywiście java) i nie oczekujmy wiedzy tajemnej (jakiego
- bconda użyć) od wszystkich, którzy chcą dany pakiet zbudować".
+++ /dev/null
-Installation instructions.
-
-1. Accounts
-
-Builder needs account for it's needs. Account should be shared for all builders,
-which build binary packages on specified host. This allows for better
-resources managment (hint: variable job_slots in configuration).
-
-However, SRPMS builder should use different account.
-
-We will call accounts: bin_builder and srpms_builder.
-
-2. Requirements
-
-Both:
- sending mail
- gpg
- scp or/and rsync (sending buildlogs and files to ftp)
- access to chroots
-
-srpms_builder:
- mail box + procmail
- posibillity to serve files via http
- cvs connections
- ftp or http connections (distfiles)
-
-bin_builder:
- http connections
-
-access to chroots via sudo (sudoers):
-
-srpms_builder ALL = NOPASSWD: \
- /usr/sbin/chroot /path/to/chroot *
-
-bin_builder ALL = NOPASSWD: \
- /usr/sbin/chroot /path/to/chroot1 *, \
- /usr/sbin/chroot /path/to/chroot2 *
-
-3. Scripts installations
-
-Scripts *have* to be in ~/pld-builder.new/, checked out from CVS.
-
-4. Installation of queues
-
-cd ~/pld-builder.new
-./admin/fresh-queue.sh y
-
-5. Chroots setup
-poldek.conf:
-
-source = local,pri=1 /spools/ready/
-source = main-test,noauto,pri=2 ftp://ftp.pld-linux.org/dists/th/test/i686/RPMS/
-source = main-ready,pri=3 ftp://ftp.pld-linux.org/dists/th/ready/i686/RPMS/
-source = main-ug,pri=4 ftp://ftp.pld-linux.org/dists/th/updates/i686/RPMS/
-source = main,pri=5 ftp://ftp.pld-linux.org/dists/th/PLD/i686/RPMS/
-particle_install = no
-greedy = yes
-rpmdef = _excludedocs 1
-cachedir = /spools/poldek/
-keep_downloads = yes
-
-Preinstalled packages:
-
-bin_builder:
- rpm-build poldek shadow net-tools which
-
-srpms_builder:
- bin_builder+
- cvs wget rpm-perlprov rpm-php-pearprov rpm-pythonprov
-
-both: user builder
-
-both: ~builder/rpm/{SPECS,SOURCES,RPMS,SRPMS,BUILD}
-
-srpms_build: additionally has to have SPECS and SOURCES checkouted from CVS
-in SPECS it has to have builder, additional-md5sum and mirrors
-
-both: folders /spools/poldek/ /spools/ready/
-
-Wszystko to robi automagicznie admin/install-chroot.sh
-All that stuff can be done automaticly with admin/install-chroot.sh.
-
-[[...]]
-
-
-100. cron jobs
-
-srpms_builder:
- src-builder.sh
- file-sender.sh
-
-bin_builder:
- request-fetcher.sh
- load-balancer.sh
- file-sender.sh
-
-*Very* good idea is to execute tmpwatch for each builder.:
-5 3 * * * sudo chroot $HOME/chroots/chroot-i686/ tmpwatch -m 200 /spools/ready/
-(autentic example). Of course, example cron item above should be placed for each chroot
-inside account. Tmpwatch have to be installed inside. In other case, You have to clean it
-manually.
-
-Example for bin builder:
-* * * * * $HOME/pld-builder.new/bin/request-fetcher.sh
-* * * * * $HOME/pld-builder.new/bin/load-balancer.sh
-* * * * * $HOME/pld-builder.new/bin/file-sender.sh
-30 3 * * * $HOME/pld-builder.new/bin/maintainer.sh
-
-Example for source builder:
-* * * * * $HOME/pld-builder.new/bin/src-builder.sh
-* * * * * $HOME/pld-builder.new/bin/file-sender.sh
-30 3 * * * $HOME/pld-builder.new/bin/maintainer.sh
-
-101. procmail
-
-srpms_builder:
-
-:0
-* ^X-New-PLD-Builder:
-|~/pld-builder.new/bin/request-handler.sh
-
-:0
-!admin@somehere
-
-bin_builder
-
-:0
-!admin@somwhere
-
-102. httpd
-
-Directory ~/pld-builder.new/www/, in srpm_builder account, have to be accessibble
-via http (control_url in bin_builder configuration)
-
-103. src builder
-
-Automat can send informaction (notify) between bin-builders and src-builders
-via e-mail or via http (POST METHOD).
-
-To use HTTP POST, one should run (src_builder side):
-./request_handler_server.py
-On other side (bin-builders):
-notify_url = http://some-server.pl:1234/
-
+++ /dev/null
-SHELL=/bin/sh
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-MAILTO=root
-
-#* * * * * builder exec nice -n 19 /usr/share/pld-builder/bin/request-fetcher.sh
-#* * * * * builder exec nice -n 19 /usr/share/pld-builder/bin/load-balancer.sh
-#* * * * * builder exec nice -n 19 /usr/share/pld-builder/bin/file-sender.sh
-
-#0 0 * * * root chroot /srv/chroot nice -n 19 tmpwatch -m 240 /var/cache/pld-builder/ready
+++ /dev/null
-#!/bin/sh
-#
-# pld-builder perform adminstrator's tasks for PLD Linux Builder
-#
-# chkconfig: 345 99 01
-#
-# description: perform adminstrator's tasks for PLD Linux Builder
-#
-# $Id$
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-# Defaults
-CHROOTS=
-
-# Get service config - may override defaults
-[ -f /etc/sysconfig/pld-builder ] && . /etc/sysconfig/pld-builder
-
-mount_chroots() {
- # mount /proc in chroots
- local ret
- for CHROOT in $CHROOTS; do
- show "chroot: %s mount /proc" "$CHROOT"
- ret=$(chroot $CHROOT mount /proc > /dev/null 2>&1; echo $?)
- [ $ret -eq 0 ] && ok || fail
- done
-}
-
-umount_chroots() {
- local ret
- for CHROOT in $CHROOTS; do
- show "chroot: %s umount /proc" "$CHROOT"
- ret=$(chroot $CHROOT umount /proc > /dev/null 2>&1; echo $?)
- [ $ret -eq 0 ] && ok || fail
- done
-}
-
-chroots_status() {
- local ret
- for CHROOT in $CHROOTS; do
- show "chroot: %s is /proc mounted?" "$CHROOT"
- ret=$(chroot $CHROOT mount 2> /dev/null | grep -q 'none.*/proc'; echo $?)
- [ $ret -eq 0 ] && ok || fail
- done
-}
-
-start() {
- # Check if the service is already running?
- if [ -f /var/lock/subsys/pld-builder ]; then
- msg_already_running "PLD Linux Builder"
- return
- fi
-
- if [ -z "$CHROOTS" ]; then
- # no chroots configured. return and be silent
- return
- fi
- msg_starting "PLD Linux Builder"
- busy; echo
- mount_chroots
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pld-builder
-}
-
-stop() {
- if [ ! -f /var/lock/subsys/pld-builder ]; then
- msg_not_running "PLD Linux Builder"
- return
- fi
-
- # Stop daemons.
- msg_stopping "PLD Linux Builder"
- busy; echo
- umount_chroots
- rm -f /var/lock/subsys/pld-builder >/dev/null 2>&1
- RETVAL=0
-}
-
-condrestart() {
- if [ ! -f /var/lock/subsys/pld-builder ]; then
- msg_not_running "PLD Linux Builder"
- RETVAL=$1
- return
- fi
-
- stop
- start
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- try-restart)
- condrestart 0
- ;;
- force-reload)
- condrestart 7
- ;;
- status)
- chroots_status
- RETVAL=$?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
- exit 3
- ;;
-esac
-exit $RETVAL
+++ /dev/null
-# define chroots whose /proc to mount on startup
-
-#CHROOTS=/srv/builders/pld/{ac/{athlon,i586},actw/{athlon,i586},th/{athlon,i486}}
+++ /dev/null
-# locally cached rpms
-[source]
-name = ready
-pri = -1
-type = dir
-path = /var/cache/pld-builder/ready/
-autoup = no
+++ /dev/null
-LOGFILE=procmail.log
-
-#:0 c
-#mail.copy
-
-:0
-* ^X-New-PLD-Builder:
-| /usr/share/pld-builder/bin/request-handler.sh
-
-:0
-* ^FROM_MAILER
-/dev/null
-
-#:0
-#!root@example.org
+++ /dev/null
-# rpm macros for pld builder chroot
-
-# A colon separated list of desired locales to be installed;
-# "all" means install all locale specific files.
-%_install_langs en_US
-
-# If non-zero, all erasures will be automagically repackaged.
-%_repackage_all_erasures 0
-
-# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
-# marked as %doc should be installed.
-# FIXME: excludedocs breaks kde build
-#%_excludedocs 1
+++ /dev/null
-# allow to run all comments under builder chroot
-#builder ALL=(ALL) NOPASSWD: /usr/sbin/chroot /srv/chroot *
+++ /dev/null
-<!ELEMENT queue (group*)>
-
-<!ELEMENT group (requester,time,priority,batch+)>
-<!ATTLIST group id CDATA #REQUIRED>
-<!ATTLIST group no CDATA #REQUIRED>
-<!ATTLIST group flags CDATA "">
-
-<!ELEMENT requester (#PCDATA)>
-<!ATTLIST requester email CDATA #REQUIRED>
-
-<!ELEMENT time (#PCDATA)>
-
-<!ELEMENT priority (#PCDATA)>
-
-<!ELEMENT batch (src-rpm,command,spec,branch,info,kernel?,(with|without)*,builder+)>
-<!ATTLIST batch id CDATA #REQUIRED>
-<!ATTLIST batch depends-on CDATA "">
-
-<!ELEMENT src-rpm (#PCDATA)>
-
-<!ELEMENT command (#PCDATA)>
-<!ATTLIST command flags CDATA "">
-
-<!ELEMENT spec (#PCDATA)>
-
-<!ELEMENT branch (#PCDATA)>
-
-<!ELEMENT info (#PCDATA)>
-
-<!ELEMENT kernel (#PCDATA)>
-
-<!ELEMENT with (#PCDATA)>
-
-<!ELEMENT without (#PCDATA)>
-
-<!ELEMENT builder (#PCDATA)>
-<!ATTLIST builder status CDATA #REQUIRED>
-
-
+++ /dev/null
-<?xml version="1.0"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-targetNamespace="http://pld-linux.org"
-xmlns="http://pld-linux.org"
-elementFormDefault="qualified">
-
-<xs:element name="queue">
-<xs:complexType>
-<xs:sequence>
- <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="requester">
- <xs:complexType mixed="true">
- <xs:attribute name="email" type="xs:string"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="time" type="xs:integer"/>
- <xs:element name="priority" type="xs:integer"/>
- <xs:element name="batch" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="src-rpm" type="xs:string"/>
- <xs:element name="command">
- <xs:complexType mixed="true">
- <xs:attribute name="flags" type="xs:string" default=""/>
- </xs:complexType>
- </xs:element>
- <xs:element name="spec" type="xs:string"/>
- <xs:element name="branch" type="xs:string"/>
- <xs:element name="info" type="xs:string" default=""/>
- <xs:element name="kernel" type="xs:string" minOccurs="0"/>
- <xs:element name="with" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="without" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="builder" maxOccurs="unbounded">
- <xs:complexType mixed="true">
- <xs:attribute name="status" type="xs:string" default=""/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string"/>
- <xs:attribute name="depends-on" type="xs:string" default=""/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string"/>
- <xs:attribute name="no" type="xs:integer"/>
- <xs:attribute name="flags" type="xs:string" default=""/>
- </xs:complexType>
- </xs:element>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
-
-</xs:schema>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!-- TODO: 1) links
- 2) proper dates with http://www.djkaty.com/drupal/xsl-date-time -->
-
-<xsl:template match="/queue">
-<html><head><title>PLD builder queue</title></head><body>
-<xsl:for-each select="group">
- <xsl:sort select="@no" order="descending"/>
- <p><b><xsl:value-of select="@no"/></b>. <xsl:value-of select="time"/> from <xsl:value-of select="requester"/><xsl:text> </xsl:text><small><xsl:value-of select="@id"/>, <xsl:value-of select="priority"/>, <xsl:value-of select="@flags"/></small><br/>
- <ul>
- <xsl:for-each select="batch">
- <li>
- <xsl:value-of select="src-rpm"/>
- (<xsl:value-of select="spec"/> -R <xsl:value-of select="branch"/>
- <xsl:for-each select="with | without">
- <xsl:if test="name() = 'with'">
- <xsl:text> --with </xsl:text>
- </xsl:if>
- <xsl:if test="name() = 'without'">
- <xsl:text> --without </xsl:text>
- </xsl:if>
- <xsl:value-of select="."/>
- <xsl:if test="position() != last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="kernel">
- <xsl:text> --define 'alt_kernel </xsl:text>
- <xsl:value-of select="kernel"/>'
- </xsl:if>)
- <small>
- [<xsl:for-each select="builder"><b>
- <xsl:choose>
- <xsl:when test="@status = 'OK'">
- <font color='green'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
- </xsl:when>
- <xsl:when test="@status = 'FAIL'">
- <font color='red'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
- </xsl:when>
- <xsl:otherwise>
- <font color='black'><xsl:value-of select="."/>:<xsl:value-of select="@status"/></font>
- </xsl:otherwise>
- </xsl:choose>
- </b>
- <xsl:if test="position()!=last()"><xsl:text> </xsl:text></xsl:if>
- </xsl:for-each>]
- </small>
- </li>
- </xsl:for-each>
- </ul>
-</p>
-</xsl:for-each>
-</body></html>
-</xsl:template>
-
-</xsl:stylesheet>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!-- TODO: 1) links
- 2) proper dates with http://www.djkaty.com/drupal/xsl-date-time -->
-
-<xsl:template match="/queue">
-
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-size="10pt">
-
-<fo:layout-master-set>
- <fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm" margin="1cm">
- <fo:region-body margin="0cm"/>
- <fo:region-before extent="0cm"/>
- <fo:region-after extent="0cm"/>
- <fo:region-start extent="0cm"/>
- <fo:region-end extent="0cm"/>
- </fo:simple-page-master>
-</fo:layout-master-set>
-<fo:page-sequence master-reference="A4">
-<fo:flow flow-name="xsl-region-body">
-
-
-<xsl:for-each select="group">
- <xsl:sort select="@no" order="descending"/>
-
- <fo:block space-before="2mm" space-after="2mm"><fo:inline font-weight="bold"><xsl:value-of select="@no"/></fo:inline>. <xsl:value-of select="time"/> from <xsl:value-of select="requester"/><xsl:text> </xsl:text><fo:inline font-size="small"><xsl:value-of select="@id"/>, <xsl:value-of select="priority"/>, <xsl:value-of select="@flags"/></fo:inline></fo:block>
- <fo:list-block space-before="2mm" space-after="2mm">
- <xsl:for-each select="batch">
- <fo:list-item space-before="2mm" space-after="2mm">
- <fo:list-item-label start-indent="5mm">
- <fo:block font-family="monospace">*</fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="9mm">
- <fo:block>
- <xsl:value-of select="src-rpm"/>
- (<xsl:value-of select="spec"/> -R <xsl:value-of select="branch"/>
- <xsl:for-each select="with | without">
- <xsl:if test="name() = 'with'">
- <xsl:text> --with </xsl:text>
- </xsl:if>
- <xsl:if test="name() = 'without'">
- <xsl:text> --without </xsl:text>
- </xsl:if>
- <xsl:value-of select="."/>
- <xsl:if test="position() != last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="kernel">
- <xsl:text> --define 'alt_kernel </xsl:text>
- <xsl:value-of select="kernel"/>'
- </xsl:if>)
- <fo:inline font-size="small">
- [<xsl:for-each select="builder">
- <xsl:choose>
- <xsl:when test="@status = 'OK'">
- <fo:inline color="green"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline>
- </xsl:when>
- <xsl:when test="@status = 'FAIL'">
- <fo:inline color="red"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline>
- </xsl:when>
- <xsl:otherwise>
- <fo:inline color="black"><xsl:value-of select="."/>:<xsl:value-of select="@status"/></fo:inline>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="position()!=last()"><xsl:text> </xsl:text></xsl:if>
- </xsl:for-each>]
- </fo:inline>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </xsl:for-each>
- </fo:list-block>
-
-</xsl:for-each>
-
-</fo:flow>
-</fo:page-sequence>
-
-</fo:root>
-
-</xsl:template>
-
-</xsl:stylesheet>
-