Subversion Repositories SvarDOS

Rev

Rev 1260 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
636 mateusz.vi 1
 
2
 
3
                      DOCUMENTATION FOR SVARDOS PACKAGERS
4
 
5
 
6
 
7
=== HOW TO CREATE A PACKAGE? ==================================================
8
 
679 mateusz.vi 9
Packaging software for SvarDOS implies creating an SVP package that can be
636 mateusz.vi 10
installed with "pkg". This file will not discuss this aspect, you should find
11
all necessary information about this topic in the SvarDOS help:
12
 
13
 * help pkgfmt
14
 * help pkgrules
15
 
16
 
17
=== WHO CAN UPLOAD PACKAGES TO TO THE SVARDOS REPO? ===========================
18
 
19
Only the team of SvarDOS packagers is allowed to upload new or updated packages
20
to the SvarDOS online repository. If you are not one of them, please get in
21
touch with us through the SvarDOS mailing list. If you are a packager, then
22
keep reading.
23
 
24
 
25
=== INITIAL SVN SETUP (REPOSITORY CHECKOUT) ===================================
26
 
27
Note that all instructions are implying the usage of the command-line
28
subversion client, as available on all Linux distributions.
29
 
30
SvarDOS packages are stored in the project's svn tree, hence the first thing to
31
do is for you to pull the SvarDOS subversion tree. You must have obtained
32
credentials to svn access already. To fetch the SvarDOS package repository
33
to your local disk, use such svn checkout:
34
 
1260 mateusz.vi 35
$ svn co svn://YOURLOGIN@svn.svardos.org/svardos-pkgs
636 mateusz.vi 36
 
1260 mateusz.vi 37
It is a one time only action that should create a "svardos-pkgs" directory
636 mateusz.vi 38
on your disk. Inside you will find all SvarDOS packages.
39
 
40
 
41
=== UPLOADING A NEW PACKAGE ===================================================
42
 
679 mateusz.vi 43
So you have created this new SvarDOS SVP package with some very cool software
891 bttr 44
in it. Great! To upload it to the SvarDOS online repo, copy your new package
636 mateusz.vi 45
to your local svardos-packages directory. Then, instruct svn to add the new
46
file(s) to the repo:
47
 
1260 mateusz.vi 48
$ cd svardos-pkgs
720 mateusz.vi 49
$ svn add package-ver.svp
50
$ svn add package-ver.zip   <-- optional, only if package has available sources
636 mateusz.vi 51
 
52
Review the changes to make sure you added the right files:
53
$ svn st
54
 
55
...and if everything's all right, push (commit) the changes to the svn server:
56
 
57
$ svn commit -m 'new package added: PACKAGE_NAME'
58
 
59
Done! Your package should appear in the online repository within a minute or
60
two.
61
 
62
 
63
=== UPDATING A PACKAGE (ADD A NEW VERSION) ====================================
64
 
65
Let's imagine that we have a package named NASM in version 2.12. A new version
720 mateusz.vi 66
2.15 of this software has been released, you tested it, found it stable so you
636 mateusz.vi 67
packaged it. How to add it to the SvarDOS packages repository?
68
 
1476 mateusz.vi 69
Duplicate the last version of the package into a new file:
636 mateusz.vi 70
 
1476 mateusz.vi 71
$ svn cp nasm-2.14.svp nasm-2.15.svp
72
$ svn cp nasm-2.14.zip nasm-2.15.zip      <-- only if package has sources
636 mateusz.vi 73
 
1476 mateusz.vi 74
Then overwrite the new version files with the actual new files (ie. overwrite
75
the nasm-2.15.* files in the example above).
76
 
636 mateusz.vi 77
Finally, review and commit your changes:
78
 
79
$ svn st
891 bttr 80
$ svn commit -m 'updated package NASM to version 2.15'
636 mateusz.vi 81
 
1476 mateusz.vi 82
An alternative way would be to simply svn add the new version of files and it
83
would work just as well, but going through the "svn cp" + overwriting steps
84
allows svn to store the new version of the files much more efficiently, as it
85
will store only the bytes that changed instead of the entire file. Subversion
86
makes use of the xdelta algorithm for storing changes, and this algorithm works
87
both on text and binary content.
636 mateusz.vi 88
 
1476 mateusz.vi 89
 
90
Which version of the package will users get?
91
 
92
The repository server automatically serves the latest available version as the
93
"preferred" version to users. The version strings are processed (and compared
94
to each other) through the PHP version_compare() function documented here:
95
<https://www.php.net/manual/en/function.version-compare>
96
 
720 mateusz.vi 97
This function works relatively well, but it might fail on some exotic version
98
strings. For the time being, there is no way to flag a specific package version
99
as being "preferred".
100
 
101
 
636 mateusz.vi 102
=== REMOVING A PACKAGE ========================================================
103
 
1476 mateusz.vi 104
On rare occasions it may be necessary to delete a package. For example if they
105
proved to be harmful in some way, or if their licensing is not compatible with
106
SvarDOS distribution, etc. Removing a package is as simple as deleting it from
107
the svn repository and commiting the change. Example:
636 mateusz.vi 108
 
1260 mateusz.vi 109
$ cd svardos-pkgs
679 mateusz.vi 110
$ svn del package.svp
111
$ svn del package.zip       <-- only if zip with sources exists
636 mateusz.vi 112
$ svn commit -m 'removed package PACKAGE_NAME because (reason here)'
113
 
114
 
115
======================================================================= EOF ===