google / google/rpmpack

Support RPM filetypes

Open
#20 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
128
Forks
36
PR merge metrics
No merged PRs in 30d

Description

in https://github.com/goreleaser/nfpm there is the need to support at least the ConfigFile type https://github.com/sassoftware/go-rpmutils/blob/master/tags.go#L138 because when you uninstall a rpm by default a *.rpmsave file is created for all config files which nfpm verifies as part of it's testing.

Support for this was initially added as #16 but was asked to create an issue around this to determine if and how to support this for the `tar2rpm` tool

My initial idea was to not support it for the tool, and only for the case where `rpmpack` is being used as a library. Another option is to provide flags to point to a tar of each filetype. The final option I can think of is to have an option like `-config-file=path/to/config/file` that would have to match `h.Name` in https://github.com/google/rpmpack/blob/master/tar.go#L62 to set the file type

Of the 3 options I am personally leaning toward the latter so the command would look something like `tar2rpm -config-file etc/bla.conf -config-file etc/bla/overide.conf -file bla.rpm bla.tar` which makes it so you do not need to separately tar up each type of file. We would want to ensure `wildcard` support for this so you could do `-config-file etc/*`

Open Question: which file types do we want to support from the tool?
* ConfigFile
* DocFile
* IconFile
* MissingFile
* NoReplaceFile
* SpecFile
* GhostFile
* LicenceFile
* ReadmeFile
* ExcludeFile
* UnpatchedFile
* PubKeyFile
* PolicyFile

I know `ConfigFile` for sure as the need for that prompted adding this feature. I would also say `DocFile`, `LicenceFile`, `ReadmeFile`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.