2006-12-19 00:17:33 +01:00
|
|
|
#
|
2011-06-22 13:36:15 +02:00
|
|
|
# spec file for package psmisc
|
2006-12-19 00:17:33 +01:00
|
|
|
#
|
2022-01-20 15:03:03 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2006-12-19 00:17:33 +01:00
|
|
|
#
|
2008-08-08 02:14:10 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-05 08:52:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:33 +01:00
|
|
|
#
|
|
|
|
|
2023-02-16 15:15:10 +01:00
|
|
|
%bcond_without apparmor
|
2012-01-09 10:21:03 +01:00
|
|
|
|
2006-12-19 00:17:33 +01:00
|
|
|
Name: psmisc
|
2017-07-05 15:33:06 +02:00
|
|
|
BuildRequires: autoconf
|
2011-12-01 21:11:49 +01:00
|
|
|
BuildRequires: automake
|
2017-07-05 15:33:06 +02:00
|
|
|
BuildRequires: dejagnu
|
2011-12-01 21:11:49 +01:00
|
|
|
BuildRequires: gcc-c++
|
2017-06-20 17:36:37 +02:00
|
|
|
BuildRequires: gettext-devel
|
2011-12-01 21:11:49 +01:00
|
|
|
BuildRequires: glibc-devel
|
2008-08-22 20:17:12 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2018-11-05 08:52:51 +01:00
|
|
|
BuildRequires: linux-glibc-devel >= 4.12
|
2011-12-01 21:11:49 +01:00
|
|
|
BuildRequires: ncurses-devel
|
2022-11-25 12:52:03 +01:00
|
|
|
BuildRequires: netcat-openbsd
|
2023-02-16 15:15:10 +01:00
|
|
|
%if %{with appamor}
|
2022-12-13 09:15:06 +01:00
|
|
|
BuildRequires: pkgconfig(libapparmor)
|
2023-02-16 15:15:10 +01:00
|
|
|
%endif
|
2020-04-27 16:58:59 +02:00
|
|
|
URL: https://gitlab.com/psmisc/psmisc/
|
2022-12-13 09:15:06 +01:00
|
|
|
Version: 23.6
|
2012-03-13 16:28:38 +01:00
|
|
|
Release: 0
|
2006-12-19 00:17:33 +01:00
|
|
|
Provides: ps:/usr/bin/killall
|
|
|
|
Summary: Utilities for managing processes on your system
|
2018-05-17 12:37:30 +02:00
|
|
|
License: GPL-2.0-or-later
|
2012-03-13 16:28:38 +01:00
|
|
|
Group: System/Monitoring
|
2018-10-22 13:18:33 +02:00
|
|
|
Source: https://gitlab.com/%{name}/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
|
|
|
|
Patch0: %{name}-v%{version}.dif
|
2017-06-20 16:04:40 +02:00
|
|
|
Patch2: %{name}-22.21-pstree.patch
|
2017-07-05 15:33:06 +02:00
|
|
|
# PATCH-ADD-SUSE boo#908068, boo#1046237, boo#1046237
|
|
|
|
# https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
|
|
|
|
Patch3: 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
|
2010-07-13 18:50:33 +02:00
|
|
|
|
2021-01-14 16:49:40 +01:00
|
|
|
%define have_peekfd %ix86 x86_64 ppc ppc64 ppc64le %arm mipsel m68k aarch64
|
2006-12-19 00:17:33 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The psmisc package contains utilities for managing processes on your
|
|
|
|
system: pstree, killall and fuser. The pstree command displays a tree
|
|
|
|
structure of all of the running processes on your system. The killall
|
|
|
|
command sends a specified signal (SIGTERM if nothing is specified) to
|
|
|
|
processes identified by name. The fuser command identifies the PIDs of
|
|
|
|
processes that are using specified files or filesystems.
|
|
|
|
|
2013-10-24 11:32:22 +02:00
|
|
|
%lang_package
|
2012-12-18 18:20:19 +01:00
|
|
|
|
2006-12-19 00:17:33 +01:00
|
|
|
%prep
|
2018-11-02 14:41:02 +01:00
|
|
|
%setup -q -n %{name}-v%{version}
|
2011-09-12 17:50:38 +02:00
|
|
|
%patch2 -p0 -b .pstree
|
2021-01-14 13:02:55 +01:00
|
|
|
%patch3 -p0 -b .mntinf
|
2017-07-05 15:33:06 +02:00
|
|
|
%patch0 -p0 -b .p0
|
2006-12-19 00:17:33 +01:00
|
|
|
|
|
|
|
%build
|
2017-06-20 17:36:37 +02:00
|
|
|
grep -h src/ po/*.po|\
|
|
|
|
sed -r 's/^#: //'|\
|
|
|
|
tr ' ' '\n'|\
|
|
|
|
sort -t : -k1,1 -u|\
|
|
|
|
sed -r 's/:[0-9]+$//' > po/POTFILES.in
|
2006-12-19 00:17:33 +01:00
|
|
|
autoreconf -fi
|
2018-06-22 18:43:06 +02:00
|
|
|
CFLAGS="-D_GNU_SOURCE -D_DEFAULT_SOURCE ${RPM_OPT_FLAGS} -pipe -fPIE"
|
2007-04-26 15:51:55 +02:00
|
|
|
CXXFLAGS="$CFLAGS"
|
2018-06-22 18:43:06 +02:00
|
|
|
LDFLAGS=-pie
|
2022-01-20 15:03:03 +01:00
|
|
|
CC=gcc
|
|
|
|
export CFLAGS CXXFLAGS LDFLAGS CC
|
2013-10-24 11:32:22 +02:00
|
|
|
%configure --disable-rpath \
|
2011-09-12 17:50:38 +02:00
|
|
|
--with-gnu-ld \
|
2023-02-16 15:15:10 +01:00
|
|
|
%{?with_apparmor:--enable-apparmor} \
|
2022-11-25 12:52:03 +01:00
|
|
|
--enable-selinux
|
2010-06-28 23:24:20 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS" "CC=$CC"
|
2006-12-19 00:17:33 +01:00
|
|
|
|
2017-07-05 15:33:06 +02:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2006-12-19 00:17:33 +01:00
|
|
|
%install
|
2017-06-20 17:36:37 +02:00
|
|
|
make DESTDIR=%{buildroot} install
|
2023-01-09 11:21:59 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2017-06-20 17:36:37 +02:00
|
|
|
mkdir -p %{buildroot}/bin/
|
|
|
|
ln -sf %{_bindir}/fuser %{buildroot}/bin/
|
2020-11-20 14:11:36 +01:00
|
|
|
%endif
|
2015-05-22 09:00:37 +02:00
|
|
|
%ifnarch %have_peekfd
|
2017-06-20 17:36:37 +02:00
|
|
|
rm -f %{buildroot}%{_mandir}/man1/peekfd.1*
|
2007-04-26 18:58:12 +02:00
|
|
|
%endif
|
2006-12-19 00:17:33 +01:00
|
|
|
%find_lang psmisc
|
|
|
|
|
2012-12-18 18:20:19 +01:00
|
|
|
%files
|
2006-12-19 00:17:33 +01:00
|
|
|
%defattr (-,root,root,755)
|
2018-09-17 14:59:09 +02:00
|
|
|
%license COPYING
|
2023-01-09 11:21:59 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2006-12-19 00:17:33 +01:00
|
|
|
/bin/fuser
|
2020-11-20 14:11:36 +01:00
|
|
|
%endif
|
2021-05-21 14:18:19 +02:00
|
|
|
%{_bindir}/fuser
|
2006-12-19 00:17:33 +01:00
|
|
|
%{_bindir}/killall
|
2015-05-22 09:00:37 +02:00
|
|
|
%ifarch %have_peekfd
|
2007-04-26 15:51:55 +02:00
|
|
|
%{_bindir}/peekfd
|
2007-04-26 18:58:12 +02:00
|
|
|
%endif
|
2010-07-13 18:50:33 +02:00
|
|
|
%{_bindir}/prtstat
|
2017-06-20 17:36:37 +02:00
|
|
|
%{_bindir}/pslog
|
2006-12-19 00:17:33 +01:00
|
|
|
%{_bindir}/pstree
|
|
|
|
%{_bindir}/pstree.x11
|
|
|
|
%{_mandir}/man1/fuser.1*
|
|
|
|
%{_mandir}/man1/killall.1*
|
2015-05-22 09:00:37 +02:00
|
|
|
%ifarch %have_peekfd
|
2007-04-26 15:51:55 +02:00
|
|
|
%{_mandir}/man1/peekfd.1*
|
2007-04-26 18:58:12 +02:00
|
|
|
%endif
|
2010-07-13 18:50:33 +02:00
|
|
|
%{_mandir}/man1/prtstat.1*
|
2017-06-20 17:36:37 +02:00
|
|
|
%{_mandir}/man1/pslog.1*
|
2006-12-19 00:17:33 +01:00
|
|
|
%{_mandir}/man1/pstree.1*
|
2007-12-19 22:14:01 +01:00
|
|
|
|
2013-10-24 11:32:22 +02:00
|
|
|
%files lang -f %{name}.lang
|
2012-12-18 18:20:19 +01:00
|
|
|
|
2007-03-29 18:26:08 +02:00
|
|
|
%changelog
|