File TODO changed (mode: 100644) (index b5ca29e..6364e9c) |
2 |
2 |
[ ] |
[ ] |
3 |
3 |
|
|
4 |
4 |
== BEFORE NEXT RELEASE == |
== BEFORE NEXT RELEASE == |
|
5 |
|
[ ] When rejecting a push because of rights, show also what rule matched. |
|
6 |
|
Maybe why? For example: ip is not in range? |
|
7 |
|
[ ] Discover: I must not say |
|
8 |
|
"No repositories found. Go to My repositories / Create to add one." |
|
9 |
|
It is about the others' repos. |
5 |
10 |
[ ] Why we do not connect to local named socket for postgres?! |
[ ] Why we do not connect to local named socket for postgres?! |
|
11 |
|
Changed, let's see what breaks. |
6 |
12 |
[ ] Comment out "DEBUG list:" line. |
[ ] Comment out "DEBUG list:" line. |
7 |
13 |
[ ] Somehow, test if we use rg_xss_safe if a 'HTML:' var is set. |
[ ] Somehow, test if we use rg_xss_safe if a 'HTML:' var is set. |
8 |
14 |
[ ] ssh: not documented in hints |
[ ] ssh: not documented in hints |
|
13 |
19 |
[ ] Do not show 'webhooks' menu if the login user has no rights. |
[ ] Do not show 'webhooks' menu if the login user has no rights. |
14 |
20 |
This is for when we will allow webhooks per repo. |
This is for when we will allow webhooks per repo. |
15 |
21 |
[ ] Add labels for users and for repos/comments/etc.? [Also] private ones? |
[ ] Add labels for users and for repos/comments/etc.? [Also] private ones? |
16 |
|
[ ] I should add "Labels: " in front of labels. |
|
17 |
22 |
[ ] last events: gravatar |
[ ] last events: gravatar |
18 |
23 |
[ ] last events: 2015-12-27 09:42 n/a Reference refs/heads/master created (290e4f7a70640d79836b3298c47b913484da24de) |
[ ] last events: 2015-12-27 09:42 n/a Reference refs/heads/master created (290e4f7a70640d79836b3298c47b913484da24de) |
19 |
24 |
Why we do not have the user?! Ah, because is anonymous. |
Why we do not have the user?! Ah, because is anonymous. |
File docker/Dockerfile changed (mode: 100644) (index 691e4fb..7ed5eec) |
1 |
1 |
FROM fedora:23 |
FROM fedora:23 |
2 |
2 |
MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> |
MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> |
3 |
3 |
|
|
4 |
|
EXPOSE 80 |
|
5 |
|
EXPOSE 443 |
|
6 |
|
EXPOSE 22 |
|
7 |
|
EXPOSE 9418 |
|
8 |
|
|
|
9 |
4 |
RUN dnf -y upgrade --best --allowerasing |
RUN dnf -y upgrade --best --allowerasing |
10 |
5 |
RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.10-1.noarch.rpm |
RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.10-1.noarch.rpm |
11 |
|
RUN dnf -y install rocketgit |
|
12 |
|
RUN dnf -y install psmisc procps-ng sendmail php-opcache |
|
13 |
|
|
|
|
6 |
|
RUN dnf -y install rocketgit-0.44 |
|
7 |
|
RUN dnf -y install psmisc procps-ng sendmail php-opcache qrencode |
14 |
8 |
|
|
15 |
9 |
COPY rg.sh / |
COPY rg.sh / |
16 |
10 |
|
|
|
... |
... |
RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php-zts.d/10 |
19 |
13 |
RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users |
RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users |
20 |
14 |
RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users |
RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users |
21 |
15 |
|
|
22 |
|
|
|
23 |
16 |
VOLUME /var/lib/rocketgit |
VOLUME /var/lib/rocketgit |
24 |
17 |
VOLUME /home/rocketgit |
VOLUME /home/rocketgit |
25 |
18 |
|
|
|
19 |
|
EXPOSE 80 |
|
20 |
|
EXPOSE 443 |
|
21 |
|
EXPOSE 22 |
|
22 |
|
EXPOSE 9418 |
|
23 |
|
|
26 |
24 |
CMD ["/rg.sh"] |
CMD ["/rg.sh"] |
File docker/README changed (mode: 100644) (index edfef3a..488fa98) |
... |
... |
docker rm rp |
7 |
7 |
|
|
8 |
8 |
docker exec -it rg bash |
docker exec -it rg bash |
9 |
9 |
|
|
|
10 |
|
to debug: |
|
11 |
|
docker run -d -P --name rg --link rp \ |
|
12 |
|
-v /BIG1T/sync1/Dev/rocketgit/inc:/usr/share/rocketgit/inc \ |
|
13 |
|
-v /BIG1T/sync1/Dev/rocketgit/scripts:/usr/share/rocketgit/scripts \ |
|
14 |
|
-v /BIG1T/sync1/Dev/rocketgit/hooks:/usr/share/rocketgit/hooks \ |
|
15 |
|
-v /BIG1T/sync1/Dev/rocketgit/root:/usr/share/rocketgit/root \ |
|
16 |
|
rocketgit |
|
17 |
|
|
|
18 |
|
|
10 |
19 |
== doc == |
== doc == |
11 |
20 |
docker inspect |
docker inspect |
12 |
21 |
docker info |
docker info |
|
... |
... |
docker run -name aaa my_img echo "aaa" |
20 |
29 |
docker stop aaa |
docker stop aaa |
21 |
30 |
docker rm |
docker rm |
22 |
31 |
|
|
|
32 |
|
docker tag image_id docker_user_name/image_name:label_for_example_latest |
|
33 |
|
docker login --username=rocketgit --email=docker@embedromix.ro |
|
34 |
|
docker push rocketgit/rocketgit |
|
35 |
|
|
23 |
36 |
Running an interactive shell: |
Running an interactive shell: |
24 |
37 |
docker run -i -t fedora /bin/bash |
docker run -i -t fedora /bin/bash |
25 |
38 |
docker run --interactive=true --tty=true fedora /bin/bash |
docker run --interactive=true --tty=true fedora /bin/bash |
|
... |
... |
docker kill aaa |
33 |
46 |
docker run -p 4444 |
docker run -p 4444 |
34 |
47 |
docker port $JOB |
docker port $JOB |
35 |
48 |
|
|
|
49 |
|
== compose == |
|
50 |
|
docker-compose up |
|
51 |
|
docker-compse ps |
|
52 |
|
docker-compose run web env |
|
53 |
|
docker-compose stop |
File inc/admin.inc.php changed (mode: 100644) (index bbc97d7..18fd2d9) |
... |
... |
function rg_init($db, $rg) |
232 |
232 |
break; |
break; |
233 |
233 |
} |
} |
234 |
234 |
|
|
|
235 |
|
if (!strstr($rg['init']['email'], '@')) { |
|
236 |
|
$errmsg[] = 'invalid e-mail'; |
|
237 |
|
break; |
|
238 |
|
} |
|
239 |
|
|
235 |
240 |
$r = rg_user_edit($db, $rg['init']); |
$r = rg_user_edit($db, $rg['init']); |
236 |
241 |
if ($r === FALSE) { |
if ($r === FALSE) { |
237 |
242 |
$errmsg[] = rg_user_error(); |
$errmsg[] = rg_user_error(); |
|
... |
... |
function rg_init($db, $rg) |
240 |
245 |
|
|
241 |
246 |
rg_state_set($db, 'first_install', time()); |
rg_state_set($db, 'first_install', time()); |
242 |
247 |
|
|
|
248 |
|
// Makes no sense to confirm the admin account |
|
249 |
|
$rg['rg_account_email_confirm'] = 0; |
|
250 |
|
|
243 |
251 |
$ret .= rg_template('user/create_ok.html', $rg, TRUE /* xss */); |
$ret .= rg_template('user/create_ok.html', $rg, TRUE /* xss */); |
244 |
252 |
$load_form = FALSE; |
$load_form = FALSE; |
245 |
253 |
break; |
break; |
File inc/bug.inc.php changed (mode: 100644) (index db37959..9ae0346) |
... |
... |
function rg_bug_note_list($db, $repo_id, $bug_id, $offset) |
1076 |
1076 |
$ret = array(); |
$ret = array(); |
1077 |
1077 |
while (($row = rg_sql_fetch_array($res))) { |
while (($row = rg_sql_fetch_array($res))) { |
1078 |
1078 |
$row['note_creation'] = gmdate("Y-m-d H:i", $row['itime']) . ' UTC'; |
$row['note_creation'] = gmdate("Y-m-d H:i", $row['itime']) . ' UTC'; |
|
1079 |
|
$row['note_id'] = substr(md5($row['note']), 0, 6); |
1079 |
1080 |
|
|
1080 |
1081 |
$_ui = rg_user_info($db, $row['uid'], "", ""); |
$_ui = rg_user_info($db, $row['uid'], "", ""); |
1081 |
1082 |
if ($_ui['exists'] == 1) { |
if ($_ui['exists'] == 1) { |
1082 |
1083 |
$row['note_owner'] = $_ui['username']; |
$row['note_owner'] = $_ui['username']; |
|
1084 |
|
$row['note_owner_url'] = rg_base_url() . rg_re_userpage($_ui); |
1083 |
1085 |
$row['HTML:note_gravatar'] = $_ui['HTML:gravatar']; |
$row['HTML:note_gravatar'] = $_ui['HTML:gravatar']; |
1084 |
1086 |
} else { |
} else { |
1085 |
1087 |
$row['note_owner'] = "?"; |
$row['note_owner'] = "?"; |
|
1088 |
|
$row['note_owner_url'] = ''; |
1086 |
1089 |
$row['HTML:note_gravatar'] = ''; |
$row['HTML:note_gravatar'] = ''; |
1087 |
1090 |
} |
} |
1088 |
1091 |
|
|
File inc/state.inc.php changed (mode: 100644) (index 1159774..54bfaab) |
... |
... |
function rg_state_set($db, $var, $value) |
102 |
102 |
if (strcmp($old, $value) == 0) |
if (strcmp($old, $value) == 0) |
103 |
103 |
return TRUE; |
return TRUE; |
104 |
104 |
|
|
105 |
|
if ($old === "") { |
|
106 |
|
$sql = "INSERT INTO state (var, value)" |
|
107 |
|
. " VALUES (@@var@@, @@value@@)"; |
|
108 |
|
} else { |
|
109 |
|
$sql = "UPDATE state SET value = @@value@@" |
|
110 |
|
. " WHERE var = @@var@@"; |
|
111 |
|
} |
|
|
105 |
|
$sql = 'UPDATE state SET value = @@value@@' |
|
106 |
|
. ' WHERE var = @@var@@'; |
112 |
107 |
$res = rg_sql_query_params($db, $sql, $params); |
$res = rg_sql_query_params($db, $sql, $params); |
113 |
108 |
if ($res === FALSE) { |
if ($res === FALSE) { |
114 |
|
rg_state_set_error(rg_sql_error()); |
|
|
109 |
|
rg_state_set_error('cannot update var'); |
115 |
110 |
break; |
break; |
116 |
111 |
} |
} |
|
112 |
|
$rows = rg_sql_affected_rows($res); |
117 |
113 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
118 |
114 |
|
|
|
115 |
|
if ($rows == 0) { |
|
116 |
|
$sql = 'INSERT INTO state (var, value)' |
|
117 |
|
. ' VALUES (@@var@@, @@value@@)'; |
|
118 |
|
$res = rg_sql_query_params($db, $sql, $params); |
|
119 |
|
if ($res === FALSE) { |
|
120 |
|
rg_state_set_error('cannot insert into state table'); |
|
121 |
|
break; |
|
122 |
|
} |
|
123 |
|
rg_sql_free_result($res); |
|
124 |
|
} |
|
125 |
|
|
119 |
126 |
rg_cache_set("state::" . $var, $value, RG_SOCKET_NO_WAIT); |
rg_cache_set("state::" . $var, $value, RG_SOCKET_NO_WAIT); |
120 |
127 |
|
|
121 |
128 |
$ret = TRUE; |
$ret = TRUE; |
File inc/webhooks.inc.php changed (mode: 100644) (index cdd66a3..37920bd) |
... |
... |
function rg_wh_list_high_level($db, $rg, $paras) |
40 |
40 |
$rg, TRUE /*xss*/); |
$rg, TRUE /*xss*/); |
41 |
41 |
break; |
break; |
42 |
42 |
} |
} |
|
43 |
|
if (!empty($errmsg)) { |
|
44 |
|
$rg['HTML:errmsg'] = rg_template_errmsg($errmsg); |
|
45 |
|
$ret .= rg_template('user/settings/wh/delete_err.html', |
|
46 |
|
$rg, TRUE /*xss*/); |
|
47 |
|
} |
43 |
48 |
|
|
44 |
49 |
$r = rg_wh_list($db, $rg['login_ui']['uid']); |
$r = rg_wh_list($db, $rg['login_ui']['uid']); |
45 |
50 |
if ($r['ok'] !== 1) { |
if ($r['ok'] !== 1) { |
|
... |
... |
function rg_wh_list_high_level($db, $rg, $paras) |
51 |
56 |
//rg_log_ml('DEBUG: wh_list_high_level: r[list]: ' |
//rg_log_ml('DEBUG: wh_list_high_level: r[list]: ' |
52 |
57 |
// . print_r($r['list'], TRUE)); |
// . print_r($r['list'], TRUE)); |
53 |
58 |
$rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_list'); |
$rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_list'); |
54 |
|
$rg['HTML:errmsg'] = rg_template_errmsg($errmsg); |
|
55 |
59 |
$ret .= rg_template_table('user/settings/wh/list', |
$ret .= rg_template_table('user/settings/wh/list', |
56 |
60 |
$r['list'], $rg); |
$r['list'], $rg); |
57 |
61 |
} |
} |
|
... |
... |
function rg_wh_add_high_level($db, $rg, $paras) |
81 |
85 |
if (isset($paras[0])) { |
if (isset($paras[0])) { |
82 |
86 |
$rg['wh']['id'] = intval($paras[0]); |
$rg['wh']['id'] = intval($paras[0]); |
83 |
87 |
} else { |
} else { |
84 |
|
$rg['wh']['id'] = rg_var_str('wh::id'); |
|
|
88 |
|
$rg['wh']['id'] = rg_var_uint('wh::id'); |
85 |
89 |
|
|
86 |
90 |
if (empty($rg['wh']['htype'])) { |
if (empty($rg['wh']['htype'])) { |
87 |
91 |
$ret .= rg_wh_htypes($rg); |
$ret .= rg_wh_htypes($rg); |
|
... |
... |
function rg_wh_add_high_level($db, $rg, $paras) |
89 |
93 |
} |
} |
90 |
94 |
|
|
91 |
95 |
} |
} |
|
96 |
|
rg_log('DEBUG: wh::id=' . $rg['wh']['id']); |
92 |
97 |
|
|
93 |
98 |
$add = rg_var_uint('add'); |
$add = rg_var_uint('add'); |
94 |
99 |
while ($add == 1) { |
while ($add == 1) { |
|
... |
... |
function rg_wh_add_high_level($db, $rg, $paras) |
97 |
102 |
$rg['wh']['events'] = rg_var_a2s('wh::events'); // TODO |
$rg['wh']['events'] = rg_var_a2s('wh::events'); // TODO |
98 |
103 |
$rg['wh']['url'] = rg_var_str('wh::url'); |
$rg['wh']['url'] = rg_var_str('wh::url'); |
99 |
104 |
$rg['wh']['add_ip'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; |
$rg['wh']['add_ip'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; |
100 |
|
$rg['wh']['description'] = rg_var_str('wh::description'); |
|
|
105 |
|
$rg['wh']['description'] = trim(rg_var_str('wh::description')); |
101 |
106 |
$rg['wh']['opaque'] = rg_var_str('wh::opaque'); |
$rg['wh']['opaque'] = rg_var_str('wh::opaque'); |
102 |
107 |
$rg['wh']['key'] = rg_var_str('wh::key'); |
$rg['wh']['key'] = rg_var_str('wh::key'); |
103 |
108 |
rg_wh_fill_vars($rg); |
rg_wh_fill_vars($rg); |
|
... |
... |
function rg_wh_add_high_level($db, $rg, $paras) |
129 |
134 |
break; |
break; |
130 |
135 |
} |
} |
131 |
136 |
|
|
|
137 |
|
$hints = array(); |
132 |
138 |
if ($show_form) { |
if ($show_form) { |
133 |
139 |
// defaults |
// defaults |
134 |
140 |
if ($add == 0) { |
if ($add == 0) { |
|
... |
... |
function rg_wh_add_high_level($db, $rg, $paras) |
156 |
162 |
|
|
157 |
163 |
rg_wh_add_form($rg); |
rg_wh_add_form($rg); |
158 |
164 |
|
|
159 |
|
$hints = array(); |
|
160 |
|
$hints[]['HTML:hint'] = rg_template('user/settings/wh/hints.html', |
|
|
165 |
|
$hints[]['HTML:hint'] = rg_template('user/settings/wh/hints_htype.html', |
161 |
166 |
$rg, TRUE /*xss*/); |
$rg, TRUE /*xss*/); |
162 |
167 |
rg_wh_fill_hints($rg, $hints); |
rg_wh_fill_hints($rg, $hints); |
163 |
|
$rg['HTML:hints'] = rg_template_table("hints/list", $hints, $rg); |
|
164 |
|
|
|
165 |
168 |
|
|
166 |
169 |
$rg['HTML:errmsg'] = rg_template_errmsg($errmsg); |
$rg['HTML:errmsg'] = rg_template_errmsg($errmsg); |
167 |
170 |
$rg['HTML:check_events'] = rg_wh_check_events($rg['wh']['events']); |
$rg['HTML:check_events'] = rg_wh_check_events($rg['wh']['events']); |
168 |
171 |
$rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_add'); |
$rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_add'); |
169 |
172 |
$ret .= rg_template('user/settings/wh/add_edit.html', |
$ret .= rg_template('user/settings/wh/add_edit.html', |
170 |
173 |
$rg, TRUE /*xss*/); |
$rg, TRUE /*xss*/); |
|
174 |
|
} else { |
|
175 |
|
$hints[]['HTML:hint'] = rg_template('user/settings/wh/hints.html', |
|
176 |
|
$rg, TRUE /*xss*/); |
171 |
177 |
} |
} |
172 |
178 |
|
|
|
179 |
|
$ret .= rg_template_table("hints/list", $hints, $rg); |
|
180 |
|
|
173 |
181 |
rg_log_exit(); |
rg_log_exit(); |
174 |
182 |
rg_prof_end('wh_add_high_level'); |
rg_prof_end('wh_add_high_level'); |
175 |
183 |
return $ret; |
return $ret; |
File root/themes/default/main.css changed (mode: 100644) (index 0dbcb50..8f575d6) |
... |
... |
legend { padding: 0px 2pt; } |
254 |
254 |
border: 1px solid #999998; |
border: 1px solid #999998; |
255 |
255 |
padding: 5pt; |
padding: 5pt; |
256 |
256 |
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
257 |
|
display: flex; |
|
258 |
|
flex-flow: column nowrap; |
|
259 |
257 |
align-self: center; |
align-self: center; |
260 |
258 |
} |
} |
261 |
259 |
|
|
|
... |
... |
legend { padding: 0px 2pt; } |
278 |
276 |
|
|
279 |
277 |
.wh_list {} |
.wh_list {} |
280 |
278 |
|
|
281 |
|
.wh_plugins_list {} |
|
|
279 |
|
.wh_plugins_list { |
|
280 |
|
margin-top: 5pt; |
|
281 |
|
} |
282 |
282 |
|
|
283 |
283 |
.blob_title { |
.blob_title { |
284 |
284 |
font-size: 11pt; |
font-size: 11pt; |
|
... |
... |
legend { padding: 0px 2pt; } |
371 |
371 |
.form_error p { padding-left: 15pt; } |
.form_error p { padding-left: 15pt; } |
372 |
372 |
|
|
373 |
373 |
.labels { padding: 3px 0px; margin: 3px 0px; } |
.labels { padding: 3px 0px; margin: 3px 0px; } |
374 |
|
.labels ul { list-style-type: none; } |
|
|
374 |
|
.labels ul { |
|
375 |
|
list-style-type: none; |
|
376 |
|
display: inline; |
|
377 |
|
} |
375 |
378 |
.labels ul li { |
.labels ul li { |
376 |
379 |
display: inline; |
display: inline; |
377 |
380 |
padding: 3px 3px; |
padding: 3px 3px; |
|
... |
... |
legend { padding: 0px 2pt; } |
458 |
461 |
margin-top: 5px; |
margin-top: 5px; |
459 |
462 |
padding: 5px; |
padding: 5px; |
460 |
463 |
box-shadow: 0px 2px 3px #666666; |
box-shadow: 0px 2px 3px #666666; |
461 |
|
display: flex; |
|
462 |
|
flex-flow: row nowrap; |
|
463 |
|
flex-grow: 0; |
|
|
464 |
|
align-self: flex-start; |
464 |
465 |
} |
} |
465 |
466 |
|
|
466 |
467 |
.error { |
.error { |
File scripts/cron.php changed (mode: 100644) (index db7cc6a..c03d79a) |
... |
... |
error_reporting(E_ALL); |
4 |
4 |
ini_set("track_errors", "On"); |
ini_set("track_errors", "On"); |
5 |
5 |
set_time_limit(0); |
set_time_limit(0); |
6 |
6 |
|
|
7 |
|
$now = time(); |
|
8 |
|
|
|
9 |
7 |
require_once("/etc/rocketgit/config.php"); |
require_once("/etc/rocketgit/config.php"); |
10 |
8 |
|
|
11 |
9 |
$INC = dirname(__FILE__) . "/../inc"; |
$INC = dirname(__FILE__) . "/../inc"; |
|
... |
... |
require_once($INC . "/mr.inc.php"); |
20 |
18 |
require_once($INC . "/admin.inc.php"); |
require_once($INC . "/admin.inc.php"); |
21 |
19 |
require_once($INC . "/ver.php"); |
require_once($INC . "/ver.php"); |
22 |
20 |
|
|
|
21 |
|
$now = time(); |
23 |
22 |
$user = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : "rocketgit"; |
$user = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : "rocketgit"; |
24 |
23 |
|
|
25 |
24 |
if (strcmp($user, "apache") == 0) { |
if (strcmp($user, "apache") == 0) { |