-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspausedd.spec
151 lines (120 loc) · 3.59 KB
/
spausedd.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
%bcond_with systemd
%bcond_with vmguestlib
Name: spausedd
Summary: Utility to detect and log scheduler pause
Version: 20210719
Release: 1%{?dist}
License: ISC
URL: https://github.com/jfriesse/spausedd
Source0: https://github.com/jfriesse/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
# VMGuestLib exists only for x86 architectures
%if %{with vmguestlib}
%ifarch %{ix86} x86_64
%global use_vmguestlib 1
%endif
%endif
BuildRequires: gcc
%if %{with systemd}
%{?systemd_requires}
BuildRequires: systemd
%else
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
%endif
%if %{defined use_vmguestlib}
BuildRequires: pkgconfig(vmguestlib)
%endif
%description
Utility to detect and log scheduler pause
%prep
%setup -q -n %{name}-%{version}
%build
%set_build_flags
make \
%if %{defined use_vmguestlib}
WITH_VMGUESTLIB=1 \
%else
WITH_VMGUESTLIB=0 \
%endif
%{?_smp_mflags}
%install
make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" install
%if %{with systemd}
mkdir -p %{buildroot}/%{_unitdir}
install -m 644 -p init/%{name}.service %{buildroot}/%{_unitdir}
%else
mkdir -p %{buildroot}/%{_initrddir}
install -m 755 -p init/%{name} %{buildroot}/%{_initrddir}
%endif
%clean
%files
%doc AUTHORS
%license COPYING
%{_bindir}/%{name}
%{_mandir}/man8/*
%if %{with systemd}
%{_unitdir}/spausedd.service
%else
%{_initrddir}/spausedd
%endif
%post
%if %{with systemd} && 0%{?systemd_post:1}
%systemd_post spausedd.service
%else
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add spausedd || :
fi
%endif
%preun
%if %{with systemd} && 0%{?systemd_preun:1}
%systemd_preun spausedd.service
%else
if [ $1 -eq 0 ]; then
/sbin/service spausedd stop &>/dev/null || :
/sbin/chkconfig --del spausedd || :
fi
%endif
%postun
%if %{with systemd} && 0%{?systemd_postun:1}
%systemd_postun spausedd.service
%endif
%changelog
* Mon Jul 19 2021 Jan Friesse <[email protected]> - 20210719-1
- Add mode option for moving to root cgroup functionality
* Thu May 20 2021 Jan Friesse <[email protected]> - 20210520-1
- Document cgroup v2 problems
* Tue May 11 2021 Jan Friesse <[email protected]> - 20210511-1
- Support for cgroup v2
* Fri Mar 26 2021 Jan Friesse <[email protected]> - 20210326-1
- Fix possible memory leak
- Check memlock rlimit
* Thu Nov 12 2020 Jan Friesse <[email protected]> - 20201112-1
- Add ability to move process into root cgroup
* Tue Nov 10 2020 Jan Friesse <[email protected]> - 20201110-1
- Fix log_perror
* Mon Mar 23 2020 Jan Friesse <[email protected]> - 20200323-1
- Fix man page
* Wed Aug 07 2019 Jan Friesse <[email protected]> - 20190807-1
- Enhance makefile
* Tue Aug 06 2019 Jan Friesse <[email protected]> - 20190320-2
- Do not set exec permission for service file
* Wed Mar 20 2019 Jan Friesse <[email protected]> - 20190320-1
- Use license macro in spec file
* Tue Mar 19 2019 Jan Friesse <[email protected]> - 20190319-1
- Add AUTHORS and COPYING
- Fix version number in specfile
- Use install -p to preserve timestamps
- Use set_build_flags macro
* Mon Mar 18 2019 Jan Friesse <[email protected]> - 20190318-1
- Require VMGuestLib only on x86 and x86_64
* Wed Mar 21 2018 Jan Friesse <[email protected]> - 20180321-1
- Remove exlusivearch for VMGuestLib.
- Add copr branch with enhanced spec file which tries to automatically
detect what build options should be used (systemd/vmguestlib).
* Tue Mar 20 2018 Jan Friesse <[email protected]> - 20180320-1
- Add support for VMGuestLib
- Add more examples
* Mon Feb 19 2018 Jan Friesse <[email protected]> - 20180219-1
- Add support for steal time
* Fri Feb 9 2018 Jan Friesse <[email protected]> - 20180209-1
- Initial version