Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2020 14:15:00 +0000 (UTC)
From:      Matthias Fechner <mfechner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r544686 - in head/www: gitlab-ce gitlab-ce/files rubygem-gitlab-puma rubygem-gitlab-puma/files
Message-ID:  <202008111415.07BEF0n0020800@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mfechner
Date: Tue Aug 11 14:15:00 2020
New Revision: 544686
URL: https://svnweb.freebsd.org/changeset/ports/544686

Log:
  Switch gitlab internal webserver to puma.
  Gitlab switched with version 13.0 to puma as default.
  
  PR:		247564

Added:
  head/www/gitlab-ce/files/patch-bin_actioncable   (contents, props changed)
  head/www/gitlab-ce/files/patch-bin_web__puma   (contents, props changed)
  head/www/rubygem-gitlab-puma/files/
  head/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec   (contents, props changed)
Modified:
  head/www/gitlab-ce/Makefile
  head/www/gitlab-ce/files/gitlab.in
  head/www/gitlab-ce/files/patch-config_puma.rb.example
  head/www/rubygem-gitlab-puma/Makefile

Modified: head/www/gitlab-ce/Makefile
==============================================================================
--- head/www/gitlab-ce/Makefile	Tue Aug 11 13:12:31 2020	(r544685)
+++ head/www/gitlab-ce/Makefile	Tue Aug 11 14:15:00 2020	(r544686)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gitlab-ce
 PORTVERSION=	13.2.3
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	www devel
 
 MAINTAINER=	mfechner@FreeBSD.org

Modified: head/www/gitlab-ce/files/gitlab.in
==============================================================================
--- head/www/gitlab-ce/files/gitlab.in	Tue Aug 11 13:12:31 2020	(r544685)
+++ head/www/gitlab-ce/files/gitlab.in	Tue Aug 11 14:15:00 2020	(r544686)
@@ -49,7 +49,7 @@ load_rc_config $name
 ### Environment variables
 RAILS_ENV=${RAILS_ENV:-'production'}
 SIDEKIQ_WORKERS=${SIDEKIQ_WORKERS:-1}
-USE_WEB_SERVER=${USE_WEB_SERVER:-'unicorn'}
+USE_WEB_SERVER=${USE_WEB_SERVER:-'puma'}
 
 case "${USE_WEB_SERVER}" in
   puma|unicorn)

Added: head/www/gitlab-ce/files/patch-bin_actioncable
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-ce/files/patch-bin_actioncable	Tue Aug 11 14:15:00 2020	(r544686)
@@ -0,0 +1,11 @@
+--- bin/actioncable.orig	2020-08-11 09:44:44 UTC
++++ bin/actioncable
+@@ -10,7 +10,7 @@ puma_config="$app_root/config/puma_actioncable.rb"
+ 
+ spawn_puma()
+ {
+-  exec bundle exec puma --config "${puma_config}" --environment "$RAILS_ENV" "$@"
++  exec bundle exec gpuma --config "${puma_config}" --environment "$RAILS_ENV" "$@"
+ }
+ 
+ get_puma_pid()

Added: head/www/gitlab-ce/files/patch-bin_web__puma
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gitlab-ce/files/patch-bin_web__puma	Tue Aug 11 14:15:00 2020	(r544686)
@@ -0,0 +1,11 @@
+--- bin/web_puma.orig	2020-08-11 09:44:03 UTC
++++ bin/web_puma
+@@ -10,7 +10,7 @@ puma_config="$app_root/config/puma.rb"
+ 
+ spawn_puma()
+ {
+-  exec bundle exec puma --config "${puma_config}" --environment "$RAILS_ENV" "$@"
++  exec bundle exec gpuma --config "${puma_config}" --environment "$RAILS_ENV" "$@"
+ }
+ 
+ get_puma_pid()

Modified: head/www/gitlab-ce/files/patch-config_puma.rb.example
==============================================================================
--- head/www/gitlab-ce/files/patch-config_puma.rb.example	Tue Aug 11 13:12:31 2020	(r544685)
+++ head/www/gitlab-ce/files/patch-config_puma.rb.example	Tue Aug 11 14:15:00 2020	(r544686)
@@ -1,4 +1,4 @@
---- config/puma.rb.example.orig	2019-08-17 12:35:36 UTC
+--- config/puma.rb.example.orig	2020-08-05 09:54:00 UTC
 +++ config/puma.rb.example
 @@ -5,11 +5,11 @@
  # The default is "config.ru".
@@ -32,3 +32,16 @@
  
  on_restart do
    # Signal application hooks that we're about to restart
+@@ -70,9 +70,9 @@ tag 'gitlab-puma-worker'
+ worker_timeout 60
+ 
+ # Use json formatter
+-require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
++require_relative "%%PREFIX%%/www/gitlab-ce/lib/gitlab/puma_logging/json_formatter"
+ 
+ json_formatter = Gitlab::PumaLogging::JSONFormatter.new
+ log_formatter do |str|
+   json_formatter.call(str)
+-end
+\ No newline at end of file
++end

