move public to /var/lib/gitlab

This commit is contained in:
Praveen Arimbrathodiyil 2016-02-18 17:30:10 +05:30
parent 01dab416e5
commit 354d864101
4 changed files with 6 additions and 4 deletions

2
debian/gitlab.links vendored
View file

@ -1,4 +1,4 @@
var/lib/gitlab/uploads usr/share/gitlab/public/uploads
var/lib/gitlab/public usr/share/gitlab/public
var/log/gitlab usr/share/gitlab/log
run/gitlab usr/share/gitlab/tmp
etc/gitlab usr/share/gitlab/config

1
debian/install vendored
View file

@ -30,7 +30,6 @@ lib usr/share/gitlab
MAINTENANCE.md usr/share/gitlab
PROCESS.md usr/share/gitlab
Procfile usr/share/gitlab
public usr/share/gitlab
Rakefile usr/share/gitlab
README.md usr/share/gitlab
scripts usr/share/gitlab

5
debian/postinst vendored
View file

@ -40,7 +40,7 @@ case "$1" in
. /usr/lib/gitlab/scripts/adduser.sh
gitlab_repo_path=${gitlab_data_dir}/repositories
gitlab_uploads_path=${gitlab_data_dir}/uploads
gitlab_uploads_path=${gitlab_data_dir}/public/uploads
# Create directories and change ownership
for i in ${gitlab_repo_path} ${gitlab_uploads_path} ${gitlab_pid_path}\
@ -48,6 +48,9 @@ case "$1" in
mkdir -p $i
chown -R ${gitlab_user}: $i
done
# nginx should be able to connect to gitlab-workhorse.socket and serve public
chown ${gitlab_user}:${nginx_user} -R ${gitlab_uploads_path}/.. ${gitlab_pid_path}
# Customize permissions
chmod -R ug+rwX,o-rwx ${gitlab_repo_path}/

View file

@ -1,6 +1,6 @@
ucount=$(ls -1 | wc -l)
dcount=$(cat debian/install |cut -d' ' -f1|grep -v debian |wc -l)
ignored=7
ignored=8
if ! [ $(echo "$ucount" - "$dcount"|bc) -eq $ignored ]; then
echo "Found new files added by upstream and not added to debian/install"
echo "Add them to debian/install or adjust 'ignored=${ignored}'"