nfpm icon indicating copy to clipboard operation
nfpm copied to clipboard

Provide files as tgz

Open tcurdt opened this issue 5 years ago • 9 comments

It seems like right now there is no way to specify a full tgz for the files that should go into the package. And there is no way to specify the ownership and permissions in detail (that I see).

Would be great if one could provide a complete tgz as the data section of package.

tcurdt avatar Nov 28 '18 10:11 tcurdt

hmm, maybe...

caarlos0 avatar Nov 28 '18 12:11 caarlos0

That sounds very sceptical :) May I ask why? How do you setup permissions of the files included in the package at the moment instead?

tcurdt avatar Nov 28 '18 12:11 tcurdt

sorry, didn't meant to sound very skeptical haha

right now, as far as I remember, it uses whatever permissions the files already have, although I agree that's not ideal.

I use it only on goreleaser itself, and for what goreleaser supports that was never a problem, but to support "power users" I agree there must be a better way...

caarlos0 avatar Nov 28 '18 12:11 caarlos0

If you have any thoughts on how you this could or should be added best I am all ears. Maybe I can then work on a PR.

tcurdt avatar Nov 28 '18 12:11 tcurdt

Now with #79 by @djgilcrease , nfpm can perhaps offer using rpmpack.FromTar as an additional input method.

jarondl avatar Oct 04 '19 00:10 jarondl

So is the idea here to have an optional property in the config file along the lines of files_from_tar which would cause the files from the specified tar archive be added to the package in addition to the ones specified in files property?

mig4 avatar Oct 30 '19 14:10 mig4

@mig4 the original idea was without the "in addition" part. Essentially all data files in the package in one tgz. Which means all permissions and ownerships are defined.

In addition would of course be an option, too.

tcurdt avatar Oct 30 '19 14:10 tcurdt

I would say add a FilesTar string to Overridables make sure it is mutually exclusive with the Files []string then update deb/createDataTarGz to use the passed in FilesTar if set && update rpm/Package to use rpmpack/FromTar if FilesTar is set

djgilcrease avatar Oct 30 '19 14:10 djgilcrease

Yeah, I just wanted to confirm the expectation was that this would be an additional option in the config file, instead of a CLI arg for example. As for in addition/instead, whatever makes most sense. I'll give it a spin and propose something and we can discuss the details there sure.

Many thanks for the pointers @djgilcrease :grin:

mig4 avatar Oct 31 '19 22:10 mig4

closing due to lack of interest from the community

caarlos0 avatar Mar 16 '24 15:03 caarlos0

@caarlos0 is there any other way to specify ownership and permissions of files inside the package by now?

tcurdt avatar Mar 16 '24 15:03 tcurdt

yes, https://nfpm.goreleaser.com/configuration/?h=file_info#reference

caarlos0 avatar Mar 16 '24 16:03 caarlos0