IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
As medias may also have installer scripts associates to themselves and,
in this case, those should be considered instead the OS ones.
More than that, Libosinfo.Media provides an API that tells whether that
specific media supports installer scripts or not and this must be
checked as the first thing. In case no installer script is supported,
let's just error out and abort the installation.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's refactor get_install_script() in a way that any addition done in
order to get the install scripts from the media would be cleaner.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
generate_install_script_output() generates the install script,
accordingly to the config passed, in a specific directory.
generate_install_script_cmdline() generates the kernel command line that
has to be used in order to perform the unattended installation.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
As some of the install scripts may act differently depending on whether
the installation is going to be done via the OS media or via network
let's have a wrapper around set_installation_source(), from
Libosinfo.InstallScript, in order to be able to properly set which is
going to be the used installation source.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
As not all unattended installations will be done by the same method,
let's have a wrapper around set_preferred_injection_method(), from
Libosinfo.InstallSript, in order to be able to properly set which is
going to be the preferred injection method for a script.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's try to guess the language and keyboard layout from the system's
language.
In case we can't do the guess, let's just let it be and libosinfo will
use the 'en_US' default for both language and keyboard layout.
There's a big issue here, though, that quite often users will *not* have
their keyboard layout matching with the language of their systems and,
unfortunately, I don't see any easy way to detect that unless we totally
rely on GLib.Settings (which, according to my understanding, we can't).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's try to guess the timezone from '/etc/localtime' and use it, if
possible. Otherwise, let's just let it be and libosinfo will use the
default 'America/New_York' one.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
get_install_script_config() method returns an OsinfoInstallScriptConfig
object that's tied to an OsinfoInstallScript object, already configured
based in the info provided by the user and it's ready to be used.
For now, the config will always set the timezome to 'America/New_York'
and the language and keyboard layout to 'en_US'.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
get_install_script() method returns an installer script of a specific
profile type for a specific OS.
In case no OS is defined, None is returned.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
If a distribution has no EOL date set, always consider it supported if
its release status is "rolling".
(crobinso: reformat a bit, appease pylint)
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
get_location() is a new method that returns the osinfo-db tree URL of an
OS, according to the passed architecture.
This method will need some improvement later on once we start having a
specific set of definitions on osinfo-db about what's the type of the OS
we're dealing with (like Server, Desktop, ...).
For now, the new method returns the first URL found without taking into
the consideration the types speficied above.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
guess_os_from_media() has been deprecated for a while and
identify_media() should be used instead.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This was originally added for fedora to give better names in the UI,
but that's a loose reasoning IMO. The pattern was extended to
other -unknown distros but instead of maintaining that going
forward I'd rather just remove the magic for it.
As some enterprise distros adopted the "unknown" approach in osinfo-db,
and those usually support different versions at the same time, there may
be different "unknown" entries (like rhel-unknown, rhel-8-unknown,
rhel-7-unknown, and so on) for the very same distro.
This situation can easily happen when some ISO matches, for exmaple,
"rhel-unknown" and then the latest one selected would be
"rhel-8-unknown".
In order to avoid this situation from happening, let's just ignore the
"unknown" entries when calling latest_regex().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Due to OpenSUSE's decision of versioning their OS as 11.x, 12.x, 42.x,
15.x, we have to add a specific check in latest_regex() in order to make
sure we skip the 42.x series in the sorted list of OSes when returning
the OS name to the user.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Currently osinfo-db has "unknown" entries for fedora, opensuse and
asianux. Considering this list may grow even more at some point, let's
just make the check more generic and use it for all of them instead of
keeping it for fedora only.
Changes have also been done in urldetect and tests_url, as those also
used latest_fedora_version().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Arguments to logging needs to be individual args, otherwise it
fails with "not enough arguments for format string"
Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
There's been various discussions about changing the x86 default
from 'pc' to 'q35' over the years, but it's unlikely to happen
at the qemu or libvirt level for compatibility reasons. So
let's start using it for new enough OS that support it.
At some point in the future it could be a good idea to drop the _aliases
mapping altogether; it will be hard to do so, in case the users are not
informed that they are using a deprecated ID.
(crobinso: Tweak format and message)
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This is just a big nasty commit.
Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
We shouldn't concern ourselves with whether the OS supports qemu_ga
out of the box, just set up the channel regardless, as long as
virtio-serial is supported.
This adds the channel for some aarch64 cases which didn't have OS
specified, but that's desired IMO