66%endif
77
88Name: perl-YAML-LibYAML
9- Version: 0.81
10- Release: 3 %{?dist }
9+ Version: 0.902.0
10+ Release: 2 %{?dist }
1111Summary: Perl YAML Serialization using XS and libyaml
12- License: GPL+ or Artistic
12+ License: GPL-1.0-or-later OR Artistic-1.0 -Perl
1313Vendor: Microsoft Corporation
1414Distribution: Azure Linux
1515URL: https://metacpan.org/release/YAML-LibYAML
16- Source0: https://cpan.metacpan.org/modules/by-module/YAML/YAML-LibYAML-%{ version }.tar.gz# /perl-YAML-LibYAML- %{version}.tar.gz
16+ Source0: https://cpan.metacpan.org/modules/by-module/YAML/YAML-LibYAML-v %{version }.tar.gz
1717Patch0: YAML-LibYAML-0.79-Unbundled-libyaml.patch
1818
1919# Build
2020BuildRequires: coreutils
2121BuildRequires: findutils
2222BuildRequires: gcc
2323BuildRequires: make
24- BuildRequires: libyaml >= 0.2.2
25- BuildRequires: libyaml-devel >= 0.2.2
24+ BuildRequires: libyaml >= 0.2.4
25+ BuildRequires: libyaml-devel >= 0.2.4
2626BuildRequires: perl-devel
2727BuildRequires: perl-generators
2828BuildRequires: perl-interpreter
@@ -51,44 +51,64 @@ BuildRequires: perl(File::Find)
5151BuildRequires: perl(File::Path)
5252BuildRequires: perl(Filter::Util::Call)
5353BuildRequires: perl(FindBin)
54+ BuildRequires: perl(if)
5455BuildRequires: perl(IO::File)
5556BuildRequires: perl(IO::Pipe)
5657BuildRequires: perl(lib)
5758BuildRequires: perl(Test::Builder)
58- BuildRequires: perl(Test::More) >= 0.88
59+ BuildRequires: perl(Test::More) >= 0.90
5960BuildRequires: perl(Tie::Array)
6061BuildRequires: perl(Tie::Hash)
6162BuildRequires: perl(utf8)
6263
63- %if %{with perl_YAML_LibYAML_enables_optional_test }
64+ # A build cycle: perl-YAML-LibYAML → perl-boolean → perl-JSON-MaybeXS
65+ # → perl-Cpanel-JSON-XS → perl-YAML-LibYAML
66+ %if %{with perl_YAML_LibYAML_enables_optional_test } && ! %{defined perl_bootstrap }
6467# Optional Tests
68+ BuildRequires: perl(boolean)
6569BuildRequires: perl(Path::Class)
6670%endif
6771
6872# Dependencies
69- Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
7073Requires: perl(B::Deparse)
71- Requires: libyaml >= 0.2.2
74+ Requires: libyaml >= 0.2.4
7275
7376# Avoid provides for perl shared objects
7477%{?perl_default_filter }
78+ # Filter modules bundled for tests
79+ %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir }
80+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(TestYAML.*\\)
7581
7682%description
7783Kirill Siminov's "libyaml" is arguably the best YAML implementation. The C
7884library is written precisely to the YAML 1.1 specification. It was originally
7985bound to Python and was later bound to Ruby .
8086
87+ %package tests
88+ Summary: Tests for %{name }
89+ Requires: %{name } = %{version }-%{release }
90+ Requires: perl-Test-Harness
91+
92+ %description tests
93+ Tests from %{name }. Execute them
94+ with "%{_libexecdir }/%{name }/test".
95+
8196%prep
82- %setup -q -n YAML-LibYAML-%{version }
83- # Unbundled libyaml, the source files are the same as in libyaml-0.2.2
97+ %setup -q -n YAML-LibYAML-v %{version }
98+ # Unbundled libyaml, the source files are the same as in libyaml-0.2.4
8499# It was determined by comparing commits in upstream repo:
85100# https://github.com/yaml/libyaml/
86- %patch 0 -p1 -b .orig
101+ %patch -P 0 -p1 -b .orig
87102for file in api.c dumper.c emitter.c loader.c parser.c reader.c scanner.c \
88103 writer.c yaml.h yaml_private.h; do
89104 rm LibYAML/$file
90105 sed -i -e " /^LibYAML\/$file /d" MANIFEST
91106done
107+ # Help generators to recognize Perl scripts
108+ for F in t/* .t; do
109+ perl -i -MConfig -ple ' print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' " $F "
110+ chmod +x " $F "
111+ done
92112
93113%build
94114perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE= "%{optflags }" NO_PACKLIST= 1 NO_PERLLOCAL= 1
@@ -99,24 +119,147 @@ perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERL
99119find %{buildroot } -type f -name ' *.bs' -empty -delete
100120%{_fixperms } -c %{buildroot }
101121
122+ # Install tests
123+ mkdir -p %{buildroot }%{_libexecdir }/%{name }
124+ cp -a t %{buildroot }%{_libexecdir }/%{name }
125+ # It needs libraries in lib/ not in system directories
126+ rm %{buildroot }%{_libexecdir }/%{name }/t/000-require-modules.t
127+ # Remove author test
128+ rm %{buildroot }%{_libexecdir }/%{name }/t/author-pod-syntax.t
129+ # Don't use blib
130+ perl -i -pe 's{^use blib;}{#use blib;}' %{buildroot}%{_libexecdir}/%{name}/t/TestYAML.pm
131+ perl -i -pe 's{^use_blib: 1}{use_blib: 0}' %{buildroot }%{_libexecdir }/%{name }/t/yaml_tests.yaml
132+ cat > %{buildroot }%{_libexecdir }/%{name }/test << 'EOF'
133+ #!/bin/bash
134+ set -e
135+ # Some tests write into temporary files/directories. The solution is to
136+ # copy the tests into a writable directory and execute them from there.
137+ DIR= $(mktemp -d)
138+ pushd "$DIR"
139+ cp -a %{_libexecdir }/%{name }/* ./
140+ prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
141+ popd
142+ rm -rf "$DIR"
143+ EOF
144+ chmod +x %{buildroot }%{_libexecdir }/%{name }/test
145+
102146%check
147+ export HARNESS_OPTIONS=j$( perl -e ' if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- ' %{?_smp_mflags}' )
103148make test
104149
105150%files
106151%license LICENSE
107- %doc Changes CONTRIBUTING README
152+ %doc Changes CONTRIBUTING.md README
108153%{perl_vendorarch} /auto/YAML/
109154%{perl_vendorarch} /YAML/
110155%{_mandir }/man3/YAML::LibYAML.3*
111156%{_mandir }/man3/YAML::XS.3*
112157%{_mandir }/man3/YAML::XS::LibYAML.3*
113158
159+ %files tests
160+ %{_libexecdir }/%{name }
161+
114162%changelog
115- *
Mon Nov 01 2021 Muhammad Falak <[email protected] > -
0.81-3 116- - Remove epoch
163+ *
Wed Dec 18 2024 Sumit Jena <[email protected] > -
0.902.0-2 164+ - Initial Azure Linux import from Fedora 41 (license: MIT).
165+ - License verified.
166+
167+ *
Mon Sep 23 2024 Jitka Plesnikova <[email protected] > -
1:0.902.0-1 168+ - 0.902.0 bump (rhbz#2313873)
169+
170+ *
Mon Sep 09 2024 Jitka Plesnikova <[email protected] > -
1:0.901.0-1 171+ - 0.901.0 bump (rhbz#2310535)
172+
173+ *
Fri Jul 19 2024 Fedora Release Engineering <[email protected] > -
1:0.89-5 174+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
175+
176+ *
Wed Jun 12 2024 Jitka Plesnikova <[email protected] > -
1:0.89-4 177+ - Perl 5.40 re-rebuild of bootstrapped packages
178+
179+ *
Mon Jun 10 2024 Jitka Plesnikova <[email protected] > -
1:0.89-3 180+ - Perl 5.40 rebuild
181+
182+ *
Fri Feb 02 2024 Petr Pisar <[email protected] > -
1:0.89-2 183+ - Break a build cycle: perl-YAML-LibYAML → perl-boolean → perl-JSON-MaybeXS
184+ → perl-Cpanel-JSON-XS → perl-YAML-LibYAML
185+
186+ *
Sat Jan 27 2024 Paul Howarth <[email protected] > -
1:0.89-1 187+ - Update to 0.89 (rhbz#2260595)
188+ - Recognise core booleans on Perl 5.36+ at dump time (GH#114)
189+
190+ *
Thu Jan 25 2024 Fedora Release Engineering <[email protected] > -
1:0.88-5 191+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
192+
193+ *
Sun Jan 21 2024 Fedora Release Engineering <[email protected] > -
1:0.88-4 194+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
195+
196+ *
Fri Jul 21 2023 Fedora Release Engineering <[email protected] > -
1:0.88-3 197+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
198+
199+ *
Tue Jul 11 2023 Jitka Plesnikova <[email protected] > -
1:0.88-2 200+ - Perl 5.38 rebuild
201+
202+ *
Fri May 12 2023 Paul Howarth <[email protected] > -
1:0.88-1 203+ - Update to 0.88
204+ - REVERT "Turn off internal POK flag for number scalars"
205+
206+ *
Fri May 5 2023 Paul Howarth <[email protected] > -
1:0.87-1 207+ - Update to 0.87
208+ - Turn off internal POK flag for number scalars
209+ - Avoid use of deprecated patch syntax
210+
211+ *
Thu Jan 26 2023 Jitka Plesnikova <[email protected] > -
1:0.86-1 212+ - 0.86 bump
213+ - Package tests
214+
215+ *
Fri Jan 20 2023 Fedora Release Engineering <[email protected] > -
1:0.85-2 216+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
217+
218+ *
Tue Sep 13 2022 Jitka Plesnikova <[email protected] > -
1:0.85-1 219+ - Update to 0.85 (rhbz#2126164)
220+ - Convert doc from Swim to Markdown
221+
222+ *
Mon Sep 5 2022 Paul Howarth <[email protected] > -
1:0.84-1 223+ - Update to 0.84 (rhbz#2124002)
224+ - Add option ForbidDuplicateKeys (GH#105)
225+ - Use SPDX-format license tag
226+
227+ *
Fri Jul 22 2022 Fedora Release Engineering <[email protected] > -
1:0.83-6 228+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
229+
230+ *
Tue May 31 2022 Jitka Plesnikova <[email protected] > -
1:0.83-5 231+ - Perl 5.36 rebuild
232+
233+ *
Fri Jan 21 2022 Fedora Release Engineering <[email protected] > -
1:0.83-4 234+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
235+
236+ *
Fri Jul 23 2021 Fedora Release Engineering <[email protected] > -
1:0.83-3 237+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
238+
239+ *
Fri May 21 2021 Jitka Plesnikova <[email protected] > -
1:0.83-2 240+ - Perl 5.34 rebuild
241+
242+ *
Sun May 9 2021 Paul Howarth <[email protected] > -
1:0.83-1 243+ - Update to 0.83
244+ - Recognize tied variables (GH#101)
245+ - Add license file from included libyaml code (GH#102)
246+
247+ *
Wed Jan 27 2021 Fedora Release Engineering <[email protected] > -
1:0.82-4 248+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
249+
250+ *
Tue Jul 28 2020 Fedora Release Engineering <[email protected] > -
1:0.82-3 251+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
252+
253+ *
Tue Jun 23 2020 Jitka Plesnikova <[email protected] > -
1:0.82-2 254+ - Perl 5.32 rebuild
117255
118- *
Fri Oct 15 2021 Pawel Winogrodzki <[email protected] > -
1:0.81-2 119- - Initial CBL-Mariner import from Fedora 31 (license: MIT).
256+ *
Sun May 3 2020 Paul Howarth <[email protected] > -
1:0.82-1 257+ - Update to 0.82
258+ - Updated libyaml sources to 0.2.4; changes affecting YAML::XS are:
259+ - Output '...' at the stream end after a block scalar with trailing empty
260+ lines
261+ - Accept '%%YAML 1.2' directives (they are ignored and do not change
262+ behaviour though)
120263
121264*
Tue Jan 28 2020 Jitka Plesnikova <[email protected] > -
1:0.81-1 122265- Update to 0.81
0 commit comments