Modified: head/www/rubygem-gitlab-puma/Makefile
==============================================================================
--- head/www/rubygem-gitlab-puma/Makefile	Tue Aug 11 13:12:31 2020	(r544685)
+++ head/www/rubygem-gitlab-puma/Makefile	Tue Aug 11 14:15:00 2020	(r544686)
@@ -3,6 +3,7 @@
 
 PORTNAME=	gitlab-puma
 DISTVERSION=	4.3.3.gitlab.2
+PORTREVISION=	1
 CATEGORIES=	www rubygems
 MASTER_SITES=	RG
 
@@ -22,8 +23,8 @@ PLIST_FILES=	bin/gpuma bin/gpumactl
 
 SHEBANG_FILES=	tools/jungle/init.d/run-puma
 
-post-install:
-		${MV} ${STAGEDIR}${PREFIX}/bin/puma ${STAGEDIR}${PREFIX}/bin/gpuma
-		${MV} ${STAGEDIR}${PREFIX}/bin/pumactl ${STAGEDIR}${PREFIX}/bin/gpumactl
+post-patch:
+		${MV} ${WRKSRC}/bin/puma ${WRKSRC}/bin/gpuma
+		${MV} ${WRKSRC}/bin/pumactl ${WRKSRC}/bin/gpumactl
 
 .include <bsd.port.mk>

