List of commits:
Subject Hash Author Date (UTC)
Misc small fixes 7bc12d7ee158d99979dbb91f293162472917a2e2 Catalin(ux) M. BOIE 2022-02-16 18:58:18
We did not validated the plan id - now is fixed. 3786d759107c4028f181c7de77d39382d9f572bf Catalin(ux) M. BOIE 2022-02-16 18:55:05
Added build stats 3f574c94ad35d6f85ee37a4da410499f268e608f Catalin(ux) M. BOIE 2022-02-16 18:53:54
Cosmetic 548c8a909c994ef528c9910c625e6afb88beeead Catalin(ux) M. BOIE 2022-02-16 18:44:12
.deb support 722ca672abf6f28109e35f3573dca7e367d3b51a Catalin(ux) M. BOIE 2022-02-16 18:39:19
compare: added rpm/deb lines 1356fb5c8e5d82356776561af4a2dcaec0d19c14 Catalin(ux) M. BOIE 2022-02-16 07:30:06
debian folder updates 45e86104b565e508c514804910cfda87a3c1239c Catalin(ux) M. BOIE 2022-02-16 07:26:09
Fix rate limit for IPv6 336d34f7eaac356688ba5c251f027aff947ce9e4 Catalin(ux) M. BOIE 2022-02-09 14:39:28
Forgot to remove a function after moving it b6fd0700cf5dde953acb0d4584a48cb404a69ab2 Catalin(ux) M. BOIE 2021-11-17 19:27:04
Prepare correctly for rgfs (missed some places) 38d255af17a72fd9f92a8c37d4fddc8f2caf023b Catalin(ux) M. BOIE 2021-11-17 18:05:01
TODO/cosmetic d4968bc1d9c8bbe3c4aba2479f3694a7a3863d0f Catalin(ux) M. BOIE 2021-11-17 18:04:36
More debug help 74f45188bffd7630d0c08648433749a3ef23c9af Catalin(ux) M. BOIE 2021-11-15 17:34:58
worker: Fixed a stupid bug leading to wrong distro upgrade command d9bc215557cd9a6f30dbc90434dc3aba46e39979 Catalin(ux) M. BOIE 2021-11-14 16:16:43
Silence an 'unpack' exception when we do not have enough bytes. add562b15d94501a0585001db526b241c251b6e6 Catalin(ux) M. BOIE 2021-11-14 11:25:01
Run struct and fixes under the same lock d046942317c73351473a18eb833318aec3f4d907 Catalin(ux) M. BOIE 2021-11-14 08:18:05
spec file small updates 7aef02df6ed5f6ce4d39cd2a926a79bcdc1a3c5a Catalin(ux) M. BOIE 2021-11-14 06:33:35
Typo b0087441b4d637c7bf6ed64b6c243ad2ec8f1493 Catalin(ux) M. BOIE 2021-11-14 06:15:00
spec: Added 'Replaces: rocketgit' to easy upgrade, fixed fixfiles c380f40fe86ddf70b99030a6f0be93d91137b909 Catalin(ux) M. BOIE 2021-11-14 06:14:25
Fixed non debug case of rg_debug_html 523f6784671e5f810b8435ad66ad21ea548219d8 Catalin(ux) M. BOIE 2021-11-14 05:58:37
Fix rate limit types 0de3ee35d0d0e46521d64a596232765fb5d618a3 Catalin(ux) M. BOIE 2021-11-14 05:58:03
Commit 7bc12d7ee158d99979dbb91f293162472917a2e2 - Misc small fixes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2022-02-16 18:58
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2022-02-16 18:58
Parent(s): 3786d759107c4028f181c7de77d39382d9f572bf
Signer:
Signing key:
Signing status: N
Tree: c53a58e5e580c02f160fee317d17714783fa2109
File Lines added Lines deleted
inc/repo.inc.php 17 0
inc/stats.inc.php 4 3
inc/user/repo-page.php 1 1
root/index.php 9 6
scripts/builder.php 3 2
File inc/repo.inc.php changed (mode: 100644) (index 8a47e7f..16f886b)
... ... function rg_repo_ref_canon($ref)
344 344 return $ref; return $ref;
345 345 } }
346 346
347 /*
348 * Compare function for repo names
349 */
350 function rg_repo_compare_names($a, $b)
351 {
352 if (empty($a))
353 return TRUE;
354
355 $qmisc = str_replace('`', '', $a);
356 $ret = preg_match('`^' . $qmisc . '`uD', $b);
357 rg_log('repo_compare_names: ret=' . $ret . ' a=' . $a . ' b=' . $b
358 . ' [qmisc=' . $qmisc . '] => '
359 . ($ret === 1 ? 'match' : 'no match'));
360
361 return $ret === 1;
362 }
363
347 364 /* /*
348 365 * Compare function for refs * Compare function for refs
349 366 */ */
File inc/stats.inc.php changed (mode: 100644) (index df091b6..05cce28)
... ... function rg_stats_conns_insert($db)
124 124 'login_uid' => 0, 'login_uid' => 0,
125 125 'repo_id' => 0, 'repo_id' => 0,
126 126 'bytes_in' => 0, 'bytes_in' => 0,
127 'bytes_out' => 0
127 'bytes_out' => 0,
128 'flags' => ''
128 129 ); );
129 130 foreach ($list as $k => $v) foreach ($list as $k => $v)
130 131 if (!isset($rg_stats_conns_paras[$k])) if (!isset($rg_stats_conns_paras[$k]))
 
