List of commits:
Subject Hash Author Date (UTC)
Collation + block Facebook and OpenAI 43caacb3a908f6b7ffed15688b5d91fc3c004728 Catalin(ux) M. BOIE 2024-10-26 08:08:27
Debian changelog 55542035e461b712b7fd80404ef8a4c02956b1e9 Catalin(ux) M. BOIE 2024-06-07 20:42:31
Builder and worker fixes. ab54e53e1e9c202ce0bda4faa2646e6215de913d Catalin(ux) M. BOIE 2024-06-07 19:58:33
Cosmetic 87887c5717140cb4af477e8662858fd5412a3dd3 Catalin(ux) M. BOIE 2024-06-05 06:53:47
cache locking + show gpg signer b37d36501abd958894686c643985f218470ca988 Catalin(ux) M. BOIE 2024-06-05 06:08:08
Cosmetic 1d638cee22854ab2f98ae3a72afd34ea337c101a Catalin(ux) M. BOIE 2024-06-05 06:06:33
Mostly cosmetic 427e7056c6593359b68317c071d175cc38b1705d Catalin(ux) M. BOIE 2023-12-17 12:01:17
readme rendering: everything not makrdown is treated as text d7c1a9e039e3b7945682ee2e13745cd0d4ad446a Catalin(ux) M. BOIE 2023-06-22 03:40:21
Really bumbed version to 0.78 223d494efb0cc012c72fe8898e2800ce15e4eaf7 Catalin(ux) M. BOIE 2023-06-15 20:36:31
Make rgfs more verbose in case of errors 197c21765870fa6b95bb08c8599de9decf3980eb Catalin(ux) M. BOIE 2023-06-15 20:33:18
Cosmetic d48682ffe54991deedd4989a100a0607cafefab8 Catalin(ux) M. BOIE 2023-06-14 17:11:03
Fixed delete account op 4157f88a19d1b24934743d0193755a6dc3f98c13 Catalin(ux) M. BOIE 2023-06-14 17:10:22
Render readme files on the project page a8c09adb1bceed31f8070386158561b06470a98f Catalin(ux) M. BOIE 2023-06-14 17:09:17
Added rg_sid global variable to simplify the function calling 0047908fcd2ed0302a826487ddd15ca2579a9a83 Catalin(ux) M. BOIE 2023-06-14 17:06:39
Removed delta support for rpms because Fedora will remove it 2c26be90f4bc08a06ab03ab016e9ccaa843780e5 Catalin(ux) M. BOIE 2023-05-03 05:04:40
Added first payments option; fixes all around 7102aed9f239d529723799171553e8c4bd018440 Catalin(ux) M. BOIE 2023-05-02 22:36:28
Fixed a nasty typo in the build system; doc update; cosmetic 1934732b297d6476be7954fabdcaf9eb87678f5e Catalin(ux) M. BOIE 2022-12-21 12:51:53
Send client features to the builder dcf648353662409b9e39a422228ddb6a7c43358c Catalin(ux) M. BOIE 2022-12-21 11:10:00
Add support for SHA-256 git repos 8b88927d353c7b588909d0b1220c8922b32129c0 Catalin(ux) M. BOIE 2022-12-21 11:03:19
Look-up pkg_repo using pkg_repo uid f2b188b8cb151c376d8ee8c81f8e82c02ed93cd1 Catalin(ux) M. BOIE 2022-12-12 05:29:13
Commit 43caacb3a908f6b7ffed15688b5d91fc3c004728 - Collation + block Facebook and OpenAI
Author: Catalin(ux) M. BOIE
Author date (UTC): 2024-10-26 08:08
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2024-10-26 08:08
Parent(s): 55542035e461b712b7fd80404ef8a4c02956b1e9
Signer:
Signing key:
Signing status: N
Tree: 057fa58750b1d268246bade3aa6bd98fa4e77e16
File Lines added Lines deleted
History.txt 7 0
TODO 16 0
inc/struct.inc.php 50 1
inc/user/repo-page.php 4 2
inc/util.inc.php 11 2
root/index.php 7 1
samples/nginx.conf 1 1
File History.txt changed (mode: 100644) (index b0c3a58..21cf5c7)
31 31 2022-11-17 - Trimble donated a HP server for the RocketGit project (Embedromix) 2022-11-17 - Trimble donated a HP server for the RocketGit project (Embedromix)
32 32 2023-05-02 - RocketGit 0.77 released. 2023-05-02 - RocketGit 0.77 released.
33 33 2023-06-15 - RocketGit 0.78 released. 2023-06-15 - RocketGit 0.78 released.
34 2024-06-08 - RocketGit 0.79 released
35 2024-06-10 - rocketgit.com upgraded to Fedora 39 and rocketgit 0.79
36 2024-06-10 - rocketgit.com upgraded to Fedora 40
37 2024-06-17 - rocketgit.com moved to another (faster) Hetzner server (rg3)
38 2024-10-25 - The second NVMe crashed and was replaced by Hetzner. Now:
39 nvme1n1 S675NF0WC78074 SAMSUNG MZVL2512HCJQ-00B00 GXA7801Q
40 nvme0n1 S675NF0X355407 SAMSUNG MZVL2512HCJQ-00B00 GXA7801Q
34 41
File TODO changed (mode: 100644) (index 544a072..e7857b2)
22 22 [ ] [ ]
23 23
24 24 == next release == == next release ==
25 [ ] Set fillfactor for table which changes a lot (keys, events, build_jobs etc.)
26 [ ] Add a test with an empty folder.
27 [ ] Double message:
28 Sending (info): you are connecting as user
29 Sending (info): you are connecting as user
30 [ ] Add to comparison the push options?
25 31 [ ] Add in comparison stuff about AI and an extra license for the operator. [ ] Add in comparison stuff about AI and an extra license for the operator.
26 32 [ ] Add in comparison where (country) they are hosted. [ ] Add in comparison where (country) they are hosted.
27 33 [ ] Anybody with a build can dirty pkg_subrepos? It should not happen. [ ] Anybody with a build can dirty pkg_subrepos? It should not happen.
 
