Support other distributions as sources (Fedora, Mageia, openSUSE, Debian) instead of Ubuntu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
Wishlist
|
Sergio Schvezov | ||
snapd |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The snapcraft tool (and the yaml format) currently mandate Ubuntu repositories as the primary binary input source (that is, the base of snaps created via snapcraft is always Ubuntu).
However, if I want to create a snap using Fedora, CentOS, Mageia, openSUSE, or even Debian as the binary package base, I cannot currently.
There are two particular problems with this:
1) The modern python3-apt API is unavailable for RPM based distributions because apt shipped in RPM based distros is so old that it doesn't work on it. While apt in RPM based distributions does support Debian packages/
2) Snapcraft on Debian based systems will always use Ubuntu as the base, which may be undesirable for people who'd like to use Debian software to build their snaps.
My suggestion is to support RPM based distributions by using gir bindings for libdnf[1] or the Python 3 API for DNF[2]. The major RPM based Linux distributions (Fedora, Mageia, CentOS, openSUSE) are able to use libhif/DNF. Fedora uses it by default now, and Mageia will offer it as a secondary package manager with Mageia 6[3]. It's available as a COPR for CentOS[4], and it's not much trouble to make it available for openSUSE, too.
Add a stanza where the user can set the distro base, and snapcraft will use the appropriate engine and repo configuration to construct the snap.
Obviously, some place where the distro repo information can be stored as snapcraft config is important too. With the existing code, being able to swap Ubuntu and Debian distro base would be nice.
[1]: https:/
[2]: http://
[3]: https:/
[4]: https:/
Tasks for completing this:
1. Add support for individual RPMs as source - LP: #1640296 - GH#snapcore/
2. Refactor build/stage packages to support multiple backends:
- LP: #1673448 GH#snapcore/
- LP: #1673449 GH#snapcore/
3. Add support for different distro base snaps and refactor core snap to depend on base snap - LP#??? - GH#snapcore/
4. Add support for declaring desired base in snapcraft - LP#??? - GH#snapcore/
5. Add RPM+DNF backend for supporting Fedora, CentOS, Mageia, and OpenSUSE bases - LP#1602258 - GH#snapcore/
6. Run integration tests in all the supported operating systems.
description: | updated |
description: | updated |
description: | updated |
Changed in snapcraft: | |
importance: | Undecided → Wishlist |
tags: | removed: snapcraft |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Seems sensible to enable folks to use whatever distro they prefer, thank
for the guidance.
status: confirmed