public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/boinc-client] rawhide: Update to 8.2.11, upstream recommended version
@ 2026-11-29 16:40 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-29 16:40 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/boinc-client
Branch : rawhide
Commit : f1bf41f3db7b7a6afb0fbfb806e45f805e7f7ac7
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-11-22T20:02:58-03:00
Stats  : +266/-326 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/boinc-client/c/f1bf41f3db7b7a6afb0fbfb806e45f805e7f7ac7?branch=rawhide

Log:
Update to 8.2.11, upstream recommended version

---
diff --git a/.gitignore b/.gitignore
index 7c70a8c..fbfede2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ boinc-6.10.45.tar.xz
 /boinc-client-7.20.2.tar.gz
 /boinc-client-8.0.2.tar.gz
 /boinc-client-8.2.4.tar.gz
+/boinc-client-8.2.11.tar.gz

diff --git a/boinc-client.spec b/boinc-client.spec
index 2d86be9..51b0643 100644
--- a/boinc-client.spec
+++ b/boinc-client.spec
@@ -17,14 +17,13 @@
 
 Summary:       The BOINC client
 Name:          boinc-client
-Version:       8.2.4
-Release:       5%{?dist}
-# Automatically converted from old format: LGPLv2+ - review is highly recommended.
-License:       LicenseRef-Callaway-LGPLv2+
+Version:       8.2.11
+Release:       1%{?dist}
+License:       LGPL-2.1-or-later
 URL:           http://boinc.berkeley.edu/
 
 %global major_version %(v=%{version}; echo ${v:0:3})
-%global commit c0b8b6fd37687aa1b93102129a054837b84cc032
+%global commit 5511380b8980935c25c3ea41df3980445419e59e
 %global gittag client_release/%{major_version}/%{version}
 # gittag_custom is needed in %%setup process because tar.gz unpacks a folder
 # named for example boinc-client_release-7.14-7.14.2
@@ -39,6 +38,7 @@ SOURCE4:       config.properties
 SOURCE5:       edu.berkeley.BOINC.metainfo.xml
 Patch0:        openssl4.patch
 Patch1:        disable_idle_time_detection.patch
+Patch3:        tests_cmake.patch
 # On Linux distributions, BOINC runs as a service. Users must not be able to
 # try stopping the service from exit menu entry.
 # This leads to unexpected behaviour, like:
@@ -57,24 +57,27 @@ Requires:         logrotate
 Requires(post):   systemd
 Requires(preun):  systemd
 Requires(postun): systemd
-%if ! ((%{defined rhel} && 0%{?rhel} >= 10) || (%{defined fedora} && 0%{?fedora} >= 42))
-Requires(pre):    shadow-utils
-%endif
+%{?sysusers_requires_compat}
 
+BuildRequires: cmake
 BuildRequires: curl-devel
+BuildRequires: docbook2X
 BuildRequires: freeglut-devel
 BuildRequires: gcc-c++
 BuildRequires: gettext
+BuildRequires: gtest-devel
 BuildRequires: gtk3-devel
-BuildRequires: docbook2X
-BuildRequires: libXmu-devel
-BuildRequires: pkgconfig(libjpeg)
-BuildRequires: pkgconfig(libnotify)
-BuildRequires: libtool
 %if ! (%{defined rhel} && 0%{?rhel} >= 10)
 BuildRequires: libXScrnSaver-devel
 %endif
+BuildRequires: libXmu-devel
+BuildRequires: libtool
+BuildRequires: make
 BuildRequires: mesa-libGLU-devel
+BuildRequires: pkgconfig(libjpeg)
+BuildRequires: pkgconfig(libnotify)
+BuildRequires: pkgconfig(libunwind)
+BuildRequires: pkgconfig(libzip)
 BuildRequires: pkgconfig(openssl)
 %if %{defined fedora} && 0%{?fedora} > 40 && 0%{?fedora} < 45
 # https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine
@@ -93,12 +96,9 @@ BuildRequires: pkgconfig(sqlite)
 %else
 BuildRequires: sqlite-devel
 %endif
+BuildRequires: pkgconfig(xcb-util)
 BuildRequires: systemd-rpm-macros
 BuildRequires: wxGTK-devel
-BuildRequires: pkgconfig(xcb-util)
-BuildRequires: pkgconfig(libunwind)
-BuildRequires: make
-
 
 # EPEL8 webkit2gtk3 is missing for s390x, aarch64
 %if 0%{?el8}
@@ -202,6 +202,7 @@ EOF
   --disable-server \
   --disable-fcgi \
   --enable-unicode \
