Hello community, here is the log from the commit of package conmon for openSUSE:Factory checked in at 2020-02-03 11:11:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/conmon (Old) and /work/SRC/openSUSE:Factory/.conmon.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "conmon" Mon Feb 3 11:11:49 2020 rev:7 rq:768391 version:2.0.10 Changes: -------- --- /work/SRC/openSUSE:Factory/conmon/conmon.changes 2020-01-13 22:16:09.134368722 +0100 +++ /work/SRC/openSUSE:Factory/.conmon.new.26092/conmon.changes 2020-02-03 11:12:00.645805279 +0100 @@ -1,0 +2,6 @@ +Tue Jan 28 07:37:26 UTC 2020 - Sascha Grunert <[email protected]> + +- Update to v2.0.10: + - journal logging: write to /dev/null instead of -1 + +------------------------------------------------------------------- Old: ---- conmon-2.0.9.tar.xz New: ---- conmon-2.0.10.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ conmon.spec ++++++ --- /var/tmp/diff_new_pack.bz5E75/_old 2020-02-03 11:12:01.921805924 +0100 +++ /var/tmp/diff_new_pack.bz5E75/_new 2020-02-03 11:12:01.925805926 +0100 @@ -17,7 +17,7 @@ Name: conmon -Version: 2.0.9 +Version: 2.0.10 Release: 0 Summary: An OCI container runtime monitor License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.bz5E75/_old 2020-02-03 11:12:01.953805940 +0100 +++ /var/tmp/diff_new_pack.bz5E75/_new 2020-02-03 11:12:01.953805940 +0100 @@ -2,8 +2,8 @@ <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/containers/conmon</param> <param name="scm">git</param> -<param name="versionformat">2.0.9</param> -<param name="revision">v2.0.9</param> +<param name="versionformat">2.0.10</param> +<param name="revision">v2.0.10</param> </service> <service name="recompress" mode="disabled"> <param name="file">conmon-*.tar</param> ++++++ conmon-2.0.9.tar.xz -> conmon-2.0.10.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.9/VERSION new/conmon-2.0.10/VERSION --- old/conmon-2.0.9/VERSION 2020-01-06 18:51:59.000000000 +0100 +++ new/conmon-2.0.10/VERSION 2020-01-07 22:53:52.000000000 +0100 @@ -1 +1 @@ -2.0.9 +2.0.10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.9/src/ctr_logging.c new/conmon-2.0.10/src/ctr_logging.c --- old/conmon-2.0.9/src/ctr_logging.c 2020-01-06 18:51:59.000000000 +0100 +++ new/conmon-2.0.10/src/ctr_logging.c 2020-01-07 22:53:52.000000000 +0100 @@ -167,6 +167,13 @@ */ int write_journald(int pipe, char *buf, ssize_t buflen) { + /* When using writev_buffer_append_segment, we should never approach the number of + * entries necessary to flush the buffer. Therefore, the fd passed in is for /dev/null + */ + _cleanup_close_ int dev_null = open("/dev/null", O_WRONLY | O_CLOEXEC); + if (dev_null < 0) + pexit("Failed to open /dev/null"); + /* Since we know the priority values for the journal (6 being log info and 3 being log err * we can set it statically here. This will also save on runtime, at the expense of needing * to be changed if this convention is changed. @@ -188,35 +195,32 @@ char tmp_line_end = buf[line_len]; buf[line_len] = '\0'; - /* When using writev_buffer_append_segment here, we should never approach the number of - * entries necessary to flush the buffer. Therefore, the fd passed in is -1. - */ _cleanup_free_ char *message = g_strdup_printf("MESSAGE=%s", buf); - if (writev_buffer_append_segment(-1, &bufv, message, line_len + MESSAGE_EQ_LEN) < 0) + if (writev_buffer_append_segment(dev_null, &bufv, message, line_len + MESSAGE_EQ_LEN) < 0) return -1; /* Restore state of the buffer */ buf[line_len] = tmp_line_end; - if (writev_buffer_append_segment(-1, &bufv, container_id_full, cuuid_len + CID_FULL_EQ_LEN) < 0) + if (writev_buffer_append_segment(dev_null, &bufv, container_id_full, cuuid_len + CID_FULL_EQ_LEN) < 0) return -1; - if (writev_buffer_append_segment(-1, &bufv, message_priority, PRIORITY_EQ_LEN) < 0) + if (writev_buffer_append_segment(dev_null, &bufv, message_priority, PRIORITY_EQ_LEN) < 0) return -1; - if (writev_buffer_append_segment(-1, &bufv, container_id, TRUNC_ID_LEN + CID_EQ_LEN) < 0) + if (writev_buffer_append_segment(dev_null, &bufv, container_id, TRUNC_ID_LEN + CID_EQ_LEN) < 0) return -1; - if (container_tag && writev_buffer_append_segment(-1, &bufv, container_tag, container_tag_len) < 0) + if (container_tag && writev_buffer_append_segment(dev_null, &bufv, container_tag, container_tag_len) < 0) return -1; /* only print the name if we have a name to print */ - if (name && writev_buffer_append_segment(-1, &bufv, container_name, name_len + CID_FULL_EQ_LEN) < 0) + if (name && writev_buffer_append_segment(dev_null, &bufv, container_name, name_len + CID_FULL_EQ_LEN) < 0) return -1; /* per docker journald logging format, CONTAINER_PARTIAL_MESSAGE is set to true if it's partial, but otherwise not set. */ - if (partial && writev_buffer_append_segment(-1, &bufv, "CONTAINER_PARTIAL_MESSAGE=true", PARTIAL_MESSAGE_EQ_LEN) < 0) + if (partial && writev_buffer_append_segment(dev_null, &bufv, "CONTAINER_PARTIAL_MESSAGE=true", PARTIAL_MESSAGE_EQ_LEN) < 0) return -1; int err = sd_journal_sendv(bufv.iov, bufv.iovcnt);
