Sat Feb 4 08:32:55 2012 UTC ()
Pullup ticket #3671 - requested by taca
lang/php53 security and build fixes.

Revisions pulled up:
- lang/php53/Makefile                                           1.22-1.23
- lang/php53/Makefile.common                                    1.10
- lang/php53/Makefile.php                                       1.13
- lang/php53/distinfo                                           1.32-1.35
- lang/php53/patches/patch-main_php__variables.c                deleted
- lang/php53/patches/patch-main_streams_cast.c                  1.1

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Thu Feb  2 15:44:09 UTC 2012

   Modified Files:
   	pkgsrc/lang/php53: distinfo
   Added Files:
   	pkgsrc/lang/php53/patches: patch-main_streams_cast.c

   Log Message:
   Trying to fix build problem on NetBSD current recently.

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Thu Feb  2 16:00:40 UTC 2012

   Modified Files:
   	pkgsrc/lang/php53: Makefile distinfo
   Added Files:
   	pkgsrc/lang/php53/patches: patch-main_php__variables.c

   Log Message:
   Add fix for "Critical PHP Remote Vulnerability Introduced in Fix for PHP
   Hashtable Collision DOS" by revision 323007 from PHP's repository.

   http://thexploit.com/sec/critical-php-remote-vulnerability-introduced-in-fix-for-php-hashtable-collision-dos/

   Bump PKGREVISION.

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Thu Feb  2 16:19:44 UTC 2012

   Modified Files:
   	pkgsrc/lang/php53: distinfo
   	pkgsrc/lang/php53/patches: patch-main_php__variables.c

   Log Message:
   And more fix for memory leaks by revision 323013 from PHP's repository.
   Hopefully, these 18 minutes is allowed to avoid to PKGREVISION bump.

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Fri Feb  3 03:10:34 UTC 2012

   Modified Files:
   	pkgsrc/lang/php53: Makefile Makefile.common Makefile.php distinfo
   Removed Files:
   	pkgsrc/lang/php53/patches: patch-main_php__variables.c

   Log Message:
   Update php53 package to 5.3.10.  Below security fix is already included
   in php-5.3.9nb2 package.

   02 Feb 2012, PHP 5.3.10

   - Core:
     . Fixed arbitrary remote code execution vulnerability reported by Stefan
       Esser, CVE-2012-0830. (Stas, Dmitry)


(sbd)
diff -r1.19.2.2 -r1.19.2.3 pkgsrc/lang/php53/Makefile
diff -r1.8.4.1 -r1.8.4.2 pkgsrc/lang/php53/Makefile.common
diff -r1.10.2.2 -r1.10.2.3 pkgsrc/lang/php53/Makefile.php
diff -r1.28.2.3 -r1.28.2.4 pkgsrc/lang/php53/distinfo
diff -r0 -r1.1.2.2 pkgsrc/lang/php53/patches/patch-main_streams_cast.c

cvs diff -r1.19.2.2 -r1.19.2.3 pkgsrc/lang/php53/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/php53/Attic/Makefile 2012/01/21 09:02:55 1.19.2.2
+++ pkgsrc/lang/php53/Attic/Makefile 2012/02/04 08:32:54 1.19.2.3
@@ -1,20 +1,19 @@ @@ -1,20 +1,19 @@
1# $NetBSD: Makefile,v 1.19.2.2 2012/01/21 09:02:55 sbd Exp $ 1# $NetBSD: Makefile,v 1.19.2.3 2012/02/04 08:32:54 sbd Exp $
2 2
3# 3#
4# We can't omit PKGNAME here to handle PKG_OPTIONS. 4# We can't omit PKGNAME here to handle PKG_OPTIONS.
5# 5#
6PKGNAME= php-${PHP_BASE_VERS} 6PKGNAME= php-${PHP_BASE_VERS}
7PKGREVISION= 1 
8CATEGORIES= lang 7CATEGORIES= lang
9 8
10HOMEPAGE= http://www.php.net/ 9HOMEPAGE= http://www.php.net/
11COMMENT= PHP Hypertext Preprocessor version 5 10COMMENT= PHP Hypertext Preprocessor version 5
12LICENSE= php 11LICENSE= php
13 12
14TEST_TARGET= test 13TEST_TARGET= test
15PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
16 15
17USE_TOOLS+= gmake lex pkg-config 16USE_TOOLS+= gmake lex pkg-config
18LIBTOOL_OVERRIDE= # empty 17LIBTOOL_OVERRIDE= # empty
19 18
20.include "Makefile.php" 19.include "Makefile.php"

