feat(cargo-pgrx): build RPM package#2324
Conversation
|
I haven't studied the code changes but I'm okay with the spirit of this. I agree this is a gap in Can we add .deb too? |
Thanks, I'll clean up the code, add tests and documentation
Sure. In a separate MR or in this one ? |
Lets do it here, if you don't mind. |
Right Turns out that cargo-deb crate is a different beast and does not expose its internal function so I might end up writing a temporary Manifest and call out a I see there's already some |
That's a runtime dependency that someone would need to install via That's not the end of the world if it otherwise gets us to making this stuff easy. |
Yes that would be completely optionnal and only required if the extension developper adds a
|
We'll just need to document it well, but I think that's totally fine. I am imagining a new "packaging.md" section in our little mdbook will be wanted anyways. |
This is a draft proposal to add RPM generation to the `cargo pgrx package` command. Based on the Cargo.toml content: if a `package.metadata.rpm` section is present then a RPM is built in the target directory.
|
Hey ! Unfortunately the I ended up using the arx-pack crate which is very new but does both the DEB and RPM packaging in an elegant way. https://crates.io/crates/arx-pack We could also add APK and Arch Linux packaging very easily... |
Hi !
Distributing RPM packages of an PGRX extension is still a clumsy process. I personnally use nfpm which is great but it seems like
cargo-pgrxshould be able to build basic packages on its own.This is a draft proposal to add RPM generation to the
cargo pgrx packagecommand.Based on the Cargo.toml content: if a
package.metadata.rpmsection is present then a RPM is built in the target directory.Basic example :
The PR is still rough because I'd like some feedback before going any further :
Is
cargo pgrx packagethe right command to add this ? Or should I addcargo pgrx rpm?is it ok to rely on the
[package.metadata.rpm]?For a first implement, i'd say that RPM signing is not necessary.
Generally the idea is to produce a very simple package and if some developers have more advanced use cases let me come forward and ask for more features