| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
While applying the last patches a few trailing whitespaces have been
introduced, making `make syntax-check` fail.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Although it's just the id used for the install script, let's remove the
reference to the already sunset fedorahosted.org and just use
"https://libosinfo.org/config" as the id.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
This test only ensures that libosinfo is able to properly load the
resource info from an OS entry.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
With that we can get rid of osinfo_os_private.h
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
network-install resources represent the resources to be used during a
network installation. It may differs from the minimum resources as the
network installers (not only the medias, but the trees) may download a
huge amount of data to the RAM* consuming way more than the minimum or
recommended RAM for the OS.
*: anaconda downloads the whole stage2 of the installer into the RAM in
order to perform a network installation.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
osinfo_os_get_recommended_resources -> osinfo_os_get_maximum_resources
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
osinfo_os_add_recommended_resources -> osinfo_os_add_maximum_resources
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
methos -> method
*private! -> *private*!
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
Do not check against a distro which doesn't have *any* of the values we
use to check as match_regex() would just match whatever we compare to
it.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
| |
"should" needs to be changed to "must" as since commit 00f258a6be
libosinfo refuses to load non-compliant named files.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
| |
Let's point to https://libosinfo.org/download/ instead of pointing to
pagure, as it could change again in the future.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
|
| |
There was a period of grace needed for backwards compatibility. After 3+
years, we can safely remove the code instroduced as part of 09ae3cf09
(which was released on 0.3.0).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Just mention that the libosinfo's mailing list is the *preferred* way to
send patches. More info, as the one about the project accepting Merge
Request, can be found in the project's website.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
| |
Let's point to pagure instead of referring to the already sunset
fedorahosted.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
| |
Signed-off-by: Felipe Borges <feborges@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Use g_list_free_full instead of g_list_foreach + g_list_free, so the
lists are cleared with a single call.
test-isodetect gets a void* wrapper, so there is no need to add casts
everywhere.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When creating the new GTask in osinfo_media_create_from_location_async,
no source object has been passed. Consequently
search_ppc_bootinfo_callback receives NULL as its source object, causing
warnings when trying to unref it.
Let's just pass the stream as the source object of the GTask in
osinfo_media_create_from_location_async in order to avoid the issue.
The issue has been introduced as part of 29f97cb7648.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
| |
In case g_file_read_finish() fails, the stream will always be NULL.
The issue has been introduced as part of f977527c82.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PPC ISOs do not have the "El Torito" extension that describes whether
the media is bootable or not. However, they have a "bootinfo.txt" file
placed under "ppc" directory in order to specify the media is bootable.
So, let's add a few more checks looking for "/ppc/bootinfo.txt" in case
the El Torito header is not found.
The whole implementation has been based on the following sources:
- The ISO 9660 (ECMA-119) specification:
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf
- The ISO 9660 osdev wiki page:
https://wiki.osdev.org/ISO_9660
- IBM's developer article:
https://www.ibm.com/developerworks/linux/library/l-detecting-bootable-ibm-power-server-iso-images/index.html
And what the implementation does is:
- Access the *root* directory record, which has a fixed size of 33 bytes
and is located at the bytes offset 156 of the PVD;
- Load the *root* directory record extent content into the memory and:
- Search for the the dir/file we're looking at;
- In the dir is present, we load its directory record extent content
into the memory and search for the next dir/file;
- In case the file is present, we return that the media is bootable;
- Otherwise, we return the media is non bootable;
Mind, though, that this code is *not* generic enough to be adapted in
case we want to search for a different dir/file and the reason for that
is related to some ISOs using a TRANS.TBL table that translates the
given name of a file to the shown name of the same file.
If, for some reason, we ever want to take the path of having this code
more generic we'd have to:
- For each directory acessed, search for TRANS.TBL;
- In case it's present, load its content into a hash table and, for
each dir/file, check the name of the file we're looking for with the
shown name (only present in the TRANS.TBL;
- Otherwise, just follow the very same code we currently have;
The decision for not implementing this TRANS.TBL changes is, mainly,
because it'd make the code circa twice slower than it currently is
(as we'd have to search for the TRANS.TBL as the first thing ...)
without any specific gain for the needs we have right now. In case
there's the need, in the future, it could be implemented in the way
described here.
https://gitlab.com/libosinfo/libosinfo/issues/8
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This is a helper to set the "non bootable" error for a media. It'll
become really handy in the next few patches in the series in order to
avoid code duplication.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This is a helper to create the OsinfoMedia from the
CreateFromLocationAsyncData. It'll become really handy in the next few
patches in the series in order to avoid code duplication.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
Let's use G_STATIC_ASSERT() instead of creating a dummy array to check
the size of the _PrimaryVolumeDescriptor struct.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
Let's replace EXIT for cleanup and ON_ERROR for error and follow a
normal naming convention for the labels.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
stream has to be freed whenever an error occurr on
osinfo_media_create_from_location_async() internals.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As install-scripts may behave differently depending on their
installation source, let's add two new methods to properly set what's
the installation source being used with the script and then decide what
we should do depending on the installation-source value.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those new methods are going to be used to tell the install-scripts
whether the injection-method that's going to be used is. We have to do
so as the command-line may be different depending on the
injection-method used, for example:
- fedora using cdrom, disk or floppy: ks=hd:/(vda|sda)/fedora.ks
- fedora using initrd: ks=file:/fedora.ks
It's important to mention that although the methods are taking GFlags,
those are treated as GEnum and only one value is expected to be set, as
mentioned in the documentation.
Also, mind that the usage of osinfo_entity_set_param() to store the
nick of the OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_* is intentional as
the nick is exactly what's going to be used in the install-scripts to
generate the proper command-line.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are errors which are not fatal and just ignored in load_keyinfo.
However, as those have not been cleaned up, we could see messages like:
(lt-osinfo-detect:20658): GLib-WARNING **: GError set over the top of a
previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL
before it's set.
The overwriting error message was: Key file does not have key “boot.iso”
in group “images-x86_64”
In order to avoid this, let's just call g_clear_error() after situations
where an error may have been set but it can just be ignored.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Instead of doing the same checks for key or group not found all over the
place, let's just add a new function that does that and replace the old
check for the new function.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
| |
osinfo_os_find_install_script() returns an object which ownsership is
not transferred.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
| |
Do not check against a distro which doesn't have treeinfo data as
match_regex() would just match whatever we compare to it.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As not all the "trees" we stored in osinfo-db have "treeinfo" data,
let's add a new method, osinfo_tree_has_treeinfo(), that can be used to
check whether the tree has treeinfo or not.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|