[packages/systemd] - get timezone info from /etc/sysconfig/timezone - rel 3

baggins baggins at pld-linux.org
Fri Dec 21 11:52:31 CET 2012


commit a2211e27e525b3a7f28e5ecc3e7ccb4cf27b4969
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 21 11:52:01 2012 +0100

    - get timezone info from /etc/sysconfig/timezone
    - rel 3

 systemd.spec     |  4 +---
 target-pld.patch | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index d2daac7..5c805ee 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -1,6 +1,4 @@
 # TODO:
-# - restore sysconfig/timezone support in target-pld patch
-#   [now systemd expects /etc/localtime to be symlink to /usr/share/zoneinfo/... unconditionally]
 # - pldize vconsole setup:
 # 	http://cgit.freedesktop.org/systemd/systemd/tree/src/vconsole/vconsole-setup.c
 # - initrd needs love (does not build and is probably completly unusable in current form)
@@ -43,7 +41,7 @@ Summary(pl.UTF-8):	systemd - zarządca systemu i usług dla Linuksa
 Name:		systemd
 # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
 Version:	196
-Release:	2
+Release:	3
 Epoch:		1
 License:	GPL v2+
 Group:		Base
diff --git a/target-pld.patch b/target-pld.patch
index 47a3e83..eee49c2 100644
--- a/target-pld.patch
+++ b/target-pld.patch
@@ -157,6 +157,24 @@ index 298cb4e..cec3974 100644
          const char *verb = args[0];
          unsigned f = 1, t = 1;
          LookupPaths paths;
+--- systemd-196/src/timedate/timedated.c~	2012-10-16 23:35:40.589269718 +0200
++++ systemd-196/src/timedate/timedated.c	2012-12-21 11:46:13.545086335 +0100
+@@ -175,6 +175,15 @@
+                 }
+         }
+ 
++#ifdef TARGET_PLD
++	r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
++			   "TIMEZONE", &tz.zone,
++			   NULL);
++	if (r < 0) {
++		if (r != -ENOENT)
++			log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
++	}
++#endif
+ #ifdef HAVE_DEBIAN
+         r = read_one_line_file("/etc/timezone", &tz.zone);
+         if (r < 0) {
 diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
 index 9196789..1d1a916 100644
 --- a/src/vconsole/vconsole-setup.c
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/a2211e27e525b3a7f28e5ecc3e7ccb4cf27b4969



More information about the pld-cvs-commit mailing list