ruby-redmine41: Import ruby-redmine41-4.1.0 as wip/ruby-redmine41

Redmine is a flexible project management web application. Written using the Ruby
on Rails framework, it is cross-platform and cross-database.

Redmine is open source and released under the terms of the GNU General Public
License v2 (GPL). Some of the main features of Redmine are:

   Multiple projects support
   Flexible role based access control
   Flexible issue tracking system
   Gantt chart and calendar
   News, documents & files management
   Feeds & email notifications
   Per project wiki
   Per project forums
   Time tracking
   Custom fields for issues, time-entries, projects and users
   SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
   Issue creation via email
   Multiple LDAP authentication support
   User self-registration support
   Multilanguage support
   Multiple databases support
This commit is contained in:
Atsushi Toyokura 2020-02-01 22:24:14 +09:00
parent 1d23bdda64
commit 26e6a94fe3
17 changed files with 2581 additions and 0 deletions

View File

@ -4376,6 +4376,7 @@ SUBDIR+= ruby-rake-compiler
SUBDIR+= ruby-rbpdf
SUBDIR+= ruby-rbpdf-font
SUBDIR+= ruby-redmine
SUBDIR+= ruby-redmine41
SUBDIR+= ruby-request_store
SUBDIR+= ruby-review
SUBDIR+= ruby-rinku

22
ruby-redmine41/DESCR Normal file
View File

@ -0,0 +1,22 @@
Redmine is a flexible project management web application. Written using the Ruby
on Rails framework, it is cross-platform and cross-database.
Redmine is open source and released under the terms of the GNU General Public
License v2 (GPL). Some of the main features of Redmine are:
Multiple projects support
Flexible role based access control
Flexible issue tracking system
Gantt chart and calendar
News, documents & files management
Feeds & email notifications
Per project wiki
Per project forums
Time tracking
Custom fields for issues, time-entries, projects and users
SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
Issue creation via email
Multiple LDAP authentication support
User self-registration support
Multilanguage support
Multiple databases support

15
ruby-redmine41/INSTALL Executable file
View File

@ -0,0 +1,15 @@
#!@SH@
#
# $NetBSD: INSTALL,v 1.1 2015/07/05 23:55:25 rodent Exp $
WWWGRP="@WWWGRP@"
WWWOWN="@WWWOWN@"
RM_DIR="@PREFIX@/@RM_DIR@"
case "${STAGE}" in
POST-INSTALL)
cd ${RM_DIR} &&
${CHOWN} -R ${WWWOWN} ${RM_DIR} &&
${CHGRP} -R ${WWWGRP} ${RM_DIR}
;;
esac

70
ruby-redmine41/MESSAGE Normal file
View File