+  --enable-boinczip \
   --with-wx-config=/usr/bin/wx-config-3.2 \
   --with-ssl \
   --with-x \
@@ -213,71 +214,67 @@ EOF
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 
-make %{?_smp_mflags}
+%make_build
 
 %install
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-mkdir -p $RPM_BUILD_ROOT%{_metainfodir}
-mkdir -p $RPM_BUILD_ROOT%{_unitdir}
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/boinc
-mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xsession.d
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/boinc-client
-
-make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/16x16/apps
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
+mkdir -p %{buildroot}%{_metainfodir}
+mkdir -p %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}%{_localstatedir}/lib/boinc
+mkdir -p %{buildroot}%{_mandir}/man1
+mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
+mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
+mkdir -p %{buildroot}%{_sysconfdir}/X11/Xsession.d
+mkdir -p %{buildroot}%{_sysconfdir}/boinc-client
+
+%make_install INSTALL="%{__install} -p"
 
 # Set up links to correct log locations
 #ln -s /var/log/boinc/ %%{_localstatedir}/log/boinc.log 
 #ln -s /var/log/boinc/ %%{_localstatedir}/log/boincerr.log 
 
 # Remove libtool archives
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
+rm %{buildroot}%{_libdir}/*.la
 
 # Use custom systemd script and logrotate configuration file
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+rm -f %{buildroot}%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
 
-install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
-install -p -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xsession.d/36x11-common_xhost-boinc
-install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/boinc-client/config.properties
+install -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+install -p -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/Xsession.d/36x11-common_xhost-boinc
+install -p -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/boinc-client/config.properties
 
 # Install Icons
-install -p -m644 packages/generic/sea/boincmgr.16x16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
-install -p -m644 packages/generic/sea/boincmgr.32x32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
-install -p -m644 packages/generic/sea/boincmgr.48x48.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png
+install -p -m644 packages/generic/sea/boincmgr.16x16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
+install -p -m644 packages/generic/sea/boincmgr.32x32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
+install -p -m644 packages/generic/sea/boincmgr.48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png
 
 # Install AppStream metainfo file
-install -p -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_metainfodir}/edu.berkeley.BOINC.metainfo.xml
+install -p -m644 %{SOURCE5} %{buildroot}%{_metainfodir}/edu.berkeley.BOINC.metainfo.xml
 
 %find_lang BOINC-Manager
 %find_lang BOINC-Client
 
 # bash-completion
-install -p -m644 client/scripts/boinc.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/boinc-client
-
+install -p -m644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc-client
 install -m0644 -D boinc-client.sysusers.conf %{buildroot}%{_sysusersdir}/boinc-client.conf
 
-%if ! (0%{?fedora} >= 42 || 0%{?rhel} >= 10)
-# Create BOINC user and group
-getent group boinc >/dev/null || groupadd -r boinc
-getent passwd boinc >/dev/null || \
-useradd -r -g boinc -d %{_localstatedir}/lib/boinc -s /sbin/nologin \
-    -c "BOINC client account." boinc
-exit 0
-%endif
+%check
+%cmake -S tests/unit-tests -B tests/unit-tests/build
+cmake --build tests/unit-tests/build %{?_smp_mflags} --verbose
+%ctest --test-dir tests/unit-tests/build
+
+%pre
+%sysusers_create_compat boinc-client.sysusers.conf
 
 %post
-%{?ldconfig}
 %systemd_post boinc-client.service
 
 %preun
 %systemd_preun boinc-client.service
 
 %postun
-%{?ldconfig}
 %systemd_postun_with_restart boinc-client.service  
 
 %if 0%{?rhel} && 0%{?rhel} <= 7
@@ -295,11 +292,10 @@ fi
 %endif
 
 %files -f BOINC-Client.lang
-%doc COPYING COPYRIGHT
+%license COPYING COPYRIGHT
 %{_bindir}/boinc
 %{_bindir}/boinc_client
 %{_bindir}/boinccmd
-#%{_bindir}/switcher
 %{_unitdir}/%{name}.service
 %{_mandir}/man1/boinccmd.1.gz
 %{_mandir}/man1/boinc.1.gz
@@ -307,8 +303,8 @@ fi
 %config(noreplace) %{_sysconfdir}/logrotate.d/boinc-client
 %config(noreplace) %{_sysconfdir}/bash_completion.d/boinc-client
 %attr(-,boinc,boinc) %{_localstatedir}/lib/boinc/
-%{_sysconfdir}/X11/Xsession.d/36x11-common_xhost-boinc
-%{_sysconfdir}/boinc-client/config.properties
+%config(noreplace) %{_sysconfdir}/X11/Xsession.d/36x11-common_xhost-boinc
+%config(noreplace) %{_sysconfdir}/boinc-client/config.properties
 %{_sysusersdir}/boinc-client.conf
 
 
@@ -334,6 +330,7 @@ fi
 %{_libdir}/libboinc_crypt.a
 %{_libdir}/libboinc_graphics2.a
 %{_libdir}/libboinc_opencl.a
+%{_libdir}/libboinc_zip.a
 
 %files devel
 %{_libdir}/*.so
@@ -343,8 +340,21 @@ fi
 %{_libdir}/pkgconfig/libboinc_crypt.pc
 %{_libdir}/pkgconfig/libboinc_graphics2.pc
 %{_libdir}/pkgconfig/libboinc_opencl.pc
+%{_libdir}/pkgconfig/libboinc_zip.pc
+
 
 %changelog
+* Sun Nov 22 2026 Filipe Rosset <rosset.filipe@gmail.com> - 8.2.11-1
+- Update to 8.2.11
+- Disable_idle_time_detection.patch against 8.2.11
+- Added tests_cmake.patch to build unit tests with CMake
+- Enabled upstream unit tests in %%check
+- Added BuildRequires: cmake, gtest-devel, make, pkgconfig(libzip)
+- Build with --enable-boinczip, ship libboinc_zip in static/devel subpackages
+- Convert license to SPDX format + spec cleanup and modernization
+- Use sysusers.d to create boinc user/group, drop shadow-utils dependency
+- Modernized scriptlets with systemd-rpm-macros
+
 * Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 8.2.4-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

diff --git a/disable_idle_time_detection.patch b/disable_idle_time_detection.patch
index d9ed4a3..75ebfe1 100644
--- a/disable_idle_time_detection.patch
+++ b/disable_idle_time_detection.patch
@@ -1,8 +1,7 @@
-diff -urNr boinc-client_release-8.2-8.2.4-orig/client/client_state.cpp boinc-client_release-8.2-8.2.4/client/client_state.cpp
---- boinc-client_release-8.2-8.2.4-orig/client/client_state.cpp	2025-06-08 23:44:04.000000000 +0200
-+++ boinc-client_release-8.2-8.2.4/client/client_state.cpp	2025-10-02 11:55:18.836055731 +0200
+--- a/client/client_state.cpp
++++ b/client/client_state.cpp
 @@ -1075,7 +1075,8 @@
-         user_active = device_status.user_active;
+         }
  #else
          idle_time = host_info.user_idle_time(check_all_logins);
 -        user_active = idle_time < global_prefs.idle_time_to_run * 60;
@@ -11,70 +10,15 @@ diff -urNr boinc-client_release-8.2-8.2.4-orig/client/client_state.cpp boinc-cli
  #endif
          if (user_active != old_user_active) {
              set_n_usable_cpus();
-diff -urNr boinc-client_release-8.2-8.2.4-orig/client/hostinfo_unix.cpp boinc-client_release-8.2-8.2.4/client/hostinfo_unix.cpp
---- boinc-client_release-8.2-8.2.4-orig/client/hostinfo_unix.cpp	2025-06-08 23:44:04.000000000 +0200
-+++ boinc-client_release-8.2-8.2.4/client/hostinfo_unix.cpp	2025-10-02 12:19:11.819964897 +0200
-@@ -44,16 +44,6 @@
- #include <gnu/libc-version.h>
- #endif
- 
--#if HAVE_XSS
--#include <X11/extensions/scrnsaver.h> //X-based idle detection
--// prevents naming collision between X.h define of Always and boinc's
--// lib/prefs.h definition in an enum.
--#undef Always
--#include <dirent.h> //for opening /tmp/.X11-unix/
--  // (There is a DirScanner class in BOINC, but it doesn't do what we want)
--#include "log_flags.h" // idle_detection_debug flag for verbose output
--#endif
--
- #include <cstdio>
- #include <cstdlib>
- #include <cstring>
-@@ -1858,11 +1848,7 @@
- }
- 
- inline long device_idle_time(const char *device) {
--    struct stat sbuf;
--    if (stat(device, &sbuf)) {
--        return USER_IDLE_TIME_INF;
--    }
--    return gstate.now - sbuf.st_atime;
-+    return 0;
- }
- 
- // list of directories and prefixes of TTY devices
-@@ -1935,22 +1921,7 @@
- }
- 
- inline long all_tty_idle_time() {
--    static vector<string> tty_list;
--    static bool first = true;
--    struct stat sbuf;
--    long idle_time = USER_IDLE_TIME_INF;
--
--    if (first) {
--        first = false;
--        tty_list = get_tty_list();
--    }
--    for (unsigned int i=0; i<tty_list.size(); i++) {
--        // ignore errors
--        if (!stat(tty_list[i].c_str(), &sbuf)) {
--            // printf("tty: %s %d %d\n",tty_list[i].c_str(), sbuf.st_atime, t);
--            idle_time = min(idle_time, (long)(gstate.now-sbuf.st_atime));
--        }
--    }
-+    long idle_time = 0;
-     return idle_time;
- }
- 
-@@ -2009,44 +1980,7 @@
+--- a/client/hostinfo_unix.cpp
++++ b/client/hostinfo_unix.cpp
+@@ -2018,45 +2018,7 @@
  // faster than the previous method, which called IOHIDGetParameter().
  //
  long HOST_INFO::user_idle_time(bool /*check_all_logins*/) {
 -    static bool     error_posted = false;
 -    int64_t         idleNanoSeconds;
-     double          idleTime = 0;
+-    double          idleTime = 0;
 -    double          idleTimeFromCG = 0;
 -
 -    CFTypeRef idleTimeProperty;
@@ -110,223 +54,52 @@ diff -urNr boinc-client_release-8.2-8.2.4-orig/client/hostinfo_unix.cpp boinc-cl
 -        }
 -    }
 -
