From 9e3b06ce81c3cbda2ecd8612f5620a46f8e12789 Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 4 Jan 2025 22:55:07 +0300 Subject: [PATCH] import llhttp-9.2.1-2.el10 --- SOURCES/check-null-licenses | 5 +- SPECS/llhttp.spec | 152 ++++++++++++++++++++++++++++++------ 2 files changed, 129 insertions(+), 28 deletions(-) diff --git a/SOURCES/check-null-licenses b/SOURCES/check-null-licenses index 12108d5..fe0e4eb 100755 --- a/SOURCES/check-null-licenses +++ b/SOURCES/check-null-licenses @@ -6,10 +6,7 @@ from argparse import ArgumentParser, FileType, RawDescriptionHelpFormatter from pathlib import Path from sys import exit, stderr -try: - import tomllib -except ImportError: - import tomli as tomllib +import tomllib def main(): diff --git a/SPECS/llhttp.spec b/SPECS/llhttp.spec index e1aebcf..cab1732 100644 --- a/SPECS/llhttp.spec +++ b/SPECS/llhttp.spec @@ -1,8 +1,8 @@ ## START: Set by rpmautospec -## (rpmautospec version 0.6.3) +## (rpmautospec version 0.6.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 1; + release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -81,7 +81,11 @@ BuildRequires: gcc-c++ # For check-null-licenses BuildRequires: python3-devel -BuildRequires: (python3dist(tomli) if python3 < 3.11) +%if !0%{?rhel} +# For additional license auditing: +BuildRequires: askalono-cli +BuildRequires: licensecheck +%endif %description This project is a port of http_parser to TypeScript. llparse is used to @@ -157,7 +161,74 @@ popd # code with license problems in the source RPM. %{python3} '%{SOURCE3}' --exceptions '%{SOURCE4}' --with dev node_modules_dev -%set_build_flags +%if !0%{?rhel} +# Ensure we have checked all of the licenses in the dev dependency bundle for +# allowability. +pattern="${pattern-}${pattern+|}UNKNOWN|(Apache|Python) License 2\\.0" +pattern="${pattern-}${pattern+|}(MIT|ISC|BSD [023]-Clause) License" +pattern="${pattern-}${pattern+|}BSD 2-Clause with views sentence" +pattern="${pattern-}${pattern+|}MIT License and/or X11 License" +pattern="${pattern-}${pattern+|}GNU General Public License" +# The CC0-1.0 license is *not allowed* in Fedora for code, but the +# binary-search dev dependency falls under the following blanket exception: +# +# Existing uses of CC0-1.0 on code files in Fedora packages prior to +# 2022-08-01, and subsequent upstream versions of those files in those +# packages, continue to be allowed. We encourage Fedora package maintainers +# to ask upstreams to relicense such files. +# +# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/91#note_1151947383 +# +# This can be verified by checking out commit +# f460573ec4dc41968e600a96aaaf03a167b236bf (2021-12-16) from dist-git for this +# package, obtaining the source llhttp-6.0.6-nm-dev.tgz, and observing that +# llhttp-6.0.6/node_modules_dev/binary-search/package.json shows the CC0-1.0 +# license. +pattern="${pattern-}${pattern+|}binary-search/package.json: (\*No copyright\* )?Creative Commons CC0 1\.0" +# The license BSD-3-Clause-Clear appears in sprintf-js/bower.json. This license +# is on the not-allowed list, but it is not real: sprintf-js/package.json and +# sprintf-js/LICENSE have the correct (and allowed) BSD-3-Clause license, and +# upstream confirmed in “Licensing Question” +# https://github.com/alexei/sprintf.js/issues/211 that the appearance of +# BSD-3-Clause-Clear in this file was a mere typo. +pattern="${pattern-}${pattern+|}sprintf-js/bower.json: (\*No copyright\* )?BSD 3-Clause Clear License" + +if licensecheck -r node_modules_dev | + grep -vE "(${pattern})( \\[generated file\\])?\$" || + ! askalono crawl node_modules_dev | awk ' + $1 == "License:" { license = $0; next } + $1 == "Score:" { + if ( \ + license ~ /: (MIT|ISC) \(/ || \ + license ~ /: (0BSD|BSD-2-Clause(-Views)?|BSD-3-Clause) \(/ || \ + license ~ /: (Apache-2\.0|Python-2\.0\.1) \(/ \ + ) { + next # license is OK + } + # license needs auditing + problem = 1 + print file; print license; print $0 + next + } + { file = $0 } + END { exit problem }' + +then + cat 1>&2 <<'EOF' +================================================================= +Possible new license(s) found in dev dependency bundle! + +While these do not contribute to License, they must appear in: +https://docs.fedoraproject.org/en-US/legal/allowed-licenses/ + +Please audit them and modify the patterns representing expected +licenses in the spec file! +================================================================= +EOF + exit 1 +fi +%endif + # http-loose-request.c:7205:20: error: invalid conversion from 'void*' to # 'const unsigned char*' [-fpermissive] # 7205 | start = state->_span_pos0; @@ -185,72 +256,105 @@ NODE_ENV=test node -r ts-node/register/type-check ./test/md-test.ts %changelog -* Thu May 09 2024 Arkady L. Shane - 9.2.1-1 -- Rebuilt for MSVSphere 9.4 +* Sat Jan 04 2025 Arkady L. Shane - 9.2.1-2 +- Rebuilt for MSVSphere 10 ## START: Generated by rpmautospec -* Thu Apr 11 2024 Benjamin A. Beasley - 9.2.1-1 +* Thu Jul 18 2024 Fedora Release Engineering - 9.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Apr 04 2024 Benjamin A. Beasley - 9.2.1-1 - Update to 9.2.1 (close RHBZ#2273352, fix CVE-2024-27982) - Switch from xz to zstd compression for the “dev” bundle archive -* Thu Apr 11 2024 Benjamin A. Beasley - 9.2.0-4 +* Thu Mar 21 2024 Benjamin A. Beasley - 9.2.0-4 - Format check-null-licenses with “ruff format” -* Thu Apr 11 2024 Benjamin A. Beasley - 9.2.0-1 +* Wed Feb 14 2024 Benjamin A. Beasley - 9.2.0-1 - Update to 9.2.0 (close RHBZ#2263250) -* Thu Apr 11 2024 Benjamin A. Beasley - 9.1.3-2 +* Wed Feb 14 2024 Benjamin A. Beasley - 9.1.3-6 - Compress the dev dependency bundle with xz instead of gzip -* Thu Nov 30 2023 Benjamin A. Beasley - 9.1.3-1 +* Sun Feb 11 2024 Yaakov Selkowitz - 9.1.3-5 +- Avoid licensecheck dependency in RHEL builds + +* Thu Feb 08 2024 Benjamin A. Beasley - 9.1.3-4 +- Better audit (and document auditing of) dev dependency licenses + +* Thu Jan 25 2024 Fedora Release Engineering - 9.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 9.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Oct 05 2023 Benjamin A. Beasley - 9.1.3-1 - Update to 9.1.3 (close RHBZ#2242220) -* Thu Nov 30 2023 Benjamin A. Beasley - 9.1.2-1 +* Tue Oct 03 2023 Benjamin A. Beasley - 9.1.2-1 - Update to 9.1.2 -* Thu Nov 30 2023 Benjamin A. Beasley - 9.1.1-1 +* Thu Sep 14 2023 Benjamin A. Beasley - 9.1.1-1 - Update to 9.1.1 -* Thu Nov 30 2023 Benjamin A. Beasley - 9.1.0-1 +* Thu Sep 14 2023 Benjamin A. Beasley - 9.1.0-1 - Update to 9.1.0 -* Thu Nov 30 2023 Benjamin A. Beasley - 9.0.1-1 +* Mon Aug 21 2023 Benjamin A. Beasley - 9.0.1-1 - Update to 9.0.1 (close RHBZ#2228290) -* Thu Nov 30 2023 Benjamin A. Beasley - 9.0.0-1 +* Tue Aug 01 2023 Benjamin A. Beasley - 9.0.0-1 - Update to 9.0.0 * Sat Jul 29 2023 Benjamin A. Beasley - 8.1.1-1 - Update to 8.1.1 (close RHBZ#2216591) -* Sat Jul 29 2023 Benjamin A. Beasley - 8.1.0-3 +* Thu Jul 20 2023 Fedora Release Engineering - 8.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jun 03 2023 Benjamin A. Beasley - 8.1.0-5 +- Remove explicit %%set_build_flags, not needed since F36 + +* Wed Feb 15 2023 Benjamin A. Beasley - 8.1.0-4 - Fix test compiling/execution -* Sat Jul 29 2023 Benjamin A. Beasley - 8.1.0-2 +* Thu Jan 19 2023 Fedora Release Engineering - 8.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Dec 20 2022 Benjamin A. Beasley - 8.1.0-2 - Indicate dirs. in files list with trailing slashes -* Sat Jul 29 2023 Benjamin A. Beasley - 8.1.0-1 +* Sat Oct 15 2022 Benjamin A. Beasley - 8.1.0-1 - Update to 8.1.0 (close RHBZ#2131175) -* Sat Jul 29 2023 Benjamin A. Beasley - 8.0.0-1 +* Sat Oct 15 2022 Benjamin A. Beasley - 8.0.0-1 - Update to 8.0.0 (close RHBZ#2131175) -* Sat Jul 29 2023 Stephen Gallagher - 6.0.10-1 +* Sat Oct 15 2022 Benjamin A. Beasley - 6.0.10-2 +- Drop workarounds for Python 3.10 and older + +* Thu Sep 29 2022 Stephen Gallagher - 6.0.10-1 - Update to v6.0.10 -* Sat Jul 29 2023 Miro Hrončok - 6.0.9-2 +* Thu Aug 25 2022 Miro Hrončok - 6.0.9-2 - Use tomllib/python-tomli instead of dead upstream python-toml -* Sat Jul 29 2023 Benjamin A. Beasley - 6.0.9-1 +* Thu Aug 11 2022 Benjamin A. Beasley - 6.0.9-1 - Update to 6.0.9 (close RHBZ#2116231) - Bumped .so version from downstream 0.1 to upstream 6.0 - Better upstream support for building and installing a shared library - The -devel package now contains a .pc file - Tests are now built with gcc and fully respect distro flags -* Sat Jul 29 2023 Benjamin A. Beasley - 6.0.6-6 +* Thu Jul 21 2022 Fedora Release Engineering - 6.0.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Apr 20 2022 Benjamin A. Beasley - 6.0.6-7 - Drop “forge” macros, which aren’t really doing much here +* Thu Jan 20 2022 Fedora Release Engineering - 6.0.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Dec 24 2021 Benjamin A. Beasley - 6.0.6-5 - Add a note about LLHTTP_STRICT_MODE to the package description