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