File: 006-debian_quirks.patch

package info (click to toggle)
php5 5.2.0%2Bdfsg-8%2Betch16
  • links: PTS
  • area: main
  • in suites: etch
  • size: 58,940 kB
  • ctags: 45,388
  • sloc: ansic: 533,605; sh: 17,835; php: 11,336; cpp: 4,289; xml: 3,809; yacc: 2,446; lex: 2,174; makefile: 1,150; tcl: 1,128; awk: 693; perl: 71; sql: 22; pascal: 15
file content (352 lines) | stat: -rw-r--r-- 13,729 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
diff -uNr php-5.0.4.orig/configure.in php-5.0.4/configure.in
--- php-5.0.4.orig/configure.in	2005-03-30 23:43:12.000000000 +0200
+++ php-5.0.4/configure.in	2005-04-27 11:15:29.276399240 +0200
@@ -925,7 +925,7 @@
 fi
 
 PHP_ARG_WITH(pear, [whether to install PEAR],
-[  --with-pear=DIR         Install PEAR in DIR [PREFIX/lib/php]
+[  --with-pear=DIR         Install PEAR in DIR [PREFIX/lib/php5]
   --without-pear          Do not install PEAR], DEFAULT, yes)
 
 if test "$PHP_PEAR" != "no"; then
@@ -959,7 +959,7 @@
   if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
     case $PHP_LAYOUT in
       GNU) PEAR_INSTALLDIR=$datadir/pear;;
-      *)   PEAR_INSTALLDIR=$libdir/php;;
+      *)   PEAR_INSTALLDIR=$libdir/php5;;
     esac
   fi
 
@@ -1014,12 +1014,12 @@
 
 case $libdir in
   '${exec_prefix}/lib')
-    libdir=$libdir/php
+    libdir=$libdir/php5
     ;;
 esac
 case $datadir in
   '${prefix}/share')
-    datadir=$datadir/php
+    datadir=$datadir/php5
     ;;
   *) ;;
 esac
@@ -1076,7 +1076,7 @@
 EXPANDED_DATADIR=$datadir
 EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
 EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
+INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:/usr/share/pear
 
 exec_prefix=$old_exec_prefix
 libdir=$old_libdir
diff -uNr php-5.0.4.orig/ext/ext_skel php-5.0.4/ext/ext_skel
--- php-5.0.4.orig/ext/ext_skel	2004-05-16 14:10:35.000000000 +0200
+++ php-5.0.4/ext/ext_skel	2005-04-27 11:14:32.914967480 +0200
@@ -70,7 +70,7 @@
 fi
 
 if test -z "$skel_dir"; then
-  skel_dir="skeleton"
+  skel_dir="/usr/lib/php5/skeleton"
 fi
 
 ## convert skel_dir to full path
diff -uNr php-5.0.4.orig/ext/session/session.c php-5.0.4/ext/session/session.c
--- php-5.0.4.orig/ext/session/session.c	2005-03-24 01:17:53.000000000 +0100
+++ php-5.0.4/ext/session/session.c	2005-04-27 11:14:32.923966112 +0200
@@ -152,11 +152,11 @@
 PHP_INI_BEGIN()
 	STD_PHP_INI_BOOLEAN("session.bug_compat_42",    "1",         PHP_INI_ALL, OnUpdateBool,   bug_compat,         php_ps_globals,    ps_globals)
 	STD_PHP_INI_BOOLEAN("session.bug_compat_warn",  "1",         PHP_INI_ALL, OnUpdateBool,   bug_compat_warn,    php_ps_globals,    ps_globals)
-	STD_PHP_INI_ENTRY("session.save_path",          "",          PHP_INI_ALL, OnUpdateSaveDir,save_path,          php_ps_globals,    ps_globals)
+	STD_PHP_INI_ENTRY("session.save_path",          "/var/lib/php5",      PHP_INI_ALL, OnUpdateString, save_path,          php_ps_globals,    ps_globals)
 	STD_PHP_INI_ENTRY("session.name",               "PHPSESSID", PHP_INI_ALL, OnUpdateString, session_name,       php_ps_globals,    ps_globals)
 	PHP_INI_ENTRY("session.save_handler",           "files",     PHP_INI_ALL, OnUpdateSaveHandler)
 	STD_PHP_INI_BOOLEAN("session.auto_start",       "0",         PHP_INI_ALL, OnUpdateBool,   auto_start,         php_ps_globals,    ps_globals)
