mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
feat: nfpm rpm.summary and nfpm.ghost_files (#1892)
* feat: nfpm rpm.summary and nfpm.ghost_files Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: fmt Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
188447b255
commit
671c7ef96e
@ -197,8 +197,10 @@ func create(ctx *context.Context, fpm config.NFPM, format, arch string, binaries
|
||||
},
|
||||
},
|
||||
RPM: nfpm.RPM{
|
||||
Summary: overridden.RPM.Summary,
|
||||
Group: overridden.RPM.Group,
|
||||
Compression: overridden.RPM.Compression,
|
||||
GhostFiles: overridden.RPM.GhostFiles,
|
||||
ConfigNoReplaceFiles: overridden.RPM.ConfigNoReplaceFiles,
|
||||
Signature: nfpm.RPMSignature{
|
||||
KeyFile: overridden.RPM.Signature.KeyFile,
|
||||
|
@ -331,10 +331,12 @@ type NFPMRPMSignature struct {
|
||||
|
||||
// NFPMRPM is custom configs that are only available on RPM packages.
|
||||
type NFPMRPM struct {
|
||||
Summary string `yaml:"summary,omitempty"`
|
||||
Group string `yaml:"group,omitempty"`
|
||||
Compression string `yaml:"compression,omitempty"`
|
||||
// https://www.cl.cam.ac.uk/~jw35/docs/rpm_config.html
|
||||
ConfigNoReplaceFiles map[string]string `yaml:"config_noreplace_files,omitempty"`
|
||||
GhostFiles []string `yaml:"ghost_files,omitempty"`
|
||||
Signature NFPMRPMSignature `yaml:"signature,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -165,6 +165,10 @@ nfpms:
|
||||
|
||||
# Custon configuration applied only to the RPM packager.
|
||||
rpm:
|
||||
# The package summary.
|
||||
# Defaults to the first line of the description.
|
||||
summary: Explicit Summary for Sample Package
|
||||
|
||||
# The package group. This option is deprecated by most distros
|
||||
# but required by old distros like CentOS 5 / EL 5 and earlier.
|
||||
group: Unspecified
|
||||
@ -177,6 +181,20 @@ nfpms:
|
||||
config_noreplace_files:
|
||||
path/to/local/bar.con: /etc/bar.conf
|
||||
|
||||
# These files are not actually present in the package, but the file names
|
||||
# are added to the package header. From the RPM directives documentation:
|
||||
#
|
||||
# "There are times when a file should be owned by the package but not
|
||||
# installed - log files and state files are good examples of cases you might
|
||||
# desire this to happen."
|
||||
#
|
||||
# "The way to achieve this, is to use the %ghost directive. By adding this
|
||||
# directive to the line containing a file, RPM will know about the ghosted
|
||||
# file, but will not add it to the package."
|
||||
ghost_files:
|
||||
- /etc/casper.conf
|
||||
- /var/log/boo.log
|
||||
|
||||
# The package is signed if a key_file is set
|
||||
signature:
|
||||
# PGP secret key (can also be ASCII-armored). The passphrase is taken
|
||||
|
Loading…
x
Reference in New Issue
Block a user