1 |
Hello everyone, |
2 |
|
3 |
So a couple of days ago we discussed with pchrist about how we will |
4 |
handle porting almost everything in the lisp-overlay to the main tree. |
5 |
We need feedback on the following ideas to solve this, so please critic |
6 |
and comment on this. |
7 |
|
8 |
The first idea is to move all the cl-* packages from the main tree to a |
9 |
new overlay different from the official one, so we can have a clean |
10 |
start in the main tree. Since most of these packages are broken (meaning |
11 |
bad src_uri, bad deps, and who knows what else at this point), we |
12 |
thought that this won't hurt the users. Most of us are using what's in |
13 |
the overlay (and whoever isn't, please do), but either way the packages |
14 |
aren't going to disappear they're just being moved, so don't panic :). |
15 |
|
16 |
The second idea is for mirroring all the tarballs that the cl-* packages |
17 |
use. Why do this? Well, most cl packages don't have a versioned tarball, |
18 |
so this brings a couple of problems regarding digests, and basic version |
19 |
control, so what we want to do is to build a little system to facilitate |
20 |
this job. |
21 |
|
22 |
Here's what I've written about this second idea: |
23 |
|
24 |
****** Start ****** |
25 |
|
26 |
The problem: |
27 |
|
28 |
Lisp packages' upstream don't name their tarballs with version numbers. |
29 |
When there's a new release, the tarball digest changes, and then the |
30 |
package digest fails. |
31 |
|
32 |
A posible solution: |
33 |
|
34 |
Build an app that controls when the tarballs are updated and notifies |
35 |
us about it in some way, and that provides a way of mirroring the tarball. |
36 |
|
37 |
Application design: |
38 |
|
39 |
The idea is to have a record of the tarball url, md5 digest, and the |
40 |
package name. |
41 |
The app should provide a way to: |
42 |
(Absolutely necessary) |
43 |
1) Add a new tarball providing only the url and the name. |
44 |
2) Delete a tarball selecting an index from a list. |
45 |
3) Download every tarball, compute its md5 digest and notify if it |
46 |
doesn't match with what's stored. |
47 |
4) Given the new version, mirror the tarball with the form ${PN}-${PV}. |
48 |
|
49 |
(Possible) |
50 |
5) A way to check what's the new version (I don't see this possible in |
51 |
a generic way). |
52 |
6) A way to backup the package information (if we use an XML file, this |
53 |
should be a must) |
54 |
7) A way to clean old tarballs, or the ones that are already mirrored |
55 |
in Gentoo. |
56 |
|
57 |
An easy way to store the tarball's data would be in an XML. A possible |
58 |
DTD could be: |
59 |
|
60 |
<?xml version="1.0"?> |
61 |
<!DOCTYPE packages [ |
62 |
<!ELEMENT packages (package*)> |
63 |
<!ELEMENT package (name,md5,url)> |
64 |
<!ELEMENT name (#CDATA)> |
65 |
<!ELEMENT md5 (#CDATA)> |
66 |
<!ELEMENT url (#CDATA)> |
67 |
]> |
68 |
|
69 |
Another way would be a database, mysql, or sqlite, but I don't see the point |
70 |
because with an xml file it's easier to store in a server, and we don't need |
71 |
the speed that provides a database engine. |
72 |
|
73 |
Programming technology: |
74 |
|
75 |
I suggest Python, since there's a really easy way to parse html files, |
76 |
handle XML files, |
77 |
compute md5, upload the tarball to another server if necessary, and |
78 |
download the tarball |
79 |
from the upstream server. |
80 |
Since we don't need too much speed to do this, the python interpreter |
81 |
low speed |
82 |
doesn't matter. |
83 |
|
84 |
Application workflow: |
85 |
1) |
86 |
$ ./app [--add,-a]<ENTER> |
87 |
Package name: <write name><ENTER> |
88 |
Not a valid name, please try again... [if the name contains spaces, or |
89 |
rare chars, and display the "Package name" prompt again] |
90 |
Package URL: <write url><ENTER> |
91 |
Not a valid URL, please try again... [if the URL contains spaces, or |
92 |
rare chars, and display the "Package URL" prompt again] |
93 |
Downloading package source... |
94 |
Calculating md5... |
95 |
Storing data... |
96 |
|
97 |
2) |
98 |
$ ./app [--del,-d] [--filter,-f package]<ENTER> |
99 |
1) clisp |
100 |
2) cmucl |
101 |
3) cl-smtp |
102 |
... |
103 |
N) cl-something |
104 |
|
105 |
Which package do you want to delete? Please write the package number |
106 |
from the list: |
107 |
<write package number><ENTER> |
108 |
The package number is doesn't correspond with any package from the list |
109 |
displayed. |
110 |
Please try again... [if the number is greater than N or less than 1 and |
111 |
display the prompt again] |
112 |
|
113 |
3) |
114 |
$ ./app [--check,-c] [--package,-p package]<ENTER> |
115 |
[if the -p option was provided] |
116 |
Checking for updates of package |
117 |
There is a new version of package, the tarball is saved in the "new" |
118 |
directory. |
119 |
[else] |
120 |
Checking for updates... |
121 |
........[may be display a dot for each package checked, or display a |
122 |
more verbose output] |
123 |
|
124 |
4) |
125 |
$ ./app [--update,-u package] |
126 |
Please type the new version: <write new version><ENTER> |
127 |
Not a valid version, please try again... [if it's not a valid Gentoo |
128 |
version, and display the prompt again] |
129 |
Mirroring the tarball with name package-newversion.tar.gz in mirrors |
130 |
directory... |
131 |
|
132 |
Where to place this: |
133 |
|
134 |
My first idea was to place this in woodpecker, and the tarballs in my |
135 |
www directory. May be |
136 |
there's a better, more collaborative way of doing this. May be the infra |
137 |
guys have something |
138 |
for things just like this. Mirroring the tarballs in another server is |
139 |
really easy through ftp with |
140 |
python, so we could run this on woodpecker and mirror the tarballs |
141 |
somewhere else. |
142 |
|
143 |
****** End ****** |
144 |
|
145 |
So I think that's about it. |
146 |
|
147 |
While we are developing the mirroring system and moving the packages, we |
148 |
will RFC the common-lisp eclass needed from the overlay in gentoo-dev |
149 |
ml. Once this eclass is in the main tree, and we have the mirroring app, |
150 |
the real porting can begin. |
151 |
|
152 |
What do you think? |
153 |
|
154 |
Cheers, |
155 |
Tomás |