pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/syft



Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Dec 23 10:03:39 UTC 2022

Modified Files:
        pkgsrc/devel/syft: Makefile distinfo
Added Files:
        pkgsrc/devel/syft/patches:
            patch-syft_pkg_cataloger_python_parse__requirements.go

Log Message:
syft: apply upstream patch to improve requirements.txt parsing

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/syft/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/syft/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/syft/Makefile
diff -u pkgsrc/devel/syft/Makefile:1.2 pkgsrc/devel/syft/Makefile:1.3
--- pkgsrc/devel/syft/Makefile:1.2      Tue Dec 20 09:09:18 2022
+++ pkgsrc/devel/syft/Makefile  Fri Dec 23 10:03:39 2022
@@ -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 @@ LICENSE=      apache-2.0
 
 USE_LANGUAGES= c
 
-# build tools?
+# build tools
 # https://github.com/anchore/syft/issues/1413
 post-install:
        ${RM} ${DESTDIR}${PREFIX}/bin/generate

Index: pkgsrc/devel/syft/distinfo
diff -u pkgsrc/devel/syft/distinfo:1.1 pkgsrc/devel/syft/distinfo:1.2
--- pkgsrc/devel/syft/distinfo:1.1      Mon Dec 19 19:03:09 2022
+++ pkgsrc/devel/syft/distinfo  Fri Dec 23 10:03:39 2022
@@ -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 @@ Size (syft-0.63.0.tar.gz) = 5409030 byte
 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

Added files:

Index: pkgsrc/devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go
diff -u /dev/null pkgsrc/devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go:1.1
--- /dev/null   Fri Dec 23 10:03:39 2022
+++ pkgsrc/devel/syft/patches/patch-syft_pkg_cataloger_python_parse__requirements.go    Fri Dec 23 10:03:39 2022
@@ -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