Compare commits
No commits in common. "rawhide" and "f30" have entirely different histories.
12 changed files with 88 additions and 289 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -4,8 +4,3 @@ yaml-0.1.3.tar.gz
|
|||
/yaml-0.1.6.tar.gz
|
||||
/yaml-0.1.7.tar.gz
|
||||
/yaml-0.2.1.tar.gz
|
||||
/libyaml-0.2.2.tar.gz
|
||||
/dist-0.2.3.tar.gz
|
||||
/dist-0.2.4.tar.gz
|
||||
/0.2.5.tar.gz
|
||||
/yaml-0.2.5.tar.gz
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
From 56f4b17221868593d6903ee58d6d679b690cf4df Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tina=20M=C3=BCller?= <cpan2@tinita.de>
|
||||
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
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From 8ee83c0da22fe9aa7dea667be8f899a7e32ffb83 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tina=20M=C3=BCller?= <cpan2@tinita.de>
|
||||
Date: Fri, 29 Jun 2018 21:44:19 +0200
|
||||
Subject: [PATCH] Revert removing of open_ended after top level plain scalar
|
||||
|
||||
See also issue #60
|
||||
|
||||
Revert "This code is not needed and breaks tests"
|
||||
|
||||
This reverts commit 56400d976a1999156b1abfd674c3122843980260.
|
||||
---
|
||||
src/emitter.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/emitter.c b/src/emitter.c
|
||||
index d31e075..32fe07c 100644
|
||||
--- a/src/emitter.c
|
||||
+++ b/src/emitter.c
|
||||
@@ -1946,6 +1946,10 @@ yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter,
|
||||
|
||||
emitter->whitespace = 0;
|
||||
emitter->indention = 0;
|
||||
+ if (emitter->root_context)
|
||||
+ {
|
||||
+ emitter->open_ended = 1;
|
||||
+ }
|
||||
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
||||
174
libyaml.spec
174
libyaml.spec
|
|
@ -1,32 +1,22 @@
|
|||
%global with_mingw 0
|
||||
%define tarballname yaml
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_mingw 1
|
||||
%endif
|
||||
#====================================================================#
|
||||
|
||||
Name: libyaml
|
||||
Version: 0.2.5
|
||||
Release: 17%{?dist}
|
||||
Version: 0.2.1
|
||||
Release: 5%{?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
|
||||
URL: http://pyyaml.org/
|
||||
Source0: http://pyyaml.org/download/libyaml/%{tarballname}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
|
||||
%if %{with_mingw}
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc-c++
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc-c++
|
||||
%endif
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1672670
|
||||
# https://github.com/yaml/libyaml/pull/122/
|
||||
Patch0: 0001-Don-t-emit-document-end-marker-at-the-end-of-stream.patch
|
||||
Patch1: 0001-Revert-removing-of-open_ended-after-top-level-plain-.patch
|
||||
|
||||
%description
|
||||
YAML is a data serialization format designed for human readability and
|
||||
|
|
@ -36,63 +26,28 @@ emitter written in C.
|
|||
|
||||
%package devel
|
||||
Summary: Development files for LibYAML applications
|
||||
Requires: libyaml%{?_isa} = %{version}-%{release}, pkgconfig
|
||||
Requires: libyaml = %{version}-%{release}, pkgconfig
|
||||
|
||||
# docs contain files generated by doxygen which are licensed as follows:
|
||||
# dynsections.js and menu.js are GPL-2.0-or-later
|
||||
# jquery.js is MIT
|
||||
License: GPL-2.0-or-later AND MIT
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use LibYAML.
|
||||
|
||||
%if %{with_mingw}
|
||||
%package -n mingw32-libyaml
|
||||
Summary: MinGW YAML 1.1 parser and emitter written in C
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n mingw32-libyaml
|
||||
YAML is a data serialization format designed for human readability and
|
||||
interaction with scripting languages. LibYAML is a YAML parser and
|
||||
emitter written in C.
|
||||
|
||||
%package -n mingw64-libyaml
|
||||
Summary: MinGW YAML 1.1 parser and emitter written in C
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n mingw64-libyaml
|
||||
YAML is a data serialization format designed for human readability and
|
||||
interaction with scripting languages. LibYAML is a YAML parser and
|
||||
emitter written in C.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n yaml-%{version}
|
||||
%setup -q -n %{tarballname}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
|
||||
%build
|
||||
%define _configure ../configure
|
||||
mkdir build
|
||||
pushd build
|
||||
%configure
|
||||
%make_build all html
|
||||
popd
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with_mingw}
|
||||
%mingw_configure
|
||||
%mingw_make_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
pushd build
|
||||
%make_install
|
||||
popd
|
||||
|
||||
%if %{with_mingw}
|
||||
%mingw_make_install
|
||||
%endif
|
||||
|
||||
rm -rf %{buildroot}
|
||||
make DESTDIR=%{buildroot} INSTALL="install -p" install
|
||||
rm -f %{buildroot}%{_libdir}/*.{la,a}
|
||||
|
||||
soname=$(readelf -d %{buildroot}%{_libdir}/libyaml.so | awk '$2 == "(SONAME)" {print $NF}' | tr -d '[]')
|
||||
|
|
@ -101,16 +56,15 @@ echo "INPUT($soname)" > %{buildroot}%{_libdir}/libyaml.so
|
|||
|
||||
|
||||
%check
|
||||
pushd build
|
||||
make check
|
||||
popd
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%license License
|
||||
%doc ReadMe.md
|
||||
%license LICENSE
|
||||
%doc README
|
||||
%{_libdir}/%{name}*.so.*
|
||||
|
||||
|
||||
|
|
@ -121,95 +75,7 @@ popd
|
|||
%{_includedir}/yaml.h
|
||||
|
||||
|
||||
%if %{with_mingw}
|
||||
%files -n mingw32-libyaml
|
||||
%license License
|
||||
%{mingw32_bindir}/libyaml-0-2.dll
|
||||
%{mingw32_includedir}/yaml.h
|
||||
%{mingw32_libdir}/libyaml.a
|
||||
%{mingw32_libdir}/libyaml.dll.a
|
||||
%{mingw32_libdir}/pkgconfig/yaml-0.1.pc
|
||||
|
||||
%files -n mingw64-libyaml
|
||||
%license License
|
||||
%{mingw64_bindir}/libyaml-0-2.dll
|
||||
%{mingw64_includedir}/yaml.h
|
||||
%{mingw64_libdir}/libyaml.a
|
||||
%{mingw64_libdir}/libyaml.dll.a
|
||||
%{mingw64_libdir}/pkgconfig/yaml-0.1.pc
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2023 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.2.5-12
|
||||
- Add MinGW packages.
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed May 17 2023 Karolina Surma <ksurma@redhat.com> - 0.2.5-10
|
||||
- Review the license tag according to the SPDX standard, declare the docs license
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Dec 1 2020 John Eckersberg <jeckersb@redhat.com> - 0.2.5-4
|
||||
- Add BuildRequires for make
|
||||
(re: https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot)
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 0.2.5-2
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
|
||||
* Tue Jun 2 2020 John Eckersberg <eck@redhat.com> - 0.2.5-1
|
||||
- New upstream release (rhbz#1842769)
|
||||
|
||||
* Sun Apr 19 2020 John Eckersberg <eck@redhat.com> - 0.2.4-1
|
||||
- New upstream release (rhbz#1825622)
|
||||
- Fixes document end before directive (rhbz#1824226)
|
||||
|
||||
* Mon Apr 13 2020 John Eckersberg <eck@redhat.com> - 0.2.3-1
|
||||
- New upstream release (rhbz#1823108)
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Mar 26 2019 John Eckersberg <eck@redhat.com> - 0.2.2-1
|
||||
- New upstream release (rhbz#1692750)
|
||||
|
||||
* Tue Feb 5 2019 John Eckersberg <eck@redhat.com> - 0.2.1-5
|
||||
- Add patch: Revert removing of open_ended after top level plain scalar (rhbz#1672670)
|
||||
|
||||
|
|
|
|||
4
plan.fmf
4
plan.fmf
|
|
@ -1,4 +0,0 @@
|
|||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (yaml-0.2.5.tar.gz) = dadd7d8e0d88b5ebab005e5d521d56d541580198aa497370966b98c904586e642a1cd4f3881094eb57624f218d50db77417bbfd0ffdce50340f011e35e8c4c02
|
||||
SHA512 (yaml-0.2.1.tar.gz) = 97ebeea2a2c877b24de2e1ffbf175d07d97d5c8b90e06d21fd057e1114d10b96c04fd92c2ed4e956db751b7ac1686b3fd5778927912ca5bb0d096908a1351235
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
%YAML 1.1
|
||||
---
|
||||
{Backoff: 1}
|
||||
...
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
%YAML 1.1
|
||||
--- # Indented Block
|
||||
name: John Smith
|
||||
age: 33
|
||||
--- # Inline Block
|
||||
{name: John Smith, age: 33}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
#include <yaml.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#!/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 <lzachar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue