packages: gnome-settings-daemon/use-etc-sysconfig-timezone.patch (NEW) - us...

megabajt megabajt at pld-linux.org
Wed Mar 16 23:03:59 CET 2011


Author: megabajt                     Date: Wed Mar 16 22:03:59 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use /etc/sysconfig/timezone to read system timezone

---- Files affected:
packages/gnome-settings-daemon:
   use-etc-sysconfig-timezone.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gnome-settings-daemon/use-etc-sysconfig-timezone.patch
diff -u /dev/null packages/gnome-settings-daemon/use-etc-sysconfig-timezone.patch:1.1
--- /dev/null	Wed Mar 16 23:03:59 2011
+++ packages/gnome-settings-daemon/use-etc-sysconfig-timezone.patch	Wed Mar 16 23:03:54 2011
@@ -0,0 +1,70 @@
+diff -urN gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c
+--- gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c	2011-03-02 18:13:27.000000000 +0000
++++ gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c	2011-03-16 21:20:28.720003184 +0000
+@@ -55,12 +55,13 @@
+ #include "system-timezone.h"
+ 
+ /* Files that we look at */
+-#define ETC_TIMEZONE        "/etc/timezone"
+-#define ETC_TIMEZONE_MAJ    "/etc/TIMEZONE"
+-#define ETC_RC_CONF         "/etc/rc.conf"
+-#define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
+-#define ETC_CONF_D_CLOCK    "/etc/conf.d/clock"
+-#define ETC_LOCALTIME       "/etc/localtime"
++#define ETC_TIMEZONE           "/etc/timezone"
++#define ETC_TIMEZONE_MAJ       "/etc/TIMEZONE"
++#define ETC_RC_CONF            "/etc/rc.conf"
++#define ETC_SYSCONFIG_CLOCK    "/etc/sysconfig/clock"
++#define ETC_SYSCONFIG_TIMEZONE "/etc/sysconfig/timezone"
++#define ETC_CONF_D_CLOCK       "/etc/conf.d/clock"
++#define ETC_LOCALTIME          "/etc/localtime"
+ 
+ /* The first 4 characters in a timezone file, from tzfile.h */
+ #define TZ_MAGIC "TZif"
+@@ -198,6 +199,7 @@
+  *    openSUSE: the TIMEZONE key in /etc/sysconfig/clock
+  *    Solaris/OpenSolaris: the TZ key in /etc/TIMEZONE
+  *    Arch Linux: the TIMEZONE key in /etc/rc.conf
++ *    PLD Linux: the TIMEZONE key in /etc/sysconfig/timezone
+  *    Gentoo (old): the ZONE key in /etc/conf.d/clock
+  *
+  *    FIXME: reading the system-tools-backends, it seems there's this too:
+@@ -472,6 +474,22 @@
+                                                "TIMEZONE", tz, error);
+ }
+ 
++/* This works for PLD Linux */
++static char *
++system_timezone_read_etc_sysconfig_timezone (void)
++{
++	return system_timezone_read_key_file (ETC_SYSCONFIG_TIMEZONE,
++					      "TIMEZONE");
++}
++
++static gboolean
++system_timezone_write_etc_sysconfig_timezone (const char *tz,
++					       GError **error)
++{
++	return system_timezone_write_key_file (ETC_SYSCONFIG_TIMEZONE,
++					       "TIMEZONE", tz, error);
++}
++
+ /* This works for Arch Linux */
+ static char *
+ system_timezone_read_etc_rc_conf (void)
+@@ -696,6 +713,7 @@
+         system_timezone_read_etc_timezone,
+         system_timezone_read_etc_sysconfig_clock,
+         system_timezone_read_etc_sysconfig_clock_alt,
++        system_timezone_read_etc_sysconfig_timezone,
+         system_timezone_read_etc_TIMEZONE,
+         system_timezone_read_etc_rc_conf,
+         /* reading deprecated config files */
+@@ -866,6 +884,7 @@
+         system_timezone_write_etc_timezone,
+         system_timezone_write_etc_sysconfig_clock,
+         system_timezone_write_etc_sysconfig_clock_alt,
++        system_timezone_write_etc_sysconfig_timezone,
+         system_timezone_write_etc_TIMEZONE,
+         system_timezone_write_etc_rc_conf,
+         /* writing deprecated config files if they exist and have the
================================================================


More information about the pld-cvs-commit mailing list