catalinux / rgfs (public) (License: GPLv3) (since 2020-11-11)
Allows mapping of RocketGit storage area into a local directory
List of commits:
Subject Hash Author Date (UTC)
Added support for uid and head 2c9ae749a048d990ce24aa389439056c8ab0e836 Catalin(ux) M. BOIE 2020-11-27 06:29:37
Added chmod 82a9f7db95a0327bd0d97a58a27ce6432fdf6790 Catalin(ux) M. BOIE 2020-11-16 18:53:49
implemented chown d3862312d2900e96957c0734b5f27d0851d2a19a Catalin(ux) M. BOIE 2020-11-16 18:31:35
Lots of improvements 4953574e14ffba41e05e897fb94771f0ac7bab44 Catalin(ux) M. BOIE 2020-11-15 16:46:04
Allow verbose debug cee91423dda669c580b84451d3b846b3e7ef3038 Catalin(ux) M. BOIE 2020-11-15 12:11:04
Small bug caused by an old way to pack path ad3501ea5b7b112f0760f5aca247275e974edaff Catalin(ux) M. BOIE 2020-11-15 11:59:55
Lots of improvements 9275d4bc7be78518ac7bd2c3aa9cfb946a2969ad Catalin(ux) M. BOIE 2020-11-15 10:40:44
Lots of cleanups 2998ff2dcb74565887986fb7167e65e4fdf6d173 Catalin(ux) M. BOIE 2020-11-14 19:23:09
added utimens b5c24acf3ff86a51a7a49fec1eaf8eb65ae77bbb Catalin(ux) M. BOIE 2020-11-14 16:09:29
Improved debug f9bdf71667d0c77d4fcb4fa6e7792fd2d4c60712 Catalin(ux) M. BOIE 2020-11-13 18:57:48
Allow pushing a name and a repo id 9b48c3ae2a059a1ecd84caf44cea6c551175dd46 Catalin(ux) M. BOIE 2020-11-12 16:14:02
Send also the pkg_repo_id parameter 866c8063866effdabe0aa76fcfb9cc2b3d61b67a Catalin(ux) M. BOIE 2020-11-12 07:54:07
Now we can pass parameters by env 8352d8d09714a3c2af7550ad55517bfa8590a309 Catalin(ux) M. BOIE 2020-11-12 04:48:19
Inistial commit e51779259596117c80f6e7961f4387fdd48f820a Catalin(ux) M. BOIE 2020-11-11 08:18:38
Commit 2c9ae749a048d990ce24aa389439056c8ab0e836 - Added support for uid and head
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-11-27 06:29
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-11-27 06:29
Parent(s): 82a9f7db95a0327bd0d97a58a27ce6432fdf6790
Signing key:
Tree: 7b8f9e94e85cf34756d582487f91b11be9ada5b5
File Lines added Lines deleted
rgfs.c 50 6
File rgfs.c changed (mode: 100644) (index 3629c03..389bd83)
... ... static char *rgfs_url = "/rgfs";
33 33 static int rgfs_debug = 0; static int rgfs_debug = 0;
34 34 static char *rgfs_log = "rgfs.log"; static char *rgfs_log = "rgfs.log";
35 35 static int rgfs_log_fd = 2; static int rgfs_log_fd = 2;
36 static char *rgfs_uid = NULL;
37 static char *rgfs_head = NULL;
36 38
37 39 static gnutls_session_t session; static gnutls_session_t session;
38 40 static unsigned char connected = 0; static unsigned char connected = 0;
 
... ... static int rgfs_tls(void)
195 197 int type; int type;
196 198 unsigned status, len; unsigned status, len;
197 199
198 while (1) {
200 do {
199 201 /* Destroy session */ /* Destroy session */
200 202 xlog("session=%p sd=%d\n", session, sd); xlog("session=%p sd=%d\n", session, sd);
201 203 if (session) { if (session) {
 
... ... static int rgfs_tls(void)
342 344 break; break;
343 345 } }
344 346
345 ret = 0;
346 break;
347 }
347 if (rgfs_uid) {
348 xlog("Sending uid...\n");
349 len = strlen(rgfs_uid);
350 buf[0] = 0x12; // type=genvar
351 buf[1] = (2 + 2 + 3 + len) >> 8; // len H
352 buf[2] = 2 + 2 + 3 + len; // len L
353 buf[3] = 0; // strlen("uid")
354 buf[4] = 3; // strlen("uid")
355 buf[5] = len >> 8;
356 buf[6] = len;
357 memcpy(buf + 7, "uid", 3);
358 memcpy(buf + 7 + 3, rgfs_uid, len);
359 r = rgfs_send("uid", buf, 7 + 3 + len);
360 if (r <= 0)
361 break;
362 ret = 0;
363 }
364
365 if (rgfs_head) {
366 xlog("Sending head...\n");
367 len = strlen(rgfs_head);
368 buf[0] = 0x12; // type=genvar
369 buf[1] = (2 + 2 + 4 + len) >> 8; // len H
370 buf[2] = 2 + 2 + 4 + len; // len L
371 buf[3] = 0; // strlen("head")
372 buf[4] = 4; // strlen("head")
373 buf[5] = len >> 8;
374 buf[6] = len;
375 memcpy(buf + 7, "head", 4);
376 memcpy(buf + 7 + 4, rgfs_head, len);
377 r = rgfs_send("head", buf, 7 + 4 + len);
378 if (r <= 0)
379 break;
380 ret = 0;
381 }
382 } while (0);
348 383
349 384 return ret; return ret;
350 385 } }
 
... ... int main(int argc, char *argv[])
1225 1260 if (s) if (s)
1226 1261 rgfs_url = s; rgfs_url = s;
1227 1262
1228 xlog("name=%s server=%s port=%d url=%s pkg_repo_id=%u\n",
1229 rgfs_name, rgfs_server, rgfs_port, rgfs_url, rgfs_pkg_repo_id);
1263 s = getenv("RGFS_UID");
1264 if (s)
1265 rgfs_uid = s;
1266
1267 s = getenv("RGFS_HEAD");
1268 if (s)
1269 rgfs_head = s;
1270
1271 xlog("name=%s server=%s port=%d url=%s pkg_repo_id=%u uid=%s head=%s\n",
1272 rgfs_name, rgfs_server, rgfs_port, rgfs_url, rgfs_pkg_repo_id,
1273 rgfs_uid, rgfs_head);
1230 1274
1231 1275 if (gnutls_check_version("3.4.6") == NULL) { if (gnutls_check_version("3.4.6") == NULL) {
1232 1276 xlog("GnuTLS 3.4.6 or later is required!\n"); xlog("GnuTLS 3.4.6 or later is required!\n");
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rgfs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rgfs

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rgfs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin master