pkgsrc-WIP-changes archive

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

roundcube-plugin-carddav: fix bug with huge files



Module Name:	pkgsrc-wip
Committed By:	Frédéric Fauberteau <frederic%fauberteau.org@localhost>
Pushed By:	frederic
Date:		Tue Feb 11 13:25:57 2020 +0100
Changeset:	3c1a1c88875616fc2b3eb57513666b1220c09fd3

Modified Files:
	roundcube-plugin-carddav/MESSAGE
	roundcube-plugin-carddav/Makefile
	roundcube-plugin-carddav/distinfo
	roundcube-plugin-carddav/patches/patch-carddav__common.php

Log Message:
roundcube-plugin-carddav: fix bug with huge files

pkgsrc changes:
---------------
  * Fix bug when huge directories are fetched (Github #259)
  * Make standard the format of MESSAGE
  * Remove the inclusion of roundcube's Makefile.common
  * Install config.inc.php in EGDIR

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3c1a1c88875616fc2b3eb57513666b1220c09fd3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 roundcube-plugin-carddav/MESSAGE                   |  5 +++++
 roundcube-plugin-carddav/Makefile                  | 24 +++++++++++++++-------
 roundcube-plugin-carddav/distinfo                  |  2 +-
 .../patches/patch-carddav__common.php              | 12 ++++++++++-
 4 files changed, 34 insertions(+), 9 deletions(-)

diffs:
diff --git a/roundcube-plugin-carddav/MESSAGE b/roundcube-plugin-carddav/MESSAGE
index 981c54d9a3..dcbe1ea8f1 100644
--- a/roundcube-plugin-carddav/MESSAGE
+++ b/roundcube-plugin-carddav/MESSAGE
@@ -1,2 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE $
+
 Add 'carddav' to the $rcmail_config['plugins'] array in
 ${PKG_SYSCONFDIR}/config.inc.php
+
+===========================================================================
diff --git a/roundcube-plugin-carddav/Makefile b/roundcube-plugin-carddav/Makefile
index 04ddde83f4..0a3a81710c 100644
--- a/roundcube-plugin-carddav/Makefile
+++ b/roundcube-plugin-carddav/Makefile
@@ -1,8 +1,5 @@
 # $NetBSD: $
 
-CONF_PLUGINS=	carddav
-.include "../../mail/roundcube/Makefile.common"
-
 DISTNAME=	carddav-3.0.3
 PKGNAME=	${PHP_PKG_PREFIX}-roundcube-plugin-${DISTNAME}
 CATEGORIES=	mail
@@ -16,24 +13,37 @@ MAINTAINER=	triaxx%NetBSD.org@localhost
 COMMENT=	CardDAV adapter for Roundcube
 LICENSE=	gnu-gpl-v2
 
+.include "../../mk/bsd.prefs.mk"
+
+NO_BUILD=	yes
+
 DEPENDS+=	${PHP_PKG_PREFIX}-roundcube>=1.0.0:../../mail/roundcube
 
 WRKSRC=		${WRKDIR}/carddav
 
 DISTINFO_FILE=		distinfo
 
-PKG_SYSCONFSUBDIR=	roundcube/plugins/carddav
+PKG_SYSCONFSUBDIR=	roundcube
+
+WWW_USER?=		${APACHE_USER}
+WWW_GROUP?=		${APACHE_GROUP}
+PKG_GROUPS_VARS+=	WWW_GROUP
+PKG_USERS_VARS=		WWW_USER
+BUILD_DEFS+=		WWW_USER WWW_GROUP APACHE_USER APACHE_GROUP
 
+RCDIR=			share/roundcube
 CDDIR=			${RCDIR}/plugins/carddav
+EGDIR=			share/examples/roundcube/plugins/carddav
 
 CD_SUBDIRS=		dbmigrations localization skins vendor
 
 .for d in ${CD_SUBDIRS}
 INSTALLATION_DIRS+=	${CDDIR}/${d}
 .endfor
+INSTALLATION_DIRS+=	${EGDIR}
 
-CONF_FILES_PERMS+=	${PREFIX}/${EGDIR}/plugins/carddav/config.inc.php \
-			${PKG_SYSCONFDIR}/config.inc.php \
+CONF_FILES_PERMS+=	${PREFIX}/${EGDIR}/config.inc.php \
+			${PKG_SYSCONFDIR}/plugins/carddav/config.inc.php \
 			${WWW_USER} ${WWW_GROUP} 0640
 
 MESSAGE_SUBST+=		PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
@@ -63,7 +73,7 @@ do-install:
 		${DESTDIR}${PREFIX}/${CDDIR}/${i}
 .endfor
 	${INSTALL_DATA} ${WRKSRC}/config.inc.php.dist \
-		${DESTDIR}${PREFIX}/${CDDIR}/config.inc.php.dist
+		${DESTDIR}${PREFIX}/${EGDIR}/config.inc.php
 
 .include "../../lang/php/phpversion.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/roundcube-plugin-carddav/distinfo b/roundcube-plugin-carddav/distinfo
index b636790973..bca92435f5 100644
--- a/roundcube-plugin-carddav/distinfo
+++ b/roundcube-plugin-carddav/distinfo
@@ -4,4 +4,4 @@ SHA1 (carddav-3.0.3.tar.bz2) = 3e5174a179e8b2315474c16ba8917cc8c8eb2b9d
 RMD160 (carddav-3.0.3.tar.bz2) = c7ac76272cab475c34f15bf5182e6d22d363429d
 SHA512 (carddav-3.0.3.tar.bz2) = 718ff5c01c03f47c75262a407df1a1a7b73463f19ed89a32762bd16cceccd39247bb9ca03667fc38ab8c514d904550d2ce978f82d541c71b3ef6ffdf07390710
 Size (carddav-3.0.3.tar.bz2) = 710891 bytes
-SHA1 (patch-carddav__common.php) = a3054628234e676cbc53c37c03f5af49e48312e9
+SHA1 (patch-carddav__common.php) = 43566dabbcf53e59e62d43356b7a8b63eecf423c
diff --git a/roundcube-plugin-carddav/patches/patch-carddav__common.php b/roundcube-plugin-carddav/patches/patch-carddav__common.php
index b39b3995e0..50eccb48a7 100644
--- a/roundcube-plugin-carddav/patches/patch-carddav__common.php
+++ b/roundcube-plugin-carddav/patches/patch-carddav__common.php
@@ -1,9 +1,19 @@
 $NetBSD$
 
-Change configuration file path from current directory to pkgsrc-compliant path.
+* Fix issue with large CardDAV collection (Github #259).
+* Make pkgsrc-compliant the path of configuration file.
 
 --- carddav_common.php.orig	2018-10-01 07:23:22.000000000 +0000
 +++ carddav_common.php
+@@ -114,7 +114,7 @@ class carddav_common
+ 		if(!self::check_contenttype($reply['headers']['content-type'], ';(text|application)/xml;'))
+ 			return false;
+ 
+-		$xml = new SimpleXMLElement($reply['body']);
++    $xml = simplexml_load_string($reply['body'], 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_PARSEHUGE);
+ 		$this->registerNamespaces($xml);
+ 		return $xml;
+ 	}
 @@ -373,7 +373,7 @@ class carddav_common
  
  	$rcmail = rcmail::get_instance();


Home | Main Index | Thread Index | Old Index