Browse Source

php5: remove patches for sqlite2 support

SQLite2 support was dropped by upstream a long time ago, so
let's remove the leftovers here, too.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Michael Heimpold 10 years ago
parent
commit
ee6be18e88
3 changed files with 2 additions and 50954 deletions
  1. 2
    8
      lang/php5/Makefile
  2. 0
    50845
      lang/php5/patches/090-restore-sqlite2.patch
  3. 0
    101
      lang/php5/patches/091-fix-sqlite2.patch

+ 2
- 8
lang/php5/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=php
11 11
 PKG_VERSION:=5.4.36
12
-PKG_RELEASE:=4
12
+PKG_RELEASE:=5
13 13
 
14 14
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
15 15
 
@@ -38,7 +38,7 @@ PHP5_MODULES = \
38 38
 	mbstring mcrypt mysql mysqli \
39 39
 	openssl \
40 40
 	pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
41
-	session shmop simplexml soap sockets sqlite sqlite3 sysvmsg sysvsem sysvshm \
41
+	session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \
42 42
 	tokenizer \
43 43
 	xml xmlreader xmlwriter zip \
44 44
 
@@ -336,12 +336,6 @@ else
336 336
   CONFIGURE_ARGS+= --disable-sockets
337 337
 endif
338 338
 
339
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-sqlite),)
340
-  CONFIGURE_ARGS+= --with-sqlite=shared,"$(STAGING_DIR)/usr"
341
-else
342
-  CONFIGURE_ARGS+= --without-sqlite
343
-endif
344
-
345 339
 ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-sqlite3),)
346 340
   CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
347 341
 else

+ 0
- 50845
lang/php5/patches/090-restore-sqlite2.patch
File diff suppressed because it is too large
View File


+ 0
- 101
lang/php5/patches/091-fix-sqlite2.patch View File

@@ -1,101 +0,0 @@
1
---- a/ext/sqlite/pdo_sqlite2.c
2
-+++ b/ext/sqlite/pdo_sqlite2.c
3
-@@ -522,11 +522,6 @@ static char *make_filename_safe(const ch
4
- 			return NULL;
5
- 		}
6
- 
7
--		if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
8
--			efree(fullpath);
9
--			return NULL;
10
--		}
11
--
12
- 		if (php_check_open_basedir(fullpath TSRMLS_CC)) {
13
- 			efree(fullpath);
14
- 			return NULL;
15
-@@ -585,7 +580,7 @@ static int pdo_sqlite2_handle_factory(pd
16
- 
17
- 	if (!filename) {
18
- 		zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC,
19
--				"safe_mode/open_basedir prohibits opening %s",
20
-+				"open_basedir prohibits opening %s",
21
- 				dbh->data_source);
22
- 		goto cleanup;
23
- 	}
24
---- a/ext/sqlite/sqlite.c
25
-+++ b/ext/sqlite/sqlite.c
26
-@@ -1066,10 +1066,6 @@ static int php_sqlite_authorizer(void *a
27
- 		case SQLITE_COPY:
28
- 			if (strncmp(arg4, ":memory:", sizeof(":memory:") - 1)) {
29
- 				TSRMLS_FETCH();
30
--				if (PG(safe_mode) && (!php_checkuid(arg4, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
31
--					return SQLITE_DENY;
32
--				}
33
--
34
- 				if (php_check_open_basedir(arg4 TSRMLS_CC)) {
35
- 					return SQLITE_DENY;
36
- 				}
37
-@@ -1079,10 +1075,6 @@ static int php_sqlite_authorizer(void *a
38
- 		case SQLITE_ATTACH:
39
- 			if (strncmp(arg3, ":memory:", sizeof(":memory:") - 1)) {
40
- 				TSRMLS_FETCH();
41
--				if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
42
--					return SQLITE_DENY;
43
--				}
44
--
45
- 				if (php_check_open_basedir(arg3 TSRMLS_CC)) {
46
- 					return SQLITE_DENY;
47
- 				}
48
-@@ -1160,13 +1152,12 @@ static void sqlite_object_free_storage(v
49
- static void sqlite_object_new(zend_class_entry *class_type, zend_object_handlers *handlers, zend_object_value *retval TSRMLS_DC)
50
- {
51
- 	sqlite_object *intern;
52
--	zval *tmp;
53
- 
54
- 	intern = emalloc(sizeof(sqlite_object));
55
- 	memset(intern, 0, sizeof(sqlite_object));
56
- 
57
- 	zend_object_std_init(&intern->std, class_type TSRMLS_CC);
58
--	zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
59
-+	object_properties_init(&intern->std, class_type);
60
- 
61
- 	retval->handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) sqlite_object_free_storage, NULL TSRMLS_CC);
62
- 	retval->handlers = handlers;
63
-@@ -1510,7 +1501,7 @@ static struct php_sqlite_db *php_sqlite_
64
- 	/* authorizer hook so we can enforce safe mode
65
- 	 * Note: the declaration of php_sqlite_authorizer is correct for 2.8.2 of libsqlite,
66
- 	 * and IS backwards binary compatible with earlier versions */
67
--	if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
68
-+	if (PG(open_basedir) && *PG(open_basedir)) {
69
- 		sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL);
70
- 	}
71
- 
72
-@@ -1569,8 +1560,7 @@ PHP_FUNCTION(sqlite_popen)
73
- 			RETURN_FALSE;
74
- 		}
75
- 
76
--		if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || 
77
--				php_check_open_basedir(fullpath TSRMLS_CC)) {
78
-+		if (php_check_open_basedir(fullpath TSRMLS_CC)) {
79
- 			efree(fullpath);
80
- 			RETURN_FALSE;
81
- 		}
82
-@@ -1656,8 +1646,7 @@ PHP_FUNCTION(sqlite_open)
83
- 			}
84
- 		}
85
- 
86
--		if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) ||
87
--				php_check_open_basedir(fullpath TSRMLS_CC)) {
88
-+		if (php_check_open_basedir(fullpath TSRMLS_CC)) {
89
- 			efree(fullpath);
90
- 			zend_restore_error_handling(&error_handling TSRMLS_CC);
91
- 			if (object) {
92
-@@ -1710,8 +1699,7 @@ PHP_FUNCTION(sqlite_factory)
93
- 			RETURN_NULL();
94
- 		}
95
- 
96
--		if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) ||
97
--				php_check_open_basedir(fullpath TSRMLS_CC)) {
98
-+		if (php_check_open_basedir(fullpath TSRMLS_CC)) {
99
- 			efree(fullpath);
100
- 			zend_restore_error_handling(&error_handling TSRMLS_CC);
101
- 			RETURN_NULL();