From 84a0ce2c2e74177eddc7459be792cb84f71b3131 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 12 2016 07:36:16 +0000 Subject: import systemd-219-19.el7_2.9 --- diff --git a/SOURCES/0274-Revert-journald-turn-ForwardToSyslog-off-by-default.patch b/SOURCES/0274-Revert-journald-turn-ForwardToSyslog-off-by-default.patch new file mode 100644 index 0000000..ce7e24e --- /dev/null +++ b/SOURCES/0274-Revert-journald-turn-ForwardToSyslog-off-by-default.patch @@ -0,0 +1,54 @@ +From 298dd4f0bf734002a4fc7f51e5a46216017db2f6 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 25 Jan 2016 14:03:47 +0100 +Subject: [PATCH] Revert "journald: turn ForwardToSyslog= off by default" + +This reverts commit 46b131574fdd7d77c15a0919ca9010cad7aa6ac7. + +rhel-only + +Resolves: #1285642 +--- + man/journald.conf.xml | 2 +- + src/journal/journald-server.c | 1 + + src/journal/journald.conf | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/man/journald.conf.xml b/man/journald.conf.xml +index 2cbe58b..c4f71e8 100644 +--- a/man/journald.conf.xml ++++ b/man/journald.conf.xml +@@ -302,7 +302,7 @@ + These options take boolean arguments. If forwarding to syslog + is enabled but nothing reads messages from the socket, + forwarding to syslog has no effect. By default, only +- forwarding to wall is enabled. These settings may be ++ forwarding to syslog and wall is enabled. These settings may be + overridden at boot time with the kernel command line options + systemd.journald.forward_to_syslog=, + systemd.journald.forward_to_kmsg=, +diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c +index f13147f..6a35ebb 100644 +--- a/src/journal/journald-server.c ++++ b/src/journal/journald-server.c +@@ -1470,6 +1470,7 @@ int server_init(Server *s) { + s->rate_limit_interval = DEFAULT_RATE_LIMIT_INTERVAL; + s->rate_limit_burst = DEFAULT_RATE_LIMIT_BURST; + ++ s->forward_to_syslog = true; + s->forward_to_wall = true; + + s->max_file_usec = DEFAULT_MAX_FILE_USEC; +diff --git a/src/journal/journald.conf b/src/journal/journald.conf +index 47eefe9..3907dfb 100644 +--- a/src/journal/journald.conf ++++ b/src/journal/journald.conf +@@ -27,7 +27,7 @@ + #RuntimeMaxFileSize= + #MaxRetentionSec= + #MaxFileSec=1month +-#ForwardToSyslog=no ++#ForwardToSyslog=yes + #ForwardToKMsg=no + #ForwardToConsole=no + #ForwardToWall=yes diff --git a/SOURCES/0275-journal-fix-error-handling-when-compressing-journal-.patch b/SOURCES/0275-journal-fix-error-handling-when-compressing-journal-.patch new file mode 100644 index 0000000..286998e --- /dev/null +++ b/SOURCES/0275-journal-fix-error-handling-when-compressing-journal-.patch @@ -0,0 +1,67 @@ +From 4c82b9247b29f31814e7ee5f77c745db659e27ac Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Sat, 24 Oct 2015 13:17:54 +0200 +Subject: [PATCH] journal: fix error handling when compressing journal objects + +Let's make sure we handle compression errors properly, and don't +misunderstand an error for success. + +Also, let's actually compress things if lz4 is enabled. + +Fixes #1662. + +Cherry-picked from: d1afbcd22170e95c79261340071d376fe41fc3af +Resolves: #1292447 +--- + src/journal/journal-file.c | 12 +++++++----- + src/journal/journal-file.h | 5 +++++ + 2 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index f500568..a8f92e2 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1051,23 +1051,25 @@ static int journal_file_append_data( + o->data.hash = htole64(hash); + + #if defined(HAVE_XZ) || defined(HAVE_LZ4) +- if (f->compress_xz && +- size >= COMPRESSION_SIZE_THRESHOLD) { ++ if (JOURNAL_FILE_COMPRESS(f) && size >= COMPRESSION_SIZE_THRESHOLD) { + size_t rsize; + + compression = compress_blob(data, size, o->data.payload, &rsize); + +- if (compression) { ++ if (compression >= 0) { + o->object.size = htole64(offsetof(Object, data.payload) + rsize); + o->object.flags |= compression; + + log_debug("Compressed data object %"PRIu64" -> %zu using %s", + size, rsize, object_compressed_to_string(compression)); +- } ++ } else ++ /* Compression didn't work, we don't really care why, let's continue without compression */ ++ compression = 0; ++ + } + #endif + +- if (!compression && size > 0) ++ if (compression == 0 && size > 0) + memcpy(o->data.payload, data, size); + + r = journal_file_link_data(f, o, p, hash); +diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h +index 403c8f7..0f29b09 100644 +--- a/src/journal/journal-file.h ++++ b/src/journal/journal-file.h +@@ -229,3 +229,8 @@ int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, usec_t * + int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to); + + bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec); ++ ++static inline bool JOURNAL_FILE_COMPRESS(JournalFile *f) { ++ assert(f); ++ return f->compress_xz || f->compress_lz4; ++} diff --git a/SOURCES/0276-journal-irrelevant-coding-style-fixes.patch b/SOURCES/0276-journal-irrelevant-coding-style-fixes.patch new file mode 100644 index 0000000..2895df5 --- /dev/null +++ b/SOURCES/0276-journal-irrelevant-coding-style-fixes.patch @@ -0,0 +1,45 @@ +From 8368db3b100bd587c580d5ed2561390c5ed76a8c Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Sat, 24 Oct 2015 15:08:15 +0200 +Subject: [PATCH] journal: irrelevant coding style fixes + +Cherry-picked from: 0240c603691e006165d8687d6a2c70859755b11f +Related: #1292447 +--- + src/journal/compress.c | 9 +++++---- + src/journal/journal-file.c | 2 +- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/journal/compress.c b/src/journal/compress.c +index 6923753..c9a3399 100644 +--- a/src/journal/compress.c ++++ b/src/journal/compress.c +@@ -51,10 +51,11 @@ int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t *dst_ + #ifdef HAVE_XZ + static const lzma_options_lzma opt = { + 1u << 20u, NULL, 0, LZMA_LC_DEFAULT, LZMA_LP_DEFAULT, +- LZMA_PB_DEFAULT, LZMA_MODE_FAST, 128, LZMA_MF_HC3, 4}; +- static const lzma_filter filters[2] = { +- {LZMA_FILTER_LZMA2, (lzma_options_lzma*) &opt}, +- {LZMA_VLI_UNKNOWN, NULL} ++ LZMA_PB_DEFAULT, LZMA_MODE_FAST, 128, LZMA_MF_HC3, 4 ++ }; ++ static const lzma_filter filters[] = { ++ { LZMA_FILTER_LZMA2, (lzma_options_lzma*) &opt }, ++ { LZMA_VLI_UNKNOWN, NULL } + }; + lzma_ret ret; + size_t out_pos = 0; +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index a8f92e2..892fe47 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1032,7 +1032,7 @@ static int journal_file_append_data( + r = journal_file_find_data_object_with_hash(f, data, size, hash, &o, &p); + if (r < 0) + return r; +- else if (r > 0) { ++ if (r > 0) { + + if (ret) + *ret = o; diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index cfefc31..4371030 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -7,7 +7,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 219 -Release: 19%{?dist}.7 +Release: 19%{?dist}.9 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -301,6 +301,9 @@ Patch0270: 0270-Fixup-WWN-bytes-for-big-endian-systems.patch Patch0271: 0271-Revert-udev-fibre-channel-fix-NPIV-support.patch Patch0272: 0272-udev-path-id-fibre-channel-NPIV-use-fc_vport-s-port_.patch Patch0273: 0273-rules-set-SYSTEMD_READY-0-on-DM_UDEV_DISABLE_OTHER_R.patch +Patch0274: 0274-Revert-journald-turn-ForwardToSyslog-off-by-default.patch +Patch0275: 0275-journal-fix-error-handling-when-compressing-journal-.patch +Patch0276: 0276-journal-irrelevant-coding-style-fixes.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -1260,6 +1263,13 @@ getent passwd systemd-resolve >/dev/null 2>&1 || useradd -r -l -g systemd-resolv %{_mandir}/man8/systemd-resolved.* %changelog +* Thu Apr 28 2016 Lukas Nykryn - 219-19.9 +- journal: fix error handling when compressing journal objects (#1292447) +- journal: irrelevant coding style fixes (#1292447) + +* Wed Apr 20 2016 Lukas Nykryn - 219-19.8 +- Revert "journald: turn ForwardToSyslog= off by default" (#1285642) + * Fri Mar 04 2016 Lukas Nykryn - 219-19.7 - Revert "udev: fibre channel: fix NPIV support" (#1266934) - udev: path-id: fibre channel NPIV - use fc_vport's port_name (#1266934)