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 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 82a9f7db95a0327bd0d97a58a27ce6432fdf6790 - Added chmod
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-11-16 18:53
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-11-16 18:53
Parent(s): d3862312d2900e96957c0734b5f27d0851d2a19a
Signing key:
Tree: bd10cff899420fc367eccae0137c4db7ddb51b03
File Lines added Lines deleted
rgfs.c 42 1
File rgfs.c changed (mode: 100644) (index f832806..3629c03)
... ... static int rgfs_fuse_chown(const char *path, uid_t uid, gid_t gid)
1125 1125 return 0; return 0;
1126 1126 } }
1127 1127
1128 static int rgfs_fuse_chmod(const char *path, mode_t mode)
1129 {
1130 int err = 0, r, i;
1131 uint16_t path_len, len;
1132 unsigned char buf[4 * 4096], cmd;
1133 uint32_t u32;
1134
1135 xlog("chmod: path=%s mode=%o\n", path, mode);
1136
1137 path_len = strlen(path);
1138 len = 1 + 2 + 4 + path_len;
1139 if (len > sizeof(buf)) {
1140 xlog(" buffer too small\n");
1141 return -EIO;
1142 }
1143
1144 i = 0;
1145 buf[i++] = 0x11;
1146 buf[i++] = (len - 1 - 2) >> 8;
1147 buf[i++] = len - 1 - 2;
1148 u32 = htobe32(mode); memcpy(buf + i, &u32, 4); i += 4;
1149 memcpy(buf + i, path, path_len); i += path_len;
1150 r = rgfs_send_recv("create", buf, i, buf, sizeof(buf));
1151
1152 i = 4;
1153 if (i < r) {
1154 cmd = buf[i++];
1155 //xlog(" cmd=0x%02hhx\n", cmd);
1156 switch (cmd) {
1157 case 0x00: err = - be32toh(*(uint32_t *) (buf + i)); break;
1158 default: xlog("Unexpected subcode 0x%02hhx!\n", cmd); exit(EXIT_FAILURE);
1159 }
1160 }
1161
1162 if (err < 0)
1163 xlog(" server returned error %d!\n", err);
1164
1165 return 0;
1166 }
1167
1128 1168 static const struct fuse_operations fuse_rgfs = { static const struct fuse_operations fuse_rgfs = {
1129 1169 .getattr = rgfs_fuse_getattr, .getattr = rgfs_fuse_getattr,
1130 1170 .readdir = rgfs_fuse_readdir, .readdir = rgfs_fuse_readdir,
 
... ... static const struct fuse_operations fuse_rgfs = {
1141 1181 .readlink = rgfs_fuse_readlink, .readlink = rgfs_fuse_readlink,
1142 1182 .symlink = rgfs_fuse_symlink, .symlink = rgfs_fuse_symlink,
1143 1183 .link = rgfs_fuse_link, .link = rgfs_fuse_link,
1144 .chown = rgfs_fuse_chown
1184 .chown = rgfs_fuse_chown,
1185 .chmod = rgfs_fuse_chmod
1145 1186 }; };
1146 1187
1147 1188 int main(int argc, char *argv[]) int main(int argc, char *argv[])
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