-     return (long)idleTime;
- }
- 
-@@ -2054,18 +1988,8 @@
- 
- #if HAVE_UTMP_H
- inline long user_idle_time(struct utmp* u) {
--    char tty[5 + sizeof u->ut_line + 1] = "/dev/";
--    unsigned int i;
--
--    for (i=0; i < sizeof(u->ut_line); i++) {
--        // clean up tty if garbled
--        if (isalnum((int) u->ut_line[i]) || (u->ut_line[i]=='/')) {
--            tty[i+5] = u->ut_line[i];
--        } else {
--            tty[i+5] = '\0';
--        }
--    }
--    return device_idle_time(tty);
-+    long idle_time = 0;
-+    return idle_time;
+-    return (long)idleTime;
++    return 0;
  }
  
- #if !HAVE_SETUTENT || !HAVE_GETUTENT
-@@ -2109,202 +2033,26 @@
-   inline long all_logins_idle() {
-       struct utmp* u;
-       setutent();
--      long idle_time = USER_IDLE_TIME_INF;
-+      long idle_time = 0;
- 
-       while ((u = getutent()) != NULL) {
--          idle_time = min(idle_time, user_idle_time(u));
-+          idle_time = 0;
-       }
-       return idle_time;
-   }
- #endif  // HAVE_UTMP_H
- 
--#if LINUX_LIKE_SYSTEM
--
--#if HAVE_XSS
--
--// Initializer for const vector<string> in xss_idle
--//
--const vector<string> X_display_values_initialize() {
--    // According to "man Xserver", each local Xserver will have a socket file
--    // at /tmp/.X11-unix/Xn, where "n" is the display number (0, 1, 2, etc).
--    // We will parse this directory for currently open Xservers and attempt
--    // to ultimately query them for their idle time. If we can't open this
--    // directory, or the display_values vector is otherwise empty, then a
--    // static list of guesses for open display servers is utilized instead
--    // (DISPLAY values ":{0..6}") that will attempt connections to the first
--    // seven open Xservers.
--    //
--    // If we were unable to open _any_ Xserver, then we will log this and
--    // xss_idle returns true, effectively leaving idle detection up to other
--    // methods.
--    //
--    static const string dir = "/tmp/.X11-unix/";
--    vector<string> display_values;
--    vector<string>::iterator it;
--
--    DIR *dp;
--    struct dirent *dirp;
--    if ((dp = opendir(dir.c_str())) == NULL) {
--        if (log_flags.idle_detection_debug ) {
--            msg_printf(NULL, MSG_INFO,
--                "[idle_detection] Error (%d) opening %s.", errno, dir.c_str()
--            );
--        }
--    } else {
--        while ((dirp = readdir(dp)) != NULL) {
--            display_values.push_back(string(dirp->d_name));
--        }
--        closedir(dp);
--    }
--
--    // Get rid of non-matching elements and format the matching ones.
--    //
--    for (it = display_values.begin(); it != display_values.end(); ) {
--        if (it->c_str()[0] != 'X') {
--            it = display_values.erase(it);
--        } else {
--            replace(it->begin(), it->end(), 'X', ':');
--            it++;
--        }
--    }
--
--    return display_values;
--}
--
--// Ask the X server for user idle time (using XScreenSaver API)
--// Return min of idle times.
--// This function assumes that the boinc user has been
--// granted access to the Xservers a la "xhost +SI:localuser:boinc". If
--// access isn't available for an Xserver, then that Xserver is skipped.
--// One may drop a file in /etc/X11/Xsession.d/ that runs the xhost command
--// for all Xservers on a machine when the Xservers start up.
--//
--long xss_idle() {
+ #else  // ! __APPLE__
+@@ -2319,56 +2281,7 @@
+ // get idle time.  Try the new approach, if it fails use old
+ //
+ long HOST_INFO::user_idle_time(bool check_all_logins) {
 -    long idle_time = USER_IDLE_TIME_INF;
--    const vector<string> display_values = X_display_values_initialize();
--    vector<string>::const_iterator it;
--
--    // If we can connect to at least one DISPLAY, this is set to false.
--    //
--    bool no_available_x_display = true;
 -
--    static XScreenSaverInfo* xssInfo = XScreenSaverAllocInfo();
--    // This shouldn't fail. XScreenSaverAllocInfo just returns a small
--    // struct (see "man 3 xss"). If we can't allocate this, then we've
--    // got bigger problems to worry about.
--    //
--    if (xssInfo == NULL) {
--        if (log_flags.idle_detection_debug) {
--            msg_printf(NULL, MSG_INFO,
--                "[idle_detection] XScreenSaverAllocInfo failed. Out of memory? Skipping XScreenSaver idle detection."
--            );
--        }
--        return true;
+-#ifndef ANDROID
+-    static bool show_idle_time_legacy_warning = true;
+-    if (get_idle_time_from_daemon(idle_time)) {
+-        show_idle_time_legacy_warning = false;
+-        return idle_time;
 -    }
 -
--    for (it = display_values.begin(); it != display_values.end() ; it++) {
--
--        Display* disp = NULL;
--        long display_idle_time = 0;
--
--        disp = XOpenDisplay(it->c_str());
--        // XOpenDisplay may return NULL if there is no running X
--        // or DISPLAY points to wrong/invalid display
--        //
--        if (disp == NULL) {
--            if (log_flags.idle_detection_debug) {
--	            msg_printf(NULL, MSG_INFO,
--	                "[idle_detection] DISPLAY '%s' not found or insufficient access.",
--	                it->c_str()
--                );
--            }
--            continue;
--        }
--
--        // Determine if the DISPLAY we have accessed has the XScreenSaver
--        // extension or not.
--        //
--        int event_base_return, error_base_return;
--        if (!XScreenSaverQueryExtension(
--            disp, &event_base_return, &error_base_return
--        )){
--            if (log_flags.idle_detection_debug) {
--	            msg_printf(NULL, MSG_INFO,
--	                "[idle_detection] XScreenSaver extension not available for DISPLAY '%s'.",
--	                it->c_str()
--                );
--            }
--            XCloseDisplay(disp);
--            continue;
--        }
--
--        // All checks passed. Get the idle information.
--        //
--        no_available_x_display = false;
--        XScreenSaverQueryInfo(disp, DefaultRootWindow(disp), xssInfo);
--        display_idle_time = xssInfo->idle;
--
--        // Close the connection to the XServer
--        //
--        XCloseDisplay(disp);
--
--        // convert from milliseconds to seconds
--        //
--        display_idle_time /= 1000;
--
--        if (log_flags.idle_detection_debug) {
--            msg_printf(NULL, MSG_INFO,
--                "[idle_detection] XSS idle detection succeeded on display '%s'.",
--                it->c_str()
--            );
--            msg_printf(NULL, MSG_INFO,
--                "[idle_detection] display idle time: %ld sec", display_idle_time
--            );
--        }
--
--        idle_time = min(idle_time, display_idle_time);
--    }
--
--    // If none of the Xservers were queryable, report it
--    //
--    if (log_flags.idle_detection_debug && no_available_x_display) {
+-    if (show_idle_time_legacy_warning) {
 -        msg_printf(NULL, MSG_INFO,
--            "[idle_detection] Could not connect to any DISPLAYs. XSS idle determination impossible."
--        );
+-            "Currently BOINC uses legacy idle detection methods that might not \
+-work properly on all systems. Please consider installing a modern idle detection \
+-utility that works on Wayland and X11: \
+-https://github.com/jamescowens/idle_detect");
+-        show_idle_time_legacy_warning = false;
 -    }
--    return idle_time;
--
--}
--#endif // HAVE_XSS
--
--#endif // LINUX_LIKE_SYSTEM
+-#endif
 -
- long HOST_INFO::user_idle_time(bool check_all_logins) {
--    long idle_time = USER_IDLE_TIME_INF;
-+    long idle_time = 0;
- 
- #if HAVE_UTMP_H
-     if (check_all_logins) {
+-#if HAVE_UTMP_H
+-    if (check_all_logins) {
 -        idle_time = min(idle_time, all_logins_idle());
-+        long idle_time = 0;
-     }
- #endif
- 
+-    }
+-#endif
+-
 -    idle_time = min(idle_time, all_tty_idle_time());
 -
- #if LINUX_LIKE_SYSTEM
+-#if LINUX_LIKE_SYSTEM
 -
 -#if HAVE_XSS
--    idle_time = min(idle_time, xss_idle());
+-#ifndef ANDROID
+-    static bool wayland_detected = detect_wayland();
+-    if (!wayland_detected) {
+-        //printf("Using XScreenSaver API for idle detection\n");
+-        idle_time = min(idle_time, xss_idle());
+-    }
+-#endif // !ANDROID
 -#endif // HAVE_XSS
 -
 -#else
@@ -338,7 +111,9 @@ diff -urNr boinc-client_release-8.2-8.2.4-orig/client/hostinfo_unix.cpp boinc-cl
 -    idle_time = min(idle_time, (long)device_idle_time("/dev/input/mice"));
 -    idle_time = min(idle_time, (long)device_idle_time("/dev/kbd"));
 -        // solaris
-+    idle_time = 0;
- #endif // LINUX_LIKE_SYSTEM
-     return idle_time;
+-#endif // LINUX_LIKE_SYSTEM
+-    return idle_time;
++    return 0;
  }
+ 
+ #endif  // ! __APPLE__

diff --git a/sources b/sources
index 72d11cf..eb87e7e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (boinc-client-8.2.4.tar.gz) = aa3814d4d17954704644a99e9367decfdbefe9eeb1cc4a77f80f86c0b8760c6f93d44a6accac3a51a255a18f2464ac288936db4733378418a1248147db63261e
+SHA512 (boinc-client-8.2.11.tar.gz) = 727a77c60714f50c1d9d6bbc7e81003332212b5703d027e6170705d52766366d8d193ee131fa07282757ea470c6cceb4ec57b188159e79521f269ed839f3a4c6

diff --git a/tests_cmake.patch b/tests_cmake.patch
new file mode 100644
index 0000000..7ceee72
--- /dev/null
+++ b/tests_cmake.patch
@@ -0,0 +1,154 @@
+diff -ruN old/tests/unit-tests/CMakeLists.txt new/tests/unit-tests/CMakeLists.txt
+--- a/tests/unit-tests/CMakeLists.txt
++++ b/tests/unit-tests/CMakeLists.txt
+@@ -22,7 +22,8 @@
+ enable_testing()
+ 
+ set (CMAKE_CXX_STANDARD 17)
+-set (CMAKE_CXX_FLAGS "-g -Wall -Wextra -Werror --coverage")
++set (CMAKE_POSITION_INDEPENDENT_CODE ON)
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra --coverage")
+ 
+ if (APPLE)
+     find_package(GTest REQUIRED PATHS ${PROJECT_SOURCE_DIR}/../../3rdParty/osx/vcpkg/installed/arm64-osx/share NO_DEFAULT_PATH)
+@@ -57,21 +58,21 @@
+ endif()
+ 
+ if (APPLE)
+-    find_library(BOINC_LIB libboinc.a PATHS ${PROJECT_SOURCE_DIR}/../../build-arm64-osx NO_DEFAULT_PATH)
++    find_library(BOINC_LIB NAMES boinc libboinc.a PATHS ${PROJECT_SOURCE_DIR}/../../build-arm64-osx NO_DEFAULT_PATH)
+     find_library(BOINC_API_LIB libboincapi.a PATHS ${PROJECT_SOURCE_DIR}/../../build-arm64-osx NO_DEFAULT_PATH)
+-    find_library(BOINC_ZIP_LIB libboinc_zip.a PATHS ${PROJECT_SOURCE_DIR}/../../build-arm64-osx NO_DEFAULT_PATH)
++    find_library(BOINC_ZIP_LIB NAMES boinc_zip libboinc_zip.a PATHS ${PROJECT_SOURCE_DIR}/../../build-arm64-osx NO_DEFAULT_PATH)
+ else()
+-    find_library(SCHED_LIB libsched.a PATHS ${PROJECT_SOURCE_DIR}/../../sched NO_DEFAULT_PATH)
+-    find_library(BOINC_CRYPT_LIB libboinc_crypt.a PATHS ${PROJECT_SOURCE_DIR}/../../lib NO_DEFAULT_PATH)
+-    find_library(BOINC_API_LIB libboinc_api.a PATHS ${PROJECT_SOURCE_DIR}/../../api NO_DEFAULT_PATH)
+-    find_library(BOINC_LIB libboinc.a PATHS ${PROJECT_SOURCE_DIR}/../../lib NO_DEFAULT_PATH)
+-    find_library(BOINC_ZIP_LIB libboinc_zip.a PATHS ${PROJECT_SOURCE_DIR}/../../zip NO_DEFAULT_PATH)
++    find_library(SCHED_LIB NAMES sched libsched.a PATHS ${PROJECT_SOURCE_DIR}/../../sched NO_DEFAULT_PATH)
++    find_library(BOINC_CRYPT_LIB NAMES boinc_crypt libboinc_crypt.a PATHS ${PROJECT_SOURCE_DIR}/../../lib NO_DEFAULT_PATH)
++    find_library(BOINC_API_LIB NAMES boinc_api libboinc_api.a PATHS ${PROJECT_SOURCE_DIR}/../../api NO_DEFAULT_PATH)
++    find_library(BOINC_LIB NAMES boinc libboinc.a PATHS ${PROJECT_SOURCE_DIR}/../../lib NO_DEFAULT_PATH)
++    find_library(BOINC_ZIP_LIB NAMES boinc_zip libboinc_zip.a PATHS ${PROJECT_SOURCE_DIR}/../../zip NO_DEFAULT_PATH)
+     find_library(MYSQL_LIB NAMES mariadb mysqlclient)
+     message(STATUS "mysql_lib: ${MYSQL_LIB}")
+ endif()
+ 
+ add_subdirectory(lib)
+-if (NOT APPLE)
++if (SCHED_LIB AND MYSQL_LIB)
+     add_subdirectory(sched)
+ endif()
+ add_subdirectory(vboxwrapper)
+diff -ruN old/tests/unit-tests/lib/CMakeLists.txt new/tests/unit-tests/lib/CMakeLists.txt
+--- a/tests/unit-tests/lib/CMakeLists.txt
++++ b/tests/unit-tests/lib/CMakeLists.txt
+@@ -26,6 +26,6 @@
+     set(LIBZIP_LIBRARIES libzip::zip)
+ endif()
+ 
+-TARGET_LINK_LIBRARIES(test_lib "${SCHED_LIB}" "${BOINC_CRYPT_LIB}" "${BOINC_LIB}" "${BOINC_ZIP_LIB}" "${LIBZIP_LIBRARIES}" pthread GTest::gtest GTest::gtest_main)
++TARGET_LINK_LIBRARIES(test_lib "${BOINC_CRYPT_LIB}" "${BOINC_LIB}" "${BOINC_ZIP_LIB}" "${LIBZIP_LIBRARIES}" pthread GTest::gtest GTest::gtest_main)
+ 
+ add_test(NAME test_lib COMMAND test_lib)
+diff -ruN old/tests/unit-tests/lib/test_md5_file.cpp new/tests/unit-tests/lib/test_md5_file.cpp
+--- a/tests/unit-tests/lib/test_md5_file.cpp
++++ b/tests/unit-tests/lib/test_md5_file.cpp
+@@ -17,6 +17,7 @@
+ 
+ #include "gtest/gtest.h"
+ #include "md5_file.h"
++#include "filesys.h"
+ 
+ using namespace std;
+ 
+@@ -39,7 +40,13 @@
+ #ifdef _WIN32
+         const string md5_file_path = "../../../../tests/unit-tests/lib/test_md5_file.txt";
+ #else
+-        const string md5_file_path = "../unit-tests/lib/test_md5_file.txt";
++        string md5_file_path = "../unit-tests/lib/test_md5_file.txt";
++        if (!boinc_file_exists(md5_file_path.c_str())) {
++            md5_file_path = "../../lib/test_md5_file.txt";
++        }
++        if (!boinc_file_exists(md5_file_path.c_str())) {
++            md5_file_path = "test_md5_file.txt";
++        }
+ #endif
+         int result = md5_file(md5_file_path.c_str(), output, bytes);
+         EXPECT_EQ(result, 0);
+diff -ruN old/tests/unit-tests/lib/test_str_util.cpp new/tests/unit-tests/lib/test_str_util.cpp
+--- a/tests/unit-tests/lib/test_str_util.cpp
++++ b/tests/unit-tests/lib/test_str_util.cpp
+@@ -212,7 +212,11 @@
+         buf = time_to_string(1.0);
+         EXPECT_STREQ(buf, "01-Jan-1970 00:00:01");
+         buf = time_to_string(12345678910.0);
+-        EXPECT_STREQ(buf, "21-Mar-2361 19:15:10");
++        if (sizeof(time_t) < 8) {
++            EXPECT_STREQ(buf, "13-Dec-1901 20:45:52");
++        } else {
++            EXPECT_STREQ(buf, "21-Mar-2361 19:15:10");
++        }
+     }
+ 
+     TEST_F(test_str_util, precision_time_to_string) {
+@@ -227,11 +231,15 @@
+         EXPECT_STREQ(buf, "2019-04-21 19:59:09.1233");
+         buf = precision_time_to_string(12345678910.10000);
+         // here we have an undefined behavior that gives negative value on x64 and positive value on arm64
+-        #ifdef __arm64__
++        if (sizeof(time_t) < 8) {
++            EXPECT_STREQ(buf, "1901-12-13 20:45:52.-2147483648");
++        } else {
++        #if defined(__arm64__) || defined(__aarch64__) || defined(__s390x__) || defined(__s390__) || defined(__powerpc__) || defined(__ppc64__) || defined(__PPC64__) || defined(_ARCH_PPC64)
+             EXPECT_STREQ(buf, "2361-03-21 19:15:10.2147483647");
+         #else
+             EXPECT_STREQ(buf, "2361-03-21 19:15:10.-2147483648");
+         #endif
++        }
+     }
+ 
+     TEST_F(test_str_util, timediff_format) {
+@@ -258,7 +266,11 @@
+         mysql_timestamp(1555876749.1234, buf);
+         EXPECT_STREQ(buf, "20190421195909");
+         mysql_timestamp(12345678910.0, buf);
+-        EXPECT_STREQ(buf, "23610321191510");
++        if (sizeof(time_t) < 8) {
++            EXPECT_STREQ(buf, "19011213204552");
++        } else {
++            EXPECT_STREQ(buf, "23610321191510");
++        }
+     }
+ 
+     TEST_F(test_str_util, string_substitute) {
+diff -ruN old/tests/unit-tests/lib/test_util.cpp new/tests/unit-tests/lib/test_util.cpp
+--- a/tests/unit-tests/lib/test_util.cpp
++++ b/tests/unit-tests/lib/test_util.cpp
+@@ -63,7 +63,7 @@
+ 
+ #if !defined(_WIN32) && !defined(__APPLE__)
+     TEST_F(test_util, linux_cpu_time) {
+-        EXPECT_TRUE(linux_cpu_time(1) > 0);
++        EXPECT_GE(linux_cpu_time(getpid()), 0);
+     }
+ 
+ #endif
+diff -ruN old/tests/unit-tests/lib/test_zip.cpp new/tests/unit-tests/lib/test_zip.cpp
+--- a/tests/unit-tests/lib/test_zip.cpp
++++ b/tests/unit-tests/lib/test_zip.cpp
+@@ -449,6 +449,12 @@
+         // This test assumes the existence of a sample zip file "sample.zip"
+         // with known contents and permissions. Adjust the path as necessary.
+         filesystem::path sample_zip = filesystem::current_path().parent_path() / "unit-tests"/ "testdata" / "test_unix_permissions.zip";
++        if (!filesystem::exists(sample_zip)) {
++            sample_zip = filesystem::current_path().parent_path() / "testdata" / "test_unix_permissions.zip";
++        }
++        if (!filesystem::exists(sample_zip)) {
++            sample_zip = filesystem::current_path().parent_path().parent_path() / "testdata" / "test_unix_permissions.zip";
++        }
+         ASSERT_TRUE(filesystem::exists(sample_zip)) << "Sample zip file does not exist.";
+ 
+         filesystem::path unzip_dir = "sample_unzipped";

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-29 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 16:40 [rpms/boinc-client] rawhide: Update to 8.2.11, upstream recommended version Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox