Initial code drop

This commit is contained in:
Jesse Keating 2007-02-14 11:25:01 -05:00
parent 4967a2a434
commit 5d7e66a17e
126 changed files with 27342 additions and 0 deletions

28
builder/Makefile Normal file
View file

@ -0,0 +1,28 @@
BINFILES = kojid
PYFILES = $(wildcard *.py)
_default:
@echo "nothing to make. try make install"
clean:
rm -f *.o *.so *.pyc *~
install:
@if [ "$(DESTDIR)" = "" ]; then \
echo " "; \
echo "ERROR: A destdir is required"; \
exit 1; \
fi
mkdir -p $(DESTDIR)/usr/sbin
install -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
mkdir -p $(DESTDIR)/etc/mock/koji
mkdir -p $(DESTDIR)/etc/rc.d/init.d
install -m 755 kojid.init $(DESTDIR)/etc/rc.d/init.d/kojid
mkdir -p $(DESTDIR)/etc/sysconfig
install -m 644 kojid.sysconfig $(DESTDIR)/etc/sysconfig/kojid
install -m 644 kojid.conf $(DESTDIR)/etc/kojid.conf

2429
builder/kojid Executable file

File diff suppressed because it is too large Load diff

24
builder/kojid.conf Normal file
View file

@ -0,0 +1,24 @@
[kojid]
; The number of seconds to sleep between tasks
; sleeptime=15
; The maximum number of jobs that kojid will handle at a time
; maxjobs=10
; The minimum amount of free space (in MBs) required for each build root
; minspace=8192
; The directory root where work data can be found from the koji hub
; topdir=/mnt/koji
; The directory root for temporary storage
; workdir=/tmp/koji
; The directory root for mock
; mockdir=/var/lib/mock
; The user to run as when doing builds
; mockuser=kojibuilder
; The URL for the xmlrpc server
server=http://hub.example.com/kojihub

85
builder/kojid.init Executable file
View file

@ -0,0 +1,85 @@
#! /bin/sh
#
# kojid Start/Stop kojid
#
# chkconfig: 345 99 99
# description: kojid server
# processname: kojid
# This is an interactive program, we need the current locale
# Source function library.
. /etc/init.d/functions
# Check that we're a priviledged user
[ `id -u` = 0 ] || exit 0
[ -f /etc/sysconfig/kojid ] && . /etc/sysconfig/kojid
prog="kojid"
# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
exit 0
fi
[ -f /usr/sbin/kojid ] || exit 0
RETVAL=0
start() {
echo -n $"Starting $prog: "
cd /
ARGS=""
[ "$FORCE_LOCK" == "Y" ] && ARGS="$ARGS --force-lock"
[ "$KOJID_DEBUG" == "Y" ] && ARGS="$ARGS --debug"
[ "$KOJID_VERBOSE" == "Y" ] && ARGS="$ARGS --verbose"
# XXX Fix for make download-checks in kernel builds
# Remove once we're running the buildSRPMFromCVS task
# as an unpriviledged user with their own environment
export HOME="/root"
daemon /usr/sbin/kojid $ARGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/kojid
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc kojid
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/kojid
return $RETVAL
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart|reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/kojid ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $?

3
builder/kojid.sysconfig Normal file
View file

@ -0,0 +1,3 @@
FORCE_LOCK=Y
KOJID_DEBUG=N
KOJID_VERBOSE=Y