diff options
| author | Matt Kempe <fsbruva@yahoo.com> | 2025-11-30 19:02:24 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2025-11-30 23:00:29 +0000 |
| commit | da111ef51c2f5c7d4058ced2475a19d0eab95c19 (patch) | |
| tree | 0338d7b948712a17b0ba6568321761d3d66b5ff7 | |
| parent | 2a1eb94f194054c015e81b59192b42f2ca8910c9 (diff) | |
www/redmine60: Use puma 7, fix install directories
This commit also modernizes the port's dependencies and configuration
options.
Redmine 6.0 has changed to use a slightly different directory structure
from previous versions. The installation now creates public/assets and
tmp/pdf directories that Redmine 6.x expects, preventing runtime errors
related to missing directories.
Support for Puma 7 allows users to benefit from the latest web server
performance improvements among other enhancements.
Database configuration is now clearer with mutually exclusive options that
prevent misconfiguration. SQLite and SQL Server support give users more
deployment flexibility, though SQLite is clearly marked as unsuitable for
production use.
Use the standardized "PGSQL" naming for PostgreSQL which aligns with
other ports.
The new database.yml.sample patch helps users avoid common configuration
mistakes by providing inline documentation for connection settings, ports,
and encoding options.
PR: 291306
| -rw-r--r-- | www/redmine60/Makefile | 50 | ||||
| -rw-r--r-- | www/redmine60/files/patch-config_database.yml.sample | 39 | ||||
| -rw-r--r-- | www/redmine60/files/sql.rb | 2 | ||||
| -rw-r--r-- | www/redmine60/files/sqlite3.rb | 1 | ||||
| -rw-r--r-- | www/redmine60/pkg-message | 6 | ||||
| -rw-r--r-- | www/redmine60/pkg-plist | 7 |
6 files changed, 85 insertions, 20 deletions
diff --git a/www/redmine60/Makefile b/www/redmine60/Makefile index 09a51e3d1ba8..4ad15e327fec 100644 --- a/www/redmine60/Makefile +++ b/www/redmine60/Makefile @@ -1,5 +1,6 @@ PORTNAME= redmine PORTVERSION= 6.0.7 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://www.redmine.org/releases/ PKGNAMESUFFIX= 60 @@ -29,58 +30,63 @@ RUN_DEPENDS= rubygem-actionpack-xml_parser-rails72>=0:textproc/rubygem-actionpac rubygem-net-ldap>=0.19.0:net/rubygem-net-ldap \ rubygem-net-pop>=0.1.2:mail/rubygem-net-pop \ rubygem-net-smtp>=0.3.3:mail/rubygem-net-smtp \ - rubygem-nokogiri>=1.15.2:textproc/rubygem-nokogiri \ + rubygem-nokogiri>=1.18.3:textproc/rubygem-nokogiri \ rubygem-rails72>=7.2.2:www/rubygem-rails72 \ - rubygem-rbpdf>=1.21.3:print/rubygem-rbpdf \ + rubygem-rbpdf>=1.21.4:print/rubygem-rbpdf \ rubygem-request_store15>=1.5.1:devel/rubygem-request_store15 \ rubygem-roadie-rails-rails72>=3.2.0:mail/rubygem-roadie-rails-rails72 \ rubygem-rotp>=5.0.0:devel/rubygem-rotp \ - rubygem-rouge>=4.2.0:textproc/rubygem-rouge \ + rubygem-rouge>=4.5.0:textproc/rubygem-rouge \ rubygem-rqrcode>0:www/rubygem-rqrcode \ rubygem-rubocop-performance>=0:devel/rubygem-rubocop-performance \ rubygem-rubocop-rails>0:devel/rubygem-rubocop-rails \ rubygem-rubocop>0<2:devel/rubygem-rubocop \ - rubygem-rubyzip>0:archivers/rubygem-rubyzip \ + rubygem-rubyzip>2.3.0:archivers/rubygem-rubyzip \ rubygem-simplecov>0:devel/rubygem-simplecov \ rubygem-svg_sprite>=0:graphics/rubygem-svg_sprite \ rubygem-yard>=0:textproc/rubygem-yard # Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264638#c9 # to be removed if https://www.redmine.org/issues/37394 is fixed -RUN_DEPENDS+= rubygem-redcarpet>=3.6.0:textproc/rubygem-redcarpet \ +RUN_DEPENDS+= rubygem-commonmarker0>=0.23.8:textproc/rubygem-commonmarker0 \ + rubygem-deckar01-task_list>=2.3.2:www/rubygem-deckar01-task_list \ rubygem-html-pipeline>=2.13.2:textproc/rubygem-html-pipeline \ - rubygem-commonmarker0>=0.23.8:textproc/rubygem-commonmarker0 \ - rubygem-sanitize>=6.0:textproc/rubygem-sanitize \ - rubygem-deckar01-task_list>=2.3.2:www/rubygem-deckar01-task_list + rubygem-redcarpet>=3.6.0:textproc/rubygem-redcarpet \ + rubygem-sanitize>=6.0:textproc/rubygem-sanitize USES= cpe ruby NO_ARCH= yes NO_BUILD= yes +SUB_LIST= RUBY_SUFFIX=${RUBY_SUFFIX} USERS= ${WWWOWN} GROUPS= ${WWWGRP} PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} -SUB_LIST= RUBY_SUFFIX=${RUBY_SUFFIX} -OPTIONS_DEFINE= MYSQL POSTGRESQL PUMA MARKDOWN RMAGIC +OPTIONS_DEFINE= PUMA MARKDOWN RMAGIC OPTIONS_DEFAULT=MYSQL MARKDOWN PUMA RMAGIC +OPTIONS_SINGLE= DB +OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE SQL +NO_OPTIONS_SORT= yes OPTIONS_SUB= yes -POSTGRESQL_DESC=Enable PostgreSQL support MARKDOWN_DESC= Enable Markdown support +MYSQL_DESC= MySQL database support (via mysql2 rubygem) +PGSQL_DESC= Postgres database support (via pg rubygem) PUMA_DESC= Use Puma WEB server RMAGIC_DESC= Enable Gantt charts support -MYSQL_DESC= MySQL database support (via mysql2 rubygem) -NO_OPTIONS_SORT= yes +SQLITE_DESC= Sqlite3 database support (Not for production!) +SQL_DESC= SQL Server requires manual (non-port) gem install +MARKDOWN_RUN_DEPENDS= rubygem-redcarpet>=3.5.1:textproc/rubygem-redcarpet MYSQL_RUN_DEPENDS= rubygem-mysql2>=0.5.0:databases/rubygem-mysql2 \ rubygem-with_advisory_lock61>0:devel/rubygem-with_advisory_lock61 -POSTGRESQL_RUN_DEPENDS= rubygem-pg>=1.2.2:databases/rubygem-pg -PUMA_RUN_DEPENDS= rubygem-puma6>=6.5.0<7:www/rubygem-puma6 \ +PGSQL_RUN_DEPENDS= rubygem-pg>=1.5.3:databases/rubygem-pg +PUMA_RUN_DEPENDS= rubygem-puma>=6.5.0:www/rubygem-puma \ rubygem-rb-kqueue>=0.2:devel/rubygem-rb-kqueue PUMA_SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} PUMA_VARS= USE_RC_SUBR=redmine -MARKDOWN_RUN_DEPENDS= rubygem-redcarpet>=3.5.1:textproc/rubygem-redcarpet RMAGIC_RUN_DEPENDS= rubygem-mini_magick4>=4.11.0:graphics/rubygem-mini_magick4 +SQLITE_RUN_DEPENDS= rubygem-sqlite3>=1.7.0:databases/rubygem-sqlite3 .include <bsd.port.options.mk> @@ -97,8 +103,8 @@ do-install: ${MKDIR} ${STAGEDIR}${WWWDIR} ${MKDIR} ${STAGEDIR}${WWWDIR}/bundler.d ${MKDIR} ${STAGEDIR}${WWWDIR}/log - ${MKDIR} ${STAGEDIR}${WWWDIR}/public/plugin_assets - ${MKDIR} ${STAGEDIR}${WWWDIR}/tmp + ${MKDIR} ${STAGEDIR}${WWWDIR}/public/assets + ${MKDIR} ${STAGEDIR}${WWWDIR}/tmp/pdf # https://www.redmine.org/issues/37394 ${CP} ${FILESDIR}/commonmark.rb ${STAGEDIR}${WWWDIR}/bundler.d @@ -108,9 +114,15 @@ do-install: do-install-MYSQL-on: ${CP} ${FILESDIR}/mysql.rb ${STAGEDIR}${WWWDIR}/bundler.d -do-install-POSTGRESQL-on: +do-install-PGSQL-on: ${CP} ${FILESDIR}/pg.rb ${STAGEDIR}${WWWDIR}/bundler.d +do-install-SQLITE-on: + ${CP} ${FILESDIR}/sqlite3.rb ${STAGEDIR}${WWWDIR}/bundler.d + +do-install-SQL-on: + ${CP} ${FILESDIR}/sql.rb ${STAGEDIR}${WWWDIR}/bundler.d + do-install-MARKDOWN-on: ${CP} ${FILESDIR}/markdown.rb ${STAGEDIR}${WWWDIR}/bundler.d diff --git a/www/redmine60/files/patch-config_database.yml.sample b/www/redmine60/files/patch-config_database.yml.sample new file mode 100644 index 000000000000..9c33eff03144 --- /dev/null +++ b/www/redmine60/files/patch-config_database.yml.sample @@ -0,0 +1,39 @@ +--- config/database.yml.sample.orig 2025-09-21 10:15:06.000000000 +0000 ++++ config/database.yml.sample 2025-11-26 13:53:51.979489000 +0000 +@@ -1,7 +1,12 @@ + # Default setup is given for MySQL 5.7.7 or later. + # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. + # Line indentation must be 2 spaces (no tabs). ++# Delete/comment all non-installed adapter entries + ++# WARNING: Changing database adapter requires manually reinstalling the bundle ++# or rebuilding/reinstalling the port with corrected OPTIONS. ++ ++# Uses default port of 3306, can be specified with 'port:' + production: + adapter: mysql2 + database: redmine +@@ -43,12 +48,15 @@ + transaction_isolation: "READ-COMMITTED" + + # PostgreSQL configuration example ++# Uses default port of 5432, can be specified with 'port:' ++# Uses default schema of public, can be specified with 'schema_search_path:' + #production: + # adapter: postgresql + # database: redmine + # host: localhost + # username: postgres + # password: "postgres" ++# encoding: utf8 + + # SQLite3 configuration example + #production: +@@ -56,6 +64,7 @@ + # database: db/redmine.sqlite3 + + # SQL Server configuration example ++# Uses default port of 1433, can be specified with 'port:' + #production: + # adapter: sqlserver + # database: redmine diff --git a/www/redmine60/files/sql.rb b/www/redmine60/files/sql.rb new file mode 100644 index 000000000000..89111a6710c0 --- /dev/null +++ b/www/redmine60/files/sql.rb @@ -0,0 +1,2 @@ +gem "tiny_tds", "~> 2.1.2" +gem "activerecord-sqlserver-adapter", "~> 7.2.0" diff --git a/www/redmine60/files/sqlite3.rb b/www/redmine60/files/sqlite3.rb new file mode 100644 index 000000000000..284c34965fea --- /dev/null +++ b/www/redmine60/files/sqlite3.rb @@ -0,0 +1 @@ +gem "sqlite3", ">= 1.7.0" diff --git a/www/redmine60/pkg-message b/www/redmine60/pkg-message index c3cc5bf40b02..44c39973b129 100644 --- a/www/redmine60/pkg-message +++ b/www/redmine60/pkg-message @@ -6,6 +6,12 @@ Redmine was installed. You now need to setup your Redmine installation so please have a look at the Installation Guide. +Steps 1, 4 and 8 were completed by the pkg install. Step 10 +is accomplished using the rc script. The other steps must be +completed manually. + +SQL Server users must manually install needed ruby gems. + https://www.redmine.org/projects/redmine/wiki/RedmineInstall If you are upgrading please read the Upgrading Guide diff --git a/www/redmine60/pkg-plist b/www/redmine60/pkg-plist index e1139fbc7129..0c36eda200f3 100644 --- a/www/redmine60/pkg-plist +++ b/www/redmine60/pkg-plist @@ -1031,7 +1031,9 @@ %%MARKDOWN%%%%WWWDIR%%/bundler.d/markdown.rb %%RMAGIC%%%%WWWDIR%%/bundler.d/mini_magick.rb %%MYSQL%%%%WWWDIR%%/bundler.d/mysql.rb -%%POSTGRESQL%%%%WWWDIR%%/bundler.d/pg.rb +%%PGSQL%%%%WWWDIR%%/bundler.d/pg.rb +%%SQLITE%%%%WWWDIR%%/bundler.d/sqlite3.rb +%%SQL%%%%WWWDIR%%/bundler.d/sql.rb %%PUMA%%%%WWWDIR%%/bundler.d/puma.rb %%WWWDIR%%/config.ru %%WWWDIR%%/config/additional_environment.rb.example @@ -2162,6 +2164,7 @@ @dir %%WWWDIR%%/app/views/previews @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/files @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/log +@dir(%%WWWOWN%%,%%WWWGRP%%,755) %%WWWDIR%%/public/assets @dir %%WWWDIR%%/public/help/ar @dir %%WWWDIR%%/public/help/az @dir %%WWWDIR%%/public/help/bg @@ -2216,8 +2219,10 @@ @dir %%WWWDIR%%/test/fixtures/mailer @dir %%WWWDIR%%/test/mocks/development @dir %%WWWDIR%%/test/mocks/test +@dir(%%WWWOWN%%,%%WWWGRP%%,755) %%WWWDIR%%/tmp @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/cache @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/imports +@dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/pdf @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/sessions @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/sockets @dir(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/test |
