Commit 211bba44edd194cc92b358d703e3daef4301a85b
1 parent
d6368936
Exists in
master
and in
79 other branches
Git configuration and satellites directory permissions
Signed-off-by: Alexandre Barbosa <alexandreab@live.com> Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
gitlab.spec
@@ -16,7 +16,7 @@ GitLab | @@ -16,7 +16,7 @@ GitLab | ||
16 | 16 | ||
17 | %prep | 17 | %prep |
18 | %setup -q | 18 | %setup -q |
19 | -%patch0 -p 1 | 19 | +#%patch0 -p 1 |
20 | 20 | ||
21 | %build | 21 | %build |
22 | cat > config/gitlab.yml <<EOF | 22 | cat > config/gitlab.yml <<EOF |
@@ -109,14 +109,18 @@ mkdir -p /var/lib/gitlab/backups | @@ -109,14 +109,18 @@ mkdir -p /var/lib/gitlab/backups | ||
109 | mkdir -p /var/lib/gitlab/repositories | 109 | mkdir -p /var/lib/gitlab/repositories |
110 | mkdir -p /var/lib/gitlab/satellites | 110 | mkdir -p /var/lib/gitlab/satellites |
111 | mkdir -p /var/lib/gitlab/tmp | 111 | mkdir -p /var/lib/gitlab/tmp |
112 | +touch /var/lib/gitlab/.gitconfig | ||
113 | +ln -s /var/lib/gitlab/.gitconfig /usr/lib/gitlab/.gitconfig | ||
112 | chown -R git:git /var/lib/gitlab | 114 | chown -R git:git /var/lib/gitlab |
115 | +chmod u+rwx,g=rx,o-rwx /var/lib/gitlab/satellites | ||
116 | + | ||
113 | if [ /usr/bin/redis-server ]; then | 117 | if [ /usr/bin/redis-server ]; then |
114 | service redis start | 118 | service redis start |
115 | fi | 119 | fi |
116 | 120 | ||
117 | -git config --global user.name "GitLab" | ||
118 | -git config --global user.email "example@example.com" | ||
119 | -git config --global core.autocrlf input | 121 | +sudo -u git -H "/usr/bin/git" config --global user.name "GitLab" |
122 | +sudo -u git -H "/usr/bin/git" config --global user.email "example@example.com" | ||
123 | +sudo -u git -H "/usr/bin/git" config --global core.autocrlf "input" | ||
120 | 124 | ||
121 | mkdir -p /var/lib/gitlab-assets | 125 | mkdir -p /var/lib/gitlab-assets |
122 | 126 | ||
@@ -128,12 +132,12 @@ cp /usr/lib/gitlab/lib/support/init.d/gitlab /etc/init.d/gitlab | @@ -128,12 +132,12 @@ cp /usr/lib/gitlab/lib/support/init.d/gitlab /etc/init.d/gitlab | ||
128 | cp /usr/lib/gitlab/lib/support/init.d/gitlab.default.example /etc/default/gitlab | 132 | cp /usr/lib/gitlab/lib/support/init.d/gitlab.default.example /etc/default/gitlab |
129 | cp /usr/lib/gitlab/lib/support/logrotate/gitlab /etc/logrotate.d/gitlab | 133 | cp /usr/lib/gitlab/lib/support/logrotate/gitlab /etc/logrotate.d/gitlab |
130 | 134 | ||
131 | -sed -i 's/app_root="\/home\/\$app_user\/gitlab"/app_root="\/usr\/lib\/gitlab"/' /etc/init.d/gitlab | ||
132 | sed -i 's/app_root="\/home\/\$app_user\/gitlab"/app_root="\/usr\/lib\/gitlab"/' /etc/default/gitlab | 135 | sed -i 's/app_root="\/home\/\$app_user\/gitlab"/app_root="\/usr\/lib\/gitlab"/' /etc/default/gitlab |
133 | sed -i 's/\/home\/\git/\/usr\/lib/' /etc/logrotate.d/gitlab | 136 | sed -i 's/\/home\/\git/\/usr\/lib/' /etc/logrotate.d/gitlab |
134 | 137 | ||
135 | %postun | 138 | %postun |
136 | #TODO Remove | 139 | #TODO Remove |
140 | +service gitlab stop | ||
137 | sudo -u postgres psql -d template1 << EOF | 141 | sudo -u postgres psql -d template1 << EOF |
138 | DROP DATABASE gitlabhq_production; | 142 | DROP DATABASE gitlabhq_production; |
139 | DROP USER git; | 143 | DROP USER git; |