cvs diff -r1.8.4.1 -r1.8.4.2 pkgsrc/lang/php53/Attic/Makefile.common (expand / switch to unified diff)

--- pkgsrc/lang/php53/Attic/Makefile.common 2012/01/12 11:29:04 1.8.4.1
+++ pkgsrc/lang/php53/Attic/Makefile.common 2012/02/04 08:32:54 1.8.4.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.8.4.1 2012/01/12 11:29:04 tron Exp $ 1# $NetBSD: Makefile.common,v 1.8.4.2 2012/02/04 08:32:54 sbd Exp $
2# used by lang/php53/Makefile.php 2# used by lang/php53/Makefile.php
3# used by lang/php/ext.mk 3# used by lang/php/ext.mk
4# used by meta-pkgs/php53-extensions/Makefile 4# used by meta-pkgs/php53-extensions/Makefile
5 5
6# 6#
7# NOTE: 7# NOTE:
8# The suhosin option includes a patch from http://www.hardened-php.net/ 8# The suhosin option includes a patch from http://www.hardened-php.net/
9# Which tracks with the exact version number of PHP. There may be a delay 9# Which tracks with the exact version number of PHP. There may be a delay
10# in the patch which can leave the option broken until an updated patch 10# in the patch which can leave the option broken until an updated patch
11# is released. When updating PHP please don't forget to update the 11# is released. When updating PHP please don't forget to update the
12# distnfo with the details of the suhosin patch as well. 12# distnfo with the details of the suhosin patch as well.
13# 13#
14# Check these packages when update to new release of PHP and consider to 14# Check these packages when update to new release of PHP and consider to
@@ -29,24 +29,24 @@ DIST_SUBDIR= ${DISTNAME} @@ -29,24 +29,24 @@ DIST_SUBDIR= ${DISTNAME}
29CATEGORIES+= www 29CATEGORIES+= www
30 30
31.if !defined(PECL_VERSION) 31.if !defined(PECL_VERSION)
32MASTER_SITES?= http://www.php.net/distributions/ \ 32MASTER_SITES?= http://www.php.net/distributions/ \
33 http://uk.php.net/distributions/ \ 33 http://uk.php.net/distributions/ \
34 http://de.php.net/distributions/ \ 34 http://de.php.net/distributions/ \
35 http://us.php.net/distributions/ 35 http://us.php.net/distributions/
36EXTRACT_SUFX?= .tar.bz2 36EXTRACT_SUFX?= .tar.bz2
37.endif 37.endif
38 38
39MAINTAINER?= pkgsrc-users@NetBSD.org 39MAINTAINER?= pkgsrc-users@NetBSD.org
40HOMEPAGE?= http://www.php.net/ 40HOMEPAGE?= http://www.php.net/
41 41
42PHP_BASE_VERS= 5.3.9 42PHP_BASE_VERS= 5.3.10
43 43
44PHP_EXTENSION_DIR= lib/php/20090630 44PHP_EXTENSION_DIR= lib/php/20090630
45PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} 45PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
46 46
47PKG_SYSCONFVAR?= php 47PKG_SYSCONFVAR?= php
48 48
49# needed due to (broken?) configure checks in php-xmlrpc and php5-dom 49# needed due to (broken?) configure checks in php-xmlrpc and php5-dom
50CONFIGURE_ENV+= PHP_LIBXML_SHARED="1" 50CONFIGURE_ENV+= PHP_LIBXML_SHARED="1"
51 51
52.include "../../mk/bsd.prefs.mk" 52.include "../../mk/bsd.prefs.mk"