-	STD_PHP_INI_ENTRY("session.gc_probability",     "1",         PHP_INI_ALL, OnUpdateLong,    gc_probability,     php_ps_globals,    ps_globals)
+	STD_PHP_INI_ENTRY("session.gc_probability",     "0",         PHP_INI_ALL, OnUpdateLong,    gc_probability,     php_ps_globals,    ps_globals)
 	STD_PHP_INI_ENTRY("session.gc_divisor",         "100",       PHP_INI_ALL, OnUpdateLong,    gc_divisor,        php_ps_globals,    ps_globals)
 	STD_PHP_INI_ENTRY("session.gc_maxlifetime",     "1440",      PHP_INI_ALL, OnUpdateLong,    gc_maxlifetime,     php_ps_globals,    ps_globals)
 	PHP_INI_ENTRY("session.serialize_handler",      "php",       PHP_INI_ALL, OnUpdateSerializer)
diff -uNr php-5.0.4.orig/php.ini-dist php-5.0.4/php.ini-dist
--- php-5.0.4.orig/php.ini-dist	2005-03-01 01:25:09.000000000 +0100
+++ php-5.0.4/php.ini-dist	2005-04-27 11:14:32.929965200 +0200
@@ -441,7 +441,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+;include_path = ".:/usr/share/php"
 ;
 ; Windows: "\path1;\path2"
 ;include_path = ".;c:\php\includes"
@@ -458,7 +458,7 @@
 user_dir =
 
 ; Directory in which the loadable extensions (modules) reside.
-extension_dir = "./"
+; extension_dir = "./"
 
 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
@@ -560,46 +560,10 @@
 ; extension_dir directive above.
 
 
-; Windows Extensions
-; Note that ODBC support is built in, so no dll is needed for it.
-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
-; extension folders as well as the separate PECL DLL download (PHP 5).
-; Be sure to appropriately set the extension_dir directive.
-
-;extension=php_mbstring.dll
-;extension=php_bz2.dll
-;extension=php_curl.dll
-;extension=php_dba.dll
-;extension=php_dbase.dll
-;extension=php_exif.dll
-;extension=php_fdf.dll
-;extension=php_filepro.dll
-;extension=php_gd2.dll
-;extension=php_gettext.dll
-;extension=php_ifx.dll
-;extension=php_imap.dll
-;extension=php_interbase.dll
-;extension=php_ldap.dll
-;extension=php_mcrypt.dll
-;extension=php_mhash.dll
-;extension=php_mime_magic.dll
-;extension=php_ming.dll
-;extension=php_mssql.dll
-;extension=php_msql.dll
-;extension=php_mysql.dll
-;extension=php_oci8.dll
-;extension=php_openssl.dll
-;extension=php_oracle.dll
-;extension=php_pgsql.dll
-;extension=php_shmop.dll
-;extension=php_snmp.dll
-;extension=php_sockets.dll
-;extension=php_sqlite.dll
-;extension=php_sybase_ct.dll
-;extension=php_tidy.dll
-;extension=php_xmlrpc.dll
-;extension=php_xsl.dll
+; Example lines:
 
+;extension=mysql.so
+;extension=gd.so
 
 ;;;;;;;;;;;;;;;;;;;
 ; Module Settings ;
@@ -878,7 +837,7 @@
 ;
 ; where MODE is the octal representation of the mode. Note that this
 ; does not overwrite the process's umask.
-;session.save_path = "/tmp"
+;session.save_path = /var/lib/php5
 
 ; Whether to use cookies.
 session.use_cookies = 1
@@ -911,7 +870,10 @@
 ; e.g. 1/100 means there is a 1% chance that the GC process starts
 ; on each request.
 
-session.gc_probability = 1
+; This is disabled in the Debian packages, due to the strict permissions
+; on /var/lib/php5.  Instead of setting this here, see the cronjob at
+; /etc/cron.d/php5, which uses the session.gc_maxlifetime setting below
+;session.gc_probability = 0
 session.gc_divisor     = 100
 
 ; After this number of seconds, stored data will be seen as 'garbage' and
