From markand@malikania.fr  Sun Sep 15 21:24:20 2013
Return-Path: <markand@malikania.fr>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id CF5F5AD4;
	Sun, 15 Sep 2013 21:24:20 +0000 (UTC)
	(envelope-from markand@malikania.fr)
Received: from postfix.malikania.fr (ks3292218.kimsufi.com [5.135.187.121])
	by mx1.freebsd.org (Postfix) with ESMTP id 9BC002697;
	Sun, 15 Sep 2013 21:24:19 +0000 (UTC)
Received: from postfix.malikania.fr (unknown [91.91.33.200])
	by postfix.malikania.fr (Postfix) with ESMTPSA id 83C7EB162;
	Sun, 15 Sep 2013 23:18:42 +0200 (CEST)
Received: by postfix.malikania.fr (sSMTP sendmail emulation); Sun, 15 Sep 2013 23:18:36 +0200
Message-Id: <20130915212420.CF5F5AD4@hub.freebsd.org>
Date: Sun, 15 Sep 2013 23:18:36 +0200
From: "David Demelier" <markand@malikania.fr>
Reply-To: David Demelier <markand@malikania.fr>
To: FreeBSD-gnats-submit@freebsd.org
Cc: swills@FreeBSD.org
Subject: [patch] www/redmine: multiple small errors
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         182131
>Category:       ports
>Synopsis:       [patch] www/redmine: multiple small errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ruby
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 15 21:30:01 UTC 2013
>Closed-Date:    Thu Oct 24 02:10:09 UTC 2013
>Last-Modified:  Thu Oct 24 02:10:09 UTC 2013
>Originator:     David Demelier
>Release:        FreeBSD 9.2-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD Melon 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #1 r254536M: Mon Aug 19 23:10:30 CEST 2013 root@Melon:/usr/obj/usr/src/sys/GENERIC amd64

>Description:

The current version of redmine has a lot of problems. A default installation of
the port will not allow the user to run the service directly because:

  1. Redmine *requires* LDAP, you can't disable it at all. So I remove the
     option so it starts.

  2. Someone did update the coderay plugin without updating redmine, which
     led to not found exception.

  3. Redmine will use ${WWWDIR}/pids/ directory by default and it's not
     writable by redmine after a clean install. This is also fixed.

>How-To-Repeat:

Install redmine, you can't start it even after configuring the database.yml

>Fix:

--- redmine.diff begins here ---
--- Makefile.orig	2013-09-15 22:52:16.000000000 +0200
+++ Makefile	2013-09-15 23:05:10.000000000 +0200
@@ -18,7 +18,8 @@
 		rubygem-rack-openid>=0:${PORTSDIR}/www/rubygem-rack-openid \
 		rubygem-coderay>=1.0.9:${PORTSDIR}/textproc/rubygem-coderay \
 		rubygem-fastercsv>=1.5.0:${PORTSDIR}/devel/rubygem-fastercsv \
-		rubygem-builder>=3.0.0:${PORTSDIR}/devel/rubygem-builder
+		rubygem-builder>=3.0.0:${PORTSDIR}/devel/rubygem-builder \
+		rubygem-net-ldap>=0.3.1:${PORTSDIR}/net/rubygem-net-ldap
 
 USE_RUBY=	yes
 USE_RUBY_FEATURES=	iconv
@@ -26,7 +27,7 @@
 NO_BUILD=	yes
 SUB_LIST+=	RUBY_NAME=${RUBY_NAME}
 
-OPTIONS_DEFINE=	MYSQL MYSQL2 POSTGRESQL RMAGIC WWWSERVER LDAP
+OPTIONS_DEFINE=	MYSQL MYSQL2 POSTGRESQL RMAGIC WWWSERVER
 OPTIONS_DEFAULT=MYSQL2 RMAGIC WWWSERVER THIN
 OPTIONS_SINGLE=	WWWSERVER
 OPTIONS_SINGLE_WWWSERVER=	THIN PASSENGER
