File procps.spec of Package procps

# spec file for package procps (Version 3.2.8)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

# norootforbuild

Name:           procps
BuildRequires:  ncurses-devel
BuildRequires:  libselinux-devel
License:        GPLv2+ ; LGPLv2.1+
Group:          System/Monitoring
PreReq:         %fillup_prereq %insserv_prereq
AutoReqProv:    on
Version:        3.2.8
Release:        23
Summary:        ps utilities for /proc
Provides:       ps
Obsoletes:      ps
Source1:        boot.sysctl
Source2:        systat.xinetd
Source3:        sysctl.conf
Source4:        sysctl.conf.s390
Patch:          procps-3.2.3-make.diff
Patch1:         procps-3.2.2-100cpus.diff
Patch2:         procps-3.2.5-eof.diff
Patch3:         procps-3.2.2-ia64.diff
Patch4:         procps-3.2.7-stealtime.patch
Patch6:         procps-3.2.8-manycpus.diff
Patch7:         procps-3.2.2-w-notruncate.diff
Patch8:         procps-3.2.2-w-simply-work.diff
Patch9:         procps-3.2.7-top.1.diff
Patch10:        procps-3.2.2-top-termsize.patch
Patch11:        procps-3.2.8-buffersize.diff
Patch12:        pwdx-bufferoverflow.diff
Patch13:        procps-3.2.8-pmap-smaps-rml-2.patch
Patch15:        procps-3.2.5-top-rc.patch
Patch16:        procps-3.2.7-cpu_hotplug.patch
Patch17:        procps-3.2.5-CPU-states.patch
Patch18:        procps-3.2.7-readeof.patch
Patch19:        procps-3.2.7-btime-from-proc-stat.patch
Patch20:        procps-3.2.8-glibc-2.6.1.dif
Patch21:        procps-3.2.8-slab.patch
Patch22:        procps-3.2.7-selinux.patch
Patch23:        procps-3.2.7-accuracy.dif
Patch24:        procps-3.2.8-toosmall.dif
Patch25:        procps-3.2.7-cgroups_flag.diff
Patch26:        procps-3.2.8-pgrep_coption.dif
Patch27:        procps-3.2.7-terabyte.dif
Patch28:        procps-3.2.6-xen.dif
Patch29:        procps-3.2.8-fdleak.dif
Patch30:        procps-3.2.8-sysctlerr.dif
Patch31:        procps-3.2.8-columns.dif
Patch32:        procps-3.2.7-oom.diff
Patch33:        procps-3.2.8-integer-overflow.patch
Patch34:        bug-634071_procstat2.diff
Patch35:        bug-634840.patch
Patch36:        procps-3.2.8.dif
# bnc #649501, apparently the initialization is depending on linking order...
Patch37:        procps-3.2.8-fix-unknown-HZ.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The procps package contains a set of system utilities that provide
system information. Procps includes ps, free, skill, snice, tload, top,
uptime, vmstat, w, and watch. The ps command displays a snapshot of
running processes. The top command provides a repetitive update of the
statuses of running processes. The free command displays the amounts of
free and used memory on your system. The skill command sends a
terminate command (or another specified signal) to a specified set of
processes. The snice command is used to change the scheduling priority
of specified processes. The tload command prints a graph of the current
system load average to a specified tty. The uptime command displays the
current time, how long the system has been running, how many users are
logged on, and system load averages for the past one, five, and fifteen
minutes. The w command displays a list of the users who are currently
logged on and what they are running. The watch program watches a
running program. The vmstat command displays virtual memory statistics
about processes, memory, paging, block I/O, traps, and CPU activity.

    Albert Cahalan <>
    (and many more)

%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p0
%patch6 -p0
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p0
%patch12 -p1
%patch13 -p0
%patch15 -p1
%patch16 -p1
%patch19 -p1
%patch21 -p0
%patch25 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch37 -p1

make %{?_smp_mflags} CFLAGS="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -pipe" \
hz="$(ps/ps aux 2>&1 | grep -E '^Unknown HZ value')" || true
test -z "$hz" || exit 1

install -d $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/xinetd.d
install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/xinetd.d/systat
case "$RPM_ARCH" in
s390*)  install -m 644 %SOURCE4 $RPM_BUILD_ROOT/etc/sysctl.conf ;;
*)      install -m 644 %SOURCE3 $RPM_BUILD_ROOT/etc/sysctl.conf ;;
# clean unwanted files (coreutils)
rm -f $RPM_BUILD_ROOT/bin/kill
rm -f $RPM_BUILD_ROOT/usr/bin/uptime
rm -f $RPM_BUILD_ROOT%_mandir/man1/kill.1
rm -f $RPM_BUILD_ROOT%_mandir/man1/uptime.1
mv $RPM_BUILD_ROOT/usr/bin/{pgrep,pkill} $RPM_BUILD_ROOT/bin/
ln -s /bin/pgrep $RPM_BUILD_ROOT/usr/bin/pgrep
ln -s /bin/pkill $RPM_BUILD_ROOT/usr/bin/pkill


%{fillup_and_insserv -ny boot.sysctl boot.sysctl}


%defattr (-,root,root,755)
%config /etc/init.d/boot.sysctl
%config(noreplace) /etc/sysctl.conf
%config(noreplace) /etc/xinetd.d/systat

openSUSE Build Service is sponsored by