3
3
%global build_timestamp %(date +"%Y %m %d %H %M %%S ")
4
4
5
5
Name: greenboot
6
- Version: 0.4
7
- Release: 2 %{?dist }
6
+ Version: 0.5
7
+ Release: 1 %{?dist }
8
8
Summary: Generic Health Check Framework for systemd
9
9
License: LGPLv2+
10
10
URL: https://github.com/%{github_owner }/%{github_project }
@@ -57,42 +57,49 @@ Requires: %{name} = %{version}-%{release}
57
57
58
58
%install
59
59
install -Dpm 0755 usr/libexec/greenboot/greenboot.sh %{buildroot }%{_libexecdir }/%{name }/%{name }.sh
60
+ install -Dpm 0755 usr/libexec/greenboot/greenboot_motdgen.sh %{buildroot }%{_libexecdir }/%{name }/%{name }_motdgen.sh
60
61
install -Dpm 0644 usr/lib/systemd/system/greenboot.target %{buildroot }%{_unitdir }/greenboot.target
61
62
install -Dpm 0644 usr/lib/systemd/system/greenboot-healthcheck.service %{buildroot }%{_unitdir }/greenboot-healthcheck.service
62
63
install -Dpm 0644 usr/lib/systemd/system/greenboot.service %{buildroot }%{_unitdir }/greenboot.service
63
64
install -Dpm 0644 usr/lib/systemd/system/redboot.service %{buildroot }%{_unitdir }/redboot.service
64
- mkdir -p %{buildroot }/run/%{name }
65
- mkdir -p %{buildroot }%{_sysconfdir }/motd.d
65
+ install -Dpm 0644 usr/lib/systemd/system/greenboot-motdgen.service %{buildroot }%{_unitdir }/greenboot-motdgen.service
66
66
mkdir -p %{buildroot }%{_sysconfdir }/%{name }/check/required.d
67
67
mkdir %{buildroot }%{_sysconfdir }/%{name }/check/wanted.d
68
68
mkdir %{buildroot }%{_sysconfdir }/%{name }/green.d
69
69
mkdir %{buildroot }%{_sysconfdir }/%{name }/red.d
70
- mkdir %{buildroot }%{_sysconfdir }/%{name }/motd
71
70
install -Dpm 0755 etc/greenboot/check/required.d/* %{buildroot }%{_sysconfdir }/%{name }/check/required.d
72
71
install -Dpm 0755 etc/greenboot/check/wanted.d/* %{buildroot }%{_sysconfdir }/%{name }/check/wanted.d
73
72
install -Dpm 0755 etc/greenboot/green.d/* %{buildroot }%{_sysconfdir }/%{name }/green.d
74
73
install -Dpm 0755 etc/greenboot/red.d/* %{buildroot }%{_sysconfdir }/%{name }/red.d
75
- install -Dpm 0644 etc/greenboot/motd/* %{buildroot }%{_sysconfdir }/%{name }/motd
76
- ln -snf /run/greenboot/motd %{buildroot }%{_sysconfdir }/motd.d/%{name }
74
+ install -Dpm 0644 etc/greenboot/motd %{buildroot }%{_sysconfdir }/%{name }/motd
77
75
78
76
%post
79
77
%systemd_post greenboot.target
80
78
%systemd_post greenboot.service
81
79
%systemd_post greenboot-healthcheck.service
82
80
%systemd_post redboot.service
83
81
82
+ %post motd
83
+ %systemd_post greenboot-motdgen.service
84
+
84
85
%preun
85
86
%systemd_preun greenboot.target
86
87
%systemd_preun greenboot.service
87
88
%systemd_preun greenboot-healthcheck.service
88
89
%systemd_preun redboot.service
89
90
91
+ %preun motd
92
+ %systemd_preun greenboot-motdgen.service
93
+
90
94
%postun
91
95
%systemd_postun_with_restart greenboot.target
92
96
%systemd_postun_with_restart greenboot.service
93
97
%systemd_postun_with_restart greenboot-healthcheck.service
94
98
%systemd_postun_with_restart redboot.service
95
99
100
+ %postun motd
101
+ %systemd_postun greenboot-motdgen.service
102
+
96
103
%check
97
104
# TODO
98
105
@@ -112,16 +119,12 @@ ln -snf /run/greenboot/motd %{buildroot}%{_sysconfdir}/motd.d/%{name}
112
119
%dir %{_sysconfdir }/%{name }/check/wanted.d
113
120
%{_sysconfdir }/%{name }/check/wanted.d/00_wanted_scripts_start.sh
114
121
%dir %{_sysconfdir }/%{name }/green.d
115
- %{_sysconfdir }/%{name }/green.d/00_greenboot_notification.sh
116
122
%dir %{_sysconfdir }/%{name }/red.d
117
- %{_sysconfdir }/%{name }/red.d/00_redboot_notification.sh
118
123
119
124
%files motd
120
- %dir /run/%{name }
121
- %config(noreplace) %{_sysconfdir }/motd.d/%{name }
122
- %config %{_sysconfdir }/%{name }/motd/
123
- %{_sysconfdir }/%{name }/green.d/50_greenboot_motd.sh
124
- %{_sysconfdir }/%{name }/red.d/50_redboot_motd.sh
125
+ %config %{_sysconfdir }/%{name }/motd
126
+ %{_libexecdir }/%{name }/%{name }_motdgen.sh
127
+ %{_unitdir }/greenboot-motdgen.service
125
128
126
129
%files ostree-grub2
127
130
%{_sysconfdir }/%{name }/green.d/01_ostree_grub2_fallback.sh
0 commit comments