cvs diff -r1.10.2.2 -r1.10.2.3 pkgsrc/lang/php53/Attic/Makefile.php (expand / switch to unified diff)

--- pkgsrc/lang/php53/Attic/Makefile.php 2012/01/21 09:02:55 1.10.2.2
+++ pkgsrc/lang/php53/Attic/Makefile.php 2012/02/04 08:32:54 1.10.2.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.php,v 1.10.2.2 2012/01/21 09:02:55 sbd Exp $ 1# $NetBSD: Makefile.php,v 1.10.2.3 2012/02/04 08:32:54 sbd Exp $
2# used by lang/php53/Makefile 2# used by lang/php53/Makefile
3# used by www/ap-php/Makefile 3# used by www/ap-php/Makefile
4 4
5.include "../../lang/php53/Makefile.common" 5.include "../../lang/php53/Makefile.common"
6 6
7DISTINFO_FILE= ${.CURDIR}/../../lang/php53/distinfo 7DISTINFO_FILE= ${.CURDIR}/../../lang/php53/distinfo
8PATCHDIR= ${.CURDIR}/../../lang/php53/patches 8PATCHDIR= ${.CURDIR}/../../lang/php53/patches
9 9
10USE_LIBTOOL= YES 10USE_LIBTOOL= YES
11USE_LANGUAGES= c c++ 11USE_LANGUAGES= c c++
12GNU_CONFIGURE= YES 12GNU_CONFIGURE= YES
13BUILD_DEFS+= VARBASE 13BUILD_DEFS+= VARBASE
14PLIST_VARS+= suhosin 14PLIST_VARS+= suhosin
@@ -51,27 +51,27 @@ PKG_SUPPORTED_OPTIONS+= inet6 ssl mainta @@ -51,27 +51,27 @@ PKG_SUPPORTED_OPTIONS+= inet6 ssl mainta
51PKG_SUGGESTED_OPTIONS+= inet6 ssl 51PKG_SUGGESTED_OPTIONS+= inet6 ssl
52 52
53#SUBST_CLASSES+= ini 53#SUBST_CLASSES+= ini
54#SUBST_STAGE.ini= post-patch 54#SUBST_STAGE.ini= post-patch
55#SUBST_FILES.ini= php.ini-development 55#SUBST_FILES.ini= php.ini-development
56#SUBST_FILES.ini+= php.ini-production 56#SUBST_FILES.ini+= php.ini-production
57#SUBST_SED.ini= -e "s|\\;include_path = \".:/php/includes\"|include_path = \".:${PREFIX}/lib/php\"|g" 57#SUBST_SED.ini= -e "s|\\;include_path = \".:/php/includes\"|include_path = \".:${PREFIX}/lib/php\"|g"
58#SUBST_MESSAGE.ini= Fixing default ini files. 58#SUBST_MESSAGE.ini= Fixing default ini files.
59 59
60.include "../../mk/bsd.options.mk" 60.include "../../mk/bsd.options.mk"
61 61
62.if !empty(PKG_OPTIONS:Msuhosin) 62.if !empty(PKG_OPTIONS:Msuhosin)
63SUHOSIN_PHPVER= 5.3.9 63SUHOSIN_PHPVER= 5.3.9
64. if ${SUHOSIN_PHPVER} != ${PHP_BASE_VERS} 64. if ${SUHOSIN_PHPVER} != ${PHP_BASE_VERS} && ${PHP_BASE_VERS} != 5.3.10
65PKG_FAIL_REASON+= "The suhosin patch is currently not available for" 65PKG_FAIL_REASON+= "The suhosin patch is currently not available for"
66PKG_FAIL_REASON+= "this version of PHP. You may have to wait until" 66PKG_FAIL_REASON+= "this version of PHP. You may have to wait until"
67PKG_FAIL_REASON+= "an updated patch is released or temporarily" 67PKG_FAIL_REASON+= "an updated patch is released or temporarily"
68PKG_FAIL_REASON+= "build this package without the suhosin option." 68PKG_FAIL_REASON+= "build this package without the suhosin option."
69. else 69. else
70PATCH_SITES= http://download.suhosin.org/ 70PATCH_SITES= http://download.suhosin.org/
71PATCHFILES+= suhosin-patch-${SUHOSIN_PHPVER}-0.9.10.patch.gz 71PATCHFILES+= suhosin-patch-${SUHOSIN_PHPVER}-0.9.10.patch.gz
72PATCH_DIST_STRIP= -p1 72PATCH_DIST_STRIP= -p1
73PLIST.suhosin= yes 73PLIST.suhosin= yes
74MESSAGE_SRC= ${.CURDIR}/../../lang/php53/MESSAGE 74MESSAGE_SRC= ${.CURDIR}/../../lang/php53/MESSAGE
75MESSAGE_SRC+= ${.CURDIR}/../../lang/php53/MESSAGE.suhosin 75MESSAGE_SRC+= ${.CURDIR}/../../lang/php53/MESSAGE.suhosin
76. endif 76. endif
77.endif 77.endif

