forked from eclipse-bluechi/bluechi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhirte.spec.in
227 lines (182 loc) · 6.48 KB
/
hirte.spec.in
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
Name: hirte
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: A systemd service controller for multi-nodes environments
License: GPLv2+
URL: https://github.com/containers/hirte
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: meson
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
BuildRequires: golang-github-cpuguy83-md2man
Requires: systemd
Recommends: hirte-selinux
%description
Hirte is a systemd service controller for multi-nodes environements with a
predefined number of nodes and with a focus on highly regulated environment
such as those requiring functional safety (for example in cars).
This package contains the controller and command line tool.
%post
%systemd_post hirte.service
%preun
%systemd_preun hirte.service
%postun
%systemd_postun_with_restart hirte.service
%files
%ghost %{_sysconfdir}/hirte/hirte.conf
%dir %{_sysconfdir}/hirte
%dir %{_sysconfdir}/hirte/hirte.conf.d
%doc README.md
%doc README.developer.md
%license LICENSE
%{_bindir}/hirte
%{_datadir}/dbus-1/interfaces/org.containers.hirte.Job.xml
%{_datadir}/dbus-1/interfaces/org.containers.hirte.Manager.xml
%{_datadir}/dbus-1/interfaces/org.containers.hirte.Monitor.xml
%{_datadir}/dbus-1/interfaces/org.containers.hirte.Node.xml
%{_datadir}/dbus-1/system.d/org.containers.hirte.conf
%{_datadir}/hirte/config/hirte.conf
%{_mandir}/man1/hirte.*
%{_mandir}/man5/hirte.conf.*
%{_sysconfdir}/hirte/hirte.conf.d/README.md
%{_unitdir}/hirte.service
%{_unitdir}/hirte.socket
%package agent
Summary: Hirte service controller agent
Requires: systemd
Recommends: hirte-selinux
%description agent
Hirte is a systemd service controller for multi-nodes environements with a
predefined number of nodes and with a focus on highly regulated environment
such as those requiring functional safety (for example in cars).
This package contains the node agent.
%post agent
%systemd_post hirte-agent.service
%preun agent
%systemd_preun hirte-agent.service
%postun agent
%systemd_postun_with_restart hirte-agent.service
%files agent
%ghost %{_sysconfdir}/hirte/agent.conf
%dir %{_sysconfdir}/hirte
%dir %{_sysconfdir}/hirte/agent.conf.d
%doc README.md
%license LICENSE
%{_bindir}/hirte-agent
%{_bindir}/hirte-proxy
%{_datadir}/dbus-1/system.d/org.containers.hirte.Agent.conf
%{_datadir}/hirte-agent/config/agent.conf
%{_datadir}/dbus-1/interfaces/org.containers.hirte.Agent.xml
%{_mandir}/man1/hirte-agent.*
%{_mandir}/man1/hirte-proxy.*
%{_mandir}/man5/hirte-agent.conf.*
%{_sysconfdir}/hirte/agent.conf.d/README.md
%{_unitdir}/hirte-agent.service
%{_userunitdir}/hirte-agent.service
%{_unitdir}/[email protected]
%{_userunitdir}/[email protected]
%{_unitdir}/[email protected]
%{_userunitdir}/[email protected]
%package selinux
Summary: Hirte SELinux policy
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
%if "%{_selinux_policy_version}" != ""
Requires: selinux-policy >= %{_selinux_policy_version}
%endif
Requires(post): policycoreutils
Requires(post): policycoreutils-python-utils
Requires(postun): policycoreutils-python-utils
%global selinuxtype targeted
%description selinux
SELinux policy associated with the hirte and hirte-agent daemons
%files selinux
%{_datadir}/selinux/devel/include/services/hirte.if
%{_datadir}/selinux/packages/hirte.pp.bz2
%{_mandir}/man8/hirte*selinux.*
%post selinux
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/hirte.pp.bz2
restorecon -R %{_bindir}/hirte* &> /dev/null || :
semanage port -a -t hirte_port_t -p udp 842 || true
semanage port -a -t hirte_port_t -p tcp 842 || true
%postun selinux
if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s %{selinuxtype} hirte
semanage port -d -p udp 842 || true
semanage port -d -p tcp 842 || true
restorecon -R %{_bindir}/hirte* &> /dev/null || :
fi
%package ctl
Summary: Hirte service controller command line tool
Requires: %{name} = %{version}-%{release}
%description ctl
Hirte is a systemd service controller for multi-nodes environements with a
predefined number of nodes and with a focus on highly regulated environment
such as those requiring functional safety (for example in cars).
This package contains the service controller command line tool.
%files ctl
%doc README.md
%license LICENSE
%{_bindir}/hirtectl
%{_mandir}/man1/hirtectl.*
%package -n python3-pyhirte
Summary: Python bindings for Hirte
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-dasbus
%description -n python3-pyhirte
pyhirte is a python module to access the public D-Bus API of hirte.
It contains typed python code that is auto-generated from hirte's
API description and manually written code to simplify recurring tasks.
%files -n python3-pyhirte
%license LICENSE
%doc README.md
%{python3_sitelib}/pyhirte-*.egg-info/
%{python3_sitelib}/pyhirte/
%prep
%autosetup
cp -r src/bindings/python/* ./
%build
%meson -Dapi_bus=system
%meson_build
%py3_build
%install
%meson_install
%py3_install
%check
%meson_test
%changelog
* Mon Jul 10 2023 Michael Engel <[email protected]> - 0.4.0-1
- Defaults for hirtectl monitor defaults defined and documented
- Dedicated signal is emitted when a node changes its connection state
- Added a last seen timestamp of a node as a D-Bus property
- Added new command to hirtectl to monitor node connections
- Support of FQDN in ManagerHost
- Support of IPv6 in ManagerHost
- Added hirtectl command to get the status of a unit
- Autogenerated, typed python bindings
- New rpm package for the typed python bindings of hirte's D-Bus API
- API and hirtectl commands for setting the loglevel at runtime
- Fixes in the D-Bus API description
* Wed May 31 2023 Michael Engel <[email protected]> - 0.3.0-1
- API and hirtectl commands for enabling, disabling and reloading of systemd units added
- Glob filter option to hirtectl list-units
- Collecting metrics for unit startup time
- Improvements for building hirte RPMs
- Allow hirte to run with unconfined user
- Aligned naming of hirte config files
- Fixed for invalid type cast of ProxyMonitor
- Mkdocs-based documentation added
- Wildcard support for monitoring units
* Wed May 03 2023 Michael Engel <[email protected]> - 0.2.1-1
- RPM and unit test fixes
* Tue Apr 25 2023 Michael Engel <[email protected]> - 0.2.0-1
- Heartbeat interval configurable
- Restart for hirte and hirte-agent systemd unit added
- Logging improvements
- SELinux policy added
- Defaults for node name and manager host in code
- Fix conf.d usage and memory leaks
* Tue Mar 21 2023 Martin Perina <[email protected]> - 0.1.0-1
- Initial release