From c9f929def04166befb1a67abf675075a9b3388f8 Mon Sep 17 00:00:00 2001 From: Kelvin Fan Date: Fri, 4 Dec 2020 15:31:56 -0500 Subject: [PATCH] 2.36.1-3: 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 --- login-default-motd-file.patch | 13 +++++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 login-default-motd-file.patch diff --git a/login-default-motd-file.patch b/login-default-motd-file.patch new file mode 100644 index 0000000..3670848 --- /dev/null +++ b/login-default-motd-file.patch @@ -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 diff --git a/util-linux.spec b/util-linux.spec index 4541839..136932b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -109,6 +109,9 @@ Patch0: login-lastlog-create.patch Patch1: libmount-remove-read-mountinfo-workaround.patch # usptream patch, https://github.com/karelzak/util-linux/issues/1193 Patch2: libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch +# Add `/run/motd.d` and `/etc/motd.d` to the hardcoded MOTD_FILE in `login` +# https://github.com/coreos/console-login-helper-messages/issues/60 +Patch3: login-default-motd-file.patch %description The util-linux package contains a large variety of low-level system @@ -941,6 +944,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Dec 4 2020 Kelvin Fan - 2.36.1-3 +- Add patch to add `/run/motd.d` and `/etc/motd.d` to default MOTD_FILE in `login(1)` + * Thu Nov 19 2020 Karel Zak - 2.36.1-2 - remove unused patches - remove versions and seq.numbers from patch names