]> git.pld-linux.org Git - packages/php.git/commitdiff
move date.timezone to separate file
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 11 Aug 2019 08:19:48 +0000 (11:19 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 11 Aug 2019 09:32:17 +0000 (12:32 +0300)
this leaves php.ini typically unmodified
(leaving no .rpmnew around when upgrading)

php-ini.patch
php.spec
timezone.ini [new file with mode: 0644]

index 992bd781531d008aed0a0cfef127a6baba4b2bbd..1c80a9bd65abba34fa985538f7ba8f1b316ddfc2 100644 (file)
@@ -1,5 +1,5 @@
---- php-7.4.0beta1/php.ini~    2019-08-01 12:11:42.000000000 +0300
-+++ php-7.4.0beta1/php.ini     2019-08-01 13:04:23.234196613 +0300
+--- php-7.4.0beta1/php.ini     2019-08-01 13:04:23.234196613 +0300
++++ php-7.4.0beta2/php.ini     2019-08-11 11:16:25.219875168 +0300
 @@ -82,6 +82,20 @@
  ; much more verbose when it comes to errors. We recommending using the
  ; development version only in development environments as errors shown to
@@ -21,7 +21,7 @@
  
  ;;;;;;;;;;;;;;;;;;;
  ; Quick Reference ;
-@@ -181,10 +181,8 @@
+@@ -167,10 +181,8 @@
  ; php.ini Options  ;
  ;;;;;;;;;;;;;;;;;;;;
  ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
@@ -33,7 +33,7 @@
  
  ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
  ;user_ini.cache_ttl = 300
-@@ -223,7 +237,7 @@
+@@ -225,7 +237,7 @@
  ; Development Value: Off
  ; Production Value: Off
  ; http://php.net/short-open-tag
@@ -42,7 +42,7 @@
  
  ; Allow ASP-style <% %> tags.
  ; http://php.net/asp-tags
-@@ -372,7 +372,7 @@
+@@ -360,7 +372,7 @@
  ; threat in any way, but it makes it possible to determine whether you use PHP
  ; on your server or not.
  ; http://php.net/expose-php
@@ -51,7 +51,7 @@
  
  ;;;;;;;;;;;;;;;;;;;
  ; Resource Limits ;
-@@ -756,9 +756,7 @@
+@@ -744,9 +756,7 @@
  
  ; Directory in which the loadable extensions (modules) reside.
  ; http://php.net/extension-dir
@@ -62,7 +62,7 @@
  
  ; Directory where the temporary files should be placed.
  ; Defaults to the system default (see sys_get_temp_dir)
-@@ -768,64 +768,6 @@
+@@ -758,64 +768,6 @@
  ; http://php.net/enable-dl
  enable_dl = Off
  
  ;;;;;;;;;;;;;;;;
  ; File Uploads ;
  ;;;;;;;;;;;;;;;;
-@@ -847,47 +847,8 @@
+@@ -895,47 +847,8 @@
  ; deprecated in a future PHP major version. So, when it is possible, please
  ; move to the new ('extension=<ext>) syntax.
  ;
  
  ;;;;;;;;;;;;;;;;;;;
  ; Module Settings ;
-@@ -923,19 +883,19 @@
+@@ -954,8 +867,9 @@
+ [Date]
+ ; Defines the default timezone used by the date functions
+-; http://php.net/date.timezone
+-;date.timezone =
++; http://php.net/date.timezone.
++;
++; NOTE: In PLD Linux the /etc/php/conf.d/timezone.ini is used to set timezone
+ ; http://php.net/date.default-latitude
+ ;date.default_latitude = 31.7667
+@@ -970,19 +884,19 @@
  ; Use of this INI entry is deprecated, use global input_encoding instead.
  ; If empty, default_charset or input_encoding or iconv.input_encoding is used.
  ; The precedence is: default_charset < input_encoding < iconv.input_encoding
  
  [intl]
  ;intl.default_locale =
-@@ -1357,7 +1273,7 @@
+@@ -1360,7 +1274,7 @@
  
  [browscap]
  ; http://php.net/browscap
  
  [Session]
  ; Handler used to store/retrieve data.
-@@ -1660,7 +1660,7 @@
+@@ -1747,7 +1661,7 @@
  
  ; Sets the directory name where SOAP extension will put cache files.
  ; http://php.net/soap.wsdl-cache-dir
  
  ; (time to live) Sets the number of second while cached file will be used
  ; instead of original one.
-@@ -1674,150 +1674,6 @@
+@@ -1761,150 +1675,6 @@
  [dba]
  ;dba.default_handler=
  
index bbbde1108702b4b8cee28bf3f8305c120f16fcba..46d81934ed0749de62c68053f089107efa5a76e7 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -174,6 +174,7 @@ Source2:    %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
 Source5:       %{orgname}-cli.ini
+Source6:       timezone.ini
 Source10:      %{orgname}-fpm.init
 Source11:      %{orgname}-fpm.logrotate
 Source12:      %{orgname}-branch.sh
@@ -2417,7 +2418,7 @@ exit $rc
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache},%{_sysconfdir}/cgi} \
-       $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache2handler}.d \
+       $RPM_BUILD_ROOT%{_sysconfdir}/{conf,cgi-fcgi,cli,apache2handler}.d \
        $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}} \
        $RPM_BUILD_ROOT/etc/httpd/conf.d \
        $RPM_BUILD_ROOT%{_mandir}/man{1,8} \
@@ -2526,6 +2527,7 @@ echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
 ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
 
 cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/timezone.ini
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
 
 %if %{with apache2}
@@ -2610,7 +2612,7 @@ if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/s
        TIMEZONE=
        . /etc/sysconfig/timezone
        if [ "$TIMEZONE" ]; then
-               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
+               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/conf.d/timezone.ini
        fi
 fi
 
@@ -2838,6 +2840,7 @@ fi
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/timezone.ini
 %attr(755,root,root) %{_libdir}/libphp_common-*.so
 %dir %{php_extensiondir}
 
diff --git a/timezone.ini b/timezone.ini
new file mode 100644 (file)
index 0000000..c99e209
--- /dev/null
@@ -0,0 +1,3 @@
+; Defines the default timezone used by the date functions
+; http://php.net/date.timezone
+;date.timezone = UTC
This page took 0.068042 seconds and 4 git commands to generate.