diff -uNr php-5.0.4.orig/php.ini-recommended php-5.0.4/php.ini-recommended
--- php-5.0.4.orig/php.ini-recommended	2005-03-01 01:25:09.000000000 +0100
+++ php-5.0.4/php.ini-recommended	2005-04-27 11:14:32.930965048 +0200
@@ -499,7 +499,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+;include_path = ".:/usr/share/php"
 ;
 ; Windows: "\path1;\path2"
 ;include_path = ".;c:\php\includes"
@@ -516,7 +516,7 @@
 user_dir =
 
 ; Directory in which the loadable extensions (modules) reside.
-extension_dir = "./"
+;extension_dir = "./"
 
 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
@@ -617,47 +617,10 @@
 ; needs to go here.  Specify the location of the extension with the
 ; extension_dir directive above.
 
+; Example lines:
 
-; Windows Extensions
-; Note that ODBC support is built in, so no dll is needed for it.
-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
-; extension folders as well as the separate PECL DLL download (PHP 5).
-; Be sure to appropriately set the extension_dir directive.
-
-;extension=php_mbstring.dll
-;extension=php_bz2.dll
-;extension=php_curl.dll
-;extension=php_dba.dll
-;extension=php_dbase.dll
-;extension=php_exif.dll
-;extension=php_fdf.dll
-;extension=php_filepro.dll
-;extension=php_gd2.dll
-;extension=php_gettext.dll
-;extension=php_ifx.dll
-;extension=php_imap.dll
-;extension=php_interbase.dll
-;extension=php_ldap.dll
-;extension=php_mcrypt.dll
-;extension=php_mhash.dll
-;extension=php_mime_magic.dll
-;extension=php_ming.dll
-;extension=php_mssql.dll
-;extension=php_msql.dll
-;extension=php_mysql.dll
-;extension=php_oci8.dll
-;extension=php_openssl.dll
-;extension=php_oracle.dll
-;extension=php_pgsql.dll
-;extension=php_shmop.dll
-;extension=php_snmp.dll
-;extension=php_sockets.dll
-;extension=php_sqlite.dll
-;extension=php_sybase_ct.dll
-;extension=php_tidy.dll
-;extension=php_xmlrpc.dll
-;extension=php_xsl.dll
-
+;extension=mysql.so
+;extension=gd.so
 
 ;;;;;;;;;;;;;;;;;;;
 ; Module Settings ;
@@ -936,7 +894,7 @@
 ;
 ; where MODE is the octal representation of the mode. Note that this
 ; does not overwrite the process's umask.
-;session.save_path = "/tmp"
+;session.save_path = /var/lib/php5
 
 ; Whether to use cookies.
 session.use_cookies = 1
@@ -969,7 +927,10 @@
 ; e.g. 1/100 means there is a 1% chance that the GC process starts
 ; on each request.
 
-session.gc_probability = 1
+; This is disabled in the Debian packages, due to the strict permissions
+; on /var/lib/php5.  Instead of setting this here, see the cronjob at
+; /etc/cron.d/php5, which uses the session.gc_maxlifetime setting below
+;session.gc_probability = 0
 session.gc_divisor     = 1000
 
 ; After this number of seconds, stored data will be seen as 'garbage' and
