2013-04-30 03:52:25 -04:00
|
|
|
# From 5.0 to 5.1
|
|
|
|
|
2013-11-02 11:49:26 -04:00
|
|
|
## Warning
|
2014-04-24 18:48:22 -04:00
|
|
|
|
2014-03-24 10:17:43 -04:00
|
|
|
GitLab 5.1 is affected by critical security vulnerability CVE-2013-4490.
|
2013-11-02 11:49:26 -04:00
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## Release notes
|
2013-04-19 10:27:30 -04:00
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
- `unicorn` replaced with `puma`
|
|
|
|
- merge request cached diff will be truncated
|
2013-04-19 10:27:30 -04:00
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 1. Stop server
|
2013-04-19 10:27:30 -04:00
|
|
|
|
|
|
|
sudo service gitlab stop
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 2. Get latest code
|
2013-04-19 10:27:30 -04:00
|
|
|
|
2013-04-28 12:11:40 -04:00
|
|
|
```bash
|
|
|
|
cd /home/git/gitlab
|
2013-04-19 10:27:30 -04:00
|
|
|
sudo -u git -H git fetch
|
|
|
|
sudo -u git -H git checkout 5-1-stable
|
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 3. Update gitlab-shell
|
2013-04-19 10:27:30 -04:00
|
|
|
|
2013-04-28 12:11:40 -04:00
|
|
|
```bash
|
|
|
|
cd /home/git/gitlab-shell
|
|
|
|
sudo -u git -H git fetch
|
|
|
|
sudo -u git -H git checkout v1.3.0
|
2013-05-29 17:03:54 -04:00
|
|
|
# replace your old config with the new one
|
|
|
|
sudo -u git -H mv config.yml config.yml.old
|
|
|
|
sudo -u git -H cp config.yml.example config.yml
|
|
|
|
# edit options to match old config
|
|
|
|
sudo -u git -H vi config.yml
|
2013-04-19 10:27:30 -04:00
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 4. Install libs, migrations etc
|
2013-04-26 05:25:04 -04:00
|
|
|
|
2013-04-28 12:11:40 -04:00
|
|
|
```bash
|
|
|
|
cd /home/git/gitlab
|
|
|
|
sudo rm tmp/sockets/gitlab.socket
|
|
|
|
sudo -u git -H cp config/puma.rb.example config/puma.rb
|
2013-04-26 05:25:04 -04:00
|
|
|
|
2013-04-28 12:11:40 -04:00
|
|
|
sudo -u git -H bundle install --without development test postgres --deployment
|
2013-04-19 10:27:30 -04:00
|
|
|
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
|
|
|
|
sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
|
2013-06-21 05:05:21 -04:00
|
|
|
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
|
2013-04-19 10:27:30 -04:00
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 5. Update init.d script with a new one
|
2013-04-19 10:27:30 -04:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# init.d
|
|
|
|
sudo rm /etc/init.d/gitlab
|
|
|
|
sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab
|
|
|
|
sudo chmod +x /etc/init.d/gitlab
|
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 6. MySQL grant privileges
|
2013-04-28 12:11:40 -04:00
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
Only if you are using MySQL:
|
2013-04-28 12:11:40 -04:00
|
|
|
|
|
|
|
```bash
|
|
|
|
mysql -u root -p
|
|
|
|
mysql> GRANT LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
|
|
|
|
mysql> \q
|
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 7. Start application
|
2013-04-19 10:27:30 -04:00
|
|
|
|
|
|
|
sudo service gitlab start
|