-
Notifications
You must be signed in to change notification settings - Fork 1
/
ftrace.spec
89 lines (63 loc) · 2.11 KB
/
ftrace.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
Name: ftrace
Version: 0.6
Release: 1%{?dist}
Summary: Script to dynamically enable/disable kernel ftrace
Group: System Environment/Base
License: GPLv3+
URL: https://github.com/jumanjiman/ftrace
Source0: %{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
Requires: initscripts
Requires: chkconfig
Requires: util-linux
Requires: grep
%description
Provides a SysV-style init script to enable or disable
the kernel's ftrace feature dynamically and apply settings
based on a config file.
%prep
%setup -q
%build
# nothing to build
%install
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/rc.d/init.d
%{__install} -pm 755 src/ftrace %{buildroot}/%{_sysconfdir}/rc.d/init.d
%{__install} -pm 644 src/ftrace.conf %{buildroot}/%{_sysconfdir}
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING.GPLv3
%doc README
%config(noreplace) %{_sysconfdir}/ftrace.conf
%{_sysconfdir}/rc.d/init.d/ftrace
%preun
if [ $1 -eq 0 ]; then
service ftrace stop || :
chkconfig --del ftrace &> /dev/null || :
fi
%post
if [ $1 -gt 0 ]; then
chkconfig --add ftrace &> /dev/null || :
fi
%changelog
* Thu Feb 24 2011 Paul Morgan <[email protected]> 0.6-1
- better stop function for init script ([email protected])
- populate /etc/rc*.d appropriately at install-time ([email protected])
* Mon Jan 31 2011 Paul Morgan <[email protected]> 0.5-1
- add init script conventions per LSB 3.2
- exit code of init script complies with LSB 3.1.1
- by default, start as late as possible
* Fri Jan 28 2011 Mike Sciabica <[email protected]> 0.4-1
- change boot sequence to run after openibd ([email protected])
- extend README with info from kernelnewbies.org ([email protected])
- bump release ([email protected])
- never fail on preun ([email protected])
* Wed Jan 26 2011 Paul Morgan <[email protected]> 0.3-1
- gracefully handle failure on kernel-xen
* Wed Jan 26 2011 Paul Morgan <[email protected]> 0.2-1
- alternate method to check if debugfs is mounted
* Wed Jan 26 2011 Paul Morgan <[email protected]> 0.1-1
- initial packaging