78 84 [ ] [ ]
79 85
80 86 == Next next release == == Next next release ==
87 [ ] Pass pkg repo info inside the build process to allow building optimized
88 packages for some architectures.
89 [ ] Table apikeys has no index on 'key'. Should it?
90 [ ] Table commit_label has no index. Should it?
91 [ ] Make compression level configurable.
92 [ ] Support other compression algos (broli, xz, zstd).
93 [ ] https://rocketgit.com/user/catalinux/rocketgit/pkg
94 Development distributions and latest major version should not be collapsed.
95 [ ] https://rocketgit.com/user/catalinux/rocketgit/pkg
96 Fedora 34 comes between 35 and 36 - are not sorted correctly.
81 97 [ ] Allow use of 'LATEST' instead of '40' in environment. [ ] Allow use of 'LATEST' instead of '40' in environment.
82 98 Example: fedora-LATEST-x86_64. What about rawhide? Example: fedora-LATEST-x86_64. What about rawhide?
83 99 Maybe use 'LATEST_STABLE'? Maybe use 'LATEST_STABLE'?
File inc/struct.inc.php changed (mode: 100644) (index 6d986b0..364f0e0)
... ... $rg_sql_struct[36]['tables'] = array(
482 482 . ", uid INT NOT NULL DEFAULT 0)" . ", uid INT NOT NULL DEFAULT 0)"
483 483 ); );
484 484 $rg_sql_struct[36]['other'] = array( $rg_sql_struct[36]['other'] = array(
485 'users drop double unique constriaint' =>
485 'users drop double unique constraint' =>
486 486 "ALTER TABLE users DROP CONSTRAINT users_username_key", "ALTER TABLE users DROP CONSTRAINT users_username_key",
487 487 'last_cmd' => 'last_cmd' =>
488 488 "ALTER TABLE keys ADD last_cmd TEXT NOT NULL DEFAULT ''", "ALTER TABLE keys ADD last_cmd TEXT NOT NULL DEFAULT ''",
 
... ... $rg_sql_struct_parts['payments_history'] = array();
787 787 // Here 0.77 was released // Here 0.77 was released
788 788 // Here 0.78 was released // Here 0.78 was released
789 789 // Here 0.79 was released // Here 0.79 was released
790 $rg_sql_struct[51]['tables'] = array();
791 $rg_sql_struct[51]['other'] = array(
792 'collate keys.fingerprint_sha256' => 'ALTER TABLE keys ALTER COLUMN fingerprint_sha256 SET DATA TYPE TEXT COLLATE "C"',
793 'collate keys.fingerprint_sha256 i' => 'REINDEX INDEX keys_i_fingerprint_sha256',
794 'collate state.var' => 'ALTER TABLE state ALTER COLUMN var SET DATA TYPE TEXT COLLATE "C"',
795 'collate state.var i' => 'REINDEX INDEX state_pkey',
796 'collate sess.sid' => 'ALTER TABLE sess ALTER COLUMN sid SET DATA TYPE TEXT COLLATE "C"',
797 'collate sess.sid i' => 'REINDEX INDEX sess_pkey',
798 'collate sess.sid' => 'ALTER TABLE sess ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
799 'collate forgot_pass.token' => 'ALTER TABLE forgot_pass ALTER COLUMN token SET DATA TYPE TEXT COLLATE "C"',
800 'collate forgot_pass.token i' => 'REINDEX INDEX forgot_pass_pkey',
801 'collate tokens.token' => 'ALTER TABLE tokens ALTER COLUMN token SET DATA TYPE TEXT COLLATE "C"',
802 'collate tokens.token i' => 'REINDEX INDEX tokens_pkey',
803 'collate merge_requests.namespace' => 'ALTER TABLE merge_requests ALTER COLUMN namespace SET DATA TYPE TEXT COLLATE "C"',
804 'collate merge_requests.ip' => 'ALTER TABLE merge_requests ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
805 'collate bugs.ip' => 'ALTER TABLE bugs ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
806 'collate bug_notes.ip' => 'ALTER TABLE bug_notes ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
807 'collate rights.ip' => 'ALTER TABLE rights ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
808 'collate login_tokens.secret' => 'ALTER TABLE login_tokens ALTER COLUMN secret SET DATA TYPE TEXT COLLATE "C"',
809 'collate login_tokens.ip' => 'ALTER TABLE login_tokens ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
810 'collate login_tokens_ip.ip' => 'ALTER TABLE login_tokens_ip ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
811 'collate scratch_codes.sc' => 'ALTER TABLE scratch_codes ALTER COLUMN sc SET DATA TYPE TEXT COLLATE "C"',
812 'collate webhooks.htype' => 'ALTER TABLE webhooks ALTER COLUMN htype SET DATA TYPE TEXT COLLATE "C"',
813 'collate webhooks.flags' => 'ALTER TABLE webhooks ALTER COLUMN flags SET DATA TYPE TEXT COLLATE "C"',
814 'collate webhooks.hsubtype' => 'ALTER TABLE webhooks ALTER COLUMN hsubtype SET DATA TYPE TEXT COLLATE "C"',
815 'collate apikeys.key' => 'ALTER TABLE apikeys ALTER COLUMN key SET DATA TYPE TEXT COLLATE "C"',
816 'collate workers.key' => 'ALTER TABLE workers ALTER COLUMN key SET DATA TYPE TEXT COLLATE "C"',
817 'collate workers.fingerprint_sha256' => 'ALTER TABLE workers ALTER COLUMN fingerprint_sha256 SET DATA TYPE TEXT COLLATE "C"',
818 'collate workers.fingerprint_sha256 i' => 'REINDEX INDEX workers_i_fingerprint_sha256',
819 'collate conns.type' => 'ALTER TABLE conns ALTER COLUMN type SET DATA TYPE TEXT COLLATE "C"',
820 'collate conns.ip' => 'ALTER TABLE conns ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
821 'collate conns.flags' => 'ALTER TABLE conns ALTER COLUMN ip SET DATA TYPE TEXT COLLATE "C"',
822 'collate pkg_repos.flags' => 'ALTER TABLE pkg_repos ALTER COLUMN flags SET DATA TYPE TEXT COLLATE "C"',
823 'collate pkg_repos.rgfs_key' => 'ALTER TABLE pkg_repos ALTER COLUMN rgfs_key SET DATA TYPE TEXT COLLATE "C"',
824 'collate pkg_maps.flags' => 'ALTER TABLE pkg_maps ALTER COLUMN flags SET DATA TYPE TEXT COLLATE "C"',
825 'collate payments.id' => 'ALTER TABLE payments ALTER COLUMN id SET DATA TYPE CHAR(16) COLLATE "C"',
826 'collate payments.id i' => 'REINDEX INDEX payments_pkey',
827 'collate payments.state' => 'ALTER TABLE payments ALTER COLUMN state SET DATA TYPE TEXT COLLATE "C"',
828 'collate payments.type' => 'ALTER TABLE payments ALTER COLUMN type SET DATA TYPE TEXT COLLATE "C"',
829 'collate payments.type_extra' => 'ALTER TABLE payments ALTER COLUMN type_extra SET DATA TYPE TEXT COLLATE "C"',
830 'collate payments.operator' => 'ALTER TABLE payments ALTER COLUMN operator SET DATA TYPE TEXT COLLATE "C"',
831 'collate payments.order_id' => 'ALTER TABLE payments ALTER COLUMN order_id SET DATA TYPE TEXT COLLATE "C"',
832 'collate payments_history.pay_id' => 'ALTER TABLE payments_history ALTER COLUMN pay_id SET DATA TYPE CHAR(16) COLLATE "C"',
833 'ff keys table' => 'ALTER TABLE keys SET (FILLFACTOR = 95)',
834 'ff keys index key_id' => 'ALTER INDEX keys_pkey SET (FILLFACTOR = 95)',
835 'ff keys vacuum' => 'VACUUM FULL keys'
836 );
837
838 // Here 0.80 was released
790 839
791 840 // Do not forget to add the new created tables to statistics. // Do not forget to add the new created tables to statistics.
792 841 // See rg_conns_data etc. // See rg_conns_data etc.
File inc/user/repo-page.php changed (mode: 100644) (index a4d2de8..58742cd)
... ... if (strcmp($_subop, "history") == 0) {
362 362 rg_add_clone_hints($db, $rg, ''); rg_add_clone_hints($db, $rg, '');
363 363
364 364 $time_limit = max($rg['ri']['itime'], time() - 30 * 24 * 3600); $time_limit = max($rg['ri']['itime'], time() - 30 * 24 * 3600);
365 $hist = rg_repo_history_load($db, $rg['ri']['repo_id'], 0, 20, $time_limit);
365 $hist = rg_repo_history_load($db, $rg['ri']['repo_id'],
366 0, 20, $time_limit);
366 367 if ($hist === FALSE) if ($hist === FALSE)
367 368 $_repo_body .= rg_warning("Cannot load history. Try again later."); $_repo_body .= rg_warning("Cannot load history. Try again later.");
368 369 else else
369 370 $_repo_body .= rg_template_table("repo/history", $hist, $rg); $_repo_body .= rg_template_table("repo/history", $hist, $rg);
370 371
371 $_repo_body .= rg_repo_show_readme($rg, 'HEAD', '.' /*path*/);
372 $_repo_body .= rg_repo_show_readme($rg,
373 $rg['ri']['main_branch'], '.' /*path*/);
372 374 } else if (strcmp($_subop, "admin") == 0) { } else if (strcmp($_subop, "admin") == 0) {
373 375 $_repo_body .= rg_repo_admin($db, $rg, $paras); $_repo_body .= rg_repo_admin($db, $rg, $paras);
374 376 } else if (strcmp($_subop, "source") == 0) { } else if (strcmp($_subop, "source") == 0) {
File inc/util.inc.php changed (mode: 100644) (index 87fcb90..fc48440)
... ... function rg_serialize($a)
2833 2833 } }
2834 2834
2835 2835 /* /*
2836 * Compress data for web
2836 * Compress data for web (zlib)
2837 2837 */ */
2838 2838 function rg_gzencode($c, &$orig_len, &$comp_len) function rg_gzencode($c, &$orig_len, &$comp_len)
2839 2839 { {
2840 2840 rg_prof_start('gzencode'); rg_prof_start('gzencode');
2841 2841 $orig_len = strlen($c); $orig_len = strlen($c);
2842 2842
2843 $ret = @gzencode($c, 6);
2843 $ret = @gzencode($c, 9);
2844 2844 if ($ret === FALSE) if ($ret === FALSE)
2845 2845 rg_fatal('cannot gzencode'); rg_fatal('cannot gzencode');
2846 2846
 
... ... function rg_save($file, $a)
2969 2969 return rg_save_plain($file, rg_serialize($a)); return rg_save_plain($file, rg_serialize($a));
2970 2970 } }
2971 2971
2972 function rg_is_abuser(string $ua)
2973 {
2974 if (stristr($ua, 'facebookexternalhit/')) return TRUE;
2975 if (stristr($ua, 'gptbot/')) return TRUE;
2976
2977 return FALSE;
2978 }
2979
2972 2980 /* /*
2973 2981 * Returns TRUE if we detect that the User-Agent seems a bot * Returns TRUE if we detect that the User-Agent seems a bot
2974 2982 */ */
 
... ... function rg_is_bot($ua)
3027 3035 if (strstr($ua, ' Mail.RU_Bot')) return TRUE; if (strstr($ua, ' Mail.RU_Bot')) return TRUE;
3028 3036 if (strstr($ua, ' MauiBot ')) return TRUE; if (strstr($ua, ' MauiBot ')) return TRUE;
3029 3037 if (strstr($ua, ' MegaIndex.ru/')) return TRUE; if (strstr($ua, ' MegaIndex.ru/')) return TRUE;
3038 if (strstr($ua, 'meta-externalagent/')) return TRUE;
3030 3039 if (strstr($ua, ' MJ12bot')) return TRUE; if (strstr($ua, ' MJ12bot')) return TRUE;
3031 3040 if (strstr($ua, ' MojeekBot')) return TRUE; if (strstr($ua, ' MojeekBot')) return TRUE;
3032 3041 if (strstr($ua, 'msnbot-media/')) return TRUE; if (strstr($ua, 'msnbot-media/')) return TRUE;
File root/index.php changed (mode: 100644) (index 0166d0c..82f17b2)
... ... $user = ""; $repo = ""; $organization = 0; // TODO: those are really used?
88 88
89 89 $rg['proto'] = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : ''; $rg['proto'] = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : '';
90 90 $rg['ua'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; $rg['ua'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
91 if ((rg_load() > 50) && rg_is_bot($rg['ua'])) {
91 if (rg_is_abuser($rg['ua'])) {
92 header($rg['proto'] . ' 429 Too many requests (abuser)');
93 echo 'You violated the ToS and you are blocked now.' . "\n";
94 exit(0);
95 }
96
97 if ((rg_load() > 3) && rg_is_bot($rg['ua'])) {
92 98 header($rg['proto'] . ' 429 Too many requests (bot)'); header($rg['proto'] . ' 429 Too many requests (bot)');
93 99 echo 'Too many requests. Please slow down.' . "\n"; echo 'Too many requests. Please slow down.' . "\n";
94 100 exit(0); exit(0);
File samples/nginx.conf changed (mode: 100644) (index d303065..a18da11)
... ... server {
105 105 ssl_session_tickets off; ssl_session_tickets off;
106 106
107 107 #ssl_stapling on; #ssl_stapling on;
108 #ssl_trusted_certificate /etc/letsencrypt/live/r1.embedromix.ro/chain.pem;
108 #ssl_trusted_certificate /etc/letsencrypt/live/DOMAIN/chain.pem;
109 109 #ssl_stapling_verify on; #ssl_stapling_verify on;
110 110
111 111 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning # https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning
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