List of commits:
Subject Hash Author Date (UTC)
Now, any script can update the structure and apply the fixes 03e1ba61bdcac0514977b79c0b38449db29aa7a5 Catalin(ux) M. BOIE 2016-10-03 16:05:19
fpm: raise the memory limit to 128M from 32M because some initial commits may be very big 5dee24337e21e740cba1080e9bfc376b2e8f2036 Catalin(ux) M. BOIE 2016-10-02 08:06:39
Compute the md5 key only when needed 4eebe2a3863ca6b50e107ad84080629da6d81707 Catalin(ux) M. BOIE 2016-10-02 07:56:52
Pass all parameters to worker.php to be able to choose a different configuration 4da8c1c26b9bd192fa4525f3168cce2fa421702c root 2016-09-29 18:18:40
Prefer https over ssh 3dfed205de47850d459106b2479484d83fdcbca8 Catalin(ux) M. BOIE 2016-09-28 02:23:44
Bump version to 0.60 fc13b029f14be5989df314e4adec67c78cc06b6d Catalin(ux) M. BOIE 2016-09-27 15:28:56
We cannot store directly in /var/lib/rocketgit because is owned by root 0e3d2207e951db3c42d65784a2fe1b79e335cd71 Catalin(ux) M. BOIE 2016-09-27 03:04:55
SELinux: more fixes to start rocketgit-fpm without AVC errors bbae4970f9972bdd37199dcf67beceef5f43aa36 Catalin(ux) M. BOIE 2016-09-26 20:49:07
Bump version to 0.58 32c5bf42c158ef5864094a75284115693fe72c03 Catalin(ux) M. BOIE 2016-09-26 15:34:10
Adjust goal and talk about CLA 842c8e45c2f53d7cbf6db3ff9549b52034a0ccef Catalin(ux) M. BOIE 2016-09-26 02:59:47
Rewrap of text dca9405b83ca52d20c92a4d908a656d43bbaa06e Catalin(ux) M. BOIE 2016-09-26 02:46:05
SELinux: no need for rocketgit-log folder; allow httpd server to write log files eef3699ae6563e7b7ea30b9e688f498e38543529 Catalin(ux) M. BOIE 2016-09-25 20:28:52
worker fixes for when admin edits workers f54af2c20ebd4df3b3424cab2e0bfb80aa8bafe6 Catalin(ux) M. BOIE 2016-09-25 20:26:08
Corrected typos and made clear some comments/hints ab0c22fb84e13b9699b45ca8bc8181dd15f7a4a5 Catalin(ux) M. BOIE 2016-09-25 20:23:59
Do not show the query in the error message in plan.inc.php feee2b816a64c9032e2fc9c37bb1a8216d43bc62 Catalin(ux) M. BOIE 2016-09-25 20:23:04
Renamed systemd.service to rocketgit-fpm.service e24cc46ce59727f6acccb674e4ab53430a877171 Catalin(ux) M. BOIE 2016-09-25 20:21:35
.spec file fixes: use %{_unitdir} instead of @USR@/lib and systemd dependency f39aea08f7b63aae84b3bc4f68bc8995f06e52e9 Catalin(ux) M. BOIE 2016-09-21 18:45:27
Fix duilder: forgot to replace @USR@ d2d4920111d02c35944e15da642728a4b695c9ff Catalin(ux) M. BOIE 2016-09-21 17:56:15
Bump version to 0.57 b8be77c83936b5083d004f380ec0366d5562342e Catalin(ux) M. BOIE 2016-09-21 17:26:09
In features, add something about Affero ee43843c67c6d495a545773d87ed5c002b99483f Catalin(ux) M. BOIE 2016-09-21 17:12:06
Commit 03e1ba61bdcac0514977b79c0b38449db29aa7a5 - Now, any script can update the structure and apply the fixes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-10-03 16:05
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-10-03 16:05
Parent(s): 5dee24337e21e740cba1080e9bfc376b2e8f2036
Signing key:
Tree: 521708b2b9e5ccf75d48ad0e24126135fb71f7c6
File Lines added Lines deleted
inc/cache.inc.php 0 1
inc/struct.inc.php 40 0
root/index.php 2 21
scripts/builder.php 1 8
scripts/cron.php 1 22
scripts/events.php 1 4
scripts/remote.php 1 4
File inc/cache.inc.php changed (mode: 100644) (index 33c3944..04f1310)
3 3 // memcache alike daemon // memcache alike daemon
4 4 // //
5 5 require_once($INC . "/util.inc.php"); require_once($INC . "/util.inc.php");
6 require_once($INC . "/sql.inc.php");
7 6 require_once($INC . "/prof.inc.php"); require_once($INC . "/prof.inc.php");
8 7
9 8 // Client side can disable the cache for various reasons (unit testing etc.) // Client side can disable the cache for various reasons (unit testing etc.)
File inc/struct.inc.php changed (mode: 100644) (index 78a09f1..bf940b6)
... ... function rg_sql_struct_slaves_update($db)
878 878 return $ret; return $ret;
879 879 } }
880 880
881 /*
882 * Helper that will setup the structure and the fixes if needed
883 */
884 function rg_struct_ok($db)
885 {
886 $ret = FALSE;
887 while (1) {
888 $restart_cache = FALSE;
889
890 if (rg_sql_struct_update_needed($db) == 1) {
891 $r = rg_sql_struct_update($db, 0);
892 if ($r !== TRUE)
893 break;
894 $restart_cache = TRUE;
895 }
896
897 if (rg_fixes_needed($db) == 1) {
898 $r = rg_fixes_update($db);
899 if ($r !== TRUE)
900 break;
901 $restart_cache = TRUE;
902 }
903
904 if ($restart_cache)
905 rg_cache_restart();
906
907 $install_id = rg_state_get($db, 'install_id');
908 if ($install_id === FALSE)
909 break;
910 if (empty($install_id))
911 rg_state_set($db, 'install_id',
912 sha512(microtime(TRUE)));
913
914 $ret = TRUE;
915 break;
916 }
917
918 return $ret;
919 }
920
881 921 ?> ?>
File root/index.php changed (mode: 100644) (index 76863ed..75628b8)
... ... rg_log_ml('_SERVER: ' . print_r($_SERVER, TRUE));
98 98 $rg['ct'] = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : ''; $rg['ct'] = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '';
99 99
100 100
101 $good = 0;
102 $tries = 10;
103 while ($tries > 0) {
104 $r = rg_sql_struct_update_needed($db);
105 if ($r === 0) {
106 $r = rg_fixes_needed($db);
107 if ($r === 0) {
108 $good = 1;
109 break;
110 } else {
111 rg_log("Fixes needed (r=$r)");
112 }
113 } else {
114 rg_log("db struct update needed (r=$r)");
115 }
116
117 rg_log("Schema/fixes is not up-to-date! Sleep 1 second...");
118 $tries--;
119 sleep(1);
120 }
121 if ($good == 0) {
101 $r = rg_struct_ok($db);
102 if ($r === FALSE) {
122 103 echo "Internal error; please try again later."; echo "Internal error; please try again later.";
123 104 exit(0); exit(0);
124 105 } }
File scripts/builder.php changed (mode: 100644) (index 801f27a..7714591)
... ... if ($db === FALSE) {
325 325 exit(1); exit(1);
326 326 } }
327 327
328 if (rg_sql_struct_update_needed($db) !== 0) {
329 rg_log('Update needed. Exit.');
328 if (rg_struct_ok($db) === FALSE)
330 329 exit(0); exit(0);
331 }
332
333 if (rg_fixes_needed($db) !== 0) {
334 rg_log('Fixes needed. Exit.');
335 exit(0);
336 }
337 330
338 331 // Prepare socket // Prepare socket
339 332 $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
File scripts/cron.php changed (mode: 100644) (index 93281e6..07df3f2)
... ... if ($db === FALSE) {
42 42 exit(1); exit(1);
43 43 } }
44 44
45 $restart_cache = FALSE;
46 if (rg_sql_struct_update_needed($db) == 1) {
47 $r = rg_sql_struct_update($db, 0);
48 if ($r !== TRUE)
49 exit(1);
50 $restart_cache = TRUE;
51 }
52
53 if (rg_fixes_needed($db) == 1) {
54 $r = rg_fixes_update($db);
55 if ($r !== TRUE)
56 exit(1);
57 $restart_cache = TRUE;
58 }
59
60 if ($restart_cache)
61 rg_cache_restart();
62
63 $install_id = rg_state_get($db, "install_id");
64 if ($install_id === FALSE)
45 if (rg_struct_ok($db) === FALSE)
65 46 exit(1); exit(1);
66 if (empty($install_id))
67 rg_state_set($db, "install_id", sha512(microtime(TRUE)));
68 47
69 48 $first_install = rg_state_get($db, 'first_install'); $first_install = rg_state_get($db, 'first_install');
70 49 if ($first_install === FALSE) if ($first_install === FALSE)
File scripts/events.php changed (mode: 100644) (index 939f33b..00241a4)
... ... if ($db === FALSE) {
68 68 exit(1); exit(1);
69 69 } }
70 70
71 if (rg_sql_struct_update_needed($db) !== 0)
72 exit(0);
73
74 if (rg_fixes_needed($db) !== 0)
71 if (rg_struct_ok($db) === FALSE)
75 72 exit(0); exit(0);
76 73
77 74 // Remove the socket, else we will get error // Remove the socket, else we will get error
File scripts/remote.php changed (mode: 100644) (index 5ac629c..1d64022)
... ... $db = rg_sql_open($rg_sql);
66 66 if ($db === FALSE) if ($db === FALSE)
67 67 fatal("Internal error (db)!"); fatal("Internal error (db)!");
68 68
69 if (rg_sql_struct_update_needed($db) !== 0)
70 fatal("We are in a short maintenance window. Try again later.");
71
72 if (rg_fixes_needed($db) !== 0)
69 if (rg_struct_ok($db) === FALSE)
73 70 fatal("We are in a short maintenance window. Try again later."); fatal("We are in a short maintenance window. Try again later.");
74 71
75 72 if (isset($_SERVER['SSH_CONNECTION'])) { if (isset($_SERVER['SSH_CONNECTION'])) {
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