diff --git a/0001-Don-t-emit-document-end-marker-at-the-end-of-stream.patch b/0001-Don-t-emit-document-end-marker-at-the-end-of-stream.patch new file mode 100644 index 0000000..90ec44a --- /dev/null +++ b/0001-Don-t-emit-document-end-marker-at-the-end-of-stream.patch @@ -0,0 +1,35 @@ +From 56f4b17221868593d6903ee58d6d679b690cf4df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tina=20M=C3=BCller?= +Date: Fri, 29 Jun 2018 23:16:26 +0200 +Subject: [PATCH] Don't emit document-end marker at the end of stream + +(only when explicitly requested) + +@jrtc27++ for the patch. + +See #60 +--- + src/emitter.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/emitter.c b/src/emitter.c +index 32fe07c..2744495 100644 +--- a/src/emitter.c ++++ b/src/emitter.c +@@ -649,13 +649,6 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter, + + else if (event->type == YAML_STREAM_END_EVENT) + { +- if (emitter->open_ended) +- { +- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) +- return 0; +- if (!yaml_emitter_write_indent(emitter)) +- return 0; +- } + + if (!yaml_emitter_flush(emitter)) + return 0; +-- +2.20.1 + diff --git a/libyaml.spec b/libyaml.spec index 78c8939..23e300b 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -4,7 +4,7 @@ Name: libyaml Version: 0.2.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: YAML 1.1 parser and emitter written in C License: MIT @@ -13,6 +13,9 @@ Source0: http://pyyaml.org/download/libyaml/%{tarballname}-%{version}.tar.gz BuildRequires: gcc +# https://github.com/yaml/libyaml/issues/60 +Patch0: 0001-Don-t-emit-document-end-marker-at-the-end-of-stream.patch + %description YAML is a data serialization format designed for human readability and interaction with scripting languages. LibYAML is a YAML parser and @@ -31,6 +34,7 @@ developing applications that use LibYAML. %prep %setup -q -n %{tarballname}-%{version} +%patch0 -p1 %build @@ -69,6 +73,9 @@ make check %changelog +* Tue Feb 5 2019 John Eckersberg - 0.2.1-4 +- Add patch: Don't emit document-end marker at the end of stream (rhbz#1672670) + * Fri Feb 01 2019 Fedora Release Engineering - 0.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild