Update an rc-update call to only be made if running openrc instead of
all gentoo profiles (systemd does not have rc-update).
Add python3-pyyaml package mappings.
Update serial console to support multiple arches.
Update open-iscsi and open-isns keywords (looks like upstream merged
some musl fixes).
Update the kernel and initramfs file name globs for the
gentoo-kernel-bin usage.
Change-Id: I259bffed3a3e3f92be2210ead6bdfa383917d457
Signed-off-by: Matthew Thode <mthode@mthode.org>
This breaks having git as a package-install in other elements. And results in diskimage-builder always erasing git on the image.
This reverts commit 3c65025559.
Change-Id: Ifb18c4243aa08055d98602aa4fdb30b16dae061d
Adds:
1. grub-efi package mappings
2. efi-64 support
3. default (openrc) arm64 profile
4. systemd arm64 profile
Cleans up the keywords and use flags in 02-gentoo-02-flags. Most stuff
was stablized. Also cleaned up some formatting for the if statements.
Enables less trusted overlays (up to the end user to verify).
in 10-gentoo-image I cleaned up some bash lint things as well.
using && instead of -a and avoiding $?
Change-Id: I3dffe1aab4bbdc4946a9bf2269bf0cde49529a4e
For Bios and EFI compatibility, grub must be installed twice.
This patch adds the bios version when EFI is selected. The GPT EFI block partitioning
already adds the bios partition, but the bootloader only called grub once.
Change-Id: Iee6c8b3b97b3cfff4562bcb30a50800f5ade894a
Closes-Bug: #1889089
The packages yum-utils and python-lzma have python 2 dependencies
and they're not present for Ubuntu Focal.
The package zypper should not be installed as it's not used.
Closes-Bug: 1891299
Change-Id: I3c96ae7ebb814973b77b4a1b966c39658acc5683
NetworkManager takes a distinctly differnet network management
approach and the bulk of the dhcp-all-interfaces code is largely
targetted at distribution specific configuration. Some which may
or may not override settings, or only partially assert desirable
settings.
As such, we need to set appropriate configuration, such as the
correct client to be used, and timeouts based upon user supplied
settings.
By default this change sets the client to be dhclient on redhat
styled machines, as the packaging default, while it works for
ramdisk usage, it does not reset the interface between retries,
which can be critical if the infrastucture operator is attempting
to configure LACP trunks to the end node.
Change-Id: I0e0cfbdbf7ef2b2861b934ccd7dab9d83a35c8f0
Story: 2008001
Task: 40648
Git is a build-time dependency that should not end up in the final
image should source-repositories be the only element requiring it at
image build time.
Change-Id: Id0798c0a753f893d02c2d13fddea0c04b28cb7ca
glance-registry service was deprecated in Queens release and has been
removed in Victoria [1].
[1] https://review.opendev.org/#/c/738671/
Change-Id: Id2dfc3455b377b885521556f37f4b0f2da197655
We are at the point that all distributions we are building have Python
3, so any tools running in the chroot can assume Python 3 exists.
This makes dib-python redundant; mark it as deprecated and start to
remove it from elements where it is no longer required.
Change-Id: I5d852843ec65d3b04444b77c54c5b82424455cd8
CentOS 7 is the only distro we support currently that doesn't have
Python 3 installed in some form in the base images. For centos 7 add
an early install of it in the yum element so we can have all the
in-chroot scripts assume Python 3. There is only one package that
causes issues; yaml which comes from EPEL. Everywhere else it is a
base package, but we don't have a way to say "enable epel to install
this". Just hack it in, we don't want to go reworking the world for
CentOS 7 at this point.
Also add python3 and it's yaml library to the centos 8 path. This
brings in the "user" python3 in /urs/bin/python3 (the "system" python3
is already installed). Again, this just lets us assume
/usr/bin/python3 in scripts for all platforms.
package-installs is one of these things running python in the chroot,
and unfortunately we have elements that use it at 01- level in
pre-installd. Thus to make sure python3 is there nice and early, run
it at 0 level, but make sure it comes after yum/dnf update.
Change-Id: I088fc4284e889147ca9a375d4a159264cff53484
Other architectures are stored under "altarch" for CentOS 7, update
the match.
Convert the delimiters to "," to avoid a subtle problem with "|" --
POSIX states
Within the BRE and the replacement, the BRE delimiter itself can be
used as a literal character if it is preceded by a backslash.
So "s|\(foo\|bar\)|moo|" doesn't do what you might think; the inner
pipe becomes a literal | and this will *not* match "foo" or "bar".
Change-Id: Ic1642325e3a59a10453c356d8d839ce649812af8
Simplify gpg checking by caching a keyring instead of keys to import.
Change-Id: I5ed74ec0e12732aec40ef31377e72d7ddc347f95
Signed-off-by: Matthew Thode <mthode@mthode.org>
Now that DIB is python3 only we can remove a hack that made sure
scripts outside the chroot ran with the correct version of python.
This is necessary as python3 does not resolve symbolic links to the
binary like python2.x did, which causes element scripts to fail finding
modules when DIB was run from inside a venv.
This patch does the following:
1. Reverts 9c7b8d1714 which was the
workaround for mixed python2/3 environments.
2. Updates the scripts to use "python3" instead of "python".
Change-Id: If2402bb02fc8a4778fa9434fa167ea1fafd87c28
With the removal of Python 2.x we can remove the unittest2 compat
wrappers and switch to assertCountEqual instead of assertItemsEqual
We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: I870286a2557e41099597c22dc9747743e1077615
Elements like yum and yum-minimal depend on the yum and yumdownloader
CLIs on the DIB host. We have been assuming these tools are always
installed on Red Hat family distributions but that is no longer the case
starting from RHEL 8 and CentOS 8 and Fedora for a while -- these
systems moved on to DNF and DNF does not have a hard requirement on yum.
We noticed these two tools were missing while building an Octavia
amphora image on a CentOS 8 controller node in CI:
[...] 08-yum-chroot:_install_pkg_manager:223 : sudo -E yum -y [...]
[...] sudo: yum: command not found
Change-Id: I65807751b3764e86ba5adeb47552305ef2ea299b
EPEL centos8 have different epel repos like
epel, epel-modular, epel-playground etc, so
we need to disable all not just epel.
Also ensure other epel repositories in CentOS7
like epel-testing are also disabled.
Related-Bug: #1885315
Change-Id: I02b3b83fa2047702d5f069d3ca1c9c0bcc1dab52
DIB was retrieving the oldest cloud image file which, presently, means
retrieving CentOS 8.1 instead of CentOS 8.2. Even though DIB runs a
system update and so catches up to latest, this takes bandwidth, time
and final image space (8.1 + system update = 765M qcow2, vs 8.2 + system
update = 518M qcow2).
This patch fixes that by taking the first image name in a descending
order list.
Change-Id: I648fe19f1f76c03c97492b6ac7be6381f6f9261b
This patch adds support for CentOS 8 Stream [1] to the centos-minimal
element. Users should set DIB_RELEASE=8-stream.
[1] https://www.centos.org/stream/
Change-Id: Id0825de735ab957c10daf35fb3c641f850cc6847