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 | 16 | |
| 17 | 17 | %prep |
| 18 | 18 | %setup -q |
| 19 | -%patch0 -p 1 | |
| 19 | +#%patch0 -p 1 | |
| 20 | 20 | |
| 21 | 21 | %build |
| 22 | 22 | cat > config/gitlab.yml <<EOF |
| ... | ... | @@ -109,14 +109,18 @@ mkdir -p /var/lib/gitlab/backups |
| 109 | 109 | mkdir -p /var/lib/gitlab/repositories |
| 110 | 110 | mkdir -p /var/lib/gitlab/satellites |
| 111 | 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 | 114 | chown -R git:git /var/lib/gitlab |
| 115 | +chmod u+rwx,g=rx,o-rwx /var/lib/gitlab/satellites | |
| 116 | + | |
| 113 | 117 | if [ /usr/bin/redis-server ]; then |
| 114 | 118 | service redis start |
| 115 | 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 | 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 | 132 | cp /usr/lib/gitlab/lib/support/init.d/gitlab.default.example /etc/default/gitlab |
| 129 | 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 | 135 | sed -i 's/app_root="\/home\/\$app_user\/gitlab"/app_root="\/usr\/lib\/gitlab"/' /etc/default/gitlab |
| 133 | 136 | sed -i 's/\/home\/\git/\/usr\/lib/' /etc/logrotate.d/gitlab |
| 134 | 137 | |
| 135 | 138 | %postun |
| 136 | 139 | #TODO Remove |
| 140 | +service gitlab stop | |
| 137 | 141 | sudo -u postgres psql -d template1 << EOF |
| 138 | 142 | DROP DATABASE gitlabhq_production; |
| 139 | 143 | DROP USER git; | ... | ... |