cavaliergopher / rpm

A Go implementation of the RPM file format
BSD 3-Clause "New" or "Revised" License
169 stars 44 forks source link

Write RPMs? #11

Closed abates closed 6 years ago

abates commented 6 years ago

Do you have any plan to implement an api to create RPMs? Maybe something like this for debs: github.com/xor-gate/debpkg

I'm looking for a way to programmatically write RPMs from a go program. I'd rather not call an external command if I don't have to.

cavaliercoder commented 6 years ago

I don't have any current plans (or resourcing) to do so - but I'm certainly open to the idea.

One of the challenges in implementing RPM is that the file structure is simple, but the way it is used in the ecosystem is complicated. For example, getting a read on which tags are required for which versions, what they all mean, etc. is difficult.

Also, though I'm happy to encourage your use case, I imagine demand is low for an implementation in Go - and maintenance and keeping parity with the canonical toolset will be cumbersome.

abates commented 6 years ago

I may be interested in attempting this, but I must admit that my knowledge of RPM is on the low side. I don't support many rpm based systems (most systems I use are debian variants) so my knowledge doesn't extend much outside usage of the actual rpm command line tool. Do you know of any resources I can read to learn more about the ecosystem?

cavaliercoder commented 6 years ago

I typically use the following resources:

As a first step, we might support writing a rpm.PackageFile to disk, but there will a great many complications setting the correct tags, using the right signature algorithms, compression, etc. There would have to be a very strong use case to consider reimplementing the C/Python libs for writing.

For now, I might close this issue.