@ -0,0 +1,70 @@
===========================================================================
$NetBSD: MESSAGE,v 1.3 2017/01/04 23:05:12 rodent Exp $
To use Redmine with nginx, you will need to perform the following steps.
1. If you want to use with MySQL server (by default), install
databases/mysql5[5|6|7]-* and enable it. Then, create the database.
2. Install nginx httpd server, www/nginx.
3. Setup Redmine database:
$ mysql -u root -p
> create database redmine character set utf8;
> create database redmine_development character set utf8;
> create user 'redmine'@'localhost' identified by 'redmine_password';
> grant all privileges on redmine.* to 'redmine'@'localhost';
> grant all privileges on redmine_development.* to 'redmine'@'localhost';
4. Set the database password for the redmine and redmine_development databases
in ${PREFIX}/${RM_DIR}/config/database.yml;
5. Create secret token and write to
${PREFIX}/${RM_DIR}/config/configuration.yml
# redmine41_generate_secret_token${RUBY_SUFFIX}.sh
# vi config/configuration.yml
[...]
secret_token: 'YOUR_SECRET_KEY'
[...]
6. Import some data to Redmine database, select your locale, and migrate the DB:
# redmine41_migrate_db${RUBY_SUFFIX}.sh
7. Setup nginx.
# vi ${PREFIX}/etc/nginx/nginx.conf
http {
upstream unicorn_redmine {
server unix:${PREFIX}/${RM_DIR}/unicorn.redmine.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
root ${PREFIX}/${RM_DIR};
try_files $uri @unicorn_redmine;
location @unicorn_redmine {
proxy_set_header Host $http_host;
proxy_pass http://unicorn_redmine;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root share/examples/nginx/html;
}
}
8. Start Redmine with Unicorn.
# ${RCD_SCRIPTS_DIR}/redmine41_unicorn${RUBY_SUFFIX} start
9. Start nginx.
# ${RCD_SCRIPTS_DIR}/nginx start
10. Access Redmine with username: admin and password: admin.
===========================================================================

105
ruby-redmine41/Makefile Normal file
View File

@ -0,0 +1,105 @@
# $NetBSD$
DISTNAME= redmine-4.1.0
PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME:S/redmine/redmine41/}
CATEGORIES= devel
MASTER_SITES= https://www.redmine.org/releases/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://www.redmine.org/
COMMENT= Flexible project management web application
LICENSE= gnu-gpl-v2 # and so on.
NO_CONFIGURE= yes
NO_BUILD= yes
RUBY_VERSIONS_ACCEPTED= 25 26
.include "../../lang/ruby/rubyversion.mk"
DEPENDS+= ${RUBY_PKGPREFIX}-bundler>=1.5.0:../../misc/ruby-bundler
DEPENDS+= ${RUBY_PKGPREFIX}-rails52-[0-9]*:../../www/ruby-rails52
DEPENDS+= ${RUBY_PKGPREFIX}-rouge>=3.12:../../www/ruby-rouge
DEPENDS+= ${RUBY_PKGPREFIX}-request_store>=1.4.1:../../wip/ruby-request_store
DEPENDS+= ${RUBY_PKGPREFIX}-mini_mime>=1.0.1<1.1:../../mail/ruby-mini_mime
DEPENDS+= ${RUBY_PKGPREFIX}-actionpack52-xml_parser-[0-9]*:../../wip/ruby-actionpack52-xml_parser
DEPENDS+= ${RUBY_PKGPREFIX}-roadie-rails52>=2.1.0<2.2:../../wip/ruby-roadie-rails52
DEPENDS+= ${RUBY_PKGPREFIX}-mimemagic-[0-9]*:../../misc/ruby-mimemagic
DEPENDS+= ${RUBY_PKGPREFIX}-mail>=2.7.1<2.8:../../mail/ruby-mail
DEPENDS+= ${RUBY_PKGPREFIX}-csv>=3.1.1<3.2:../../wip/ruby-csv
DEPENDS+= ${RUBY_PKGPREFIX}-nokogiri>=1.10.0<1.11:../../textproc/ruby-nokogiri
DEPENDS+= ${RUBY_PKGPREFIX}-i18n>=1.6.0:../../devel/ruby-i18n
DEPENDS+= ${RUBY_PKGPREFIX}-rbpdf>=1.20.0<1.21:../../wip/ruby-rbpdf
DEPENDS+= ${RUBY_PKGPREFIX}-tzinfo-data-[0-9]*:../../time/ruby-tzinfo-data
DEPENDS+= ${RUBY_PKGPREFIX}-net-ldap>=0.16.0<0.17:../../net/ruby-net-ldap
DEPENDS+= ${RUBY_PKGPREFIX}-ruby-openid>=2.9.2<2.10:../../security/ruby-ruby-openid
DEPENDS+= ${RUBY_PKGPREFIX}-rack-openid-[0-9]*:../../security/ruby-rack-openid
DEPENDS+= ${RUBY_PKGPREFIX}-mini-magick>=4.9.2<4.10:../../graphics/ruby-mini-magick
DEPENDS+= ${RUBY_PKGPREFIX}-redcarpet>=3.4.0<3.6.0:../../textproc/ruby-redcarpet
.include "options.mk"
RM_DIR= share/${RUBY_PKGPREFIX}-redmine41
REPLACE_RUBY+= ${DISTNAME}/bin/*
REPLACE_RUBY+= ${DISTNAME}/extra/mail_handler/rdm-mailhandler.rb
REPLACE_RUBY+= ${DISTNAME}/extra/svn/reposman.rb
REPLACE_RUBY+= ${DISTNAME}/public/dispatch.fcgi.example
SUBST_CLASSES+= shell
SUBST_FILES.shell= ${DESTDIR}${PREFIX}/bin/redmine41_*${RUBY_SUFFIX}.sh
SUBST_MESSAGE.shell= Fixing paths in helper shell scripts.
SUBST_VARS.shell= PREFIX
SUBST_VARS.shell+= RUBY
SUBST_VARS.shell+= RM_DIR
SUBST_STAGE.shell= post-install
MESSAGE_SUBST+= RM_DIR=${RM_DIR}
USE_LANGUAGES= # none
EGDIR= ${PREFIX}/share/examples/${RUBY_PKGPREFIX}-redmine41
INSTALLATION_DIRS= bin ${EGDIR} ${RM_DIR} ${RM_DIR}/config
CONF_FILES+= ${EGDIR}/configuration.yml.example \
${RM_DIR}/config/configuration.yml
CONF_FILES+= ${EGDIR}/database.yml.example \
${RM_DIR}/config/database.yml
CONF_FILES+= ${EGDIR}/additional_environment.rb.example \
${RM_DIR}/config/additional_environment.rb
.include "../../mk/bsd.prefs.mk"
APACHE_USER?= www
APACHE_GROUP?= www
PKG_GROUPS= ${APACHE_GROUP}
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}
BUILD_DEFS+= APACHE_GROUP APACHE_USER
FILES_SUBST+= WWWGRP=${APACHE_GROUP} WWWOWN=${APACHE_USER} \
RM_DIR=${RM_DIR}
do-install:
cd ${WRKSRC} && ${FIND} . -type d -exec ${INSTALL_DATA_DIR} \
${DESTDIR}${PREFIX}/${RM_DIR}/{} \;
cd ${WRKSRC} && ${FIND} . -type f ! -name "*.orig" -exec \
${INSTALL_DATA} {} ${DESTDIR}${PREFIX}/${RM_DIR}/{} \;
${INSTALL_SCRIPT} ${FILESDIR}/redmine41_migrate_plugins.sh \
${DESTDIR}${PREFIX}/bin/redmine41_migrate_plugins${RUBY_SUFFIX}.sh
${INSTALL_SCRIPT} ${FILESDIR}/redmine41_generate_secret_token.sh \
${DESTDIR}${PREFIX}/bin/redmine41_generate_secret_token${RUBY_SUFFIX}.sh
${INSTALL_SCRIPT} ${FILESDIR}/redmine41_migrate_db.sh \
${DESTDIR}${PREFIX}/bin/redmine41_migrate_db${RUBY_SUFFIX}.sh
${INSTALL_SCRIPT} ${FILESDIR}/redmine41_load_default_data.sh \
${DESTDIR}${PREFIX}/bin/redmine41_load_default_data${RUBY_SUFFIX}.sh
${TOUCH} ${DESTDIR}${PREFIX}/${RM_DIR}/Gemfile.lock
post-install: unicorn-post-install
${FIND} ${DESTDIR}/ -name ".*" \( -type f -or -type d \) | xargs rm -rf
${MV} ${DESTDIR}${PREFIX}/${RM_DIR}/config/configuration.yml.example \
${DESTDIR}/${EGDIR}
${MV} ${DESTDIR}${PREFIX}/${RM_DIR}/config/database.yml.example \
${DESTDIR}/${EGDIR}
${MV} ${DESTDIR}${PREFIX}/${RM_DIR}/config/additional_environment.rb.example \
${DESTDIR}/${EGDIR}
.include "../../lang/ruby/replace.mk"
.include "../../mk/bsd.pkg.mk"

2156
ruby-redmine41/PLIST Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
@comment $NetBSD$
${RUBY_EG}-redmine41/unicorn.rb.example
share/${RUBY_NAME}-redmine41/Gemfile.local

7
ruby-redmine41/distinfo Normal file
View File

@ -0,0 +1,7 @@
$NetBSD$
SHA1 (redmine-4.1.0.tar.gz) = af8c9433c6f27d9f9495deaa7064d05c2aada0da
RMD160 (redmine-4.1.0.tar.gz) = 062f5449726ce80e84ff9951834b09127d09e725
SHA512 (redmine-4.1.0.tar.gz) = d77eb4efe8d83a247c4462add8800297bd845276b93c7fd38b3eb5e36b7013dce39b8193b2c687de98d9da196fe8251b104363b1f16cdcbfd5a1af02d55812e7
Size (redmine-4.1.0.tar.gz) = 2709603 bytes
SHA1 (patch-Gemfile) = bef91b75c32af934ce076ee5840ed1513a43355e

View File

@ -0,0 +1 @@
gem 'unicorn'

View File

@ -0,0 +1,5 @@
#!/bin/sh
cd @PREFIX@/@RM_DIR@
@RUBY@ bin/rake generate_secret_token

View File

@ -0,0 +1,5 @@
#!/bin/sh
cd @PREFIX@/@RM_DIR@
@RUBY@ bin/rake redmine:load_default_data RAILS_ENV=production

View File

@ -0,0 +1,5 @@
#!/bin/sh
cd @PREFIX@/@RM_DIR@
@RUBY@ bin/rake db:migrate RAILS_ENV=production

View File

@ -0,0 +1,12 @@
#!/bin/sh
/etc/rc.d/redmine41_unicorn status > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo 'Please, stop Redmine unicorn before running this script.'
exit 1
fi
cd @PREFIX@/@RM_DIR@
@RUBY@ bin/rake redmine:plugins:migrate RAILS_ENV=production

View File

@ -0,0 +1,31 @@
#!/bin/sh
#
# $NetBSD: redmine_unicorn.sh,v 1.1 2015/07/05 23:55:25 rodent Exp $
#
# PROVIDE: redmine41_unicorn@RUBY_SUFFIX@
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="redmine41_unicorn@RUBY_SUFFIX@"
rcvar=$name
start_cmd="redmine41_unicorn_start"
stop_cmd="redmine41_unicorn_stop"
redmine41_unicorn_start()
{
cd @PREFIX@/@RM_DIR@
@PREFIX@/bin/unicorn@RUBY_SUFFIX@ \
-c @PREFIX@/@RM_DIR@/config/unicorn.rb \
-E production -D
}
redmine41_unicorn_stop()
{
/bin/kill -QUIT `/bin/cat @PREFIX@/@RM_DIR@/unicorn.pid`
}
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,8 @@
working_directory "@PREFIX@/@RM_DIR@"
pid "@PREFIX@/@RM_DIR@/unicorn.pid"
stderr_path "@PREFIX@/@RM_DIR@/unicorn.log"
stdout_path "@PREFIX@/@RM_DIR@/unicorn.log"
worker_processes 3
listen "@PREFIX@/@RM_DIR@/unicorn.redmine.sock"
timeout 60

59
ruby-redmine41/options.mk Normal file
View File

@ -0,0 +1,59 @@
# $NetBSD$
PKG_OPTIONS_VAR= PKG_OPTIONS.redmine41
PKG_OPTIONS_REQUIRED_GROUPS= db
PKG_OPTIONS_GROUP.db= mysql pgsql sqlite3
PKG_SUPPORTED_OPTIONS+= unicorn
PKG_SUGGESTED_OPTIONS= mysql unicorn
.include "../../mk/bsd.options.mk"
###
### Use mysql, pgsql, or sqlite3 backend
###
.if !empty(PKG_OPTIONS:Mmysql)
DEPENDS+= ${RUBY_PKGPREFIX}-mysql2>=0.5.0<0.6:../../databases/ruby-mysql2
.elif !empty(PKG_OPTIONS:Mpgsql)
DEPENDS+= ${RUBY_PKGPREFIX}-pg>=1.1.4:../../databases/ruby-pg
.elif !empty(PKG_OPTIONS:Msqlite3)
DEPENDS+= ${RUBY_PKGPREFIX}-sqlite3>=1.4.0<1.5:../../wip/ruby-sqlite3
.endif
###
### Use Unicorn web server
###
.if !empty(PKG_OPTIONS:Municorn) || make (distinfo) || make (mdi)
DEPENDS+= ${RUBY_PKGPREFIX}-unicorn-[0-9]*:../../www/ruby-unicorn
RM_PLIST_SRC+= PLIST.unicorn
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= pre-install
SUBST_MESSAGE.prefix= Setting PREFIX, RUBY_SUFFIX and RM_DIR.
SUBST_FILES.prefix= ${WRKDIR}/unicorn.rb
SUBST_VARS.prefix+= PREFIX
SUBST_VARS.prefix+= RUBY_SUFFIX
SUBST_VARS.prefix+= RM_DIR
RCD_SCRIPTS+= redmine41_unicorn${RUBY_SUFFIX}
RCD_SCRIPT_SRC.redmine41_unicorn${RUBY_SUFFIX}= ${FILESDIR}/redmine41_unicorn.sh
CONF_FILES+= ${EGDIR}/unicorn.rb.example \
${PREFIX}/${RM_DIR}/config/unicorn.rb
PLIST_SRC= ${PLIST_SRC_DFLT} ${RM_PLIST_SRC}
post-extract:
${CP} ${FILESDIR}/unicorn.rb ${WRKDIR}/unicorn.rb
.PHONY: unicorn-post-install
unicorn-post-install:
${CP} ${WRKDIR}/unicorn.rb \
${DESTDIR}${EGDIR}/unicorn.rb.example
${CP} ${FILESDIR}/Gemfile.local \
${DESTDIR}${PREFIX}/${RM_DIR}
.endif
.PHONY: unicorn-post-install
unicorn-post-install:
# nothing

View File

@ -0,0 +1,76 @@
$NetBSD$
--- Gemfile.orig 2019-12-20 12:19:44.000000000 +0000
+++ Gemfile
@@ -2,9 +2,9 @@ source 'https://rubygems.org'
gem "bundler", ">= 1.5.0"
-gem "rails", "5.2.4.1"
-gem "rouge", "~> 3.12.0"
-gem "request_store", "~> 1.4.1"
+gem "rails", "~> 5.2"
+gem "rouge", ">= 3.12.0"
+gem "request_store", ">= 1.4.1"
gem "mini_mime", "~> 1.0.1"
gem "actionpack-xml_parser"
gem "roadie-rails", (RUBY_VERSION < "2.5" ? "~> 1.3.0" : "~> 2.1.0")
@@ -12,7 +12,7 @@ gem "mimemagic"
gem "mail", "~> 2.7.1"
gem "csv", "~> 3.1.1"
gem "nokogiri", "~> 1.10.0"
-gem "i18n", "~> 1.6.0"
+gem "i18n", ">= 1.6.0"
gem "rbpdf", "~> 1.20.0"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
@@ -31,12 +31,12 @@ end
# Optional gem for exporting the gantt to a PNG file
group :minimagick do
- gem "mini_magick", "~> 4.9.5"
+ gem "mini_magick", "~> 4.9.2"
end
# Optional Markdown support, not for JRuby
group :markdown do
- gem "redcarpet", "~> 3.5.0"
+ gem "redcarpet", ">= 3.4.0"
end
# Include database gems for the adapters found in the database
@@ -53,7 +53,7 @@ if File.exist?(database_file)
when 'mysql2'
gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw]
when /postgresql/
- gem "pg", "~> 1.1.4", :platforms => [:mri, :mingw, :x64_mingw]
+ gem "pg", ">= 1.1.4", :platforms => [:mri, :mingw, :x64_mingw]
when /sqlite3/
gem "sqlite3", "~> 1.4.0", :platforms => [:mri, :mingw, :x64_mingw]
when /sqlserver/
@@ -70,25 +70,6 @@ else
warn("Please configure your config/database.yml first")
end
-group :development do
- gem "yard"
-end
-
-group :test do
- gem "rails-dom-testing"
- gem 'mocha', '>= 1.4.0'
- gem "simplecov", "~> 0.17.0", :require => false
- gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
- # For running system tests
- gem 'puma', '~> 3.7'
- gem "capybara", (RUBY_VERSION < "2.4" ? "~> 3.15.1" : "~> 3.25.0")
- gem "selenium-webdriver"
- # RuboCop
- gem 'rubocop', '~> 0.76.0'
- gem 'rubocop-performance', '~> 1.5.0'
- gem 'rubocop-rails', '~> 2.3.0'
-end
-
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
eval_gemfile local_gemfile