cvs diff -r1.28.2.3 -r1.28.2.4 pkgsrc/lang/php53/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/php53/Attic/distinfo 2012/01/21 09:02:55 1.28.2.3
+++ pkgsrc/lang/php53/Attic/distinfo 2012/02/04 08:32:54 1.28.2.4
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1$NetBSD: distinfo,v 1.28.2.3 2012/01/21 09:02:55 sbd Exp $ 1$NetBSD: distinfo,v 1.28.2.4 2012/02/04 08:32:54 sbd Exp $
2 2
3SHA1 (php-5.3.9/php-5.3.9.tar.bz2) = fe0626735c3d9dd370cef9bdcfe9506629449f51 3SHA1 (php-5.3.10/php-5.3.10.tar.bz2) = 689d8463b5d9e24b9bf297e35826f2ebdb69afda
4RMD160 (php-5.3.9/php-5.3.9.tar.bz2) = 428ed51982637f092c43369cf5cfb284d58da3f6 4RMD160 (php-5.3.10/php-5.3.10.tar.bz2) = acab30a19b340f21a64e06b524906f2b064dd1c9
5Size (php-5.3.9/php-5.3.9.tar.bz2) = 11704944 bytes 5Size (php-5.3.10/php-5.3.10.tar.bz2) = 11707402 bytes
6SHA1 (php-5.3.9/suhosin-patch-5.3.9-0.9.10.patch.gz) = 7b9ef5c3e0831154df0d6290aba0989ca90138ed 6SHA1 (php-5.3.10/suhosin-patch-5.3.9-0.9.10.patch.gz) = 7b9ef5c3e0831154df0d6290aba0989ca90138ed
7RMD160 (php-5.3.9/suhosin-patch-5.3.9-0.9.10.patch.gz) = ce43921fd9b183b154713ecda98294f6c68d5f22 7RMD160 (php-5.3.10/suhosin-patch-5.3.9-0.9.10.patch.gz) = ce43921fd9b183b154713ecda98294f6c68d5f22
8Size (php-5.3.9/suhosin-patch-5.3.9-0.9.10.patch.gz) = 40967 bytes 8Size (php-5.3.10/suhosin-patch-5.3.9-0.9.10.patch.gz) = 40967 bytes
9SHA1 (patch-aa) = b0dc6cd0b2103d5858280202506b33322a98496e 9SHA1 (patch-aa) = b0dc6cd0b2103d5858280202506b33322a98496e
10SHA1 (patch-ab) = d08bb50cf074a6065ef0d1d67a713b7573cb2f5b 10SHA1 (patch-ab) = d08bb50cf074a6065ef0d1d67a713b7573cb2f5b
11SHA1 (patch-ac) = 1720f154232241c19d0c6e08a824e33252f1b690 11SHA1 (patch-ac) = 1720f154232241c19d0c6e08a824e33252f1b690
12SHA1 (patch-ad) = 1608c58860a43b4e31df8646b5ded253ec9aa881 12SHA1 (patch-ad) = 1608c58860a43b4e31df8646b5ded253ec9aa881
13SHA1 (patch-ae) = e590db60a60f4e5ef2da4e5edb786335a67a3d56 13SHA1 (patch-ae) = e590db60a60f4e5ef2da4e5edb786335a67a3d56
14SHA1 (patch-af) = 1618b23fd6d090ce5aa929208416028724278bfc 14SHA1 (patch-af) = 1618b23fd6d090ce5aa929208416028724278bfc
15SHA1 (patch-ag) = c49cdff097d1e54ebe93b5afb550e89b0cc2468e 15SHA1 (patch-ag) = c49cdff097d1e54ebe93b5afb550e89b0cc2468e
16SHA1 (patch-ah) = b20c29c64b3099f77855a5ec28960dc1c4f65c83 16SHA1 (patch-ah) = b20c29c64b3099f77855a5ec28960dc1c4f65c83
17SHA1 (patch-ai) = d4766893a2c47a4e4a744248dda265b0a9a66a1f 17SHA1 (patch-ai) = d4766893a2c47a4e4a744248dda265b0a9a66a1f
18SHA1 (patch-aj) = d611d13fcc28c5d2b9e9586832ce4b8ae5707b48 18SHA1 (patch-aj) = d611d13fcc28c5d2b9e9586832ce4b8ae5707b48
19SHA1 (patch-al) = fbbee5502e0cd1c47c6e7c15e0d54746414ec32e 19SHA1 (patch-al) = fbbee5502e0cd1c47c6e7c15e0d54746414ec32e
 20SHA1 (patch-main_streams_cast.c) = c169ccb73dc660e40eff9f9e168374f35eedadad
