Back
Please note that you should not run pydar2 on a machine with users which you
do not trust. It's also recommended to only run pydar2 on a machine which is
not directly connected with the internet.


First you will have to configure a master:

* Make sure you have pydar2, postgresql-server, postgresql-python and subversion installed.

* Create a postgresql database for pydar2. Make sure it is reachable by
tcpip ( tcpip_socket option in /var/lib/pgsql/data/postgresql.conf ). For
example as user postgres :
	createdb pydar2
	createuser -P -A -D pydar2        (this will ask you for a password)
Now you have to make sure that the user pydar2master is able to use the
database by changing the file /var/lib/pgsql/data/pg_hba.conf
You could add a line like the following at the end:
host   pydar2        pydar2      127.0.0.1         255.255.255.255   md5

Don't forget to reload the postgresql config.

* Now you will have to add the correct dbconnectstring to
/etc/pydar2/master.conf. A dbconnectstring looks like the following:
host:database:user:password
For example:  127.0.0.1:pydar2:pydar2:mysecret

You also have to configure the buildmasterport and the hostname, for example:

[master]
buildmasterhostname=0.0.0.0
buildmasterport=9999
dbconnectstring=localhost:pydar2:pydar2:mysecret

Make sure this file is only readable by root and pydar2master!

* Now initialise the database:
psql -h 127.0.0.1 -f /usr/share/pydar2/sql/master.sql pydar2 pydar2
The first pydar2 is the dbname and the second pydar2 is the username.

Only the 'drop table' and 'drop sequence' stuff in the beginning should give
an error.

* A SpecRepository is a source of spec files, for example a subversion or a cvs 
checkout or a local directory with your spec files. You can use multiple 
specrepositories with one master. You need to create a directory for each
specrepository in /var/lib/pydar2/specrepos/ and do an initial checkout. For
example: 
su - pydar2master
mkdir -p /var/lib/pydar2/specrepos/rpmforge
cd /var/lib/pydar2/specrepos/rpmforge
svn co http://svn.rpmforge.net/svn/trunk/rpms

* You also have to specify each specrepository in the file
/etc/pydar2/specrepositories.conf . There's an example which you can
uncomment if you want to use rpmforge spec files.

* A target is an rpmrepository for which you are building, for example
'dries' or 'PLD'. You can specify scripts which have to be run on each spec
file which is compiled for a certain target. For example: automatically
add something to the release tag or remove all stupid 'Epoch: 0' tags.
You have to specify the targets in the file /etc/pydar2/targets.conf.

* When you now start the /usr/share/pydar2/pydar-buildserver-master.py 
program as user pydar2master, it will make a
full list of all those spec files and all the fields in those spec files.
All this information will be stored in the database and this takes a lot of
time. This is only done with new or updated spec files.

Normally the master should be running now and ready for accepting commands.
Next, setting up an account for automatically updating the
specrepositories:

The pydar-buildserver-master.py doesn't update the svn or cvs repositories itself.
A seperate program connects with the server, asks for the list of update
commands (one for each non-FILES specrepository), updates those spec
repositories and informas the master again.

* First you have to add a login and password which has the rights to connect
to the master. This is done in the file /etc/pydar2/accounts.conf. It must be a 
login with type=USER and the rights UPDATE_SPEC_REPOSITORIES_FILE_LIST and 
GET_SPEC_REPOSITORIES_UPDATE_COMMANDS. For example:

[update]
type=USER
fullname=specrepos update account
password=updatepass
right0=UPDATE_SPEC_REPOSITORIES_FILE_LIST
right1=GET_SPEC_REPOSITORIES_UPDATE_COMMANDS

This adds an account with the name 'update' and with the correct rights. Please change
the password.