From 6740373ee89ef38b3e1dca1bbdf82277a67183f1 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Wed, 23 Apr 2014 13:38:53 +0000 Subject: [PATCH] - Fix permission on redmine directories: log, files, tmp and public as described in the redmine installation guide [1] - Add gem thin in the Gemfile if the option THIN is enabled, otherwise won't start [1] - Clean up the makefile, CHOWN commands in the Makefile are useless with stage [1] - Update Gemfile patch to allow newer version of rake while here PR: ports/188607 [1] Submitted by: "David Demelier" [1] --- www/redmine/Makefile | 13 +++++-------- www/redmine/files/extra-patch-thin-Gemfile | 12 ++++++++++++ www/redmine/files/patch-Gemfile | 2 +- www/redmine/pkg-plist | 10 ++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 www/redmine/files/extra-patch-thin-Gemfile diff --git a/www/redmine/Makefile b/www/redmine/Makefile index eedc304c6e56..c3aee13c91d5 100644 --- a/www/redmine/Makefile +++ b/www/redmine/Makefile @@ -3,7 +3,7 @@ PORTNAME= redmine PORTVERSION= 2.5.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= http://www.redmine.org/releases/ @@ -28,6 +28,9 @@ USE_RUBY_FEATURES= iconv USE_RAKE= yes NO_BUILD= yes SUB_LIST+= RUBY_NAME=${RUBY_NAME} +USERS= ${WWWOWN} +GROUPS= ${WWWGRP} +PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} OPTIONS_DEFINE= MYSQL MYSQL2 POSTGRESQL RMAGIC WWWSERVER OPTIONS_DEFAULT=MYSQL2 RMAGIC WWWSERVER THIN @@ -62,11 +65,10 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Gemfile .if ${PORT_OPTIONS:MWWWSERVER} .if ${PORT_OPTIONS:MTHIN} -USERS= ${WWWOWN} -GROUPS= ${WWWGRP} RUN_DEPENDS+= thin:${PORTSDIR}/www/rubygem-thin USE_RC_SUBR= redmine SUB_LIST+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-thin-Gemfile .endif .if ${PORT_OPTIONS:MPASSENGER} @@ -89,16 +91,11 @@ do-install: post-install: ${TOUCH} ${STAGEDIR}${WWWDIR}/Gemfile.lock - ${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}/Gemfile.lock if ! [ -r ${STAGEDIR}${WWWDIR}/config/settings.yml ]; then \ ${INSTALL_DATA} ${STAGEDIR}${WWWDIR}/config/settings.yml-dist \ ${STAGEDIR}${WWWDIR}/config/settings.yml; \ fi - for subdir in files log tmp public/plugin_assets; do \ - ${CHOWN} -R :${WWWGRP} ${STAGEDIR}${WWWDIR}/$$subdir; \ - ${CHMOD} -R g+w ${STAGEDIR}${WWWDIR}/$$subdir; \ - done @${CAT} ${PKGMESSAGE} .include diff --git a/www/redmine/files/extra-patch-thin-Gemfile b/www/redmine/files/extra-patch-thin-Gemfile new file mode 100644 index 000000000000..204be7c7eec5 --- /dev/null +++ b/www/redmine/files/extra-patch-thin-Gemfile @@ -0,0 +1,12 @@ +--- Gemfile.orig 2014-04-14 12:20:52.000000000 +0200 ++++ Gemfile 2014-04-14 12:21:07.000000000 +0200 +@@ -9,6 +9,9 @@ + gem "mime-types" + gem "awesome_nested_set", "2.1.6" + ++# Thin webserver ++gem "thin", "~> 1.6.2" ++ + # Optional gem for LDAP authentication + group :ldap do + gem "net-ldap", "~> 0.3.1" diff --git a/www/redmine/files/patch-Gemfile b/www/redmine/files/patch-Gemfile index ea96cfef24f4..57ce248d2a23 100644 --- a/www/redmine/files/patch-Gemfile +++ b/www/redmine/files/patch-Gemfile @@ -7,7 +7,7 @@ -gem "rake", "~> 10.1.1" -gem "jquery-rails", "~> 2.0.2" +gem "rails", "~> 3.2.17" -+gem "rake", "~> 10.2.2" ++gem "rake", "~> 10.3" +gem "jquery-rails", "~> 3.0" gem "coderay", "~> 1.1.0" gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] diff --git a/www/redmine/pkg-plist b/www/redmine/pkg-plist index 7f4635b4dc6e..86fe8b0018d3 100644 --- a/www/redmine/pkg-plist +++ b/www/redmine/pkg-plist @@ -1,6 +1,12 @@ %%WWWDIR%%/CONTRIBUTING.md +@owner %%WWWOWN%% +@group %%WWWGRP%% %%WWWDIR%%/Gemfile +@owner %%WWWOWN%% +@group %%WWWGRP%% %%WWWDIR%%/Gemfile.lock +@owner +@group %%WWWDIR%%/README.rdoc %%WWWDIR%%/Rakefile %%WWWDIR%%/app/controllers/account_controller.rb @@ -2174,3 +2180,7 @@ @dirrmtry %%WWWDIR%%/app/controllers @dirrmtry %%WWWDIR%%/app @dirrmtry %%WWWDIR%% +@exec chown -R %%WWWOWN%%:%%WWWGRP%% %D/%%WWWDIR%%/files +@exec chown -R %%WWWOWN%%:%%WWWGRP%% %D/%%WWWDIR%%/log +@exec chown -R %%WWWOWN%%:%%WWWGRP%% %D/%%WWWDIR%%/public/plugin_assets +@exec chown -R %%WWWOWN%%:%%WWWGRP%% %D/%%WWWDIR%%/tmp