Date: Mon, 14 Apr 2014 13:58:39 +0200 From: "David Demelier" <markand@malikania.fr> To: FreeBSD-gnats-submit@freebsd.org Cc: swills@FreeBSD.org Subject: ports/188607: [patch] www/redmine: fix permissions and thin option Message-ID: <20140414115840.02B595872@postfix.malikania.fr> Resent-Message-ID: <201404141200.s3EC009C044515@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 188607 >Category: ports >Synopsis: [patch] www/redmine: fix permissions and thin option >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Apr 14 12:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: David Demelier >Release: FreeBSD 10.0-RELEASE-p1 amd64 >Organization: >Environment: System: FreeBSD Pomme.malikania.fr 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #1 r264293: Wed Apr 9 10:34:18 CEST 2014 root@Pomme.malikania.fr:/usr/obj/usr/src/sys/Pomme amd64 >Description: The port has been broken again, this patch includes : 1. Fix permission on redmine directories: log, files, tmp and public as described in the redmine installation guide 2. Add gem thin in the Gemfile if the option THIN is enabled, otherwise won't start 3. Clean up thM makefile, CHOWN commands in the Makefile are useless with stage >How-To-Repeat: >Fix: --- redmine.diff begins here --- --- Makefile.orig 2014-04-14 12:20:04.000000000 +0200 +++ Makefile 2014-04-14 12:42:43.000000000 +0200 @@ -28,6 +28,9 @@ 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 @@ .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 @@ 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 <bsd.port.post.mk> --- pkg-plist.orig 2014-04-14 10:47:41.000000000 +0200 +++ pkg-plist 2014-04-14 12:50:20.000000000 +0200 @@ -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 --- /dev/null 2014-04-14 12:50:36.000000000 +0200 +++ files/extra-patch-thin-Gemfile 2014-04-14 12:21:58.000000000 +0200 @@ -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" --- redmine.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140414115840.02B595872>