summaryrefslogtreecommitdiff
path: root/sys-process
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/Manifest.gzbin9980 -> 9971 bytes
-rw-r--r--sys-process/latencytop/Manifest5
-rw-r--r--sys-process/latencytop/files/latencytop-0.5-Fix-Wimplicit-int.patch16
-rw-r--r--sys-process/latencytop/files/latencytop-0.5-fsync-drop.patch460
-rw-r--r--sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch28
-rw-r--r--sys-process/latencytop/latencytop-0.5-r3.ebuild (renamed from sys-process/latencytop/latencytop-0.5-r2.ebuild)31
-rw-r--r--sys-process/psmisc/Manifest5
-rw-r--r--sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch40
-rw-r--r--sys-process/psmisc/psmisc-23.4-r1.ebuild21
-rw-r--r--sys-process/psmisc/psmisc-23.5.ebuild73
10 files changed, 628 insertions, 51 deletions
diff --git a/sys-process/Manifest.gz b/sys-process/Manifest.gz
index 046cd74b2aa3..07b932cff06d 100644
--- a/sys-process/Manifest.gz
+++ b/sys-process/Manifest.gz
Binary files differ
diff --git a/sys-process/latencytop/Manifest b/sys-process/latencytop/Manifest
index 3aec9b196363..04ee09792446 100644
--- a/sys-process/latencytop/Manifest
+++ b/sys-process/latencytop/Manifest
@@ -1,6 +1,7 @@
AUX latencytop-0.5-01-mkdir-usr-sbin-as-well.patch 626 BLAKE2B b2fda8a0184086b2d2821557523953784b47c7e42e69053f50bb0f76c193a2d0125e458ec9926ebb400e3791753890d3b63fa1ba302ec9d544f956839156852d SHA512 feb80688c39b611d9bbb37c58f7d0c84b9d8c43534c2475f1f6e118406ab05a2ae98090c472085eb6ff08b4610486ede091d4c357979a5ec693deba30afd2a91
AUX latencytop-0.5-03-clean-up-build-system.patch 2213 BLAKE2B 30dafdc13514c8814871a9d453b25a36eaf8feb963f12abfe15282036800df18811f32c2705f61a96861c92487230f019808e2c0868c693a324e03a99eb90845 SHA512 a5a0fc53b76f90917761bcb9f22e13388478ac8c64b92bd44e89d6b98b07cc1359e9dd08f1ac3b62c1e8cc57d1116ddf18e8b5b0c41224339aeb25a0ff6dd330
-AUX latencytop-0.5-fsync-fix-implicit-decl.patch 684 BLAKE2B e623b4b645d1a5bab075ca976a8b3564d1d58ea614015587599b41756187c2fa6a2e9d03a22dcd38aef35077409aca53e5569437095a02ebdbc52391b8f5f605 SHA512 01aa09725f7786f157452c994927c985b2cc4748101ed5db73c3e6db3754bf234a45fb8937185ad61e18d5f5ab650844bbdbf0134a7d28a707843db31d1efa63
+AUX latencytop-0.5-Fix-Wimplicit-int.patch 399 BLAKE2B 51f6522bf5c1dd1d10cb5241eb91a636cdffef2435570afe7f0c1eceabaf61b6e157efcdb7195232d5b5b2a3ff138598288a92e7256845a584d1f83bc081e2e8 SHA512 5d1c14eb63f9e0bebebccfcad3452ad05cd93a91e2ee80b8f26e1677df8137f1815d5737d349179b1a1591d1096110f467c807050dbefdf9bbdf5c26a7a7256c
+AUX latencytop-0.5-fsync-drop.patch 11128 BLAKE2B bcba7a21f152a918c08df2a0b828253d0d917d3b80d2252a823e2d1c3fa8e582edf107619211d39e69dd6536f07b2e29f1ba9bef62a1b543d7887c833d6f520a SHA512 e4bb1b5e7c1524aac0d15299ca0a4a802869228583fdfdb32d4ba3141aaa74b3efa674fa4d6778c1e49b2201d595507aacb44cefdbd933bad3c3b6023bbaf2d4
DIST latencytop-0.5.tar.gz 25374 BLAKE2B 93bea39918d06273bc5fc61a59be57dad77c76fff6c89fdf0e88e1daceb7462e77e5fab3ad71ea7c1f39bcfbe9b0b2a7bd492640a8fb9eec55c34ce06e40b48c SHA512 81db52b29a5fd2a5e14863f1cbf948b15ea68ff41a826cdf323215c2c8b0334144aaccf00cb49a9f7c195efcb5ff49fbf2b687a8bd4b604d338af6628d319b2c
-EBUILD latencytop-0.5-r2.ebuild 1178 BLAKE2B 4ca507e0955d9769c98c68e6a157fbb38ad6ffde8b75c7c27703e6678a444cff0159593ab2c2f159ffc80994247e7f31e28e566a3132d819111fb1ae25b97198 SHA512 5116fa9795d4e1932f8e1792284d044dfddf5c01a309a61144c1f06d77d410cae2281eeecad44dd437dfeffdce737266e43e037d447f5f4580a57c7254f0f2c8
+EBUILD latencytop-0.5-r3.ebuild 1261 BLAKE2B 79ce6224185063b02a94f2cbbddf0a9bd45041bb848a3f510b8df79b9c1b78a3cd204428aa35ede5d9b03d4b03df10436e05d2583f729f40b7a221b266c533f3 SHA512 87ab08dffa3521c6dfaf9f95cecd9fe8ff56ec7e63c59354944cef786628f5528fc4edbb3473d6bc7486370b6a0bf49655813a262b5edf52e0d4e1ba487ffbf3
MISC metadata.xml 254 BLAKE2B f3a9f843cf94243d1129711770df727fcdc8808bca829ef784819cab6f5410dfa463cfed85182f8228c7de796a674dd602653ad3ef817a62c0c3e7198b23befe SHA512 b9fcd3084a7e197f6138e1ce8b0eff99c4c203c37a7d5c40de207040ba1501ef0e5b2f4e00216a567037bcd6d3394fdec6ff587484c9ba2fca9d04f431733b7c
diff --git a/sys-process/latencytop/files/latencytop-0.5-Fix-Wimplicit-int.patch b/sys-process/latencytop/files/latencytop-0.5-Fix-Wimplicit-int.patch
new file mode 100644
index 000000000000..de57cdf7d42e
--- /dev/null
+++ b/sys-process/latencytop/files/latencytop-0.5-Fix-Wimplicit-int.patch
@@ -0,0 +1,16 @@
+From 709d3927d54d7f379aa663f6be1ca1dc507d5346 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 28 Oct 2022 07:11:10 +0100
+Subject: [PATCH] Fix -Wimplicit-int
+
+--- a/gtk_display.c
++++ b/gtk_display.c
+@@ -594,7 +594,7 @@ static void create_targets_window(void)
+ G_CALLBACK(freeze_toggled), NULL);
+ }
+
+-static load_icons(void)
++static void load_icons(void)
+ {
+ GError *err;
+
diff --git a/sys-process/latencytop/files/latencytop-0.5-fsync-drop.patch b/sys-process/latencytop/files/latencytop-0.5-fsync-drop.patch
new file mode 100644
index 000000000000..ad7bda8f949d
--- /dev/null
+++ b/sys-process/latencytop/files/latencytop-0.5-fsync-drop.patch
@@ -0,0 +1,460 @@
+https://src.fedoraproject.org/rpms/latencytop/blob/rawhide/f/latencytop-remove-the-fsync-view.patch
+https://bugs.gentoo.org/742419
+
+From a4a1eb20492773d48bd83087157149c5fb9a257a Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Wed, 15 Feb 2012 23:44:18 +0100
+Subject: [PATCH 1/2] remove the fsync view
+
+The fsync tracer it depends on was never merged in the kernel.
+It also uses 'tracing_enable' which triggers deprecation warnings in the
+kernel.
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@ SBINDIR = /usr/sbin
+ XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
+ LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw
+
+-OBJS= latencytop.o text_display.o translate.o fsync.o
++OBJS= latencytop.o text_display.o translate.o
+
+ ifdef HAS_GTK_GUI
+ XCFLAGS += `pkg-config --cflags gtk+-2.0` -DHAS_GTK_GUI
+--- a/fsync.c
++++ /dev/null
+@@ -1,369 +0,0 @@
+-/*
+- * Copyright 2008, Intel Corporation
+- *
+- * This file is part of LatencyTOP
+- *
+- * This program file is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License as published by the
+- * Free Software Foundation; version 2 of the License.
+- *
+- * This program is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program in a file named COPYING; if not, write to the
+- * Free Software Foundation, Inc.,
+- * 51 Franklin Street, Fifth Floor,
+- * Boston, MA 02110-1301 USA
+- *
+- * Authors:
+- * Arjan van de Ven <arjan@linux.intel.com>
+- */
+-
+-#define _GNU_SOURCE
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <ncurses.h>
+-#include <time.h>
+-#include <wchar.h>
+-#include <ctype.h>
+-
+-#include <glib.h>
+-
+-#include "latencytop.h"
+-
+-struct fsync_process {
+- char name[PATH_MAX];
+- int fsync_count;
+- GList *files;
+-};
+-
+-struct fsync_files {
+- char name[PATH_MAX];
+- int fsync_count;
+-};
+-
+-static GList *fsync_data;
+-
+-
+-static chain_file(struct fsync_process *proc, char *filename)
+-{
+- struct fsync_files *file;
+- GList *item;
+-
+- proc->fsync_count++;
+- item = proc->files;
+- while (item) {
+- file = item->data;
+- item = g_list_next(item);
+- if (strcmp(file->name, filename)==0) {
+- file->fsync_count++;
+- return;
+- }
+- }
+- file = malloc(sizeof(struct fsync_files));
+- if (!file)
+- return;
+- memset(file, 0, sizeof(struct fsync_files));
+- strncpy(file->name, filename, PATH_MAX-1);
+- file->fsync_count = 1;
+- proc->files = g_list_append(proc->files, file);
+-}
+-
+-static report_file(char *process, char *file)
+-{
+- struct fsync_process *proc;
+- GList *item;
+-
+- item = fsync_data;
+- while (item) {
+- proc = item->data;
+- item = g_list_next(item);
+- if (strcmp(proc->name, process) == 0) {
+- chain_file(proc, file);
+- return;
+- }
+- }
+-
+- proc = malloc(sizeof(struct fsync_process));
+- if (!proc)
+- return;
+- memset(proc, 0, sizeof(struct fsync_process));
+- strncpy(proc->name, process, PATH_MAX-1);
+- chain_file(proc, file);
+- fsync_data = g_list_append(fsync_data, proc);
+-}
+-
+-static gint sort_files(gconstpointer A, gconstpointer B)
+-{
+- struct fsync_files *a = (struct fsync_files *)A;
+- struct fsync_files *b = (struct fsync_files *)B;
+- return a->fsync_count < b->fsync_count;
+-}
+-
+-static gint sort_process(gconstpointer A, gconstpointer B)
+-{
+- struct fsync_process *a = (struct fsync_process *)A;
+- struct fsync_process *b = (struct fsync_process *)B;
+- return a->fsync_count < b->fsync_count;
+-}
+-
+-static void sort_the_lot(void)
+-{
+- GList *item;
+- struct fsync_process *proc;
+-
+- item = fsync_data = g_list_sort(fsync_data, sort_process);
+- while (item) {
+- proc = item->data;
+- item = g_list_next(item);
+- proc->files = g_list_sort(proc->files, sort_files);
+- }
+-}
+-
+-
+-
+-static void write_to_file(char *filename, char *value)
+-{
+- FILE *file;
+- file = fopen(filename, "w");
+- if (!file)
+- return;
+- fprintf(file,"%s\n", value);
+- fclose(file);
+-}
+-
+-
+-int enable_fsync_tracer(void)
+-{
+- int ret;
+-/*
+- * Steps to do:
+- *
+- * mount -t debugfs none /sys/kernel/debug/
+- * cd /sys/kernel/debug/tracing
+- * echo fsync > current_tracer
+- * echo ftrace_printk > iter_ctrl
+- * echo 1 > tracing_enabled
+- */
+- ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
+- if (!ret)
+- return -1;
+- write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
+- write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
+-}
+-
+-int disable_fsync_tracer(void)
+-{
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
+-}
+-
+-
+-static WINDOW *title_bar_window;
+-static WINDOW *global_window;
+-
+-
+-static void fsync_cleanup_curses(void)
+-{
+- endwin();
+-}
+-
+-
+-static void zap_windows(void)
+-{
+- if (title_bar_window) {
+- delwin(title_bar_window);
+- title_bar_window = NULL;
+- }
+- if (global_window) {
+- delwin(global_window);
+- global_window = NULL;
+- }
+-}
+-
+-
+-static int maxx, maxy;
+-
+-static void fsync_setup_windows(void)
+-{
+- int midy;
+- getmaxyx(stdscr, maxy, maxx);
+-
+- zap_windows();
+-
+- title_bar_window = subwin(stdscr, 1, maxx, 0, 0);
+- global_window = subwin(stdscr, maxy-3 , maxx, 2, 0);
+-
+- werase(stdscr);
+- refresh();
+-}
+-
+-#if 0 /* Dead code */
+-static void fsync_initialize_curses(void)
+-{
+- if (noui)
+- return;
+- initscr();
+- start_color();
+- keypad(stdscr, TRUE); /* enable keyboard mapping */
+- nonl(); /* tell curses not to do NL->CR/NL on output */
+- cbreak(); /* take input chars one at a time, no wait for \n */
+- noecho(); /* dont echo input */
+- curs_set(0); /* turn off cursor */
+- use_default_colors();
+-
+- init_pair(PT_COLOR_DEFAULT, COLOR_WHITE, COLOR_BLACK);
+- init_pair(PT_COLOR_HEADER_BAR, COLOR_BLACK, COLOR_WHITE);
+- init_pair(PT_COLOR_ERROR, COLOR_BLACK, COLOR_RED);
+- init_pair(PT_COLOR_RED, COLOR_WHITE, COLOR_RED);
+- init_pair(PT_COLOR_YELLOW, COLOR_WHITE, COLOR_YELLOW);
+- init_pair(PT_COLOR_GREEN, COLOR_WHITE, COLOR_GREEN);
+- init_pair(PT_COLOR_BRIGHT, COLOR_WHITE, COLOR_BLACK);
+-
+- atexit(cleanup_curses);
+-}
+-#endif
+-
+-static void show_title_bar(void)
+-{
+- wattrset(title_bar_window, COLOR_PAIR(PT_COLOR_HEADER_BAR));
+- wbkgd(title_bar_window, COLOR_PAIR(PT_COLOR_HEADER_BAR));
+- werase(title_bar_window);
+-
+- mvwprintw(title_bar_window, 0, 0, " LatencyTOP -- fsync() view... type 'F' to exit");
+-
+- wrefresh(title_bar_window);
+-}
+-
+-
+-
+-static void print_global_list(void)
+-{
+- GList *item, *item2;
+- struct fsync_process *proc;
+- struct fsync_files *file;
+- int i = 1, i2 = 0;
+- int y = 1;
+-
+- werase(global_window);
+-
+-
+- mvwprintw(global_window, 0, 0, "Process File");
+- item = g_list_first(fsync_data);
+- while (item && i < maxy-6) {
+- proc = item->data;
+- item = g_list_next(item);
+-
+- mvwprintw(global_window, y, 0, "%s (%i)", proc->name, proc->fsync_count);
+- y++;
+- item2 = proc->files;
+- while (item2 && i2 < 5) {
+- file = item2->data;
+- item2 = g_list_next(item2);
+- mvwprintw(global_window, y, 10, "%s (%i)", file->name, file->fsync_count);
+- y++;
+- i2++;
+- }
+- i++;
+- y++;
+- }
+- wrefresh(global_window);
+-
+-}
+-
+-static void parse_ftrace(void)
+-{
+- FILE *file;
+- char line[PATH_MAX];
+- file = fopen("/sys/kernel/debug/tracing/trace", "r");
+- if (!file)
+- return;
+- while (!feof(file)) {
+- char *c, *c2;
+- memset(line, 0, PATH_MAX);
+- fgets(line, PATH_MAX-1, file);
+- c = strchr(line, '\n');
+- if (c) *c = 0;
+- c = strstr(line, "probe_do_fsync: Process ");
+- if (!c)
+- continue;
+- c += 24;
+- c2 = strchr(c, ' ');
+- if (!c2)
+- continue;
+- *c2 = 0;
+- c2++;
+- c2 = strstr(c2, "fsync on ");
+- if (!c2)
+- continue;
+- c2 += 9;
+- report_file(c, c2);
+- }
+- fclose(file);
+- sort_the_lot();
+-}
+-
+-
+-int fsync_display(int duration)
+-{
+- struct timeval start,end,now;
+- int key;
+- fd_set rfds;
+- int curduration;
+-
+- fsync_setup_windows();
+- show_title_bar();
+- curduration = 3;
+- if (curduration > duration)
+- curduration = duration;
+- parse_ftrace();
+- print_global_list();
+- while (1) {
+- FD_ZERO(&rfds);
+- FD_SET(0, &rfds);
+- gettimeofday(&start, NULL);
+- gettimeofday(&now, NULL);
+- end.tv_sec = start.tv_sec + curduration - now.tv_sec;
+- end.tv_usec = start.tv_usec - now.tv_usec;
+- while (end.tv_usec < 0) {
+- end.tv_sec --;
+- end.tv_usec += 1000000;
+- };
+- curduration = duration;
+- if (curduration > 5)
+- curduration = 5;
+- /* clear the ftrace buffer */
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
+- key = select(1, &rfds, NULL, NULL, &end);
+- parse_ftrace();
+- print_global_list();
+-
+- if (key) {
+- char keychar;
+- keychar = fgetc(stdin);
+- if (keychar == 27) {
+- keychar = fgetc(stdin);
+- if (keychar==79)
+- keychar = fgetc(stdin);
+- }
+- keychar = toupper(keychar);
+- if (keychar == 'F') {
+- fsync_cleanup_curses();
+- return 1;
+- }
+- if (keychar == 'Q') {
+- fsync_cleanup_curses();
+- return 0;
+- }
+- }
+- }
+-
+- return 1;
+-}
+--- a/latencytop.8
++++ b/latencytop.8
+@@ -42,10 +42,6 @@ followed by a letter, then only active processes starting with that lettter
+ are displayed and walked. If you press \fBs\fP followed by \fB0\fP then
+ that filter is reset.
+
+-If you press \fBf\fP then \fBLatencyTop\fP displays a list of all processes
+-currently waiting for an \fBfsync\fP to finish. Pressing \fBf\fP again
+-returns you to the normal operating mode of \fBLatencyTop\fP.
+-
+ .SH SEE ALSO
+ .BR powertop (1)
+ .br
+--- a/latencytop.c
++++ b/latencytop.c
+@@ -532,7 +532,6 @@ void update_list(void)
+ static void cleanup_sysctl(void)
+ {
+ disable_sysctl();
+- disable_fsync_tracer();
+ }
+
+ int main(int argc, char **argv)
+@@ -540,7 +539,6 @@ int main(int argc, char **argv)
+ int i, use_gtk = 0;
+
+ enable_sysctl();
+- enable_fsync_tracer();
+ atexit(cleanup_sysctl);
+
+ #ifdef HAS_GTK_GUI
+--- a/latencytop.h
++++ b/latencytop.h
+@@ -53,7 +53,4 @@ extern void start_text_ui(void);
+
+ extern char *translate(char *line);
+ extern void init_translations(char *filename);
+-extern int fsync_display(int duration);
+-extern int enable_fsync_tracer(void);
+-extern int disable_fsync_tracer(void);
+ extern void update_list(void);
+--- a/latencytop.trans
++++ b/latencytop.trans
+@@ -142,5 +142,5 @@
+ 5 sys_nanosleep Application requested delay
+ 5 sys_pause Application requested delay
+ 5 evdev_read Reading keyboard/mouse input
+-5 do_fsync fsync() on a file (type 'F' for details)
++5 do_fsync fsync() on a file
+ 5 __log_wait_for_space Waiting for EXT3 journal space
+--- a/text_display.c
++++ b/text_display.c
+@@ -378,13 +378,6 @@ static int update_display(int duration, char *filterchar)
+ else if (keychar == '0')
+ *filterchar = '\0';
+ }
+- if (keychar == 'F') {
+- endwin();
+- if (!fsync_display(duration))
+- return 0;
+- setup_windows();
+- show_title_bar();
+- }
+ if (keychar < 32)
+ repaint = 0;
+ }
diff --git a/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch b/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
deleted file mode 100644
index 33f2bc278600..000000000000
--- a/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 60427a259ba76b8238198e1f17a0c3b06491be3c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 18 Dec 2009 10:48:39 -0500
-Subject: [PATCH] fsync: fix implicit decl
-
-fsync.c: In function 'fsync_display':
-fsync.c:330: warning: implicit declaration of function 'gettimeofday'
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- src/fsync.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/src/fsync.c b/src/fsync.c
-index 1706571..3bec719 100644
---- a/fsync.c
-+++ b/fsync.c
-@@ -30,6 +30,7 @@
- #include <string.h>
- #include <ncurses.h>
- #include <time.h>
-+#include <sys/time.h>
- #include <wchar.h>
- #include <ctype.h>
-
---
-1.6.5.4
-
diff --git a/sys-process/latencytop/latencytop-0.5-r2.ebuild b/sys-process/latencytop/latencytop-0.5-r3.ebuild
index fa5403254583..3e4091f5598d 100644
--- a/sys-process/latencytop/latencytop-0.5-r2.ebuild
+++ b/sys-process/latencytop/latencytop-0.5-r3.ebuild
@@ -1,25 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit linux-info
+inherit linux-info toolchain-funcs
-DESCRIPTION="tool for identifying where in the system latency is happening"
+DESCRIPTION="Tool for identifying where in the system latency is happening"
HOMEPAGE="http://git.infradead.org/latencytop.git"
-
# Upstream is long gone, so we explicitly use our mirrors for the tarball
SRC_URI="mirror://gentoo/${P}.tar.gz"
-CONFIG_CHECK="~LATENCYTOP"
-
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm x86"
IUSE="gtk"
-RDEPEND="dev-libs/glib:2
- sys-libs/ncurses:0=
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/ncurses:=
gtk? ( x11-libs/gtk+:2 )
"
DEPEND="${RDEPEND}"
@@ -30,14 +28,13 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${P}-01-mkdir-usr-sbin-as-well.patch"
"${FILESDIR}/${P}-03-clean-up-build-system.patch"
- "${FILESDIR}/${P}-fsync-fix-implicit-decl.patch"
+ "${FILESDIR}/${P}-fsync-drop.patch"
+ "${FILESDIR}/${P}-Fix-Wimplicit-int.patch"
)
-pkg_pretend() {
- linux-info_pkg_setup
-}
+CONFIG_CHECK="~LATENCYTOP"
-pkg_setup() {
+pkg_pretend() {
linux-info_pkg_setup
}
@@ -51,3 +48,9 @@ src_prepare() {
sed -i -e "/HAS_GTK_GUI = 1/d" Makefile || die
fi
}
+
+src_compile() {
+ tc-export CC PKG_CONFIG
+
+ emake CPPFLAGS="${CPPFLAGS}"
+}
diff --git a/sys-process/psmisc/Manifest b/sys-process/psmisc/Manifest
index 63effc5c5203..11e3b89dc664 100644
--- a/sys-process/psmisc/Manifest
+++ b/sys-process/psmisc/Manifest
@@ -1,4 +1,7 @@
AUX psmisc-23.4-fuser_regression_revert.patch 1577 BLAKE2B 89f346146ca2fb71bc5bee87f880abcc6e2e9c6b5c3e911fb806ced2a89ba096de6ce052bf238f1c8df948ec1fba5b979763fd2baa6e0a7b46ba977482f82501 SHA512 b129d3355a022b0bd743a06a4912b1ddea386af0d1551fadbe8155e1733ac03df3c795a4997759c4db6299196af3b49dfb2c9e6840dc33174ee1f4afe4ef9df7
+AUX psmisc-23.5-fix-killall-pidfd_send_signal.patch 1384 BLAKE2B 246636fe31d9602cd68310ed8c637fa2f62dfa98bdc9cc958bd2e7ab6eaf358dd516cc49db4bbbe892d62375d5f7613b04fa98532e225d9fdff2dc142e596459 SHA512 23117b10094be12b64545ccd1fa9c2e2901e0ab7ab4e84dc9428e27358fa83bff01b4e790f21e14b74c0db2dd01ee83ba6234cbf975f275d21677a0dbda1f444
DIST psmisc-23.4.tar.xz 370000 BLAKE2B e762171c4d3252421a49b352fadb3e892f66862f003a313a0cc692f973364b06d2652a51d331314462784d94ad55189e74c4d7a023d5d7c917c5e5c05009f46b SHA512 b05781fdb283a6f132bd385d64437f8080e6bc0e11cd2e3e02227678682bb67b3c89edec34a6d067d77312811d072dc60b47ebb32b168c4c69bbc36df643a471
-EBUILD psmisc-23.4-r1.ebuild 1768 BLAKE2B 2e8c307bfcf9cd1137dda7275914f283e4689ad79d940e6294abfb8dc051ebb61ccf5ea2e6305bbfe57157fa61495ea48d6014f8b60fec32332961d3ef7dfe58 SHA512 4497d4084e46c389c4f32a91a951a10d069b68a4426869c6b012a08655413589c2c9e2692208de80c31523b0684321b5701ea428c75e15bc4e23872055e1e3b2
+DIST psmisc-23.5.tar.xz 394012 BLAKE2B 258b82c9fff3765f33cdcd4150489b3e585a47b9065b1cb4f5b432bea4aa7766aab15b160cfb948df9e835c7ac09a9f185d663ab1cd376bedea53bdaf73fd776 SHA512 e908220350491a595ceaf96025a9aa14d832cacc8901545d0864152053fedaf9dc10f45fb2870aa2a00e4d9d8947243038357e14a82b04ab5d20c53e7f841a8d
+EBUILD psmisc-23.4-r1.ebuild 1889 BLAKE2B 59779553f91f16b8dec506c1309b5480985cd739ae1c0a1d569b52cb3402bb1d94b7869f990fdfd396ac341022461f1043ce383903b95c599397a5343e3f85e1 SHA512 eb829e935c7cb7d5a9ca96cbccd26eb6703d0ea224ffd4713db925078cdc141bc110ad3f21becfa33663c3ef1627ca6550fe7ef4e0e4c723d74f1cc4bcb1eb52
+EBUILD psmisc-23.5.ebuild 1955 BLAKE2B 07f8a1a716c076d8dc58045cbe58969e29c87cfc95222dadc6273a90abd9675a4cfb0fa11d727c9dec1187d85ef2781af07c895175977d9309b1abf581a6d37b SHA512 ef032b48b8f8d82d1d157127b94300a6a8e65d3dfbccaded56fe3b7fe79170d62b3ff3930f4835e4c5abba7cb428d1e21557e69da15816504891318a2b7578da
MISC metadata.xml 387 BLAKE2B 86be283c90e1b90bd40313187a4caa0ec871807fe1045649f2bff8934ee9537a348ee096a63ed2cfb2991724bf79e8dc7dd65d5cb4812216bbd10ebf5e400a71 SHA512 8594d6e68c03adf48e92947d47a3b477768fd296d8db62cfcae8982dcc872e947780bfdb11a4f3b1658b00928eccd2d7b58b03eea388c51806a45ae47e8c59d5
diff --git a/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch b/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch
new file mode 100644
index 000000000000..0fc9c30a9635
--- /dev/null
+++ b/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch
@@ -0,0 +1,40 @@
+https://gitlab.com/psmisc/psmisc/-/commit/6892e321e7042e3df60a5501a1c59d076e8a856f
+
+From 6892e321e7042e3df60a5501a1c59d076e8a856f Mon Sep 17 00:00:00 2001
+From: Craig Small <csmall@dropbear.xyz>
+Date: Mon, 18 Jul 2022 20:16:42 +1000
+Subject: [PATCH] killall: use kill if pidfd_send_signal() fails
+
+The pidfd_send_signal() system call appeared in Linux 5.1
+If psmisc is build on a system before then, or a non-Linux
+system, then kill() is used instead. However if psmisc is
+built on a Linux >= 5.1 system but run on a < 5.1 Linux
+system the system call fails and killall doesn't work.
+
+The fix, as proposed by Peter T. Breuer, is to try
+pidfd_send_signal() and if the return value is < 0 and
+errno is ENOSYS then we know at runtime the system call
+failed and we fall through to trusty old kill().
+
+Note, this means that killall on systems below 5.1 still
+have the race PID condition that the pidfd calls fix.
+
+References:
+ https://bugs.debian.org/1015228
+--- a/src/killall.c
++++ b/src/killall.c
+@@ -326,7 +326,12 @@ my_send_signal(
+ {
+ #ifdef __NR_pidfd_send_signal
+ if (pid > 0) /* Not PGID */
+- return syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
++ {
++ int ret = syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
++ if (ret >= 0 || errno != ENOSYS)
++ return ret;
++ // fall through if no such syscall
++ }
+ #endif
+ return kill(pid, sig);
+ }
+GitLab
diff --git a/sys-process/psmisc/psmisc-23.4-r1.ebuild b/sys-process/psmisc/psmisc-23.4-r1.ebuild
index 3d1f44243e5f..d878cf0a9306 100644
--- a/sys-process/psmisc/psmisc-23.4-r1.ebuild
+++ b/sys-process/psmisc/psmisc-23.4-r1.ebuild
@@ -12,15 +12,21 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 nls selinux X"
+IUSE="ipv6 nls selinux test X"
+RESTRICT="!test? ( test )"
-RDEPEND="!=app-i18n/man-pages-l10n-4.0.0-r0
- >=sys-libs/ncurses-5.7-r7:0=
+RDEPEND="
+ !=app-i18n/man-pages-l10n-4.0.0-r0
+ >=sys-libs/ncurses-5.7-r7:=
nls? ( virtual/libintl )
- selinux? ( sys-libs/libselinux )"
+ selinux? ( sys-libs/libselinux )
+"
DEPEND="${RDEPEND}"
-BDEPEND=">=sys-devel/libtool-2.2.6b
- nls? ( sys-devel/gettext )"
+BDEPEND="
+ >=sys-devel/libtool-2.2.6b
+ nls? ( sys-devel/gettext )
+ test? ( dev-util/dejagnu )
+"
DOCS=( AUTHORS ChangeLog NEWS README )
@@ -40,6 +46,9 @@ src_configure() {
ac_cv_func_realloc_0_nonnull=yes
fi
+ # bug #802414
+ touch testsuite/global-conf.exp || die
+
local myeconfargs=(
--disable-harden-flags
$(use_enable ipv6)
diff --git a/sys-process/psmisc/psmisc-23.5.ebuild b/sys-process/psmisc/psmisc-23.5.ebuild
new file mode 100644
index 000000000000..221b3631be6d
--- /dev/null
+++ b/sys-process/psmisc/psmisc-23.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="A set of tools that use the proc filesystem"
+HOMEPAGE="http://psmisc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="nls selinux test X"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !=app-i18n/man-pages-l10n-4.0.0-r0
+ >=sys-libs/ncurses-5.7-r7:=
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ >=sys-devel/libtool-2.2.6b
+ nls? ( sys-devel/gettext )
+ test? ( dev-util/dejagnu )
+"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-killall-pidfd_send_signal.patch
+)
+
+src_configure() {
+ if tc-is-cross-compiler ; then
+ # This isn't ideal but upstream don't provide a placement
+ # when malloc is missing anyway, leading to errors like:
+ # pslog.c:(.text.startup+0x108): undefined reference to `rpl_malloc'
+ # See https://sourceforge.net/p/psmisc/bugs/71/
+ # (and https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html)
+ export ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes
+ fi
+
+ # No longer needed in > 23.5
+ # https://gitlab.com/psmisc/psmisc/-/commit/3fac667430341bdcec733da6eacd88b03813467a
+ # bug #802414
+ touch testsuite/global-conf.exp || die
+
+ local myeconfargs=(
+ --disable-harden-flags
+ --enable-ipv6
+ $(use_enable nls)
+ $(use_enable selinux)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ use X || rm -f "${ED}"/usr/bin/pstree.x11
+
+ [[ -s ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/bin/peekfd
+ [[ -e ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/share/man/man1/peekfd.1
+
+ # fuser is needed by init.d scripts; use * wildcard for #458250
+ dodir /bin
+ mv "${ED}"/usr/bin/*fuser "${ED}"/bin || die
+}