Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nfpm for openSUSE:Factory checked in 
at 2024-10-27 11:25:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nfpm (Old)
 and      /work/SRC/openSUSE:Factory/.nfpm.new.2020 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nfpm"

Sun Oct 27 11:25:24 2024 rev:5 rq:1218408 version:2.41.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nfpm/nfpm.changes        2024-09-16 
17:43:04.977074721 +0200
+++ /work/SRC/openSUSE:Factory/.nfpm.new.2020/nfpm.changes      2024-10-27 
11:25:48.863745952 +0100
@@ -1,0 +2,27 @@
+Fri Oct 25 16:53:37 UTC 2024 - opensuse_buildserv...@ojkastl.de
+
+- Update to version 2.41.0:
+  * docs: fix bad documentation
+  * fix: improve init
+  * chore(deps): bump anchore/sbom-action from 0.17.2 to 0.17.3
+    (#867)
+  * feat(deps): bump github.com/klauspost/compress from 1.17.10 to
+    1.17.11 (#868)
+  * chore(deps): bump actions/cache from 4.1.0 to 4.1.1 (#866)
+  * chore(deps): bump sigstore/cosign-installer from 3.6.0 to 3.7.0
+    (#865)
+  * chore(deps): bump actions/cache from 4.0.2 to 4.1.0 (#864)
+  * chore(deps): bump cachix/install-nix-action from 29 to 30
+    (#863)
+  * docs: fix arch and platform env var examples (#862)
+  * chore(deps): bump cachix/install-nix-action from V28 to 29
+    (#861)
+  * feat(deps): bump github.com/klauspost/compress from 1.17.9 to
+    1.17.10 (#860)
+  * feat(rpm): support %config(missingok) (#854)
+  * fix: undefined variable 'staging-pkgs' (#858)
+  * chore(deps): bump cachix/install-nix-action from V27 to 28
+    (#855)
+  * docs: update cmd docs
+
+-------------------------------------------------------------------

Old:
----
  nfpm-2.40.0.obscpio

New:
----
  nfpm-2.41.0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nfpm.spec ++++++
--- /var/tmp/diff_new_pack.tLXyWv/_old  2024-10-27 11:25:49.615777126 +0100
+++ /var/tmp/diff_new_pack.tLXyWv/_new  2024-10-27 11:25:49.619777292 +0100
@@ -16,17 +16,18 @@
 #
 
 
-%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
-
 Name:           nfpm
-Version:        2.40.0
+Version:        2.41.0
 Release:        0
 Summary:        Simple deb, rpm, apk and arch linux packager written in Go
 License:        MIT
 URL:            https://github.com/goreleaser/nfpm
 Source:         %{name}-%{version}.tar.gz
 Source1:        vendor.tar.gz
+BuildRequires:  bash-completion
+BuildRequires:  fish
 BuildRequires:  go >= 1.22
+BuildRequires:  zsh
 
 %description
 nFPM is a simple and 0-dependencies deb, rpm, apk and arch linux packager
@@ -95,8 +96,8 @@
 %{buildroot}/%{_bindir}/%{name} completion fish > 
%{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish
 
 # create the zsh completion file
-mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d/
-%{buildroot}/%{_bindir}/%{name} completion zsh > 
%{buildroot}%{_datarootdir}/zsh_completion.d/_%{name}
+mkdir -p %{buildroot}%{_datarootdir}/zsh/site-functions/
+%{buildroot}/%{_bindir}/%{name} completion zsh > 
%{buildroot}%{_datarootdir}/zsh/site-functions/_%{name}
 
 %files
 %doc README.md
@@ -104,16 +105,11 @@
 %{_bindir}/%{name}
 
 %files -n %{name}-bash-completion
-%dir %{_datarootdir}/bash-completion/completions/
 %{_datarootdir}/bash-completion/completions/%{name}
 
 %files -n %{name}-fish-completion
-%dir %{_datarootdir}/fish
-%dir %{_datarootdir}/fish/vendor_completions.d
 %{_datarootdir}/fish/vendor_completions.d/%{name}.fish
 
 %files -n %{name}-zsh-completion
-%defattr(-,root,root)
-%dir %{_datarootdir}/zsh_completion.d/
-%{_datarootdir}/zsh_completion.d/_%{name}
+%{_datarootdir}/zsh/site-functions/_%{name}
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.tLXyWv/_old  2024-10-27 11:25:49.655778783 +0100
+++ /var/tmp/diff_new_pack.tLXyWv/_new  2024-10-27 11:25:49.659778949 +0100
@@ -3,10 +3,10 @@
     <param name="url">https://github.com/goreleaser/nfpm</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v2.40.0</param>
+    <param name="revision">v2.41.0</param>
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="changesgenerate">enable</param>
     <param name="versionrewrite-pattern">v(.*)</param>
+    <param name="changesgenerate">enable</param>
   </service>
   <service name="set_version" mode="manual">
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.tLXyWv/_old  2024-10-27 11:25:49.683779944 +0100
+++ /var/tmp/diff_new_pack.tLXyWv/_new  2024-10-27 11:25:49.687780110 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/goreleaser/nfpm</param>
-              <param 
name="changesrevision">db338d012a43be3c7f9c5a450eca2e279c973de4</param></service></servicedata>
+              <param 
name="changesrevision">fec4263cb2da9554b4dffaecc606b6392a244c03</param></service></servicedata>
 (No newline at EOF)
 

++++++ nfpm-2.40.0.obscpio -> nfpm-2.41.0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/.github/workflows/docs.yml 
new/nfpm-2.41.0/.github/workflows/docs.yml
--- old/nfpm-2.40.0/.github/workflows/docs.yml  2024-08-29 13:36:48.000000000 
+0200
+++ new/nfpm-2.41.0/.github/workflows/docs.yml  2024-10-25 16:32:34.000000000 
+0200
@@ -20,7 +20,7 @@
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - uses: cachix/install-nix-action@V27
+      - uses: cachix/install-nix-action@v30
         with:
           nix_path: nixpkgs=channel:nixos-unstable
           github_access_token: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/.github/workflows/release.yml 
new/nfpm-2.41.0/.github/workflows/release.yml
--- old/nfpm-2.40.0/.github/workflows/release.yml       2024-08-29 
13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/.github/workflows/release.yml       2024-10-25 
16:32:34.000000000 +0200
@@ -34,11 +34,11 @@
       - uses: arduino/setup-task@v2
         with:
           repo-token: ${{ secrets.GITHUB_TOKEN }}
-      - uses: sigstore/cosign-installer@v3.6.0
-      - uses: anchore/sbom-action/download-syft@v0.17.2
+      - uses: sigstore/cosign-installer@v3.7.0
+      - uses: anchore/sbom-action/download-syft@v0.17.3
       - uses: docker/setup-qemu-action@v3
       - uses: docker/setup-buildx-action@v3
-      - uses: cachix/install-nix-action@V27
+      - uses: cachix/install-nix-action@v30
         with:
           github_access_token: ${{ secrets.GITHUB_TOKEN }}
       - run: task setup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/.github/workflows/windows.yml 
new/nfpm-2.41.0/.github/workflows/windows.yml
--- old/nfpm-2.40.0/.github/workflows/windows.yml       2024-08-29 
13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/.github/workflows/windows.yml       2024-10-25 
16:32:34.000000000 +0200
@@ -51,7 +51,7 @@
       - shell: bash
         run: |
           echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
-      - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
+      - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
         with:
           path: dist/
           key: ${{ env.sha_short }}
@@ -69,7 +69,7 @@
       - shell: bash
         run: |
           echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
-      - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
+      - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
         with:
           path: dist/
           key: ${{ env.sha_short }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/apk/apk_test.go 
new/nfpm-2.41.0/apk/apk_test.go
--- old/nfpm-2.40.0/apk/apk_test.go     2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/apk/apk_test.go     2024-10-25 16:32:34.000000000 +0200
@@ -82,6 +82,11 @@
                                        Type:        files.TypeConfigNoReplace,
                                },
                                {
+                                       Source:      
"../testdata/whatever.conf",
+                                       Destination: "/etc/fake/fake3.conf",
+                                       Type:        files.TypeConfigMissingOK,
+                               },
+                               {
                                        Destination: "/var/log/whatever",
                                        Type:        files.TypeDir,
                                },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/arch/arch.go new/nfpm-2.41.0/arch/arch.go
--- old/nfpm-2.40.0/arch/arch.go        2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/arch/arch.go        2024-10-25 16:32:34.000000000 +0200
@@ -359,7 +359,7 @@
        }
 
        for _, content := range info.Contents {
-               if content.Type == files.TypeConfig || content.Type == 
files.TypeConfigNoReplace {
+               if content.Type == files.TypeConfig || content.Type == 
files.TypeConfigNoReplace || content.Type == files.TypeConfigMissingOK {
                        path := files.AsRelativePath(content.Destination)
 
                        if err := writeKVPair(buf, "backup", path); err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/deb/deb.go new/nfpm-2.41.0/deb/deb.go
--- old/nfpm-2.40.0/deb/deb.go  2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/deb/deb.go  2024-10-25 16:32:34.000000000 +0200
@@ -681,7 +681,7 @@
        var confs []string
        for _, file := range info.Contents {
                switch file.Type {
-               case files.TypeConfig, files.TypeConfigNoReplace:
+               case files.TypeConfig, files.TypeConfigNoReplace, 
files.TypeConfigMissingOK:
                        confs = append(confs, 
files.NormalizeAbsoluteFilePath(file.Destination))
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/deb/deb_test.go 
new/nfpm-2.41.0/deb/deb_test.go
--- old/nfpm-2.40.0/deb/deb_test.go     2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/deb/deb_test.go     2024-10-25 16:32:34.000000000 +0200
@@ -86,6 +86,11 @@
                                        Type:        files.TypeConfigNoReplace,
                                },
                                {
+                                       Source:      
"../testdata/whatever.conf",
+                                       Destination: "/etc/fake/fake3.conf",
+                                       Type:        files.TypeConfigMissingOK,
+                               },
+                               {
                                        Destination: "/var/log/whatever",
                                        Type:        files.TypeDir,
                                },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/files/files.go 
new/nfpm-2.41.0/files/files.go
--- old/nfpm-2.40.0/files/files.go      2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/files/files.go      2024-10-25 16:32:34.000000000 +0200
@@ -32,9 +32,13 @@
        // user of the package.
        TypeConfig = "config"
        // TypeConfigNoReplace is like TypeConfig with an added noreplace 
directive
-       // that is respected by RPM-based distributions. For all other packages 
it
-       // is handled exactly like TypeConfig.
+       // that is respected by RPM-based distributions.
+       // For all other package formats it is handled exactly like TypeConfig.
        TypeConfigNoReplace = "config|noreplace"
+       // TypeConfigMissingOK is like TypeConfig with an added missingok 
directive
+       // that is respected by RPM-based distributions.
+       // For all other package formats it is handled exactly like TypeConfig.
+       TypeConfigMissingOK = "config|missingok"
        // TypeGhost is the type of an RPM ghost file which is ignored by other 
packagers.
        TypeRPMGhost = "ghost"
        // TypeRPMDoc is the type of an RPM doc file which is ignored by other 
packagers.
@@ -289,7 +293,7 @@
                        if err != nil {
                                return nil, fmt.Errorf("add tree: %w", err)
                        }
-               case TypeConfig, TypeConfigNoReplace, TypeFile, "":
+               case TypeConfig, TypeConfigNoReplace, TypeConfigMissingOK, 
TypeFile, "":
                        globbed, err := glob.Glob(
                                filepath.ToSlash(content.Source),
                                filepath.ToSlash(content.Destination),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/flake.nix new/nfpm-2.41.0/flake.nix
--- old/nfpm-2.40.0/flake.nix   2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/flake.nix   2024-10-25 16:32:34.000000000 +0200
@@ -43,7 +43,7 @@
 
         # nix develop .#docs
         devShells.docs = pkgs.mkShell {
-          packages = with pkgs; with staging-pkgs.python311Packages; [
+          packages = with pkgs; with pkgs.python311Packages; [
             (pkgs.writeScriptBin "ci-docs" "task docs:test")
             go-task
             htmltest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/go.mod new/nfpm-2.41.0/go.mod
--- old/nfpm-2.40.0/go.mod      2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/go.mod      2024-10-25 16:32:34.000000000 +0200
@@ -14,7 +14,7 @@
        github.com/goreleaser/chglog v0.6.1
        github.com/goreleaser/fileglob v1.3.0
        github.com/invopop/jsonschema v0.12.0
-       github.com/klauspost/compress v1.17.9
+       github.com/klauspost/compress v1.17.11
        github.com/klauspost/pgzip v1.2.6
        github.com/muesli/mango-cobra v1.2.0
        github.com/muesli/roff v0.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/go.sum new/nfpm-2.41.0/go.sum
--- old/nfpm-2.40.0/go.sum      2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/go.sum      2024-10-25 16:32:34.000000000 +0200
@@ -99,8 +99,8 @@
 github.com/jtolds/gls v4.20.0+incompatible/go.mod 
h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
 github.com/kevinburke/ssh_config v1.2.0 
h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
 github.com/kevinburke/ssh_config v1.2.0/go.mod 
h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
-github.com/klauspost/compress v1.17.9 
h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod 
h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11 
h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod 
h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
 github.com/klauspost/pgzip v1.2.6 
h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
 github.com/klauspost/pgzip v1.2.6/go.mod 
h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
 github.com/kr/pretty v0.1.0/go.mod 
h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/internal/cmd/example.yml 
new/nfpm-2.41.0/internal/cmd/example.yml
--- old/nfpm-2.40.0/internal/cmd/example.yml    1970-01-01 01:00:00.000000000 
+0100
+++ new/nfpm-2.41.0/internal/cmd/example.yml    2024-10-25 16:32:34.000000000 
+0200
@@ -0,0 +1,56 @@
+# This is an example nfpm configuration file.
+# Make sure to check the documentation at https://nfpm.goreleaser.com
+#
+# The lines below are called `modelines`. See `:help modeline`
+# Feel free to remove those if you don't want/need to use them.
+# yaml-language-server: $schema=https://nfpm.goreleaser.com/static/schema.json
+# vim: set ts=2 sw=2 tw=0 fo=cnqoj
+
+name: "foo"
+arch: "amd64"
+platform: "linux"
+version: "1.0.0"
+section: "default"
+priority: "extra"
+replaces:
+  - foobar
+provides:
+  - bar
+depends:
+  - foo
+  - bar
+recommends:
+  - whatever
+suggests:
+  - something-else
+conflicts:
+  - not-foo
+  - not-bar
+maintainer: "John Doe <j...@example.com>"
+description: |
+  FooBar is the great foo and bar software.
+    And this can be in multiple lines!
+vendor: "FooBarCorp"
+homepage: "http://example.com";
+license: "MIT"
+changelog: "changelog.yaml"
+contents:
+  - src: ./foo
+    dst: /usr/bin/foo
+  - src: ./bar
+    dst: /usr/bin/bar
+  - src: ./foobar.conf
+    dst: /etc/foobar.conf
+    type: config
+  - src: /usr/bin/foo
+    dst: /sbin/foo
+    type: symlink
+overrides:
+  rpm:
+    scripts:
+      preinstall: ./scripts/preinstall.sh
+      postremove: ./scripts/postremove.sh
+  deb:
+    scripts:
+      postinstall: ./scripts/postinstall.sh
+      preremove: ./scripts/preremove.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/internal/cmd/init.go 
new/nfpm-2.41.0/internal/cmd/init.go
--- old/nfpm-2.40.0/internal/cmd/init.go        2024-08-29 13:36:48.000000000 
+0200
+++ new/nfpm-2.41.0/internal/cmd/init.go        2024-10-25 16:32:34.000000000 
+0200
@@ -1,12 +1,16 @@
 package cmd
 
 import (
+       _ "embed"
        "fmt"
        "os"
 
        "github.com/spf13/cobra"
 )
 
+//go:embed example.yml
+var example []byte
+
 type initCmd struct {
        cmd    *cobra.Command
        config string
@@ -23,7 +27,7 @@
                Args:              cobra.NoArgs,
                ValidArgsFunction: cobra.NoFileCompletions,
                RunE: func(_ *cobra.Command, _ []string) error {
-                       if err := os.WriteFile(root.config, []byte(example), 
0o666); err != nil {
+                       if err := os.WriteFile(root.config, example, 0o666); 
err != nil {
                                return fmt.Errorf("failed to create example 
file: %w", err)
                        }
                        return nil
@@ -36,57 +40,3 @@
        root.cmd = cmd
        return root
 }
-
-const example = `# nfpm example configuration file
-#
-# check https://nfpm.goreleaser.com/configuration for detailed usage
-#
-name: "foo"
-arch: "amd64"
-platform: "linux"
-version: "1.0.0"
-section: "default"
-priority: "extra"
-replaces:
-- foobar
-provides:
-- bar
-depends:
-- foo
-- bar
-recommends:
-- whatever
-suggests:
-- something-else
-conflicts:
-- not-foo
-- not-bar
-maintainer: "John Doe <j...@example.com>"
-description: |
-  FooBar is the great foo and bar software.
-    And this can be in multiple lines!
-vendor: "FooBarCorp"
-homepage: "http://example.com";
-license: "MIT"
-changelog: "changelog.yaml"
-contents:
-- src: ./foo
-  dst: /usr/bin/foo
-- src: ./bar
-  dst: /usr/bin/bar
-- src: ./foobar.conf
-  dst: /etc/foobar.conf
-  type: config
-- src: /usr/bin/foo
-  dst: /sbin/foo
-  type: symlink
-overrides:
-  rpm:
-    scripts:
-      preinstall: ./scripts/preinstall.sh
-      postremove: ./scripts/postremove.sh
-  deb:
-    scripts:
-      postinstall: ./scripts/postinstall.sh
-      preremove: ./scripts/preremove.sh
-`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/ipk/ipk.go new/nfpm-2.41.0/ipk/ipk.go
--- old/nfpm-2.40.0/ipk/ipk.go  2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/ipk/ipk.go  2024-10-25 16:32:34.000000000 +0200
@@ -205,7 +205,7 @@
                                        ModTime:  modtime.Get(info.MTime),
                                        Linkname: file.Source,
                                })
-               case files.TypeFile, files.TypeTree, files.TypeConfig, 
files.TypeConfigNoReplace:
+               case files.TypeFile, files.TypeTree, files.TypeConfig, 
files.TypeConfigNoReplace, files.TypeConfigMissingOK:
                        size, err = writeFile(tw, file)
                default:
                        // ignore everything else
@@ -293,7 +293,7 @@
        var confs []string
        for _, file := range info.Contents {
                switch file.Type {
-               case files.TypeConfig, files.TypeConfigNoReplace:
+               case files.TypeConfig, files.TypeConfigNoReplace, 
files.TypeConfigMissingOK:
                        confs = append(confs, 
files.NormalizeAbsoluteFilePath(file.Destination))
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/ipk/ipk_test.go 
new/nfpm-2.41.0/ipk/ipk_test.go
--- old/nfpm-2.40.0/ipk/ipk_test.go     2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/ipk/ipk_test.go     2024-10-25 16:32:34.000000000 +0200
@@ -72,6 +72,11 @@
                                        Type:        files.TypeConfigNoReplace,
                                },
                                {
+                                       Source:      
"../testdata/whatever.conf",
+                                       Destination: "/etc/fake/fake3.conf",
+                                       Type:        files.TypeConfigNoReplace,
+                               },
+                               {
                                        Destination: "/var/log/whatever",
                                        Type:        files.TypeDir,
                                },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/rpm/rpm.go new/nfpm-2.41.0/rpm/rpm.go
--- old/nfpm-2.40.0/rpm/rpm.go  2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/rpm/rpm.go  2024-10-25 16:32:34.000000000 +0200
@@ -373,6 +373,8 @@
                        file, err = asRPMFile(content, rpmpack.ConfigFile)
                case files.TypeConfigNoReplace:
                        file, err = asRPMFile(content, 
rpmpack.ConfigFile|rpmpack.NoReplaceFile)
+               case files.TypeConfigMissingOK:
+                       file, err = asRPMFile(content, 
rpmpack.ConfigFile|rpmpack.MissingOkFile)
                case files.TypeRPMGhost:
                        if content.FileInfo.Mode == 0 {
                                content.FileInfo.Mode = os.FileMode(0o644)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/rpm/rpm_test.go 
new/nfpm-2.41.0/rpm/rpm_test.go
--- old/nfpm-2.40.0/rpm/rpm_test.go     2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/rpm/rpm_test.go     2024-10-25 16:32:34.000000000 +0200
@@ -595,6 +595,42 @@
        })
 }
 
+func TestConfigMissingOK(t *testing.T) {
+       var (
+               buildConfigFile   = "../testdata/whatever.conf"
+               packageConfigFile = "/etc/fake/fake.conf"
+       )
+
+       info := &nfpm.Info{
+               Name:        "symlink-in-files",
+               Arch:        "amd64",
+               Description: "This package's config references a file via 
symlink.",
+               Version:     "1.0.0",
+               Maintainer:  "maintainer",
+               Overridables: nfpm.Overridables{
+                       Contents: []*files.Content{
+                               {
+                                       Source:      buildConfigFile,
+                                       Destination: packageConfigFile,
+                                       Type:        files.TypeConfigMissingOK,
+                               },
+                       },
+               },
+       }
+
+       var rpmFileBuffer bytes.Buffer
+       err := Default.Package(info, &rpmFileBuffer)
+       require.NoError(t, err)
+
+       expectedConfigContent, err := os.ReadFile(buildConfigFile)
+       require.NoError(t, err)
+
+       packageConfigContent, err := extractFileFromRpm(rpmFileBuffer.Bytes(), 
packageConfigFile)
+       require.NoError(t, err)
+
+       require.Equal(t, expectedConfigContent, packageConfigContent)
+}
+
 func TestConfigNoReplace(t *testing.T) {
        var (
                buildConfigFile   = "../testdata/whatever.conf"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/www/docs/configuration.md 
new/nfpm-2.41.0/www/docs/configuration.md
--- old/nfpm-2.40.0/www/docs/configuration.md   2024-08-29 13:36:48.000000000 
+0200
+++ new/nfpm-2.41.0/www/docs/configuration.md   2024-10-25 16:32:34.000000000 
+0200
@@ -2,23 +2,23 @@
 
 ## Reference
 
-A commented `nfpm.yaml` config file example:
+A commented `nfpm.yaml` configuration file example:
 
 ```yaml
 # Name. (required)
 name: foo
 
 # Architecture. (required)
-# This will expand any env var you set in the field, e.g. version: ${GOARCH}
+# This will expand any env var you set in the field, e.g. arch: ${GOARCH}
 # The architecture is specified using Go nomenclature (GOARCH) and translated
 # to the platform specific equivalent. In order to manually set the 
architecture
-# to a platform specific value, use deb_arch, rpm_arch and apk_arch.
+# to a platform specific value, set `{format}.arch`.
 # Examples: `all`, `amd64`, `386`, `arm5`, `arm6`, `arm7`, `arm64`, `mips`,
 # `mipsle`, `mips64le`, `ppc64le`, `s390`
 arch: amd64
 
 # Platform.
-# This will expand any env var you set in the field, e.g. version: ${GOOS}
+# This will expand any env var you set in the field, e.g. platform: ${GOOS}
 # This is only used by the rpm and deb packagers.
 # Examples: `linux` (default), `darwin`
 platform: linux
@@ -209,6 +209,12 @@
     dst: /etc/bar.conf
     type: config|noreplace
 
+  # Corresponds to `%config(missingok)` if the packager is rpm, otherwise it
+  # is just a config file
+  - src: path/to/local/bar.conf
+    dst: /etc/bar.conf
+    type: config|missingok
+
   # These files are not actually present in the package, but the file names
   # are added to the package header. From the RPM directives documentation:
   #
@@ -320,7 +326,7 @@
 rpm:
   # rpm specific architecture name that overrides "arch" without performing any
   # replacements.
-  rpm_arch: ia64
+  arch: ia64
 
   # RPM specific scripts.
   scripts:
@@ -369,7 +375,7 @@
 # Custom configuration applied only to the Deb packager.
 deb:
   # deb specific architecture name that overrides "arch" without performing 
any replacements.
-  deb_arch: arm
+  arch: arm
 
   # Custom deb special files.
   scripts:
@@ -437,7 +443,7 @@
 
 apk:
   # apk specific architecture name that overrides "arch" without performing 
any replacements.
-  apk_arch: armhf
+  arch: armhf
 
   # The package is signed if a key_file is set
   signature:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/www/docs/index.md 
new/nfpm-2.41.0/www/docs/index.md
--- old/nfpm-2.40.0/www/docs/index.md   2024-08-29 13:36:48.000000000 +0200
+++ new/nfpm-2.41.0/www/docs/index.md   2024-10-25 16:32:34.000000000 +0200
@@ -21,7 +21,7 @@
 This is a subtle way of saying it won't have all features, nor all
 formats that `fpm` has: it is supposed to be simpler.
 
-And that's OK!, most of us don't need all those features most of the time.
+And that's OK! Most of us don't need all those features most of the time.
 
 [fpm]: https://github.com/jordansissel/fpm
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nfpm-2.40.0/www/docs/static/latest 
new/nfpm-2.41.0/www/docs/static/latest
--- old/nfpm-2.40.0/www/docs/static/latest      2024-08-29 13:36:48.000000000 
+0200
+++ new/nfpm-2.41.0/www/docs/static/latest      2024-10-25 16:32:34.000000000 
+0200
@@ -1 +1 @@
-v2.39.0
+v2.40.0

++++++ nfpm.obsinfo ++++++
--- /var/tmp/diff_new_pack.tLXyWv/_old  2024-10-27 11:25:49.955791220 +0100
+++ /var/tmp/diff_new_pack.tLXyWv/_new  2024-10-27 11:25:49.959791385 +0100
@@ -1,5 +1,5 @@
 name: nfpm
-version: 2.40.0
-mtime: 1724931408
-commit: db338d012a43be3c7f9c5a450eca2e279c973de4
+version: 2.41.0
+mtime: 1729866754
+commit: fec4263cb2da9554b4dffaecc606b6392a244c03
 

++++++ vendor.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/github.com/klauspost/compress/.goreleaser.yml 
new/vendor/github.com/klauspost/compress/.goreleaser.yml
--- old/vendor/github.com/klauspost/compress/.goreleaser.yml    2024-09-14 
18:26:01.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/.goreleaser.yml    2024-10-25 
18:53:41.000000000 +0200
@@ -1,5 +1,5 @@
-# This is an example goreleaser.yaml file with some sane defaults.
-# Make sure to check the documentation at http://goreleaser.com
+version: 2
+
 before:
   hooks:
     - ./gen.sh
@@ -99,7 +99,7 @@
 checksum:
   name_template: 'checksums.txt'
 snapshot:
-  name_template: "{{ .Tag }}-next"
+  version_template: "{{ .Tag }}-next"
 changelog:
   sort: asc
   filters:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/github.com/klauspost/compress/README.md 
new/vendor/github.com/klauspost/compress/README.md
--- old/vendor/github.com/klauspost/compress/README.md  2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/README.md  2024-10-25 
18:53:41.000000000 +0200
@@ -16,6 +16,27 @@
 
 # changelog
 
+* Sep 23rd, 2024 - 
[1.17.10](https://github.com/klauspost/compress/releases/tag/v1.17.10)
+       * gzhttp: Add TransportAlwaysDecompress option. 
https://github.com/klauspost/compress/pull/978
+       * gzhttp: Add supported decompress request body by @mirecl in 
https://github.com/klauspost/compress/pull/1002
+       * s2: Add EncodeBuffer buffer recycling callback 
https://github.com/klauspost/compress/pull/982
+       * zstd: Improve memory usage on small streaming encodes 
https://github.com/klauspost/compress/pull/1007
+       * flate: read data written with partial flush by @vajexal in 
https://github.com/klauspost/compress/pull/996
+
+* Jun 12th, 2024 - 
[1.17.9](https://github.com/klauspost/compress/releases/tag/v1.17.9)
+       * s2: Reduce ReadFrom temporary allocations 
https://github.com/klauspost/compress/pull/949
+       * flate, zstd: Shave some bytes off amd64 matchLen by @greatroar in 
https://github.com/klauspost/compress/pull/963
+       * Upgrade zip/zlib to 1.22.4 upstream 
https://github.com/klauspost/compress/pull/970 
https://github.com/klauspost/compress/pull/971
+       * zstd: BuildDict fails with RLE table 
https://github.com/klauspost/compress/pull/951
+
+* Apr 9th, 2024 - 
[1.17.8](https://github.com/klauspost/compress/releases/tag/v1.17.8)
+       * zstd: Reject blocks where reserved values are not 0 
https://github.com/klauspost/compress/pull/885
+       * zstd: Add RLE detection+encoding 
https://github.com/klauspost/compress/pull/938
+
+* Feb 21st, 2024 - 
[1.17.7](https://github.com/klauspost/compress/releases/tag/v1.17.7)
+       * s2: Add AsyncFlush method: Complete the block without flushing by 
@Jille in https://github.com/klauspost/compress/pull/927
+       * s2: Fix literal+repeat exceeds dst crash 
https://github.com/klauspost/compress/pull/930
+  
 * Feb 5th, 2024 - 
[1.17.6](https://github.com/klauspost/compress/releases/tag/v1.17.6)
        * zstd: Fix incorrect repeat coding in best mode 
https://github.com/klauspost/compress/pull/923
        * s2: Fix DecodeConcurrent deadlock on errors 
https://github.com/klauspost/compress/pull/925
@@ -81,7 +102,7 @@
        * zstd: Various minor improvements by @greatroar in 
https://github.com/klauspost/compress/pull/788 
https://github.com/klauspost/compress/pull/794 
https://github.com/klauspost/compress/pull/795
        * s2: Fix huge block overflow 
https://github.com/klauspost/compress/pull/779
        * s2: Allow CustomEncoder fallback 
https://github.com/klauspost/compress/pull/780
-       * gzhttp: Suppport ResponseWriter Unwrap() in gzhttp handler by 
@jgimenez in https://github.com/klauspost/compress/pull/799
+       * gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by 
@jgimenez in https://github.com/klauspost/compress/pull/799
 
 * Mar 13, 2023 - 
[v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
        * zstd: Speed up + improve best encoder by @greatroar in 
https://github.com/klauspost/compress/pull/776
@@ -136,7 +157,7 @@
        * zstd: Add 
[WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit)
 https://github.com/klauspost/compress/pull/649
        * Add Go 1.19 - deprecate Go 1.16  
https://github.com/klauspost/compress/pull/651
        * flate: Improve level 5+6 compression 
https://github.com/klauspost/compress/pull/656
-       * zstd: Improve "better" compresssion  
https://github.com/klauspost/compress/pull/657
+       * zstd: Improve "better" compression  
https://github.com/klauspost/compress/pull/657
        * s2: Improve "best" compression 
https://github.com/klauspost/compress/pull/658
        * s2: Improve "better" compression. 
https://github.com/klauspost/compress/pull/635
        * s2: Slightly faster non-assembly decompression 
https://github.com/klauspost/compress/pull/646
@@ -339,7 +360,7 @@
        * s2: Fix binaries.
 
 * Feb 25, 2021 (v1.11.8)
-       * s2: Fixed occational out-of-bounds write on amd64. Upgrade 
recommended.
+       * s2: Fixed occasional out-of-bounds write on amd64. Upgrade 
recommended.
        * s2: Add AMD64 assembly for better mode. 25-50% faster. 
[#315](https://github.com/klauspost/compress/pull/315)
        * s2: Less upfront decoder allocation. 
[#322](https://github.com/klauspost/compress/pull/322)
        * zstd: Faster "compression" of incompressible data. 
[#314](https://github.com/klauspost/compress/pull/314)
@@ -518,7 +539,7 @@
 * Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% 
faster.
 * Feb 19, 2016: Handle small payloads faster in level 1-3.
 * Feb 19, 2016: Added faster level 2 + 3 compression modes.
-* Feb 19, 2016: [Rebalanced compression 
levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so 
there is a more even progresssion in terms of compression. New default level is 
5.
+* Feb 19, 2016: [Rebalanced compression 
levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so 
there is a more even progression in terms of compression. New default level is 
5.
 * Feb 14, 2016: Snappy: Merge upstream changes. 
 * Feb 14, 2016: Snappy: Fix aggressive skipping.
 * Feb 14, 2016: Snappy: Update benchmark.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/flate/deflate.go 
new/vendor/github.com/klauspost/compress/flate/deflate.go
--- old/vendor/github.com/klauspost/compress/flate/deflate.go   2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/flate/deflate.go   2024-10-25 
18:53:41.000000000 +0200
@@ -861,7 +861,7 @@
        }
        switch d.compressionLevel.chain {
        case 0:
-               // level was NoCompression or ConstantCompresssion.
+               // level was NoCompression or ConstantCompression.
                d.windowEnd = 0
        default:
                s := d.state
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/flate/inflate.go 
new/vendor/github.com/klauspost/compress/flate/inflate.go
--- old/vendor/github.com/klauspost/compress/flate/inflate.go   2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/flate/inflate.go   2024-10-25 
18:53:41.000000000 +0200
@@ -298,6 +298,14 @@
        huffmanGenericReader
 )
 
+// flushMode tells decompressor when to return data
+type flushMode uint8
+
+const (
+       syncFlush    flushMode = iota // return data after sync flush block
+       partialFlush                  // return data after each block
+)
+
 // Decompress state.
 type decompressor struct {
        // Input source.
@@ -332,6 +340,8 @@
 
        nb    uint
        final bool
+
+       flushMode flushMode
 }
 
 func (f *decompressor) nextBlock() {
@@ -618,7 +628,10 @@
        }
 
        if n == 0 {
-               f.toRead = f.dict.readFlush()
+               if f.flushMode == syncFlush {
+                       f.toRead = f.dict.readFlush()
+               }
+
                f.finishBlock()
                return
        }
@@ -657,8 +670,12 @@
                if f.dict.availRead() > 0 {
                        f.toRead = f.dict.readFlush()
                }
+
                f.err = io.EOF
+       } else if f.flushMode == partialFlush && f.dict.availRead() > 0 {
+               f.toRead = f.dict.readFlush()
        }
+
        f.step = nextBlock
 }
 
@@ -789,15 +806,25 @@
        return nil
 }
 
-// NewReader returns a new ReadCloser that can be used
-// to read the uncompressed version of r.
-// If r does not also implement io.ByteReader,
-// the decompressor may read more data than necessary from r.
-// It is the caller's responsibility to call Close on the ReadCloser
-// when finished reading.
-//
-// The ReadCloser returned by NewReader also implements Resetter.
-func NewReader(r io.Reader) io.ReadCloser {
+type ReaderOpt func(*decompressor)
+
+// WithPartialBlock tells decompressor to return after each block,
+// so it can read data written with partial flush
+func WithPartialBlock() ReaderOpt {
+       return func(f *decompressor) {
+               f.flushMode = partialFlush
+       }
+}
+
+// WithDict initializes the reader with a preset dictionary
+func WithDict(dict []byte) ReaderOpt {
+       return func(f *decompressor) {
+               f.dict.init(maxMatchOffset, dict)
+       }
+}
+
+// NewReaderOpts returns new reader with provided options
+func NewReaderOpts(r io.Reader, opts ...ReaderOpt) io.ReadCloser {
        fixedHuffmanDecoderInit()
 
        var f decompressor
@@ -806,9 +833,26 @@
        f.codebits = new([numCodes]int)
        f.step = nextBlock
        f.dict.init(maxMatchOffset, nil)
+
+       for _, opt := range opts {
+               opt(&f)
+       }
+
        return &f
 }
 
+// NewReader returns a new ReadCloser that can be used
+// to read the uncompressed version of r.
+// If r does not also implement io.ByteReader,
+// the decompressor may read more data than necessary from r.
+// It is the caller's responsibility to call Close on the ReadCloser
+// when finished reading.
+//
+// The ReadCloser returned by NewReader also implements Resetter.
+func NewReader(r io.Reader) io.ReadCloser {
+       return NewReaderOpts(r)
+}
+
 // NewReaderDict is like NewReader but initializes the reader
 // with a preset dictionary. The returned Reader behaves as if
 // the uncompressed data stream started with the given dictionary,
@@ -817,13 +861,5 @@
 //
 // The ReadCloser returned by NewReader also implements Resetter.
 func NewReaderDict(r io.Reader, dict []byte) io.ReadCloser {
-       fixedHuffmanDecoderInit()
-
-       var f decompressor
-       f.r = makeReader(r)
-       f.bits = new([maxNumLit + maxNumDist]int)
-       f.codebits = new([numCodes]int)
-       f.step = nextBlock
-       f.dict.init(maxMatchOffset, dict)
-       return &f
+       return NewReaderOpts(r, WithDict(dict))
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/fse/decompress.go 
new/vendor/github.com/klauspost/compress/fse/decompress.go
--- old/vendor/github.com/klauspost/compress/fse/decompress.go  2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/fse/decompress.go  2024-10-25 
18:53:41.000000000 +0200
@@ -15,7 +15,7 @@
 // It is possible, but by no way guaranteed that corrupt data will
 // return an error.
 // It is up to the caller to verify integrity of the returned data.
-// Use a predefined Scrach to set maximum acceptable output size.
+// Use a predefined Scratch to set maximum acceptable output size.
 func Decompress(b []byte, s *Scratch) ([]byte, error) {
        s, err := s.prepare(b)
        if err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/huff0/decompress.go 
new/vendor/github.com/klauspost/compress/huff0/decompress.go
--- old/vendor/github.com/klauspost/compress/huff0/decompress.go        
2024-09-14 18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/huff0/decompress.go        
2024-10-25 18:53:41.000000000 +0200
@@ -1136,7 +1136,7 @@
                        errs++
                }
                if errs > 0 {
-                       fmt.Fprintf(w, "%d errros in base, stopping\n", errs)
+                       fmt.Fprintf(w, "%d errors in base, stopping\n", errs)
                        continue
                }
                // Ensure that all combinations are covered.
@@ -1152,7 +1152,7 @@
                                errs++
                        }
                        if errs > 20 {
-                               fmt.Fprintf(w, "%d errros, stopping\n", errs)
+                               fmt.Fprintf(w, "%d errors, stopping\n", errs)
                                break
                        }
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/blockdec.go 
new/vendor/github.com/klauspost/compress/zstd/blockdec.go
--- old/vendor/github.com/klauspost/compress/zstd/blockdec.go   2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/blockdec.go   2024-10-25 
18:53:41.000000000 +0200
@@ -598,7 +598,9 @@
                                        printf("RLE set to 0x%x, code: %v", 
symb, v)
                                }
                        case compModeFSE:
-                               println("Reading table for", tableIndex(i))
+                               if debugDecoder {
+                                       println("Reading table for", 
tableIndex(i))
+                               }
                                if seq.fse == nil || seq.fse.preDefined {
                                        seq.fse = 
fseDecoderPool.Get().(*fseDecoder)
                                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/enc_better.go 
new/vendor/github.com/klauspost/compress/zstd/enc_better.go
--- old/vendor/github.com/klauspost/compress/zstd/enc_better.go 2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/enc_better.go 2024-10-25 
18:53:41.000000000 +0200
@@ -179,9 +179,9 @@
                                if repIndex >= 0 && load3232(src, repIndex) == 
uint32(cv>>(repOff*8)) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
+                                       length := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -210,12 +210,12 @@
 
                                        // Index match start+1 (long) -> s - 1
                                        index0 := s + repOff
-                                       s += lenght + repOff
+                                       s += length + repOff
 
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
@@ -241,9 +241,9 @@
                                if false && repIndex >= 0 && load6432(src, 
repIndex) == load6432(src, s+repOff) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 8 + e.matchlen(s+8+repOff2, 
repIndex+8, src)
+                                       length := 8 + e.matchlen(s+8+repOff2, 
repIndex+8, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -270,11 +270,11 @@
                                        }
                                        blk.sequences = append(blk.sequences, 
seq)
 
-                                       s += lenght + repOff2
+                                       s += length + repOff2
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
@@ -708,9 +708,9 @@
                                if repIndex >= 0 && load3232(src, repIndex) == 
uint32(cv>>(repOff*8)) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
+                                       length := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -738,12 +738,12 @@
                                        blk.sequences = append(blk.sequences, 
seq)
 
                                        // Index match start+1 (long) -> s - 1
-                                       s += lenght + repOff
+                                       s += length + repOff
 
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
@@ -772,9 +772,9 @@
                                if false && repIndex >= 0 && load6432(src, 
repIndex) == load6432(src, s+repOff) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 8 + e.matchlen(s+8+repOff2, 
repIndex+8, src)
+                                       length := 8 + e.matchlen(s+8+repOff2, 
repIndex+8, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -801,11 +801,11 @@
                                        }
                                        blk.sequences = append(blk.sequences, 
seq)
 
-                                       s += lenght + repOff2
+                                       s += length + repOff2
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/enc_dfast.go 
new/vendor/github.com/klauspost/compress/zstd/enc_dfast.go
--- old/vendor/github.com/klauspost/compress/zstd/enc_dfast.go  2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/enc_dfast.go  2024-10-25 
18:53:41.000000000 +0200
@@ -138,9 +138,9 @@
                                if repIndex >= 0 && load3232(src, repIndex) == 
uint32(cv>>(repOff*8)) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
+                                       length := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -166,11 +166,11 @@
                                                println("repeat sequence", seq, 
"next s:", s)
                                        }
                                        blk.sequences = append(blk.sequences, 
seq)
-                                       s += lenght + repOff
+                                       s += length + repOff
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
@@ -798,9 +798,9 @@
                                if repIndex >= 0 && load3232(src, repIndex) == 
uint32(cv>>(repOff*8)) {
                                        // Consider history as well.
                                        var seq seq
-                                       lenght := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
+                                       length := 4 + e.matchlen(s+4+repOff, 
repIndex+4, src)
 
-                                       seq.matchLen = uint32(lenght - 
zstdMinMatch)
+                                       seq.matchLen = uint32(length - 
zstdMinMatch)
 
                                        // We might be able to match backwards.
                                        // Extend as long as we can.
@@ -826,11 +826,11 @@
                                                println("repeat sequence", seq, 
"next s:", s)
                                        }
                                        blk.sequences = append(blk.sequences, 
seq)
-                                       s += lenght + repOff
+                                       s += length + repOff
                                        nextEmit = s
                                        if s >= sLimit {
                                                if debugEncoder {
-                                                       println("repeat ended", 
s, lenght)
+                                                       println("repeat ended", 
s, length)
 
                                                }
                                                break encodeLoop
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/github.com/klauspost/compress/zstd/encoder.go 
new/vendor/github.com/klauspost/compress/zstd/encoder.go
--- old/vendor/github.com/klauspost/compress/zstd/encoder.go    2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/encoder.go    2024-10-25 
18:53:41.000000000 +0200
@@ -6,6 +6,7 @@
 
 import (
        "crypto/rand"
+       "errors"
        "fmt"
        "io"
        "math"
@@ -149,6 +150,9 @@
 // and write CRC if requested.
 func (e *Encoder) Write(p []byte) (n int, err error) {
        s := &e.state
+       if s.eofWritten {
+               return 0, ErrEncoderClosed
+       }
        for len(p) > 0 {
                if len(p)+len(s.filling) < e.o.blockSize {
                        if e.o.crc {
@@ -202,7 +206,7 @@
                        return nil
                }
                if final && len(s.filling) > 0 {
-                       s.current = e.EncodeAll(s.filling, s.current[:0])
+                       s.current = e.encodeAll(s.encoder, s.filling, 
s.current[:0])
                        var n2 int
                        n2, s.err = s.w.Write(s.current)
                        if s.err != nil {
@@ -288,6 +292,9 @@
        s.filling, s.current, s.previous = s.previous[:0], s.filling, s.current
        s.nInput += int64(len(s.current))
        s.wg.Add(1)
+       if final {
+               s.eofWritten = true
+       }
        go func(src []byte) {
                if debugEncoder {
                        println("Adding block,", len(src), "bytes, final:", 
final)
@@ -303,9 +310,6 @@
                blk := enc.Block()
                enc.Encode(blk, src)
                blk.last = final
-               if final {
-                       s.eofWritten = true
-               }
                // Wait for pending writes.
                s.wWg.Wait()
                if s.writeErr != nil {
@@ -401,12 +405,20 @@
        if len(s.filling) > 0 {
                err := e.nextBlock(false)
                if err != nil {
+                       // Ignore Flush after Close.
+                       if errors.Is(s.err, ErrEncoderClosed) {
+                               return nil
+                       }
                        return err
                }
        }
        s.wg.Wait()
        s.wWg.Wait()
        if s.err != nil {
+               // Ignore Flush after Close.
+               if errors.Is(s.err, ErrEncoderClosed) {
+                       return nil
+               }
                return s.err
        }
        return s.writeErr
@@ -422,6 +434,9 @@
        }
        err := e.nextBlock(true)
        if err != nil {
+               if errors.Is(s.err, ErrEncoderClosed) {
+                       return nil
+               }
                return err
        }
        if s.frameContentSize > 0 {
@@ -459,6 +474,11 @@
                }
                _, s.err = s.w.Write(frame)
        }
+       if s.err == nil {
+               s.err = ErrEncoderClosed
+               return nil
+       }
+
        return s.err
 }
 
@@ -469,6 +489,15 @@
 // Data compressed with EncodeAll can be decoded with the Decoder,
 // using either a stream or DecodeAll.
 func (e *Encoder) EncodeAll(src, dst []byte) []byte {
+       e.init.Do(e.initialize)
+       enc := <-e.encoders
+       defer func() {
+               e.encoders <- enc
+       }()
+       return e.encodeAll(enc, src, dst)
+}
+
+func (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte {
        if len(src) == 0 {
                if e.o.fullZero {
                        // Add frame header.
@@ -491,13 +520,7 @@
                }
                return dst
        }
-       e.init.Do(e.initialize)
-       enc := <-e.encoders
-       defer func() {
-               // Release encoder reference to last block.
-               // If a non-single block is needed the encoder will reset again.
-               e.encoders <- enc
-       }()
+
        // Use single segments when above minimum window and below window size.
        single := len(src) <= e.o.windowSize && len(src) > MinWindowSize
        if e.o.single != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/framedec.go 
new/vendor/github.com/klauspost/compress/zstd/framedec.go
--- old/vendor/github.com/klauspost/compress/zstd/framedec.go   2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/framedec.go   2024-10-25 
18:53:41.000000000 +0200
@@ -146,7 +146,9 @@
                        }
                        return err
                }
-               printf("raw: %x, mantissa: %d, exponent: %d\n", wd, wd&7, wd>>3)
+               if debugDecoder {
+                       printf("raw: %x, mantissa: %d, exponent: %d\n", wd, 
wd&7, wd>>3)
+               }
                windowLog := 10 + (wd >> 3)
                windowBase := uint64(1) << windowLog
                windowAdd := (windowBase / 8) * uint64(wd&0x7)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go 
new/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
--- old/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go       
2024-09-14 18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go       
2024-10-25 18:53:41.000000000 +0200
@@ -146,7 +146,7 @@
                return true, fmt.Errorf("output bigger than max block size 
(%d)", maxBlockSize)
 
        default:
-               return true, fmt.Errorf("sequenceDecs_decode returned erronous 
code %d", errCode)
+               return true, fmt.Errorf("sequenceDecs_decode returned erroneous 
code %d", errCode)
        }
 
        s.seqSize += ctx.litRemain
@@ -292,7 +292,7 @@
                        return io.ErrUnexpectedEOF
                }
 
-               return fmt.Errorf("sequenceDecs_decode_amd64 returned erronous 
code %d", errCode)
+               return fmt.Errorf("sequenceDecs_decode_amd64 returned erroneous 
code %d", errCode)
        }
 
        if ctx.litRemain < 0 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s 
new/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
--- old/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s        
2024-09-14 18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s        
2024-10-25 18:53:41.000000000 +0200
@@ -1814,7 +1814,7 @@
        MOVQ    40(SP), AX
        ADDQ    AX, 48(SP)
 
-       // Calculate poiter to s.out[cap(s.out)] (a past-end pointer)
+       // Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
        ADDQ R10, 32(SP)
 
        // outBase += outPosition
@@ -2376,7 +2376,7 @@
        MOVQ    40(SP), CX
        ADDQ    CX, 48(SP)
 
-       // Calculate poiter to s.out[cap(s.out)] (a past-end pointer)
+       // Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
        ADDQ R9, 32(SP)
 
        // outBase += outPosition
@@ -2896,7 +2896,7 @@
        MOVQ    40(SP), AX
        ADDQ    AX, 48(SP)
 
-       // Calculate poiter to s.out[cap(s.out)] (a past-end pointer)
+       // Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
        ADDQ R10, 32(SP)
 
        // outBase += outPosition
@@ -3560,7 +3560,7 @@
        MOVQ    40(SP), CX
        ADDQ    CX, 48(SP)
 
-       // Calculate poiter to s.out[cap(s.out)] (a past-end pointer)
+       // Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
        ADDQ R9, 32(SP)
 
        // outBase += outPosition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/github.com/klauspost/compress/zstd/zstd.go 
new/vendor/github.com/klauspost/compress/zstd/zstd.go
--- old/vendor/github.com/klauspost/compress/zstd/zstd.go       2024-09-14 
18:26:02.000000000 +0200
+++ new/vendor/github.com/klauspost/compress/zstd/zstd.go       2024-10-25 
18:53:41.000000000 +0200
@@ -88,6 +88,10 @@
        // Close has been called.
        ErrDecoderClosed = errors.New("decoder used after Close")
 
+       // ErrEncoderClosed will be returned if the Encoder was used after
+       // Close has been called.
+       ErrEncoderClosed = errors.New("encoder used after Close")
+
        // ErrDecoderNilInput is returned when a nil Reader was provided
        // and an operation other than Reset/DecodeAll/Close was attempted.
        ErrDecoderNilInput = errors.New("nil input provided as reader")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt
--- old/vendor/modules.txt      2024-09-14 18:26:05.000000000 +0200
+++ new/vendor/modules.txt      2024-10-25 18:53:42.000000000 +0200
@@ -204,8 +204,8 @@
 # github.com/kevinburke/ssh_config v1.2.0
 ## explicit
 github.com/kevinburke/ssh_config
-# github.com/klauspost/compress v1.17.9
-## explicit; go 1.20
+# github.com/klauspost/compress v1.17.11
+## explicit; go 1.21
 github.com/klauspost/compress
 github.com/klauspost/compress/flate
 github.com/klauspost/compress/fse

Reply via email to