* add stricter linting
* As part of this it changes the API slightly changing all uses of the `nfpm.Info` object to accept a pointer to reduce memory usage as pointed out by `hugeParam: info is heavy (568 bytes); consider passing it by pointer (gocritic)`
* fix: rules tests, overridables
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* doc: gogoc
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: rpm template
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: rpm template
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: Add optional packager tag to rpm spec
Using the `Maintainer` tag from deb as the `Packager` tag for rpm
See #57
* feat: Optional epoch field added to both rpm and dep packages
See #57
* test: Adding test for deb epoch field
Adding a unit test for the epoch field and fixing the implementation
of version number with epoch for deb packager.
See #57
The Debian policy[1] declares the following control file fields as
required for binary packages:
* Package
* Version
* Section
* Priority
* Architecture
* Maintainer
* Description
All other fields are optional. A few programs handling .deb packages
emit warnings when optional fields exist without a value.
With this change the template generating the control file is updated to
omit empty values. Comments are added to denote mandatory fields.
A newly added test verifies the generated control file.
[1]
<https://www.debian.org/doc/debian-policy/ch-controlfields.html#
binary-package-control-files-debian-control>
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Added file globs to deb and rpm packager. Since the destination for
a glob can not be a single file, the files collected by the glob are
stored in: join(dst, trim(lcp(src), src)) (read: lcp = longest common
prefix). Thereby the longest common prefix is removed from every path in
the globbed files and joined with the destination path. Implementation
is backwards compatible (i.e. non-globs will work as before)