Age | Commit message (Collapse) | Author |
|
Set permissions of backup dir to g+s
Closes #20188
|
|
|
|
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.
The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.
The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.
An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.
Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
|
|
Closes #3311
|
|
|
|
This sidesteps problems with running 'chmod' on some CIFS mounts.
|
|
|
|
ProjectWiki.new() creates a new wiki git repository, so any tries
to bare clone a bundle fail. With this patch we remove the newly
created wiki.git before restoring from the backup bundle.
|
|
|
|
|
|
If a project is being restored, but there is no bundle file, the project was
empty when it was backed up. In this case, just use git init --base to create a
new bare repository.
|
|
|
|
We need to skip empty repositories when creating a backup. Before this
change, we were asking gollum-lib if the wiki contains any _pages_. Now
we ask gitlab_git if the repository contains _files_. This should
resolve gollum_lib Grit timeouts in the backup script.
|
|
This change also shows the output of failed Git commands during the
backup.
|
|
The rewrite-hooks.sh script is a deprecated wrapper for gitlab-shell's
create-hooks script.
|
|
This fixes a bug where wiki repositories for projects with an empty main
repository would not get backed up.
|
|
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
The backup restore code for repositories was assuming that gitlab-shell
is installed in /home/git/gitlab-shell. This commit changes that to use
the configuration setting from gitlab.yml that specifies the path where
gitlab-shell is installed.
|
|
|
|
This reverts commit c46eaca91247ccf8e6fb3b691dad028e1b084ae3.
|
|
- Database name may contain characters which are not shell friendly
- Database password could contain the same
- While we at it there is no harm in escaping generated paths too
- Refactored 2-line system(command)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
|
|
|
|
These fixes will allow a restore of gitlab when the backups and
repositories directories are in non-standard locations (ie sub-dirs
of gitlabhq). Also allows the restore to be run from script
overriding the need of a user to confirm the rebuild of the
authorized_keys file.
|
|
|
|
|
|
|
|
|