NetBSD Problem Report #50041
From www@NetBSD.org Wed Jul 8 20:15:27 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id EFF2AA5858
for <gnats-bugs@gnats.NetBSD.org>; Wed, 8 Jul 2015 20:15:27 +0000 (UTC)
Message-Id: <20150708201526.437EEA6562@mollari.NetBSD.org>
Date: Wed, 8 Jul 2015 20:15:26 +0000 (UTC)
From: frederic@fauberteau.org
Reply-To: frederic@fauberteau.org
To: gnats-bugs@NetBSD.org
Subject: Roundcube is supposed to run with Apache
X-Send-Pr-Version: www-1.0
>Number: 50041
>Category: pkg
>Synopsis: Roundcube is supposed to run with Apache
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: taca
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 08 20:20:00 +0000 2015
>Closed-Date: Thu Nov 05 12:21:23 +0000 2015
>Last-Modified: Thu Nov 05 12:21:23 +0000 2015
>Originator: Frédéric
>Release: pkgsrc-2015Q1
>Organization:
>Environment:
NetBSD trashware 6.1_STABLE NetBSD 6.1_STABLE (TRASHWARE) #0: Tue Jul 7 09:13:34 CEST 2015 triaxx@trashware:/home/triaxx/dev/nbsd/netbsd-6/obj/sys/arch/amd64/compile/TRASHWARE amd64
>Description:
The perms for some files of roundcube are set for Apache.
>How-To-Repeat:
By installing roundcube.
>Fix:
This is just an idea:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/roundcube/Makefile,v
retrieving revision 1.70
diff -u -r1.70 Makefile
--- Makefile 19 Mar 2015 15:46:26 -0000 1.70
+++ Makefile 8 Jul 2015 20:05:28 -0000
@@ -36,12 +36,11 @@
PKG_SYSCONFSUBDIR?= roundcube
-WWW_USER?= ${APACHE_USER}
-WWW_GROUP?= ${APACHE_GROUP}
+MAKECONF?=
PKG_GROUPS_VARS+= WWW_GROUP
PKG_USERS_VARS= WWW_USER
-BUILD_DEFS+= VARBASE WWW_USER WWW_GROUP APACHE_USER APACHE_GROUP
+BUILD_DEFS+= VARBASE WWW_USER WWW_GROUP WWW_CONF_FILE
RCDIR= ${PREFIX}/share/roundcube
EGDIR= ${PREFIX}/share/examples/roundcube
@@ -80,7 +79,7 @@
${WWW_USER} ${WWW_GROUP} 0640
.endfor
-.include "../../mk/apache.mk"
+#.include "../../mk/apache.mk"
SUBST_CLASSES+= files
SUBST_STAGE.files= do-configure
@@ -92,12 +91,12 @@
SUBST_SED.files+= -e "s|@VARBASE@|${VARBASE}|g"
SUBST_SED.files+= -e "s|@PKG_EXAMPLES@|${PREFIX}/share/examples/roundcube|g"
SUBST_SED.files+= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
-.if ${PKG_APACHE} == "apache24"
+#.if ${PKG_APACHE} == "apache24"
SUBST_SED.files+= -e "/Order allow,deny/d"
SUBST_SED.files+= -e "/Order deny,allow/d"
SUBST_SED.files+= -e "s,Allow from all,Require all granted,g"
SUBST_SED.files+= -e "s,Deny from all,Require all denied,g"
-.endif
+#.endif
REPLACE_INTERPRETER+= php
REPLACE.php.old= /usr/bin/env php
@@ -107,7 +106,7 @@
REPLACE_PYTHON= plugins/password/helpers/chpass-wrapper.py
post-extract:
- ${CP} ${FILESDIR}/roundcube.conf ${WRKSRC}/roundcube.conf
+ ${CP} ${FILESDIR}/${WWW_CONF_FILE} ${WRKSRC}/roundcube.conf
do-install:
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${DOCDIR}
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/roundcube/options.mk,v
retrieving revision 1.8
diff -u -r1.8 options.mk
--- options.mk 15 Jun 2013 16:08:09 -0000 1.8
+++ options.mk 8 Jul 2015 20:05:28 -0000
@@ -2,12 +2,13 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.roundcube
-PKG_OPTIONS_REQUIRED_GROUPS= db converters
+PKG_OPTIONS_REQUIRED_GROUPS= db converters webserver
PKG_OPTIONS_GROUP.db= mysql pgsql sqlite
PKG_OPTIONS_GROUP.converters= iconv multibyte
+PKG_OPTIONS_GROUP.webserver= apache nginx
PKG_SUPPORTED_OPTIONS= ldap sockets gd
-PKG_SUGGESTED_OPTIONS= mysql iconv sockets gd
+PKG_SUGGESTED_OPTIONS= mysql iconv apache sockets gd
.include "../../mk/bsd.options.mk"
@@ -47,6 +48,27 @@
.endif
###
+### Use apache web server
+###
+.if !empty(PKG_OPTIONS:Mapache)
+WWW_USER?= ${APACHE_USER}
+WWW_GROUP?= ${APACHE_GROUP}
+BUILD_DEFS+= APACHE_USER APACHE_GROUP
+WWW_CONF_FILE?= apache.conf
+.include "../../mk/apache.mk"
+.endif
+
+###
+### Use apache web server
+###
+.if !empty(PKG_OPTIONS:Mnginx)
+DEPENDS+= nginx-[0-9]*:../../www/nginx
+WWW_USER?= nginx
+WWW_GROUP?= nginx
+WWW_CONF_FILE?= nginx.conf
+.endif
+
+###
### Use OpenLDAP for storing data.
###
.if !empty(PKG_OPTIONS:Mldap)
Index: files/apache.conf
===================================================================
RCS file: files/apache.conf
diff -N files/apache.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/apache.conf 8 Jul 2015 20:05:28 -0000
@@ -0,0 +1,29 @@
+# $NetBSD: roundcube.conf,v 1.5 2013/01/08 23:27:55 jym Exp $
+#
+# RoundCube configuration file fragment for Apache
+
+<IfModule mod_alias.c>
+ Alias /roundcube "@RCDIR@/"
+</IfModule>
+
+# Don't forget to adapt the configuration in @RCDIR@/.htaccess
+# to your liking.
+<Directory "@RCDIR@">
+ AllowOverride All
+ DirectoryIndex index.php
+ Order allow,deny
+ Allow from all
+</Directory>
+
+#
+# For security, don't serve pages from the roundcube installer directory.
+#
+# If you are using the installer to setup roundcube you will need access to
+# the installer/ directory for the initial setup. It is recommended that
+# after installation you uncomment the following block in order to restrict
+# access to that directory.
+#
+#<Directory "@RCDIR@/installer">
+# Order deny,allow
+# Deny from all
+#</Directory>
Index: files/nginx.conf
===================================================================
RCS file: files/nginx.conf
diff -N files/nginx.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/nginx.conf 8 Jul 2015 20:05:28 -0000
@@ -0,0 +1,15 @@
+# RoundCube configuration file fragment for nginx
+
+server {
+ location /roundube {
+ root @RCDIR@;
+ index index.php;
+ }
+
+ location ~ \.php$ {
+ include /usr/pkg/etc/nginx/fastcgi_params;
+ fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_index index.php;
+ }
+}
Index: files/roundcube.conf
===================================================================
RCS file: files/roundcube.conf
diff -N files/roundcube.conf
--- files/roundcube.conf 15 Jun 2013 16:08:09 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-# $NetBSD: roundcube.conf,v 1.6 2013/06/15 16:08:09 taca Exp $
-#
-# RoundCube configuration file fragment for Apache
-
-<IfModule mod_alias.c>
- Alias /roundcube "@RCDIR@/"
-</IfModule>
-
-# Don't forget to adapt the configuration in @RCDIR@/.htaccess
-# to your liking.
-<Directory "@RCDIR@">
- AllowOverride All
- DirectoryIndex index.php
- Order allow,deny
- Allow from all
-</Directory>
-
-#
-# For security, don't serve pages from the roundcube installer directory.
-#
-# If you are using the installer to setup roundcube you will need access to
-# the installer/ directory for the initial setup. It is recommended that
-# after installation you uncomment the following block in order to restrict
-# access to that directory.
-#
-#<Directory "@RCDIR@/installer">
-# Order deny,allow
-# Deny from all
-#</Directory>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->taca
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 08 Jul 2015 23:48:08 +0000
Responsible-Changed-Why:
Over to maintainer.
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <frederic@fauberteau.org>
To: gnats-bugs@netbsd.org
Cc: taca@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, pkgsrc-bugs-owner@netbsd.org
Subject: Re: pkg/50041: Roundcube is supposed to run with Apache
Date: Thu, 09 Jul 2015 15:25:29 +0200
Le 08/07/2015 22:20, frederic@fauberteau.org a écrit :
>> Number: 50041
>> Category: pkg
>> Synopsis: Roundcube is supposed to run with Apache
>> Confidential: no
>> Severity: non-critical
>> Priority: low
>> Responsible: pkg-manager
>> State: open
>> Class: change-request
>> Submitter-Id: net
>> Arrival-Date: Wed Jul 08 20:20:00 +0000 2015
>> Originator: Fr�d�ric
>> Release: pkgsrc-2015Q1
>> Organization:
>> Environment:
> NetBSD trashware 6.1_STABLE NetBSD 6.1_STABLE (TRASHWARE) #0: Tue Jul
> 7 09:13:34 CEST 2015
> triaxx@trashware:/home/triaxx/dev/nbsd/netbsd-6/obj/sys/arch/amd64/compile/TRASHWARE
> amd64
>> Description:
> The perms for some files of roundcube are set for Apache.
>> How-To-Repeat:
> By installing roundcube.
>> Fix:
> This is just an idea:
Ok, I should give more precision about the patch. I would add an option
to choose the webserver since I use nginx and I don't want Apache
dependency. The dependencies on Apache or nginx has been moved in
options.mk and a example configuration file for nginx has been added. Is
it a good idea?
Sorry, but my pkgsrc tree was outdated and I had forgotten a fpm
dependency.
Attached the revised patch:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/roundcube/Makefile,v
retrieving revision 1.73
diff -u -r1.73 Makefile
--- Makefile 6 Jun 2015 14:14:12 -0000 1.73
+++ Makefile 9 Jul 2015 12:50:28 -0000
@@ -36,12 +36,9 @@
PKG_SYSCONFSUBDIR?= roundcube
-WWW_USER?= ${APACHE_USER}
-WWW_GROUP?= ${APACHE_GROUP}
-
PKG_GROUPS_VARS+= WWW_GROUP
PKG_USERS_VARS= WWW_USER
-BUILD_DEFS+= VARBASE WWW_USER WWW_GROUP APACHE_USER APACHE_GROUP
+BUILD_DEFS+= VARBASE WWW_USER WWW_GROUP WWW_CONF_FILE
RCDIR= ${PREFIX}/share/roundcube
EGDIR= ${PREFIX}/share/examples/roundcube
@@ -83,8 +80,6 @@
${WWW_USER} ${WWW_GROUP} 0640
.endfor
-.include "../../mk/apache.mk"
-
SUBST_CLASSES+= files
SUBST_STAGE.files= do-configure
SUBST_MESSAGE.files= Fixing configuration files.
@@ -98,12 +93,6 @@
SUBST_SED.files+= -e
"s|@PKG_EXAMPLES@|${PREFIX}/share/examples/roundcube|g"
SUBST_SED.files+= -e "s|@PKG_SYSCONFBASE@|${PKG_SYSCONFBASE}|g"
SUBST_SED.files+= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
-.if ${PKG_APACHE} == "apache24"
-SUBST_SED.files+= -e "/Order allow,deny/d"
-SUBST_SED.files+= -e "/Order deny,allow/d"
-SUBST_SED.files+= -e "s,Allow from all,Require all granted,g"
-SUBST_SED.files+= -e "s,Deny from all,Require all denied,g"
-.endif
REPLACE_INTERPRETER+= php
REPLACE.php.old= /usr/bin/env php
@@ -113,7 +102,7 @@
REPLACE_PYTHON= plugins/password/helpers/chpass-wrapper.py
post-extract:
- ${CP} ${FILESDIR}/roundcube.conf ${WRKSRC}/roundcube.conf
+ ${CP} ${FILESDIR}/${WWW_CONF_FILE} ${WRKSRC}/roundcube.conf
do-install:
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${DOCDIR}
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/roundcube/options.mk,v
retrieving revision 1.10
diff -u -r1.10 options.mk
--- options.mk 17 Jun 2015 08:35:45 -0000 1.10
+++ options.mk 9 Jul 2015 12:50:28 -0000
@@ -2,12 +2,13 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.roundcube
-PKG_OPTIONS_REQUIRED_GROUPS= db converters
+PKG_OPTIONS_REQUIRED_GROUPS= db converters webserver
PKG_OPTIONS_GROUP.db= mysql pgsql sqlite
PKG_OPTIONS_GROUP.converters= iconv multibyte
+PKG_OPTIONS_GROUP.webserver= apache nginx
PKG_SUPPORTED_OPTIONS= ldap sockets gd
-PKG_SUGGESTED_OPTIONS= mysql iconv sockets gd
+PKG_SUGGESTED_OPTIONS= mysql iconv apache sockets gd
.include "../../mk/bsd.options.mk"
@@ -47,6 +48,34 @@
.endif
###
+### Use apache web server
+###
+.if !empty(PKG_OPTIONS:Mapache)
+WWW_USER?= ${APACHE_USER}
+WWW_GROUP?= ${APACHE_GROUP}
+BUILD_DEFS+= APACHE_USER APACHE_GROUP
+WWW_CONF_FILE?= apache.conf
+.include "../../mk/apache.mk"
+.if ${PKG_APACHE} == "apache24"
+SUBST_SED.files+= -e "/Order allow,deny/d"
+SUBST_SED.files+= -e "/Order deny,allow/d"
+SUBST_SED.files+= -e "s,Allow from all,Require all granted,g"
+SUBST_SED.files+= -e "s,Deny from all,Require all denied,g"
+.endif
+.endif
+
+###
+### Use apache web server
+###
+.if !empty(PKG_OPTIONS:Mnginx)
+DEPENDS+= nginx-[0-9]*:../../www/nginx
+DEPENDS+= ${PHP_PKG_PREFIX}-fpm-[0-9]*:../../www/php-fpm
+WWW_USER?= nginx
+WWW_GROUP?= nginx
+WWW_CONF_FILE?= nginx.conf
+.endif
+
+###
### Use OpenLDAP for storing data.
###
.if !empty(PKG_OPTIONS:Mldap)
Index: files/apache.conf
===================================================================
RCS file: files/apache.conf
diff -N files/apache.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/apache.conf 9 Jul 2015 12:50:28 -0000
@@ -0,0 +1,29 @@
+# $NetBSD: roundcube.conf,v 1.6 2013/06/15 16:08:09 taca Exp $
+#
+# RoundCube configuration file fragment for Apache
+
+<IfModule mod_alias.c>
+ Alias /roundcube "@RCDIR@/"
+</IfModule>
+
+# Don't forget to adapt the configuration in @RCDIR@/.htaccess
+# to your liking.
+<Directory "@RCDIR@">
+ AllowOverride All
+ DirectoryIndex index.php
+ Order allow,deny
+ Allow from all
+</Directory>
+
+#
+# For security, don't serve pages from the roundcube installer
directory.
+#
+# If you are using the installer to setup roundcube you will need
access to
+# the installer/ directory for the initial setup. It is recommended
that
+# after installation you uncomment the following block in order to
restrict
+# access to that directory.
+#
+#<Directory "@RCDIR@/installer">
+# Order deny,allow
+# Deny from all
+#</Directory>
Index: files/nginx.conf
===================================================================
RCS file: files/nginx.conf
diff -N files/nginx.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/nginx.conf 9 Jul 2015 12:50:28 -0000
@@ -0,0 +1,14 @@
+# RoundCube configuration file fragment for nginx
+
+server {
+ server_name localhost;
+ root @RCDIR@;
+ index index.php;
+
+ location ~ \.php$ {
+ include @PKG_SYSCONFBASE@/nginx/fastcgi_params;
+ fastcgi_pass localhost:9000;
+ fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
+ fastcgi_index index.php;
+ }
+}
Index: files/roundcube.conf
===================================================================
RCS file: files/roundcube.conf
diff -N files/roundcube.conf
--- files/roundcube.conf 15 Jun 2013 16:08:09 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-# $NetBSD: roundcube.conf,v 1.6 2013/06/15 16:08:09 taca Exp $
-#
-# RoundCube configuration file fragment for Apache
-
-<IfModule mod_alias.c>
- Alias /roundcube "@RCDIR@/"
-</IfModule>
-
-# Don't forget to adapt the configuration in @RCDIR@/.htaccess
-# to your liking.
-<Directory "@RCDIR@">
- AllowOverride All
- DirectoryIndex index.php
- Order allow,deny
- Allow from all
-</Directory>
-
-#
-# For security, don't serve pages from the roundcube installer
directory.
-#
-# If you are using the installer to setup roundcube you will need
access to
-# the installer/ directory for the initial setup. It is recommended
that
-# after installation you uncomment the following block in order to
restrict
-# access to that directory.
-#
-#<Directory "@RCDIR@/installer">
-# Order deny,allow
-# Deny from all
-#</Directory>
State-Changed-From-To: open->feedback
State-Changed-By: taca@NetBSD.org
State-Changed-When: Mon, 31 Aug 2015 15:35:13 +0000
State-Changed-Why:
The package has updated based on your patch.
From: "Takahiro Kambe" <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50041 CVS commit: pkgsrc/mail/roundcube
Date: Mon, 31 Aug 2015 15:31:27 +0000
Module Name: pkgsrc
Committed By: taca
Date: Mon Aug 31 15:31:27 UTC 2015
Modified Files:
pkgsrc/mail/roundcube: Makefile options.mk
Added Files:
pkgsrc/mail/roundcube/files: apache.conf nginx.conf
Removed Files:
pkgsrc/mail/roundcube/files: roundcube.conf
Log Message:
Make roundcube to support not only Apache but also Nginx based on
PR pkg/50041.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 pkgsrc/mail/roundcube/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/mail/roundcube/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/roundcube/files/apache.conf \
pkgsrc/mail/roundcube/files/nginx.conf
cvs rdiff -u -r1.6 -r0 pkgsrc/mail/roundcube/files/roundcube.conf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <frederic@fauberteau.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50041 (Roundcube is supposed to run with Apache)
Date: Sun, 13 Sep 2015 09:33:12 +0200
Le 31/08/2015 17:35, taca@NetBSD.org a écrit :
> Synopsis: Roundcube is supposed to run with Apache
>
> State-Changed-From-To: open->feedback
> State-Changed-By: taca@NetBSD.org
> State-Changed-When: Mon, 31 Aug 2015 15:35:13 +0000
> State-Changed-Why:
> The package has updated based on your patch.
Thanks, it seems ok for me.
Just a little mistake from me due to copy-past :
? patch-options-comment.patch
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/roundcube/options.mk,v
retrieving revision 1.12
diff -u -u -r1.12 options.mk
--- options.mk 31 Aug 2015 15:31:26 -0000 1.12
+++ options.mk 13 Sep 2015 07:23:50 -0000
@@ -59,7 +59,7 @@
.endif
###
-### Use apache web server
+### Use nginx web server
###
.if !empty(PKG_OPTIONS:Mnginx)
DEPENDS+= nginx-[0-9]*:../../www/nginx
From: Takahiro Kambe <taca@NetBSD.org>
To: gnats-bugs@NetBSD.org, frederic@fauberteau.org
Cc: taca@NetBSD.org
Subject: Re: pkg/50041 (Roundcube is supposed to run with Apache)
Date: Sun, 13 Sep 2015 23:40:36 +0900 (JST)
In message <20150913085000.8C8A8A6562@mollari.NetBSD.org>
on Sun, 13 Sep 2015 08:50:00 +0000 (UTC),
Fr=E9d=E9ric Fauberteau <frederic@fauberteau.org> wrote:
> Thanks, it seems ok for me.
> =
> Just a little mistake from me due to copy-past :
Oh, commited. Thanks very much!
-- =
Takahiro Kambe <taca@NetBSD.org>
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <frederic@fauberteau.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50041 (Roundcube is supposed to run with Apache)
Date: Tue, 20 Oct 2015 08:12:51 +0200
Le 13/09/2015 16:45, Takahiro Kambe a écrit :
> Oh, commited. Thanks very much!
>
My feedback: it runs correctly. Thank you!
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <frederic@fauberteau.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: pkg/50041
Date: Thu, 05 Nov 2015 08:46:58 +0100
My feedback is: "it's ok for me".
Maybe the PR could be closed.
Regards,
Fred.
State-Changed-From-To: feedback->closed
State-Changed-By: prlw1@NetBSD.org
State-Changed-When: Thu, 05 Nov 2015 12:21:23 +0000
State-Changed-Why:
Confirmed fixed - thanks
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.