Dependency issues caused by lxc-libs-3.1.0-0.1 on Fedora 29/30
ganto opened this issue · 2 comments
The recent update to lxc-libs-3.1.0-0.1
in the ganto-lxc3 COPR repository causes dependency resolving issues on Fedora 29/30 that already contains lxcfs-3.0.3-1
:
# dnf update
Last metadata expiration check: 0:36:27 ago on Tue 05 Feb 2019 02:32:15 PM PST.
Dependencies resolved.
Problem: package lxc-templates-3.0.3-1.fc29.x86_64 requires lxc-libs(x86-64) = 3.0.3-1.fc29, but none of the providers can be installed
- cannot install both lxc-libs-3.1.0-0.1.fc29.x86_64 and lxc-libs-3.0.3-1.fc29.x86_64
- cannot install both lxc-libs-3.0.3-1.fc29.x86_64 and lxc-libs-3.1.0-0.1.fc29.x86_64
- cannot install the best update candidate for package lxc-templates-3.0.3-1.fc29.x86_64
- cannot install the best update candidate for package lxc-libs-3.0.3-1.fc29.x86_64
====================================================================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================================================================
Upgrading:
lxd x86_64 3.9-0.1.fc29 ganto-lxc3 8.1 M
lxd-client x86_64 3.9-0.1.fc29 ganto-lxc3 4.5 M
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
lxc-libs x86_64 3.1.0-0.1.fc29 ganto-lxc3 456 k
Transaction Summary
====================================================================================================================================================================================================================
Upgrade 2 Packages
Skip 1 Package
Total download size: 13 M
Is this ok [y/N]:
The issue is caused by the lxc-templates-3.0.3-1
package of the Fedora repository which has a hard dependency on lxc-libs-3.0.3-1
and therefore blocks the update to lxc-libs-3.1.0-0.1
.
I chose the release tag of my COPR packages to be 0.x on purpose, to make sure upstream packages of the same version tag will always be preferred by the package manager. This usually works well except in this situation where an upstream package has a hard dependency on specific RPM version/release because it's build from the lxc.spec
file which also builds the library.
The lxc-templates-3.0.3-0.1
from my COPR repository however, is built from the separate source archive which still contains the old-style templates for bootstrapping containers and has Requires: lxc-libs%{?_isa} >= 3.0.0
which doesn't restrict which lxc-libs-3.x
version is used.
Work-Around:
To work around this issue, a user has the following options:
-
Block the
lxc-3.1.x
update from my COPR repository. This can be done by adding the following line to/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ganto:lxc3.repo
:[ganto-lxc3] ... excludepkgs=lxc*
The
lxd
packages from my COPR doesn't depend on a specific LXC version and should also work fine with the officiallxc-3.0.x
packages from the Fedora repository. -
Use the LXC 3.1 packages from my COPR and also switch to the
lxc-templates
package from my COPR repository. For this you have to add the following line to/etc/yum.repos.d/fedora-updates.repo
:[updates] ... excludepkgs=lxc-templates
After this step downgrade the
lxc-templates
package fromlxc-templates-3.0.3-1
(Fedora) tolxc-templates-3.0.3-0.1
(COPR) with:# dnf downgrade lxc-templates
Proper Solution
The proper solution will be for me to adjust the lxc.spec
to reflect the layout from the upstream spec file which means to build the lxc-templates
package from the LXC sources and then create a separate package (e.g. lxc-templates-extra
) which would contain the additional "legacy" templates. This would result in a lxc-templates-3.1.0-0.2
and lxc-templates-extra-3.0.3-0.1
and therefore fix the dependency issue.
Issue should be fixed by 475bc96 (lxc-templates according to upstream spec) and 1b8cd22 (lxc-templates-extra package). With lxc-templates-3.1.0-0.2
and higher all users should have a working upgrade experience.
IMPORTANT
Users who depend on the old-style templates originally packaged in the lxc-templates
RPM from the COPR repository now need to install the new lxc-templates-extra
package!