Closed ganto closed 5 years ago
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 official lxc-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 from lxc-templates-3.0.3-1
(Fedora) to lxc-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 475bc9667cde79f15c0d8ac298008350b098be30 (lxc-templates according to upstream spec) and 1b8cd227c2b3f5ec8ab26cee3525ad00d1f4dea3 (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!
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 containslxcfs-3.0.3-1
: