List of commits:
Subject Hash Author Date (UTC)
Get rid of xinetd ebc765c9a21a9803b67484795625f7eb46642ae9 Catalin(ux) M. BOIE 2021-10-27 14:18:45
Added /etc/ssh/sshd_config.d in .spec file (again) f225de7ddc3d78d4ec3699c63df6fd754500a9e3 Catalin(ux) M. BOIE 2021-10-26 07:05:26
Compare updated to add .rpm info 0d0a890fe98689b7b70987824e98d34ca5204d45 Catalin(ux) M. BOIE 2021-10-26 06:32:39
Fix rg_str_replace regarding ints; .spec small changes 7242f96f08983a70345e2665cfeb1ea592e3f3f7 Catalin(ux) M. BOIE 2021-10-26 06:17:39
builder: fixed immediate exit 27d21c9ef6bb10beaf1d4c8da29a90d649e68b60 Catalin(ux) M. BOIE 2021-10-24 14:41:29
We need .spec file before configure 840c7c3c0dd68c8ff6796b6494ca38afe8f4a5e6 Catalin(ux) M. BOIE 2021-10-24 14:28:59
rgfs: respect the requested size asked to be read f6f9e3f26e9c2bc98c38ded6a732cf53630d5688 Catalin(ux) M. BOIE 2021-10-24 09:25:51
builder: delay 5s if cannot contact the database b672b80542e80439243127aef2de4bda7d884e8a Catalin(ux) M. BOIE 2021-10-24 08:26:35
Cosmetic ea40e49373739590d9794d203ddd7e2b18464e29 Catalin(ux) M. BOIE 2021-10-23 15:35:34
Typo 7d156cc190c150239f16ea0b9807eb027f8cd79f Catalin(ux) M. BOIE 2021-10-22 17:41:34
worker: be more verbose 0f0e6216ad6f5923d08c10d7461d2259e92f69cd Catalin(ux) M. BOIE 2021-10-22 17:32:01
Add /etc/ssh files to spec 91c7c4f0bd30f01abe48e5c4f4c75857982a8f21 Catalin(ux) M. BOIE 2021-10-22 06:30:23
Removed Changelog file 8e42a6cb730000a104956bc7d265321d67d49bfe Catalin(ux) M. BOIE 2021-10-22 06:22:24
Do not store dependencies in a file but in a variable 13ba1da3a4a422e798393565e0a6941df660300a Catalin(ux) M. BOIE 2021-10-22 05:49:24
Forgot to create ssh dir for spec 1fd7185cdbf427451a7f4c5ada54e43febc5184f Catalin(ux) M. BOIE 2021-10-22 05:46:41
Still need to extract rpm info when switching users c4ddd883070d8fe48c876196dd3e4e08419745eb Catalin(ux) M. BOIE 2021-10-22 05:28:24
Add build_tools to the main script b0f721d9391a9cbe443a986f7d15cd8c052abd11 Catalin(ux) M. BOIE 2021-10-22 05:18:54
Again, first install the dependencies 919e46d2a71935451f576da32b61d2b6ecab126b Catalin(ux) M. BOIE 2021-10-22 05:02:50
Cosmetic cabc1c5cec8943d614b98b7f0ca8599cf5e2682c Catalin(ux) M. BOIE 2021-10-21 17:16:33
Install dependencies before trying to build the rpm 4df3dbf7e1f79b0c616d8dbeba8b1b30c9474f17 Catalin(ux) M. BOIE 2021-10-21 16:49:37
Commit ebc765c9a21a9803b67484795625f7eb46642ae9 - Get rid of xinetd
Author: Catalin(ux) M. BOIE
Author date (UTC): 2021-10-27 14:18
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2021-10-27 14:18
Parent(s): f225de7ddc3d78d4ec3699c63df6fd754500a9e3
Signer:
Signing key:
Signing status: N
Tree: 0804b142296b2c19f6c78351ddf6b204617fd516
File Lines added Lines deleted
Makefile.in 1 3
README 19 49
TODO 2 1
debian/control.in 1 1
rocketgit.spec 5 6
samples/rg 0 14
samples/rocketgit-git.socket 13 0
samples/rocketgit-git@.service 16 0
scripts/remote.php 4 1
File Makefile.in changed (mode: 100644) (index 0015f1a..add1c9a)
... ... install: all
28 28 cp -vdr inc hooks root scripts $(I_USR_SHARE)/$(PRJ) cp -vdr inc hooks root scripts $(I_USR_SHARE)/$(PRJ)
29 29 @ @
30 30 @echo "Installing configs..." @echo "Installing configs..."
31 @mkdir -pv $(I_ETC)/xinetd.d
32 cp -vd --no-clobber samples/rg $(I_ETC)/xinetd.d/$(PRJ)
33 31 @mkdir -pv $(I_ETC)/cron.d @mkdir -pv $(I_ETC)/cron.d
34 32 cp -vd --no-clobber samples/cron $(I_ETC)/cron.d/$(PRJ) cp -vd --no-clobber samples/cron $(I_ETC)/cron.d/$(PRJ)
35 33 @mkdir -pv $(I_ETC)/httpd/conf.d @mkdir -pv $(I_ETC)/httpd/conf.d
 
