| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In glib commit 71e7b5800a31 ("Handle MLS selinux policy better",
2010-07-08), which was made for
<https://bugzilla.gnome.org/show_bug.cgi?id=623692>, an lstat() failure
with error code EACCES was *masked* in function _g_local_file_info_get().
Consequently, if osinfo_loader_find_files() calls g_file_query_info() on a
file that is inaccessible due to (e.g.) a missing "x" (search) permission
on a leading directory, then g_file_query_info() succeeds, our
"skipMissing" branch is dead, g_file_info_get_attribute_uint32() is
reached, and it returns G_FILE_TYPE_UNKNOWN.
As a consequence, the outer osinfo_loader_process_default_path() function
can fail, even though it passes skipMissing=TRUE to
osinfo_loader_process_list(). Example:
> $ HOME=/root \
> OSINFO_SYSTEM_DIR=/usr/share/osinfo \
> build/tools/osinfo-query os
> Error loading OS data: Can't read path /root/.config/osinfo
Arguably, this situation should be handled by simply skipping the
inaccessible path, as if all leading directories could be searched, and
only the last pathname compontent (the filename entry) didn't exist in its
direct parent directory.
The glib regression was reported in 2017:
https://bugzilla.gnome.org/show_bug.cgi?id=777187
and then migrated to gitlab:
https://gitlab.gnome.org/GNOME/glib/-/issues/1237
but it's still not solved today.
Work around the issue by honoring "skipMissing" on the G_FILE_TYPE_UNKNOWN
branch. Demonstration:
> $ HOME=/root \
> OSINFO_SYSTEM_DIR=/usr/share/osinfo \
> build/tools/osinfo-query os
>
> ** (osinfo-query:9924): WARNING **: 13:23:12.776: Can't read path /root/.config/osinfo
> Short ID | Name | Version | ID
> ----------------+------------------+---------+----------------------------------------
> alpinelinux3.5 | Alpine Linux 3.5 | 3.5 | http://alpinelinux.org/alpinelinux/3.5
> ...
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2051559
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
|
|
|
|
| |
By default it still only displays the first operating system with
matching media/tree, but if --all is given, all possible matches
will be displayed
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
A provided tree object might match multiple entries from the
database. Add an API that allows for this possibility to let
applications decide how to handle it.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
A provided media object might match multiple entries from the
database. Add an API that allows for this possibility to let
applications decide how to handle it.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Refactor the tree matching code so that it can be told to return all
matching entries, rather than only the first. The original behaviour
can be requested to short-circuit matching if the caller only requires
the first match.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Refactor the media matching code so that it can be told to return all
matching entries, rather than only the first. The original behaviour
can be requested to short-circuit matching if the caller only requires
the first match.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The tree matching code currently ignores the tree architecture which
is generally ok, since osinfo_tree_create_from_location will leave it
set to NULL.
None the less, if an architecture is provided for the unknown tree,
we should only return results that match this architecture.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The media matching code currently ignores the media architecture which
is generally ok, since osinfo_media_create_from_location will leave it
set to NULL.
None the less, if an architecture is provided for the unknown media,
we should only return results that match this architecture.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
In preparation for returning multiple tree matches, pass a
OsinfoTreeList object around.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
We just got the OsinfoTee list from the OsinfoOs object, thus we know
that it already has the 'os' property set.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
In preparation for returning multiple media matches, pass a
OsinfoMediaList object around.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
We want the return value from the tree guessing helper to indicate
whether any matches were used, and have the OsinfoOs as an output
parameter which can now be optional.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
We want the return value from the media guessing helper to indicate
whether any matches were used, and have the OsinfoOs as an output
parameter which can now be optional.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The logic for matching an unidentified tree against a reference tree
is potentially useful to applications and should be part of a public
API, rather than hidden.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The logic for matching an unidentified media against a reference media
is potentially useful to applications and should be part of a public
API, rather than hidden.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 81.8% (140 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/de/
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Signed-off-by: Ettore Atalan <atalanttore@googlemail.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 73.0% (125 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Signed-off-by: Jan Kuparinen <copper_fin@hotmail.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current include files use the pattern
#ifndef __OOSINFO_BLAH_H__
# define __OOSINFO_BLAH_H__
#endif /* __OOSINFO_BLAH_H__ */
Since we already mandated GCC + CLang, we can replace this with a
simpler incantation
#pragma once
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So we can provide a meaningful error message in case the provided path
is not accessible to running process.
e.g: running HOME=/root osinfo-query os we would get
`Error loading OS data: Unexpected file type`
and now we get
`Error loading OS data: Can't read path /root/.config/osinfo`
This error was first hit with v2v [0] that was leaking $USER and $HOME
of root user when osinfo-query as vsdm user with `sudo -c vdsm`. The
example above is a simple way to show lack of permision of
osinfo-query to read the root's $HOME.
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1901423
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1902720
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
After realising the mistake of only returning **supported** firmwares on
`_get_firmware_list()`, let's work that limitation around by adding a
new function, `osinfo_os_get_complete_firmware_list()`, which returns
the complete list of firmwares, including both supported and unsupported
ones.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Let's make sure we document that `_get_firmware_list()` returns **only**
supported firmwares, rather than returning **all** the firmwares
avaiable for an OS.
As part of the documentation change, let's also adapt the internal
functions to reflect that.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
|
|
|
|
|
|
|
| |
osinfo_os_add_firmware() has been added as part of 1.7.0 release but,
somehow, its documentation has been missing.
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
|
|
|
|
|
|
| |
lcitool now supports CentOS Stream 9, Debian 11 and Fedora 35.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
|
|
|
|
| |
Now that we have a recent version of meson installed from
distro packages instead of PyPI, RPM builds will no longer
fail.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable differences:
* meson is now installed from the distro repositories
instead of PyPI on CentOS 8 and CentOS Stream 8. We
can finally do this because the version they ship
has been updated.
* intltool and itstool (which are used to build osinfo-db
as part of the CI pipeline) are no longer included in the
container images. osinfo-db-tools moved away from the
former and never adopted the latter.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
|
|
|
| |
It's going to be EOL in a matter of days, and lcitool already
dropped support for it.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
If we fail to parse one of the XML files, we abort loading the
database. We then carry on to do an entity reference check which
will almost certainly fail due to not having loaded many XML
files. We need to skip over the entity reference check on failure
to avoid spamming the user with bogus errors.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To help remind users that files must end in .xml, warn about any
unusually named files.
There are a couple of files we should not warn about since we expect
them to be present
- VERSION
- LICENSE
The entire 'schema' sub-directory should be ignored.
Common editor backups "~" and ".bak" should be ignored.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The osinfo-db documentation says that a local admin/user can hide an
entity from the system location:
[quote]
If the file is zero-length or points to /dev/null, then this
represents a black-out override. This indicates that the
ENTITY-NAME.xml file from a lower priority directory MUST NOT
be loaded.
[/quote]
This does not, however, work at all. If a zero length file is given,
it tries to parse this as XML and fails, causing the entire DB loading
process to be aborted. This leaves the DB with dangling references.
If a symlink to /dev/null is given, it is entirely ignored because
the file is a block device and we only try to load regular files.
Instead of only loading regular files, we need to load any type of
file that has a .xml extension.
This appears to be broken since the very first impl of the new DB
loading process, despite having written the spec at the same time.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
| |
See https://libsoup.org/libsoup-3.0/SoupSession.html#soup-session-send-async
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
|
|
|
|
|
|
|
|
|
| |
You can no longer directly access various structs such as SoupMessage.
These are now accessed by getters and setters.
See https://libsoup.org/libsoup-3.0/ch02.html
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
|
|
|
|
|
|
| |
Let's use the literal "user-agent" instead.
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
|
|
|
|
|
|
|
|
| |
See https://blog.tingping.se/2021/02/23/future-of-libsoup.html
This will fallback to libsoup-2.4 when libsoup3 isn't available.
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add_project_arguments() sets flags that apply to all invokations of the C
compiler toolchain by meson. On the surface it sounds fine to use this
for setting
-DGLIB_VERSION_MIN_REQUIRED=VER
-DGLIB_VERSION_MAX_ALLOWED=VER
as we want all our code to be constrained by these declared glib
versions to prevent us accidentally using APIS from newer glib by
mistake.
A subtle problem was revealed with the arrival of gobject-introspection
version 1.70. The g-ir-scanner program auto-generates some glib code
for handling introspection, and this generated code uses glib APIs that
are newer than our declared version and this triggers compile failures
tmp-introspectg6xadxkr/Libosinfo-1.0.c:251:3: error: ‘G_TYPE_FLAG_FINAL’ is deprecated: Not available before 2.70 [-Werror=deprecated-declarations]
251 | if (G_TYPE_IS_FINAL (type))
| ^~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from tmp-introspectg6xadxkr/Libosinfo-1.0.c:30:
/usr/include/glib-2.0/gobject/gtype.h:1050:3: note: declared here
1050 | G_TYPE_FLAG_FINAL GLIB_AVAILABLE_ENUMERATOR_IN_2_70 = (1 << 6)
| ^~~~~~~~~~~~~~~~~
tmp-introspectg6xadxkr/Libosinfo-1.0.c:251:13: error: Not available before 2.70 [-Werror]
251 | if (G_TYPE_IS_FINAL (type))
| ^~~~~~~~~~~~~~~~~
This is actually harmless, because systems with an older glib will also
have older g-ir-scanner and thus not be using these new APIs.
We need to exclude the glib version constraints from code generated by
glib tools, and thus means we have to stop using add_project_arguments()
and set cflags explicitly on each target.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pt_BR/
Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Signed-off-by: Rafael Fontenelle <rafaelff@gnome.org>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 65.4% (112 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Signed-off-by: Jan Kuparinen <copper_fin@hotmail.com>
|
|
|
|
|
|
| |
We now use lcitool's manifest feature to generate files.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
This uses the command "lcitool manifest ci/manifest.yml" to re-generate
all existing dockerfiles and gitlab CI config.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to be used with the command "lcitool manifest ci/manifest.yml"
to re-generate all existing dockerfiles and gitlab CI config.
In a slight change to the existing config, the manifest will always
use the pre-build osinfo-db-tools package. Nothing in the libosinfo
CI tasks, has a need to exercise latest git master for osinfo-db-tools.
The latter is covered fine by osinfo-db CI jobs.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
| |
This platform is no longer supported by libvirt-ci.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
| |
This platform is no longer supported by libvirt-ci.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 0.5% (1 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/si/
Co-authored-by: Hela Basa <r45xveza@pm.me>
Signed-off-by: Hela Basa <r45xveza@pm.me>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
Co-authored-by: Andika Triwidada <andika@gmail.com>
Signed-off-by: Andika Triwidada <andika@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 64.9% (111 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Translated using Weblate (Finnish)
Currently translated at 33.9% (58 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Signed-off-by: Jan Kuparinen <copper_fin@hotmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Signed-off-by: Oğuz Ersen <oguzersen@protonmail.com>
|