Rev 1260 | Blame | Compare with Previous | Last modification | View Log | RSS feed
DOCUMENTATION FOR SVARDOS PACKAGERS
=== HOW TO CREATE A PACKAGE? ==================================================
Packaging software for SvarDOS implies creating an SVP 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-pkgs
It is a one time only action that should create a "svardos-pkgs" directory
on your disk. Inside you will find all SvarDOS packages.
=== UPLOADING A NEW PACKAGE ===================================================
So you have created this new SvarDOS SVP package with some very cool software
in it. Great! To upload it to the SvarDOS online repo, copy your new package
to your local svardos-packages directory. Then, instruct svn to add the new
file(s) to the repo:
$ cd svardos-pkgs
$ svn add package-ver.svp
$ svn add package-ver.zip <-- optional, only if 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
2.15 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?
Duplicate the last version of the package into a new file:
$ svn cp nasm-2.14.svp nasm-2.15.svp
$ svn cp nasm-2.14.zip nasm-2.15.zip <-- only if package has sources
Then overwrite the new version files with the actual new files (ie. overwrite
the nasm-2.15.* files in the example above).
Finally, review and commit your changes:
$ svn st
$ svn commit -m 'updated package NASM to version 2.15'
An alternative way would be to simply svn add the new version of files and it
would work just as well, but going through the "svn cp" + overwriting steps
allows svn to store the new version of the files much more efficiently, as it
will store only the bytes that changed instead of the entire file. Subversion
makes use of the xdelta algorithm for storing changes, and this algorithm works
both on text and binary content.
Which version of the package will users get?
The repository server automatically serves the latest available version as the
"preferred" version to users. The version strings are processed (and compared
to each other) through the PHP version_compare() function documented here:
<https://www.php.net/manual/en/function.version-compare>
This function works relatively well, but it might fail on some exotic version
strings. For the time being, there is no way to flag a specific package version
as being "preferred".
=== REMOVING A PACKAGE ========================================================
On rare occasions it may be necessary to delete a package. 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 is as simple as deleting it from
the svn repository and commiting the change. Example:
$ cd svardos-pkgs
$ svn del package.svp
$ svn del package.zip <-- only if zip with sources exists
$ svn commit -m 'removed package PACKAGE_NAME because (reason here)'
======================================================================= EOF ===