From owner-svn-ports-all@freebsd.org Tue Mar 14 16:39:32 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 796D2D0C5A7; Tue, 14 Mar 2017 16:39:32 +0000 (UTC) (envelope-from tz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4606634A; Tue, 14 Mar 2017 16:39:32 +0000 (UTC) (envelope-from tz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2EGdVXk035114; Tue, 14 Mar 2017 16:39:31 GMT (envelope-from tz@FreeBSD.org) Received: (from tz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2EGdVx9035112; Tue, 14 Mar 2017 16:39:31 GMT (envelope-from tz@FreeBSD.org) Message-Id: <201703141639.v2EGdVx9035112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tz set sender to tz@FreeBSD.org using -f From: Torsten Zuehlsdorff Date: Tue, 14 Mar 2017 16:39:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r436164 - in head/www/gitlab: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 16:39:32 -0000 Author: tz Date: Tue Mar 14 16:39:31 2017 New Revision: 436164 URL: https://svnweb.freebsd.org/changeset/ports/436164 Log: www/gitlab: Add options for selection between PostgreSQL and MySQL support Reviewed by: remko Modified: head/www/gitlab/Makefile head/www/gitlab/files/patch-Gemfile Modified: head/www/gitlab/Makefile ============================================================================== --- head/www/gitlab/Makefile Tue Mar 14 16:13:46 2017 (r436163) +++ head/www/gitlab/Makefile Tue Mar 14 16:39:31 2017 (r436164) @@ -4,7 +4,7 @@ PORTNAME= gitlab PORTVERSION= 8.14.9 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www devel MAINTAINER= tz@FreeBSD.org @@ -13,10 +13,18 @@ COMMENT= Web GUI for managing git reposi LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE +OPTIONS_SINGLE= DATABASE +OPTIONS_SINGLE_DATABASE= PGSQL MYSQL +OPTIONS_DEFAULT= PGSQL +PGSQL_DESC= Default PostgreSQL support (preferred) +MYSQL_DESC= Optional MySQL support + BUILD_DEPENDS= gem:devel/ruby-gems # the rubygems of RUN_DEPENDS matches the order of the Gemfile # which makes maintaining this long list much easier! +# only rubygem-pg and rubygem-mysql are defined later as RUN_DEPENDS +# for the options RUN_DEPENDS= git>=2.7.4:devel/git \ gitlab-shell>=4.1.1:devel/gitlab-shell\ gitlab-workhorse>=1.1.1:www/gitlab-workhorse \ @@ -27,7 +35,6 @@ RUN_DEPENDS= git>=2.7.4:devel/git \ rubygem-sprockets3>=3.7:devel/rubygem-sprockets3 \ rubygem-sprockets-es6>=0.9.2:devel/rubygem-sprockets-es6 \ rubygem-default_value_for>=3.0.1:devel/rubygem-default_value_for \ - rubygem-pg>=0.18.2:databases/rubygem-pg \ rubygem-devise>=4.2:devel/rubygem-devise \ rubygem-doorkeeper>=4.2.0:security/rubygem-doorkeeper \ rubygem-omniauth>=1.3.2:security/rubygem-omniauth \ @@ -155,7 +162,8 @@ RUN_DEPENDS= git>=2.7.4:devel/git \ rubygem-sys-filesystem>=1.1.6:sysutils/rubygem-sys-filesystem \ rubygem-rinku>=1.7.3:www/rubygem-rinku -USES= pgsql +PGSQL_RUN_DEPENDS= rubygem-pg>=0.18.2:databases/rubygem-pg +MYSQL_RUN_DEPENDS= rubygem-mysql2>=0.4.5:databases/rubygem-mysql2 USE_RUBY= yes @@ -170,6 +178,14 @@ GROUPS= git NO_ARCH= yes NO_BUILD= yes +post-patch-MYSQL-on: + ${ECHO} "gem 'mysql2', '>= 0.3.16', group: :mysql" >> ${WRKSRC}/Gemfile + ${CP} ${WRKSRC}/config/database.yml.mysql ${WRKSRC}/config/database.yml.sample + +post-patch-PGSQL-on: + ${ECHO} "gem 'pg', '>= 0.18.2', group: :postgres" >> ${WRKSRC}/Gemfile + ${CP} ${WRKSRC}/config/database.yml.postgresql ${WRKSRC}/config/database.yml.sample + do-install: ${FIND} ${WRKSRC} -name '*.orig' -delete ${FIND} ${WRKSRC} -name '*.bak' -delete @@ -183,7 +199,6 @@ do-install: ${MV} ${WRKSRC}/config/initializers/rack_attack.rb.example ${WRKSRC}/config/initializers/rack_attack.rb.sample ${MV} ${WRKSRC}/lib/support/nginx/gitlab ${WRKSRC}/lib/support/nginx/gitlab.sample ${MV} ${WRKSRC}/lib/support/nginx/gitlab-ssl ${WRKSRC}/lib/support/nginx/gitlab-ssl.sample - ${CP} ${WRKSRC}/config/database.yml.postgresql ${WRKSRC}/config/database.yml.sample ${MKDIR} ${STAGEDIR}/home/git/repositories ${MKDIR} ${STAGEDIR}${PREFIX}/www/${PORTNAME}/public/assets ${MKDIR} ${STAGEDIR}${PREFIX}/www/${PORTNAME}/tmp/cache Modified: head/www/gitlab/files/patch-Gemfile ============================================================================== --- head/www/gitlab/files/patch-Gemfile Tue Mar 14 16:13:46 2017 (r436163) +++ head/www/gitlab/files/patch-Gemfile Tue Mar 14 16:39:31 2017 (r436164) @@ -1,6 +1,6 @@ --- Gemfile.orig 2017-02-14 21:48:43 UTC +++ Gemfile -@@ -1,20 +1,19 @@ +@@ -1,20 +1,16 @@ source 'https://rubygems.org' -gem 'rails', '4.2.7.1' @@ -16,16 +16,15 @@ # Default values for AR models -gem 'default_value_for', '~> 3.0.0' -+gem 'default_value_for', '>= 3.0.0' - - # Supported DBs +- +-# Supported DBs -gem 'mysql2', '~> 0.3.16', group: :mysql -gem 'pg', '~> 0.18.2', group: :postgres -+gem 'pg', '>= 0.18.2', group: :postgres ++gem 'default_value_for', '>= 3.0.0' # Authentication libraries gem 'devise', '~> 4.2' -@@ -28,16 +27,15 @@ gem 'omniauth-facebook', '~> 4.0.0' +@@ -28,16 +24,15 @@ gem 'omniauth-facebook', '~> 4.0.0' gem 'omniauth-github', '~> 1.1.1' gem 'omniauth-gitlab', '~> 1.0.2' gem 'omniauth-google-oauth2', '~> 0.4.1' @@ -45,7 +44,7 @@ gem 'akismet', '~> 2.0' # Two-factor authentication -@@ -64,10 +62,10 @@ gem 'gollum-lib', '~> 4.2', require: fal +@@ -64,10 +59,10 @@ gem 'gollum-lib', '~> 4.2', require: fal gem 'gollum-rugged_adapter', '~> 0.4.2', require: false # Language detection @@ -58,7 +57,7 @@ gem 'grape-entity', '~> 0.6.0' gem 'rack-cors', '~> 0.4.0', require: 'rack/cors' -@@ -75,10 +73,10 @@ gem 'rack-cors', '~> 0.4.0', require: +@@ -75,10 +70,10 @@ gem 'rack-cors', '~> 0.4.0', require: gem 'kaminari', '~> 0.17.0' # HAML @@ -71,7 +70,7 @@ # Drag and Drop UI gem 'dropzonejs-rails', '~> 0.7.1' -@@ -100,28 +98,28 @@ gem 'seed-fu', '~> 2.3.5' +@@ -100,28 +95,28 @@ gem 'seed-fu', '~> 2.3.5' # Markdown and HTML processing gem 'html-pipeline', '~> 1.11.0' @@ -106,7 +105,7 @@ gem 'unicorn-worker-killer', '~> 0.4.4' end -@@ -140,7 +138,7 @@ gem 'redis-namespace', '~> 1.5.2' +@@ -140,7 +135,7 @@ gem 'redis-namespace', '~> 1.5.2' gem 'sidekiq-limit_fetch', '~> 3.4' # HTTP requests @@ -115,7 +114,7 @@ # Colored output to console gem 'rainbow', '~> 2.1.0' -@@ -163,7 +161,7 @@ gem 'connection_pool', '~> 2.0' +@@ -163,7 +158,7 @@ gem 'connection_pool', '~> 2.0' gem 'hipchat', '~> 1.5.0' # JIRA integration @@ -124,7 +123,7 @@ # Flowdock integration gem 'gitlab-flowdock-git-hook', '~> 1.0.1' -@@ -172,10 +170,10 @@ gem 'gitlab-flowdock-git-hook', '~> 1.0. +@@ -172,10 +167,10 @@ gem 'gitlab-flowdock-git-hook', '~> 1.0. gem 'gemnasium-gitlab-service', '~> 0.2' # Slack integration @@ -137,7 +136,7 @@ # FogBugz integration gem 'ruby-fogbugz', '~> 0.2.1' -@@ -187,17 +185,17 @@ gem 'd3_rails', '~> 3.5.0' +@@ -187,17 +182,17 @@ gem 'd3_rails', '~> 3.5.0' gem 'underscore-rails', '~> 1.8.0' # Sanitize user input @@ -158,7 +157,7 @@ # Ace editor gem 'ace-rails-ap', '~> 4.1.0' -@@ -217,114 +215,31 @@ gem 'chronic_duration', '~> 0.10.6' +@@ -217,114 +212,31 @@ gem 'chronic_duration', '~> 0.10.6' gem 'sass-rails', '~> 5.0.6' gem 'coffee-rails', '~> 4.1.0' @@ -281,7 +280,7 @@ gem 'mail_room', '~> 0.9.0' -@@ -340,8 +255,10 @@ gem 'oauth2', '~> 1.2.0' +@@ -340,8 +252,10 @@ gem 'oauth2', '~> 1.2.0' gem 'paranoia', '~> 2.0' # Health check