coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
856 stars 193 forks source link

Direct support for custom local RPMs #284

Open copumpkin opened 8 years ago

copumpkin commented 8 years ago

Currently I have a script that uses createrepo_c to build a local repository, adds that repository to the rpm-ostree repo list, and then adds the package name to the packages section. It would be easier to automate if I could just give rpm-ostree a path to an RPM and it installs it for me, without needing to create an intermediate repository and then figure out what the package name is for the rpm I'm installing.

Basically, situation today:

  1. Create local repository containing rpms you want
  2. Create .repo file for local repository and put it in same folder as treefile
  3. Add local repository to repos list in treefile
  4. Extract package names from rpms you want to list them in packages list in treefile (and watch out that they don't overlap with other repositories)

What I'd like:

  1. Set localrpms list in treefile to point to a list of rpm file paths. No need to figure out package name or create virtual repositories, etc.
cgwalters commented 8 years ago

I have something similar except for step 4 which feels a bit too automagical to me. In many cases for example you might not want the -devel/-debuginfo packages for example.

What I am slowly iterating towards myself is having https://github.com/cgwalters/rpmdistro-gitoverlay more directly feed rpm-ostree, which gets me something closer to what gnome-continuous is doing.

But I would be happy to look at carrying your script in contrib/ or something where we can share and improve it.

copumpkin commented 8 years ago

What I'm looking for more ideally than putting more effort into polishing up my script is just getting more direct support for individual RPMs in the treefile.

I.e., in addition to packages and repos, which together today allow me to do my scary thing, I'd like an rpm-files key or similar, which would let me do something like

{
  "packages": [ "foo", "bar", "baz" ],
  "repos": [ "woof", "meow" ],
  "rpm-files": [ "/path/to/some/local/rpm", "/path/to/another/local/rpm" ]
}

And rpm-ostree would take care of incorporating those RPMs I explicitly request. Basically the equivalent of running yum install /path/to/some/local/rpm as part of the install process.