316 lines
9.1 KiB
RPMSpec
316 lines
9.1 KiB
RPMSpec
#
|
|
# spec file for package procps
|
|
#
|
|
# Copyright (c) 2012 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%bcond_with bin2usr
|
|
%define somajor 1
|
|
%define libname libprocps%{somajor}
|
|
|
|
Name: procps
|
|
BuildRequires: automake
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: pkg-config
|
|
Url: https://gitorious.org/procps
|
|
PreReq: %fillup_prereq %insserv_prereq
|
|
Version: 3.3.5
|
|
Release: 0
|
|
Summary: The ps utilities for /proc
|
|
License: GPL-2.0+ ; LGPL-2.1+
|
|
Group: System/Monitoring
|
|
Provides: ps
|
|
Obsoletes: ps
|
|
Source: procps-v%version.tar.bz2
|
|
Source1: procps-pmap-legacy.tar.bz2
|
|
Source2: boot.sysctl
|
|
Source3: systat.xinetd
|
|
Source4: sysctl.conf
|
|
Source5: sysctl.conf.s390
|
|
Patch0: procps-v3.3.4-watch.patch
|
|
Patch1: procps-v3.3.3-ia64.diff
|
|
Patch2: procps-v3.3.4-stealtime.patch
|
|
Patch3: procps-v3.3.4-w-notruncate.diff
|
|
Patch4: procps-v3.3.4-w-simply-work.diff
|
|
Patch5: procps-v3.3.4-top.1.diff
|
|
Patch6: procps-v3.3.3-buffersize.diff
|
|
Patch7: procps-v3.3.3-readeof.patch
|
|
Patch8: procps-v3.3.3-slab.patch
|
|
Patch9: procps-v3.3.3-selinux.patch
|
|
Patch10: procps-v3.3.3-accuracy.dif
|
|
Patch11: procps-v3.3.4-xen.dif
|
|
Patch12: procps-v3.3.3-fdleak.dif
|
|
Patch13: procps-v3.3.3-columns.dif
|
|
Patch14: procps-v3.3.3-integer-overflow.patch
|
|
Patch15: procps-v3.3.4-bnc634071_procstat2.diff
|
|
Patch16: procps-v3.3.3-bnc634840.patch
|
|
Patch17: procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
|
|
Patch18: procps-v3.3.4-petabytes.patch
|
|
Patch19: procps-v3.3.4-large_pcpu.patch
|
|
Patch20: procps-v3.3.3-tinfo.dif
|
|
Patch21: procps-v3.3.3-pwdx.patch
|
|
Patch22: procps-v3.3.3-chroot.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
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.
|
|
|
|
%package devel
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
License: GPL-2.0+ ; LGPL-2.1+
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libname} = %{version}
|
|
|
|
%description devel
|
|
This package contains all necessary include files and libraries needed
|
|
to develop applications that require these.
|
|
|
|
%package -n %{libname}
|
|
Summary: The props library
|
|
License: LGPL-2.1+
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
The props library can be used to read informations out from /proc
|
|
the process information pseudo-file system,
|
|
|
|
%prep
|
|
%setup -q -n %{name}-v%{version}
|
|
%__tar --strip-components=1 -xjf %{S:1}
|
|
%patch0
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4
|
|
%patch5
|
|
%patch6
|
|
%patch7
|
|
%patch8
|
|
%patch9
|
|
%patch10
|
|
%patch11
|
|
%patch12
|
|
%patch13
|
|
%patch14
|
|
%patch15
|
|
%patch16
|
|
%patch17
|
|
%patch18
|
|
%patch19
|
|
%patch20
|
|
%patch21
|
|
%patch22
|
|
|
|
%build
|
|
sh po/update-potfiles
|
|
test -s .tarball-version || echo %{version} > .tarball-version
|
|
./autogen.sh
|
|
export NCURSESW_CFLAGS="$(ncursesw5-config --cflags)"
|
|
export NCURSESW_LIBS="$(ncursesw5-config --libs)"
|
|
export LFS_CFLAGS="$(getconf LFS_CFLAGS)"
|
|
%global optflags %{optflags} -D_GNU_SOURCE $LFS_CFLAGS -DCPU_ZEROTICS -DUSE_X_COLHDR -pipe
|
|
%configure \
|
|
--disable-static \
|
|
--disable-nls \
|
|
--disable-rpath \
|
|
--disable-kill \
|
|
--enable-watch8bit \
|
|
--enable-shared \
|
|
--enable-skill \
|
|
--enable-oomem \
|
|
--enable-w-from \
|
|
--with-pic=yes \
|
|
--with-gnu-ld
|
|
make %{?_smp_mflags}
|
|
hz="$(ps/ps aux 2>&1 | grep -E '^Unknown HZ value')" || true
|
|
test -z "$hz" || exit 1
|
|
./pmap -d $$ || {
|
|
cat /proc/$$/smaps
|
|
uname -a
|
|
exit 1
|
|
}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install
|
|
install -d %{buildroot}/etc/init.d
|
|
install -d %{buildroot}/etc/xinetd.d
|
|
install -d %{buildroot}/lib/sysctl.d
|
|
install -d %{buildroot}/etc/sysctl.d
|
|
install -d %{buildroot}/bin
|
|
install -d %{buildroot}/sbin
|
|
install -m 755 %{S:2} %{buildroot}/etc/init.d
|
|
install -m 644 %{S:3} %{buildroot}/etc/xinetd.d/systat
|
|
install -m 644 %{S:4} %{buildroot}/lib/sysctl.d/sysctl.conf
|
|
case "$RPM_ARCH" in
|
|
s390*) install -m 644 %{S:4} %{buildroot}/lib/sysctl.d/sysctl-s390.conf ;;
|
|
esac
|
|
|
|
# clean unwanted files (e.g. coreutils)
|
|
rm -f %{buildroot}/usr/bin/kill
|
|
rm -f %{buildroot}/usr/bin/uptime
|
|
rm -f %{buildroot}%{_mandir}/man1/kill.1
|
|
rm -f %{buildroot}%{_mandir}/man1/uptime.1
|
|
rm -f %{buildroot}%{_libdir}/*.la
|
|
rm -rf %{buildroot}%{_datadir}/doc/procps-ng
|
|
|
|
%if %{with bin2usr}
|
|
ln -s %{_bindir}/ps %{buildroot}/bin/
|
|
ln -s %{_bindir}/pgrep %{buildroot}/bin/
|
|
ln -s %{_bindir}/pkill %{buildroot}/bin/
|
|
ln -s %{_sbindir}/sysctl %{buildroot}/sbin/
|
|
%else
|
|
mv %{buildroot}%{_bindir}/ps %{buildroot}/bin/
|
|
mv %{buildroot}%{_bindir}/pgrep %{buildroot}/bin/
|
|
mv %{buildroot}%{_bindir}/pkill %{buildroot}/bin/
|
|
mv %{buildroot}%{_sbindir}/sysctl %{buildroot}/sbin/
|
|
ln -s /bin/ps %{buildroot}%{_bindir}/ps
|
|
ln -s /bin/pgrep %{buildroot}%{_bindir}/pgrep
|
|
ln -s /bin/pkill %{buildroot}%{_bindir}/pkill
|
|
ln -s /sbin/sysctl %{buildroot}%{_sbindir}/sysctl
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%post
|
|
%{fillup_and_insserv -ny boot.sysctl boot.sysctl}
|
|
#
|
|
test -e /etc/sysctl.conf || cat <<EOF >/etc/sysctl.conf
|
|
####
|
|
#
|
|
# /etc/sysctl.conf is meant for local sysctl settings
|
|
#
|
|
# sysctl reads settings from the following locations:
|
|
# /boot/sysctl.conf-<kernelversion>
|
|
# /lib/sysctl.d/*.conf
|
|
# /usr/lib/sysctl.conf.d/*.conf
|
|
# /usr/local/lib/sysctl.d/*.conf
|
|
# /etc/sysctl.d/*.conf
|
|
# /run/sysctl.d/*.conf
|
|
# /etc/sysctl.conf
|
|
#
|
|
# To disable or override a distribution provided file just place a
|
|
# file with the same name in /etc/sysctl.d/
|
|
#
|
|
# See sysctl.conf(5) and sysctl(8) for more information
|
|
#
|
|
####
|
|
EOF
|
|
|
|
%postun
|
|
%insserv_cleanup
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr (-,root,root,755)
|
|
%doc NEWS README COPYING Documentation/BUGS Documentation/FAQ top/README.top
|
|
%config /etc/init.d/boot.sysctl
|
|
%config(noreplace) %ghost %attr(0644,root,root) /etc/sysctl.conf
|
|
%config(noreplace) /etc/xinetd.d/systat
|
|
%if %{with bin2usr}
|
|
%verify(link) /bin/ps
|
|
%verify(link) /bin/pgrep
|
|
%verify(link) /bin/pkill
|
|
%verify(link) /sbin/sysctl
|
|
%{_bindir}/ps
|
|
%{_bindir}/pgrep
|
|
%{_bindir}/pkill
|
|
%{_sbindir}/sysctl
|
|
%else
|
|
/bin/ps
|
|
/bin/pgrep
|
|
/bin/pkill
|
|
/sbin/sysctl
|
|
%verify(link) %{_bindir}/ps
|
|
%verify(link) %{_bindir}/pgrep
|
|
%verify(link) %{_bindir}/pkill
|
|
%verify(link) %{_sbindir}/sysctl
|
|
%endif
|
|
%{_bindir}/free
|
|
%{_bindir}/pmap
|
|
%{_bindir}/pwdx
|
|
%{_bindir}/skill
|
|
%{_bindir}/slabtop
|
|
%{_bindir}/snice
|
|
%{_bindir}/tload
|
|
%{_bindir}/top
|
|
%{_bindir}/vmstat
|
|
%{_bindir}/w
|
|
%{_bindir}/watch
|
|
%dir /etc/sysctl.d
|
|
%dir /lib/sysctl.d
|
|
/lib/sysctl.d/*.conf
|
|
%_mandir/man1/free.1.gz
|
|
%_mandir/man1/pgrep.1.gz
|
|
%_mandir/man1/pkill.1.gz
|
|
%_mandir/man1/pmap.1.gz
|
|
%_mandir/man1/ps.1.gz
|
|
%_mandir/man1/pwdx.1.gz
|
|
%_mandir/man1/skill.1.gz
|
|
%_mandir/man1/slabtop.1.gz
|
|
%_mandir/man1/snice.1.gz
|
|
%_mandir/man1/tload.1.gz
|
|
%_mandir/man1/top.1.gz
|
|
%_mandir/man1/w.1.gz
|
|
%_mandir/man1/watch.1.gz
|
|
%_mandir/man5/sysctl.conf.5.gz
|
|
%_mandir/man8/vmstat.8.gz
|
|
%_mandir/man8/sysctl.8.gz
|
|
|
|
%files devel
|
|
%defattr (-,root,root,755)
|
|
%dir %{_includedir}/proc
|
|
%{_includedir}/proc/alloc.h
|
|
%{_includedir}/proc/devname.h
|
|
%{_includedir}/proc/escape.h
|
|
%{_includedir}/proc/procps.h
|
|
%{_includedir}/proc/pwcache.h
|
|
%{_includedir}/proc/readproc.h
|
|
%{_includedir}/proc/sig.h
|
|
%{_includedir}/proc/slab.h
|
|
%{_includedir}/proc/sysinfo.h
|
|
%{_includedir}/proc/version.h
|
|
%{_includedir}/proc/wchan.h
|
|
%{_includedir}/proc/whattime.h
|
|
%{_libdir}/libprocps.so
|
|
%{_libdir}/pkgconfig/libprocps.pc
|
|
|
|
%files -n %{libname}
|
|
%defattr (-,root,root,755)
|
|
%{_libdir}/libprocps.so.1
|
|
%{_libdir}/libprocps.so.1.0.0
|
|
|
|
%changelog
|