20SHA1 (patch-php__mssql.c) = b46c688ff2d8da33ca2f9beb0eb9182b6edf7e23 21SHA1 (patch-php__mssql.c) = b46c688ff2d8da33ca2f9beb0eb9182b6edf7e23

File Added: pkgsrc/lang/php53/patches/Attic/patch-main_streams_cast.c
$NetBSD: patch-main_streams_cast.c,v 1.1.2.2 2012/02/04 08:32:55 sbd Exp $

Fix build problem of newer NetBSD.

--- main/streams/cast.c.orig	2012-01-01 13:15:04.000000000 +0000
+++ main/streams/cast.c
@@ -34,7 +34,7 @@
 typedef struct {
 	int (*reader)(void *, char *, int);
 	int (*writer)(void *, const char *, int);
-	fpos_t (*seeker)(void *, fpos_t, int);
+	off_t (*seeker)(void *, off_t, int);
 	int (*closer)(void *);
 } COOKIE_IO_FUNCTIONS_T;
 
@@ -68,11 +68,11 @@ static int stream_cookie_writer(void *co
 	return php_stream_write((php_stream *)cookie, (char *)buffer, size);
 }
 
-static fpos_t stream_cookie_seeker(void *cookie, off_t position, int whence)
+static off_t stream_cookie_seeker(void *cookie, off_t position, int whence)
 {
 	TSRMLS_FETCH();
 
-	return (fpos_t)php_stream_seek((php_stream *)cookie, position, whence);
+	return (off_t)php_stream_seek((php_stream *)cookie, position, whence);
 }
 
 static int stream_cookie_closer(void *cookie)