[packages/gitlab-ce] use patch to configure
glen
glen at pld-linux.org
Sun May 15 20:41:43 CEST 2016
commit c06de8c30e02acc4524023b939746de825c08416
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun May 15 21:34:52 2016 +0300
use patch to configure
better overview of the changes and fails when chunks no longer apply
gitlab-ce.spec | 23 ++++++--------------
pld.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 16 deletions(-)
---
diff --git a/gitlab-ce.spec b/gitlab-ce.spec
index b54842c..c68d30a 100644
--- a/gitlab-ce.spec
+++ b/gitlab-ce.spec
@@ -17,13 +17,13 @@
Summary: A Web interface to create projects and repositories, manage access and do code reviews
Name: gitlab-ce
Version: 8.7.5
-Release: 0.20
+Release: 0.21
License: MIT
Group: Applications/WWW
# md5 deliberately omitted until this package is useful
Source0: https://github.com/gitlabhq/gitlabhq/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3774.patch
-URL: https://www.gitlab.com/gitlab-ce/
+Patch1: pld.patch
Source1: gitlab.target
Source2: gitlab-sidekiq.service
Source3: gitlab-sidekiq.init
@@ -34,6 +34,7 @@ Source7: gitlab.tmpfiles.d
Source8: gitlab-apache-conf
Source9: gitlab-rake.sh
Source10: gitconfig
+URL: https://www.gitlab.com/gitlab-ce/
BuildRequires: cmake
BuildRequires: gmp-devel
BuildRequires: libgit2-devel
@@ -70,21 +71,11 @@ use on your server(s).
%prep
%setup -qn gitlabhq-%{version}
+mv config/gitlab.yml.example config/gitlab.yml
+mv config/unicorn.rb.example config/unicorn.rb
+mv config/database.yml.mysql config/database.yml
%patch0 -p1
-
-# Patching config files:
-sed -e "s|# user: git|user: gitlab|" \
- -e "s|/home/git/repositories|%{homedir}/repositories|" \
- -e "s|/home/git/gitlab-satellites|%{homedir}/satellites|" \
- -e "s|/home/git/gitlab-shell|/usr/share/gitlab-shell|" \
- config/gitlab.yml.example > config/gitlab.yml
-sed -e "s|/home/git/gitlab/tmp/.*/|/run/gitlab/|g" \
- -e "s|/home/git/gitlab|%{homedir}|g" \
- -e "s|/usr/share/gitlab/log|%{homedir}/log|g" \
- -e "s|timeout 30|timeout 300|" \
- config/unicorn.rb.example > config/unicorn.rb
-sed -e "s|username: git|username: gitlab|" \
- config/database.yml.mysql > config/database.yml
+%patch1 -p1
rm .flayignore
rm .gitignore
diff --git a/pld.patch b/pld.patch
new file mode 100644
index 0000000..c2f629c
--- /dev/null
+++ b/pld.patch
@@ -0,0 +1,69 @@
+--- gitlabhq-8.7.5/config/gitlab.yml 2016-05-12 17:35:19.000000000 +0300
++++ gitlabhq-8.7.5.paths/config/gitlab.yml 2016-05-15 21:30:47.260578333 +0300
+@@ -56,7 +56,7 @@
+ #- 2001:0db8::/32
+
+ # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
+- # user: git
++ user: git
+
+ ## Date & Time settings
+ # Uncomment and customize if you want to change the default time zone of GitLab application.
+@@ -412,7 +412,7 @@
+ # least. This setting is fed to 'rm -rf' in
+ # db/migrate/20151023144219_remove_satellites.rb
+ satellites:
+- path: /home/git/gitlab-satellites/
++ path: /var/lib/gitlab/satellites/
+
+ ## Backup settings
+ backup:
+@@ -437,11 +437,11 @@
+
+ ## GitLab Shell settings
+ gitlab_shell:
+- path: /home/git/gitlab-shell/
++ path: /usr/share/gitlab-shell/
+
+ # REPOS_PATH MUST NOT BE A SYMLINK!!!
+- repos_path: /home/git/repositories/
+- hooks_path: /home/git/gitlab-shell/hooks/
++ repos_path: /var/lib/gitlab/repositories/
++ hooks_path: /usr/share/gitlab-shell/hooks/
+
+ # File that contains the secret key for verifying access for gitlab-shell.
+ # Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app).
+--- gitlabhq-8.7.5/config/unicorn.rb 2016-05-12 17:35:19.000000000 +0300
++++ gitlabhq-8.7.5.paths/config/unicorn.rb 2016-05-15 21:30:47.263911838 +0300
+@@ -33,12 +33,12 @@
+
+ # Help ensure your application will always spawn in the symlinked
+ # "current" directory that Capistrano sets up.
+-working_directory "/home/git/gitlab" # available in 0.94.0+
++working_directory "/var/lib/gitlab" # available in 0.94.0+
+
+ # Listen on both a Unix domain socket and a TCP port.
+ # If you are load-balancing multiple Unicorn masters, lower the backlog
+ # setting to e.g. 64 for faster failover.
+-listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
++listen "/run/gitlab/gitlab.socket", :backlog => 1024
+ listen "127.0.0.1:8080", :tcp_nopush => true
+
+ # nuke workers after 30 seconds instead of 60 seconds (the default)
+@@ -59,13 +59,13 @@
+ timeout 60
+
+ # feel free to point this anywhere accessible on the filesystem
+-pid "/home/git/gitlab/tmp/pids/unicorn.pid"
++pid "/run/gitlab/unicorn.pid"
+
+ # By default, the Unicorn logger will write to stderr.
+ # Additionally, some applications/frameworks log to stderr or stdout,
+ # so prevent them from going to /dev/null when daemonized here:
+-stderr_path "/home/git/gitlab/log/unicorn.stderr.log"
+-stdout_path "/home/git/gitlab/log/unicorn.stdout.log"
++stderr_path "/var/lib/gitlab/log/unicorn.stderr.log"
++stdout_path "/var/lib/gitlab/log/unicorn.stdout.log"
+
+ # combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings
+ # http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/282ff2500045ec9d96063b5a443be1c2e3f6ae78
More information about the pld-cvs-commit
mailing list