diff -uNr php-5.0.4.orig/sapi/caudium/config.m4 php-5.0.4/sapi/caudium/config.m4
--- php-5.0.4.orig/sapi/caudium/config.m4	2004-01-17 14:00:10.000000000 +0100
+++ php-5.0.4/sapi/caudium/config.m4	2005-04-27 11:14:32.935964288 +0200
@@ -24,8 +24,8 @@
 		AC_MSG_ERROR(Couldn't find a pike in $withval/bin/)
 	fi
     if $PIKE -e 'float v; int rel;sscanf(version(), "Pike v%f release %d", v, rel);v += rel/10000.0; if(v < 7.0268) exit(1); exit(0);'; then
-		PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
-	    PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,' `
+		PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Master file' | sed -e 's/.*: //' -e 's/master.pike/modules/'`
+	    PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/modules,,' -e 's,modules,include,' `
 		if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then
 			AC_MSG_ERROR(Failed to figure out Pike module and include directories)
 		fi
@@ -82,7 +82,9 @@
     PIKE_VERSION=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`   
 	AC_DEFINE(HAVE_CAUDIUM,1,[Whether to compile with Caudium support])
     PHP_SELECT_SAPI(caudium, shared, caudium.c)
-	INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $withval/lib/$PIKE_VERSION/PHP5.so"
+    dnl FIXME: This is the ugliest hack in the world!
+    dnl INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)$withval/lib/$PIKE_VERSION/ && \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$withval/lib/$PIKE_VERSION/php5.so"
+	INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)$withval/lib/$PIKE_VERSION/ && \$(INSTALL) -m 0755 .$SAPI_SHARED \$(INSTALL_ROOT)$withval/lib/$PIKE_VERSION/PHP5.so"
 	RESULT="	*** Pike binary used:         $PIKE
 	*** Pike include dir(s) used: $PIKE_INCLUDE_DIR
 	*** Pike version:             $PIKE_VERSION"
diff -uNr php-5.0.4.orig/sapi/cli/php.1.in php-5.0.4/sapi/cli/php.1.in
--- php-5.0.4.orig/sapi/cli/php.1.in	2004-05-02 11:14:02.000000000 +0200
+++ php-5.0.4/sapi/cli/php.1.in	2005-04-27 11:14:32.936964136 +0200
@@ -296,13 +296,17 @@
 .B name
 .SH FILES
 .TP 15
-.B php\-cli.ini
+.B /etc/php5/cli/php.ini
 The configuration file for the CLI version of PHP.
 .TP
-.B php.ini
-The standard configuration file will only be used when 
-.B php\-cli.ini
-cannot be found.
+.B /etc/php5/cgi/php.ini
+The configuration file for the CGI version of PHP.
+.TP
+.B /etc/php5/apache/php.ini
+The configuration file for the version of PHP that apache uses.
+.TP
+.B /etc/php5/apache2/php.ini
+The configuration file for the version of PHP that apache2 uses.
 .SH EXAMPLES
 .TP 5
 \fIphp -r 'echo "Hello World\\n";'\fP
diff -uNr php-5.0.4.orig/scripts/Makefile.frag php-5.0.4/scripts/Makefile.frag
--- php-5.0.4.orig/scripts/Makefile.frag	2005-02-28 06:28:25.000000000 +0100
+++ php-5.0.4/scripts/Makefile.frag	2005-04-27 11:14:32.936964136 +0200
@@ -3,8 +3,8 @@
 # Build environment install
 #
 
-phpincludedir = $(includedir)/php
-phpbuilddir = $(libdir)/build
+phpincludedir = $(includedir)/php5
+phpbuilddir = $(prefix)/lib/php5/build
 
 BUILD_FILES = \
 	scripts/phpize.m4 \
diff -uNr php-5.0.4.orig/scripts/php-config.in php-5.0.4/scripts/php-config.in
--- php-5.0.4.orig/scripts/php-config.in	2005-03-16 07:36:54.000000000 +0100
+++ php-5.0.4/scripts/php-config.in	2005-04-27 11:14:32.936964136 +0200
@@ -3,8 +3,8 @@
 exec_prefix="@exec_prefix@"
 version="@PHP_VERSION@"
 version_id="@PHP_VERSION_ID@"
-includedir="@includedir@/php"
+includedir="@includedir@/php5"
-includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I$includedir/ext -I$includedir/ext/date/lib"
+includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I$includedir/ext -I$includedir/ext/date/lib $(getconf LFS_CFLAGS)"
 ldflags="@PHP_LDFLAGS@"
 libs="@EXTRA_LIBS@"
 extension_dir='@EXTENSION_DIR@'
diff -uNr php-5.0.4.orig/scripts/phpize.in php-5.0.4/scripts/phpize.in
--- php-5.0.4.orig/scripts/phpize.in	2005-01-25 13:54:57.000000000 +0100
+++ php-5.0.4/scripts/phpize.in	2005-04-27 11:14:32.943963072 +0200
@@ -3,8 +3,8 @@
 # Variable declaration
 prefix='@prefix@'
 exec_prefix="`eval echo @exec_prefix@`"
-phpdir="`eval echo @libdir@`/build"
-includedir="`eval echo @includedir@`/php"
+phpdir="$prefix/lib/php5/build"
+includedir="$prefix/include/php5"
 builddir="`pwd`"
 
 FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool libtool.m4"