diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/redmine/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/redmine/files')
-rw-r--r-- | www-apps/redmine/files/10_redmine_vhost.conf | 12 | ||||
-rw-r--r-- | www-apps/redmine/files/additional_environment.rb | 7 | ||||
-rw-r--r-- | www-apps/redmine/files/redmine-3.3.4_requires.patch | 60 | ||||
-rw-r--r-- | www-apps/redmine/files/redmine-3.initd | 45 | ||||
-rw-r--r-- | www-apps/redmine/files/redmine.confd | 13 | ||||
-rw-r--r-- | www-apps/redmine/files/redmine.logrotate | 9 |
6 files changed, 146 insertions, 0 deletions
diff --git a/www-apps/redmine/files/10_redmine_vhost.conf b/www-apps/redmine/files/10_redmine_vhost.conf new file mode 100644 index 000000000000..33a117a91e52 --- /dev/null +++ b/www-apps/redmine/files/10_redmine_vhost.conf @@ -0,0 +1,12 @@ +<IfModule passenger_module>
+Listen 3000
+<VirtualHost *:3000>
+ DocumentRoot /var/lib/redmine/public
+# RailsEnv production
+ <Directory "/var/lib/redmine/public">
+ Options FollowSymLinks
+ Order allow,deny
+ Allow from all
+ </Directory>
+</VirtualHost>
+</IfModule>
diff --git a/www-apps/redmine/files/additional_environment.rb b/www-apps/redmine/files/additional_environment.rb new file mode 100644 index 000000000000..a4e9baf758a1 --- /dev/null +++ b/www-apps/redmine/files/additional_environment.rb @@ -0,0 +1,7 @@ +# Copy this file to additional_environment.rb and add any statements +# that need to be passed to the Rails::Initializer. `config` is +# available in this context. + +# Place log-files to /var/log/redmine +config.logger = Logger.new(Rails.root.join("/var/log/redmine",Rails.env + ".log"), 0, 10485760) +config.log_level= :info diff --git a/www-apps/redmine/files/redmine-3.3.4_requires.patch b/www-apps/redmine/files/redmine-3.3.4_requires.patch new file mode 100644 index 000000000000..e4510839cf48 --- /dev/null +++ b/www-apps/redmine/files/redmine-3.3.4_requires.patch @@ -0,0 +1,60 @@ +diff -Nuar redmine-3.3.3-orig/app/controllers/application_controller.rb redmine-3.3.3/app/controllers/application_controller.rb +--- redmine-3.3.3-orig/app/controllers/application_controller.rb 2017-05-24 21:05:03.515966923 +0500 ++++ redmine-3.3.3/app/controllers/application_controller.rb 2017-05-24 21:07:22.629960174 +0500 +@@ -15,6 +15,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ++require 'request_store' + require 'uri' + require 'cgi' + +diff -Nuar redmine-3.3.3-orig/app/controllers/welcome_controller.rb redmine-3.3.3/app/controllers/welcome_controller.rb +--- redmine-3.3.3-orig/app/controllers/welcome_controller.rb 2017-05-24 21:05:03.514966923 +0500 ++++ redmine-3.3.3/app/controllers/welcome_controller.rb 2017-05-24 21:08:14.895957638 +0500 +@@ -15,6 +15,9 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ++require 'action_controller' ++require 'action_controller/action_caching' ++ + class WelcomeController < ApplicationController + caches_action :robots + +diff -Nuar redmine-3.3.3-orig/app/models/custom_field.rb redmine-3.3.3/app/models/custom_field.rb +--- redmine-3.3.3-orig/app/models/custom_field.rb 2017-05-24 21:05:03.513966923 +0500 ++++ redmine-3.3.3/app/models/custom_field.rb 2017-05-24 21:08:32.223956797 +0500 +@@ -15,6 +15,8 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ++require 'protected_attributes' ++ + class CustomField < ActiveRecord::Base + include Redmine::SubclassFactory + +diff -Nuar redmine-3.3.3-orig/app/models/mailer.rb redmine-3.3.3/app/models/mailer.rb +--- redmine-3.3.3-orig/app/models/mailer.rb 2017-05-24 21:05:03.514966923 +0500 ++++ redmine-3.3.3/app/models/mailer.rb 2017-05-24 21:05:47.039964812 +0500 +@@ -16,6 +16,7 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + require 'roadie' ++require 'roadie-rails' + + class Mailer < ActionMailer::Base + layout 'mailer' +diff -Nuar redmine-3.3.3-orig/config/application.rb redmine-3.3.3/config/application.rb +--- redmine-3.3.3-orig/config/application.rb 2017-05-24 21:05:03.689966915 +0500 ++++ redmine-3.3.3/config/application.rb 2017-05-24 21:05:35.723965361 +0500 +@@ -1,8 +1,8 @@ + require File.expand_path('../boot', __FILE__) + + require 'rails/all' ++require 'action_dispatch/xml_params_parser' + +-Bundler.require(*Rails.groups) + + module RedmineApp + class Application < Rails::Application diff --git a/www-apps/redmine/files/redmine-3.initd b/www-apps/redmine/files/redmine-3.initd new file mode 100644 index 000000000000..507987034be3 --- /dev/null +++ b/www-apps/redmine/files/redmine-3.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +RAILS_ENV=${RAILS_ENV:-production} +REDMINE_DIR=${REDMINE_DIR:-/var/lib/redmine} +REDMINE_ADDRESS=${REDMINE_ADDRESS:-localhost} +REDMINE_PORT=${REDMINE_PORT:-3000} +REDMINE_USER=${REDMINE_USER:-redmine} +REDMINE_GROUP=${REDMINE_GROUP:-redmine} +REDMINE_PIDFILE="/var/run/redmine/server.pid" + +depend() { + use git-daemon mysql net postgresql svnserve +} + +start_pre() { + if [ ! -e "${REDMINE_DIR}/config/initializers/secret_token.rb" ] ; then + eerror "Execute the following command to initialize environment:" + eerror + eerror "# emerge --config www-apps/redmine" + eerror + return 1 + fi + checkpath -q -d -m 0755 -o redmine:redmine /var/run/redmine +} + +start() { + ebegin "Starting redmine" + start-stop-daemon --start --quiet \ + --user "${REDMINE_USER}:${REDMINE_GROUP}" \ + --pidfile "${REDMINE_PIDFILE}" \ + --exec /usr/bin/ruby "${REDMINE_DIR}"/bin/rails server -- \ + --daemon --environment="${RAILS_ENV}" \ + --binding="${REDMINE_ADDRESS}" --port="${REDMINE_PORT}" \ + --pid="${REDMINE_PIDFILE}" \ + ${REDMINE_OPTS} + eend $? +} + +stop() { + ebegin "Stopping redmine" + start-stop-daemon --signal INT --quiet --pidfile "${REDMINE_PIDFILE}" + eend $? +} diff --git a/www-apps/redmine/files/redmine.confd b/www-apps/redmine/files/redmine.confd new file mode 100644 index 000000000000..1c3830a09b07 --- /dev/null +++ b/www-apps/redmine/files/redmine.confd @@ -0,0 +1,13 @@ +# /etc/conf.d/redmine: config file for /etc/init.d/redmine +# Bind to specified address +# You can set to 0.0.0.0 to accept requests anywhere +#REDMINE_ADDRESS="localhost" + +# Port +#REDMINE_PORT=3000 + +# RAILS_ENV +#RAILS_ENV=production + +# additional opts +#REDMINE_OPTS="" diff --git a/www-apps/redmine/files/redmine.logrotate b/www-apps/redmine/files/redmine.logrotate new file mode 100644 index 000000000000..69e98cb3fc64 --- /dev/null +++ b/www-apps/redmine/files/redmine.logrotate @@ -0,0 +1,9 @@ +/var/log/redmine/*.log { + daily + missingok + rotate 7 + compress + delaycompress + notifempty + copytruncate +} |