Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toolbox doesn't understand "rawhide" version name #646

Open
hadess opened this issue Dec 10, 2020 · 7 comments · May be fixed by #1531
Open

toolbox doesn't understand "rawhide" version name #646

hadess opened this issue Dec 10, 2020 · 7 comments · May be fixed by #1531
Labels
1. Feature request A request for a new feature 5. Good First Issue Good for newcomers

Comments

@hadess
Copy link

hadess commented Dec 10, 2020

$ rpm -q toolbox
toolbox-0.0.97-1.fc33.x86_64
$ toolbox create -r rawhide
Error: invalid argument for '--release'
Run 'toolbox --help' for usage.
@hadess hadess added the 1. Feature request A request for a new feature label Dec 10, 2020
@fedelibre
Copy link

For the records, even if Fedora 34 has not been branched yet, toolbox can find a f34 image:

$ toolbox create --distro fedora --release f34
Image required to create toolbox container.
Download registry.fedoraproject.org/f34/fedora-toolbox:34 (500MB)? [y/N]: y
Created container: fedora-toolbox-34
Enter with: toolbox enter --release 34

@debarshiray
Copy link
Member

The problem is that we don't have an easy way to map rawhide to a numerical value in a way that would stay updated over time without manual intervention.

One option that was suggested in #fedora-devel on Freenode was to parse the metadata in the Fedora RPM repositories for rawhide. That's something that needs to be explored because I don't know off-hand how easy or difficult that would be.

@debarshiray
Copy link
Member

It seems to me that the best candidate is to use Fedora's package DB collections API that's also used by GNOME Software.

(Thanks to @AdamWill and @kalev for suggesting that.)

Another option that was presented to me in #fedora-devel on Freenode was to parse the branch names of the fedora-release Git repository.

@AdamWill
Copy link

So to give my standard explanation of this stuff for the record:

  • The "collections API" isn't really an API any more and hasn't been for years. It's a static JSON file that releng update by hand. If they forget to update it or make a booboo while doing it, the data will be wrong. Both these things have happened more than once.
  • I have some code that needs this same thing, and the way I do it is: rawrel = str(fedfind.helpers.get_current_release(branched=True) + 1). That uses my fedfind library, which formerly used the collections JSON as its data source, then tried using Bodhi's releases API for a bit, and right now is using my own hand-maintained JSON (on the theory that at least I can fix that one without needing someone else to run a playbook), though I might ping it back to the collections JSON.
  • I'm currently trying to get some momentum behind a project I wrote called releasestream that is intended to work as a better/more reliable/more automated source of this kind of information. The idea would be to deploy an official Fedora releasestream instance and have system/scripts that do release-y things, like branching and EOL and so on, also update releasestream at the same time.

@debarshiray
Copy link
Member

Thanks for putting that on record. For what it's worth, I heartily endorse your efforts on releasestream.

@juhp
Copy link
Contributor

juhp commented Dec 24, 2021

Personally I just use https://pdc.fedoraproject.org/rest_api/v1/product-versions/ for this.
Bodhi's API might be slightly more precise, depending on the exact use-case.

@AdamWill
Copy link

The limitation of PDC is it doesn't have full lifecycle info (it just has 'active' or not; it doesn't distinguish pre-release from stable). I also don't know these days how exactly it gets updated and whether that's any more reliable than the collections JSON. The issue I had with Bodhi is that releases are changed from pre-release to stable state in Bodhi some days before they're actually publicly available.

For toolbox's purposes, neither of those should really be a problem, so you could potentially use either of those sources too. Rawhide's version number should always be one higher than whatever the highest numbered release provided by the data source is.

rominf added a commit to rominf/toolbox that referenced this issue Aug 31, 2024
Since pulling the Fedora Rawhide image from
registry.fedoraproject.org/fedora/rawhide succeeds now, add support for
the Fedora Rawhide version name by allowing 'rawhide' to be passed as a
release argument.

Fixes: containers#646.
@rominf rominf linked a pull request Aug 31, 2024 that will close this issue
rominf added a commit to rominf/toolbox that referenced this issue Aug 31, 2024
Since pulling the Fedora Rawhide image from
registry.fedoraproject.org/fedora/rawhide succeeds now, add support for
the Fedora Rawhide version name by allowing 'rawhide' to be passed as a
release argument.

Fixes: containers#646.
Signed-off-by: Roman Inflianskas <rominf@pm.me>
rominf added a commit to rominf/toolbox that referenced this issue Aug 31, 2024
Since pulling the Fedora Rawhide image from
registry.fedoraproject.org/fedora/rawhide succeeds now, add support for
the Fedora Rawhide version name by allowing 'rawhide' to be passed as a
release argument.

Fixes: containers#646.

Signed-off-by: Roman Inflianskas <rominf@pm.me>

containers#1531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Feature request A request for a new feature 5. Good First Issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants