Files
nfpm/deb/testdata/changes.golden
Carlos Alexandro BeckerandCopilot 5785125c43 fix(deb): make the .changes file valid for uploads
Address the review findings on #612:

- the .changes path is a sibling of the package: only a trailing .deb
  is replaced, otherwise .changes is appended, so the package is never
  truncated. The file is written only after it was fully generated.
- Description uses the .changes format: an empty first line and one
  "name - synopsis" continuation line.
- omitted section and priority are written as "-" in Files.
- deb.metadata.distribution and deb.metadata.urgency are required when
  enable_metadata is set. Binary is always the package name, so
  deb.metadata.binary is removed.
- changed_by and the other metadata fields are optional in the JSON
  schema, so existing deb configs still validate.
- the package file name must be the conventional name_version_arch.deb,
  which is what upload tools parse. The error shows the expected name.
- a SignFn signs the manifest only with the dpkg-sig method, which
  clear-signs. Other combinations return an error instead of writing an
  unsigned file. SignFn has priority over key_file, as for the package.
- the Changes entry uses the same full version as the Version field.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f9c82a16-ecfd-4244-a6d5-7c2c14f3dc00
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2026-11-20 15:49:01 -03:00

24 lines
675 B
Plaintext

Format: 1.8
Date: Mon, 30 Jan 2023 08:36:31 +0300
Source: foo
Binary: foo
Architecture: amd64
Version: 1.0.0
Distribution: unstable
Urgency: medium
Maintainer: Carlos A Becker <pkg@carlosbecker.com>
Changed-By: Carlos A Becker <pkg@carlosbecker.com>
Description:
foo - Foo does things
Bugs: https://github.com/goreleaser/nfpm/issues
Changes:
foo (1.0.0) unstable; urgency=medium
* Package created with nFPM
Checksums-Sha256:
039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81 3 foo_1.0.0_amd64.deb
Checksums-Sha1:
7037807198c22a7d2b0807371d763779a84fdfcf 3 foo_1.0.0_amd64.deb
Files:
5289df737df57326fcdd22597afb1fac 3 default extra foo_1.0.0_amd64.deb