From cd9053de3b79a7f502680f09a2f69f684de7a42f Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 11 Nov 2025 13:38:43 +0100 Subject: [PATCH] sbom-utility: 0.17.0 -> 0.18.1 Allows to drop previously used in-tree patches. Signed-off-by: Markus Theil --- pkgs/by-name/sb/sbom-utility/name.patch | 13 ----- pkgs/by-name/sb/sbom-utility/package.nix | 14 +---- pkgs/by-name/sb/sbom-utility/stderr.patch | 67 ----------------------- 3 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 pkgs/by-name/sb/sbom-utility/name.patch delete mode 100644 pkgs/by-name/sb/sbom-utility/stderr.patch diff --git a/pkgs/by-name/sb/sbom-utility/name.patch b/pkgs/by-name/sb/sbom-utility/name.patch deleted file mode 100644 index 0edbb05706d4..000000000000 --- a/pkgs/by-name/sb/sbom-utility/name.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmd/root.go b/cmd/root.go -index 5ef5d46..e99b245 100644 ---- a/cmd/root.go -+++ b/cmd/root.go -@@ -139,7 +139,7 @@ const ( - ) - - var rootCmd = &cobra.Command{ -- Use: fmt.Sprintf("%s [command] [flags]", utils.GlobalFlags.Project), -+ Use: fmt.Sprintf("sbom-utility [command] [flags]"), - SilenceErrors: false, - SilenceUsage: false, - Short: MSG_APP_NAME, diff --git a/pkgs/by-name/sb/sbom-utility/package.nix b/pkgs/by-name/sb/sbom-utility/package.nix index 1849fb0dacaa..2fc07069632d 100644 --- a/pkgs/by-name/sb/sbom-utility/package.nix +++ b/pkgs/by-name/sb/sbom-utility/package.nix @@ -9,7 +9,7 @@ }: let - version = "0.17.0"; + version = "0.18.1"; in buildGoModule { pname = "sbom-utility"; @@ -19,21 +19,11 @@ buildGoModule { owner = "CycloneDX"; repo = "sbom-utility"; tag = "v${version}"; - hash = "sha256-LiHCA5q9IJ67jZ2JUcbCFVCYnT36nyq9QzgH9PMr9kM="; + hash = "sha256-LIyr9qu4FQ85EBWzNncztURy1U02VnLMCwEjHwCJvUM="; }; vendorHash = "sha256-vyYSir5u6d5nv+2ScrHpasQGER4VFSoLb1FDUDIrtDM="; - patches = [ - # work around https://github.com/CycloneDX/sbom-utility/issues/121, which otherwise - # breaks shell completions - ./name.patch - # Output logs to stderr rather than stdout. - # Patch of https://github.com/CycloneDX/sbom-utility/pull/122, adapted to apply - # against v0.17.0 - ./stderr.patch - ]; - ldflags = [ "-X main.Version=${version}" ]; diff --git a/pkgs/by-name/sb/sbom-utility/stderr.patch b/pkgs/by-name/sb/sbom-utility/stderr.patch deleted file mode 100644 index 779c53d624d9..000000000000 --- a/pkgs/by-name/sb/sbom-utility/stderr.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/log/log.go b/log/log.go -index 2615f0a..c82b6c5 100644 ---- a/log/log.go -+++ b/log/log.go -@@ -104,7 +104,7 @@ func NewDefaultLogger() *MiniLogger { - tagEnter: DEFAULT_ENTER_TAG, - tagExit: DEFAULT_EXIT_TAG, - tagColor: color.New(color.FgMagenta), -- outputFile: os.Stdout, -+ outputFile: os.Stderr, - maxStrLength: 64, - } - -@@ -361,7 +361,7 @@ func (log MiniLogger) dumpInterface(lvl Level, tag string, value interface{}, sk - } - - // TODO: use a general output writer (set to stdout, stderr, or file stream) -- fmt.Println(sb.String()) -+ fmt.Fprintln(log.outputFile, sb.String()) - } else { - os.Stderr.WriteString("Error: Unable to retrieve call stack. Exiting...") - os.Exit(-2) -@@ -370,7 +370,7 @@ func (log MiniLogger) dumpInterface(lvl Level, tag string, value interface{}, sk - } - - func (log MiniLogger) DumpString(value string) { -- fmt.Print(value) -+ fmt.Fprint(log.outputFile, value) - } - - func (log MiniLogger) DumpStruct(structName string, field interface{}) error { -@@ -389,7 +389,7 @@ func (log MiniLogger) DumpStruct(structName string, field interface{}) error { - } - - // TODO: print to output stream -- fmt.Println(sb.String()) -+ fmt.Fprintln(log.outputFile, sb.String()) - - return nil - } -@@ -398,8 +398,8 @@ func (log MiniLogger) DumpArgs() { - args := os.Args - for i, a := range args { - // TODO: print to output stream -- fmt.Print(log.indentRunes) -- fmt.Printf("os.Arg[%d]: `%v`\n", i, a) -+ fmt.Fprint(log.outputFile, log.indentRunes) -+ fmt.Fprintf(log.outputFile, "os.Arg[%d]: `%v`\n", i, a) - } - } - -@@ -409,7 +409,7 @@ func (log MiniLogger) DumpSeparator(sep byte, repeat int) (string, error) { - for i := 0; i < repeat; i++ { - sb.WriteByte(sep) - } -- fmt.Println(sb.String()) -+ fmt.Fprintln(log.outputFile, sb.String()) - return sb.String(), nil - } else { - return "", errors.New("invalid repeat length (>80)") -@@ -417,5 +417,5 @@ func (log MiniLogger) DumpSeparator(sep byte, repeat int) (string, error) { - } - - func (log *MiniLogger) DumpStackTrace() { -- fmt.Println(string(debug.Stack())) -+ fmt.Fprintln(log.outputFile, string(debug.Stack())) - }