aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2024-01-25 14:58:50 +0100
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:44:46 +0200
commite5ee9403af7d340545810d052659179b527fa6ce (patch)
tree0a932406aff6aa931870e3105af467f1153a41fb
parent01d32e4744bf39e974674d4eb20b20310ac8db07 (diff)
downloadguix-e5ee9403af7d340545810d052659179b527fa6ce.tar.gz
guix-e5ee9403af7d340545810d052659179b527fa6ce.zip
gnu: gnumach: Fix task_info.
This fixes the (times) call in Guile. * gnu/packages/patches/gnumach-fix-task_info.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/hurd.scm (gnumach)[source]: Use it. Change-Id: Ie7725d86465136a8e03838b86424c25cf68945c4
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/hurd.scm3
-rw-r--r--gnu/packages/patches/gnumach-fix-task_info.patch59
3 files changed, 62 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 516dbde17d..56a071a0a2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1432,6 +1432,7 @@ dist_patch_DATA = \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
%D%/packages/patches/gnulib-bootstrap.patch \
%D%/packages/patches/gnumach-fix-i686-linux-build.patch \
+ %D%/packages/patches/gnumach-fix-task_info.patch \
%D%/packages/patches/gnumach-support-noide.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
%D%/packages/patches/gnupg-1-build-with-gcc10.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 2cfd8f998f..f42f20c36e 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -256,7 +256,8 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(patches
(append
(search-patches "gnumach-support-noide.patch"
- "gnumach-fix-i686-linux-build.patch")
+ "gnumach-fix-i686-linux-build.patch"
+ "gnumach-fix-task_info.patch")
(origin-patches (package-source gnumach-headers))))))
(arguments
(substitute-keyword-arguments (package-arguments gnumach-headers)
diff --git a/gnu/packages/patches/gnumach-fix-task_info.patch b/gnu/packages/patches/gnumach-fix-task_info.patch
new file mode 100644
index 0000000000..72a82726e2
--- /dev/null
+++ b/gnu/packages/patches/gnumach-fix-task_info.patch
@@ -0,0 +1,59 @@
+Upstream status: Taken from upstream.
+
+From 9949068745e2b0ca91e17125d037f332d20a0213 Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Tue, 16 May 2023 23:01:01 -0400
+Subject: [PATCH] Fix task_info for TASK_THREAD_TIMES_INFO.
+
+We are checking for the existence of time_value64_t but we didn't add
+that to the task_thread_times_info structure.
+Message-Id: <ZGRDbS0XIm1fJwkG@jupiter.tail36e24.ts.net>
+---
+ include/mach/task_info.h | 6 ++++++
+ kern/task.c | 8 +++++++-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/include/mach/task_info.h b/include/mach/task_info.h
+index f448ee04..39659ee6 100644
+--- a/include/mach/task_info.h
++++ b/include/mach/task_info.h
+@@ -89,10 +89,16 @@ typedef struct task_events_info *task_events_info_t;
+ only accurate if suspended */
+
+ struct task_thread_times_info {
++ /* Deprecated, please use user_time64 */
+ rpc_time_value_t user_time; /* total user run time for
+ live threads */
++ /* Deprecated, please use system_time64 */
+ rpc_time_value_t system_time; /* total system run time for
+ live threads */
++ time_value64_t user_time64; /* total user run time for
++ live threads */
++ time_value64_t system_time64; /* total system run time for
++ live threads */
+ };
+
+ typedef struct task_thread_times_info task_thread_times_info_data_t;
+diff --git a/kern/task.c b/kern/task.c
+index 65191f5d..81817083 100644
+--- a/kern/task.c
++++ b/kern/task.c
+@@ -881,8 +881,14 @@ kern_return_t task_info(
+ task_unlock(task);
+ TIME_VALUE64_TO_TIME_VALUE(&acc_user_time, &times_info->user_time);
+ TIME_VALUE64_TO_TIME_VALUE(&acc_system_time, &times_info->system_time);
++ if (*task_info_count >= TASK_THREAD_TIMES_INFO_COUNT) {
++ /* Copy new time_value64_t fields */
++ times_info->user_time64 = acc_user_time;
++ times_info->system_time64 = acc_system_time;
++ }
+
+- *task_info_count = TASK_THREAD_TIMES_INFO_COUNT;
++ if (*task_info_count > TASK_THREAD_TIMES_INFO_COUNT)
++ *task_info_count = TASK_THREAD_TIMES_INFO_COUNT;
+ break;
+ }
+
+--
+2.41.0
+
Use 'modify-phases'. 2016-07-22gnu: subversion: Use https.Efraim Flashner * gnu/packages/version-control.scm (subversion)[source]: Use https. [home-page]: Use https. 2016-07-22gnu: git-flow: Use 'modify-phases'.Efraim Flashner * gnu/packages/version-control.scm (git-flow)[arguments]: Use 'modify-phases'. 2016-07-22gnu: gnuplot: Update to upstream's re-release of 5.0.4.Efraim Flashner * gnu/packages/maths.scm (gnuplot): Add a guix revision number to the version scheme of gnuplot to force an update. 2016-07-22gnu: enlightenment: Update to 0.21.1.Efraim Flashner * gnu/packages/enlightenment.scm (enlightenment): Update to 0.21.1. 2016-07-22gnu: bazaar: Use 'modify-phases'.Efraim Flashner * gnu/packages/version-control.scm (bazaar)[arguments]: Use 'modify-phases'. 2016-07-22gnu: icedtea-6: Generate keystore.Ricardo Wurmus * gnu/packages/java.scm (icedtea-6)[arguments]: Add phase "install-keystore". [native-inputs]: Add nss-certs. 2016-07-22gnu: icedtea-6: Use modify-phases syntax.Ricardo Wurmus * gnu/packages/java.scm (icedtea-6)[arguments]: Use modify-phases syntax. 2016-07-22gnu: nss-certs: Stop inheriting from nss package.Ricardo Wurmus * gnu/packages/certs.scm (nss-certs): Stop inheriting from nss package. 2016-07-22gnu: Add ptpython and ptpython2.Danny Milosavljevic * gnu/packages/python.scm (ptpython, ptpython-2): New variables. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2016-07-22gnu: racket: Add more inputs.宋文武 * gnu/packages/scheme.scm (racket)[inputs]: Add glu, gmp, libpng, libx11, mesa, mpfr, openssl and unixodbc. Replace libjpeg-8 with libjpeg and gtk+-2 with gtk+. 2016-07-22gnu: racket: Patch dynamically loaded libraries with absolute paths.宋文武 * gnu/packages/scheme.scm (racket)[arguments]: Patch 'ffi-lib' calls to absolute paths in 'pre-configure' phase. Remove 'wrap-programs' phase. 2016-07-22gnu: Add python-protobuf.Daniel Pimentel * gnu/packages/protobuf.scm (python-protobuf, python2-protobuf): New variables. Co-authored-by: Leo Famulari <leo@famulari.name> 2016-07-21gnu: muparser: Update source URL.Leo Famulari * gnu/packages/maths.scm (muparser)[source]: Update source URL to new location. Use URL-FETCH instead of SVN-FETCH. Update hash and package revision. 2016-07-21gnu: Update URLs for sourceforge.net.Leo Famulari * gnu/packages/admin.scm: Update URLs pointing to sourceforge.net. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/boost.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/code.scm: Likewise. * gnu/packages/compression.scm: Likewise. * gnu/packages/cups.scm: Likewise. * gnu/packages/djvu.scm: Likewise. * gnu/packages/docbook.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fonts.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/gl.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/graphviz.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/onc-rpc.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/photo.scm: Likewise. * gnu/packages/popt.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/rdesktop.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/swig.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xml.scm: Likewise. 2016-07-21gnu: Add hexedit.Kei Kebreau * gnu/packages/hexedit: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. 2016-07-21services: Export *-service-type and *-configuration.Tomáš Čech This allows users to use 'modify-services' and similar constructs for all these service types. * gnu/services/avahi.scm: export avahi-configuration. * gnu/services/base.scm: export gpm-configuration and rngd-configuration. * gnu/services/databases.scm: export *-service-type and *-configuration. * gnu/services/dbus.scm: export dbus-configuration. * gnu/services/dict.scm: export dicod-service-type. * gnu/services/lirc.scm: export lirc-configuration and lirc-service-type. * gnu/services/mail.scm: export dovecot-service-type. * gnu/services/web.scm: export nginx-configuration and nginx-service-type. * gnu/services/xorg.scm: export screen-locker and screen-locker?. * gnu/services/ssh.scm: export lsh-configuration and lsh-service-type. * gnu/services/desktop.scm: export *-service, *-service-type and *-configuration. * gnu/services/networking.scm: export *-configuration and *-service-type. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2016-07-21gnu: tesseract-ocr: Update to 3.04.01.Efraim Flashner * gnu/packages/ocr.scm (tesseract-ocr): Update to 3.04.01. [source]: Download from Github, add 'file-name' field, remove snippet. [native-inputs]: Remove autoconf, automake, libtool. [propagated-inputs]: Move leptonica ... [inputs]: ... to here. [arguments]: Remove 'autogen phase. [home-page]: Move program's home-page to Github. 2016-07-21gnu: gnuplot: Update to 5.0.4.Efraim Flashner * gnu/packages/maths.scm (gnuplot): Update to 5.0.4. 2016-07-21gnu: dovecot: Update to 2.2.25.Efraim Flashner * gnu/packages/mail.scm (dovecot): Update to 2.2.25. 2016-07-21gnu: texlive: Use https.Efraim Flashner * gnu/packages/tex.scm (texlive-bin, texlive-texmf, texlive)[license]: Use 'https' in the url. [home-page]: Use 'https' in the url. 2016-07-21gnu: texlive: Update in-place source updates.Efraim Flashner * gnu/packages/tex.scm (texlive-texmf-source, texlive-bin)[source]: Update to 20160523b. 2016-07-21gnu: msmtp: Update to 1.6.5.Leo Famulari * gnu/packages/mail.scm (msmtp): Update to 1.6.5. [source]: Update source URL. 2016-07-20gnu: superlu-dist: Remove non-free source.Eric Bavier * gnu/packages/maths.scm (superlu-dist)[source]: Replace non-free mc64ad.c source with stub. 2016-07-20gnu: slepc: Update to 3.7.1.Eric Bavier * gnu/packages/maths.scm (slepc): Update to 3.7.1. 2016-07-20gnu: petsc: Update to 3.7.2.Eric Bavier * gnu/packages/maths.scm (petsc): Update to 3.7.2. [arguments]: Adjust scrubbed files. 2016-07-20gnu: petsc: Make header generation reproducible.Eric Bavier * gnu/packages/maths.scm (petsc)[arguments]: Scrub timestamp from petscmachineinfo.h header.