Bug in yum-minimal element when building centos 8 image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
New
|
Undecided
|
Unassigned |
Bug Description
08-yum-chroot in the yum-minimal element has a bug. When trying to build a centos-minimal image, DIB_RELEASE=8, the following happens:
2021-01-14 22:27:01.871 | dib-run-parts Running /tmp/dib_
2021-01-14 22:27:02.409 | Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_
2021-01-14 22:27:02.409 | DNF version: 4.2.17
2021-01-14 22:27:02.409 | cachedir: /tmp/tmp.ehOGDH0ORq
2021-01-14 22:27:02.416 | User-Agent: constructed: 'libdnf (CentOS Linux 8; generic; Linux.x86_64)'
2021-01-14 22:27:02.776 | repo: downloading from remote: centos-appstream
2021-01-14 22:27:06.177 | CentOS-8 - AppStream 1.9 MB/s | 6.3 MB 00:03
2021-01-14 22:27:07.646 | centos-appstream: using metadata from Thu Jan 7 08:51:09 2021.
2021-01-14 22:27:07.646 | repo: downloading from remote: centos-base
2021-01-14 22:27:08.692 | CentOS-8 - Base 2.2 MB/s | 2.3 MB 00:01
2021-01-14 22:27:09.248 | centos-base: using metadata from Thu Jan 7 08:51:01 2021.
2021-01-14 22:27:09.249 | repo: downloading from remote: centosplus
2021-01-14 22:27:09.783 | CentOS-8 - Plus 1.1 MB/s | 593 kB 00:00
2021-01-14 22:27:09.987 | centosplus: using metadata from Tue Dec 8 10:14:00 2020.
2021-01-14 22:27:10.594 | Completion plugin: Generating completion cache...
2021-01-14 22:27:10.595 | Completion plugin: Can't write completion cache: attempt to write a readonly database
2021-01-14 22:27:10.596 | No package centos-release available.
2021-01-14 22:27:10.596 | Exiting due to strict setting.
2021-01-14 22:27:10.599 | Error: No package centos-release available.
2021-01-14 22:27:10.641 | Failed to download initial packages: basesystem filesystem setup centos-release centos-
2021-01-14 22:27:10.643 | dib-run-parts 08-yum-chroot completed
As indicated, centos8 does not have a 'centos-release' package. The package name is `centos-
92 # CentOS 8.1 split repositories and GPG keys out into subpackages
93 if [[ ${DISTRO_NAME} = centos && ${DIB_RELEASE} > "7" ]]; then
94 packages+
95
96 if [[ "$DIB_RELEASE" =~ (stream) ]]; then
97 packages+
98 fi
99 fi
However, an earlier block incorrectly adds 'centos-release' to the packages list:
76 if [[ ${DISTRO_NAME} = fedora && ${DIB_RELEASE} -gt 29 ]]; then
77 packages+
78 else
79 packages+
80 fi
The test needs to be updated to exclude adding "${DISTRO_
description: | updated |
I've encountered this as well.
What I don't understand is why it fails. centos-release is provided by the centos- linux-release package.
The command `dnf install centos-release` just works in centos-8 normally.
# dnf provides centos-release linux-release- 8.3-1.2011. el8.noarch : CentOS Linux release files
Last metadata expiration check: 0:00:29 ago on Wed Jan 20 03:27:33 2021.
centos-
Repo : @System
Matched from:
Provide : centos-release = 8.3-1.2011.el8
centos- linux-release- 8.3-1.2011. el8.noarch : CentOS Linux release files
Repo : baseos
Matched from:
Provide : centos-release = 8.3-1.2011.el8