Added: head/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec	Tue Aug 11 14:15:00 2020	(r544686)
@@ -0,0 +1,14 @@
+--- gitlab-puma.gemspec.orig	2020-08-11 09:30:41 UTC
++++ gitlab-puma.gemspec
+@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
+   s.date = "2020-03-04"
+   s.description = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. It's great for highly concurrent Ruby implementations such as Rubinius and JRuby as well as as providing process worker support to support CRuby well.".freeze
+   s.email = ["kamil@gitlab.com".freeze, "evan@phx.io".freeze]
+-  s.executables = ["puma".freeze, "pumactl".freeze]
++  s.executables = ["gpuma".freeze, "gpumactl".freeze]
+   s.extensions = ["ext/puma_http11/extconf.rb".freeze]
+-  s.files = ["History.md".freeze, "LICENSE".freeze, "README.md".freeze, "bin/puma".freeze, "bin/puma-wild".freeze, "bin/pumactl".freeze, "docs/architecture.md".freeze, "docs/deployment.md".freeze, "docs/images/puma-connection-flow-no-reactor.png".freeze, "docs/images/puma-connection-flow.png".freeze, "docs/images/puma-general-arch.png".freeze, "docs/nginx.md".freeze, "docs/plugins.md".freeze, "docs/restart.md".freeze, "docs/signals.md".freeze, "docs/systemd.md".freeze, "docs/tcp_mode.md".freeze, "ext/puma_http11/PumaHttp11Service.java".freeze, "ext/puma_http11/ext_help.h".freeze, "ext/puma_http11/extconf.rb".freeze, "ext/puma_http11/http11_parser.c".freeze, "ext/puma_http11/http11_parser.h".freeze, "ext/puma_http11/http11_parser.java.rl".freeze, "ext/puma_http11/http11_parser.rl".freeze, "ext/puma_http11/http11_parser_common.rl".freeze, "ext/puma_http11/io_buffer.c".freeze, "ext/puma_http11/mini_ssl.c".freeze, "ext/puma_http11/org/jruby/puma/Http11.java".freeze, "ext/puma_http11/or
 g/jruby/puma/Http11Parser.java".freeze, "ext/puma_http11/org/jruby/puma/IOBuffer.java".freeze, "ext/puma_http11/org/jruby/puma/MiniSSL.java".freeze, "ext/puma_http11/puma_http11.c".freeze, "lib/puma.rb".freeze, "lib/puma/accept_nonblock.rb".freeze, "lib/puma/app/status.rb".freeze, "lib/puma/binder.rb".freeze, "lib/puma/cli.rb".freeze, "lib/puma/client.rb".freeze, "lib/puma/cluster.rb".freeze, "lib/puma/commonlogger.rb".freeze, "lib/puma/configuration.rb".freeze, "lib/puma/const.rb".freeze, "lib/puma/control_cli.rb".freeze, "lib/puma/detect.rb".freeze, "lib/puma/dsl.rb".freeze, "lib/puma/events.rb".freeze, "lib/puma/io_buffer.rb".freeze, "lib/puma/jruby_restart.rb".freeze, "lib/puma/launcher.rb".freeze, "lib/puma/minissl.rb".freeze, "lib/puma/minissl/context_builder.rb".freeze, "lib/puma/null_io.rb".freeze, "lib/puma/plugin.rb".freeze, "lib/puma/plugin/tmp_restart.rb".freeze, "lib/puma/rack/builder.rb".freeze, "lib/puma/rack/urlmap.rb".freeze, "lib/puma/rack_default.rb".freeze, "lib/
 puma/reactor.rb".freeze, "lib/puma/runner.rb!
 ".freeze, "lib/puma/server.rb".freeze, "lib/puma/single.rb".freeze, "lib/puma/state_file.rb".freeze, "lib/puma/tcp_logger.rb".freeze, "lib/puma/thread_pool.rb".freeze, "lib/puma/util.rb".freeze, "lib/rack/handler/puma.rb".freeze, "tools/docker/Dockerfile".freeze, "tools/jungle/README.md".freeze, "tools/jungle/init.d/README.md".freeze, "tools/jungle/init.d/puma".freeze, "tools/jungle/init.d/run-puma".freeze, "tools/jungle/rc.d/README.md".freeze, "tools/jungle/rc.d/puma".freeze, "tools/jungle/rc.d/puma.conf".freeze, "tools/jungle/upstart/README.md".freeze, "tools/jungle/upstart/puma-manager.conf".freeze, "tools/jungle/upstart/puma.conf".freeze, "tools/trickletest.rb".freeze]
++  s.files = ["History.md".freeze, "LICENSE".freeze, "README.md".freeze, "bin/gpuma".freeze, "bin/puma-wild".freeze, "bin/gpumactl".freeze, "docs/architecture.md".freeze, "docs/deployment.md".freeze, "docs/images/puma-connection-flow-no-reactor.png".freeze, "docs/images/puma-connection-flow.png".freeze, "docs/images/puma-general-arch.png".freeze, "docs/nginx.md".freeze, "docs/plugins.md".freeze, "docs/restart.md".freeze, "docs/signals.md".freeze, "docs/systemd.md".freeze, "docs/tcp_mode.md".freeze, "ext/puma_http11/PumaHttp11Service.java".freeze, "ext/puma_http11/ext_help.h".freeze, "ext/puma_http11/extconf.rb".freeze, "ext/puma_http11/http11_parser.c".freeze, "ext/puma_http11/http11_parser.h".freeze, "ext/puma_http11/http11_parser.java.rl".freeze, "ext/puma_http11/http11_parser.rl".freeze, "ext/puma_http11/http11_parser_common.rl".freeze, "ext/puma_http11/io_buffer.c".freeze, "ext/puma_http11/mini_ssl.c".freeze, "ext/puma_http11/org/jruby/puma/Http11.java".freeze, "ext/puma_http11/
 org/jruby/puma/Http11Parser.java".freeze, "ext/puma_http11/org/jruby/puma/IOBuffer.java".freeze, "ext/puma_http11/org/jruby/puma/MiniSSL.java".freeze, "ext/puma_http11/puma_http11.c".freeze, "lib/puma.rb".freeze, "lib/puma/accept_nonblock.rb".freeze, "lib/puma/app/status.rb".freeze, "lib/puma/binder.rb".freeze, "lib/puma/cli.rb".freeze, "lib/puma/client.rb".freeze, "lib/puma/cluster.rb".freeze, "lib/puma/commonlogger.rb".freeze, "lib/puma/configuration.rb".freeze, "lib/puma/const.rb".freeze, "lib/puma/control_cli.rb".freeze, "lib/puma/detect.rb".freeze, "lib/puma/dsl.rb".freeze, "lib/puma/events.rb".freeze, "lib/puma/io_buffer.rb".freeze, "lib/puma/jruby_restart.rb".freeze, "lib/puma/launcher.rb".freeze, "lib/puma/minissl.rb".freeze, "lib/puma/minissl/context_builder.rb".freeze, "lib/puma/null_io.rb".freeze, "lib/puma/plugin.rb".freeze, "lib/puma/plugin/tmp_restart.rb".freeze, "lib/puma/rack/builder.rb".freeze, "lib/puma/rack/urlmap.rb".freeze, "lib/puma/rack_default.rb".freeze, "li
 b/puma/reactor.rb".freeze, "lib/puma/runner.!
 rb".freeze, "lib/puma/server.rb".freeze, "lib/puma/single.rb".freeze, "lib/puma/state_file.rb".freeze, "lib/puma/tcp_logger.rb".freeze, "lib/puma/thread_pool.rb".freeze, "lib/puma/util.rb".freeze, "lib/rack/handler/puma.rb".freeze, "tools/docker/Dockerfile".freeze, "tools/jungle/README.md".freeze, "tools/jungle/init.d/README.md".freeze, "tools/jungle/init.d/puma".freeze, "tools/jungle/init.d/run-puma".freeze, "tools/jungle/rc.d/README.md".freeze, "tools/jungle/rc.d/puma".freeze, "tools/jungle/rc.d/puma.conf".freeze, "tools/jungle/upstart/README.md".freeze, "tools/jungle/upstart/puma-manager.conf".freeze, "tools/jungle/upstart/puma.conf".freeze, "tools/trickletest.rb".freeze]
+   s.homepage = "https://gitlab.com/gitlab-org/gitlab-puma".freeze
+   s.licenses = ["BSD-3-Clause".freeze]
+   s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008111415.07BEF0n0020800>