valkey-io / valkey

A flexible distributed key-value datastore that supports both caching and beyond caching workloads.
https://valkey.io
Other
16.99k stars 634 forks source link

[NEW] Support packaging (RPM and DEB) spec files in the upstream repository #1187

Open rjd15372 opened 1 week ago

rjd15372 commented 1 week ago

Downstream Linux distributions typically build software packages either using RPMs or DEBs, and they usually maintain the packaging spec files (which define the rules for building and packaging the software) in their own downstream systems. Whenever upstream merges a PR that adds/removes a dependency, or changes the way Valkey is built, downstream must take that into account do the work of fixing their spec files.

I've seen other opensource projects that instead of relying on downstream to maintain these packaging spec files, they own the packaging spec files in their upstream repository.

This has the benefit that upstream controls the rules of how the software should be packaged, and also makes it easy for new features to introduce new dependencies, while making downstream packaging easier to maintain. Also, if these scripts are owned by upstream, they can be maintained by more people and make Valkey easier to be packaged in more linux distros.

zuiderkwast commented 1 week ago

@jonathanspw WDYT?

jonathanspw commented 1 week ago

I think it's a great idea, however:

I've seen other opensource projects that instead of relying on downstream to maintain these packaging spec files, they own the packaging spec files in their upstream repository.

That will almost never work unless a downstream maintainer is simply working with upstream to maintain said spec file. Most of the time upstream spec files do not meet packaging guidelines in, for example, Fedora.

That said, I'm happy to maintain the spec file in the Valkey repo, and even add RPM building to the CI pipeline. I do this for a few other packages where I have a good relationship with upstream and package them in Fedora/EPEL.

rjd15372 commented 1 week ago

@jonathanspw

That will almost never work unless a downstream maintainer is simply working with upstream to maintain said spec file. Most of the time upstream spec files do not meet packaging guidelines in, for example, Fedora.

Correct. This only works if downstream maintainers help with the upstream spec files.

The upstream spec file can have conditional blocks based on the distro in order to satisfy each distro specific packaging guidelines.

zuiderkwast commented 6 days ago

@jonathanspw if you submit a PR for this, I'll accept it. :)