-
Notifications
You must be signed in to change notification settings - Fork 4
/
io-watchdog.spec
133 lines (103 loc) · 3.61 KB
/
io-watchdog.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Name: io-watchdog
Version:
Release:
Summary: IO Watchdog for user applications.
License: GPL
Group: System Environment/Base
Source:
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bison flex slurm-devel expect
%package devel
Requires: %{name} = %{version}-%{release}
Summary: IO Watchdog client API headers and libraries
Group: Development/Libraries
%package libs
Requires: %{name} = %{version}-%{release}
Summary: IO Watchdog client API and interposer libraries
Group: Development/Libraries
%package slurm
Requires: %{name} = %{version}-%{release}
Summary: SLURM spank plugin for IO Watchdog
Group: System Environment/Base
##############################################################################
%description
io-watchdog is a facility for monitoring user applications and parallel
jobs for "hangs" which typically have a side effect of ceasing all IO
in a cyclic application (i.e. one that writes something to a log or data
file during each cycle of computation). The io-watchdog attempts to
watch all IO coming from an application and triggers a set of user-defined
actions when IO has stopped for a configurable timeout period.
%description devel
A header file and static library for compiling against the IO Watchdog
client API.
%description libs
IO Watchdog shared libraries including the interposer library used to
intercept write calls in applications, and the io-watchdog client API
used to modify and query IO watchdog parameter at runtime from within
the monitored application.
%description slurm
IO Watchdog plugin for SLURM which adds a --io-watchdog option to srun(1).
##############################################################################
%prep
%setup
##############################################################################
%build
%configure --program-prefix=%{?_program_prefix:%{_program_prefix}}
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
make check TEST_ITERATIONS=256
##############################################################################
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
DESTDIR="$RPM_BUILD_ROOT" make install
#
# Remove all module .a's as they are not needed on any known RPM platform.
rm -f $RPM_BUILD_ROOT/%{_libdir}/*/*.{a,la}
#
# Remove .la's which aren't currently required anywhere we support.
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
#
# Remove interposer .a
#
rm -f $RPM_BUILD_ROOT/%{_libdir}/io-watchdog-interposer.a
PLUGIN=$RPM_BUILD_ROOT/%{_libdir}/*/io-watchdog.so
if [ -f $PLUGIN ]; then
SLURM_LIBDIR=$RPM_BUILD_ROOT/%{_libdir}/slurm
mkdir -p $SLURM_LIBDIR
mv $PLUGIN $SLURM_LIBDIR
fi
##############################################################################
%clean
rm -rf "$RPM_BUILD_ROOT"
##############################################################################
%files
%defattr(-,root,root,0755)
%doc AUTHORS
%doc NEWS
%doc COPYING
%doc README
%doc doc/*
%{_bindir}/*
%{_mandir}/*[^3]/*
%files devel
%defattr(-,root,root,0755)
%{_includedir}/io-watchdog.h
%{_libdir}/libio-watchdog.a
%{_libdir}/libio-watchdog.so
%{_mandir}/*3/*
%files libs
%defattr(-,root,root,0755)
%{_libdir}/*.so.*
%{_libdir}/io-watchdog-interposer.so
%files slurm
%defattr(-,root,root,0755)
%{_libdir}/slurm/*.so
##############################################################################
%changelog
* Wed Nov 11 2009 Mark Grondona <mgrondona@llnl.gov>
- Separate package into devel, libs, and slurm subpackages
- Run make check in build section
* Wed May 16 2007 Mark Grondona <mgrondona@llnl.gov>
- fix %files section to avoid grabbing debug info.
* Mon Jan 8 2007 Mark Grondona <mgrondona@llnl.gov>
-Initial version.