... ... function rg_stats_conns_insert($db)
138 139
139 140 $sql = 'INSERT INTO conns_' . gmdate('Y_m', $rg_stats_conns_paras['start']) $sql = 'INSERT INTO conns_' . gmdate('Y_m', $rg_stats_conns_paras['start'])
140 141 . ' (type, uid, login_uid, repo_id, itime, ip, url' . ' (type, uid, login_uid, repo_id, itime, ip, url'
141 . ', referer, elap, ua, cmd, bytes_in, bytes_out)'
142 . ', referer, elap, ua, cmd, bytes_in, bytes_out, flags)'
142 143 . ' VALUES (@@type@@, @@uid@@, @@login_uid@@' . ' VALUES (@@type@@, @@uid@@, @@login_uid@@'
143 144 . ', @@repo_id@@, @@start@@, @@ip@@, @@url@@' . ', @@repo_id@@, @@start@@, @@ip@@, @@url@@'
144 145 . ', @@referer@@, @@elap@@, @@ua@@, @@cmd@@' . ', @@referer@@, @@elap@@, @@ua@@, @@cmd@@'
145 . ', @@bytes_in@@, @@bytes_out@@)';
146 . ', @@bytes_in@@, @@bytes_out@@, @@flags@@)';
146 147 $res = rg_sql_query_params($db, $sql, $rg_stats_conns_paras); $res = rg_sql_query_params($db, $sql, $rg_stats_conns_paras);
147 148 if ($res == FALSE) { if ($res == FALSE) {
148 149 rg_internal_error('cannot insert conns: ' . rg_sql_error()); rg_internal_error('cannot insert conns: ' . rg_sql_error());
File inc/user/repo-page.php changed (mode: 100644) (index 6f3155c..d1b1db3)
... ... $_subop = empty($paras) ? "history" : array_shift($paras);
359 359 if (strcmp($_subop, "history") == 0) { if (strcmp($_subop, "history") == 0) {
360 360 rg_add_clone_hints($db, $rg, ''); rg_add_clone_hints($db, $rg, '');
361 361
362 $time_limit = $rg['ri']['itime'];
362 $time_limit = max($rg['ri']['itime'], time() - 30 * 24 * 3600);
363 363 $hist = rg_repo_history_load($db, $rg['ri']['repo_id'], 0, 20, $time_limit); $hist = rg_repo_history_load($db, $rg['ri']['repo_id'], 0, 20, $time_limit);
364 364 if ($hist === FALSE) if ($hist === FALSE)
365 365 $_repo_body .= rg_warning("Cannot load history. Try again later."); $_repo_body .= rg_warning("Cannot load history. Try again later.");
File root/index.php changed (mode: 100644) (index 6f170f0..e8f7d83)
... ... if ($r === FALSE) {
129 129 rg_debug_set(rg_state_get($db, 'debug')); rg_debug_set(rg_state_get($db, 'debug'));
130 130
131 131 $lim = rg_rate_limit($db); $lim = rg_rate_limit($db);
132 if (($lim == 0) && (rg_debug() == 0)) {
133 rg_log('Too many requests');
134 header($rg['proto'] . ' 429 Too many requests (lim)');
135 echo 'Too many requests. Please slow down.' . "\n";
136 exit(0);
137 } else if ($lim > 0)
132 if ($lim == 0) {
133 if (rg_debug() == 0) {
134 rg_log('Too many requests');
135 header($rg['proto'] . ' 429 Too many requests (lim)');
136 echo 'Too many requests. Please slow down.' . "\n";
137 exit(0);
138 }
139 } else if ($lim > 0) {
138 140 header('X-RocketGit-Limit-Left: ' . $lim); header('X-RocketGit-Limit-Left: ' . $lim);
141 }
139 142
140 143 // Sets http(s)_allow and hostname // Sets http(s)_allow and hostname
141 144 $hostname = rg_state_get($db, 'hostname'); $hostname = rg_state_get($db, 'hostname');
File scripts/builder.php changed (mode: 100644) (index f7db50c..0bb846c)
... ... function xnew($key, $arg)
59 59 { {
60 60 global $rg_conns; global $rg_conns;
61 61 global $features; global $features;
62 global $workers;
63
64 $workers++;
62 65
63 66 $s = &$rg_conns[$key]; $s = &$rg_conns[$key];
64 67 $s['func_data'] = 'xdispatch'; $s['func_data'] = 'xdispatch';
 
... ... function xdispatch_one($key, $data)
167 170 global $jobs; global $jobs;
168 171 global $features; global $features;
169 172 global $state_dir; global $state_dir;
170 global $workers;
171 173
172 174 $now = time(); $now = time();
173 175 $s = &$rg_conns[$key]; $s = &$rg_conns[$key];
 
... ... function xdispatch_one($key, $data)
287 289 } }
288 290
289 291 rg_log($key . ': peer [' . $u['name'] . '] announce processed.'); rg_log($key . ': peer [' . $u['name'] . '] announce processed.');
290 $workers++;
291 292 break; break;
292 293 } }
293 294
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/rocketgit

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

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

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 main