... ... install: all
45 43 @mkdir -pv $(I_ETC)/ssh/sshd_config.d @mkdir -pv $(I_ETC)/ssh/sshd_config.d
46 44 cp -vd --no-clobber samples/sshd-akc.conf $(I_ETC)/ssh/sshd_config.d/90-rocketgit-akc.conf cp -vd --no-clobber samples/sshd-akc.conf $(I_ETC)/ssh/sshd_config.d/90-rocketgit-akc.conf
47 45 @mkdir -pv $(I_USR)/lib/systemd/system @mkdir -pv $(I_USR)/lib/systemd/system
48 cp -vd samples/*.service $(I_USR)/lib/systemd/system/
46 cp -vd samples/*.service *.socket $(I_USR)/lib/systemd/system/
49 47 systemctl daemon-reload || : systemctl daemon-reload || :
50 48 @ @
51 49 @echo "Installing tools..." @echo "Installing tools..."
File README changed (mode: 100644) (index 0c58994..726b89f)
35 35 Edit /etc/rocketgit/pool.conf Edit /etc/rocketgit/pool.conf
36 36
37 37 . Activate rocketgit php-fpm: . Activate rocketgit php-fpm:
38 systemd based distributions:
39 systemctl enable rocketgit-fpm
40 systemctl start rocketgit-fpm
41 RedHat/CentOS/Oracle
42 chkconfig rocketgit-fpm on
43 service rocketgit-fpm start
38 systemctl enable --now rocketgit-fpm
44 39
45 40 . PHP . PHP
46 41 Adjust php.ini to: Adjust php.ini to:
 
62 57 (or /etc/httpd/conf.d) into rocketgit.conf and edit it. (or /etc/httpd/conf.d) into rocketgit.conf and edit it.
63 58
64 59 Activate web server (nginx) Activate web server (nginx)
65 systemd based distributions:
66 systemctl enable nginx.service
67 systemctl restart nginx.service
68 RedHat/CentOS/Oracle
69 chkconfig nginx on
70 service nginx restart
71
72 Or activate web server (apache)
73 systemd based distributions:
74 systemctl enable httpd.service
75 systemctl restart httpd.service
76 RedHat/CentOS/Oracle
77 chkconfig httpd on
78 service httpd restart
60 systemctl enable nginx.service
61 systemctl restart nginx.service
62
63 Or activate Apache web server
64 systemctl enable httpd.service
65 systemctl restart httpd.service
79 66
80 67 . Activate sshd (for ssh:// access) . Activate sshd (for ssh:// access)
81 systemd based distributions:
82 systemctl enable sshd.service
83 systemctl start sshd.service
84 RedHat/CentOS/Oracle
85 chkconfig sshd on
86 service sshd restart
87
88 . Activate xinetd (for git:// access, optional)
89 systemd based distributions:
90 systemctl enable xinetd.service
91 systemctl start xinetd.service
92 RedHat/CentOS/Oracle
93 chkconfig xinetd on
94 service xinetd restart
68 systemctl enable --now sshd.service
69
70 . Activate rocketgit-git.socket (for git:// access, optional)
71 systemctl enable --now rocketgit-git.socket
95 72
96 73 . Prepare PostgreSQL server . Prepare PostgreSQL server
97 74 yum/dnf install postgresql-server yum/dnf install postgresql-server
 
102 79 host rocketgit rocketgit 127.0.0.1/32 trust host rocketgit rocketgit 127.0.0.1/32 trust
103 80 host rocketgit rocketgit ::1/128 trust host rocketgit rocketgit ::1/128 trust
104 81
105 systemd based distributions:
106 systemctl enable postgresql.service
107 export PGSETUP_INITDB_OPTIONS="--data-checksums" # recommended
108 postgresql-setup --initdb # (TAKE CARE! YOU MAY DESTROY ALL YOUR DATA!)
109 systemctl start postgresql.service
110 RedHat/CentOS/Oracle
111 chkconfig postgresql on
112 service postgresql initdb
113 service postgresql start
82 systemctl enable postgresql.service
83 export PGSETUP_INITDB_OPTIONS="--data-checksums" # recommended
84 postgresql-setup --initdb # (TAKE CARE! YOU MAY DESTROY ALL YOUR DATA!)
85 systemctl start postgresql.service
114 86
115 87 Notes: Notes:
116 88 - Check also the config file (/etc/rocketgit/config.php) and set - Check also the config file (/etc/rocketgit/config.php) and set
 
129 101 To be able to generate e-mails as other user, you have to: To be able to generate e-mails as other user, you have to:
130 102 For sendmail: For sendmail:
131 103 - Enable daemon: - Enable daemon:
132 systemd based distributions: systemctl enable sendmail.service
133 RedHat/CentOS/Oracle: chkconfig sendmail on
104 systemctl enable sendmail.service
134 105 - Edit /etc/mail/trusted-users and add 'rocketgit' and 'apache'. - Edit /etc/mail/trusted-users and add 'rocketgit' and 'apache'.
135 106 - Restart daemon: - Restart daemon:
136 systemd based distributions: systemctl restart sendmail.service
137 RedHat/CentOS/Oracle: service sendmail restart
107 systemctl restart sendmail.service
138 108
139 109 . Edit firewall to permit ssh, git, http and https ports . Edit firewall to permit ssh, git, http and https ports
140 110 In /etc/sysconfig/iptables (IPv4) and ip6tables (IPv6), add something In /etc/sysconfig/iptables (IPv4) and ip6tables (IPv6), add something
 
158 128 tweaked. It is very important to set the 'Host name' value. tweaked. It is very important to set the 'Host name' value.
159 129
160 130 . Activate the builder service, if you want: . Activate the builder service, if you want:
161 systemctl enable rocketgit-builder
131 systemctl enable --now rocketgit-builder
162 132
163 133 . Activate the worker service, if you want: . Activate the worker service, if you want:
164 systemctl enable rocketgit-worker@main
134 systemctl enable --now rocketgit-worker@main
165 135
166 136
167 137 == Thanks == == Thanks ==
File TODO changed (mode: 100644) (index 7598bf2..e747f6b)
5 5 == After deploy on rocketgit.com == == After deploy on rocketgit.com ==
6 6 [ ] Add to "Corporate friendly": a link to a frustrations page about current software. [ ] Add to "Corporate friendly": a link to a frustrations page about current software.
7 7 [ ] Resync nginx conf on rg2 (because ws builder?). [ ] Resync nginx conf on rg2 (because ws builder?).
8 [ ] Activate rocketgit-git.socket.
8 9 [ ] Switch worker@com to websocket. [ ] Switch worker@com to websocket.
9 10 [ ] docker [ ] docker
10 11 [ ] old environments are present in the list! At least on dev1. [ ] old environments are present in the list! At least on dev1.
 
... ... to add a worker? Also, no hint is presented.
1412 1413 php-fpm comes with files in /etc/nginx! So can we! php-fpm comes with files in /etc/nginx! So can we!
1413 1414 [ ] At least for http we do not check if host does not matches and warn user [ ] At least for http we do not check if host does not matches and warn user
1414 1415 to change it. to change it.
1415 [ ] Get rid of xinetd and run remote.php as a service. With a .service file.
1416 [ ] Get rid of xinetd and run remote.php as a service. With a .service file. Done.
1416 1417 The same for all other cron scripts (except cron.php)! The same for all other cron scripts (except cron.php)!
1417 1418 [ ] unit test for apikeys [ ] unit test for apikeys
1418 1419 [ ] advertise on git mailing list. [ ] advertise on git mailing list.
File debian/control.in changed (mode: 100644) (index e0766fc..8dc365a)
... ... Vcs-Browser: https://rocketgit.com/user/catalinux/@@PRJ@@
10 10
11 11 Package: @PRJ@ Package: @PRJ@
12 12 Architecture: all Architecture: all
13 Depends: ${shlibs:Depends}, ${misc:Depends}, apache2, php5-fpm, php5-cli, php5-pgsql, xinetd, git, cronie, util-linux, shadow-utils, postgresql-9.4
13 Depends: ${shlibs:Depends}, ${misc:Depends}, apache2, php5-fpm, php5-cli, php5-pgsql, git, cronie, util-linux, shadow-utils, postgresql-9.4
14 14 Description: @SHORT_DESCRIPTION@ Description: @SHORT_DESCRIPTION@
File rocketgit.spec changed (mode: 100644) (index ddf55e8..cbb7b05)
... ... BuildArch: noarch
17 17
18 18 # fuse is required for rgfs # fuse is required for rgfs
19 19 Requires: httpd-filesystem, nginx-filesystem, php-fpm, php-cli, php-pgsql, php-mbstring Requires: httpd-filesystem, nginx-filesystem, php-fpm, php-cli, php-pgsql, php-mbstring
20 Requires: git-core, cronie, xinetd, php-json, php-ldap
20 Requires: git-core, cronie, php-json, php-ldap
21 21 Requires: util-linux, qrencode, fuse, openssh-server, gpg Requires: util-linux, qrencode, fuse, openssh-server, gpg
22 22
23 23 # SELinux stuff # SELinux stuff
 
... ... done
55 55 [ -r /tmp/rgsdebug ] && echo "restorecon -R..." [ -r /tmp/rgsdebug ] && echo "restorecon -R..."
56 56 /sbin/restorecon -R /var/lib/rocketgit || : /sbin/restorecon -R /var/lib/rocketgit || :
57 57
58 if [ $1 -ne 0 ]; then
59 [ -r /tmp/rgsdebug ] && echo "Reloading xinetd..."
60 /usr/bin/systemctl reload xinetd &>/dev/null || :
61 fi
62 58 [ -r /tmp/rgsdebug ] && echo "systemd_post fpm..." [ -r /tmp/rgsdebug ] && echo "systemd_post fpm..."
63 59 %systemd_post rocketgit-fpm.service %systemd_post rocketgit-fpm.service
64 60 [ -r /tmp/rgsdebug ] && echo "systemd_post builder..." [ -r /tmp/rgsdebug ] && echo "systemd_post builder..."
65 61 %systemd_post rocketgit-builder.service %systemd_post rocketgit-builder.service
66 62 [ -r /tmp/rgsdebug ] && echo "systemd_post fs..." [ -r /tmp/rgsdebug ] && echo "systemd_post fs..."
67 63 %systemd_post rocketgit-fs.service %systemd_post rocketgit-fs.service
64 [ -r /tmp/rgsdebug ] && echo "systemd_post git..."
65 %systemd_post rocketgit-git.socket
68 66 [ -r /tmp/rgsdebug ] && echo "'post' done..." [ -r /tmp/rgsdebug ] && echo "'post' done..."
69 67
70 68 %preun %preun
 
... ... fi
72 70 %systemd_preun rocketgit-builder.service %systemd_preun rocketgit-builder.service
73 71 %systemd_preun rocketgit-fs.service %systemd_preun rocketgit-fs.service
74 72 %systemd_preun rocketgit-worker@\*.service %systemd_preun rocketgit-worker@\*.service
73 %systemd_preun rocketgit-git.socket
75 74
76 75 %postun %postun
77 76 if [ $1 = 0 ]; then if [ $1 = 0 ]; then
 
... ... fi
85 84 %systemd_postun_with_restart rocketgit-builder.service %systemd_postun_with_restart rocketgit-builder.service
86 85 %systemd_postun_with_restart rocketgit-fs.service %systemd_postun_with_restart rocketgit-fs.service
87 86 %systemd_postun_with_restart rocketgit-worker@\*.service %systemd_postun_with_restart rocketgit-worker@\*.service
87 %systemd_postun_with_restart rocketgit-git.socket
88 88
89 89 %prep %prep
90 90 %setup -q %setup -q
 
... ... rm -rf ${RPM_BUILD_ROOT}
115 115 %config(noreplace) /etc/rocketgit/php-fpm.conf %config(noreplace) /etc/rocketgit/php-fpm.conf
116 116 %config(noreplace) /etc/rocketgit/pool.conf %config(noreplace) /etc/rocketgit/pool.conf
117 117 %config(noreplace) /etc/cron.d/rocketgit %config(noreplace) /etc/cron.d/rocketgit
118 %config(noreplace) /etc/xinetd.d/rocketgit
119 118 %config(noreplace) /etc/ssh/sshd_config.d/* %config(noreplace) /etc/ssh/sshd_config.d/*
120 119 %attr(0700,rocketgit,rocketgit) %dir /var/log/rocketgit %attr(0700,rocketgit,rocketgit) %dir /var/log/rocketgit
121 120 %attr(0771,rocketgit,rocketgit) %dir /var/lib/rocketgit %attr(0771,rocketgit,rocketgit) %dir /var/lib/rocketgit
File samples/rg deleted (index af4b039..0000000)
1 # default: off
2 # description: The git dæmon allows git repositories to be exported using \
3 # the git:// protocol.
4
5 service git
6 {
7 flags = IPv6
8 disable = no
9 socket_type = stream
10 wait = no
11 user = rocketgit
12 server = /usr/share/rocketgit/scripts/remote.sh
13 log_on_failure += USERID
14 }
File samples/rocketgit-git.socket added (mode: 100644) (index 0000000..590a597)
1 [Unit]
2 Description = RocketGit git:// daemon socket
3
4 [Socket]
5 ListenStream = 9418
6 Accept = yes
7 MaxConnections = 128
8 MaxConnectionsPerSource = 5
9 ReusePort = true
10
11 [Install]
12 WantedBy = sockets.target
13
File samples/rocketgit-git@.service added (mode: 100644) (index 0000000..22f6e75)
1 [Unit]
2 Description = RocketGit git:// daemon service
3 #Requires = rocketgit-git.socket
4
5 [Service]
6 ExecStart = /usr/share/rocketgit/scripts/remote.sh
7 StandardInput = socket
8 User = rocketgit
9 Group = rocketgit
10 PrivateTmp = true
11 Restart = on-failure
12 RestartSec = 10
13 ProtectSystem = full
14 NoNewPrivileges = yes
15 PrivateUsers = true
16
File scripts/remote.php changed (mode: 100644) (index e065718..62bce94)
... ... if (isset($_SERVER['SSH_CONNECTION'])) {
195 195 $v = explode(':', $host_port); $v = explode(':', $host_port);
196 196 $host = $v[0]; $host = $v[0];
197 197
198 rg_ip_set(getenv('REMOTE_HOST'));
198 $ip = getenv('REMOTE_ADDR'); // systemd socket way
199 if (empty($ip))
200 $ip = getenv('REMOTE_HOST'); // xinetd way
201 rg_ip_set($ip);
199 202
200 203 $lim = rg_rate_limit($db); $lim = rg_rate_limit($db);
201 204 if ($lim == 0) if ($lim == 0)
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