2.36-4: Add patch to add `/run/motd.d` to default MOTD_FILE in `login(1)`

`console-login-helper-messages` (used by Fedora CoreOS and others) would
like `/run/motd.d` to be a directory that login(1) reads from for MOTDs.
There is no elegant way for FCOS to edit the `login.defs` config file
so it would be nice if `/run/motd.d` were a default.

xref: https://github.com/coreos/console-login-helper-messages/issues/60
This commit is contained in:
Kelvin Fan 2020-12-03 11:14:51 -05:00
parent 072774b4ff
commit 170317f5f5
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/include/pathnames.h b/include/pathnames.h
index 3845d4c33..fac3a0783 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -41,7 +41,7 @@
#ifndef _PATH_MAILDIR
# define _PATH_MAILDIR "/var/spool/mail"
#endif
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
#ifndef _PATH_NOLOGIN
# define _PATH_NOLOGIN "/etc/nologin"
#endif

View File

@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux
Version: 2.36
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
URL: http://en.wikipedia.org/wiki/Util-linux
@ -103,6 +103,9 @@ Requires: libfdisk = %{version}-%{release}
Patch0: 2.36-login-lastlog-create.patch
# 1860461 - sfdisk regression creating simple 3 partition MBR disk
Patch1: 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch
# Add `/run/motd.d` to the hardcoded MOTD_FILE
# https://github.com/coreos/console-login-helper-messages/issues/60
Patch2: login-default-motd-file.patch
%description
The util-linux package contains a large variety of low-level system
@ -935,6 +938,9 @@ fi
%{_libdir}/python*/site-packages/libmount/
%changelog
* Thu Dec 3 2020 Kelvin Fan <kfan@redhat.com> - 2.36-4
- Add patch to add `/run/motd.d` to default MOTD_FILE in `login(1)`
* Thu Aug 27 2020 Karel Zak <kzak@redhat.com> - 2.36-3
- fix #1860461 - sfdisk regression creating simple 3 partition MBR disk