Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 635 → Rev 636

/doc/build server.txt
0,0 → 1,76
 
 
BUILD SERVER SETUP
 
 
 
=== INTRO =====================================================================
 
The SvarDOS build system is entirely stored in the project's svn repository.
This includes many components:
 
- SvarDOS-specific tools (install, pkg, pkgnet, localcfg, svarcom, help, ...)
- SvarDOS packages
- SvarDOS website
- build scripts and tools
 
This means that the project's svn tree contains everything that is required
to build SvarDOS.
 
 
=== SVN SERVICE ===============================================================
 
The server must have a subversion service installed with the SvarDOS repository
imported.
 
The only specific configuration concerns a post-commit hook that should be set
up to create a /tmp/svados_repo_changed.flag file whenever a commit is made to
the repo. Such hook script can be as simple as this:
 
echo date > /tmp/svardos_repo_changed.flag
exit 0
 
 
=== SVN CLIENT ================================================================
 
The SvarDOS repository should be checked out in /srv/svardos/:
 
$ svn co svn://127.0.0.1/svardos /srv/svardos
 
 
=== WEB SERVICE ===============================================================
 
A web server with PHP must be running (typically Apache). The PHP installation
needs the php-zip extension (required by buildidx), and the Apache web root
should point at /srv/svardos/website.
 
 
=== CRON ACTIONS ==============================================================
 
A cron job should be configured to run frequently (like every minute) and
execute the /srv/svardos/cron.sh script. This script is responsible for
checking out the local svardos repo whenever a new commit is being made, and
rebuilds the index of the packages repository.
 
 
=== MIRRORING THE PROJECT'S SVN ===============================================
 
Mirroring the project's svn tree (containing all build scripts, packages, etc)
is the best way to make a backup copy of the entire SvarDOS build system along
with all its history. To achieve such mirror, one needs to create an empty
svn repository and populate it using svnsync:
 
$ svnadmin create /srv/svardos-mirror
$ svnsync init file:///srv/svardos-mirror svn://svn.svardos.org/svardos
$ svn up /srv/svardos-mirror
 
The same procedure can be used to migrate the SvarDOS build system from one
server to another.
 
NOTE: The target svn server must allow modification of revision properties.
This is achieved with a svn "pre-revprop-change" hook of two lines:
#!/bin/sh
exit 0
 
 
======================================================================= EOF ===
/doc/packagers.txt
0,0 → 1,99
 
 
DOCUMENTATION FOR SVARDOS PACKAGERS
 
 
 
=== HOW TO CREATE A PACKAGE? ==================================================
 
Packaging software for SvarDOS implies creating a ZIP package that can be
installed with "pkg". This file will not discuss this aspect, you should find
all necessary information about this topic in the SvarDOS help:
 
* help pkgfmt
* help pkgrules
 
 
=== WHO CAN UPLOAD PACKAGES TO TO THE SVARDOS REPO? ===========================
 
Only the team of SvarDOS packagers is allowed to upload new or updated packages
to the SvarDOS online repository. If you are not one of them, please get in
touch with us through the SvarDOS mailing list. If you are a packager, then
keep reading.
 
 
=== INITIAL SVN SETUP (REPOSITORY CHECKOUT) ===================================
 
Note that all instructions are implying the usage of the command-line
subversion client, as available on all Linux distributions.
 
SvarDOS packages are stored in the project's svn tree, hence the first thing to
do is for you to pull the SvarDOS subversion tree. You must have obtained
credentials to svn access already. To fetch the SvarDOS package repository
to your local disk, use such svn checkout:
 
$ svn co svn://YOURLOGIN@svn.svardos.org/svardos/packages svardos-packages
 
It is a one time only action that should create a "svardos-packages" directory
on your disk. Inside you will find all SvarDOS packages.
 
 
=== UPLOADING A NEW PACKAGE ===================================================
 
So you have created this new SvarDOS ZIP package with some very cool software
in it. Great! To upload it to the SvarDOS online repo, copy your zip package
to your local svardos-packages directory. Then, instruct svn to add the new
file(s) to the repo:
 
$ cd svardos-packages
$ svn add package.zip
$ svn add package.src <-- optional, only if the package has available sources
 
Review the changes to make sure you added the right files:
$ svn st
 
...and if everything's all right, push (commit) the changes to the svn server:
 
$ svn commit -m 'new package added: PACKAGE_NAME'
 
Done! Your package should appear in the online repository within a minute or
two.
 
 
=== UPDATING A PACKAGE (ADD A NEW VERSION) ====================================
 
Let's imagine that we have a package named NASM in version 2.12. A new version
of this software has been released, you tested it, found it stable so you
packaged it. How to add it to the SvarDOS packages repository?
 
First, you need to rename the current package's filename so it becomes an
"alternative version":
 
$ cd svardos-packages
$ svn mv nasm.zip nasm-2.12.zip
$ svn mv nasm.src nasm-2.12.src <-- optional (only if package has sources)
 
Then, add the new version as the "current" version:
 
$ svn add nasm.zip
$ svn add nasm.src <-- optional (only if package has sources)
 
Finally, review and commit your changes:
 
$ svn st
$ svn commit -m 'updated NASM to version 2.13'
 
 
=== REMOVING A PACKAGE ========================================================
 
On rare occasions it may be necessary to delete some packages. For example if
they proved to be harmful in some way, or if their licensing is not compatible
with SvarDOS distribution, etc. Removing a package means deleting it from the
svn repository and commiting the change. Example:
 
$ cd svardos-packages
$ svn del package.zip
$ svn commit -m 'removed package PACKAGE_NAME because (reason here)'
 
 
======================================================================= EOF ===