Commit 466a76dc618951926113e5fad99a23719103908e

Thomas de Grivel 2022-11-04T15:57:18

git.kmx.io

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
diff --git a/README.md b/README.md
index 5e82310..8205544 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,20 @@
 # repo
 
+Copyright 2016-2022 kmx.io <contact@kmx.io>
+
+Permission is hereby granted to use this software granted
+the above copyright notice and this permission paragraph
+are included in all copies and substantial portions of this
+software.
+
+THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+THIS SOFTWARE.
+
+
+## Description
+
 Common interface for version control systems.
 
 Repo allows you to use source repositories directly as ASDF-installable
@@ -12,7 +27,7 @@ Github repositories are installed in the user subdirectory.
 ## Quickstart
 
 ``` SH
-  curl -O https://github.com/kmx-io/repo/blob/master/install-repo.sh
+  ftp https://git.kmx.io/kmx.io/repo/_blob/master/install-repo.sh
   sh install-repo.sh
 ```
 
@@ -27,7 +42,7 @@ Github repositories are installed in the user subdirectory.
 
 ## Manifest
 
-https://github.com/kmx-io/repo/blob/master/repo.manifest
+https://git.kmx.io/kmx.io/repo/_blob/master/repo.manifest
 
 
 ## Installation
@@ -47,18 +62,18 @@ Install ASDF from git :
 Install REPO from git :
 
 ``` SH
-  mkdir -p ~/common-lisp/kmx-io
-  cd ~/common-lisp/kmx-io
-  git clone https://github.com/kmx-io/repo.git
+  mkdir -p ~/common-lisp/kmx.io
+  cd ~/common-lisp/kmx.io
+  git clone https://git.kmx.io/kmx.io/repo.git
   cd ~/common-lisp
-  ln -s kmx-io/repo/repo.manifest
+  ln -s kmx.io/repo/repo.manifest
 ```
 
 In your Common Lisp implementation startup file :
 
 ``` Common-Lisp
   (load "~/common-lisp/fare/asdf/build/asdf")
-  (load "~/common-lisp/kmx-io/repo/repo")
+  (load "~/common-lisp/kmx.io/repo/repo")
   (repo:boot)
 ```
 
