Skip to content

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

Open

Description

@hadess
$ 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.

Activity

  1. added
    1. Feature request
    on Dec 10, 2020
  2. fedelibre commented on Jan 17, 2021

    @fedelibre

    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
    
  3. debarshiray commented on Jan 18, 2021

    @debarshiray
    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.

  4. debarshiray commented on Feb 10, 2021

    @debarshiray
    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.

  5. AdamWill commented on Feb 10, 2021

    @AdamWill

    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.
  6. debarshiray commented on Feb 10, 2021

    @debarshiray
    Member

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

  7. juhp commented on Dec 24, 2021

    @juhp
    Contributor

    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.

  8. AdamWill commented on Dec 24, 2021

    @AdamWill

    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.

  9. added 3 commits that reference this issue on Aug 31, 2024
    0e0ade7
    bb67ee7
    92f9046
  10. AdamWill commented on Jun 4, 2026

    @AdamWill

    2026 update: never got time for releasestream, sadly. PDC is gone. fedfind's source-of-truth is still around, but it's probably best to use Bodhi for this. Basically: hit up https://bodhi.fedoraproject.org/releases/?state=pending (it returns JSON when you set that as the Content-Type), and then figure it out somehow. You could take all results with id_prefix "FEDORA", sort their versions, and take the highest one. Or you could just take the one whose id_prefix is "FEDORA" and branch is "rawhide" and read its version. In theory the response can be paginated and protecting against that is a bit of a pain, but in practice filtering to 'pending' releases should always give a response much too short to be paginated. Right now the response contains only ELN and Rawhide; when Branched exists, it will also contain Branched. I recommend filtering on the id_prefix just to ensure you don't get tripped up by some random other 'release' showing up there - Bodhi has 'releases' for things like modules and flatpaks also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. Feature request5. Good First Issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions