summaryrefslogtreecommitdiff
path: root/console-login-helper-messages.spec
blob: c69985fd7b89e21bc9f80f020e078e189d5c8180 (plain)
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
%global github_owner    coreos
%global github_project  console-login-helper-messages

Name:           console-login-helper-messages
Version:        0.21.3
Release:        1%{?dist}
Summary:        Combines motd, issue, profile features to show system information to the user before/on login
License:        BSD
URL:            https://github.com/%{github_owner}/%{github_project}
Source0:        https://github.com/%{github_owner}/%{github_project}/archive/v%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  systemd make
%{?systemd_requires}
Requires:       bash systemd

%description
%{summary}.

%package motdgen
Summary:        Message of the day generator script showing system information
Requires:       console-login-helper-messages
# sshd reads /run/motd.d, where the generated MOTD message is written.
Recommends:     openssh
# bash: bash scripts are included in this package
# systemd: systemd service units, and querying for failed units
# (the above applies to the issuegen and profile subpackages too)
Requires:       bash systemd
# setup: filesystem paths need setting up.
#   * https://pagure.io/setup/pull-request/14
#   * https://pagure.io/setup/pull-request/15
#   * https://pagure.io/setup/pull-request/16
# Make exception for fc29 - soft requires as we will create /run/motd.d
# ourselves if it doesn't already exist.
%if 0%{?fc29}
Requires:       setup
%else
Requires:       setup >= 2.12.7-1
%endif
# pam: to display motds in /run/motd.d.
#   * https://github.com/linux-pam/linux-pam/issues/47
#   * https://github.com/linux-pam/linux-pam/pull/69
#   * https://github.com/linux-pam/linux-pam/pull/76
Requires:       ((pam >= 1.3.1-15) if openssh)
# selinux-policy: to apply pam_var_run_t contexts:
#   * https://github.com/fedora-selinux/selinux-policy/pull/244
# Make exception for fc29, as PAM will create the tmpfiles. (In Fedora 30 and
# above, setup is responsible for this).
%if 0%{?fc29}
Requires:       ((selinux-policy >= 3.14.2-50) if openssh)
%else
Requires:       ((selinux-policy >= 3.14.3-23) if openssh)
%endif
# Needed to display MOTDs in `/run/motd.d` before upon login through 
# the serial console.
Requires:       util-linux >= 2.36-1

%description motdgen
%{summary}.

%package issuegen
Summary:        Issue generator scripts showing SSH keys and IP address
Requires:       console-login-helper-messages
Requires:       bash systemd setup
# NetworkManager: for displaying IP info using NetworkManager dispatcher script
Requires:       (NetworkManager)
Requires:       /etc/issue.d
# Needed to display issues in /etc/issue.d before login through the serial console.
Requires:       util-linux >= 2.36-1

%description issuegen
%{summary}.

%package profile
Summary:        Profile script showing systemd failed units
Requires:       console-login-helper-messages
Requires:       bash systemd setup

%description profile
%{summary}.

%prep
%setup -q

%build

%install
make install DESTDIR=%{buildroot}

%post issuegen
%systemd_post %{name}-gensnippet-ssh-keys.service

%preun issuegen
%systemd_preun %{name}-gensnippet-ssh-keys.service

%postun issuegen
%systemd_postun_with_restart %{name}-gensnippet-ssh-keys.service

%post motdgen
%systemd_post %{name}-gensnippet-os-release.service

%preun motdgen
%systemd_preun %{name}-gensnippet-os-release.service

%postun motdgen
%systemd_postun_with_restart %{name}-gensnippet-os-release.service

# TODO: %check

%files
%doc README.md
%doc doc/manual.md
%license LICENSE
%dir %{_libexecdir}/%{name}
%dir %{_prefix}/lib/%{name}
%dir %{_prefix}/share/%{name}
%{_prefix}/lib/%{name}/libutil.sh
%{_tmpfilesdir}/%{name}.conf

%files issuegen
%{_unitdir}/%{name}-gensnippet-ssh-keys.service
%{_sysconfdir}/NetworkManager/dispatcher.d/90-%{name}-gensnippet_if
%{_prefix}/lib/%{name}/issue.defs
%{_tmpfilesdir}/%{name}-issuegen.conf
%{_libexecdir}/%{name}/gensnippet_ssh_keys
%{_libexecdir}/%{name}/gensnippet_if
%{_libexecdir}/%{name}/gensnippet_if_udev

%files motdgen
%{_unitdir}/%{name}-gensnippet-os-release.service
%{_prefix}/lib/%{name}/motd.defs
%{_tmpfilesdir}/%{name}-motdgen.conf
%{_libexecdir}/%{name}/gensnippet_os_release

%files profile
%{_prefix}/share/%{name}/profile.sh
%{_tmpfilesdir}/%{name}-profile.conf
%ghost %{_sysconfdir}/profile.d/%{name}-profile.sh

%changelog
* Mon Aug 01 2022 Aashish Radhakrishnan <aaradhak@redhat.com> - 0.21.3-1
- Update to 0.21.3

* Thu Jul 29 2021 Kelvin Fan <kfan@redhat.com> - 0.21.2-3
- Remove requirement for `fedora-release` and require `/etc/issue.d`

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Mar 30 2021 Kelvin Fan <kfan@redhat.com> - 0.21.2-1
- Update to 0.21.2

* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.21.1-3
- Rebuilt for updated systemd-rpm-macros
  See https://pagure.io/fesco/issue/2583.

* Thu Feb 18 2021 Kelvin Fan <kfan@redhat.com> - 0.21.1-2
- Make scripts subpackage-specific, addresses #1929844

* Fri Feb 5 2021 Kelvin Fan <kfan@redhat.com> - 0.21.1-1
- Update to 0.21.1

