[packages/psmisc] - updated to 23.6; handle apparmor support
qboosh
qboosh at pld-linux.org
Sun Oct 15 17:06:56 CEST 2023
commit 9d123726dc59703115b09c6df62861d94c9f51c5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Oct 15 17:08:44 2023 +0200
- updated to 23.6; handle apparmor support
kill.patch | 41 -----------------------------------------
psmisc.spec | 33 ++++++++++++++++++++++-----------
2 files changed, 22 insertions(+), 52 deletions(-)
---
diff --git a/psmisc.spec b/psmisc.spec
index af777f4..a6098b8 100644
--- a/psmisc.spec
+++ b/psmisc.spec
@@ -1,6 +1,7 @@
#
# Conditional build:
-%bcond_without selinux # build without SELinux support
+%bcond_without apparmor # AppArmor features
+%bcond_without selinux # SELinux features
#
Summary: Utilities for managing processes on your system
Summary(de.UTF-8): Utilities zum Verwalten der Prozesse auf Ihrem System
@@ -13,21 +14,21 @@ Summary(ru.UTF-8): Утилиты работы с процессами
Summary(tr.UTF-8): /proc dosya sistemi için ps tipi araçlar
Summary(uk.UTF-8): Утиліти роботи з процесами
Name: psmisc
-Version: 23.5
-Release: 2
+Version: 23.6
+Release: 1
License: GPL v2+
Group: Applications/System
Source0: https://downloads.sourceforge.net/psmisc/%{name}-%{version}.tar.xz
-# Source0-md5: 014f0b5d5ab32478a2c57812ad01e1fb
-Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source0-md5: ed3206da1184ce9e82d607dc56c52633
+Source1: %{name}-non-english-man-pages.tar.bz2
# Source1-md5: 9add7665e440bbd6b0b4f9293ba8b86d
-Patch0: kill.patch
-URL: http://psmisc.sourceforge.net/
+URL: https://gitlab.com/psmisc/psmisc
BuildRequires: autoconf >= 2.71
BuildRequires: automake >= 1:1.11
BuildRequires: gettext-tools >= 0.19.3
# for %ms scanf format
BuildRequires: glibc-devel >= 6:2.7
+%{?with_apparmor:BuildRequires: libapparmor-devel}
%{?with_selinux:BuildRequires: libselinux-devel}
BuildRequires: ncurses-devel >= 5.0
BuildRequires: po4a
@@ -90,10 +91,14 @@ göndermek için gerekli programları içerir.
%prep
%setup -q
-%patch0 -p1
+
+cat >git-version-gen <<EOF
+#!/bin/sh
+printf '%{version}'
+EOF
+chmod +x misc/git-version-gen
%build
-install -d misc; echo -n '#!/bin/sh\necho -n %{version}' > misc/git-version-gen; chmod +x misc/git-version-gen
%{__gettextize}
%{__aclocal} -I m4
%{__autoconf}
@@ -101,6 +106,7 @@ install -d misc; echo -n '#!/bin/sh\necho -n %{version}' > misc/git-version-gen;
%{__automake}
CFLAGS="%{rpmcflags} -D_GNU_SOURCE -I/usr/include/ncurses"
%configure \
+ %{?with_apparmor:--enable-apparmor} \
%{?with_selinux:--enable-selinux} \
--disable-silent-rules \
--enable-timeout-stat=static
@@ -113,8 +119,8 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/README.psmisc-non-english-man-pages
+# fr, ko already covered by man-po, so don't overwrite with outdated content
+bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} fi hu it ja nl pl
%find_lang %{name}
@@ -137,9 +143,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/pslog.1*
%{_mandir}/man1/prtstat.1*
%{_mandir}/man1/pstree.1*
+%lang(da) %{_mandir}/da/man1/*
%lang(de) %{_mandir}/de/man1/*
%lang(fi) %{_mandir}/fi/man1/*
%lang(fr) %{_mandir}/fr/man1/*
+%lang(hr) %{_mandir}/hr/man1/*
%lang(hu) %{_mandir}/hu/man1/*
%lang(it) %{_mandir}/it/man1/*
%lang(ja) %{_mandir}/ja/man1/*
@@ -147,5 +155,8 @@ rm -rf $RPM_BUILD_ROOT
%lang(nl) %{_mandir}/nl/man1/*
%lang(pl) %{_mandir}/pl/man1/*
%lang(pt_BR) %{_mandir}/pt_BR/man1/*
+%lang(ro) %{_mandir}/ro/man1/*
%lang(ru) %{_mandir}/ru/man1/*
+%lang(sr) %{_mandir}/sr/man1/*
+%lang(sv) %{_mandir}/sv/man1/*
%lang(uk) %{_mandir}/uk/man1/*
diff --git a/kill.patch b/kill.patch
deleted file mode 100644
index f9232ec..0000000
--- a/kill.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-commit 6892e321e7042e3df60a5501a1c59d076e8a856f
-Author: Craig Small <csmall at dropbear.xyz>
-Date: Mon Jul 18 20:16:42 2022 +1000
-
- 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
-
-diff --git a/src/killall.c b/src/killall.c
-index 78930c8..f573cfe 100644
---- 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);
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/psmisc.git/commitdiff/9d123726dc59703115b09c6df62861d94c9f51c5
More information about the pld-cvs-commit
mailing list