diff --git a/YAML-free b/YAML-free new file mode 100755 index 0000000000000000000000000000000000000000..beae38a0bc8ab6c67199247f8ea2ab7e0f3702c9 --- /dev/null +++ b/YAML-free @@ -0,0 +1,44 @@ +#!/bin/bash + +# YAML-free: create repackaged YAML tarball without non-free content +# See https://bugzilla.redhat.com/show_bug.cgi?id=1813197 +# https://github.com/ingydotnet/yaml-pm/issues/219 +# +# Usage: YAML-free YAML-version.tar.gz +# Creates: YAML-free-version.tar.gz + +case $# in +1) YAML_tarball="$1" + ;; +*) echo "YAML-free: usage: YAML-free YAML-version.tar.gz" 1>&2 + exit 1 + ;; +esac + +if echo "$YAML_tarball" | grep --silent -x 'YAML-[1-9][0-9]*\.[0-9][0-9.]*\.tar\.gz'; then + YAML_free_tarball=$(echo "$YAML_tarball" | sed -e 's|^YAML|YAML-free|') + YAML_dirname=$(echo "$YAML_tarball" | sed -e 's|\.tar\.gz$||') +else + echo "YAML-free: tarball $YAML_tarball does not meet expected naming" 1>&2 + exit 1 +fi + +echo "Creating $YAML_free_tarball from $YAML_tarball in directory $YAML_dirname" + +echo "Ensuring directory $YAML_dirname does not already exist" +rm -rf "$YAML_dirname" + +echo "Extracting $YAML_tarball" +tar xfz "$YAML_tarball" + +echo "Removing non-free file t/load-slides.t" +rm "$YAML_dirname/t/load-slides.t" + +echo "Removing reference to non-free file t/load-slides.t from MANIFEST" +sed -i -e '/^t\/load-slides.t/d' "$YAML_dirname/MANIFEST" + +echo "Creating $YAML_free_tarball" +tar cfz "$YAML_free_tarball" "$YAML_dirname" + +echo "Removing work directory $YAML_dirname" +rm -rf "$YAML_dirname" diff --git a/YAML-free-1.30.tar.gz b/YAML-free-1.30.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3851f665e35412604bccf4d8cf87e3c9fa19f280 Binary files /dev/null and b/YAML-free-1.30.tar.gz differ diff --git a/perl-YAML.spec b/perl-YAML.spec new file mode 100644 index 0000000000000000000000000000000000000000..fb06e5473dffcba584acc7b8b484e2d84062c055 --- /dev/null +++ b/perl-YAML.spec @@ -0,0 +1,140 @@ +%define anolis_release 1 + +# Run test +%bcond_without perl_YAML_enables_test +%bcond_without perl_YAML_enables_extra_test + +Name: perl-YAML +Version: 1.30 +Release: %{anolis_release}%{?dist} +Summary: YAML Ain't Markup Language (tm) +License: GPL+ or Artistic +URL: https://metacpan.org/release/YAML +# Tarball created from https://cpan.metacpan.org/modules/by-module/YAML/YAML-%%{version}.tar.gz +Source0: YAML-free-%{version}.tar.gz +# Script to remove non-free content from upstream tarball +Source1: YAML-free +BuildArch: noarch +# Module Build +BuildRequires: coreutils +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) > 6.75 +# Module Runtime +BuildRequires: perl(B) +BuildRequires: perl(B::Deparse) +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Test Suite +# Avoid circular build deps Test::YAML → Test::Base → YAML when bootstrapping +%if %{with perl_YAML_enables_test} && !%{defined perl_bootstrap} +BuildRequires: perl(Config) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(File::Find) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Pipe) +BuildRequires: perl(lib) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::YAML) >= 1.05 +BuildRequires: perl(utf8) +%if %{with perl_YAML_enables_extra_test} +# Author Tests +BuildRequires: perl(Test::Pod) >= 1.41 +%endif +%endif +# Runtime +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(B::Deparse) +Requires: perl(Carp) + +# Filter private provides: +# perl(yaml_mapping) perl(yaml_scalar) perl(yaml_sequence) +%global __provides_exclude ^perl\\(yaml_ + +%description +The YAML.pm module implements a YAML Loader and Dumper based on the YAML 1.0 +specification (http://www.yaml.org/spec/). YAML is a generic data serialization +language that is optimized for human readability. It can be used to express the +data structures of most modern programming languages, including Perl. For +information on the YAML syntax, please refer to the YAML specification. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The documentation package contains documentations for %{name}. + +%prep +%autosetup -n YAML-%{version} -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} + +%install +%{make_install} +%{_fixperms} -c %{buildroot} + +%check +# Avoid circular build deps Test::YAML → Test::Base → YAML when bootstrapping +%if %{with perl_YAML_enables_test} && !%{defined perl_bootstrap} +make test AUTHOR_TESTING=%{with perl_YAML_enables_extra_test} +%endif + +%files +%license LICENSE +%dir %{perl_vendorlib}/YAML/ +%dir %{perl_vendorlib}/YAML/Dumper/ +%dir %{perl_vendorlib}/YAML/Loader/ +%doc %{perl_vendorlib}/YAML.pod +%doc %{perl_vendorlib}/YAML/Any.pod +%doc %{perl_vendorlib}/YAML/Dumper.pod +%doc %{perl_vendorlib}/YAML/Dumper/Base.pod +%doc %{perl_vendorlib}/YAML/Error.pod +%doc %{perl_vendorlib}/YAML/Loader.pod +%doc %{perl_vendorlib}/YAML/Loader/Base.pod +%doc %{perl_vendorlib}/YAML/Marshall.pod +%doc %{perl_vendorlib}/YAML/Node.pod +%doc %{perl_vendorlib}/YAML/Tag.pod +%doc %{perl_vendorlib}/YAML/Types.pod +%{perl_vendorlib}/YAML.pm +%{perl_vendorlib}/YAML/Any.pm +%{perl_vendorlib}/YAML/Dumper.pm +%{perl_vendorlib}/YAML/Dumper/Base.pm +%{perl_vendorlib}/YAML/Error.pm +%{perl_vendorlib}/YAML/Loader.pm +%{perl_vendorlib}/YAML/Loader/Base.pm +%{perl_vendorlib}/YAML/Marshall.pm +%{perl_vendorlib}/YAML/Mo.pm +%{perl_vendorlib}/YAML/Node.pm +%{perl_vendorlib}/YAML/Tag.pm +%{perl_vendorlib}/YAML/Types.pm +%{_mandir}/man3/YAML.3* +%{_mandir}/man3/YAML::Any.3* +%{_mandir}/man3/YAML::Dumper.3* +%{_mandir}/man3/YAML::Dumper::Base.3* +%{_mandir}/man3/YAML::Error.3* +%{_mandir}/man3/YAML::Loader.3* +%{_mandir}/man3/YAML::Loader::Base.3* +%{_mandir}/man3/YAML::Marshall.3* +%{_mandir}/man3/YAML::Node.3* +%{_mandir}/man3/YAML::Tag.3* +%{_mandir}/man3/YAML::Types.3* + +%files doc +%doc Changes CONTRIBUTING README + + +%changelog +* Tue Jul 26 2022 happy_orange - 1.30-1 +- Init pcakage from upstream