From d660d140aaf709f9d4d5e0b8d9a801cc464cf155 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 05:51:12 +0000 Subject: [PATCH 1/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libyaml.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyaml.spec b/libyaml.spec index a9a505c..145d6ea 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -6,7 +6,7 @@ Name: libyaml Version: 0.2.5 -Release: 12%{?dist} +Release: 13%{?dist} Summary: YAML 1.1 parser and emitter written in C License: MIT @@ -140,6 +140,9 @@ popd %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 0.2.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 26 2023 Marc-André Lureau - 0.2.5-12 - Add MinGW packages. From 64202a7ed39442eabbb54ce42c4d0dec14ebf72a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 04:08:50 +0000 Subject: [PATCH 2/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libyaml.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyaml.spec b/libyaml.spec index 145d6ea..44720e2 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -6,7 +6,7 @@ Name: libyaml Version: 0.2.5 -Release: 13%{?dist} +Release: 14%{?dist} Summary: YAML 1.1 parser and emitter written in C License: MIT @@ -140,6 +140,9 @@ popd %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 0.2.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 0.2.5-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f1ba5cdc1dbc09610e47aad31799557f13d99d3c Mon Sep 17 00:00:00 2001 From: Lukas Zachar Date: Fri, 10 May 2024 13:50:43 +0200 Subject: [PATCH 3/7] Import CI tests from RHEL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is from RHEL distgit tests/libyaml, directory Sanity/smoke. The original commit hash: 03647450fb247d1304a8f372c63db2bca5273bb4 Only necessary files were kept (and simplified). Co-Authored-By: Miro Hrončok --- .fmf/version | 1 + plan.fmf | 4 ++ tests/smoke/main.fmf | 12 ++++++ tests/smoke/regression_1033990.yaml | 4 ++ tests/smoke/regression_1063866.yaml | 6 +++ tests/smoke/run-parser.c | 63 +++++++++++++++++++++++++++++ tests/smoke/runtest.sh | 39 ++++++++++++++++++ 7 files changed, 129 insertions(+) create mode 100644 .fmf/version create mode 100644 plan.fmf create mode 100644 tests/smoke/main.fmf create mode 100644 tests/smoke/regression_1033990.yaml create mode 100644 tests/smoke/regression_1063866.yaml create mode 100644 tests/smoke/run-parser.c create mode 100755 tests/smoke/runtest.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..e6427de --- /dev/null +++ b/plan.fmf @@ -0,0 +1,4 @@ +discover: + how: fmf +execute: + how: tmt diff --git a/tests/smoke/main.fmf b/tests/smoke/main.fmf new file mode 100644 index 0000000..0331d09 --- /dev/null +++ b/tests/smoke/main.fmf @@ -0,0 +1,12 @@ +summary: Run examples +description: | + Runs simple examples which already caused problems while fixing CVE. + run-parser is taken from the source +component: + - libyaml +test: ./runtest.sh +framework: beakerlib +require: + - libyaml-devel + - gcc +duration: 5m diff --git a/tests/smoke/regression_1033990.yaml b/tests/smoke/regression_1033990.yaml new file mode 100644 index 0000000..6f25454 --- /dev/null +++ b/tests/smoke/regression_1033990.yaml @@ -0,0 +1,4 @@ +%YAML 1.1 +--- +{Backoff: 1} +... diff --git a/tests/smoke/regression_1063866.yaml b/tests/smoke/regression_1063866.yaml new file mode 100644 index 0000000..68f23a0 --- /dev/null +++ b/tests/smoke/regression_1063866.yaml @@ -0,0 +1,6 @@ +%YAML 1.1 +--- # Indented Block + name: John Smith + age: 33 +--- # Inline Block +{name: John Smith, age: 33} diff --git a/tests/smoke/run-parser.c b/tests/smoke/run-parser.c new file mode 100644 index 0000000..1303112 --- /dev/null +++ b/tests/smoke/run-parser.c @@ -0,0 +1,63 @@ +#include + +#include +#include + +#ifdef NDEBUG +#undef NDEBUG +#endif +#include + +int +main(int argc, char *argv[]) +{ + int number; + + if (argc < 2) { + printf("Usage: %s file1.yaml ...\n", argv[0]); + return 0; + } + + for (number = 1; number < argc; number ++) + { + FILE *file; + yaml_parser_t parser; + yaml_event_t event; + int done = 0; + int count = 0; + int error = 0; + + printf("[%d] Parsing '%s': ", number, argv[number]); + fflush(stdout); + + file = fopen(argv[number], "rb"); + assert(file); + + assert(yaml_parser_initialize(&parser)); + + yaml_parser_set_input_file(&parser, file); + + while (!done) + { + if (!yaml_parser_parse(&parser, &event)) { + error = 1; + break; + } + + done = (event.type == YAML_STREAM_END_EVENT); + + yaml_event_delete(&event); + + count ++; + } + + yaml_parser_delete(&parser); + + assert(!fclose(file)); + + printf("%s (%d events)\n", (error ? "FAILURE" : "SUCCESS"), count); + } + + return 0; +} + diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh new file mode 100755 index 0000000..e1540ed --- /dev/null +++ b/tests/smoke/runtest.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/libyaml/Sanity/smoke +# Description: What the test does +# Author: Lukas Zachar +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun "gcc -O2 -Wall -W -g run-parser.c -lyaml -o run-parser" + rlRun "./run-parser regression_1063866.yaml" + rlRun "./run-parser regression_1033990.yaml" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 8831ece8e320141dfdf5bc07c020e09dcf8233ee Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 15:36:42 +0000 Subject: [PATCH 4/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libyaml.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyaml.spec b/libyaml.spec index 44720e2..5110cab 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -6,7 +6,7 @@ Name: libyaml Version: 0.2.5 -Release: 14%{?dist} +Release: 15%{?dist} Summary: YAML 1.1 parser and emitter written in C License: MIT @@ -140,6 +140,9 @@ popd %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.2.5-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 0.2.5-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d1c17317afc769e7859a835f6560adaaf8b31f91 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Thu, 1 Aug 2024 14:17:17 +0200 Subject: [PATCH 5/7] Mark the license in specfile as SPDX --- libyaml.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/libyaml.spec b/libyaml.spec index 5110cab..d79544d 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -9,6 +9,7 @@ Version: 0.2.5 Release: 15%{?dist} Summary: YAML 1.1 parser and emitter written in C +# SPDX License: MIT URL: https://github.com/yaml/libyaml Source0: https://github.com/yaml/libyaml/releases/download/%{version}/yaml-%{version}.tar.gz From 27ef5073dd2681c47a066637296e17f24d375453 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 15:31:22 +0000 Subject: [PATCH 6/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libyaml.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyaml.spec b/libyaml.spec index d79544d..38699b3 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -6,7 +6,7 @@ Name: libyaml Version: 0.2.5 -Release: 15%{?dist} +Release: 16%{?dist} Summary: YAML 1.1 parser and emitter written in C # SPDX @@ -141,6 +141,9 @@ popd %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 0.2.5-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 0.2.5-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 866e1217169247473ad626eecd88772eef9dd679 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 20:38:55 +0000 Subject: [PATCH 7/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libyaml.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyaml.spec b/libyaml.spec index 38699b3..5bf1f66 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -6,7 +6,7 @@ Name: libyaml Version: 0.2.5 -Release: 16%{?dist} +Release: 17%{?dist} Summary: YAML 1.1 parser and emitter written in C # SPDX @@ -141,6 +141,9 @@ popd %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.2.5-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 0.2.5-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild