Bug 182131 - [patch] www/redmine: multiple small errors
Summary: [patch] www/redmine: multiple small errors
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-15 22:30 UTC by David Demelier
Modified: 2013-10-24 03:10 UTC (History)
1 user (show)

See Also:


Attachments
redmine.diff (2.25 KB, patch)
2013-09-15 22:30 UTC, David Demelier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Demelier 2013-09-15 22:30:01 UTC
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-15 22:30:31 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Steve Wills freebsd_committer freebsd_triage 2013-09-16 19:35:16 UTC
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
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-10-24 03:09:48 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"
Comment 4 Steve Wills freebsd_committer freebsd_triage 2013-10-24 03:10:08 UTC
State Changed
From-To: open->closed

Committed. Thanks!