* Thu Feb 4 2021 Kelvin Fan <kfan@redhat.com> - 0.21-1
- Update to 0.21
- Require util-linux >= 2.36-1
- Remove files related to the issuegen and motdgen executables

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Mon Nov 23 2020 Kelvin Fan <kfan@redhat.com> - 0.20.3-1
- Update to 0.20.3

* Fri Oct 30 2020 Kelvin Fan <kfan@redhat.com> - 0.20.2-1
- Update to 0.20.2

* Fri Oct 2 2020 Kelvin Fan <kfan@redhat.com> - 0.20.1-1
- Update to 0.20.1

* Fri Sep 25 2020 Kelvin Fan <kfan@redhat.com> - 0.2-1
- Update to 0.2
- Add presets for `.service` units
- %ghost symlinks defined in tmpfiles.d directory

* Fri Sep 18 2020 Kelvin Fan <kfan@redhat.com> - 0.19-2
- BuildRequire `make`
- Remove preinstall scripts

* Tue Sep 08 2020 Kelvin Fan <kfan@redhat.com> - 0.19-1
- Update to 0.19
- Invoke make install
- Remove -motdgen.service, -issuegen.service presets
- Require NetworkManager or systemd-udev

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jul 06 2020 Robert Fairley <rfairley@redhat.com> - 0.18.2-1
- Update to 0.18.2

* Thu Apr 30 2020 Robert Fairley <rfairley@redhat.com> - 0.18.1-1
- Update to 0.18.1

* Tue Apr 28 2020 Robert Fairley <rfairley@redhat.com> - 0.18-1
- Update to 0.18
- Change github_owner to coreos

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Fri Aug 16 2019 Robert Fairley <rfairley@redhat.com> - 0.17-1
- Update to 0.17
- Add manual.md to package docs
- Use tmpfiles_create_pkg macro

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Jun 21 2019 Robert Fairley <rfairley@redhat.com> - 0.16-3
- Specfile tidyups (comments, formatting), and remove fc28 conditionals

* Fri Mar 22 2019 Robert Fairley <rfairley@redhat.com> - 0.16-2
- Add condition for f28 setup Requires

* Thu Mar 21 2019 Robert Fairley <rfairley@redhat.com> - 0.16-1
- relax setup dependency for f29
- general upstream source/tidiness improvements
- house executable scripts in /usr/libexec
- change Source0 to use GitHub-generated archive link
- drop .path units for motdgen and issuegen

* Fri Mar 15 2019 Robert Fairley <rfairley@redhat.com> - 0.15-1
- make motdgen generate motd in /run with no symlink

* Fri Mar 15 2019 Robert Fairley <rfairley@redhat.com> - 0.14-1
- issuegen.service: rely on sshd-keygen.target
- issuegen: don't show kernel version

* Thu Jan 24 2019 Robert Fairley <rfairley@redhat.com> - 0.13-4
- update reviewers.md and manual.md with correct paths

* Wed Jan 23 2019 Robert Fairley <rfairley@redhat.com> - 0.13-3
- change generated issue to be scoped in private directory

* Wed Jan 23 2019 Robert Fairley <rfairley@redhat.com> - 0.13-2
- change generated motd to be scoped in private directory

* Wed Jan 23 2019 Robert Fairley <rfairley@redhat.com> - 0.13-1
- add a symlink for motdgen (quick solution until upstream pam_motd.so changes propagate)

* Fri Jan 18 2019 Robert Fairley <rfairley@redhat.com> - 0.12-2
- fix Requires for selinux-policy, add missing Requires for systemd-udev and fedora-release

* Wed Jan 16 2019 Robert Fairley <rfairley@redhat.com> - 0.12-1
- fix specfile Source0 to correct github URL

* Wed Jan 16 2019 Robert Fairley <rfairley@redhat.com> - 0.11-1
- add reviewers.md, specfile fixes

* Wed Jan 16 2019 Robert Fairley <rfairley@redhat.com> - 0.1-12
- add move README.md sections out into a manual, update specfile

* Wed Jan 09 2019 Robert Fairley <rfairley@redhat.com> - 0.1-11
- specfile cleanup, go through git commit history to write changelog

* Wed Jan 09 2019 Robert Fairley <rfairley@redhat.com> - 0.1-10
- Add license, tidyups

* Mon Dec 10 2018 Robert Fairley <rfairley@redhat.com> - 0.1-9
- Add tmpfiles_create_package usage to reproduce coredump

* Mon Dec 10 2018 Robert Fairley <rfairley@redhat.com> - 0.1-8
- Remove tmpfiles_create_package usage

* Mon Dec 10 2018 Robert Fairley <rfairley@redhat.com> - 0.1-7
- Fix usage of tmpfiles_create_package macro in specfile

* Fri Dec 07 2018 Robert Fairley <rfairley@redhat.com> - 0.1-6
- Fix tmpfile symlink paths

* Fri Dec 07 2018 Robert Fairley <rfairley@redhat.com> - 0.1-5
- Add [systemd] label to failed units message in profile script

* Tue Dec 04 2018 Robert Fairley <rfairley@redhat.com> - 0.1-4
- Minor formatting edits to generated issue and motd

* Tue Dec 04 2018 Robert Fairley <rfairley@redhat.com> - 0.1-3
- Remove printing package manager info (rpm-ostree, dnf)

* Tue Dec 04 2018 Robert Fairley <rfairley@redhat.com> - 0.1-2
- Add CI with copr
- Drop requirement on specifc SELinux version
- Various tidyups including filenames

* Tue Sep 25 2018 Robert Fairley <rfairley@redhat.com> - 0.1-1
- Initial Package