diff options
author | Matthias Fechner <mfechner@FreeBSD.org> | 2020-08-11 22:15:00 +0800 |
---|---|---|
committer | Matthias Fechner <mfechner@FreeBSD.org> | 2020-08-11 22:15:00 +0800 |
commit | 711b0fc2f2fe7c56a680be6a03598387fff8feda (patch) | |
tree | ee1bf362d46c66add2f7699b9e9486c0f73a00da | |
parent | 615fadcde7fb46f804859e0f9604694fa777f205 (diff) | |
download | freebsd-ports-gnome-711b0fc2f2fe7c56a680be6a03598387fff8feda.tar.gz freebsd-ports-gnome-711b0fc2f2fe7c56a680be6a03598387fff8feda.tar.zst freebsd-ports-gnome-711b0fc2f2fe7c56a680be6a03598387fff8feda.zip |
Switch gitlab internal webserver to puma.
Gitlab switched with version 13.0 to puma as default.
PR: 247564
-rw-r--r-- | www/gitlab-ce/Makefile | 2 | ||||
-rw-r--r-- | www/gitlab-ce/files/gitlab.in | 2 | ||||
-rw-r--r-- | www/gitlab-ce/files/patch-bin_actioncable | 11 | ||||
-rw-r--r-- | www/gitlab-ce/files/patch-bin_web__puma | 11 | ||||
-rw-r--r-- | www/gitlab-ce/files/patch-config_puma.rb.example | 15 | ||||
-rw-r--r-- | www/rubygem-gitlab-puma/Makefile | 7 | ||||
-rw-r--r-- | www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec | 14 |
7 files changed, 56 insertions, 6 deletions
diff --git a/www/gitlab-ce/Makefile b/www/gitlab-ce/Makefile index dadf069a7ae0..dae9965f3739 100644 --- a/www/gitlab-ce/Makefile +++ b/www/gitlab-ce/Makefile @@ -3,7 +3,7 @@ PORTNAME= gitlab-ce PORTVERSION= 13.2.3 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= www devel MAINTAINER= mfechner@FreeBSD.org diff --git a/www/gitlab-ce/files/gitlab.in b/www/gitlab-ce/files/gitlab.in index 18e22fc7fe5a..a331409adc6e 100644 --- a/www/gitlab-ce/files/gitlab.in +++ b/www/gitlab-ce/files/gitlab.in @@ -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) diff --git a/www/gitlab-ce/files/patch-bin_actioncable b/www/gitlab-ce/files/patch-bin_actioncable new file mode 100644 index 000000000000..f712a282eb24 --- /dev/null +++ b/www/gitlab-ce/files/patch-bin_actioncable @@ -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() diff --git a/www/gitlab-ce/files/patch-bin_web__puma b/www/gitlab-ce/files/patch-bin_web__puma new file mode 100644 index 000000000000..528bfe4ce1df --- /dev/null +++ b/www/gitlab-ce/files/patch-bin_web__puma @@ -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() diff --git a/www/gitlab-ce/files/patch-config_puma.rb.example b/www/gitlab-ce/files/patch-config_puma.rb.example index 1e8a8a51bdc2..24928ff974ef 100644 --- a/www/gitlab-ce/files/patch-config_puma.rb.example +++ b/www/gitlab-ce/files/patch-config_puma.rb.example @@ -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 diff --git a/www/rubygem-gitlab-puma/Makefile b/www/rubygem-gitlab-puma/Makefile index 590599ae0677..f77d7453e033 100644 --- a/www/rubygem-gitlab-puma/Makefile +++ b/www/rubygem-gitlab-puma/Makefile @@ -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> diff --git a/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec b/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec new file mode 100644 index 000000000000..5fef51f7d4ab --- /dev/null +++ b/www/rubygem-gitlab-puma/files/patch-gitlab-puma.gemspec @@ -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/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, "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, "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.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) |