xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit baaa5336810128456e63d5e5a8cb111c81fe162d

Small fixes all over the place
Author: Catalin(ux) M. BOIE
Author date (UTC): 2015-05-05 21:20
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2015-05-05 21:20
Parent(s): beca8b9e01c37c6101f9a61f8ecf8cb744f1bd41
Signing key:
Tree: 6f6d7e704e9f69f6068c984c6bc72528f4a13022
File Lines added Lines deleted
TODO 2 3
inc/repo.inc.php 5 5
root/themes/default/download-vm.html 73 31
root/themes/default/hints/repo/clone_owner.html 1 1
root/themes/default/index.html 1 1
root/themes/default/main.css 1 1
root/themes/default/repo/discover.html 1 1
tests/Makefile 5 1
tests/http_top.php 34 0
File TODO changed (mode: 100644) (index d7510d9..537c0a4)
1 1 == Where I stopped last time == == Where I stopped last time ==
2 [ ] Rebuild virtual machine with the latest rocketgit version.
3
4 2 [ ] VirtualBox instalation [ ] VirtualBox instalation
5 3 - Go to https://www.virtualbox.org/wiki/Downloads, download a proper - Go to https://www.virtualbox.org/wiki/Downloads, download a proper
6 4 executable and install it. executable and install it.
 
