[boinc-client] Update to 7.2.39 Remove ControlGroup setting from systemd unit file Backport patch from 7.3 branch t

mattia mattia at fedoraproject.org
Wed Feb 19 16:58:01 UTC 2014


commit 9a4e757366f6f1a93b57602cde37ec1a6256ec6a
Author: Mattia Verga <mattia.verga at tiscali.it>
Date:   Wed Feb 19 17:57:58 2014 +0100

    Update to 7.2.39
    Remove ControlGroup setting from systemd unit file
    Backport patch from 7.3 branch to fix idle time detection

 .gitignore                    |    1 +
 boinc-7.2.39-idledetect.patch |  141 +++++++++++++++++++++++++++++++++++++++++
 boinc-client-systemd          |    1 -
 boinc-client.spec             |   16 ++++-
 boinc_gpu                     |    2 +-
 sources                       |    2 +-
 6 files changed, 156 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e684d2b..16ef834 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ boinc-6.10.45.tar.xz
 /boinc-7.0.44.tar.xz
 /boinc-7.0.65.tar.xz
 /boinc-7.2.33.tar.xz
+/boinc-7.2.39.tar.xz
diff --git a/boinc-7.2.39-idledetect.patch b/boinc-7.2.39-idledetect.patch
new file mode 100644
index 0000000..a6ee3f2
--- /dev/null
+++ b/boinc-7.2.39-idledetect.patch
@@ -0,0 +1,141 @@
+--- client/hostinfo_unix.cpp	2014-02-17 18:16:21.240501319 +0100
++++ client/hostinfo_unix.new.cpp	2014-02-16 16:35:45.000000000 +0100
+@@ -1883,73 +1891,86 @@
+ 
+ #if HAVE_XSS
+ // Ask the X server for user idle time (using XScreenSaver API)
+-// Returns true if the idle_treshold is smaller than the
+-// idle time of the user (means: true = user is idle)
+-bool xss_idle(long idle_treshold) {
++// Return true if the idle time exceeds idle_threshold.
++//
++bool xss_idle(long idle_threshold) {
+     static XScreenSaverInfo* xssInfo = NULL;
+     static Display* disp = NULL;
++    static bool error = false;
++        // some X call failed - always return not idle
+     
++    if (error) return false;
++
+     long idle_time = 0;
+     
+-    if(disp != NULL) {
+-        XScreenSaverQueryInfo(disp, DefaultRootWindow(disp), xssInfo);
++    if (disp == NULL) {
++        disp = XOpenDisplay(NULL);
++        // XOpenDisplay may return NULL if there is no running X
++        // or DISPLAY points to wrong/invalid display
++        //
++        if (disp == NULL) {
++            error = true;
++            return false;
++        }
++        int event_base_return, error_base_return;
++        xssInfo = XScreenSaverAllocInfo();
++        if (!XScreenSaverQueryExtension(
++            disp, &event_base_return, &error_base_return
++        )){
++            error = true;
++            return false;
++        }
++    }
+ 
+-        idle_time = xssInfo->idle;
++    XScreenSaverQueryInfo(disp, DefaultRootWindow(disp), xssInfo);
++    idle_time = xssInfo->idle;
+ 
+ #if HAVE_DPMS
+-        // XIdleTime Detection
+-        // See header for location and copywrites.
+-        //
+-        int dummy;
+-        CARD16 standby, suspend, off;
+-        CARD16 state;
+-        BOOL onoff;
++    // XIdleTime Detection
++    // See header for location and copywrites.
++    //
++    int dummy;
++    CARD16 standby, suspend, off;
++    CARD16 state;
++    BOOL onoff;
+ 
+-        if (DPMSQueryExtension(disp, &dummy, &dummy)) {
+-            if (DPMSCapable(disp)) {
+-                DPMSGetTimeouts(disp, &standby, &suspend, &off);
+-                DPMSInfo(disp, &state, &onoff);
++    if (DPMSQueryExtension(disp, &dummy, &dummy)) {
++        if (DPMSCapable(disp)) {
++            DPMSGetTimeouts(disp, &standby, &suspend, &off);
++            DPMSInfo(disp, &state, &onoff);
+ 
+-                if (onoff) {
+-                    switch (state) {
+-                      case DPMSModeStandby:
+-                          /* this check is a littlebit paranoid, but be sure */
+-                          if (idle_time < (unsigned) (standby * 1000)) {
+-                              idle_time += (standby * 1000);
+-                          }
+-                          break;
+-                      case DPMSModeSuspend:
+-                          if (idle_time < (unsigned) ((suspend + standby) * 1000)) {
+-                              idle_time += ((suspend + standby) * 1000);
+-                          }
+-                          break;
+-                      case DPMSModeOff:
+-                          if (idle_time < (unsigned) ((off + suspend + standby) * 1000)) {
+-                              idle_time += ((off + suspend + standby) * 1000);
+-                          }
+-                          break;
+-                      case DPMSModeOn:
+-                        default:
+-                          break;
++            if (onoff) {
++                switch (state) {
++                case DPMSModeStandby:
++                    // this check is a littlebit paranoid, but be sure
++                    if (idle_time < (unsigned) (standby * 1000)) {
++                        idle_time += (standby * 1000);
++                    }
++                    break;
++                case DPMSModeSuspend:
++                    if (idle_time < (unsigned) ((suspend + standby) * 1000)) {
++                        idle_time += ((suspend + standby) * 1000);
+                     }
++                    break;
++                case DPMSModeOff:
++                    if (idle_time < (unsigned) ((off + suspend + standby) * 1000)) {
++                        idle_time += ((off + suspend + standby) * 1000);
++                    }
++                    break;
++                case DPMSModeOn:
++                default:
++                    break;
+                 }
+-            } 
+-        }
++            }
++        } 
++    }
+ #endif
+ 
+-        // convert from milliseconds to seconds
+-        idle_time = idle_time / 1000;
+-
+-    } else {
+-        disp = XOpenDisplay(NULL);
+-        // XOpenDisplay may return NULL if there is no running X
+-        // or DISPLAY points to wrong/invalid display
+-        if(disp != NULL) {
+-            xssInfo = XScreenSaverAllocInfo();
+-        }
+-    }
++    // convert from milliseconds to seconds
++    //
++    idle_time = idle_time / 1000;
+ 
+-    return idle_treshold < idle_time;
++    return idle_threshold < idle_time;
+ }
+ #endif // HAVE_XSS
+ #endif // LINUX_LIKE_SYSTEM
diff --git a/boinc-client-systemd b/boinc-client-systemd
index 83391a5..00173ad 100644
--- a/boinc-client-systemd
+++ b/boinc-client-systemd
@@ -5,7 +5,6 @@ After=network.target
 [Service]
 Nice=10
 User=boinc
-ControlGroup=cpu:/background
 PermissionsStartOnly=yes
 ExecStartPre=/bin/sleep 1
 ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log
diff --git a/boinc-client.spec b/boinc-client.spec
index 8e5f861..a023287 100644
--- a/boinc-client.spec
+++ b/boinc-client.spec
@@ -1,9 +1,9 @@
-%global revision 1994cc8
+%global revision dc95e3f
 
 Summary:	The BOINC client core
 Name:		boinc-client
-Version:	7.2.33
-Release:	3.git%{revision}%{?dist}
+Version:	7.2.39
+Release:	1.git%{revision}%{?dist}
 License:	LGPLv2+
 Group:		Applications/Engineering
 URL:		http://boinc.berkeley.edu/
@@ -11,7 +11,7 @@ URL:		http://boinc.berkeley.edu/
 # following commands to generate the tarball:
 # git clone git://boinc.berkeley.edu/boinc-v2.git boinc-repo
 # pushd boinc-repo
-# git checkout client_release/7.2/7.2.33
+# git checkout client_release/7.2/7.2.39
 # ./_autosetup
 # ../trim . Trim all binaries and other unnecessary things.
 # rm -rf .git*
@@ -32,6 +32,8 @@ Source6:	boinc_gpu
 Patch0:		boinc-guirpcauth.patch
 # Fix Italian locale broken directory
 Patch1:		boinc-client-locale.patch
+# Backport patch from 7.3 branch to fix idle time detection
+Patch2:		boinc-7.2.39-idledetect.patch
 
 Requires:	logrotate
 Requires(post):		systemd
@@ -120,6 +122,7 @@ This package contains documentation files for %{name}.
 %setup -q -n boinc
 %patch0
 %patch1
+%patch2
 
 # fix utf8
 iconv -f ISO88591 -t UTF8 < checkin_notes_2004 > checkin_notes_2004.utf8
@@ -292,6 +295,11 @@ fi
 %{_includedir}/boinc
 
 %changelog
+* Wed Feb 19 2014 Mattia Verga <mattia.verga at tiscali.it> - 7.2.39-1.gitdc95e3f
+- Upgrade to 7.2.39 #1065275
+- Remove ControlGroup setting from systemd unit file. #1065648
+- Backport patch from 7.3 branch to (hopefully) fix idle time detection. #1047044
+
 * Fri Feb 07 2014 Mattia Verga <mattia.verga at tiscali.it> - 7.2.33-3.git1994cc8
 - Remove CPUShares limitation to systemd unit. #1038283
 
diff --git a/boinc_gpu b/boinc_gpu
index bda5842..a911db5 100755
--- a/boinc_gpu
+++ b/boinc_gpu
@@ -5,7 +5,7 @@
 #    #systemctl stop boinc-client.service
 #
 # Add you user to boinc group:
-#    #useradd -G boinc <your_username>
+#    #usermod -G boinc <your_username>
 #
 # Then change directory and files permissions:
 #    #chmod -R g+rw /var/lib/boinc
diff --git a/sources b/sources
index 9938cda..5815319 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b3bf849efb1d330e8b3d9d3ee475e342  boinc-7.2.33.tar.xz
+55556228f44dd415f494dc2afefe16d1  boinc-7.2.39.tar.xz


More information about the scm-commits mailing list