@@ -71,10 +72,6 @@
 .endif
 .endif
 
-.if ${PORT_OPTIONS:MLDAP}
-RUN_DEPENDS+=	rubygem-net-ldap>=0.3.1:${PORTSDIR}/net/rubygem-net-ldap
-.endif
-
 post-extract:
 	${MV} ${WRKSRC}/config/settings.yml ${WRKSRC}/config/settings.yml-dist
 
@@ -83,11 +80,15 @@
 
 do-install:
 	${MKDIR} ${WWWDIR}
+	${MKDIR} ${WWWDIR}/tmp/pids
 	cd ${WRKSRC} && \
 	${COPYTREE_SHARE} "*" ${WWWDIR} "! ( -name *\.orig -o -name *\.bak )"
 	${FIND} ${WRKSRC}/script -type f -print | ${XARGS} ${CHMOD} 755
 
 post-install:
+	${TOUCH} ${WWWDIR}/Gemfile.lock
+	${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/Gemfile.lock
+	
 	if ! [ -r ${WWWDIR}/config/settings.yml ]; then			\
 		${INSTALL_DATA} ${WWWDIR}/config/settings.yml-dist	\
 			${WWWDIR}/config/settings.yml;			\
--- files/patch-Gemfile.orig	2013-09-15 22:54:28.000000000 +0200
+++ files/patch-Gemfile	2013-09-15 22:54:49.000000000 +0200
@@ -1,5 +1,5 @@
---- Gemfile.orig	2013-07-14 16:51:09.000000000 +0000
-+++ Gemfile	2013-07-21 12:56:04.025404096 +0000
+--- Gemfile.orig	2013-07-14 18:51:09.000000000 +0200
++++ Gemfile	2013-09-15 22:53:56.000000000 +0200
 @@ -1,11 +1,11 @@
  source 'https://rubygems.org'
  
@@ -7,7 +7,8 @@
 -gem "jquery-rails", "~> 2.0.2"
 +gem "jquery-rails", "~> 3.0"
  gem "i18n", "~> 0.6.0"
- gem "coderay", "~> 1.0.9"
+-gem "coderay", "~> 1.0.9"
++gem "coderay", "~> 1.1.0"
  gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
 -gem "builder", "3.0.0"
 +gem "builder", "~> 3.0.0"
--- redmine.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ruby 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Sep 15 21:30:31 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182131 

From: Steve Wills <swills@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: markand@malikania.fr
Subject: Re: ports/182131: [patch] www/redmine: multiple small errors
Date: Mon, 16 Sep 2013 18:35:16 +0000

 The LDAP gem definitely is optional, the Gemfile even says so:
 
 # Optional gem for LDAP authentication
 group :ldap do
   gem "net-ldap", "~> 0.3.1"
 end
 
 The port probably needs to be updated to remove those lines from the Gemfile if
 the LDAP option is disabled.
 
 Steve

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182131: commit references a PR
Date: Thu, 24 Oct 2013 02:09:48 +0000 (UTC)

 Author: swills
 Date: Thu Oct 24 02:09:41 2013
 New Revision: 331451
 URL: http://svnweb.freebsd.org/changeset/ports/331451
 
 Log:
   - Require LDAP, it's not optional
   - Fix dependency on coderay
   - Fix permissions on pid file dir
   - Fix permissions on Gemfile.lock
   
   PR:		ports/182131
   Submitted by:	"David Demelier" <markand@malikania.fr>
 
 Modified:
   head/www/redmine/Makefile
   head/www/redmine/files/patch-Gemfile
 
 Modified: head/www/redmine/Makefile
 ==============================================================================
 --- head/www/redmine/Makefile	Thu Oct 24 01:45:27 2013	(r331450)
 +++ head/www/redmine/Makefile	Thu Oct 24 02:09:41 2013	(r331451)
 @@ -18,7 +18,8 @@ RUN_DEPENDS=	rubygem-rubytree>=0:${PORTS
  		rubygem-rack-openid>=0:${PORTSDIR}/www/rubygem-rack-openid \
  		rubygem-coderay>=1.0.9:${PORTSDIR}/textproc/rubygem-coderay \
  		rubygem-fastercsv>=1.5.0:${PORTSDIR}/devel/rubygem-fastercsv \
 -		rubygem-builder>=3.0.0:${PORTSDIR}/devel/rubygem-builder
 +		rubygem-builder>=3.0.0:${PORTSDIR}/devel/rubygem-builder \
 +		rubygem-net-ldap>=0.3.1:${PORTSDIR}/net/rubygem-net-ldap
  
  USE_RUBY=	yes
  USE_RUBY_FEATURES=	iconv
 @@ -26,7 +27,7 @@ USE_RAKE=	yes
  NO_BUILD=	yes
  SUB_LIST+=	RUBY_NAME=${RUBY_NAME}
  
 -OPTIONS_DEFINE=	MYSQL MYSQL2 POSTGRESQL RMAGIC WWWSERVER LDAP
 +OPTIONS_DEFINE=	MYSQL MYSQL2 POSTGRESQL RMAGIC WWWSERVER
  OPTIONS_DEFAULT=MYSQL2 RMAGIC WWWSERVER THIN
  OPTIONS_SINGLE=	WWWSERVER
  OPTIONS_SINGLE_WWWSERVER=	THIN PASSENGER
 @@ -72,10 +73,6 @@ RUN_DEPENDS+=	passenger-config:${PORTSDI
  .endif
  .endif
  
 -.if ${PORT_OPTIONS:MLDAP}
 -RUN_DEPENDS+=	rubygem-net-ldap>=0.3.1:${PORTSDIR}/net/rubygem-net-ldap
 -.endif
 -
  post-extract:
  	${MV} ${WRKSRC}/config/settings.yml ${WRKSRC}/config/settings.yml-dist
  
 @@ -84,11 +81,15 @@ pre-install:
  
  do-install:
  	${MKDIR} ${WWWDIR}
 +	${MKDIR} ${WWWDIR}/tmp/pids
  	cd ${WRKSRC} && \
  	${COPYTREE_SHARE} "*" ${WWWDIR} "! ( -name *\.orig -o -name *\.bak )"
  	${FIND} ${WRKSRC}/script -type f -print | ${XARGS} ${CHMOD} 755
  
  post-install:
 +	${TOUCH} ${WWWDIR}/Gemfile.lock
 +	${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/Gemfile.lock
 +	
  	if ! [ -r ${WWWDIR}/config/settings.yml ]; then			\
  		${INSTALL_DATA} ${WWWDIR}/config/settings.yml-dist	\
  			${WWWDIR}/config/settings.yml;			\
 
 Modified: head/www/redmine/files/patch-Gemfile
 ==============================================================================
 --- head/www/redmine/files/patch-Gemfile	Thu Oct 24 01:45:27 2013	(r331450)
 +++ head/www/redmine/files/patch-Gemfile	Thu Oct 24 02:09:41 2013	(r331451)
 @@ -1,5 +1,5 @@
  --- Gemfile.orig	2013-07-14 16:51:09.000000000 +0000
 -+++ Gemfile	2013-07-21 12:56:04.025404096 +0000
 ++++ Gemfile	2013-10-24 01:36:14.746224376 +0000
  @@ -1,11 +1,11 @@
   source 'https://rubygems.org'
   
 @@ -7,7 +7,8 @@
  -gem "jquery-rails", "~> 2.0.2"
  +gem "jquery-rails", "~> 3.0"
   gem "i18n", "~> 0.6.0"
 - gem "coderay", "~> 1.0.9"
 +-gem "coderay", "~> 1.0.9"
 ++gem "coderay", "~> 1.1.0"
   gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
  -gem "builder", "3.0.0"
  +gem "builder", "~> 3.0.0"
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: swills 
State-Changed-When: Thu Oct 24 02:10:08 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182131 
>Unformatted:
