pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/syft syft: apply upstream patch to improve requi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6f04283834a3
branches:  trunk
changeset: 390575:6f04283834a3
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Dec 23 10:03:39 2022 +0000

description:
syft: apply upstream patch to improve requirements.txt parsing

Bump PKGREVISION.

diffstat:

 devel/syft/Makefile                                                       |   5 +-
 devel/syft/distinfo                                                       |   3 +-
 devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go |  19 ++++++++++
 3 files changed, 24 insertions(+), 3 deletions(-)

diffs (59 lines):

diff -r 6bcee69afa9d -r 6f04283834a3 devel/syft/Makefile
--- a/devel/syft/Makefile       Fri Dec 23 09:46:54 2022 +0000
+++ b/devel/syft/Makefile       Fri Dec 23 10:03:39 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2022/12/20 09:09:18 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2022/12/23 10:03:39 wiz Exp $
 
 DISTNAME=      syft-0.63.0
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=anchore/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -12,7 +13,7 @@
 
 USE_LANGUAGES= c
 
-# build tools?
+# build tools
 # https://github.com/anchore/syft/issues/1413
 post-install:
        ${RM} ${DESTDIR}${PREFIX}/bin/generate
diff -r 6bcee69afa9d -r 6f04283834a3 devel/syft/distinfo
--- a/devel/syft/distinfo       Fri Dec 23 09:46:54 2022 +0000
+++ b/devel/syft/distinfo       Fri Dec 23 10:03:39 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2022/12/19 19:03:09 wiz Exp $
+$NetBSD: distinfo,v 1.2 2022/12/23 10:03:39 wiz Exp $
 
 BLAKE2s (4d63.com_gochecknoglobals_@v_v0.1.0.mod) = 44ce95e05c9f2bda0bad21d1c5df80fe04aa5a58d27d291a71c539fa5417c4b0
 SHA512 (4d63.com_gochecknoglobals_@v_v0.1.0.mod) = fed1482cc4df3b59a2d9a2cb927c867779fdaa8428e4323ea1c063df61c66274e2d9a05230b7d827ba7c36d15fcbf575d617f2bae9109332acce4c5f82573655
@@ -9237,4 +9237,5 @@
 SHA1 (patch-internal_ui_ephemeral__terminal__ui.go) = 0d5ea0ae00429b8e45832f297e244b142be50764
 SHA1 (patch-internal_ui_etui__event__handlers.go) = a823a9738edc7481197b7360ecc5410183baefe1
 SHA1 (patch-internal_ui_select.go) = a856804e943dfd93611d4c7d23a020aa4e8f7f69
+SHA1 (patch-syft_pkg_cataloger_python_parse__requirements.go) = 4b9dd7156fe7d405ef670ec18acdf4378b588b11
 SHA1 (patch-syft_source_file__details.go) = 4c484112c9ab86e72b9d886f2bc28b1077e4effc
diff -r 6bcee69afa9d -r 6f04283834a3 devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go Fri Dec 23 10:03:39 2022 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-syft_pkg_cataloger_python_parse__requirements.go,v 1.1 2022/12/23 10:03:39 wiz Exp $
+
+Improve requirements.txt parsing.
+https://github.com/anchore/syft/pull/1417/files
+
+--- syft/pkg/cataloger/python/parse_requirements.go.orig       2022-12-12 17:55:12.000000000 +0000
++++ syft/pkg/cataloger/python/parse_requirements.go
+@@ -56,6 +56,11 @@ func parseRequirementsTxt(_ source.FileR
+               version = strings.TrimFunc(version, func(r rune) bool {
+                       return !unicode.IsLetter(r) && !unicode.IsNumber(r)
+               })
++
++              if name == "" || version == "" {
++                      log.WithFields("path", reader.RealPath).Debugf("found empty package in requirements.txt line: %q", line)
++                      continue
++              }
+               packages = append(packages, newPackageForIndex(name, version, reader.Location))
+       }
+ 



Home | Main Index | Thread Index | Old Index