[kdebase-workspace] * Sat Oct 29 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.2-12 - kcm_clock helper: Sync the hwcloc

Kevin Kofler kkofler at fedoraproject.org
Sat Oct 29 03:09:23 UTC 2011


commit 7c74a242c5f88b48f9d7169ad3d9ee974170678c
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Sat Oct 29 05:09:14 2011 +0200

    * Sat Oct 29 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.2-12
    - kcm_clock helper: Sync the hwclock after setting the date (#749516)

 kdebase-workspace-4.7.2-hwclock.patch |   38 +++++++++++++++++++++++++++++++++
 kdebase-workspace.spec                |   10 +++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/kdebase-workspace-4.7.2-hwclock.patch b/kdebase-workspace-4.7.2-hwclock.patch
new file mode 100644
index 0000000..b1b2bc5
--- /dev/null
+++ b/kdebase-workspace-4.7.2-hwclock.patch
@@ -0,0 +1,38 @@
+From 2655aea490928dbc884aae35c1ffc52bad6f9f5a Mon Sep 17 00:00:00 2001
+Message-Id: <2655aea490928dbc884aae35c1ffc52bad6f9f5a.1319856357.git.kevin.kofler at chello.at>
+From: Kevin Kofler <kevin.kofler at chello.at>
+Date: Sat, 29 Oct 2011 04:45:32 +0200
+Subject: [PATCH] kcm_clock helper: Sync the hwclock after setting the date.
+
+Recent versions of systemd no longer do this automatically on shutdown, so if
+we don't take care of writing to the hardware clock ourselves, the time will be
+reset after a reboot.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=749516
+---
+ kcontrol/dateandtime/helper.cpp |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/kcontrol/dateandtime/helper.cpp b/kcontrol/dateandtime/helper.cpp
+index f018e92..5a946d8 100644
+--- a/kcontrol/dateandtime/helper.cpp
++++ b/kcontrol/dateandtime/helper.cpp
+@@ -92,7 +92,14 @@ int ClockHelper::date( const QString& newdate, const QString& olddate )
+ 
+     tv.tv_sec = newdate.toULong() - olddate.toULong() + time(0);
+     tv.tv_usec = 0;
+-    return settimeofday(&tv, 0) ? DateError : 0;
++    if (settimeofday(&tv, 0)) {
++        return DateError;
++    }
++
++    if (!KStandardDirs::findExe("hwclock").isEmpty()) {
++        KProcess::execute("hwclock", QStringList() << "--systohc");
++    }
++    return 0;
+ }
+ 
+ // on non-Solaris systems which do not use /etc/timezone?
+-- 
+1.7.6.4
+
diff --git a/kdebase-workspace.spec b/kdebase-workspace.spec
index d7bd14a..2231003 100644
--- a/kdebase-workspace.spec
+++ b/kdebase-workspace.spec
@@ -9,7 +9,7 @@
 Summary: KDE Workspace
 Name:    kdebase-workspace
 Version: 4.7.2
-Release: 11%{?dist}
+Release: 12%{?dist}
 
 License: GPLv2
 Group:   User Interface/Desktops
@@ -79,6 +79,10 @@ Patch50: kdebase-workspace-4.6.80-kde#171685.patch
 # use /etc/login.defs to define a 'system' account instead of hard-coding 500 
 Patch52: kdebase-workspace-4.7.0-bz#732830-login.patch
 
+# kcm_clock helper: Sync the hwclock after setting the date (#749516)
+# https://git.reviewboard.kde.org/r/102985/
+Patch53: kdebase-workspace-4.7.2-hwclock.patch
+
 ## upstream patches
 # http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=230d5aee9bdc46c3a796a10b884685b4224ba732
 Patch100: kde-workspace-4.7.2-r300_textures.patch
@@ -364,6 +368,7 @@ pushd %{name}-%{version}
 # upstreamable patches
 %patch50 -p1 -b .kde#171685
 %patch52 -p1 -b .bz#732830-login
+%patch53 -p0 -b .hwclock
 
 # upstream patches
 %patch100 -p1 -b .r300_textures
@@ -853,6 +858,9 @@ fi
 
 
 %changelog
+* Sat Oct 29 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.2-12
+- kcm_clock helper: Sync the hwclock after setting the date (#749516)
+
 * Wed Oct 26 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.7.2-11
 - Rebuilt for glibc bug#747377
 


More information about the scm-commits mailing list