14 12 "Settings -> Network -> Adapter 1: Attached to: Host-only Adapter -> OK "Settings -> Network -> Adapter 1: Attached to: Host-only Adapter -> OK
15 13 "Start" "Start"
16 14 login, find out the ip address, go to browser and access it login, find out the ip address, go to browser and access it
17
15 [ ]
18 16
19 17 == BEFORE NEXT RELEASE == == BEFORE NEXT RELEASE ==
18 [ ] User home page link is missing from top bar!
20 19 [ ] Add "Spread the word!" on website. [ ] Add "Spread the word!" on website.
21 20 [ ] Give up on submenu1/2 and integrate them when needed? [ ] Give up on submenu1/2 and integrate them when needed?
22 21 [ ] Is login_ui::homepage used anywhere? [ ] Is login_ui::homepage used anywhere?
File inc/repo.inc.php changed (mode: 100644) (index ec1d64d..c9a7f76)
... ... function rg_repo_list_query($db, $url, $sql, $params)
1063 1063 /* /*
1064 1064 * List repos of page user 'ui'. * List repos of page user 'ui'.
1065 1065 */ */
1066 function rg_repo_list($db, $rg, $url, $ui)
1066 function rg_repo_list($db, $rg, $url, $uid)
1067 1067 { {
1068 rg_log("repo_list: url=$url uid=" . $ui['uid']
1068 rg_log("repo_list: url=$url uid=" . $uid
1069 1069 . " login_uid=" . $rg['login_ui']['uid']); . " login_uid=" . $rg['login_ui']['uid']);
1070 1070
1071 $params = array("uid" => $ui['uid']);
1071 $params = array("uid" => $uid);
1072 1072
1073 1073 $add = ""; $add = "";
1074 if ($ui['uid'] > 0)
1074 if ($uid > 0)
1075 1075 $add = " AND uid = @@uid@@"; $add = " AND uid = @@uid@@";
1076 1076
1077 1077 // TODO: also admin must be able to see them? // TODO: also admin must be able to see them?
1078 1078 if (($rg['login_ui']['uid'] == 0) if (($rg['login_ui']['uid'] == 0)
1079 || ($rg['login_ui']['uid'] != $ui['uid']))
1079 || ($rg['login_ui']['uid'] != $uid))
1080 1080 $add .= " AND public = 1"; $add .= " AND public = 1";
1081 1081
1082 1082 $sql = "SELECT * FROM repos" $sql = "SELECT * FROM repos"
File root/themes/default/download-vm.html changed (mode: 100644) (index dd41aae..e8c67c3)
1 1 <div class="islands"> <div class="islands">
2 2 <div class="main_title">Download - virtual machines</div> <div class="main_title">Download - virtual machines</div>
3 3
4 <a id="qemu"></a>
4 5 <div class="island_row"> <div class="island_row">
5 6 <div class="island_cell"> <div class="island_cell">
6 7 <div class="island"> <div class="island">
 
21 22 </div> </div>
22 23 <br /> <br />
23 24
24 - download libvirt vm description file:<br />
25 - download libvirt vm description file (4 KiB):<br />
25 26 <div class="xcode"> <div class="xcode">
26 27 wget -c -O /var/lib/libvirt/images/rocketgit.xml wget -c -O /var/lib/libvirt/images/rocketgit.xml
27 28 http://downloads.rocketgit.com/vm/rocketgit.xml http://downloads.rocketgit.com/vm/rocketgit.xml
 
55 56 <br /> <br />
56 57
57 58 - now, you may want to change some virtual machine parameters using - now, you may want to change some virtual machine parameters using
58 virt-manager or 'virsh edit rocketgit1' command. Pay attention to
59 the network definition.<br />
59 virt-manager or 'virsh edit rocketgit1' command; pay attention to
60 the network definition<br />
60 61 <br /> <br />
61 62
62 63 - make sure no other virtualization system is running (like VirtualBox)<br /> - make sure no other virtualization system is running (like VirtualBox)<br />
 
72 73 <div class="xcode"> <div class="xcode">
73 74 virsh console rocketgit1</br /> virsh console rocketgit1</br />
74 75 # login as root with password 'aaaa'<br /> # login as root with password 'aaaa'<br />
75 ip ad li dev eth0
76 ip ad li
76 77 </div> </div>
77 78 <br /> <br />
78 79
79 80 - now, point your browser to the ip address found, using http or - now, point your browser to the ip address found, using http or
80 https and create an admin account.<br />
81 https and create an admin account<br />
81 82 <br /> <br />
82 83
83 84 If you want to create a new RocketGit instance, you can create a new If you want to create a new RocketGit instance, you can create a new
 
96 97 <br /> <br />
97 98
98 99 Now, please follow the <a href="#common">common section<a/> below to Now, please follow the <a href="#common">common section<a/> below to
99 finish the instalation.<br />
100 finish the installation.<br />
100 101
101 102 </div> </div>
102 103 </div> </div>
103 104 </div> </div>
104 105
106 <a id="vmware"></a>
105 107 <div class="island_row"> <div class="island_row">
106 108 <div class="island_cell"> <div class="island_cell">
107 109 <div class="island"> <div class="island">
 
110 112 Steps to follow:<br /> Steps to follow:<br />
111 113
112 114 - if you do not have a VMware virtualization solution, go to - if you do not have a VMware virtualization solution, go to
113 <a href="http://www.vmware.com/player">VMware site</a> and download
114 VMware Player. Choose try for free. It is around 75 MiB. And then,
115 install it.<br />
115 <a href="http://www.vmware.com/player" target="_new">VMware site</a>
116 and download VMware Player. Choose try for free. It is around 75 MiB.
117 And then, install it<br />
116 118 <br /> <br />
117 119
118 - download VMDK image (175 MiB) from
119 http://downloads.rocketgit.com/vm/rocketgit1.vmdk.zip<br />
120 - download VMX config file (2 KiB) from
121 <a href="http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmx">http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmx</a><br />
122 <br />
123
124 - download VMDK image (164 MiB) from
125 <a href="http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmdk.zip">http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmdk.zip</a><br />
120 126 <br /> <br />
121 127
122 128 - decompress the image<br /> - decompress the image<br />
 
129 135 "Open"<br /> "Open"<br />
130 136 <br /> <br />
131 137
132 - now, you may want to change some virtual machine parameters.
133 Pay attention to the network definition.<br />
138 - now, you may want to change some virtual machine parameters;
139 pay attention to the network definition<br />
134 140 <br /> <br />
135 141
136 - start the virtual machine, using "Play virtual machine".
137 Choose "I copied it" if asked<br />
142 - start the virtual machine, using "Play virtual machine";
143 choose "I copied it" if asked<br />
138 144 <br /> <br />
139 145
140 - attach to the console to find out the ip address<br />
146 - attach to the console to find out the ip address (ip ad li)<br />
141 147 <br /> <br />
142 148
143 - now, point your browser to the ip address found, using http or
144 https and create an admin account.<br />
149 - point your browser to the ip address found, using http or
150 https and create an admin account<br />
145 151 <br /> <br />
146 152
147 - finally, you must check the following list because you may want to:<br />
148 * generate new SSL/TLS keys<br />
149 * Add the vm in the update plan (periodic 'yum update')<br />
150 * edit /etc/sysconfig/clock to set the timezone (needs a restart of
151 some services or reboot)<br />
152 * change root password: run 'passwd' (initial password is 'aaaa')<br />
153 * allow this virtual machine to send mail (add it to the relay allow list)<br />
154 * set a static IP address instead of DHCP<br />
155 * add it to the DNS server to be able to access it by name<br />
156 * adjust logrotate times<br />
157 * customize /etc/rocketgit/config.php<br />
158 Enjoy your new RocketGit instance!<br />
153 Now, please follow the <a href="#common">common section<a/> below to
154 finish the installation.<br />
155
156 </div>
157 </div>
158 </div>
159
160 <a id="vbox"></a>
161 <div class="island_row">
162 <div class="island_cell">
163 <div class="island">
164 <div class="island_title">Oracle's VirtualBox based virtualization</div>
165
166 Steps to follow:<br />
167
168 - if you do not have VirtualBox installed, go to
169 <a href="https://www.virtualbox.org/wiki/Downloads" target="_new">VirtualBox site</a>,
170 download a proper executable (around 106 MiB) and install it<br />
171 <br />
172
173 - download the OVF file (12 KiB) from
174 <a href="http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.ovf">http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.ovf</a><br />
175 <br />
176
177 - download the compressed VMDK image (164 MiB) from
178 <a href="http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmdk.zip">http://downloads.rocketgit.com/vm/rocketgit1-fedora-21-i386.vmdk.zip</a><br />
179 <br />
180
181 - decompress the image<br />
182 <br />
183
184 - start VirtualBox, choose "File" menu, then "Import Appliance...";
185 select the .ovf file just downloaded and press "Next"<br />
186 <br />
187
188 - you may want to change some virtual machine parameters and
189 then press "Import"<br />
190 <br />
191
192 - when asked about the license, choose "Agree"<br />
193 <br />
194
195 - start the virtual machine by pressing "Start" button; login into the
196 virtual machine to find out the ip address (ip ad li)<br />
197 <br />
198
199 - point your browser to the ip address found, using http or
200 https and create an admin account<br />
159 201 <br /> <br />
160 202
161 203 Now, please follow the <a href="#common">common section<a/> below to Now, please follow the <a href="#common">common section<a/> below to
162 finish the instalation.<br />
204 finish the installation.<br />
163 205
164 206 </div> </div>
165 207 </div> </div>
File root/themes/default/hints/repo/clone_owner.html changed (mode: 100644) (index 082f731..cb34d16)
... ... If you have the project locally, but not versioned with Git:<br />
3 3 cd local_project_dir<br /> cd local_project_dir<br />
4 4 git init<br /> git init<br />
5 5 git remote add origin @@ssh@@<br /> git remote add origin @@ssh@@<br />
6 # commit something here<br />
6 # commit something<br />
7 7 git push origin --all<br /> git push origin --all<br />
8 8 git push origin --tags<br /> git push origin --tags<br />
9 9 </div> </div>
File root/themes/default/index.html changed (mode: 100644) (index 4cf1099..bff8953)
41 41 </div> </div>
42 42
43 43 <div id="main_container"> <div id="main_container">
44 <div id="menus">
44 <div class="menus">
45 45 @@submenu1@@ @@submenu1@@
46 46 @@submenu2@@ @@submenu2@@
47 47 </div> </div>
File root/themes/default/main.css changed (mode: 100644) (index d4c25c1..31e4fe5)
... ... form input[type="submit"] {
104 104 padding-left: 15px; padding-left: 15px;
105 105 } }
106 106
107 #menus {
107 .menus {
108 108 } }
109 109
110 110 .menu { .menu {
File root/themes/default/repo/discover.html changed (mode: 100644) (index 7fd5494..de33d41)
1 1 <div class="main_title">Discover</div> <div class="main_title">Discover</div>
2 2
3 <div id="menus">
3 <div class="menus">
4 4 <div class="menu menu2"> <div class="menu menu2">
5 5 <ul> <ul>
6 6 <li@@if(@@discover::menu::list@@ == 1){{ class="selected"}}{{}}> <li@@if(@@discover::menu::list@@ == 1){{ class="selected"}}{{}}>
File tests/Makefile changed (mode: 100644) (index 407b057..d97b245)
1 1 tests := git_log1.sh \ tests := git_log1.sh \
2 2 http_admin http_bug \ http_admin http_bug \
3 3 token util log state cache prof db event rights keys user repo git bug \ token util log state cache prof db event rights keys user repo git bug \
4 hook_update http_create_account http_login http_settings http_csrf
4 hook_update http_create_account http_login http_settings http_csrf \
5 http_top
5 6 .PHONY: $(tests) .PHONY: $(tests)
6 7
7 8 all: $(tests) all: $(tests)
 
... ... http_bug:
74 75 http_admin: http_admin:
75 76 php http_admin.php php http_admin.php
76 77
78 http_top:
79 php http_top.php
80
77 81 .PHONY: clean .PHONY: clean
78 82 clean: clean:
79 83 @rm -rf git_log1 *.log *.strace *.strace.* *.out *.lock err-* *.diff @rm -rf git_log1 *.log *.strace *.strace.* *.out *.lock err-* *.diff
File tests/http_top.php added (mode: 100644) (index 0000000..db046dc)
1 <?php
2 error_reporting(E_ALL | E_STRICT);
3 ini_set("track_errors", "On");
4
5 $rg_cache_debug = TRUE;
6
7 $INC = dirname(__FILE__) . "/../inc";
8 require_once(dirname(__FILE__) . "/config.php");
9 require_once($INC . "/init.inc.php");
10 require_once($INC . "/util.inc.php");
11 require_once("helpers.inc.php");
12 require_once("http.inc.php");
13
14 rg_log_set_file("http_top.log");
15
16 $rg_sql = "host=localhost user=rocketgit dbname=rocketgit connect_timeout=10";
17 $rg_no_db = TRUE;
18 require_once("common.php");
19
20 $_testns = 'http_top';
21 $rg_cache_enable = TRUE;
22
23 $now = time();
24
25 // TODO: donate has some problems with input + border!
26 $_list = array("discover", "download", "features", "pricing", "tos");
27 foreach ($_list as $op) {
28 rg_log("Loading $op page...");
29 $data = array();
30 $r = do_req($test_url . "/op/$op?t=http_top", $data, $headers);
31 }
32
33 rg_log("OK!");
34 ?>
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://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master