pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/50041: Roundcube is supposed to run with Apache



>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:

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>



Home | Main Index | Thread Index | Old Index