#192 Could version_no_tilde() be moved?
Closed: Insufficient Data a year ago by decathorpe. Opened 2 years ago by eclipseo.

Could we move version_no_tilde() in order to use it in any package besides Rust ones?

Thanks.


What would you want to use it for? I'm not sure if it would be generally applicable, though.

The macro very specifically converts RPM version strings that were converted from cargo's version of the SemVer format when running rust2rpm into cargo's version of the SemVer format again, so there's probably some details in there that won't make sense or work anywhere else.

I'm fine with moving it out, the reason @ignatenkobrain and I put it here was because of a lack of better options. It's not SemVer specific at all, it follows the rules that a lot of projects use for pre-release Git tags. It also made it easier to keep the macros cross-distro portable.

I would rather have this utility macro moved into rpm itself, that way the macros still work across distributions.

I'm fine with moving it. Ideally, somebody would submit a pull request to some other place, and once that becomes available, we'd drop our copy.

I can submit this to redhat-rpm-config. I agree with @ngompa's assessment of this being more generally applicable. Personally, I would like to use this in the ansible macros, which currently don't properly support pre-releases.

However, the licensing is a bit of a problem, as this repo is MIT and redhat-rpm-config is GPL+. Unless we decide that this isn't a "substantial [portion] of the Software" or get @ignatenkobrain's permission, we'd have to add a copy of the MIT license to and change the License of redhat-rpm-config package to GPL+ and MIT.

Closed #218 in favor of this issue.

I can submit this to redhat-rpm-config.

redhat-rpm-config is the wrong place for this, since that is Fedora-specific and Rust macros are cross-distro.

I can submit this to redhat-rpm-config.

redhat-rpm-config is the wrong place for this, since that is Fedora-specific and Rust macros are cross-distro.

So I guess getting it into rpm itself is the only option?

I'd like to use this in EPEL. Can we do one of the following?

  1. Branch rust-srpm-macros for EPEL
  2. Add this macro to epel-rpm-macros

I can help out with either.


I guess another idea that I thought of is creating some sort of cross-distro rpm-macros-contrib package. I wouldn't want to do this myself, but I would help out if @ngompa is interested :). This would also be a place to house the forge macros [1] [2]. Other candidates are %gpgverify and macros.shell-completions.

Still, I'd like to find some way to get these in EPEL in the meantime. (/me is terminally impatient)

[1] https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209#comment-114807
[2] https://meetbot.fedoraproject.org/fedora-meeting-1/2022-09-01/fedora_cloud.2022-09-01-16.08.log.html starting at 16:40:25

I'd like to use this in EPEL. Can we do one of the following?

  1. Branch rust-srpm-macros for EPEL
  2. Add this macro to epel-rpm-macros

I can help out with either.

Hmm, it seems like rust-srpm-macros is in RHEL 8 and RHEL 9, but only RHEL 9's version has this macro.

The RPM macros have been moved to a separate project (rust-packaging). I am open to moving the %version_no_tilde macro to redhat-rpm-config, but it appears to not be a complete implementation of converting RPM to SemVer versions (for example, it doesn't appear to replace "_" characters in pre-release identifiers with "-" characters).

If you still think moving it from rust-srpm-macros (which is present in the default buildroot) to redhat-rpm-macros, please file a bug with rust-packaging. rust-packaging

Metadata Update from @decathorpe:
- Issue close_status updated to: Insufficient Data
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata