diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-28 10:09:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-03 18:01:29 +0000 |
commit | 44f2059a93f1af2e749b26705ec90b47b1cea45d (patch) | |
tree | 7ef4d453ef0ecf46d824c3d8ca0223e9d59f891f | |
parent | 44139c8c69f66400f94a449104a83c10a3935b94 (diff) | |
download | poky-44f2059a93f1af2e749b26705ec90b47b1cea45d.tar.gz |
shadow-native: Disable syslog usage
Spamming the build host's syslog with useradd information during image creation
isn't great. Add a patch to disable that.
It may be possible to convince upstream to make it a configure option but for
now the patch is trivial and reduces host impact to the logs.
(From OE-Core rev: a52572886e60e4aff9d54b57bf45a301e1dec1ee)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/shadow/files/disable_syslog.patch | 22 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow_4.17.2.bb | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/files/disable_syslog.patch b/meta/recipes-extended/shadow/files/disable_syslog.patch new file mode 100644 index 0000000000..7299a8e61c --- /dev/null +++ b/meta/recipes-extended/shadow/files/disable_syslog.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | When building images using shadow-native, we shouldn't be spamming the host's | ||
2 | log with lots of syslog messages which aren't relavent. Disable syslog use | ||
3 | in the native case. | ||
4 | |||
5 | Upstream-Status: Inappropriate [Would upstream accept a configure option?] | ||
6 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
7 | |||
8 | Index: shadow-4.17.2/lib/defines.h | ||
9 | =================================================================== | ||
10 | --- shadow-4.17.2.orig/lib/defines.h | ||
11 | +++ shadow-4.17.2/lib/defines.h | ||
12 | @@ -88,7 +88,9 @@ | ||
13 | |||
14 | /* cleaner than lots of #ifdefs everywhere - use this as follows: | ||
15 | SYSLOG((LOG_CRIT, "user %s cracked root", user)); */ | ||
16 | -#ifdef ENABLE_NLS | ||
17 | +#if 1 | ||
18 | +#define SYSLOG(x) | ||
19 | +#elif ENABLE_NLS | ||
20 | /* Temporarily set LC_TIME to "C" to avoid strange dates in syslog. | ||
21 | This is a workaround for a more general syslog(d) design problem - | ||
22 | syslogd should log the current system time for each event, and not | ||
diff --git a/meta/recipes-extended/shadow/shadow_4.17.2.bb b/meta/recipes-extended/shadow/shadow_4.17.2.bb index 5459d4e57f..19512f2594 100644 --- a/meta/recipes-extended/shadow/shadow_4.17.2.bb +++ b/meta/recipes-extended/shadow/shadow_4.17.2.bb | |||
@@ -23,6 +23,7 @@ SRC_URI:append:class-target = " \ | |||
23 | 23 | ||
24 | SRC_URI:append:class-native = " \ | 24 | SRC_URI:append:class-native = " \ |
25 | file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ | 25 | file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ |
26 | file://disable_syslog.patch \ | ||
26 | " | 27 | " |
27 | SRC_URI[sha256sum] = "064a7c048e613ef5b5f3613e137d79d35d062ab434e89020f743e90844ec5c4f" | 28 | SRC_URI[sha256sum] = "064a7c048e613ef5b5f3613e137d79d35d062ab434e89020f743e90844ec5c4f" |
28 | UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" | 29 | UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" |