@@ -79,19 +94,19 @@ To update all repositories :
 Other functions :
 
 ``` Common-Lisp
-  (repo:repo "github:thodg/repo")         ;; Define repository by URI
+  (repo:repo "github:kmx-io/repo")        ;; Define repository by URI
 
   (repo:repo "thodg/repo")                ;; Find repository by dir/name
   (repo:repo :repo)                       ;; Find repository by name
 
   (setf repo:*repo-dir* "/tmp/repo-test") ;; Change installation directory
 
-  (repo:install "github:thodg/repo")      ;; Install repository by URI
-  (repo:install "thodg/repo")             ;; Install repository by dir/name
+  (repo:install "github:kmx-io/repo")     ;; Install repository by URI
+  (repo:install "kmx.io/repo")            ;; Install repository by dir/name
   (repo:install :repo)                    ;; Install repository by name
 
-  (repo:update "github:thodg/repo")       ;; Update repository by URI
-  (repo:update "thodg/repo")              ;; Update repository by dir/name
+  (repo:update "github:kmx-io/repo")      ;; Update repository by URI
+  (repo:update "kmx-io/repo")             ;; Update repository by dir/name
   (repo:update :repo)                     ;; Update repository by name
 
   repo:*repos*                            ;; List of defined repositories
diff --git a/install-repo.sh b/install-repo.sh
index b57bd6c..6c4278b 100755
--- a/install-repo.sh
+++ b/install-repo.sh
@@ -5,6 +5,7 @@ REPO_DIR=$HOME/common-lisp
 REPO_DIR=/tmp/common-lisp
 
 GITHUB='https://github.com/'
+KMX='https://git.kmx.io/'
 
 # detect gnu make
 
@@ -34,15 +35,15 @@ maybe_clone "${GITHUB}" 'fare' 'asdf'
 
 # Install Repo from Github
 
-maybe_clone "${GITHUB}" 'kmx-io' 'repo'
+maybe_clone "${KMX}" 'kmx.io' 'repo'
 if ! [ -f "${REPO_DIR}/repo.manifest" ]; then
-    ( cd "${REPO_DIR}" && ln -s kmx-io/repo/repo.manifest; )
+    ( cd "${REPO_DIR}" && ln -s kmx.io/repo/repo.manifest; )
 fi
 
 # Configure SBCL
 
 {
     echo "(load \"${REPO_DIR}/fare/asdf/build/asdf\")"
-    echo "(load \"${REPO_DIR}/kmx-io/repo/repo\")"
+    echo "(load \"${REPO_DIR}/kmx.io/repo/repo\")"
     echo "(repo:boot)"
 } >> ~/.sbclrc
diff --git a/repo.asd b/repo.asd
index 3c59545..076a799 100644
--- a/repo.asd
+++ b/repo.asd
@@ -1,5 +1,15 @@
 ;; repo - common interface for version control systems
-;; Copyright 2016-2022 Thomas de Grivel <thodg@kmx.io>
+;; Copyright 2016-2022 kmx.io <contact@kmx.io>
+;;
+;; Permission is hereby granted to use this software granted
+;; the above copyright notice and this permission paragraph
+;; are included in all copies and substantial portions of this
+;; software.
+;;
+;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+;; PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+;; AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+;; THIS SOFTWARE.
 
 (defpackage :repo.system
   (:use :cl :asdf))
diff --git a/repo.lisp b/repo.lisp
index a5a06e9..91f42ea 100644
--- a/repo.lisp
+++ b/repo.lisp
@@ -1,5 +1,15 @@
 ;; repo - common interface for version control systems
-;; Copyright 2016-2022 Thomas de Grivel <thodg@kmx.io>
+;; Copyright 2016-2022 kmx.io <contact@kmx.io>
+;;
+;; Permission is hereby granted to use this software granted
+;; the above copyright notice and this permission paragraph
+;; are included in all copies and substantial portions of this
+;; software.
+;;
+;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+;; PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+;; AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+;; THIS SOFTWARE.
 
 (in-package :common-lisp-user)
 
@@ -12,6 +22,7 @@
            #:git
            #:github
            #:install
+           #:kmx
            #:manifest
            #:*manifest*
            #:repo
@@ -336,7 +347,8 @@
         (push repo *repos*)
         repo)))
 
-;;  github repository class
+
+;; github repository class
 
 (defclass github-repo (git-repo) ())
 
@@ -382,7 +394,37 @@
           (push repo *repos*)
           repo))))
 
-;;  subversion command
+
+;; kmx repository class
+
+(defclass kmx-repo (git-repo) ())
+
+(defmethod print-object ((obj kmx-repo) stream)
+  (print-unreadable-object (obj stream :type t :identity t)
+    (with-slots (dir name local-dir packages) obj
+      (format stream "~A/~A ~S ~S" dir name local-dir packages))))
+
+(defun kmx-uri (dir name &optional tree package)
+  (str "kmx:" dir "/" name
+       (when tree "?") tree
+       (when package "#") package))
+
+(defun kmx-url (dir name)
+  (str "https://git.kmx.io/" dir "/" name ".git"))
+
+(defun kmx (dir name &rest initargs)
+  (let ((uri (kmx-uri dir name)))
+    (or (repo-by-uri uri)
+        (let ((repo (apply #'make-instance 'kmx-repo
+                           :dir dir :name name
+                           :uri uri
+                           :url (kmx-url dir name)
+                           initargs)))
+          (push repo *repos*)
+          repo))))
+
+
+;; subversion command
 
 (defvar *svn*
   #+unix (or (probe-file "/usr/bin/svn")
diff --git a/repo.manifest b/repo.manifest
index 1bb4e79..67aff0b 100644
--- a/repo.manifest
+++ b/repo.manifest
@@ -1,50 +1,40 @@
 ;; -*- Lisp -*-
+;; repo - common interface for version control systems
+;; Copyright 2016-2022 kmx.io <contact@kmx.io>
+;;
+;; Permission is hereby granted to use this software granted
+;; the above copyright notice and this permission paragraph
+;; are included in all copies and substantial portions of this
+;; software.
+;;
+;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+;; PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+;; AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+;; THIS SOFTWARE.
+
 (in-package :repo-user)
+
+(git "http://git.kpe.io/cl-base64.git")
+(git "http://git.kpe.io/puri.git")
+(git "https://gitlab.common-lisp.net/alexandria/alexandria.git")
+(git "https://gitlab.common-lisp.net/cl-irregsexp/cl-irregsexp.git")
+(git "https://gitlab.common-lisp.net/cl-smtp/cl-smtp.git")
+(git "https://gitlab.common-lisp.net/cl-utilities/cl-utilities.git")
+(git "https://gitlab.common-lisp.net/metabang-bind/metabang-bind.git")
+(git "https://gitlab.common-lisp.net/rfc2388/rfc2388.git")
+
 (github "3b" "3bmd")
 (github "AccelerationNet" "cl-inflector")
 (github "BnMcGn" "html-entities")
-(github "KDr2" "sb-fastcgi")
 (github "KDr2" "cl-fastcgi")
-(github "RailsOnLisp" "bootstrap")
-(github "RailsOnLisp" "bordeaux-queue")
-(github "RailsOnLisp" "bordeaux-set")
-(github "RailsOnLisp" "can")
-(github "RailsOnLisp" "font-awesome")
-(github "RailsOnLisp" "gravatar")
-(github "RailsOnLisp" "re")
-(github "RailsOnLisp" "rol-assets")
-(github "RailsOnLisp" "rol-files")
-(github "RailsOnLisp" "rol-log")
-(github "RailsOnLisp" "rol-server")
-(github "RailsOnLisp" "rol-template")
-(github "RailsOnLisp" "rol-uri")
-(github "RailsOnLisp" "thot")
+(github "KDr2" "sb-fastcgi")
 (github "adamczykm" "iterate")
 (github "ahefner" "shuffletron")
 (github "binghe" "portable-threads")
 (github "cffi" "cffi")
-(github "cffi-posix" "cffi-dirent")
-(github "cffi-posix" "cffi-epoll")
-(github "cffi-posix" "cffi-errno")
-(github "cffi-posix" "cffi-fcntl")
-(github "cffi-posix" "cffi-socket")
-(github "cffi-posix" "cffi-stat")
-(github "cffi-posix" "cffi-unistd")
 (github "chaitanyagupta" "chronicity")
-(github "cl-adams" "adams")
 (github "cl-babel" "babel")
 (github "cl-plus-ssl" "cl-plus-ssl" :packages '("cl+ssl"))
-(github "cl-remap" "remap")
-(github "cl-remap" "uiop-remap")
-(github "cl-remap" "unistd-remap")
-(github "cl-stream" "cl-stream")
-(github "cl-stream" "babel-stream")
-(github "cl-stream" "token-stream")
-(github "cl-stream" "matcher-stream")
-(github "cl-stream" "parser-stream")
-(github "cl-stream" "unistd-stream")
-(github "cl-stream" "unistd-stdio")
-(github "common-lisp-repo" "repo")
 (github "cosmos72" "stmx")
 (github "didierverna" "clon")
 (github "didierverna" "declt")
@@ -52,6 +42,7 @@
 (github "diogoalexandrefranco" "cl-strings")
 (github "dlowe-net" "local-time")
 (github "drdo" "do-urlencode")
+(github "e-user" "cl-heredoc")
 (github "edicl" "chunga")
 (github "edicl" "cl-fad")
 (github "edicl" "cl-interpol")
@@ -61,10 +52,6 @@
 (github "edicl" "flexi-streams")
 (github "edicl" "hunchentoot")
 (github "eugeneia" "cl-qprint")
-(github "e-user" "cl-heredoc")
-(github "facts-db" "cl-facts")
-(github "facts-db" "cl-lessp")
-(github "facts-db" "cl-rollback")
 (github "fare" "asdf")
 (github "filonenko-mikhail" "cl-portaudio")
 (github "froydnj" "chipz")
@@ -79,9 +66,7 @@
 (github "jdz" "rfc2388")
 (github "jech" "cl-yacc")
 (github "keithj" "deoxybyte-unix")
-(github "kmx-io" "cl-debug")
 (github "lmj" "global-vars")
-(github "lowh" "exec-js")
 (github "marijnh" "parse-js")
 (github "melisgl" "named-readtables")
 (github "mishoo" "cl-uglify-js")
@@ -91,23 +76,22 @@
 (github "nightfly19" "cl-arrows")
 (github "nikodemus" "esrap")
 (github "orthecreedence" "blackbird")
-(github "orthecreedence" "cl-async"
-	:packages '("cl-async" "cl-async-repl" "cl-async-ssl"))
+(github "orthecreedence" "cl-async" :packages '("cl-async" "cl-async-repl" "cl-async-ssl"))
 (github "orthecreedence" "cl-libuv")
 (github "orthecreedence" "vom")
 (github "orthecreedence" "wookie")
 (github "pcostanza" "closer-mop")
-(github "phoe" "safe-read")
 (github "phmarek" "yason")
+(github "phoe" "safe-read")
 (github "pmai" "md5")
 (github "robert-strandh" "Acclimation")
 (github "robert-strandh" "Awele")
+(github "robert-strandh" "CLIM-demo-adventure")
+(github "robert-strandh" "CLIMatis")
 (github "robert-strandh" "Claire")
 (github "robert-strandh" "Claret")
 (github "robert-strandh" "Classeur")
 (github "robert-strandh" "Climacs")
-(github "robert-strandh" "CLIM-demo-adventure")
-(github "robert-strandh" "CLIMatis")
 (github "robert-strandh" "Climed")
 (github "robert-strandh" "Cloak")
 (github "robert-strandh" "Clobber")
@@ -127,8 +111,8 @@
 (github "robert-strandh" "Incremental-reader")
 (github "robert-strandh" "McCLIM")
 (github "robert-strandh" "Nomenclatura")
-(github "robert-strandh" "Second-Climacs")
 (github "robert-strandh" "SICL")
+(github "robert-strandh" "Second-Climacs")
 (github "robert-strandh" "Spell")
 (github "robert-strandh" "Stealth-mixin")
 (github "robert-strandh" "Subsequence")
@@ -149,18 +133,6 @@
 (github "sionescu" "static-vectors")
 (github "slime" "slime")
 (github "thephoeron" "let-over-lambda")
-(github "thodg" "cl-github-v3")
-(github "thodg" "cffi-portaudio")
-(github "thodg" "cfg")
-(github "thodg" "cl-github-v3")
-(github "thodg" "css-lexer")
-(github "thodg" "css-parser")
-(github "thodg" "fb")
-(github "thodg" "less-lexer")
-(github "thodg" "less-parser")
-(github "thodg" "positional")
-(github "thodg" "random-sequence")
-(github "thodg" "str")
 (github "tpapp" "ffa")
 (github "trivial-features" "trivial-features")
 (github "trivial-garbage" "trivial-garbage")
@@ -170,13 +142,59 @@
 (github "vseloved" "cl-redis")
 (github "vseloved" "rutils")
 (github "zkat" "chanl")
-(git "http://git.kpe.io/cl-base64.git")
-(git "http://git.kpe.io/puri.git")
-(git "https://gitlab.common-lisp.net/alexandria/alexandria.git")
-(git "https://gitlab.common-lisp.net/cl-irregsexp/cl-irregsexp.git")
-(git "https://gitlab.common-lisp.net/cl-smtp/cl-smtp.git")
-(git "https://gitlab.common-lisp.net/cl-utilities/cl-utilities.git")
-(git "https://gitlab.common-lisp.net/metabang-bind/metabang-bind.git")
-(git "https://gitlab.common-lisp.net/rfc2388/rfc2388.git")
-(svn "http://GBBopen.org/svn/GBBopen/trunk/" "gbbopen/gbbopen")
 
+(kmx "RailsOnLisp" "bootstrap")
+(kmx "RailsOnLisp" "bordeaux-queue")
+(kmx "RailsOnLisp" "bordeaux-set")
+(kmx "RailsOnLisp" "can")
+(kmx "RailsOnLisp" "font-awesome")
+(kmx "RailsOnLisp" "gravatar")
+(kmx "RailsOnLisp" "rol-assets")
+(kmx "RailsOnLisp" "rol-files")
+(kmx "RailsOnLisp" "rol-log")
+(kmx "RailsOnLisp" "rol-server")
+(kmx "RailsOnLisp" "rol-template")
+(kmx "RailsOnLisp" "rol-uri")
+(kmx "RailsOnLisp" "thot")
+(kmx "cffi-posix" "cffi-dirent")
+(kmx "cffi-posix" "cffi-epoll")
+(kmx "cffi-posix" "cffi-errno")
+(kmx "cffi-posix" "cffi-fcntl")
+(kmx "cffi-posix" "cffi-socket")
+(kmx "cffi-posix" "cffi-stat")
+(kmx "cffi-posix" "cffi-unistd")
+(kmx "cl-adams" "adams")
+(kmx "cl-remap" "remap")
+(kmx "cl-remap" "uiop-remap")
+(kmx "cl-remap" "unistd-remap")
+(kmx "cl-stream" "babel-stream")
+(kmx "cl-stream" "cl-stream")
+(kmx "cl-stream" "matcher-stream")
+(kmx "cl-stream" "parser-stream")
+(kmx "cl-stream" "token-stream")
+(kmx "cl-stream" "unistd-stdio")
+(kmx "cl-stream" "unistd-stream")
+(kmx "facts-db" "cl-facts")
+(kmx "facts-db" "cl-lessp")
+(kmx "facts-db" "cl-rollback")
+(kmx "idl" "excel-fun.git")
+(kmx "idl" "idl-calc.git")
+(kmx "kmx.io" "cl-debug")
+(kmx "kmx.io" "repo")
+(kmx "lowh" "exec-js")
+(kmx "thodg" "cffi-portaudio")
+(kmx "thodg" "cfg")
+(kmx "thodg" "cl-github-v3")
+(kmx "thodg" "cl-github-v3")
+(kmx "thodg" "css-lexer")
+(kmx "thodg" "css-parser")
+(kmx "thodg" "fb")
+(kmx "thodg" "less-lexer")
+(kmx "thodg" "less-parser")
+(kmx "thodg" "positional")
+(kmx "thodg" "random-sequence")
+(kmx "thodg" "re.git")
+(kmx "thodg" "str")
+(kmx "thodg" "str.git")
+
+(svn "http://GBBopen.org/svn/GBBopen/trunk/" "gbbopen/gbbopen")