Current File : //usr/share/doc/libosinfo/ChangeLog
2022-02-14 Victor Toso <victortoso@redhat.com>
Update NEWS for 1.10.0 release
2022-02-11 Laszlo Ersek <lersek@redhat.com>
loader: work around lstat()/EACCES regression in _g_local_file_info_get()
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
2022-02-04 Daniel P. Berrangé <berrange@redhat.com>
tools: add an --all flag to osinfo-detect to report all matches
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
osinfo: add API for resolving multiple tree matches
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.
osinfo: add API for resolving multiple media matches
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.
osinfo: allow tree matching code to report multiple entries
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.
osinfo: allow media matching code to report multiple entries
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.
osinfo: honour tree architecture when matching
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.
osinfo: honour media architecture when matching
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.
guests: use a OsinfoTreeList when detecting tree matches
In preparation for returning multiple tree matches, pass a
OsinfoTreeList object around.
osinfo: don't set the 'os' property on matched tree
We just got the OsinfoTee list from the OsinfoOs object, thus we know
that it already has the 'os' property set.
guests: use a OsinfoMediaList when detecting media matches
In preparation for returning multiple media matches, pass a
OsinfoMediaList object around.
osinfo: refactor tree guessing internal helper
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.
osinfo: refactor media guessing internal helper
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.
osinfo: pull tree matching logic into public API
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.
osinfo: pull media matching logic into public API
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.
osinfo: add missing line break between methods
2022-01-18 Ettore Atalan <atalanttore@googlemail.com>
Translated using Weblate (German)
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>
2022-01-18 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
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>
2022-01-18 Daniel P. Berrangé <berrange@redhat.com>
osinfo: use consistent include syntax for public headers
osinfo: switch to '#pragma once'
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
osinfo: fix bad preprocessor indentation
2021-11-29 Victor Toso <victortoso@redhat.com>
loader: add check for unknown file type
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
2021-11-24 Fabiano Fidêncio <fabiano@fidencio.org>
os: Add `_get_complete_firmware_list()`
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.
os: _get_firmware_list() returns supported FWs
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.
os: Add missing docs for _add_firmware()
osinfo_os_add_firmware() has been added as part of 1.7.0 release but,
somehow, its documentation has been missing.
2021-11-12 Andrea Bolognani <abologna@redhat.com>
ci: Add new targets
lcitool now supports CentOS Stream 9, Debian 11 and Fedora 35.
ci: Enable RPM jobs on CentOS
Now that we have a recent version of meson installed from
distro packages instead of PyPI, RPM builds will no longer
fail.
ci: Refresh generated files
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.
ci: Drop Fedora 33
It's going to be EOL in a matter of days, and lcitool already
dropped support for it.
2021-10-10 Daniel P. Berrangé <berrange@redhat.com>
Skip over entity reference checks if loading failed
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.
Warn about unexpected files in the database
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.
Fix hiding of database entries
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.
2021-10-06 Felipe Borges <felipeborges@gnome.org>
tree, media: Soup.Session.send_async now takes an IO priority argument
See https://libsoup.org/libsoup-3.0/SoupSession.html#soup-session-send-async
tree, media: SoupMessage is a private struct in libsoup3
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
tree, media: SOUP_SESSION_USER_AGENT isn't defined in libosup3
Let's use the literal "user-agent" instead.
build: Require libsoup3
See https://blog.tingping.se/2021/02/23/future-of-libsoup.html
This will fallback to libsoup-2.4 when libsoup3 isn't available.
2021-09-27 Daniel P. Berrangé <berrange@redhat.com>
build: don't set glib version constraints for g-ir-scanner
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.
2021-09-06 Rafael Fontenelle <rafaelff@gnome.org>
Translated using Weblate (Portuguese (Brazil))
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>
2021-09-06 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
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>
2021-09-03 Daniel P. Berrangé <berrange@redhat.com>
ci: remove obsolete refresh script and documentation
We now use lcitool's manifest feature to generate files.
ci: re-generate containers/gitlab config from manifest
This uses the command "lcitool manifest ci/manifest.yml" to re-generate
all existing dockerfiles and gitlab CI config.
ci: define a CI manifest file
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.
gitlab: remove debian-9 build target
This platform is no longer supported by libvirt-ci.
gitlab: remove centos-7 build target
This platform is no longer supported by libvirt-ci.
2021-08-25 Hela Basa <r45xveza@pm.me>
Translated using Weblate (Sinhala)
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>
2021-08-25 Andika Triwidada <andika@gmail.com>
Translated using Weblate (Indonesian)
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>
2021-08-25 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
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>
2021-08-05 simmon <simmon@nplob.com>
Translated using Weblate (Korean)
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>
2021-08-05 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
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>
2021-08-05 Yuri Chornoivan <yurchor@ukr.net>
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/uk/
Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
2021-08-05 Pino Toscano <toscano.pino@tiscali.it>
Translated using Weblate (Italian)
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/it/
Co-authored-by: Pino Toscano <toscano.pino@tiscali.it>
2021-08-05 Piotr Drąg <piotrdrag@gmail.com>
Translated using Weblate (Polish)
Currently translated at 100.0% (171 of 171 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pl/
Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
2021-08-05 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
Translation: libosinfo/libosinfo
2021-08-05 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
Currently translated at 32.3% (55 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
2021-08-04 Pino Toscano <ptoscano@redhat.com>
po: regenerate libosinfo.pot
2021-07-27 Daniel P. Berrangé <berrange@redhat.com>
ci: refresh centos-stream container
It is no longer possible to just install an extra package to run regular
centos into centos stream.
gitlab: use custom docker:dind image
The current docker:dind container has broken default seccomp filter that
results in clone3 being blocked, which in turn breaks Fedora 35 rawhide.
This custom image has a workaround that causes the seccomp filter to
return ENOSYS for clone3 instad of EPERM, thus triggering glibc to
fallback to clone correctly.
2021-07-22 Seong-ho Cho <darkcircle.0426@gmail.com>
Translated using Weblate (Korean)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Co-authored-by: Seong-ho Cho <darkcircle.0426@gmail.com>
2021-04-15 simmon <simmon@nplob.com>
Translated using Weblate (Korean)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Co-authored-by: simmon <simmon@nplob.com>
2021-04-13 simmon <simmon@nplob.com>
Translated using Weblate (Korean)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Co-authored-by: simmon <simmon@nplob.com>
2021-04-07 simmon <simmon@nplob.com>
Translated using Weblate (Korean)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Co-authored-by: simmon <simmon@nplob.com>
2021-04-05 simmon <simmon@nplob.com>
Translated using Weblate (Korean)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/ko/
Added translation using Weblate (Korean)
Co-authored-by: simmon <simmon@nplob.com>
2021-03-07 Hela Basa <r45xveza@pm.me>
Added translation using Weblate (Sinhala)
Co-authored-by: Hela Basa <r45xveza@pm.me>
2021-03-07 Ricky Tigg <ricky.tigg@gmail.com>
Translated using Weblate (Finnish)
Currently translated at 25.2% (43 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Translated using Weblate (Finnish)
Currently translated at 23.5% (40 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
2021-03-07 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
Currently translated at 19.4% (33 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
2021-03-07 Ricky Tigg <ricky.tigg@gmail.com>
Translated using Weblate (Finnish)
Currently translated at 18.8% (32 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
2021-02-24 Fabiano Fidêncio <fidencio@redhat.com>
tools: Add "Release status" info to `osinfo-query os`
Release status has never been part of `osinfo-query os`, but it's been
proven to be a needed information, mainly because the rolling distro may
not even have their release & eol date filled up.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1932258
2021-02-10 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.10.0
2021-02-02 Fabiano Fidêncio <fidencio@redhat.com>
Update NEWS for 1.9.0 release
2021-01-11 Jan Kuparinen <copper_fin@hotmail.com>
Translated using Weblate (Finnish)
Currently translated at 15.8% (27 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fi/
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
2021-01-11 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
Translation: libosinfo/libosinfo
2021-01-08 Timm Bäder <tbaeder@redhat.com>
install config: Rename a parameter
'timezone' is a global variable in time.h, so clang complains about
that.
build: Move bsd/mac checks to be compiler-specific
They depend on the compiler in use, not the operating system
2020-12-15 Fabian Affolter <mail@fabian-affolter.ch>
Translated using Weblate (German)
Currently translated at 64.7% (110 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/de/
Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2020-12-15 Daniel P. Berrangé <berrange@redhat.com>
ci: refresh containers for CentOS-8 PowerTools repo rename
A recent CentOS-8 update renamed the "PowerTools" repo to "powertools"
and since dnf is case sensitive wrt repo names, this broke ability to
build new containers.
The refresh fixes the repo name and pulls in other misc improvements
to containers.
2020-12-01 Daniel P. Berrangé <berrange@redhat.com>
gitlab: update refresh script for changed host naming convention
gitlab: refresh containers with lcitool for fully minimized base
gitlab: re-generate container images from lcitool
This introduces Fedora 33 and removes some redundant packages.
Note that rpm build is marked as skip on CentOS 8/Stream now, since
we're using pip provide meson instead of distro meson, and thus don't
have the %meson macro.
2020-11-13 Cole Robinson <crobinso@redhat.com>
loader: Print filename in libxml error string
This is how libvirt handles it. Would help debugging apparently
random failures like these bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1897356
https://bugzilla.redhat.com/show_bug.cgi?id=1651550
2020-09-15 Milo Casagrande <milo@milo.name>
Translated using Weblate (Italian)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/it/
Co-authored-by: Milo Casagrande <milo@milo.name>
2020-09-14 Milo Casagrande <milo@milo.name>
Translated using Weblate (Italian)
Currently translated at 97.0% (165 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/it/
Co-authored-by: Milo Casagrande <milo@milo.name>
2020-09-14 Pino Toscano <toscano.pino@tiscali.it>
Translated using Weblate (Italian)
Currently translated at 97.0% (165 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/it/
Co-authored-by: Pino Toscano <toscano.pino@tiscali.it>
2020-09-14 Fabio Tomat <f.t.public@gmail.com>
Translated using Weblate (Friulian)
Currently translated at 66.4% (113 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fur/
Translated using Weblate (Spanish)
Currently translated at 12.9% (22 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/es/
Added translation using Weblate (Friulian)
Co-authored-by: Fabio Tomat <f.t.public@gmail.com>
2020-09-14 Alexey Shabalin <a.shabalin@gmail.com>
Added translation using Weblate (Russian)
Co-authored-by: Alexey Shabalin <a.shabalin@gmail.com>
2020-09-14 Mikel Olasagasti <mikel@olasagasti.info>
Added translation using Weblate (Basque)
Co-authored-by: Mikel Olasagasti <mikel@olasagasti.info>
2020-08-15 Emilio Herrera <ehespinosa57@gmail.com>
Translated using Weblate (Spanish)
Currently translated at 12.9% (22 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/es/
2020-08-08 Rafael Fontenelle <rafaelff@gnome.org>
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pt_BR/
2020-08-08 Kukuh Syafaat <kukuh@syafaat.id>
Translated using Weblate (Indonesian)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
2020-07-31 Julien Humbert <julroy67@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fr/
2020-07-29 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-07-29 Yuri Chornoivan <yurchor@ukr.net>
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/uk/
2020-07-28 Piotr Drąg <piotrdrag@gmail.com>
Translated using Weblate (Polish)
Currently translated at 100.0% (170 of 170 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pl/
2020-07-28 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
2020-07-28 Pino Toscano <ptoscano@redhat.com>
po: regenerate libosinfo.pot
2020-07-28 Rafael Fontenelle <rafaelff@gnome.org>
Fix misspellings
2020-07-28 Pino Toscano <ptoscano@redhat.com>
tools,detect: improve command line option help
Literal identifiers, such as 'media', 'tree', etc in translatable
strings are a bad idea, since they will likely be translated, misguiding
users reading the help of a translated version.
Refactor a bit the way these bits are show to the user:
- in the help of --format and --type, show a generic name of the
argument value, and slightly improve the description text
- add a small description text after the listing of the command line
options to mention the allowed values
Fixes: #42
2020-07-28 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
2020-07-28 Rafael Fontenelle <rafaelff@gnome.org>
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pt_BR/
Translated using Weblate (Portuguese (Brazil))
Currently translated at 97.6% (165 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pt_BR/
2020-07-28 Fabiano Fidêncio <fidencio@redhat.com>
spec: Explicitly call %meson_build in the %build section
It was never needed before as the %meson_install macro would perform a
project rebuild. However, most recent versions of meson have changed the
%meson_install macro to use `--no-rebuild`, exposing then this issue on
our spec file.
Fixes: #43
2020-06-22 Julien Humbert <julroy67@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fr/
2020-06-17 Andrea Bolognani <abologna@redhat.com>
ci: Don't use RPM=skip for container builds
It only makes sense for actual build jobs.
ci: Check for rpmbuild availability
Only try to build RPMs if the rpmbuild command is present on the
system. This means we no longer have to use the RPM=skip trick on
Debian-based targets, and can limit it to cases where building
RPMs is actually broken for some reason.
ci: Simplify rpmbuild command
We don't have to worry about cleaning up after ourselves, since
we're running the build inside an ephemeral container.
ci: Add CentOS Stream
Starting with
commit d35a7dba9cc8ac3bb0647171628731c625d4e14f
Author: Erik Skultety <eskultet@redhat.com>
Date: Thu Jun 4 16:17:36 2020 +0200
guests: Add CentOS Stream
The idea behind Stream is to get a preview of what the next RHEL-minor
will look like, thus getting newer versions of packages than regular
CentOS provides. It's supposed to be rolling, so currently it's based on
CentOS 8, but once RHEL-9 is out, it will point to the next RHEL-9
instead. However, unlike debian-sid it doesn't have a dedicated URL
resource (something like centos-stream), so we'll have to change it
manually once it's flipped to point to next RHEL-9.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
lcitool supports CentOS Stream as a build target.
ci: Use $MESON_OPTS
This information is part of the container image now.
ci: Refresh Dockerfiles
Starting with
commit 25c9da0aaa94fbca674dca6dec65f6348f335e7d
Author: Andrea Bolognani <abologna@redhat.com>
Date: Fri May 22 17:38:10 2020 +0200
lcitool: Generate MESON_OPTS in Dockerfiles
This serves the same purpose as CONFIGURE_OPTS: enable seamless
cross-compilation support, in this case for Meson-based projects.
Only MinGW cross-compilation targets are currently supported.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
lcitool will include a $MESON_OPTS environment variable, which can
be used to simplify our GitLab CI build rules, in the Dockerfiles
it generates.
ci: Move Dockerfiles to a subdir
This is consistent to how libvirt organizes its files, and ensures
things will remain tidy even as we introduce new features such as,
later on, Cirrus CI support.
ci: Clean up refresh script a bit
Remove some repetition through refactoring.
2020-06-02 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.9.0
2020-05-29 Fabiano Fidêncio <fidencio@redhat.com>
Update NEWS for 1.8.0 release
2020-05-29 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
2020-05-29 Julien Humbert <julroy67@gmail.com>
Translated using Weblate (French)
Currently translated at 98.8% (167 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fr/
2020-05-28 Andrea Bolognani <abologna@redhat.com>
ci: Use GitLab container registry
Instead of using pre-built containers hosted on Quay, build
containers as part of the GitLab CI pipeline and upload them to the
GitLab container registry for later use.
This does not slow down builds, because containers are only rebuilt
when the corresponding Dockerfile has been modified.
2020-05-22 Manuela Silva <mmsrs@sky.com>
Translated using Weblate (Portuguese (Portugal))
Currently translated at 57.9% (98 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pt_PT/
2020-05-22 Anonymous <noreply@weblate.org>
Translated using Weblate (Indonesian)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
2020-05-22 Andika Triwidada <andika@gmail.com>
Translated using Weblate (Indonesian)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
2020-05-22 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-05-22 Yuri Chornoivan <yurchor@ukr.net>
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/uk/
2020-05-21 Piotr Drąg <piotrdrag@gmail.com>
Translated using Weblate (Polish)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pl/
2020-05-21 Anonymous <noreply@weblate.org>
Translated using Weblate (Indonesian)
Currently translated at 1.1% (2 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
Translated using Weblate (Polish)
Currently translated at 100.0% (169 of 169 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/pl/
2020-05-21 Manuela Silva <mmsrs@sky.com>
Added translation using Weblate (Portuguese (Portugal))
2020-05-20 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update LINGUAS file" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
2020-05-20 Pino Toscano <ptoscano@redhat.com>
po: remove duplicated msgid in 'id' catalog
Fix it manually, otherwise gettext tools cannot work with it.
2020-05-20 Weblate <noreply@weblate.org>
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/
2020-05-14 Daniel P. Berrangé <berrange@redhat.com>
build-aux: use gmake for syntax-check rules
Previously on FreeBSD the syntax-check rules would be a no-op because
its non-GNU make wouldn't see the GNUmakefile and would report no work
to do:
$ MESON_SOURCE_ROOT=`pwd` build-aux/syntax-check
`syntax-check' is up to date.
Since we moved everything into a syntax-check.mk that we call explicitly
though, we're the non-GNU make tries to execute rules that depend on
GNU make features.
build-aux: fix references to old maint.mk name
2020-05-13 Daniel P. Berrangé <berrange@redhat.com>
build-aux: rename maint.mk to syntax-check.mk
This name aligns with what the makefile actally does.
build-aux: remove GNUmakefile entirely
The only useful bits it still did were setting a couple of variables,
which can be moved into the main maint.mk file.
build-aux: merge cfg.mk into maint.mk
Since we took full ownership of a cut down maint.mk there's no
need to keep local additions separately in cfg.mk
This fixes a bug which caused the contents of cfg.mk to be
skipped since the moving of files into the build-aux dir
and switch to meson.
build-aux: trim obsolete maint rules
Many rules in maint.mk are doing checks related to makefiles, or
autoconf, or gnulib, none of which are used by libosinfo. There
are also many misc rules related to publishing of releases that
are never used. Trimming this out makes the resulting file more
managable.
2020-05-13 Pino Toscano <ptoscano@redhat.com>
po: update LINGUAS
Add tr.
id is not added as it has errors; hope that the update of the catalog
will trigger an update in weblate, generating a correct po file.
Drop Zanata leftovers
libosinfo uses Weblate for translations.
po: regenerate libosinfo.pot
2020-05-04 Fabiano Fidêncio <fidencio@redhat.com>
README: MR is the preferred way to submit a patch
Unlikely of what our README mentioned, the preferred way to submit a
patch to libosinfo is opening a Merge Request against our GitLab
project.
2020-05-03 Andika Triwidada <andika@gmail.com>
Translated using Weblate (Indonesian)
Currently translated at 0.5% (1 of 167 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/id/
2020-05-01 Andrea Bolognani <abologna@redhat.com>
ci: Use 'check-dco' container for DCO checking
This container image, which has been created for this specific
purporse and is already used by many projects under the libvirt
umbrella, contains a nicer Python implementation of the
require-dco.sh script that's guaranteed to be kept up to date.
ci: Merge templates into native-build-job
At this point, the only difference between the existing templates
is that one of them includes the RPM build job, and since we now
have a way to skip that part for specific targets, we can get rid
of the duplication and merge them into a single template.
ci: Introduce multilib
This is a bit yucky, but it's only temporary: like the target ABI,
this information is tied to the container image and as such should
be baked into it. When that happens, we can simply drop this
altogether, but in the meantime this bit of scripting allow us to
have a single environment instead of two.
ci: Merge templates into mingw-build-job
The mingw32 and mingw64 templates are basically identical at this
point, so let's merge them into a generic one.
ci: Split off mingw-environment
Follow the environment/script split, like we do everywhere else.
We can have a single environment that works both for mingw32 and
mingw64 builds because the only difference between the two is
which ABI they target, and we can obtain that piece of information
from the $ABI environment variable that's baked into the container
images.
ci: Move more information to the job templates
In particular, we can avoid repeating the parts of the container
image name that are always the same.
ci: Introduce pipeline stages
There's only a single stage for now.
ci: Use standard template for CentOS 7 and openSUSE 15.1
The only difference between the open-coded job definition currently
in use for these target platforms and the standard template is that
the former don't include the RPM build job, but now that we have a
way to skip that part selectively we can remove these special cases.
ci: Make RPM job skippable
We're sort of cheating by exiting right away when asked to skip
the RPM job, but we know that it's always going to be the last job
in a script and we currently have no need to skip any other job,
so let's start with the simplest possible implementation and
consider something more complex if and when the need arises.
2020-04-30 Andrea Bolognani <abologna@redhat.com>
ci: Move builds from Ubuntu 16.04 to Ubuntu 20.04
ci: Move builds from Fedora 30 to Fedora 32
ci: Move MinGW builds from Fedora 30 to Fedora Rawhide
2020-04-30 Andika Triwidada <andika@gmail.com>
Added translation using Weblate (Indonesian)
2020-04-21 Gianluca Sforna <giallu@gmail.com>
Translated using Weblate (Italian)
Currently translated at 97.6% (164 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/it/
2020-04-20 Andrea Bolognani <abologna@redhat.com>
prepare-release: Move release archive out of DIST_ROOT
If the build has been successful, we can fish the release archive
out of DIST_ROOT and expose it in the top-level source directory,
just like autotools would do, for extra convenience.
prepare-release: Define DIST_ROOT
This is the subdirectory of BUILD_ROOT where the release archive
is generated by Meson: it's already used multiple times, and we're
about to introduce another one, so let's give it its own variable.
prepare-release: Define BUILD_ROOT
This fits nicely with INSTALL_ROOT and the recently-introduced
RPMBUILD_ROOT; additionally, since $BUILD_ROOT is an absolute path,
we can use it directly as _sourcedir when calling rpmbuild.
prepare-release: Use a local directory for rpmbuild
The current release process stores files inside the user's rpmbuild
directory, usually part of $HOME, which is just bad manners. Use a
local directory instead.
prepare-release: Use a local directory for installation
The current release process stores files inside the user's home
directory, which is just bad manners. Use a local directory instead.
Since we no longer have to care about the destination directory
looking like an actual root filesystem, we can make the paths used
when installing MinGW builds shorter.
prepare-release: Use DESTDIR when installing
DESTDIR and --prefix are similar but serve distinct purposes: in
particular, the latter is intended for modifications that will
persist after installation, eg. storing binaries under /usr/bin
instead of /usr/local/bin, while the former is just a temporary
change that can be easily reverted, eg. stashing files in an
intermediate, unprivileged directory while building a package.
Our needs during the release process are closer to what DESTDIR is
designed for, so let's use that.
2020-04-17 Andrea Bolognani <abologna@redhat.com>
prepare-release: Ensure rpmbuild is executable
Using 'test -x' is more appropriate than 'test -r' for programs.
prepare-release: Drop RESULTS
This is a leftover from when the script was used to perform
automated tests: in that context, singling out the output of the
test suite made sense, but now we're no longer particularly
interested in it.
As a bonus, this allows us to drop a non-trivial chunk of fairly
obscure POSIX shell compatibility code.
prepare-release: Remove unnecessary cleanup
We already remove all of build/ at the beginning of the build
process, so there's no need to manually remove any of its subdirs
here.
prepare-release: Remove empty lines
These are unnecessary and inconsistent with the style used in the
rest of the script.
prepare-release: Use correct spec file for MinGW RPMs
Currently we're just building the very same spec file twice.
gitignore: Minimize
Things like editor backup files belong in the user's own ignore
file rather than in the project's.
2020-04-16 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-04-15 Fabiano Fidêncio <fidencio@redhat.com>
Add "osinfo_macros.h" to the installed headers
As the macros defined there are used in the public headers, this header
must be installed, otherwise we'll face errors such as:
```
/home/valabot/gnome3/include/libosinfo-1.0/osinfo/osinfo_entity.h:26:11: fatal error: osinfo/osinfo_macros.h: No such file or directory
26 | # include "osinfo/osinfo_macros.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~
```
Reported-by: Rico Tzschichholz <ricotz@ubuntu.com>
2020-04-15 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-04-13 Rafael Fonseca <r4f4rfs@gmail.com>
osinfo_macros: mark inline functions as UNUSED
Fixes -Werror=unused-function with clang.
See: https://gitlab.gnome.org/GNOME/glib/-/commit/90f93a64f26666b955fdafb56acab54e596f4cc5
osinfo_macros: auto-cleanup func for module class
This will allow to manage the ownership of the class when reffing it
without having to cast it to GTypeClass.
See: https://gitlab.gnome.org/GNOME/glib/-/commit/ab25fa42cc6906df31352877154bb7b07f39552f
2020-04-13 Fabiano Fidêncio <fidencio@redhat.com>
productfilter: Check productfilter in _clear_product_constraint{,s}
Let's just add a safety check in the _clear_product_constraint() and
_clear_product_constraints() functions.
devicelinkfilter: Check devicelinkfilter in _get_target_filter()
Let's just add a safety check in the _get_target_filter() function.
filter: Check filter in _clear_constraint{,s}
Let's just add a safety check in the _clear_constraint() and
_clear_constraints() functions.
db: Remove useless osinfo_db_finalize() declaration
install_config_param: Use g_clear_object in _set_value_map()
entity: Check entity in osinfo_entity_clear_param()
Let's just add a safety check in _clear_param().
Group all GObjectClass override methods
Use g_object_class_install_properties()
Using _install_properties() helps to keep the code cleaner and also
reduces the chance of having wrong props used.
Use G_DEFINE_*_WITH_PRIVATE
Together with this change, let's also get rid of our own _GET_PRIVATE()
macros and use _get_instance_private() method instead.
Use OSINFO_DECLARE_TYPE* macros
macros: Add OSINFO_DECLARE_TYPE* macros
OSINFO_DECLARE_TYPE is nothing else than a define to
G_DECLARE_DERIVABLE_TYPE macro from GLib.
OSINFO_DECLARE_TYPE_WITH_PRIVATE does exactly the same thing as
OSINFO_DECLARE_TYPE plus adds a private structure to the declared type
structure.
OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS does exactly the same thing
as OSINFO_DECLARE_TYPE_WITH_PRIVATE plus declares the class structure of
the declared type.
Using those new macros will help us to reduce a lot the GLib boilerplate
in our codebase.
2020-04-13 Rafael Fonseca <r4f4rfs@gmail.com>
Do not error out when inlining fails
-Winline causes error in GCC10, e.g
error: inlining failed in call to ‘OSINFO_LIST’: call is unlikely and code size would grow [-Werror=inline]
That particular macro, which will be introduced in the next commit, is
bas based on GLib own macros and it just so happens that if they were
also compiled with -Winline, the same error would happen [1]. Instead,
let just suppress those warnings.
[1] https://gitlab.gnome.org/GNOME/glib/issues/2042
2020-04-13 Fabiano Fidêncio <fidencio@redhat.com>
Enforce '-Wdeclaration-after-statement'
Enforcing that variables are only declared in the beginning of a block
makes the code easier to read.
image: Add cloud-init property
cloud-init has been added on 81c43558687b40d but the property has never
been added.
datamap: Rename _init() argument name
"list" was a c&p from when OsinfoDatamap was introduced.
avatar_format: Remove unused OSINFO_AVATAR_FORMAT_GET_PRIVATE()
OsinfoAvatarFormat does not have a private member.
tests: Remove duplicated tests
There's no reason to keep testing union, filter, and intersection on
types which inherit from OsinfoList. Mainly considering test-list
already test those.
Update Copyright year
Remove Fabiano Fidêncio's Copyright statements
Does not make sense to keep my own Copyright statements in 3 files of
the project, which were added during 2012's Google Summer of Code.
Remove Authors
Authors are not often updated and do not reflect the current state of
the code.
media/tree: Force "wget" user-agent in SoupSession
Spoiler alert, it'll sound insane ... because it is insane. Some servers
treat libsoup user-agent differently than how they treat wget
user-agent.
With the default agent set, Soup would end up downloading the file
containing the redirection information, instead of actually redirecting
to one of the addresses present in that file. While when forcing "wget"
as user-agent, the redirection happens as expected.
This issue was faced at least with CentOS[0] and Manjaro[1] links.
After a talk with Patrick Griffis, he mentioned that:
"I imagine there isn't too much of a problem pretending to be wget. I would
guess the assumption by these services is 'A CLI tool is downloading us and
not a browser' rather than 'wget has unique behavior'.".
Knowing that, let's force "wget" as user-agent on our side.
[0]: http://isoredirect.centos.org/centos/8/isos/x86_64/CentOS-8.1.1911-x86_64-dvd1.iso
[1]: https://osdn.net/dl/manjaro/manjaro-gnome-19.0.2-200312-linux54.iso
2020-04-11 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-04-10 Rafael Fonseca <r4f4rfs@gmail.com>
Add API to track distro cloud-init usernames
We already have cloud-init='true' so add a cloud-image-username='foo' to
go with it.
The property has been added to `OsinfoOs` instead of `OsinfoImage`
because it's not expected to change in a per image basis. Instead we can
define it once and inherit it, in the same way that it's done for
kernel-url-argument.
Fixes #39
2020-04-09 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-03-31 Fabiano Fidêncio <fidencio@redhat.com>
tests: Add tests for only matching "rolling" as a fallback
The reason to have this in a different commit from the code is to ease
the backport of the previous patch by the distros which feel like doing
that.
db: Match "rolling" distros only as a fallback
Let's only match "rolling" distros as a fallback. The reason we need to
do so is to properly deal with distros as Manjaro, which has a mix of
versioned and rolling entries.
By matching the "rolling" only as a fallback, we ensure we'll have
exhausted all the "versioned" possibilites in the first place.
tests: Remove invalid release-status test
This should be tested on osinfo-db side and leaving this test here
causes failures in other non-related tests, all of them related to
identify_media, which gets the release-status and ends up hitting the
failures caused by this specific test.
media: Fix typo in the "eject-after-install" description
"installtion" should be "installation", as pointed out by Oğuz Ersen.
Together with the change, libosinfo.pot has been regenerated.
2020-03-30 Andrea Bolognani <abologna@redhat.com>
gitlab: Enable ccache usage
The $PATH definition has always included a reference to the symlink
farm that is used to enable transparent ccache usage, but since the
directory itself does not exist in the container image it never did
anything.
Since libvirt-jenkins-ci commit 2563aebb6c5c, container images do
actually contain the symlink directory, so it's finally possible to
enable ccache usage. This requires including the correct directory
in $PATH, as well as telling 1) ccache where to store its data and
2) GitLab that this data should be preserved across jobs.
The exact cache size (50 MB) is sort of arbitrary, but it should
be enough to store build artifacts for both osinfo-db-tools and
libosinfo for the foreseeable future.
gitlab: Create job templates
These avoid having to repeat the same build steps over and over.
gitlab: Use $MAKE
Just like $NINJA, this is defined as part of the container's
environment.
gitlab: Don't define $NINJA
Since libvirt-jenkins-ci commit 27cfddee8835, paths to build tools
such as ninja and make are exported in the container's environment
and can be used directly.
2020-03-27 Oğuz Ersen <oguzersen@protonmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/tr/
2020-03-26 Oğuz Ersen <oguzersen@protonmail.com>
osinfo: Fix typo in the "initrd-path" description
"inirtd" -> "initrd"
2020-03-25 Oğuz Ersen <oguzersen@protonmail.com>
Added translation using Weblate (Turkish)
2020-03-23 Fabiano Fidêncio <fidencio@redhat.com>
po: Import libosinfo.pot
Weblate requires the pot file to be commited, in order to be able to add
new translations to the project.
This file has to be updated every time a new string is added.
2020-03-06 Pino Toscano <ptoscano@redhat.com>
media: fix docs of OsinfoMediaDetectFlags
Move the "Since" after the description, so the description block
(including the version) is properly handled.
gitignore: remove almost all old content
Some of the content refers to autotools, which is not used anymore.
Also, meson enforces builddir!=srcdir, so the generated build files are
never directly among the sources.
Hence remove almost all the existing content, as it is not relevant.
Fix typo in Fabiano' surname
2020-02-28 Pino Toscano <ptoscano@redhat.com>
Fix OsinfoDB typo in docs
Add few missing "Since" in docs
Add the version information for some APIs, so it is easier to know when
they were introduced.
product: fix doc typo
Most probably one rogue s/OS/PRODUCT/ that changed CentOS to
CentPRODUCT.
firmware: fix doc of osinfo_firmware_get_firmware_type
device-driver: add doc for osinfo_device_driver_get_priority
2020-02-26 Fabiano Fidêncio <fidencio@redhat.com>
Add osinfo_firmware_is_supported()
This function has been missed when rebasing 904b65e7a1dda and. right
now, only its declaration in the header file is present.
Pointed out by Pino Toscano.
2020-02-25 Andrea Bolognani <abologna@redhat.com>
ci: Don't set $PKG_CONFIG_LIBDIR
The pkg-config binary used for MinGW builds is cross-compilation
aware, so it doesn't need us to point it in the right direction
when it comes to globally-installed .pc files.
2020-02-24 Andrea Bolognani <abologna@redhat.com>
ci: Perform MinGW builds in dedicated containers
Instead of using the same Fedora 30 container for both native and
MinGW builds, we are now building separate containers tailored for
each scenario. Re-introduce MinGW builds, and have them use the
new container images.
The corresponding libvirt-dockerfiles commit is ea6286acbbfd.
ci: Temporarily disable MinGW builds
We're going to use dedicated container images for them going
forward, but switching all at once would break CI so let's do it
in two steps: first disable the current builds, then enable the
new ones once the external requirements (container images) are
in place for a smoother transition.
2020-02-16 Julien Humbert <julroy67@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fr/
2020-01-29 Fabiano Fidêncio <fidencio@redhat.com>
loader: Avoid conflicting object ids for extension files
Currently, when building the id of some of our objects, we do:
- Loop over the several objects of that type;
- Concatenate the id of the parent object with the loop index;
By doing this, conflicts can be seen when using more than one extension
file, as osinfo-db does for Windows, where pre and post installable
drivers extension files are used and end up being loaded as we'd do:
- Loop over pre installable drivers;
- Concatenate the id of the parent object with the loop index;
- Loop over post installable drivers;
- Concatenate the id of the parent object with the loop index;
In order to avoid such issues, let's also use the filename as part of
the object id, avoiding then conflicts.
It's important to note that the conflict is cause by osinfo_list_add(),
which will replace the object in the list in case some other object with
the very same id is already stored there.
2020-01-25 Julien Humbert <julroy67@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.fedoraproject.org/projects/libosinfo/libosinfo/fr/
2020-01-24 Piotr Drąg <piotrdrag@gmail.com>
Translated using Weblate (Polish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.stg.fedoraproject.org/projects/libosinfo/libosinfo/pl/
2020-01-13 Fabiano Fidêncio <fidencio@redhat.com>
Silence -Wstring-plus-int
The warning is triggered because we're ignoring the "treeinfo-" part of
the OSINFO_TREE_PROP_TREEINFO_* string.
A possible way to fix that, instead of just disabling the warning, would
be doing something like:
```
const char *prop = OSINFO_TREE_PROP_TREEINFO_FAMILY;
prop += strlen("treeinfo-");
```
However, I sincerely do not think it's worth the verbosity of the
solution.
2020-01-13 Piotr Drąg <piotrdrag@gmail.com>
Translated using Weblate (Polish)
Currently translated at 100.0% (168 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.stg.fedoraproject.org/projects/libosinfo/libosinfo/pl/
2020-01-10 Fabiano Fidêncio <fidencio@redhat.com>
ci: Build osinfo-db in all containers
For some reason the job for building osinfo-db was not present in a few
distros' containers.
ci,centos8: Build project's RPM
ci: Add openSUSE 15.1 container
ci,centos8: Add DCO check
46db2e234a8ed82 introduced the DCO check. However, the check was not
added to the CentOS 8 container.
Partially revert "list: Update GObject boilerplate"
This partially reverts commit 706b6fd0d97ed572d92c4a33882605d561ebe3c8,
which introduced an ABI breakage by using G_DECLARE_DERIVABLE_TYPE when
declaring an OsinfoList.
2020-01-09 Antoni Bella Pérez <antonibella5@yahoo.com>
Translated using Weblate (Catalan)
Currently translated at 88.1% (148 of 168 strings)
Translation: libosinfo/libosinfo
Translate-URL: https://translate.stg.fedoraproject.org/projects/libosinfo/libosinfo/ca/
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-07 Fabiano Fidêncio <fidencio@redhat.com>
po: Remove empty files
https://gitlab.com/libosinfo/libosinfo/issues/40
2020-01-07 Daniel P. Berrangé <berrange@redhat.com>
po: refresh translations from zanata
2020-01-04 Fabiano Fidêncio <fidencio@redhat.com>
loader: Introduce OsinfoError enum
Let's create an OsinfoError enum instead of just using 0 as the error
type. This solves the following instrospection warning:
```
<unknown>:: Warning: Libosinfo: (ErrorQuarkFunction)error_quark: osinfo_error_quark: Couldn't find corresponding enumeration
```
product: Use product instead of prod as argument name
Header, source, and documentation were not matching with regarding to
the argument product name.
Let's standardise them and use product all over the place. By doing this
the following warnings will be fixed:
```
../osinfo/osinfo_product.c:318: Warning: Libosinfo: osinfo_product_get_codename: unknown parameter 'product' in documentation comment, should be 'prod'
../osinfo/osinfo_product.c:329: Warning: Libosinfo: osinfo_product_get_release_date_string: unknown parameter 'product' in documentation comment, should be 'prod'
../osinfo/osinfo_product.c:342: Warning: Libosinfo: osinfo_product_get_eol_date_string: unknown parameter 'product' in documentation comment, should be 'prod'
../osinfo/osinfo_product.c:369: Warning: Libosinfo: osinfo_product_get_release_date: unknown parameter 'product' in documentation comment, should be 'prod'
../osinfo/osinfo_product.c:388: Warning: Libosinfo: osinfo_product_get_eol_date: unknown parameter 'product' in documentation comment, should be 'prod'
```
install_config: Don't use different variable names in .c and .h
The tz variable, used in the source file, is declared in the header file
as timezone. Let's just use the same name used in the header as it's
more descriptive.
By doing so, the following GTK-Doc warning is fixed:
```
../osinfo/osinfo_install_config.c:231: Warning: Libosinfo: osinfo_install_config_set_l10n_timezone: unknown parameter 'tz' in documentation comment, should be 'timezone'
```
os: Move the "Since: " annotation
The "Since: " annotation should be *always* added to the end of the
comment block. More than that, multiplce "Since: " annotations cannot be
part of a same comment block and in order to solve that, let's avoid
adding a "Since: " in the end of the block, but explicitly mention when
each of the values were added.
By taking this approach, the following warnings can be avoided:
```
../osinfo/osinfo_os.h:90: Warning: Libosinfo: "@OSINFO_RELEASE_STATUS_RELEASED" parameter unexpected at this location:
* @OSINFO_RELEASE_STATUS_RELEASED: A released OS.
^
../osinfo/osinfo_os.h:96: Error: Libosinfo: multiple "Since:" tags for identifier "OsinfoReleaseStatus":
* Since: 1.4.0
^
../osinfo/osinfo_os.h:97: Warning: Libosinfo: "@OSINFO_RELEASE_STATUS_ROLLING" parameter unexpected at this location:
* @OSINFO_RELEASE_STATUS_ROLLING: A rolling version of an OS and thus with no
^
```
tree: Move the "Since: " annotation
Let's move the "Since: " annotation to the end of the comment block,
otherwise the following warning will be shown:
```
../osinfo/osinfo_tree.h:41: Warning: Libosinfo: "@OSINFO_TREE_ERROR_NO_TREEINFO" parameter unexpected at this location:
* @OSINFO_TREE_ERROR_NO_TREEINFO: No treeinfo found;
^
```
install_script: Move the "Since: " annotation
Let's move the "Since: " annotation to the end of the comment blocks,
otherwise the following warnings will be shown:
```
../osinfo/osinfo_install_script.h:100: Warning: Libosinfo: "@OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE" parameter unexpected at this location:
* @OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE: Script do not require device drivers
^
../osinfo/osinfo_install_script.h:123: Warning: Libosinfo: "@OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM" parameter unexpected at this location:
* @OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM: Support injection of the
^
../osinfo/osinfo_install_script.h:145: Warning: Libosinfo: "@OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA" parameter unexpected at this location:
* @OSINFO_INSTALL_SCRIPT_INSTALLATION_SOURCE_MEDIA: A media will be used as
^
```
install_config_param: Fix annotation for _get_value_map()
The function name was wrong, causing the following warning:
```
../osinfo/osinfo_install_config_param.h:94: Warning: Libosinfo: osinfo_install_config_param_get_value_map: return value: Missing (transfer) annotation
```
install_config_param: Don't use invalid "transfer" annotation
"transfer" annotation shouldn't be used with gboolean or enums, causing
the following warnings:
```
../osinfo/osinfo_install_config_param.c:252: Warning: Libosinfo: invalid "transfer" annotation for gboolean: only valid for array, struct, union, boxed, object and interface types
../osinfo/osinfo_install_config_param.c:267: Warning: Libosinfo: invalid "transfer" annotation for gboolean: only valid for array, struct, union, boxed, object and interface types
```
2020-01-03 Fabiano Fidêncio <fidencio@redhat.com>
install_config_param: Move the "Since: " annotation
Let's move the "Since: " annotation to the end of the comment block,
otherwise the following warning will be shown:
```
../osinfo/osinfo_install_config_param.h:50: Warning: Libosinfo: "@OSINFO_INSTALL_CONFIG_PARAM_POLICY_NONE" parameter unexpected at this location:
* @OSINFO_INSTALL_CONFIG_PARAM_POLICY_NONE: no policy defined
^
```
loader: Remove ueseless /** PUBLIC METHODS */ comment
The comment is not exactly helpful and causes the following GTK-Doc
error:
```
../osinfo/osinfo_loader.c:133: Error: Libosinfo: Skipping invalid GTK-Doc comment block:
/** PUBLIC METHODS */
^
```
db: Remove useless /** PUBLIC METHODS */ comment
The comment is not exactly helpful and causes the following GTK-Doc
error:
```
../osinfo/osinfo_db.c:183: Error: Libosinfo: Skipping invalid GTK-Doc comment block:
/** PUBLIC METHODS */
^
```
tree: Fix typo in osinfo_tree_new() annotation
trasfer -> transfer, otherwise the following warning will be shown:
```
../osinfo/osinfo_tree.c:472: Warning: Libosinfo: unknown annotation: trasfer
```
tree: Fix osinfo_tree_new() annotation
The extra line between the function name and its first parameter causes
the following warning:
```
../osinfo/osinfo_tree.c:467: Warning: Libosinfo: "@id" parameter unexpected at this location:
* @id: the id of the tree to be created
^
```
media: Don't use invalid "transfer" annotation
"transfer" annotation shouldn't be used with gint or gint64, otherwise
the following warnings will be shown:
```
../osinfo/osinfo_media.c:1635: Warning: Libosinfo: invalid "transfer" annotation for gint: only valid for array, struct, union, boxed, object and interface types
../osinfo/osinfo_media.c:1768: Warning: Libosinfo: invalid "transfer" annotation for gint64: only valid for array, struct, union, boxed, object and interface types
```
media: Don't use deprecated annotations
Both Type and Transfer are deprecated and should be replaced by (type
TYPE) (transfer MODE), otherwise the following warnings will be shown:
```
../osinfo/osinfo_media.c:657: Warning: Libosinfo: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
* Type: GLib.List(utf8)
^
../osinfo/osinfo_media.c:658: Warning: Libosinfo: GObject-Introspection specific GTK-Doc tag "Transfer" has been deprecated, please use annotations on the identifier instead:
* Transfer: container
^
```
os_variant: Fix osinfo_os_variant_new() annotation
The extra line between the function name and its first parameter causes
the following warning:
```
../osinfo/osinfo_os_variant.c:129: Warning: Libosinfo: "@id" parameter unexpected at this location:
* @id: the id of the os variant to be created
^
```
avatar_format: Don't use deprecated annotations
Both Type and Transfer are deprecated and should be replaced by (type
TYPE) (transfer MODE), otherwise the following warnings will be shown:
```
../osinfo/osinfo_avatar_format.c:102: Warning: Libosinfo: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
* Type: GLib.List(utf8)
^
../osinfo/osinfo_avatar_format.c:103: Warning: Libosinfo: GObject-Introspection specific GTK-Doc tag "Transfer" has been deprecated, please use annotations on the identifier instead:
* Transfer: container
^
```
2019-12-18 Fabiano Fidêncio <fidencio@redhat.com>
ci: Add a job to enforce DCO Signed-off-by
This work is a copy-and-paste from what's been done by Daniel P. Berrangé
on https://gitlab.com/bichon-project/bichon
Add CONTRIBUTING.md
Let's follow osinfo-db example and have a contributing guide, targetting
both contributors and commiters.
2019-12-12 Fabiano Fidêncio <fidencio@redhat.com>
ci: Add CentOS 8 container
2019-12-11 Andrea Bolognani <abologna@redhat.com>
ci: Update name for Ubuntu images
The corresponding libvirt-jenkins-ci commit is f289e64a5fd9.
2019-12-09 Roman Bogorodskiy <bogorodskiy@gmail.com>
meson: respect mandir option
Construct man installation dir from libosinfo_mandir instead of
libosinfo_datadir.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-12-04 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.8.0
Update NEWS for 1.7.1 release
build: Switch the project's version to 1.7.1
It's done as an 1.7.1 release is needed in order to fix the breakage
caused by not using versioned symbols in 1.7.0 release.
build: Only define {PCI,USB}_IDS in {pci,usb}-ids-path are defined
Setting those regardless of {pci,usb}-ids-path being explicitly set or
automatically detected is a regression compared to what we were doing
when using autotools.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
build: Set {pci,usb}.ids paths
In case pci.ids or usb.ids files are shipped by libosinfo, pci_ids_path
and usb_ids_path must be set accordingly.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-03 Fabiano Fidêncio <fidencio@redhat.com>
build: Use versioned symbols
During 25c45ffd9a1b8f18f56974d5b9b6b2c1da8cbd0c, supported for versioned
symbols were (wrongly) introduced but never used.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-02 Fabiano Fidêncio <fidencio@redhat.com>
mingw,spec: Use %autosetup
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
mingw,spec: Drop gettext BuildRequires
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
mingw.spec: Add hwdata as BuildRequires
Seems that when using `fedpkg scratch-build` we cannot rely on having
network access, making the download of the usb and pci ids files to
fail, causing then a build error as the files won't be found to be
shipped.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
mingw.spec: Add gcc as BuildRequires
meson requires both compiler and cross-compiler in order to perform a
cross build.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
mingw,spec: Add intltool as BuildRequires
Otherwise the translations are not generated.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
build: Install {usb,pci}.ids if not shipped
In case usb.ids and pci.ids are not shipped, let's also install them as
part of libosinfo installation.
install_data() will automatically install the files to the
standards-conforming location.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-29 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.8.0
build: Disable -Wcast-warn
It causes issues when generating Libosinfo-scan.c on armv7hl.
```
Libosinfo-scan.c: In function ‘describe_type’:
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:216:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
216 | #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:871:30: note: in expansion of macro ‘G_PARAM_SPEC_INT64’
871 | GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec);
| ^~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:239:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
239 | #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:887:31: note: in expansion of macro ‘G_PARAM_SPEC_UINT64’
887 | GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec);
| ^~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:354:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
354 | #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:921:31: note: in expansion of macro ‘G_PARAM_SPEC_DOUBLE’
921 | GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec);
| ^~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c: In function ‘describe_default’:
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:216:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
216 | #define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:1004:30: note: in expansion of macro ‘G_PARAM_SPEC_INT64’
1004 | GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec);
| ^~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:239:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
239 | #define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:1010:33: note: in expansion of macro ‘G_PARAM_SPEC_UINT64’
1010 | GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec);
| ^~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2299:6: error: cast increases required alignment of target type [-Werror=cast-align]
2299 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
| ^
/usr/include/glib-2.0/gobject/gtype.h:484:66: note: in expansion of macro ‘_G_TYPE_CIC’
484 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gparamspecs.h:354:45: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
354 | #define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Libosinfo-scan.c:1070:31: note: in expansion of macro ‘G_PARAM_SPEC_DOUBLE’
1070 | GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec);
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
Update NEWS for 1.7.0 release
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Refresh translations from zanata
2019-11-26 Fabiano Fidêncio <fidencio@redhat.com>
os: Add "get_device_drivers_prioritized"
get_device_drivers_prioritized() returns the list of highest priority
device drivers for a given OS.
In case management apps would like to add a fallback mechanism, the
recommendation is to use get_device_drivers(), which returns all the
drivers.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
device-driver: Add "priority" attribute
Let's read the "priority" attribute from the "driver" element. If not
set, the priority will be set to OSINFO_DEVICE_DRIVER_DEFAULT_PRIORITY
(50) by default.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 Andrea Bolognani <abologna@redhat.com>
ci: Remove Fedora 29
The OS is no longer supported by the libvirt-jenkins-ci project
and the existing container images will be deleted shortly.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci: Add Fedora 31
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 Fabiano Fidêncio <fidencio@redhat.com>
db: Take the media's volume size into account when sorting the medias
If volume-size is not taken into account, when dealing with identical
ISOs, we may end up wrongly matching an entry that has its volume-size
with one which doesn't have the value, simply because the one which does
not have the value may be declared first the in XML entry.
Reviewed-by; Daniel P. Berrangé <berrange@redhat.com>
2019-11-06 Diego Escalante Urrelo <diegoe@gnome.org>
list: Improve API safety
Add checks across the API to validate objects before trying to operate
on them.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Remove unnecessary casts
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Fix gtk-doc string
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Add osinfo_list_set_element_type
Add the corresponding setter for osinfo_list_get_element_type() and use
it internally to ensure safety.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Use osinfo_list_get_instance_private
Instead of repeateadly accessing the priv structure, use the GObject
defined helper to ensure safety.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Update GObject boilerplate
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
list: Use API to avoid unsafe access
Use osinfo_list_get_element_type() instead of referencing members
directly. This ensures that we are not trying to reference invalid
members in invalid structs.
Also make said function safer by using
osinfo_list_get_instance_private() that checks the sanity of the
OsinfoList object for us.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-10-14 Fabiano Fidêncio <fidencio@redhat.com>
ci: Add Ubuntu 18 container
ci: Add Ubuntu 16 container
ci: Add Debian 9 container
ci: Add CentOS 7 container
We cannot run osinfo-db-tools-rpm job in the CentOS 7 container as it
doesn't have the needed meson macros.
ci: Keep the containers alphabetically sorted
ci: Deal with multilib path
When building a project using Meson, the project will be installed
respecting the multi-library path.
In order to get the right path we should do:
- Debian based machines:
- Use the value of `dpkg-architecture -q DEB_TARGET_MULTIARCH`
- RPM based machines:
- Use the value of `rpm --eval '%{_lib}'`
ci: Set NINJA environment variable
We'll start testing on CentOS 7, which doesn't have the "ninja" binary.
Knowing this, we better have a NINJA environment variable setting
accodingly.
meson: Disable -Wunsafe-loop-optimizations warnings
This commit is basically bringing b2574d33aa back:
'''
Disable -Wunsafe-loop-optimizations warnings
This warning option is not reporting broken code. Rather it is merely
identifying loops which GCC would not be able to optimize fully when
using -funsafe-loop-optimizations. In GCC 7 this triggers on the
loader code
osinfo_loader.c: In function 'osinfo_loader_process_list':
osinfo_loader.c:2127:11: error: missed loop optimization, the loop counter may overflow [-Werror=unsafe-loop-optimizations]
while (tmp && *tmp) {
^
The warning just needs to be turned off since the code is not broken,
and we don't care about the optimization level
'''
2019-10-08 Pino Toscano <ptoscano@redhat.com>
tools: Minor POD fixes
- use B<> for some parameters
- use C<> instead of a manually quoted identifier
- make the install-script config file a verbatim block, so it is kept
as-is, and not wrapped as normal text block
- use L<> for linking to other man pages
- switch example from Fedora 16 to Fedora 30
- other minor changes
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-09-25 Fabiano Fidêncio <fidencio@redhat.com>
syms: Add osinfo_firmware_new
osinfo_firmware_new() has been introduced as part of commit 904b65e7a1.
However, it was not added to the libosinfo.syms file.
ci: Introduce CI
Let's introduce a basic CI, which basically runs an out-of-tree build
with `make check`, running against the following systems:
- Fedora 29, Fedora 30, Fedora Rawhide;
- Debian 10, Debian Sid;
meson: Disable gtk-doc for cross-builds
Let's disable gtk-doc build when performing a cross-build as
`./Libosinfo-scan` will be generated for the cross architecture and
cannot be run from the host machine architecture.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
meson: Fix build on BSDs
Unless explicitly passing "-Wno-typedef-redefinition" and
"-Wno-missing-field-initializers", builds would fail not only on macOS,
but also on BSDs.Knowing that, let's just use disable those warnings
when not building on Linux.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
meson: Add syntax-check as part of our test-suite
Let's take advantage of that we can run `make syntax-check` without the
need of having a Makefile around and add it as part of our test suite.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Move files needed for `make syntax-check` to build-aux
Together with the changes, let's adapt GNUmakefile and maint.mk in order
to be able to run those files from build-aux.
GNUmakefile:
- changing both srcdir & top_srcdir, and adjusting the includes of
cfg.mk and maint.mk were enough to be able to run `make syntax-check`
from build-aux directory;
maint.mk:
- "ME" variable had to be changed to point to the right place;
- Some paths expecting cfg.mk in the top_srcdir had to be changed;
- tight-scope.mk target dependency has been changed from $(ME) to
maint.mk;
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Support `make syntax-check` without Makefile
A few dirty hacks have been done in GNUmakefile, cfg.mk, and maint.mk
in order to support running `make syntax-check` without having to have a
Makefile around.
GNUmakefile: set srcdir & top_srcdir and remove the parts that would
cause an error due to no presence of a Makefile.
cfg.mk: add sc_prohibit_always-defined_macros to the list of local
checks to skip as it looks for Makefile, which is generated after
running ./configure.
maint.mk: allow running `make syntax-check` without having a Makefile
generated.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Drop autotools support
Let's try to drop autotools support as meson is in place. There are a
few files that were not dropped though, as:
- cfg.mk
- maint.mk
- GNUmakefile
- build-aux/bracket-spacing.pl
- build-aux/gitlog-to-changelog
- build-aux/useless-if-before-free
- build-aux/vc-list-files
From the list above, build-aux/gitlog-to-changelog is currently used by
meson as part of the `dist`.
All the other files, with a few changes, will be useful for meson as,
with a few changes, we will be able have `ninja syntax-check` working.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
prepare-release: Adapt to use meson
Let's adapt the prepare-release script to use meson build system instead
of autotools.
This change has been tested and is working fine on Fedora 30+.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
spec: Adapt to use meson
The changes needed in the spec files are not so intrusive.
One thing that has to be mentioned is the requirement for
mingw-filesystem >= 107 (which is only present on Fedora 30+) in order
to generate the mingw rpms for osinfo-db-tools. This huge bump in the
version happened because the `%mingw_ninja_install` was only recently
introduced to mingw-filesystem package.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
spec: Remove BuildRoot definition
None of the currently supported distributions need that. Last one which
did was EL5 (which, thankfully, is EOL now).
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
spec: Switch to %ldconfig_scriptlets
This change has been part of Fedora spec file for a quite long time, but
it was never replicated upstream.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Add support to meson build system
Meson build system is a "simpler and easier" to understand build system
that that can provide (with some work-arounds here and there) the same
functionalities currently available with our current build system
(autotools).
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
loader: Fix "switch-default" warning
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
readme: Add "Testing" section
Let's add a short section explaning how to build & run the libosinfo
tests.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Don't include config.h
config.h file is only used in osinfo-db-tools for the GETTEXT_PACKAGE
macro. Fortunately, when AC_CONFIG_HEADER macro is dropped from
configure, -DGETTEXT_PACKAGE=... is automatically passed as a compilar
argument, allowing us then to drop the file.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
maint.mk: Update to the latest gnulib
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Update exclude_file_name_regexp--sc_trailing_blank
tests/isodata/* have been removed a long time ago.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Update exclude_file_name_regexp--sc_bindtextdomain
Let's *not* run the check only for tests files.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Remove exclude_file_name_regexp--sc_space_tab
tests/isodata has been removed a long time ago.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Remove exclude_file_name_regexp--sc_prohibit_atoi_atof
Let's run sc_prohibit_atoi_atof in all files.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Remove exclude_file_name_regexp--sc_require_config_h*
Those were added as a copy & paste mistake from libvirt-glib.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
cfg.mk: Remove exclude_file_name_regexp--sc_preprocessor_indentation
Let's run the check in all files.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Indent includes/defines
By doing this, we can stop excluding files from
sc_preprocessor_indentation check.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
test-install-script: Use g_unlink() instead of unlink()
Not like unlink(), g_unlink() is a portable function and using it would
allow us to build this test using mingw.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-17 Fabiano Fidêncio <fidencio@redhat.com>
test-firmware: Add tests
Reviewed-by: Cole Robinson <crobinso@redhat.com>
loader: Load Firmwares to OSes
Let's read the <firmware> attribute from the XMLs and store this into
our OS representation.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add support to Firmware
Let's add APIs for both adding a firmware to or retrieving the list of
firmwares from an OS.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Add test-firmwarelist
Reviewed-by: Cole Robinson <crobinso@redhat.com>
firmwarelist: Add OsinfoFirmwareList
OsinfoFirmwareList has been created in order to represent a list of
firmwares supported by an OS, as an OS may support various firmwares
without any issue.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Add test-firmware
Reviewed-by: Cole Robinson <crobinso@redhat.com>
firmware: Add OsinfoFirmware
OsinfoFirmware has been created in order to represent the firmware types
supported by an OS.
The schema representation of this object is:
<firmware arch="arch name" type="bios|efi"/>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-09-12 Fabiano Fidêncio <fidencio@redhat.com>
build: Use a minimum gettext requirement rather than an exact one
In configure.ac, specify the minimum gettext version we require, rather
than the exact one. This fixes a situation where the autoconf macros
used for gettext will be the latest available on the system (for
example, 0.20); but the copied-in Makefile.in.in will be for the exact
version specified in configure.ac (in this case, 0.19).
In that situation, the gettext build rules will error out at `make` time
with the message:
*** error: gettext infrastructure mismatch: using a Makefile.in.in
from gettext version 0.19 but the autoconf macros are from gettext
version 0.20
Avoid that by specifying a minimum version dependency rather than an
exact one. This should not cause problems as we haven’t committed any
generated or external gettext files into git, so each developer will end
up regenerating the build system for their system’s version of gettext,
as expected.
See the subsection of
https://www.gnu.org/software/gettext/manual/html_node/Version-Control-Issues.html
for more information.
This patch is basically the same as
https://gitlab.gnome.org/GNOME/geocode-glib/commit/6ba0e38fd1987be0de8432afd93b9a5c1f487b63
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-02 Fabiano Fidêncio <fidencio@redhat.com>
media: Check whether an InputStream is seekable
SoupInputStream is not seekable, causing errors as:
```
fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect https://cdimage.debian.org/cdimage/archive/8.10.0/powerpc/iso-dvd/debian-8.10.0-powerpc-DVD-1.iso
(lt-osinfo-detect:27922): GLib-GObject-WARNING **: 18:52:29.494: invalid cast from 'SoupClientInputStream' to 'GSeekable'
(lt-osinfo-detect:27922): GLib-GIO-CRITICAL **: 18:52:29.494: g_seekable_seek: assertion 'G_IS_SEEKABLE (seekable)' failed
(lt-osinfo-detect:27922): GLib-GIO-CRITICAL **: 18:52:29.494: g_task_return_error: assertion 'error != NULL' failed
```
In order to avoid those, let's check whether the InputStream is seekable
or not.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-08-20 Fabiano Fidêncio <fidencio@redhat.com>
tools,detect: Don't leak OS when detecting trees
From g_object_get() documentation:
In general, a copy is made of the property contents and the caller is
responsible for freeing the memory in the appropriate manner for the
type, for instance by calling g_free() or g_object_unref().
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tools,detect: Remove 'env' output type
--format env was intended for udev scripts which was dropped in
commit 16cf1f797728dff9e361033937faea9f38ffbe49
Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Date: Fri Feb 15 19:00:37 2013 +0200
Ditch udev rule
Let's remove this piece and avoid having two formats with discrepant
information being displayed.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tools,detect: Print the arch of the detected tree/media
This information is useful in order to check whether we're not only
matching the right OS, but also the right architecture.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-08-16 Fabiano Fidêncio <fidencio@redhat.com>
install-script: Don't expand entities when parsing XML
The XML_PARSE_NOENT flag to libxml will cause it to expand all entities
in the input XML document when parsing. Doing this is bad practice if the
XML input file comes from an untrusted source, because it can cause the
XML parser to load arbitrary files that are readable by the user running
XML parsing.
This is basically the same fix as 47233d0b9dc (from osinfo-db-tools)
Reviewed-by: Felipe Borges feborges@redhat.com
loader: Don't expand entities when parsing XML
The XML_PARSE_NOENT flag to libxml will cause it to expand all entities
in the input XML document when parsing. Doing this is bad practice if the
XML input file comes from an untrusted source, because it can cause the
XML parser to load arbitrary files that are readable by the user running
XML parsing.
This is basically the same fix as 47233d0b9dc (from osinfo-db-tools)
Reviewed-by: Felipe Borges feborges@redhat.com
2019-08-07 Fabiano Fidêncio <fidencio@redhat.com>
tree: Deal with file:// trees
Let's add back the code we dropped as part of e0e06c7bc but, this time,
to be executed condionatilly only when dealing with "file://", which
does not require GVFS to be installed at all.
https://gitlab.com/libosinfo/libosinfo/issues/35
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Rename on_location_read() to on_soup_location_read()
In order to add back the support to create a tree from a location that's
a "file://...", let's, as the first step, rename on_location_read() to
os_soup_location_read() as it'll make things cleaner later on.
https://gitlab.com/libosinfo/libosinfo/issues/35
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Add _create_from_treeinfo() API
osinfo_tree_create_from_treeinfo() API has been added so apps can stick
to whatever is their preference on downloading the treeinfo file, mainly
now that ftp:// is not supported by _create_from_location(), and just
pass the treeinfo file content to libosinfo in order to create an
OsinfoTree.
https://gitlab.com/libosinfo/libosinfo/issues/34
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-08-06 Fabiano Fidêncio <fidencio@redhat.com>
examples: Remove non functional examples
libosinfo examples are not working for some time. Let's remove them and,
later on, we can come up with a new set of functional ones.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-08-01 Fabiano Fidêncio <fidencio@redhat.com>
configure: Relax gettext requirement
Since commit 3a2dd3050, we've added gettext 0.19.8 as a dependency for
libosinfo. However, it broke libosinfo build on Ubuntu 16.04 as the
gettext provided by them is 0.19.7.
Taking a look at the "noteworthy"* changes, seems that for our usecase we
can just depend 0.19.7 and keep building on Ubuntu 16.04
*: https://lists.gnu.org/archive/html/info-gnu/2016-06/msg00003.html
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-07-26 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.7.0
Update NEWS for 1.6.0 release
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Refresh translations from zanata
spec,mingw: Add mingw*-libsoup as dependency
Commit ac692eaa4680 introduced libsoup dependency but forgot to add it
to the mingw spec files.
2019-07-18 Fabiano Fidêncio <fidencio@redhat.com>
tools,detect: Check for NULL variants
Both trees & medias may return NULL in case no os-variant was found.
Let's check for this and avoid a segmentation fault on calling
osinfo_list_get_length() with a NULL argument.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Add "os" property
Similarly to what we have for media, let's add the "os" property to the
trees.
osinfo-detect code is already relying on having an "os" property and,
since commit 722e7d1d4, it errors out due to the missing property:
(osinfo-detect:7808): GLib-GObject-WARNING **: 09:27:58.656: g_object_get_is_valid_property: object class 'OsinfoTree' has no property named 'os
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-07-17 Fabiano Fidêncio <fidencio@redhat.com>
tree: cleanup on any error & return on _create_from_location_async_helper()
When calling a g_task_return_error(), we should also cleanup the
CreateFromLocationAsyncData and return immediately after that.
By doing so we avoid errors as:
g_task_return_error: assertion 'task->ever_returned' failed.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tree: goto cleanup on any error, on on_content_read()
Instead of just free'ing the CreateFromLocationAsyncData, let's just go
to cleanup, which will call create_from_location_async_data_free() and
return after that.
By doing so we avoid errors as:
g_task_return_error: assertion 'task->ever_returned' failed.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tree: Use g_clear_object in create_from_location_async_data_free()
We should check whether the objects are NULL or not before calling
g_object_unref(). Instead of doing so, let's use g_clear_object(), which
doesn't require the check.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
spec: Drop gvfs dependency
As we rely on libsoup to handle http://, https://, and ftp:// requests
there's no need to depend on gvfs anymore.
https://gitlab.com/libosinfo/libosinfo/issues/30
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Use libsoup for http:// & https:// requests
As osinfo_tree_create_from_location() handles non-local requests, it'd
end up relying on GVFS under the hood, which would cause this API to not
work when called from an app running as root.
In order to avoid this situation, let's rely on libsoup for this cases.
It's important to mention that glib minimum version has been bumped to
2.44 as that's the version where g_input_stream_read_all_async() has
been introuced.
https://gitlab.com/libosinfo/libosinfo/issues/30
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Use libsoup for http:// & https:// requests
As osinfo_media_create_from_location_with_flags_async() can handle
non-local cases, they'd end up relying on GVFS under the hood, which
would cause those APIs to not work when called from an app running as
root.
In order to avoid this situation, let's rely on libsoup for these cases.
https://gitlab.com/libosinfo/libosinfo/issues/30
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Use GInpuStream directly in on_location_read()
Let's do this in order to always deal with a GInputStream directly and
avoid dealing with a GFileInputStream or something else when we start
using libsoup to deal with non-local files.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Improve on_location_read error message readability
Let's add a ": " by the end of the error message, so the prefix doesn't
get concatenated with error message, increasing its readability.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Remove not used Tree from _CreateFromLocationAsyncData struct
As the OsinfoTree is not used anywhere in our code, let's just remove
it.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Fix indentation in create_from_location_async_data_free()
Reviewed-by: Cole Robinson <crobinso@redhat.com>
install-script: Add _generate_*_for_tree()
Similarly to what we already have for media, let's add APIs for
generating both the install-script and the install-script command line
for trees.
These new APIs take a tree as parameter and, by that, can access tree
specific elements as such its URLs.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-07-16 Fabiano Fidêncio <fidencio@redhat.com>
Add "Since: 1.6.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 1.5.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 1.4.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 1.3.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.13" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.12" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.11" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.10" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.9" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.8" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.7" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.6" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.3" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.2" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.1" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.2.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.1.0" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.0.6" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.0.5" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add "Since: 0.0.3" to the documentation
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-07-10 Fabiano Fidêncio <fidencio@redhat.com>
tools,install-script: Deprecate --config {user,admin}-password
Let's deprecate user-password and admin-password options of --config and
also warn out whenever they're passed to osinfo-install-script.
CVE-2019-13313
Libosinfo: osinfo-install-script option leaks password via command line
argument. 'osinfo-install-script' is used to generate a script for
automated guest installations. It accepts user and admin passwords via
command line arguments, thus leaking them via process listing.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tools,install-script: Add --config-file (-f) option
Let's add a new option so users can set their config from a file,
instead of directly passing the values via command-line.
CVE-2019-13313
Libosinfo: osinfo-install-script option leaks password via command line
argument. 'osinfo-install-script' is used to generate a script for
automated guest installations. It accepts user and admin passwords via
command line arguments, thus leaking them via process listing.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-02 Fabiano Fidêncio <fidencio@redhat.com>
db: deprecate osinfo_db_guess_os_from_tree()
Let's deprecate osinfo_db_guess_os_from_tree() and "force" the apps to
use the new/simpler API.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
tools,detect: Use osinfo_db_identify_tree()
Let's switch osinfo-detect to use the new API as the old one will end up
being deprecated soon.
Also,, the code path for medias and trees is now way more similar with
the changes.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
db: Add identify_tree() API
Similarly to identify_media() API, let's add a osinfo_db_identify_tree()
API, which is going to simplify a bit tree detection code on the apps
level.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
tree: Fix treeinfo APIs' documentation
The documention was copied & pasted from media APIs. Let's fix them ir
order to actually match trees/treeinfo.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
tree: Add treeinfo-* properties
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
tree: Don't set "has-treeinfo" property's default to TRUE
Doesn't make sense to set "has-treeinfo" property to TRUE by default
knowing that debian and ubuntu trees do not support treeinfo.
This was mistakenly added as part of commit eb53f8d6.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
tree: Remove useless properties
A bunch of media properties were mistakenly added as tree properties as
part of commit 0202b4db. Although this is clearly a copy & paste error,
it has never been noticed so far.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
2019-06-25 Fabiano Fidêncio <fidencio@redhat.com>
media: Add _is_bootable() API
Let's add an API in order to let the applications known whether a media
created is bootable or not (according to libosinfo detection).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Only error out if a media is not bootable when REQUIRE_BOOTABLE flag is passed
It'll give more flexibility for the apps to, at least, detect a media,
even if the media is not bootable.
https://gitlab.com/libosinfo/libosinfo/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Rewrite create_from_location* functions
Let's rewrite those functions, using the
create_from_location_with_flags* functions behind.
https://gitlab.com/libosinfo/libosinfo/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Add create_from_location_with_flags* APIs
The newly added APIs are introduced in order to extend the current
create_from_location* APIs in a way that a flag can be passed in order
to decided whether a media should be created even if the media is not
recognised as bootable by libosinfo.
https://gitlab.com/libosinfo/libosinfo/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Add OsinfoMediaDetectFlags
Let's add a new type in order to specify flags to osinfo_media_detect.
This type, at least for now, contains only one specific flag that will
be used to specify whether the detection of the media should or should
not fail in case the media is not bootable.
https://gitlab.com/libosinfo/libosinfo/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Ignore case when detecting bootable ppc ISO
When detecting a PPC bootable iso, we should search by the
"/ppc/bootinfo.txt" file inside the iso. However, there's no guarantee
that the name of the file will be always lowercased as it depends on the
extensions used to generate the ISO.
The problematic ISO can be found at:
http://cdimage.debian.org/cdimage/release/9.9.0/ppc64el/iso-cd/debian-9.9.0-ppc64el-netinst.iso
And one curious thing to mention is that there's no TRANS.TBL file (the
one used to translate, for instance, PPC -> ppc) present in the ISO.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-05-22 Fabiano Fidêncio <fidencio@redhat.com>
tree: Cleanup _create_from_location_async_helper()
There's no need to pass neither the URL nor the cancellable to this
function as those can be taken directly from data.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Avoid use of memory after it's freed
We've been passing data->location as the @url argument of
osinfo_tree_create_from_location_async_helper(), freeing it and trying
to g_strdup() it as the new content of data->location.
In order to avoid doing so, let's set the data->location only once, in
the first caller of osinfo_tree_create_from_location_async_helper(), as
its content is always going to be the same doesn't matter the treeinfo
format to be used with.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Avoid dereference of null pointer
As any consumer of libosinfo API may pass NULL as the @matched argument
of compare_tree(), the current code could be dereferencing a NULL
pointer when calling `osinfo_tree_set_os()`.
In order to avoid doing so, let's set the os to the OsinfoTree at the
moment the @matched argument is set.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-05-10 Fabiano Fidêncio <fidencio@redhat.com>
os: Add kernel-url-argument API
Tree based installations will require a kernel-url-argument to be
assed. Let's provide an API to the apps to get this info from OsinfoOS.
https://gitlab.com/libosinfo/osinfo-db/issues/28
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-05-09 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.6.0
Update NEWS for 1.5.0 release
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Refresh translations from zanata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
docs: Add missing docs links from main docs page
Reviewed-by: Cole Robinson <crobinso@redhat.com>
install_script: Use the same parameter's name in .c and .h
Reviewed-by: Cole Robinson <crobinso@redhat.com>
install_script: Document OsinfoInstallScriptInstallationSource
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Use the same parameter's name for .c and .h
Reviewed-by: Cole Robinson <crobinso@redhat.com>
media: Document OSINFO_MEDIA_ERROR_NO_DIRECTORY_RECORD_EXTENT
Reviewed-by: Cole Robinson <crobinso@redhat.com>
install_config: Fix _get_installation_url docs
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Revert "osinfo-detect: print os variants info for env format"
This reverts commit 44cab89243220223b0ac6312237c08a514055664, as the
commit was mistakenly pushed.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-05-02 Fabiano Fidêncio <fidencio@redhat.com>
tests: Add tests for multiple short-ids
I've decided to for testing the multiple short-ids at the os level, as
it reflects better the usage of the newly added APIs.
https://gitlab.com/libosinfo/libosinfo/issues/19
Reviewed-by: Cole Robinson <crobinso@redhat.com>
product: Add osinfo_product_get_short_id_list() API
As multiple short-ids is fully supported, let's add a new API for
getting the whole list instead.
https://gitlab.com/libosinfo/libosinfo/issues/19
Reviewed-by: Cole Robinson <crobinso@redhat.com>
loader: Fully support multiple short-id values
osinfo-db schema allows for multiple short-id, and there's already some
entries that rely on that. For example, debian and ubuntu have something
like:
```
<short-id>debian9</short-id>
<short-id>debianstretch</short-id>
```
or
```
<short-id>ubuntu19.04</short-id>
<short-id>ubuntudisco</short-id>
```
However, OsinfoLoader has always been treating "short-id" as a single
property entry and, as a consequence of this, apps would always have to
use the first listed id as shown below:
```
fidencio@dahmer ~/src/upstream/libosinfo $ osinfo-install-script debian9
preseed.cfg
fidencio@dahmer ~/src/upstream/libosinfo $ osinfo-install-script debianstretch
Error finding OS: debianstretch
fidencio@dahmer ~/src/upstream/libosinfo $ osinfo-install-script ubuntu19.04
preseed.cfg
fidencio@dahmer ~/src/upstream/libosinfo $ osinfo-install-script ubuntudisco
Error finding OS: ubuntudisco
```
As OsinfoEntity already has support for multiple property entries, let's
take advantage of this and properly treat OSINFO_PRODUCT_PROP_SHORT_ID as
so.
This doesn't break any compatibility with the existent code as
osinfo_entity_get_param_value() will *always* return the first added
entry, as it was done before.
OsinfoFilter also already has support for multiple property entries and
the filter works as expected.
Here's the result of the very same example used above with this fix:
```
fidencio@dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script debian9
preseed.cfg
fidencio@dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script debianstretch
preseed.cfg
fidencio@dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script ubuntu19.04
preseed.cfg
fidencio@dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script ubuntudisco
preseed.cfg
````
https://gitlab.com/libosinfo/libosinfo/issues/19
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-23 Fabiano Fidêncio <fidencio@redhat.com>
osinfo-detect: Improve --help wording
The "URL type" text leads to the misunderstanding that `osinfo-detect`
only works for URLs and not for local medias as well.
Let's change the wording in order to make it clearer.
https://gitlab.com/libosinfo/libosinfo/issues/26
Reviewed-by: Cole Robinson <crobinso@redhat.com>
spec: Require GVFS
GVFS is required as g_file_new_from_path() and g_file_new_from_uri()
rely on GVFS.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-12 Fabiano Fidêncio <fidencio@redhat.com>
osinfo-detect: print os variants info for env format
Similarly to what's been done for the plain format, let's also print
os variants' information when using --format=env.
osinfo-detect: Be aware of tree's os variants
In the same way done for medias, make the tree detection aware of
os-variants.
https://gitlab.com/libosinfo/libosinfo/issues/25
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media,image,tree: Avoid critical errors when getting the os variants
When getting the os variant of media, image, or tree, let's ensure their
OS is not NULL* before calling osinfo_os_get_variant_list(). In case
it's NULL, let's just return NULL.
*: having a media, image, or tree with no OS set is a common case when
the user has been creating it manually.
https://gitlab.com/libosinfo/libosinfo/issues/25
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
db: Set the os to the detected tree
When detecting a tree, let's also set its OS.
https://gitlab.com/libosinfo/libosinfo/issues/25
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
test-image: Expand the tests to consider variants
Reviewed-by: Cole Robinson <crobinso@redhat.com>
image: Add get_os_variants() API
osinfo-db schema allows that, but libosinfo never really had an API to
support it.
In order to add get_os_variants(), (get,set)_os APIs were also added.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-10 Fabiano Fidêncio <fidencio@redhat.com>
test-image: Add test for loading an entry
loader: Properly load the arch value for images
osinfo_loader_image() has been considering the XML tag for the
images' architecture was "architecture", while it actually is "arch".
By trying to read the wrong tag, no arch was loaded, causing then any
image load to fail with:
CRITICAL **: 13:30:06.539: osinfo_entity_set_param: assertion 'value != NULL' failed
2019-04-03 Fabiano Fidêncio <fidencio@redhat.com>
media: Fix usage of application id
Christophe Fergeau pointed this issue out during the review of 6d789033e
and, even though, the bogus code ended up merged (sorry, mea culpa
here!).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-db: Add test to cover identifying a media with "unknown" arch
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Deal with "all" media architecture
Medias with "all" architecture are used as a fallback when guessing an OS
from a media.
Knowing that, any entry with "all" architecture should not be considered
when first comparing the medias, thus those are skipped and, later on,
if no match has been found, those are used.
https://gitlab.com/libosinfo/libosinfo/issues/20
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-db: Add test for guessing tree from OS
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Deal with "all" tree architectures
Tree with "all" architecture are used as a fallback when guessing an OS
from a tree.
Knowing that, any entry with "all" architecture should not be considered
when first comparing the trees, thus those are skipped and, later on,
if no match has been found, those are used.
https://gitlab.com/libosinfo/libosinfo/issues/20
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Rename os_* to os_treeinfo_* in guess_os_from_tree()
It'll make clear that we're dealing with the treeinfo attributes and not
with the tree ones.
https://gitlab.com/libosinfo/libosinfo/issues/20
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Rename tree to treeinfo in guess_os_from_tree()
It'll make clear that we're dealing with the treeinfo attributes and not
with the tree ones.
https://gitlab.com/libosinfo/libosinfo/issues/20
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-02 Pino Toscano <ptoscano@redhat.com>
gitignore: remove old entries, simplify existing ones
Remove patterns referring to old tests, and in general to files that do
not exist anymore.
Simplify few existing patterns into more general ones.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-28 Fabiano Fidêncio <fidencio@redhat.com>
tests: Add test-tree.c
This test, at least for now, tests:
- The basic functionality of creating a OsinfoTree object;
- osinfo_tree_get_os_variants() API;
https://gitlab.com/libosinfo/libosinfo/issues/16
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Add get_os_variants() API
osinfo-db schema allows that, but libosinfo never really had an API to
support it.
In order to add get_os_variants(), (get,set)_os APIs were also added,
matching the behaviour for OsinfoMedia.
https://gitlab.com/libosinfo/libosinfo/issues/16
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tree: Also check fore "treeinfo" in addition to ".treeinfo"
Akamai CDN hosted files can't start with a dot, making trees published to
a CDN having their ".treeinfo" files renamed to "treeinfo".
https://gitlab.com/libosinfo/libosinfo/issues/18
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-27 Fabiano Fidêncio <fidencio@redhat.com>
Add a git-publish configuration file
2019-03-21 Fabiano Fidêncio <fidencio@redhat.com>
test-os: Remove test_devices_duplication
This test is now part of osinfo-db.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Remove test_resources_uniqueness
This test is now part of osinfo-db.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Remove test_resources_minimum_recommended_maximum
This test is now part of osinfo-db.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Remove test-isodetect
This test is now part of osinfo-db
With this change we can get rid of the whole isodata we have.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Remove test-*.uris
Those tests are now part of osinfo-db.
With this change we can get rid of the curl dependency we have.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-15 Fabiano Fidêncio <fidencio@redhat.com>
isodata,centos: Add a new LiveGNOME isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-07 Cole Robinson <crobinso@redhat.com>
Remove emacs 'Local variables' annotations
No other virt projects have annotations like this, plus IMO
.editorconfig handles this in a much nicer way and more flexible
way. Ditch them
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Add toplevel .dir-locals.el
This centralizes emacs config in a top level file, matching the
bits sprinkled around in 'Local variable' comments
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-07 Fabiano Fidêncio <fidencio@redhat.com>
mingw,spec: Fix the Source URL
https://releases.pagure.org/libosinfo/... instead of
https://releases.pagure.io/libosinfo/...
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
mingw: Use %mingw_find_Lang macro
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
spec: Use standard vala packaging pattern where vapi files are in -devel
This commit brings upstream the changes done on Fedora on
42b96ea66d7b3e.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
spec: Add "BuildRequires: gcc"
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
mingw,spec: Remove obsolete Group tag
This commit brings upstream the changes done on Fedora on
61fea0d48407c0ee,
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
And "The Group: tag is not required in any live Fedora or EPEL release.
RHEL5 did need it, but EPEL5 did not as it was supplied automatically
via magic in the epel-rpm-macros package. The Packaging Guidelines have
indicated that the Group: tag should not be used since March of 2017."
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
spec: Remove needless use of %defattr
This commit is bringing upstream the change done on Fedora on
4a678b2f4d59,
The change is related to
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_permissions
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2019-03-07 Fabiano Fidêncio <fabiano@fidencio.org>
haikur1beta1: Add tests data
Reviewed-by: Cole Robinson <crobinso@redhat.com>
haikunightly: Update test data
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-07 Fabiano Fidêncio <fidencio@redhat.com>
tests: Add coverage for _set_installation_url()
Reviewed-by: Cole Robinson <crobinso@redhat.com>
install-config: Add _set_installation_url()
Although the installer URL can be taken from OsinfoTree, there are
situations where OsinfoTree doesn't have a URL or even the management
apps should prefer the URL set by their users instead of fallbacking to
the one get from OsinfoTree.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-01 Fabiano Fidêncio <fidencio@redhat.com>
Post release version bump to 1.5.0
Update NEWS for 1.4.0 release
Refresh translations from zanata
syms: Add "global" to 1.4.0 symbols
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests: Add identify_media() tests
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
db: Add missing attributes to fill_media()
Some new attributes have been added to OsinfoMedia, as:
- the install-script list (during this cycle);
- installer-script (1.3.0);
However, none of those attributes have been filled in in the media
accordingly to matched media.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-02-19 Martin Blanchard <tchaik@gmx.com>
build: Prefer gettext over intltool
intltool is outdated:
https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
build: Prefer autoreconf over gnome-autogen
gnome-common is completely deprecated:
https://wiki.gnome.org/Projects/GnomeCommon/Migration
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-02-18 Fabiano Fidêncio <fidencio@redhat.com>
tests: Add test-uris-common.h to the SOURCES
Otherwise some breakage can be seen when building libosinfo's RPM
test-uris-common.c:24:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1296: test_mediauris-test-uris-common.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CCLD test-entity
test-mediauris.c:27:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1282: test_mediauris-test-mediauris.o] Error 1
test-treeuris.c:27:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1394: test_treeuris-test-treeuris.o] Error 1
test-uris-common.c:24:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1408: test_treeuris-test-uris-common.o] Error 1
test-imageuris.c:27:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1184: test_imageuris-test-imageuris.o] Error 1
test-uris-common.c:24:10: fatal error: test-uris-common.h: No such file or directory
#include "test-uris-common.h"
test-uris-common: remove empty line at EOF
The empty line caused:
tests/test-uris-common.c
maint.mk: empty line(s) or no newline at EOF
make: *** [maint.mk:926: sc_prohibit_empty_lines_at_EOF] Error 1
2019-02-18 Pino Toscano <ptoscano@redhat.com>
voidlinux: add Void Linux test data
gentoo: add Gentoo Linux test data
archlinux: add Arch Linux test data
os: add OSINFO_RELEASE_STATUS_ROLLING
Add the OSINFO_RELEASE_STATUS_ROLLING value to the OsinfoReleaseStatus
enum, to track the new "rolling" release-status available in the osinfo
schema.
2019-02-18 Fabiano Fidêncio <fidencio@redhat.com>
tests: Reduce code duplication in URI tests
Let's introduce a common file that does the check of the URI for all the
URI related tests.
By doing this we can avoid code duplication while also avoiding to have
all the tests merged together into a single one, which is not so good as
limits the developer to run and wait for the whole set of tests instead
of having the ability to just run the a specific one.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests: Add ubuntu 18.04.1 and 18.04.1.0 test data
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
media: Don't assume identifiers are null terminated
Identifiers as volume-id, application, publisher, and system are not
null terminated and cannot be assumed as so.
By assuming those are null terminated strings, libosinfo ends up not
counting the last character of a MAX_* string and, consequently, not
properly identifying medias that have their identifiers with the MAX_*
size.
One example is the ubuntu-18.04.1.0-live-server-amd64.iso media, which
has as volume-id 'Ubuntu-Server 18.04.1+ LTS amd64'. As the volume-id
has exactly 32 characters it's never been matched as when reading the
media's volume-id it'd be read as 'Ubuntu-Server 18.04.1+ LTS amd6'.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
pureos: Add test data for pureos8
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-02-12 Fabiano Fidêncio <fidencio@redhat.com>
media: Make _supports_installer_script() aware of media installers
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
test-media: Add test for media installer script
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
media: Add installer to the media
Having the installer tied to the OS is something that has been shown not
optimal, unfortunately.
An OS may have a few different medias and each media may support a
specific type of script or, even, not support an installer script at
all. With this in mind, let's have the installer scripts tied to the
medias themselves.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2019-02-04 Fabiano Fidêncio <fidencio@redhat.com>
tests: abort() in case curl misbehaves
Although the issue with curl should be fixed by the previous commit,
let's abort in case it misbehaves, avoiding then to have all the data
printed on stdout.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests: Avoid re-using the curl handler on URIs tests
On CentOS, we've hit an issue that when a curl handler is re-used we end
up receiving malfunctioning responses from NetBSD CDN.
Dan investigated the issue found out that the problem is that libcurl in
CentOS 7 at least is not ignoring the body. Sometimes it closes the
keepalive connection so this doesn't matter, but other times it gives
us back the body that it should be ignoring.
In order to work the issue around, let's no re-use the curl handler but
always open a new one for each of the URIs.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-04 Cole Robinson <crobinso@redhat.com>
ubuntu: Add 19.04 ppc64el test data
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-02-04 Daniel P. Berrangé <berrange@redhat.com>
tests: add one test case per OS tested
The image, media & tree URIs test suites just register one test case for
all the work they do. As a result when they run they just sit there
printing no progress information for a long time.
This changes then to register one test case per OS in the database. As a
result we get progress information. An added benefit is that it is
possible to now run tests for individual OS by passing the -p argument.
eg test-mediauris -p /mediauris/uris/rhel3.9
2019-01-30 Daniel P. Berrangé <berrange@redhat.com>
Post release version bump to 1.4.0
Update NEWS for 1.3.0 release
Refresh translations from zanata
2019-01-24 Fabiano Fidêncio <fidencio@redhat.com>
test-os: Fix make syntax-check
While applying the last patches a few trailing whitespaces have been
introduced, making `make syntax-check` fail.
tools: Remove a reference to fedorahosted.org
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-24 Fabiano Fidêncio <fabiano@fidencio.org>
test-os: Add basic test for resources
This test only ensures that libosinfo is able to properly load the
resource info from an OS entry.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Make get_resources_*_without_inheritance() static
With that we can get rid of osinfo_os_private.h
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
loader: Deal with network-install resources
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Deal with network-install resources
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
test-os: Fix typo in resources tests
osinfo_os_get_recommended_resources -> osinfo_os_get_maximum_resources
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
loader: Fix typo when loading maximum resources
osinfo_os_add_recommended_resources -> osinfo_os_add_maximum_resources
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Make get_maximum_resources() aware of inheritance
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Group get_*_resources() together
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Remove extra line from _get_recommended_resources()
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
os: Fix typos in resources methods
methos -> method
*private! -> *private*!
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-15 Fabiano Fidêncio <fidencio@redhat.com>
db: improve _guess_os_from_media() checks
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.
tree: fix typo in the annotations: 'and' -> 'an'
2019-01-09 Fabiano Fidêncio <fidencio@redhat.com>
loader: improve warning message from loader_check_id()
"should" needs to be changed to "must" as since commit 00f258a6be
libosinfo refuses to load non-compliant named files.
README: Update download information
Let's point to https://libosinfo.org/download/ instead of pointing to
pagure, as it could change again in the future.
2019-01-04 Fabiano Fidêncio <fidencio@redhat.com>
dragonflybsd: Add 5.4.1 test data
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
loader: refuse to load non-compliant named files
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).
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
README: Reword the patch submission paragraph
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.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
README: Update download link
Let's point to pagure instead of referring to the already sunset
fedorahosted.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2019-01-04 Felipe Borges <felipe10borges@gmail.com>
endlessos: Add Endless OS 3.4 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-20 Pino Toscano <ptoscano@redhat.com>
Use g_list_free_full where easily possible
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>
2018-12-20 Fabiano Fidêncio <fidencio@redhat.com>
media: Pass the source object to GTask new
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.
media: Don't try to unref a NULL entry
In case g_file_read_finish() fails, the stream will always be NULL.
The issue has been introduced as part of f977527c82.
media: Check whether PPC ISOs are bootable
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
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Add set_non_bootable_media_error()
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Add create_from_location_async_data()
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Use G_STATIC_ASSERT()
Let's use G_STATIC_ASSERT() instead of creating a dummy array to check
the size of the _PrimaryVolumeDescriptor struct.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Use better naming for goto labels
Let's replace EXIT for cleanup and ON_ERROR for error and follow a
normal naming convention for the labels.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Don't leak stream in case of errors
stream has to be freed whenever an error occurr on
osinfo_media_create_from_location_async() internals.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tools,install-script: Add "installation-source" parameter
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
test-install-script: Cover _(get|set)_installation_source()
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
install-script: Add _(get|set)_installation_source()
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
test-install-script: Cover _(get|set)_preferred_injection_method()
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
install-script: Add _(get|set)_preferred_injection_method()
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.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-17 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: add FreeBSD 12.0 isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-12-14 Felipe Borges <felipeborges@gnome.org>
android-x86: Add Android-x86 8.1 test data
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-12-14 Fabiano Fidêncio <fidencio@redhat.com>
test-media: Add tests for OsinfoMedia attributes
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests: Add basic tests for OsinfoMedia
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
media: Add _supports_installer_script()
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
loader: Deal with "installer-script" media attribute
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
dragonflybsd: Add 5.4.0 test data
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2018-12-11 Fabiano Fidêncio <fidencio@redhat.com>
tree: cleanup non-fatal errors in load_key_info()
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.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
tree: cleanup load_key_info()
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.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-10 Fabiano Fidêncio <fidencio@redhat.com>
os: Fix _find_install_script() annotation
osinfo_os_find_install_script() returns an object which ownsership is
not transferred.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-10 Fabiano Fidêncio <fabiano@fidencio.org>
db: improve _guess_os_from_tree() checks
Do not check against a distro which doesn't have treeinfo data as
match_regex() would just match whatever we compare to it.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-10 Fabiano Fidêncio <fidencio@redhat.com>
test-os: Cover osinfo_tree_has_treeinfo()
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
tree: Add osinfo_tree_has_treeinfo()
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.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-10 Fabiano Fidêncio <fabiano@fidencio.org>
test-os: expand test_loader() to cover loading treeinfo
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
loader: properly load the treeinfo attributes
treeinfo attributes haven't been loaded properly due to the change done
in ab2ab35f, changing the hardcoded 9 to sizeof("treeinfo-").
The problem here is that size("treeinfo-") is 10, causing that any
comparison to fail.
Let's change the sizeof("treeinfo-") to strlen("treeinfo-").
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-10 Fabiano Fidêncio <fidencio@redhat.com>
test-os: Add tests for osinfo_os_find_install_script()
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
os: Do not crash when passing a NULL profile to _find_install_script()
Let's ensure we're not going to crash in case a NULL profile is passed
for osinfo_find_install_script(). Instead of crashing, though, we're
returning an error.
Also, document which are the expected values for @profile
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
os: Fix typo in _find_install_script()
osinfo_find_install_script() doesn't work as expected due to a typo when
getting the elements of the script list as an OsinfoList must be passed
instead of an OsinfoOs.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-06 Vera Cholasta <vbudikov@redhat.com>
alpinelinux3.8: Add test files for 3.8.1
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-30 Fabiano Fidêncio <fidencio@redhat.com>
image: Add "cloud-init" attribute to the image
Some images may support cloud init customization and for those we'd like
to explicitly indicate it.
The "cloud-init" attribute is similar to the "live" attribute for
medias, has its default value as FALSE and can be optinionally set in
the XML.
This commit also extends the basic image tests to also cover the
cloud-images attribute.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
tests: Add test-imageuris
In a quite similar way than test-mediauris and test-treeuris, let's have
a test for the imageuris.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
loader: Load Images information
Now that we've OsinfoImage and OsinfoImageList objects in place and
OsinfoOs already provides us an API to add an OsinfoImage to an
OsinfoOS, let's properly load the images' information present in
osinfo-db.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
os: Introduce APIs to deal with images
Let's introduce the needed APIs on os side to deal will the images.
For now, there's no info being loaded as the loader part depends on one
of these APIs.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
tests: Add test-imagelist
test-imagelist is totally based on test-devicelist.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
Introduce OsinfoImageList object
OsinfoImageList object represents has been created to easily deal with
OsinfoImage objects.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
tests: Add test-image
test-image tests the basic functionally of OsImage APIs.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
Introduce OsinfoImage object
OsinfoImage object has been created to represent pre-installed images
distributed by the OSes.
We've decided to go for the simplespet approach possible that's just
exposing the Image URL for an existing OS and then Apps that want to
deal with the Image itself can just use libguestfs for that as they
already do a quite good job on this field.
https://gitlab.com/libosinfo/osinfo-db/issues/10
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
2018-11-22 Christophe Fergeau <cfergeau@redhat.com>
build: Use EXTRA_..._DEPENDENCIES rather than _DEPENDENCIES
This allows us to use the dependencies automatically generated by
automake while appending the additional one that we need.
https://www.gnu.org/software/automake/manual/automake.html#index-EXTRA_005fmaude_005fDEPENDENCIES-1
« The EXTRA_*_DEPENDENCIES variable may be useful for cases where you
merely want to augment the automake-generated _DEPENDENCIES variable
rather than replacing it. »
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-21 Fabiano Fidêncio <fidencio@redhat.com>
tests: Fix `make check` breakage for FreeBSD 11
Let's take advantage of the newly added libosinfo-impl.la that contains
all the symbols that we need and link our tests against it.
By doing so, we can remove the referrence to osinfo_product.c when
building test-os, which has been causing test-os binary to contain 2
copies of the very same code, one linked in the test and the other from
libosinfo.so.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
osinfo: Create an intermediate convenience library
Let's create libosinfo-impl.la which is nothing else than
libosinfo-1.0.la without stripping out its non-public symbols.
libosinfo-impl.la can be used to link directly against our tests (as
those may use private functions that we do *not* want to expose), while
the "official" one (libosinfo-1.0.la) will remain the same.
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
2018-11-20 Fabiano Fidêncio <fidencio@redhat.com>
devicelink: Rename "removed" to "supported"
After some discussion seems that a better name for the "removed"
attribute would be "supported" (as it'd be more coherent with features
that are about to come).
While there's still no release of libosinfo or osinfo-db with the
"removed" attribute, let's just rename it to "supported".
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-11-19 Fabiano Fidêncio <fidencio@redhat.com>
test-devicelinklist: Remove duplicated assert
Having a duplicated g_assert_true() on CentOS7 breaks `make check` as
the compiler tries to make the second assert into a constant.
As the second assert was a typo anyways, let's just remove it in order
to fix `make check`.
test-os: Add missing XML files
Those XMLs should have been added as part be1f2def2 but unfortunately
something went wrong while rebasing the patches.
2018-11-19 Daniel P. Berrangé <berrange@redhat.com>
tests: ignore transient failures in media/tree URI tests
Some times the media/tree URI tests will fail with a timeout trying
to connect to the server. Treat this as non-fatal since it will
usually just indicate a transient network or server failure.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
tests: display info about what failed in media/tree URI tests
Make it possible to debug failures by displaying the URL,
curl error code/message and http code.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-19 Fabiano Fidêncio <fidencio@redhat.com>
os: Fix build breakage
Similarly to what was fixed by commit 6b246cd9e, let's do not use
variable declarations inside "for" loop as it's only allowed in C99
mode.
test-os: Add test_resources_inheritance()
Now that resources are inherited between OSes that derives-from/clones
some other OS, let's have a test case to ensure it's not going to break
in the future.
https://gitlab.com/libosinfo/osinfo-db/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Support inherited resources
As resources are pretty much the same for new releases of a same OS,
having them explicitly set is a source of copy-and-paste error and
redundant information in our db.
The approach taken to properly support inheritance of OSes is a
explicitly set attribute to the resources indicating that they should be
inherited.
Here's an example of how the XML will look like:
foo:
<resources arch="all">
<minimum>
<n_cpus>1</n_cpus>
<storage>1</storage>
</minimum>
</resources>
bar (which derives-from/clones foo):
<resources arch="all" inherit="true">
<minimum>
<n_cpus>3</n_cpus>
<ram>3</ram>
</minimum>
</resources>
When querying for bar's minimum resources, we'll get:
n_cpus: 3
cpu: -1 (not set, by any of the OSes)
ram: 3
storage: 1
https://gitlab.com/libosinfo/osinfo-db/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add _get_.*_resources_without_inheritance()
Those two private methods have been added and those are part of the
field preparation for having Resources inherited in the same way we do
inherit devices.
https://gitlab.com/libosinfo/osinfo-db/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
loader: Set "inherit" accordingly to the resources
"inherit" is the new attribute of the resources that means whether this
resources should have its (non filled) values inherited.
In case the "inherit" attribute is present and as is "true", let's set
it. Otherwise (the default option), there's no change from the current
behaviour.
https://gitlab.com/libosinfo/osinfo-db/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
resources: Add osinfo_resources_{get,set}_inherit()
Those two private functions will help to keep track whether the
resources should be inherited or not.
https://gitlab.com/libosinfo/osinfo-db/issues/15
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Add test_devices_inheritance_removal()
now that OsinfoOs can deal with the conpect of a "removed" device, let's
add some tests covering the possible situations we may face and ensure
we won't regress here.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Deal with "removed" devices
This commit introduces some logic to deal with "removed" devices and the
way chosen to do so was to filter out the "removed" devices from the
full list of devices (for both DeviceLinks and Device lists).
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add add_entity_to_list_check()
The addition of this new function is basically preparing the ground for
the changes that are coming in the next commits where we'll need to do
the very same check in both _get_device_links_internal() and
_get_devices_internal(). With that in mind, let's avoid code
duplication and have a single function that can be used in both methods.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Use get_device_links_internal in _get_all callback
This commit is just preparing the ground for changes that will come in
the next commits where we'll start supporting "removed" devices and in
order to so, we'll have to explicitly call _get_device_links_internal()
forcing it to return *all* devices, even the "removed" ones, as they'll
be filtered out later.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Use get_devices_internal in _get_all callback
This commit is just preparing the ground for changes that will come in
the next commits where we'll start supporting "removed" devices and in
order to so, we'll have to explicitly call _get_devices_internal()
forcing it to return *all* devices, even the "removed" ones, as they'll
be filtered out later.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add osinfo_os_get_all_device_links_internal()
The addition of this new function is basically preparing the ground for
the changes that are coming in the next commits where
osinfo_os_get_all_device_links() will have to deal with "removed"
devices.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add osinfo_os_get_device_links_internal()
The addition of this new function is basically preparing the ground for
the changes that are coming in the next commits where
osinfo_os_get_device_links() will have to deal with "removed" devices.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add osinfo_os_get_devices_internal()
The addition of this new function is basically preparing the ground for
the changes that are coming in the next commits where
osinfo_os_get_devices() will have to deal with "removed" devices.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
os: Add osinfo_os_get_all_device_links()
This function is a helper for the commits that are about come related to
properly dealing with "removed" devices.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
loader: Deal with "removed" devices for an OS
Let's make the loader aware of the "removed" attribute that can be set
for a device linked from an OS entry.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Add test_devices_inheritance_basic()
Devices are inherited from OSes that derives-from/clones some other OS.
Let's have a test case to ensure it's not going to break in the future.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-devicelinklist: Add _get_devices() test
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Add basic tests for devicelinklist
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
devicelinklist: Fix _get_devices()
osinfo_devicelinklist_get_devices() returns a list of OsinfoDevice
structs and in order to do so it has to iterate over the list of
OsinfoDeviceLink structs and get the device associated to each of the
OsinfoDeviceLink struct.
The current implementation was just trying to add the OsinfoDeviceLink
struct to the list, instead of getting the devices associated to it.
https://gitlab.com/libosinfo/osinfo-db/issues/13
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Add test_devices_duplication()
As devices are inherited from entries that "derives-from" or "clones"
any other entries, there's no reason to keep declaring those devices in
several places.
By adding this test, hopefully there'll be no more devices duplication
from now on.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Add test_resources_uniqueness
This test enforces that we'll never have more than one resources entry
for the very same architecture in an OS entry.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
test-os: Fix test breakage
"for" loop initial declarations are only allowed in C99 mode but some
old compilers (like the ones in centos7 or debian8) just don't use it by
default.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-11-16 Fabiano Fidêncio <fidencio@redhat.com>
test-os: Cover maximum resources in tests
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
test-os: Make test_resources_minimum_recommended generic
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
os: Deal with "maximum" resources
In the samw way OSes have minimum and recommended resources, let's add
support for "maximum" resources.
https://gitlab.com/libosinfo/osinfo-db/issues/11
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
popos: Add popos18.10 isodata
Reviewed-by: Felipe Borges <feborges@redhat.com>
test-os: move test-os-resources tests
Let's have all OS related tests grouped together.
Reviewed-by: Felipe Borges <feborges@redhat.com>
test-os-resources: Fix typo in test_minimum_recommended_resources()
Thanks to this typo the test was iterating over a single OS, always.
Reviewed-by: Felipe Borges <feborges@redhat.com>
rhel: Add rhel8.0 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
ubuntu: Add 19.04 prerelease isodata
ubuntu18.10: Update isodata after release
Reviewed-by: Didier Roche <didier.roche@canonical.com>
2018-11-15 Vicente Chaves de Melo <vchaves@ymail.com>
NetBSD: add NetBSD 7.2 tests isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-09 Vera Cholasta <vbudikov@redhat.com>
tests: continue after failure in mediauris & treeuris
https://bugzilla.redhat.com/show_bug.cgi?id=1639108
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-08 Fabiano Fidêncio <fidencio@redhat.com>
os: Don't leak scripts list
osinfo_list_get_elements() calls g_hash_table_get_values() which returns
a GList that must be freed after used.
For more info, please, refer to:
https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#g-hash-table-get-values
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-11-01 Felipe Borges <feborges@redhat.com>
rhel: Add rhel7.6 isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-11-01 Fabiano Fidêncio <fabiano@fidencio.org>
tests: Update silverblue29 isodata
Reviewed-by: Felipe Borges <feborges@redhat.com>
tests: Update f29 isodata
Reviewed-by: Felipe Borges <feborges@redhat.com>
2018-10-19 Alexey Shabalin <shaba@altlinux.org>
alt: Add alt8.X, alt.p8 and alt.sisyphus isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-10-18 Věra Cholasta <vbudikov@redhat.com>
test-isodetect: continue after failure
https://bugzilla.redhat.com/show_bug.cgi?id=1639108
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
test-isodetect: replace while loop with for loop
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-10-15 Fabiano Fidêncio <fidencio@redhat.com>
Remove FSF address from source files
Let's follow what's already done for the most part of libosinfo and
recommended from http://www.gnu.org/licenses/gpl-howto.html and do not
put FSF address in the source files. Instead, just link to FSF website.
Based on:
https://gitlab.com/libosinfo/libosinfo/commit/3343d0f9c1b0937824bee2527612047bc2e75f84
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-09 Fabiano Fidêncio <fidencio@redhat.com>
silverblue: Add silverblue29 (Beta) isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
fedora: Add fedora29 (Beta) isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
authors,maintainers: Add all gitlab's group members
Let's update the list of authors/maintainers accordingly to the
libosinfo's gitlab group members[0].
The list has been put in alphabetical order on purpose.
[0]: https://gitlab.com/groups/libosinfo/-/group_members
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2018-10-08 Fabiano Fidêncio <fidencio@redhat.com>
Revert "db: Force anchored patterns when matching regex"
Daniel suggested that the fix should go to the osinfo-db entries that
are causing the issue instead of forcing anchored patterns in libosinfo.
This reverts commit e6168463f4fc659b9827b5c8694dc1c6d7d5239a.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2018-10-03 Charles Arnold <carnold@suse.com>
Add SUSE CaaS Platform 3.0 isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Add SUSE CaaS Platform 2.0 isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Add SUSE CaaS Platform 1.0 isodata
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-09-24 Fabiano Fidêncio <fidencio@redhat.com>
centos: Add 6.10 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-09-21 Fabiano Fidêncio <fidencio@redhat.com>
ubuntu: Add isodata for 18.10
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-09-21 Christophe Fergeau <cfergeau@redhat.com>
install-script: Add propagate_libxml_error() helper
This simplifies the code a bit.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
install-script: Use g_set_error_literal where appropriate
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Use OSINFO_ERROR in more places
Passing a NULL error domain will trigger runtime warnings from glib.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
loader: Introduce OSINFO_ERROR
Since glib commit 2.31.10~16 [1], g_set_error() will issue a warning if
it's passed a NULL domain. libosinfo is doing this in a few places (try
for example 'osinfo-query os winxp'). This commit adds a generic OSINFO_ERROR
domain which will be used instead of NULL. It's a bit inconsistent with
OSINFO_MEDIA_ERROR and OSINFO_TREE_ERROR in that they both start with
"osinfo-*" while OSINFO_ERROR uses "libosinfo". However, since
OsinfoLoader already makes use of that quark, changing that would
arguably be an (very small) ABI break.
[1] https://gitlab.gnome.org/GNOME/glib/commit/6d9f874330
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
loader: Use OSINFO_LOADER_SET_ERROR in a few more places
There are 2 calls to g_set_error(err, "%s", "constant string"); which
can be replaced with OSINFO_LOADER_SET_ERROR
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
loader: Rename OSINFO_ERROR to OSINFO_LOADER_SET_ERROR
This will be useful in the following commits where another OSINFO_ERROR
#define will be introduced
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-09-11 Fabiano Fidêncio <fidencio@redhat.com>
haiku: Add Nightly isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1092627
Reviewed-by: Cole Robinson <crobinso@redhat.com>
haiku: Add R1/Alpha4.1 isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1092627
Reviewed-by: Cole Robinson <crobinso@redhat.com>
haiku: Add R1/Alpha3 isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1092627
Reviewed-by: Cole Robinson <crobinso@redhat.com>
haiku: Add R1/Alpha2 isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1092627
Reviewed-by: Cole Robinson <crobinso@redhat.com>
haiku: Add R1/Alpha1 isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1092627
Reviewed-by: Cole Robinson <crobinso@redhat.com>
openbsd: Add 5.3 isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
openbsd: Add 5.2 isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
openbsd: Add 5.1 isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
db: Force anchored patterns when matching regex
Without forcing anchored patterns some matches may be completely wrong
as "(J_)?CENN?A_X64FREV" (volume-id for Windows 10) that could be taken
as a match for "HRM_CENNA_X64FREV" (volume-id of a Windows 8 ISO).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
tests: Expand the arch's parser for isodetect
Some Windows ISOs isodata, as the ones added as part of commit 857f503,
uses X64 and X86 and load_iso() didn't take those into consideration.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2018-09-07 Fabiano Fidêncio <fidencio@redhat.com>
centos7: Add "NetInstall" isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
centos7: Add "Minimal" isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
centos7: Add another "DVD" isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
centos7: Add another "DVD" isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
centos7: Add LiveKDE isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
centos7: Add LiveGNOME isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
popos: Add 18.04 isodata
Reviewed-by: Cole Robinson <crobinso@redhat.com>
win10: Add LTSB Evaluation isodata
https://bugzilla.redhat.com/show_bug.cgi?id=1139394
Reviewed-by: Cole Robinson <crobinso@redhat.com>
gitignore: Add test-os-resources
test-os-resources has been added as part of 6a88a78143.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2018-09-06 Fabiano Fidêncio <fidencio@redhat.com>
rhel-atomic: Add 7.4 isodata
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
rhel-atomic: Add 7.3 isodata
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
rhel-atomic: Add missing 7.2 isodata
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
maint.mk: Adjust sc_prohibit_strcmp
- There's no need to exclude STRN?EQ as those are not defined in
libosinfo;
- Adjust the comment and the halt message to suggest the usage of
g_str_equal() instead of the non existent STRN?EQ();
https://bugzilla.redhat.com/show_bug.cgi?id=1335291
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
maint.mk: Re-enable sc_prohibit_strcmp
https://bugzilla.redhat.com/show_bug.cgi?id=1335291
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
osinfo-detect: Replace strcmp() with g_str_equal()
https://bugzilla.redhat.com/show_bug.cgi?id=1335291
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
loader: Replace strcmp() with g_str_equal()
https://bugzilla.redhat.com/show_bug.cgi?id=1335291
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-09-05 Daniel P. Berrangé <berrange@redhat.com>
Refresh translations from zanata
2018-07-24 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
netbsd: Add NetBSD 8.0 isodata
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-20 Věra Cholasta <vbudikov@redhat.com>
ubuntu: Add test files for Ubuntu18.04
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-07-20 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
dragonflybsd : Add DragonFlyBSD 5.x isodata
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-07-18 Věra Cholasta <vbudikov@redhat.com>
rhel: Add RHEL6.10 iso test files
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-07-18 Charles Arnold <carnold@suse.com>
sles: Add SLE15 ISO Information
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-07-18 Věra Cholasta <vbudikov@redhat.com>
Add test files for Alpinelinux 3.8
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-03 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: add FreeBSD 11.2 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-06-20 Daniel P. Berrangé <berrange@redhat.com>
Post release version bump
Update NEWS for 1.2.0 release
2018-06-12 Fabiano Fidêncio <fabiano@fidencio.org>
silverblue: Move isodata to its own folder
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-07 Fabiano Fidêncio <fabiano@fidencio.org>
syms: Add missing "global" on 0.2.[7-10] versions
Reported-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
syms: Fix identation of 0.2.13 symbols
When adding the symbols for LIBOSINFO_0.2.13 I mistakenly added the
symbols not respecting default identation used (1 tab) and ended up
using 4 spaces instead.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2018-05-31 Fabiano Fidêncio <fabiano@fidencio.org>
opensuse: Add Leap 15.0 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
tests: Add test-os-resources
test-os-resources has been written to avoid bug as having minimum
resources greater than the recommended resources in osinfo-db.
This problem was exposed by RHEL/CentOS data files, which caused some
really bad UI effect in clientes using those two attributes (as GNOME
Boxes).
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-05-14 Fabiano Fidêncio <fabiano@fidencio.org>
fedora: Add f28 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-05-12 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
netbsd: Add NetBSD 7.1.2 isodata
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-05-12 Andrea Bolognani <abologna@redhat.com>
tools: Fix compilation with Clang 6
Clang 6 doesn't like the way the last item in a GOptionEntry
array is initialized:
../../tools/osinfo-install-script.c:87:12: error: missing field
'short_name' initializer [-Werror,-Wmissing-field-initializers]
{ NULL }
^
1 error generated.
gmake[2]: *** [Makefile:540: osinfo-install-script.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
../../tools/osinfo-detect.c:104:12: error: missing field
'short_name' initializer [-Werror,-Wmissing-field-initializers]
{ NULL }
^
1 error generated.
gmake[2]: *** [Makefile:540: osinfo-detect.o] Error 1
Fix the issue by using the { 0 } initializer instead.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-05-10 Andrea Bolognani <abologna@redhat.com>
autogen: Don't hardcode --enable-gtk-doc
The usual behavior is for configure to detect the availability
of gtk-doc, along with other optional features, and only enable
it if found.
Hardcoding it this way is causing issues for MinGW builds,
where pkg-config is looking in the MinGW-specific paths and
can't locate the native gtk-doc.pc file, thus concluding
gtk-doc must not be present and aborting the build altogether
instead of simply skipping API reference generation.
Both 'make distcheck' (through the DISTCHECK_CONFIGURE_FLAGS
variable) and the prepare-release.sh script are already
enforcing the availability of gtk-doc when preparing releases,
so it's safe to use the default behavior for regular builds.
2018-05-08 Daniel P. Berrangé <berrange@redhat.com>
configure: fix HAVE_CURL conditional on Win32
AM_CONDITIONAL lines must always be executed, but HAVE_CURL was inside
an "if ...", which caused configure to fail when run on Win32.
2018-05-08 Andrea Bolognani <abologna@redhat.com>
spec: Drop %{extra_release}
It was mainly meant to be used for automatic builds through
Test::AutoBuild, so it can be removed now.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
prepare-release: Drop references to Test::AutoBuild
They are misleading, and no longer relevant anyway.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
maint: Rename autobuild.sh to prepare-release.sh
The script was originally used by the Test::AutoBuild
project to perform periodic automatic builds; however, that
effort has been abandoned a long time ago, and these days
libosinfo CI builds are happening on the Jenkins-based
CentOS CI environment under the libvirt umbrella[1], where
build recipes are maintained separately from the projects
themselves.
The script is still used to prepare releases, so it can't
be dropped from the repository: rename it so that its
purpose is more clearly communicated instead.
[1] https://ci.centos.org/view/libvirt/
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-04 Andrea Bolognani <abologna@redhat.com>
rhel: Fix isodata for RHEL 7.5 on ppc64le
There is a spurious empty line at the end of the file that
causes 'make syntax-check' to fail with:
[...]
tests/isodata/rhel/rhel7.5/RHEL-7.5-20180322.0-Server-ppc64le-dvd1.iso.txt
maint.mk: empty line(s) or no newline at EOF
make: *** [maint.mk:927: sc_prohibit_empty_lines_at_EOF] Error 1
Get rid of it to solve the issue.
See also
https://ci.centos.org/view/libvirt/job/libosinfo-master-syntax-check/123/
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-02 Felipe Borges <felipe10borges@gmail.com>
rhel: Add RHEL 7.5 isodata
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-04-24 Fabiano Fidêncio <fabiano@fidencio.org>
tumbleweed: Add "Kubic DVD/USB Stick" isodata
Reviewed-by: Charles Arnold <carnold@suse.com>
tumbleweed: Add "Network Image" isodata
Reviewed-by: Charles Arnold <carnold@suse.com>
opensuse-42.3: Add "Network Image" isodata
Reviewed-by: Charles Arnold <carnold@suse.com>
2018-04-10 Christophe Fergeau <cfergeau@redhat.com>
loader: Fix leak in osinfo_loader_find_files()
'tmp' is used to iterate over the list of files, so it will be NULL at
the end of the iteration, and g_list_free() will be a no-op.
The initial list is stored in 'children', so free that instead.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-10 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
openbsd: add OpenBSD 6.3 isodata
2018-04-10 Natanael Copa <ncopa@alpinelinux.org>
alpinelinux: add Alpine Linux isodata
2018-04-10 Vincent <vincent.dao@asianux.com>
asianux: add Asianux isodata
2018-03-18 Daniel P. Berrangé <berrange@redhat.com>
loader: process files in alphabetical order
Currently when loading DB files we process them in whatever order
readdir() returns them in, which is often inode order. This makes the
order of loading files non-deterministic across installs, and if there
are ambiguities in the data, we can in turn get different results.
eg ISO images match different OS entries depending on load order.
Alphabetically sorting the files doesn't remove any ambiguity that
may exist, but at least gives us consistent results on every host.
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-03-18 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
fedora27: Add Atomic Workstation isodata
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-03-11 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
fedora: add Fedora 27 isodata
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-03-11 Charles Arnold <carnold@suse.com>
sles: add SLE12 SP3 ISO Information
Add SLE12 SP3 ISO Information
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-03-11 Felipe Borges <felipeborges@gnome.org>
windows: add win2k16 test data
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
pop_os: add Pop!_OS test data
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-03-11 Christophe Fergeau <cfergeau@redhat.com>
tests: Remove calls to g_log_set_always_fatal()
All tests call that method because they want g_warning() to be fatal.
Since the switch to GTest, this is no longer necessary as this is the
default behaviour.
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
2018-02-23 Daniel P. Berrangé <berrange@redhat.com>
m4: turn off -Wfunction-cast-type warning flag from gcc8
GCC 8 adds -Wfunction-cast-type to -Wextra, but this breaks when using
G_DEFINE_TYPE which does so called "bad" function casts.
2018-02-19 Christophe Fergeau <cfergeau@redhat.com>
test-isodetect: Iterate over all isodata/ subdirs
When adding support for a new vendor, test-isodetect.c needs to be
updated to list it, which is too easy to forget.
This commit iterates over subdirs in tests/isodata/ and uses these as
the vendors to test for. This means no further modification of
test-isodetect.c is needed when adding a new vendor.
2018-02-16 Christophe Fergeau <cfergeau@redhat.com>
NetBSD: add NetBSD 6.x and 7.x tests isodata
Based on a patch from Vicente Chaves de Melo <vchaves@ymail.com>
2018-02-15 Felipe Borges <felipeborges@gnome.org>
opensuse: add OpenSUSE Leap 42.3 test data
2018-02-14 Felipe Borges <felipeborges@gnome.org>
freedos: add freedos 1.2 test data
2018-01-15 Christophe Fergeau <cfergeau@redhat.com>
test-isodetect: Improve error message on detection failures
Since the switch to the GTest framework, when the test suite fails to
identify an ISO, the error message is:
ERROR:test-isodetect.c:359:test_one: 'matched' should be TRUE
while it used to be the much more explicit:
ERROR **: ISO alpine-extended-3.7.0_rc2-x86_64.iso.txt was not matched by OS alpinelinux3.7
This commit readds the explicit message on this particular failure.
2017-12-04 Daniel P. Berrange <berrange@redhat.com>
Refresh translations from zanata
2017-11-29 Pino Toscano <ptoscano@redhat.com>
ubuntu: add Ubuntu 17.10 test data
2017-11-22 Zeeshan Ali <zeeshan@kinvolk.io>
Drop redundant 'const' keyword from object parameters
Use of 'const' parameter on object parameters is redundant, inconsistent
(both internally and against other GObject libraries) and currently breaks
the low-level Rust binding generator:
https://github.com/gtk-rs/glib/pull/249
2017-11-06 Christophe Fergeau <cfergeau@redhat.com>
tests: Add test case for Windows 10 1709 builds
These are currently missing from osinfo-db
https://bugzilla.redhat.com/show_bug.cgi?id=1509387
2017-11-06 Debarshi Ray <debarshir@gnome.org>
Marginally simplify the code to create and run a GMainLoop
Even though g_main_loop_new accepts a is_running parameter, it isn't
very important since g_main_loop_run will set it to TRUE anyway. There
is no requirement that it should be set before calling g_main_loop_run.
The vast majority of GMainLoop users simply ignore the is_running
parameter unless they are doing something out of the ordinary.
2017-11-01 Pavel Hrdina <phrdina@redhat.com>
tests: get the curl response code every time (more)
This failed on FreeBSD with following error:
../../tests/test-treeuris.c:47:13: error: variable 'response_code' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
tests: get the curl response code every time
This failed on FreeBSD with following error:
../../tests/test-mediauris.c:47:13: error: variable 'response_code' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-20 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: Add FreeBSD 10.4 isodata
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-10-19 Pino Toscano <ptoscano@redhat.com>
tests: convert from check to the GLib testing framework
GLib has shipped a testing framework for many years already, so we can
make use of it, replacing the external "check".
The conversion only switches framework without changing the structure of
the tests, making use of the more appropriate assertion in the various
places.
build: make curl optional, and only for tests
Look for curl only when the tests are enabled, and as optional build
dependency. If curl is missing, then the two network tests are not
built. Also, limit the use of curl CFLAGS/LIBS only for the tests that
really need it.
As side result, it is possible to drop the curl BuildRequires from the
mingw spec, as it builds with --enable-tests=no.
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
build: fix disabling of tests
Actually use the result of the configure switch --enable-tests, enabling
or disabling the tests accordingly.
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-18 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
openbsd: add OpenBSD 5.9 isodata
2017-10-16 Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
openbsd: add OpenBSD 6.2 isodata
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
openbsd: add OpenBSD 6.1 isodata
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
openbsd: add OpenBSD 6.0 isodata
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-10-16 Pino Toscano <ptoscano@redhat.com>
tests: test-mediauris: raise timeout to 5 minutes
With the growing amount of distros in osinfo-db, the test takes more
and more time to complete, hitting the 2 minutes timeout in case of any
network hiccup (or simply when a server takes more time to reply).
Hence, raise the timeout to 5 minutes, which ought to be enough now.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Revert "tests: test-mediauris: skip non-http URLs"
Now that test-mediauris uses libcurl, it can handle protocols different
than http(s), like ftp, just fine.
This reverts commit 4c9c7185475a9739af51a9fc680e5b8a97055467.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Switch from libsoup to libcurl
libsoup is used to check the validity of URLs in distributions in
osinfo-db; OTOH it supports only HTTP(S), so this limits the checks to
that protocol.
To overcome this limitation, switch to libcurl: while it requires
slightly more code to do the same task, it provides a bit more
flexibility, and support for other protocols. No version check is
performed, since the APIs used are old enough.
Adapt also the README, and the packaging files.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-08-15 Daniel P. Berrange <berrange@redhat.com>
Post-release version bump
Update NEWS for 1.1.0 release
2017-08-14 Daniel P. Berrange <berrange@redhat.com>
Unset LC_ALL, as LC_CTYPE doesn't override a previous LC_ALL setting
2017-08-10 Daniel P. Berrange <berrange@redhat.com>
Run glib-mkenums in en_US.UTF-8 locale
The new python based glib-mkenums crashes if run in the C
locale as python is (incorrectly) not 8-bit clean when
processing input.
2017-08-03 Pino Toscano <ptoscano@redhat.com>
rhel: add RHEL 7.4 test data
2017-08-02 Pino Toscano <ptoscano@redhat.com>
tests: make the network tests run
Load the default osinfo path, since the osinfo data are no more part of
the libosinfo sources.
The tests still fails though, but this is due to missing paths to ISOs
and trees.
tests: test-mediauris: show status code on failure
It helps when debugging failures, to check what is actual error for an
URL.
tests: test-mediauris: skip non-http URLs
The test uses libsoup, which supports only HTTP, and not other
protocols such as FTP. Hence, allow only http and https URLs.
mageia: add Mageia 6 test data
2017-08-02 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: add FreeBSD 11.1 isodata
2017-07-13 Guido Günther <agx@sigxcpu.org>
test-isodetect: add Debian's arm flavours
to avoid "Unknown arch" debug messages
2017-07-12 Guido Günther <agx@sigxcpu.org>
test-isodetect: fix parsing of application, system and publisher id
2017-07-12 Pino Toscano <ptoscano@redhat.com>
fedora: add Fedora 26 test data
2017-07-11 Guido Günther <agx@sigxcpu.org>
tests: add Debian 9.0 test data
2017-05-30 Christophe Fergeau <cfergeau@redhat.com>
build: Don't use private headers for gir/vapi generation
Using private headers when generating the gir/vapi files mean that they
are listing private methods which are not exported by the shared
library, as well as types which are not present in public headers, and
not meant to be used by external users.
This was noticed with recent vala.git as it started erroring out on the
ProductForeachFlag which is only defined in osinfo_product_private.h
https://bugzilla.redhat.com/show_bug.cgi?id=1456709
2017-05-03 Pino Toscano <ptoscano@redhat.com>
ubuntu: add Ubuntu 17.04 test data
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2017-05-02 Roman Bogorodskiy <bogorodskiy@gmail.com>
configure: add (usb|pci).ids locations on FreeBSD
Add default locations for usb.ids and pci.ids on FreeBSD,
i.e. paths used when installing this from misc/usbids
and misc/pciids ports.
This way users on FreeBSD don't need to explicitly set
these paths using --with-(usb|pci)-ids-path flag.
2017-05-02 Daniel P. Berrange <berrange@redhat.com>
Move FreeBSD 11 data into tests/ subdir
Remove trailing whitespace from FreeBSD 11 data files
2017-05-02 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: add FreeBSD 11.0 isodata
2017-04-28 Daniel P. Berrange <berrange@redhat.com>
Rename test/ to tests/ directory.
To simplify libvirt Jenkins CI setup, rename the test directory
to tests, so its name matches that used in other virt projects.
2017-04-27 Daniel P. Berrange <berrange@redhat.com>
Fix error propagation in DB loader
When failing to read the pci/usb ID files we failed to
propagate the reported error.
We also had some dead code which would never be reached
due to earlier gotos.
2017-04-24 Daniel P. Berrange <berrange@redhat.com>
Remove blank lines at end of file
2017-04-22 Michal Privoznik <mprivozn@redhat.com>
gitignore: Ignore tags
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
docs: Fix couple of warnings
Firstly, two functions
(osinfo_install_script_has_config_param_{name,list}) don't
document their arguments. Secondly, gtk-doc requires enum
documentation to be in one block with no empty lines in it.
Then at last, private enums are marked as <private> not <skip>.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-04-21 Fabiano Fidêncio <fabiano@fidencio.org>
Add 'eject-after-install' parameter to OsinfoMedia
If the media is an installer, thus specifies whether the media should be
ejected after the installation process. Default value is true.
This is mainly needed for applications like GNOME Boxes (and maybe
virt-install) to be able to decide whether the media should be ejected
or not when the final reboot happens during its installation process.
The latter case may happen when the installer leaves some packages to be
installed after rebooting the OS for the last time.
The issue solved by this patch is a corner-case faced when adding the
install scripts for SLES, as during its installation only one reboot is
performed (so, installer-reboots attribute doesn't help us) and the media
must not be ejected after the reboot in order to finish the installation.
Acked-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-18 Pino Toscano <ptoscano@redhat.com>
centos: add CentOS 6.8 and 6.9 test data
rhel: add RHEL 6.9 and 7.3 test data
2017-03-20 Guido Günther <agx@sigxcpu.org>
Debian: Update Jessie test data
Acked-by: Fabiano Fidêncio <fabiano@fidnecio.org>
2017-03-20 Pino Toscano <ptoscano@redhat.com>
mageia: add Mageia 4 and 5 test data
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
ubuntu: add Ubuntu 16.10 test data
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2017-02-23 Roman Bogorodskiy <bogorodskiy@gmail.com>
Improve Perl-related routines
* Add a check for the 'perl' program to configure.ac as
$(PERL) is used in various places
* Do not hardcode '/usr/bin/perl' in perl scripts
because on FreeBSD and maybe some other systems it's installed
in a different prefix, so use '/usr/bin/env perl' instead.
2017-02-23 Daniel P. Berrange <berrange@redhat.com>
Remove reference to fedorahosted.org in spec files
2017-02-22 Daniel P. Berrange <berrange@redhat.com>
Disable -Wunsafe-loop-optimizations warnings
This warning option is not reporting broken code. Rather it is merely
identifying loops which GCC would not be able to optimize fully when
using -funsafe-loop-optimizations. In GCC 7 this triggers on the
loader code
osinfo_loader.c: In function 'osinfo_loader_process_list':
osinfo_loader.c:2127:11: error: missed loop optimization, the loop counter may overflow [-Werror=unsafe-loop-optimizations]
while (tmp && *tmp) {
^
The warning just needs to be turned off since the code is not broken,
and we don't care about the optimization level
2017-02-07 Charles Arnold <carnold@suse.com>
suse: Add SLED-12-SP2 data
suse: Add SLES-12-SP2 data
opensuse: Add openSUSE Leap 42.2 data
2017-01-12 Fabiano Fidêncio <fidencio@redhat.com>
fedora: Add F25 data
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-23 Fabiano Fidêncio <fidencio@redhat.com>
media: Remove ISO header strings' padding
The strings in the ISO header ("volume-id", "system-id", "publisher-id"
and "application-id") have a predefined size and are padded with spaces,
but nothing in on_{pvd,svd}_read() removes these padding spaces from
those strings, which makes osinfo_media_get_volume_id() always return
[SOME-ISO-LABEL ] rather than the expected
[SOME-ISO-LABEL].
Resolves: rhbz#1408271
Reported-by: Allan Day <aday@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-20 Christophe Fergeau <cfergeau@redhat.com>
win10: Add test cases for recent Windows 10 builds
Recent Windows 10 builds (build 1607) seem to have dropped the J_ at the
beginning of the volume ID.
These additional files make sure we've got test cases for this kind of
win10 ISOs.
2016-11-06 Guido Günther <agx@sigxcpu.org>
loader: Fix typo in error message
test-isodetect: extend arch table
Reduces the output a bit when running under G_MESSAGES_DEBUG.
2016-10-29 Guido Günther <agx@sigxcpu.org>
examples: avoid PyGIWarning
This fixes
demo.py:3: PyGIWarning: Libosinfo was imported without specifying a version first. Use gi.require_version('Libosinfo', '1.0') before import
to ensure that the right version gets loaded.
from gi.repository import Libosinfo as osinfo;
2016-10-10 Daniel P. Berrange <berrange@redhat.com>
Test suite requires osinfo-db to be installed
2016-10-07 Daniel P. Berrange <berrange@redhat.com>
Post-release version bump
Update NEWS for 1.0.0
Refresh PO files from zanata
Revert "Fix mingw DLL version after bump to 1.0.0"
This reverts commit dd68d8ccb0abb9cab7324da1b3a706dbf158870b.
This is not required after
commit 8ec2de1ff44e47d189386cb5e83d26521fc76f29
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Wed Aug 10 10:09:17 2016 +0100
configure: fix accidental break in soname
2016-08-11 Daniel P. Berrange <berrange@redhat.com>
spec: fix path to test-suite.log - its in the test subdir
2016-08-10 Daniel P. Berrange <berrange@redhat.com>
spec: preserve error exit code on test failure
spec: display test results on failure
autotools hides detailed test output by default, so we must
cat test-suite.log on failure to actually see what went
wrong.
configure: fix accidental break in soname
The change in version from 0.3.0 to 1.0.0 triggered a latent
bug in our code which sets the library soname. This meant we
created libosinfo-1.0.so.1 instead of libosinfo-1.0.so.0
Pull in the fix from libvirt which is where the original logic
was copied from.
Remove database files
Remove the database files and add a dependency on the
osinfo-db RPM
loader: update to comply with new database install location
The new database locations are
- System location
This is determined by the env variable
$OSINFO_SYSTEM_DIR
If not set, then defaults to /usr/share/osinfo
This location is intended for use by operating system
distributors to install the initial data set via a
package management system like RPM or Deb
- Local location
This is determined by the env variable
$OSINFO_LOCAL_DIR
If not set, then defaults to /etc/osinfo
This location is intended for use by local system
administrators to install custom local data that
should be available to all users on a host
- User location
This is determined by the env variable
$OSINFO_USER_DIR
If not set, then defaults to $XDG_CONFIG_HOME/osinfo
If that is not set, then defaults to $HOME/.config/osinfo
This location is intended for use by unprivileged users
wishing to install local data for use by their applications
Adapt to use those, but include temporary support for looking
at the legacy local & user directory locations, and the
OSINFO_DATA_DIR env variable for back-compat.
2016-07-18 Daniel P. Berrange <berrange@redhat.com>
Remove osinfo-db-validate tool
Remove the osinfo-db-validate tool which is now available
via osinfo-db-tools. Add a RPM dep on osinfo-db-tools to
pull it in for upgradability.
Assume availability of gobject introspection during RPM build
The gobject introspection support is available for all
currently targetted platforms, so remove RPM conditionals.
Fix mingw DLL version after bump to 1.0.0
2016-07-08 Daniel P. Berrange <berrange@redhat.com>
fedora: record when virtio devices were made available
We currently only record virtio-net, virtio-blk data against
Fedora. virtio-9p, virtio-balloon and virtio-console were
also all available in Fedora 9 kernels, with virtio-rng
added in Fedora 10 and virtio-scsi in Fedora 17.
The virtio-1.0 devices all appeared in Fedora 23 guest
kernels
Add missing virtio PCI devices
We were missing virtio-rng and virtio-scsi, as well as
all the virtio 1.0 device variants, which have different
PCI IDS
The pci.ids file lists the following known devices
1000 Virtio network device
1001 Virtio block device
1002 Virtio memory balloon
1003 Virtio console
1004 Virtio SCSI
1005 Virtio RNG
1009 Virtio filesystem
1041 Virtio network device
1042 Virtio block device
1043 Virtio console
1044 Virtio RNG
1045 Virtio memory balloon
1048 Virtio SCSI
1049 Virtio filesystem
1050 Virtio GPU
1052 Virtio input
Of which, only 1001, 1001, 1002 and 1009 were recorded in
libosinfo. They would have appeared via pci.ids file loading,
but they would have lacked friendly names.
2016-07-05 Marc-André Lureau <marcandre.lureau@redhat.com>
fedora: Add F24 info & testcases
Fedora 24 with virtio-gpu support.
2016-07-04 Marc-André Lureau <marcandre.lureau@gmail.com>
device: add virtio-gpu
virtio-gpu is a non-legacy device, so device_id is always 0x10 + 0x1040.
2016-07-01 Daniel P. Berrange <berrange@redhat.com>
Post-release version bump to 1.0.0
Bump major version to reflect that that we're splitting up
the codebase in next release
Update NEWS for 0.3.1 release
2016-07-01 Christophe Fergeau <cfergeau@redhat.com>
test: Remove empty line at end of XML test file
This fixes a make syntax-check failure.
install-script: Return glib-allocated string from ::apply_xslt()
Strings created by libxml2 should be freed with xmlFree while glib ones
should be freed with g_free, so it's cleaner to allocate the string
returned from ::apply_xslt() with the glib allocator as it's meant to be
g_free'ed later on.
osinfo: Add GDestroyNotify callback to g_task_return_pointer calls
The GDestroyNotify callback passed to g_task_return_pointer() is used to
free the associated pointer in case g_task_propagate_pointer() is not
called (error cases, _finish() never called, ...).
When the GTask owns the pointer it's passed through
g_task_return_pointer() (for example the _finish() function is (transfer
full) and only calls g_task_propagate_pointer()), we need to set a
GDestroyNotify when calling g_task_return_pointer() or we may have leaks
in corner cases.
tools: Fix OsinfoOs leak in osinfo-install-script
The OsinfoOs instance returned by osinfo_media_get_os() must be unref'ed
when no longer needed.
osinfo-install-script has code doing:
if (media == NULL) {
os = find_os();
} else {
os = osinfo_media_get_os();
}
find_os() does not return a ref'ed OsinfoOs to the caller, while
osinfo_media_get_os() does. In order to make it possible to release the
ref returned by osinfo_media_get_os(), this commit changes find_os() to
always ref the OsinfoOs instance it returns.
Moreover, one of the codepaths in find_os() looks like it was
potentially returning an invalid pointer:
os = OSINFO_OS(osinfo_list_get_nth(OSINFO_LIST(filteredList), 0));
g_object_unref(filteredList);
The OsinfoOs instance was probably kept alive by references held outside
of the filtered list, but it's safer to keep a reference to ourselves,
which this commit is doing anyway in order to fix find_os() memory
handling.
install-script: Fix OsinfoOs leaks
The OsinfoOs instance returned by osinfo_media_get_os must be unref'ed
when no longer needed.
This fixes:
==29859== 3,926 (96 direct, 3,830 indirect) bytes in 1 blocks are definitely lost in loss record 2,286 of 2,295
==29859== at 0x65E19D0: g_type_create_instance (gtype.c:1854
==29859== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==29859== by 0x65C55ED: g_object_new_valist (gobject.c:2040)
==29859== by 0x65C58A0: g_object_new (gobject.c:1624)
==29859== by 0x5339F69: osinfo_os_new (osinfo_os.c:201)
==29859== by 0x5347FFD: osinfo_loader_get_os (osinfo_loader.c:464)
==29859== by 0x534B439: osinfo_loader_os (osinfo_loader.c:1410)
==29859== by 0x534BFB1: osinfo_loader_root (osinfo_loader.c:1599)
==29859== by 0x534C399: osinfo_loader_process_xml (osinfo_loader.c:1680)
==29859== by 0x534CFEE: osinfo_loader_process_file_reg_xml (osinfo_loader.c:1877)
==29859== by 0x534DA1F: osinfo_loader_process_list (osinfo_loader.c:2160)
==29859== by 0x534DCEA: osinfo_loader_process_path (osinfo_loader.c:2232)
==29859== by 0x402310: test_script_file (test-install-script.c:146)
==29859== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==29859== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==29859== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==29859== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==29859== by 0x51178EB: srunner_run (check_run.c:782)
==29859== by 0x40303D: main (test-install-script.c:349)
==29859==-
==29859== 3,926 (96 direct, 3,830 indirect) bytes in 1 blocks are definitely lost in loss record 2,287 of 2,295
==29859== at 0x65E19D0: g_type_create_instance (gtype.c:1854)
==29859== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==29859== by 0x65C55ED: g_object_new_valist (gobject.c:2040)
==29859== by 0x65C58A0: g_object_new (gobject.c:1624)
==29859== by 0x5339F69: osinfo_os_new (osinfo_os.c:201)
==29859== by 0x5347FFD: osinfo_loader_get_os (osinfo_loader.c:464)
==29859== by 0x534B439: osinfo_loader_os (osinfo_loader.c:1410)
==29859== by 0x534BFB1: osinfo_loader_root (osinfo_loader.c:1599)
==29859== by 0x534C399: osinfo_loader_process_xml (osinfo_loader.c:1680)
==29859== by 0x534CFEE: osinfo_loader_process_file_reg_xml (osinfo_loader.c:1877)
==29859== by 0x534DA1F: osinfo_loader_process_list (osinfo_loader.c:2160)
==29859== by 0x534DCEA: osinfo_loader_process_path (osinfo_loader.c:2232)
==29859== by 0x402626: test_script_data (test-install-script.c:199)
==29859== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==29859== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==29859== by 0x51178EB: srunner_run_tcase (check_run.c:373)
install-script: Fix leak in _template_loaded()
The file content obtained through g_file_load_contents_finish() was
never freed.
This fixes:
==29859== 16,384 bytes in 1 blocks are definitely lost in loss record 2,294 of 2,295
==29859== at 0x4C2DC57: realloc (vg_replace_malloc.c:785)
==29859== by 0x684FF1F: g_realloc (gmem.c:159)
==29859== by 0x681DE68: g_array_maybe_expand (garray.c:779)
==29859== by 0x681E783: g_array_set_size (garray.c:555)
==29859== by 0x681F328: g_byte_array_set_size (garray.c:1752)
==29859== by 0x626F143: load_contents_read_callback (gfile.c:6885)
==29859== by 0x6289129: async_ready_callback_wrapper (ginputstream.c:532)
==29859== by 0x62B0342: g_task_return_now (gtask.c:1107)
==29859== by 0x62B0378: complete_in_idle_cb (gtask.c:1121)
==29859== by 0x684A702: g_main_dispatch (gmain.c:3154)
==29859== by 0x684A702: g_main_context_dispatch (gmain.c:3769)
==29859== by 0x684AAAF: g_main_context_iterate.isra.29 (gmain.c:3840)
==29859== by 0x684ADD1: g_main_loop_run (gmain.c:4034)
==29859== by 0x402442: test_script_file (test-install-script.c:165)
==29859== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==29859== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==29859== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==29859== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==29859== by 0x51178EB: srunner_run (check_run.c:782)
==29859== by 0x40303D: main (test-install-script.c:349)
install-script: Fix leak in error case in generate_entity_xml()
The key list returned by osinfo_entity_get_param_keys() was freed in the
nominal case, but not in the error case.
install-script: Fix GFile leaks
This fixes:
==12193== 89 (32 direct, 57 indirect) bytes in 1 blocks are definitely lost in loss record 1,826 of 2,310
==12193== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12193== by 0x684FE58: g_malloc (gmem.c:94)
==12193== by 0x6866D42: g_slice_alloc (gslice.c:1025)
==12193== by 0x686736D: g_slice_alloc0 (gslice.c:1051)
==12193== by 0x65E1821: g_type_create_instance (gtype.c:1857)
==12193== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==12193== by 0x65C50CC: g_object_newv (gobject.c:1928)
==12193== by 0x65C58B3: g_object_new (gobject.c:1621)
==12193== by 0x6320EF9: _g_local_file_new (glocalfile.c:301)
==12193== by 0x98512F7: g_daemon_vfs_get_file_for_path (gdaemonvfs.c:383)
==12193== by 0x98513A1: g_daemon_vfs_get_file_for_uri (gdaemonvfs.c:407)
==12193== by 0x5334B09: osinfo_install_script_generate_async_common (osinfo_install_script.c:959)
==12193== by 0x5335170: osinfo_install_script_generate_for_media_async (osinfo_install_script.c:1216)
==12193== by 0x402B8A: test_script_file (test-install-script.c:157)
==12193== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12193== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==12193== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==12193== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==12193== by 0x51178EB: srunner_run (check_run.c:782)
==12193== by 0x401F82: main (test-install-script.c:345)
==12193== 89 (32 direct, 57 indirect) bytes in 1 blocks are definitely lost in loss record 1,827 of 2,310
==12193== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12193== by 0x684FE58: g_malloc (gmem.c:94)
==12193== by 0x6866D42: g_slice_alloc (gslice.c:1025)
==12193== by 0x686736D: g_slice_alloc0 (gslice.c:1051)
==12193== by 0x65E1821: g_type_create_instance (gtype.c:1857)
==12193== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==12193== by 0x65C50CC: g_object_newv (gobject.c:1928)
==12193== by 0x65C58B3: g_object_new (gobject.c:1621)
==12193== by 0x6320EF9: _g_local_file_new (glocalfile.c:301)
==12193== by 0x98512F7: g_daemon_vfs_get_file_for_path (gdaemonvfs.c:383)
==12193== by 0x98513A1: g_daemon_vfs_get_file_for_uri (gdaemonvfs.c:407)
==12193== by 0x402899: test_script_data (test-install-script.c:191)
==12193== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12193== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==12193== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==12193== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==12193== by 0x51178EB: srunner_run (check_run.c:782)
==12193== by 0x401F82: main (test-install-script.c:345)
=
test-install-script: Fix various small leaks
The value returned by osinfo_install_script_generate_for_media_finish()
was not freed in several codepaths, and the mainloop was not destroyed when
no longer needed. Data read with g_file_load_contents was also not freed
when no longer used.
This fixes:
==12193== 528 bytes in 1 blocks are definitely lost in loss record 2,279 of 2,310
==12193== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12193== by 0x5F6D459: xmlStrndup (xmlstring.c:45)
==12193== by 0x556EF95: xsltSaveResultToString (xsltutils.c:1780)
==12193== by 0x53345C2: osinfo_install_script_apply_xslt (osinfo_install_script.c:824)
==12193== by 0x53346EC: osinfo_install_script_apply_template (osinfo_install_script.c:853)
==12193== by 0x5334A7A: osinfo_install_script_generate_async_common (osinfo_install_script.c:942)
==12193== by 0x5335170: osinfo_install_script_generate_for_media_async (osinfo_install_script.c:1216)
==12193== by 0x40298A: test_script_data (test-install-script.c:212)
==12193== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12193== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==12193== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==12193== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==12193== by 0x51178EB: srunner_run (check_run.c:782)
==12193== by 0x401F82: main (test-install-script.c:345)
==12193== 16 bytes in 1 blocks are definitely lost in loss record 772 of 2,310
==12193== at 0x4C2DA60: calloc (vg_replace_malloc.c:711)
==12193== by 0x684FEB0: g_malloc0 (gmem.c:124)
==12193== by 0x684ABF1: g_main_loop_new (gmain.c:3929)
==12193== by 0x402373: test_script_datamap (test-install-script.c:284)
==12193== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12193== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==12193== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==12193== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==12193== by 0x51178EB: srunner_run (check_run.c:782)
==12193== by 0x401F82: main (test-install-script.c:345)
==29859== 16,384 bytes in 1 blocks are definitely lost in loss record 2,295 of 2,295
==29859== at 0x4C2BAEE: malloc (vg_replace_malloc.c:298)
==29859== by 0x4C2DCA1: realloc (vg_replace_malloc.c:785)
==29859== by 0x684FF1F: g_realloc (gmem.c:159)
==29859== by 0x681DE68: g_array_maybe_expand (garray.c:779)
==29859== by 0x681E783: g_array_set_size (garray.c:555)
==29859== by 0x681F328: g_byte_array_set_size (garray.c:1752)
==29859== by 0x62775AE: g_file_load_contents (gfile.c:6748)
==29859== by 0x4025E9: test_script_data (test-install-script.c:195)
==29859== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==29859== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==29859== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==29859== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==29859== by 0x51178EB: srunner_run (check_run.c:782)
==29859== by 0x40303D: main (test-install-script.c:349)
productfilter: Free 'supportDate' in ::finalize()
This fixes:
==4878== 8 bytes in 1 blocks are definitely lost in loss record 8 of 319
==4878== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==4878== by 0x6849E58: g_malloc (gmem.c:94)
==4878== by 0x682A114: g_date_new_dmy (gdate.c:289)
==4878== by 0x5335C6D: osinfo_productfilter_add_support_date_constraint (osinfo_productfilter.c:210)
==4878== by 0x401E8B: test_supportdate (test-product.c:171)
==4878== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==4878== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==4878== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==4878== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==4878== by 0x51178EB: srunner_run (check_run.c:782)
==4878== by 0x40165E: main (test-product.c:221)
productfilter: Fix GDate leak
osinfo_productfilter_matches_default() was not freeing the GDate
instances returned by osinfo_product_get_{release,eol}_date().
This fixes:
==14496== 16 bytes in 2 blocks are definitely lost in loss record 141 of 382
==14496== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==14496== by 0x684FE58: g_malloc (gmem.c:94)
==14496== by 0x6830114: g_date_new_dmy (gdate.c:289)
==14496== by 0x5337012: date_from_string (osinfo_product.c:345)
==14496== by 0x533706D: osinfo_product_get_release_date (osinfo_product.c:354)
==14496== by 0x5337F6F: osinfo_productfilter_matches_default (osinfo_productfilter.c:279)
==14496== by 0x532CC8D: osinfo_filter_matches (osinfo_filter.c:288)
==14496== by 0x532D51B: osinfo_list_add_filtered (osinfo_list.c:272)
==14496== by 0x532DD52: osinfo_list_new_filtered (osinfo_list.c:443)
==14496== by 0x401B35: test_supportdate (test-product.c:140)
==14496== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==14496== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==14496== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==14496== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==14496== by 0x51178EB: srunner_run (check_run.c:782)
==14496== by 0x40166E: main (test-product.c:219)
==14496==-
==14496== 16 bytes in 2 blocks are definitely lost in loss record 142 of 382
==14496== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==14496== by 0x684FE58: g_malloc (gmem.c:94)
==14496== by 0x6830114: g_date_new_dmy (gdate.c:289)
==14496== by 0x5337012: date_from_string (osinfo_product.c:345)
==14496== by 0x53370C8: osinfo_product_get_eol_date (osinfo_product.c:364)
==14496== by 0x5337F92: osinfo_productfilter_matches_default (osinfo_productfilter.c:280)
==14496== by 0x532CC8D: osinfo_filter_matches (osinfo_filter.c:288)
==14496== by 0x532D51B: osinfo_list_add_filtered (osinfo_list.c:272)
==14496== by 0x532DD52: osinfo_list_new_filtered (osinfo_list.c:443)
==14496== by 0x401B35: test_supportdate (test-product.c:140)
==14496== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==14496== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==14496== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==14496== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==14496== by 0x51178EB: srunner_run (check_run.c:782)
==14496== by 0x40166E: main (test-product.c:219)
test-product: Fix two small leaks
This fixes:
==14496== 456 (48 direct, 408 indirect) bytes in 1 blocks are definitely lost in loss record 373 of 382
==14496== at 0x65E1964: g_type_create_instance (gtype.c:1854)
==14496== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==14496== by 0x65C50CC: g_object_newv (gobject.c:1928)
==14496== by 0x65C58B3: g_object_new (gobject.c:1621)
==14496== by 0x53375FD: osinfo_productfilter_new (osinfo_productfilter.c:93)
==14496== by 0x401982: test_supportdate (test-product.c:121)
==14496== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==14496== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==14496== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==14496== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==14496== by 0x51178EB: srunner_run (check_run.c:782)
==14496== by 0x40166E: main (test-product.c:219)
==14496==-
==14496== 1,964 (48 direct, 1,916 indirect) bytes in 1 blocks are definitely lost in loss record 379 of 382
==14496== at 0x65E1964: g_type_create_instance (gtype.c:1854)
==14496== by 0x65C36AA: g_object_new_internal (gobject.c:1781)
==14496== by 0x65C55ED: g_object_new_valist (gobject.c:2040)
==14496== by 0x65C58A0: g_object_new (gobject.c:1624)
==14496== by 0x5338257: osinfo_productlist_new (osinfo_productlist.c:81)
==14496== by 0x401946: test_supportdate (test-product.c:116)
==14496== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==14496== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==14496== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==14496== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==14496== by 0x51178EB: srunner_run (check_run.c:782)
==14496== by 0x40166E: main (test-product.c:219)
test: Fix osinfo_list_get_elements() leak
The returned list must be freed after use.
This fixes:
==13583== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==13583== by 0x684FE58: g_malloc (gmem.c:94)
==13583== by 0x6866D42: g_slice_alloc (gslice.c:1025)
==13583== by 0x68462B5: g_list_prepend (glist.c:311)
==13583== by 0x683A06B: g_hash_table_get_values (ghash.c:1814)
==13583== by 0x532D2CC: osinfo_list_get_elements (osinfo_list.c:212)
==13583== by 0x401961: test_uris (test-mediauris.c:87)
==13583== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==13583== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==13583== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==13583== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==13583== by 0x51178EB: srunner_run (check_run.c:782)
==13583== by 0x4016A4: main (test-mediauris.c:146)
entity: Fix osinfo_entity_get_param_keys() leak
The content of the GList returned by osinfo_entity_get_param_key() is
not owned by the caller, but by OsinfoEntity. However, the "id" field
added to the list was owned by the caller, and could not be freed
properly. This commit adds a const char * to the GList rather than
adding a g_strdup'ed string in order to fix this leak.
==12129== 3 bytes in 1 blocks are definitely lost in loss record 7 of 269
==12129== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==12129== by 0x684FE58: g_malloc (gmem.c:94)
==12129== by 0x686889E: g_strdup (gstrfuncs.c:363)
==12129== by 0x532BB81: osinfo_entity_get_param_keys (osinfo_entity.c:300)
==12129== by 0x401AFF: test_multi_props_clear (test-entity.c:266)
==12129== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12129== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==12129== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==12129== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==12129== by 0x51178EB: srunner_run (check_run.c:782)
==12129== by 0x401369: main (test-entity.c:344)
test-entity: Fix osinfo_entity_get_param_keys() leak
The list returned by osinfo_entity_get_param_keys() must be freed.
==20812== 24 bytes in 1 blocks are definitely lost in loss record 109 of 262
==20812== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==20812== by 0x684FE58: g_malloc (gmem.c:94)
==20812== by 0x6866D42: g_slice_alloc (gslice.c:1025)
==20812== by 0x6846A13: g_list_append (glist.c:261)
==20812== by 0x532BB88: osinfo_entity_get_param_keys (osinfo_entity.c:300)
==20812== by 0x40160F: test_empty_props (test-entity.c:71)
==20812== by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==20812== by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==20812== by 0x51178EB: srunner_run_tcase (check_run.c:373)
==20812== by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==20812== by 0x51178EB: srunner_run (check_run.c:782)
==20812== by 0x40314A: main (test-entity.c:344)
2016-07-01 Fabiano Fidêncio <fidencio@redhat.com>
osinfo-query: return failure when no matches are found
According to `man osinfo-query`: "The exit status will be 0 if matching
entries were found, or 1 if not matches were found". So, let's adapt the
program in order to match the manual.
Also, this patch was written keeping the current behavior about printing
the Short ID, Name, Version, ID table.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1351718
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-06-03 Christophe Fergeau <cfergeau@redhat.com>
test: Make warnings fatal
Since standard output is hidden by default while we run make check, it's
very easy to miss test cases emitting new warnings. This commit uses
g_log_set_fatal_mask() to ensure that the test cases will abort if a
warning is emitted while they run. This matches the behaviour of the
GTest framework.
test: Silence expected warning in test-os
os: Fix invalid URLs
Some URLs have become obsolete since the last time
test-treeuris/test-mediauris were run, this fixes these 2 tests.
test: Adjust test database directory layout
Since the database reorganization, the files must follow a directory
layout matching their id, otherwise a warning is emitted.
ubuntu: Fix initrd/kernel paths
The initrd extensions are either .lz or .gz depending on the version
(server/desktop), and the base directory is either casper or install.
Some of the powerpc/parisc entries could be improved as the ISOs contain
multiple kernels and initrds (eg 32/64 bit versions).
ubuntu: Mark the sparc ISOs as sparc64
These ISOs only contain a 64 bit kernel.
ubuntu: Add Ubuntu 16.04 data
2016-06-02 Christophe Fergeau <cfergeau@redhat.com>
opensuse: Fix id of x11-keyboard datamap
The correct id is http://x.org/x11-keyboard and not
http://libosinfo.fedorahosted.org/x11-keyboard
opensuse: Rename autoinst files according to their id
This causes warnings when running ./test/test-isodetect if they are not
named as expected:
** (process:28952): WARNING **: Entity http://opensuse.org/opensuse/autoyast/desktop
should be in file install-script/opensuse.org/opensuse-autoyast-desktop.xml not
install-script/opensuse.org/autoinst-desktop.xml
ubuntu: Add Ubuntu 15.10 test cases
Detection was already present, but not the corresponding test files.
rhel: Add RHEL 6.8 data
rhel: Add RHEL Atomic 7.2 data
2016-05-23 Fabiano Fidêncio <fidencio@redhat.com>
Revert "debian: Allow empty passwords"
The workaround that has been used so far doesn't work.
For the user account, the password is indeed removed in the end of the
installation, but then login in from GDM is impossible. Although it
works from a VT (depending on the installed version), this is not
something obvious that every user would try. So, requiring the user
password seems the best to do for now and when a proper solution is
found, the user password can be set to optional again.
For the root account, the password is not removed in the of the
installation and ends up being set as "dummyPa55w0rd", something that
the user would never guess, unless they have access to the libosinfo
code. So, requiring the admin password seems the best to do for now and
when a proper solution is found the admin password can be set to
optional again.
This reverts commit 087a8f8a23895e2d792b0f6d26a9d0c01a6c7e87.
Conflicts:
data/install-script/debian.org/debian-preseed-desktop.xml.in
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1336108
https://bugzilla.redhat.com/show_bug.cgi?id=1336109
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2016-05-18 Fabiano Fidêncio <fidencio@redhat.com>
debian,installer: Set user avatar
Set user avatar in the desktop installation's profile based on what is
done in Fedora and openSUSE scripts.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336112
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
debian,installers: Enable ftp mirror
Currently, after completing the installation, the users are not able to
install any software in the VM as the only entry in
/etc/apt/sources.list is the installation media itself.
Also, desktop installation's profile is broken as qemu-guest-agent is
not part of the installation media and we have no mirror set up for
downloading the package from.
Let's fix these issues enabling the ftp mirror and removing the DVD from
the /etc/apt/sources.list.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1336110
https://bugzilla.redhat.com/show_bug.cgi?id=1336111
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2016-05-17 Fabiano Fidêncio <fidencio@redhat.com>
debian: Add Debian Testing info
Is worth mentioning that Debian Testing is a rolling release done every
week. That's the reason the upgrades/derives-from fields are omitted in
this patch and that the devices must be added here as well.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-13 Programmingkid <programmingkidx@gmail.com>
configure.ac: Fix darwin detection code
The $host variable would be set to "x86_64-apple-darwin10.8.0" when using
Mac OS X. So to detect it, we need to add another asterisk to the case.
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-13 Fabiano Fidêncio <fidencio@redhat.com>
win,installer: Fix "Windwos" typo
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
win,installer: Fix misplaced parenthesis
The commit 17809d54 inserted a wrong parenthesis in the test done for
skipping the ProductKey during the WindowsPE phase of the script.
In this patch, the bogus expression "count(media/variant != 0)" is
replaced by "count(media/variant) != 0".
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-11 Vladimir Beneš <vbenes@redhat.com>
debian,installer: Add ssh-server for installation
Installing ssh-server is needed for testing purposes.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1251668
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-11 Andrew Stormont <andyjstormont@gmail.com>
build: Fix "--no-undefined" linker's flag for solaris
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1302339
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-11 Fabiano Fidêncio <fidencio@redhat.com>
build: Fix "--no-undefined" linker's flag for OSX
Apple's linker doesn't have support to "--no-undefined" and we must use
something equivalent, like: "-undefined,error".
The patch was test by Programmingkid and his positive feedback can be
seen here:
https://www.redhat.com/archives/libosinfo/2016-May/msg00164.html
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1305016
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-11 Christophe Fergeau <cfergeau@redhat.com>
media: Fix misplaced parenthesis in strncmp use
Due to a misplaced parenthesis, bootable media detection was doing
strncmp(.., .., sizeof(..) != 0)
instead of
strncmp(.., .., sizeof(..)) != 0
This means we were comparing 1 character from BOOTABLE_TAG rather than
the full string.
This was found when trying to compile libosinfo with CC=clang
2016-05-10 Fabiano Fidêncio <fidencio@redhat.com>
win10: Enable unattended installation
Unattended installation works properly, apart from the user avatar not
being set for Windows 8 (or newer)[0].
[0]: https://bugzilla.redhat.com/show_bug.cgi?id=1328637
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win,installer: Improve "setting product key" logic
Only a few variants of Windows 8 and Windows 8.1, like Enterprise,
Enterprise Debug and Professional, have to have the ProductKey skipped
during the WindowsPE phase of the installation script.
This patch re-writes the "skipping ProductKey" logic in a cleaner way,
making it work also for Windows 10 (and all its variants).
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Generalize "No Variant" volume ID expression
Let's generalize the expression for x86 volume IDs in order to cover
more volume IDs.
The expression is based on the one used for the x86_64 volume IDs.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Add two x86_64 volume IDs
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Generalize "Enterprise LTSB" volume ID expression
Let's generalize the x86 volume ID expression in order to cover more
volume IDs.
The expression is based on the one used for the x86_64 volume IDs.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Add two Enterprise LTSB (x86_64) volume IDs
LTSB stands for Long Term Servicing Branch.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Generalize "Enterprise" volume ID expression
Let's generalize the expression for x86 volume IDs in order to cover
more volume IDs.
The expression is based on the one used for the x86_64 volume IDs.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Add two Enterprise x86_64 volume IDs
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Generalize "Education" volume ID expression
Let's generalize the x86 volume ID expression in order to cover more
volume IDs, based on the ones already covered in the x86_64 volume ID
expression.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win10: Add an Education x86_64 volume ID
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2016-05-09 Fabiano Fidêncio <fidencio@redhat.com>
win8,installer: Tune based on variants
As Windows 8.1, Windows 8 (most likely) has to have the ProductKey
skipped during the WindowsPE phase of the script for the enterprise,
enterprise-debug and professional variants.
"Most likely" is said because I haven't been able to test the Windows 8
Professional variant as it needs a VLK and MSDN tells me that only
administrators can access keys in the Volume Licensing Service Center
(VLSC).
Also, I haven't been able to start an installation using none of the
debug ISOs, as the system reboots just a minute (or so) after booting
up. It seems to be a problem with the ISOs themselves, as I've
downloaded a few ISOs (different locales) and faced the same issue.
win8: Generalize "No Variant" vol ID expression
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add professional variant
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add debug variant
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add enterprise-debug variant
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add enterprise variant
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Enable express installation
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Enable express installation
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse,installer: Add DESKTOP script
The script has been tested and works as expected for the most recent
releases of OpenSUSE (Leap 4.21 and Tumbleweed).
A big thanks to Lasse Schuirmann, who had worked on a similar script,
from which I got the chroot-scripts part, during his GSoC project.
Co-author: Lasse Schuirmann <lasse.schuirmann@gmail.com>
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse,installer: Add JEOS script
The script has been tested and works as expected for the most recent
releases of OpenSUSE (Leap 4.21 and Tumbleweed).
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Bump recommended storage size
Although the values are correct, it is impossible to have a normal
(graphical) usage of a system with the storage's recommended size.
So, instead of using 5GB as recommended storage size, let's increase
this value to 20GB.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Add USB Tablet device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Add virtio-net device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Add virtio-block device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Add QXL device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-tumbleweed: Add AC97 device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Add USB Tablet device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Add virtio-net device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Add virtio-block device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Add QXL device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Add AC97 device
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
opensuse-42.1: Fix volume-id match
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2016-05-04 Fabiano Fidêncio <fabiano@fidencio.org>
win8.1: Add installer-reboots value
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8.1: Re-enable unattended installation
Now the unattended installation works properly, apart from the user
avatar not being set for Windows 8 (or newer)[0].
Due to the Windows policy on hostname and therefore apps might need
to be patched for the installer scripts to work[1].
[0]: https://bugzilla.redhat.com/show_bug.cgi?id=1328637
[1]: https://bugzilla.gnome.org/show_bug.cgi?id=765175
This reverts commit 49ae46cda4fbd2e95dc794cb64aec27117351c85.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
2016-05-04 Fabiano Fidêncio <fidencio@redhat.com>
installer: Use l10n-language as UI language
Since commit 57b459e09 we set 'EN-US' as UI language instead of 'EN-GB'.
However, this hack is only necessary for Windows 7 and can cause issues
when installing newer versions of the Windows, as the installer,
somehow, gets confused by having different values set to UI language,
System Locale and User Locale and ends up prompting a window for letting
the user to set these values.
By limiting the hack to Windows 7, this patch fixes the installation of
'EN-GB' ISOs of Windows 8 and 8.1 (the ones tested for now).
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8.1,installer: Force Windows activation
I've noticed that when installing Windows 8.1 the activation is not done
by the end of the unattended installation and, actually, the serial
number shown in the Activate Windows program is different than the one
used to perform the installation. Also, when tring to activate the
software it fails with the "Windows can't be activate. Try again later"
message and no useful details about the error.
So, in order to avoid this issue, let's force the activation in the
FirstLogon phase of the installation script by directly editing the
Slmgr.vbs options for Volume Activation.
For more info about the Slmgr.vbs Options for Volume Activation, please,
take a look on:
https://technet.microsoft.com/en-us/library/dn502540.aspx
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
2016-05-04 Fabiano Fidêncio <fabiano@fidencio.org>
win8.1,installer: Tune based on variants
So, I ended up doing tests with all ISOs that I have access from MSDN
and here is the conclusion:
Windows 8.1
Problematic:
en_windows_8_1_enterprise_debug_checked_x64_dvd_2756358.iso
en_windows_8_1_enterprise_n_debug_checked_x64_dvd_2942525.iso
en_windows_8_1_enterprise_n_x64_dvd_2971845.iso
en_windows_8_1_enterprise_x64_dvd_2971902.iso
en_windows_8_1_pro_n_vl_x64_dvd_2971969.iso
Non-problematic:
en_windows_8_1_n_debug_checked_x64_dvd_2707894.iso
en_windows_8_1_debug_checked_x64_dvd_2707208.iso
en_windows_8_1_n_x64_dvd_2707896.iso
Windows 8.1 with Updates:
Problematic:
en_windows_8.1_enterprise_n_with_update_x64_dvd_6050225.iso
en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso
en_windows_8.1_pro_n_vl_with_update_x64_dvd_6050969.iso
en_windows_8.1_pro_vl_with_update_x64_dvd_6050880.iso
Non-problematic:
en_windows_8.1_n_with_update_x64_dvd_6051677.iso
en_windows_8.1_with_update_x64_dvd_6051480.iso
Based on this info, the best way to go is:
- Set the ProductKey during the WindowsPE phase of the setup only in the
following conditions:
- any Windows media that is not Windows 8.1 (as it was before)
- Windows 8.1 media has no variant
- Windows 8.1 media contains on its variant debug but doesn't contain
enterprise on it
These rules will cover medias with no variant and with "debug" variant
that are not enterprise. All the rest (Enterprise, Enterprise Debug
and Professional) will have the ProductKey skipped during the
WindowsPE phase of the setup.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8.1: Clean up vol-id entries
- IR[M135]_CEN?NA_X*FRE is already covered by Enterprise Volume ids.
- IR[M3]_CCSN?A_X*FRE is now covered by No Variant Volume ids.
- IR[M15]_CPRN?A_X*FREV is now covered by Professional Volume Ids.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8.1: Adjust the vol-id for enterprise x86
Use the same pattern of Volume ids used for enterprise x86_64.
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8.1: Add a few more professional volume ids
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8.1: Add two more "no variant" volume ids
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8.1: Add one more enterprise iso data
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8: Add installer-reboots value
Acked-by: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add comment about the user avatar issue
User avatar is not set as expected after performing a unattended
installation of Windows 8 (or newer).
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win8: Add missing cmd script for installer
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
win7: Remove two duplicated volume id entries
The entries removed are:
- GSP1RMCPRVOL (Windows 7 Professional x86)
- GSP1RMCPRXVOL (Windows 7 Professional x86_64)
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>
2016-04-20 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: add information about 10.2 and 10.3
2016-04-19 Christophe Fergeau <cfergeau@redhat.com>
opensuse: Remove invalid upgrades/derives-from links
tumbleweed has upgrades and derives-from nodes using non-existent IDs.
This causes runtime warnings when running test-isodata.
2016-04-19 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: use proper version value for 10.1
10.0 -> 10.1
README: adjust wording a little.
README: update homepage
2016-03-24 Charles Arnold <carnold@suse.com>
data: add missing openSUSE distro information
Add missing openSUSE distro information.
Added os data and isodata for the following distros:
openSUSE Leap 42.1
openSUSE Tumbleweed
data: add missing SLES/SLED distro information
Add missing SLES/SLED distro information.
Added os data and isodata for the following distros:
SUSE Linux Enterprise Server 12 SP1
SUSE Linux Enterprise Desktop 12 SP1
Added isodata for the following distros:
SUSE Linux Enterprise Server 11 SP4
SUSE Linux Enterprise Desktop 11 SP4
2016-03-03 Roman Bogorodskiy <bogorodskiy@gmail.com>
Fix build with older GCC
Build with older gcc fails with:
CC libosinfo_1_0_la-osinfo_avatar_format.lo
In file included from ../osinfo/osinfo_os.h:30,
from ../osinfo/osinfo.h:55,
from osinfo_avatar_format.c:28:
../osinfo/osinfo_media.h:68: error: redefinition of typedef 'OsinfoMedia'
../osinfo/osinfo_install_script.h:43: error: previous declaration of 'OsinfoMedia' was here
To avoid redefinition, use forward-declaration in a similar way
like it's done for OsinfoOs in osinfo/osinfo_os.h.
2016-02-05 Guido Günther <agx@sigxcpu.org>
Update CD URLs to latest Debian Jessie point release
2016-01-21 Fabiano Fidêncio <fidencio@redhat.com>
build: Fix .vapi generation
After a267020e272a generation of the .vapi file broke. It no longer has
path_pattern property while get_path_pattern() is still there.
Adding nodist_libosinfo_1_0_include_HEADERS to the list of the files
passed to the .gir generation solves the problem.
2016-01-13 Daniel P. Berrange <berrange@redhat.com>
don't include autogenerated enum files in dist
Previous commit 77cf2730eb6e5503a9bd40e6baf7cc0b393a9dc7
reverts 4e488678d4af0e54da7400851d554bc4c4497c76 (fixes
to the VPATH build) because it was said to break the
make distcheck.
After examining the problem, it seems this commit was not
in fact the problem - it merely exposed the existing bug
elsewhere.
The real problem is that we were including the autogenerated
enum files in the dist. So when doing builds from git those
files were in $builddir, but when doing builds from dist
those files were in $srcdir. Except that 'make distclean'
would delete the enum files, which would again cause them
to appear in $builddir.
So the real fix is stop including the enum files in the dist
build: fix VPATH based builds
The VPATH build fails because the enum generator is told to
look for two generated files in the $srcdir instead of builddir.
We should not in fact loom the generated files at all when building
enums, so they can be removed.
The g-ir-scanner is also missing a -I$(build_dir) to let it find
the generated files.
Finally the gtk-doc tools were not being told to look in the
$(build_dir)
autobuild.sh: enable gtk doc build when testing
autobuild.sh: fix flag to turn on werror
In commit 97091136bd037aa44da13873ac910320b9ad7e6b we changed
to use gnulib's compiler warnings code, but forgot to change
the autobuild.sh flag to match. It should be --enable-werror
autobuild.sh: run parallel make for faster builds
Set MAKEFLAGS to use -j option matching number of available
CPUs.
autobuild.sh: set a default value for AUTOBUILD_INSTALL_ROOT
2016-01-11 Fabiano Fidêncio <fidencio@redhat.com>
build: Don't use USE_GNOME2_MACROS
The following warning was shown when running autogen.sh:
***Warning*** USE_GNOME2_MACROS is deprecated, you may remove it from
autogen.sh
build: Don't set PKG_NAME
The following warning was shown when running autogen.sh:
***Warning*** PKG_NAME is deprecated, you may remove it from autogen.sh
Use SOUP_VERSION_MAX_ALLOWED
In order to avoid using a too new libsoup API.
Use GLIB_VERSION_MAX_ALLOWED
In order to avoid using a too new GLib API.
Remove checks/code for GLib older than 2.35.1
As now we depend on GLib 2.36, let's remove all checks/code that depend
on an older version than the one we require.
tree: Add an indentation level for the if block
Use GTask instead of GSimpleAsyncResult
Instead of using GSimpleAsyncResult, use the new GTask API, which is
much more straightforward.
For using the new GTask API, let's bump GIO (part of GLib) dependency
version to 2.36.
what is safe based on major distro support:
- Debian Jessie: glib-2.42
- RHEL-7.1: glib-2.40
- SLES12: glib-2.38
- Ubuntu LTS 14.04: glib-2.40
2016-01-08 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.3.0
Revert "build: fix VPATH based builds"
This reverts commit 4e488678d4af0e54da7400851d554bc4c4497c76.
It breaks `make distcheck` here so reverting it for release 0.3.0:
--------------------
if test
"/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference"
!=
"/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference"
; then \
files=`echo Libosinfo-docs.xml Libosinfo-sections.txt
Libosinfo-overrides.txt Libosinfo.types`; \
if test "x$files" != "x" ; then \
for file in $files ; do \
destdir=`dirname
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference/$file`;
\
test -d "$destdir" || mkdir -p "$destdir"; \
test -f
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference/$file
&& \
cp -pf
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference/$file
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference/$file
|| true; \
done; \
fi; \
fi
make[4]: *** No rule to make target '../../osinfo/*.c', needed by
'scan-build.stamp'. Stop.
make[4]: *** Waiting for unfinished jobs....
touch setup-build.stamp
make[4]: Leaving directory
'/extra-data/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference'
-------------------
2015-12-16 Daniel P. Berrange <berrange@redhat.com>
Switch to 0.3.0 for next release
Since we have had a major change in the way we process the
libosinfo database files, this would be a good time to
switch to 0.3.0 for release numbers
2015-12-14 Fabiano Fidêncio <fidencio@redhat.com>
centos: Add CentOS 6.7 data
About the URL field I've opted to use a server who cleary is related
to CentOS and that was recommended by CentOS people from #centos-devel
at freenode. Those URLs will point the user to select from another URL
(from USA or Europe) where the ISOs can actually be downloaded.
centos: Add CentOS 6.6 data
About the URL field I've opted to use a server who cleary is related
to CentOS and that was recommended by CentOS people from #centos-devel
at freenode. Those URLs will point the user to select from another URL
(from USA or Europe) where the ISOs can actually be downloaded.
2015-11-20 Christophe Fergeau <cfergeau@redhat.com>
rhel: Add RHEL 6.7 data
rhel: Add RHEL7 codename
As documented on https://access.redhat.com/articles/3078?tour=7#RHEL7
rhel: Add RHEL7 release dates
rhel: Remove i686 medias for RHEL7
RHEL7 never had i686 ISOs released.
rhel: Add RHEL 7.2 data
altlinux: Fix ALT Linux 7.0 detection
Publisher ID should be all upper-case.
altlinux: Fix URLs to ALTLinux 7.0
The ones currently used return a 404 error.
ubuntu: Fix URLs to ubuntu 15.10
'vivid' was mistakenly used in the URL path leading to a 404 error.
15.10 is wily, vivid was 15.04.
ubuntu: Fix URLs to old ubuntu versions
Once they are no longer supported, they move to old-releases.ubuntu.com.
fedora: Fix URLs to old fedora versions
Once a fedora version becomes unsupported, its ISOs are moved from
download.fedoraproject.org to archive.fedoraproject.org
debian: Update URLs to latest minor releases
During the lifetime of a major release, there are regular minor releases
of updated isos. Availability of ISOs for older minor releases seem not
to be guaranteed, leading to failures in test-mediauris (with
LIBOSINFO_NETWORK_TESTS set in the environment). This commit updates
debian 6/7/8 URLs to the latest minor update.
debian: Fix Debian 6.0.10 detection
The current regex for Debian only expects a single digit as the micro
version number, but Debian 6 goes up to 10.
configure: bump libsoup version to 2.42
By bumping libsoup version, we are fixing a few deprecated warnings in
our tests (use SoupSession directly rather than SoupSessionAsync) and as
a side effect we don't need libsoup-gnome anymore.
Based on a patch from Fabiano Fidêncio <fidencio@redhat.com>
2015-11-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,script: Use more generic URL
The URL we have been pointing Anaconda to, seems to only work for
released versions and not for Alpha and Beta. Let's use a URL that works
for both released and development snapshots.
rhel,script: Install qemu-guest-agent
for desktop profile. Agent package has been available since RHEL6 and our
installer script is only listed by RHEL 6 and greater so we can ask for
it to be installed unconditionally.
fedora,script: Install qemu-guest-agent
For desktop profile.
2015-11-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
debian,script: Install qemu-guest-agent
For desktop profile.
fedora: Add F23 info & testcases
2015-11-09 Daniel P. Berrange <berrange@redhat.com>
schema: allow multiple <name> elements under OS variant
The OS <variant> tag must allow multiple <name> elements
because there can be translations present.
2015-11-06 Christophe Fergeau <cfergeau@redhat.com>
db: Fix valgrind issues with language detection
match_languages() returns a list containing a single string, but given
the way language_code_from_raw() works, this string may actually point
to already freed memory by the time match_languages() ends.
Subsequent uses of this list will cause accesses to free'd memory.
This commit changes match_languages() so that it uses the string itself
(before it's freed) rather than letting the caller do this.
This fixes:
==28623== Invalid read of size 1
==28623== at 0x4C2BC22: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28623== by 0x6A6B1F2: g_strdup (gstrfuncs.c:362)
==28623== by 0x553FCA2: osinfo_entity_add_param (osinfo_entity.c:253)
==28623== by 0x5554BD8: osinfo_media_set_languages (osinfo_media.c:1256)
==28623== by 0x555A78A: fill_media (osinfo_db.c:641)
==28623== by 0x555ABED: osinfo_db_identify_media (osinfo_db.c:709)
==28623== by 0x4030AA: test_one (test-isodetect.c:346)
==28623== by 0x40339D: test_windows (test-isodetect.c:395)
==28623== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==28623== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==28623== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==28623== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==28623== by 0x532BB7C: srunner_run (check_run.c:782)
==28623== by 0x403A1B: main (test-isodetect.c:500)
==28623== Address 0x89914b0 is 0 bytes inside a block of size 4 free'd
==28623== at 0x4C29D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28623== by 0x6A525ED: g_free (gmem.c:189)
==28623== by 0x55586A6: match_languages (osinfo_db.c:117)
==28623== by 0x555A76C: fill_media (osinfo_db.c:639)
==28623== by 0x555ABED: osinfo_db_identify_media (osinfo_db.c:709)
==28623== by 0x4030AA: test_one (test-isodetect.c:346)
==28623== by 0x40339D: test_windows (test-isodetect.c:395)
==28623== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==28623== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==28623== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==28623== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==28623== by 0x532BB7C: srunner_run (check_run.c:782)
==28623== by 0x403A1B: main (test-isodetect.c:500)
==28623== Block was alloc'd at
==28623== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28623== by 0x6A524D8: g_malloc (gmem.c:94)
==28623== by 0x6A6B277: g_strndup (gstrfuncs.c:425)
==28623== by 0x6A5EC90: g_match_info_fetch (gregex.c:1005)
==28623== by 0x55583DF: get_raw_lang (osinfo_db.c:57)
==28623== by 0x5558672: match_languages (osinfo_db.c:113)
==28623== by 0x555A76C: fill_media (osinfo_db.c:639)
==28623== by 0x555ABED: osinfo_db_identify_media (osinfo_db.c:709)
==28623== by 0x4030AA: test_one (test-isodetect.c:346)
==28623== by 0x40339D: test_windows (test-isodetect.c:395)
==28623== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==28623== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==28623== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==28623== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==28623== by 0x532BB7C: srunner_run (check_run.c:782)
==28623== by 0x403A1B: main (test-isodetect.c:500)
2015-11-05 Christophe Fergeau <cfergeau@redhat.com>
tests: Add testcases for ID collision in OsinfoList
This will detect issues fixed by the commit fixing osinfo_list_add.
list: Fix replacement in osinfo_list_add
OsinfoList maintains a mapping between a const char *entity_id and an
OsinfoEntity object. It does so by using both a GPtrArray and a
GHashTable.
When an entity is added to an OsinfoList, a pointer from the
OsinfoEntity is used as the key (through osinfo_entity_get_id()) and
the OsinfoEntity is g_object_ref'ed and used as a value.
The OsinfoEntity is also appended to the array mentioned previously.
The use of g_hash_table_new_full() ensures that the OsinfoEntity will be
unref'ed when it's removed from the hash table.
However, when trying to add an entity with the same id as one already
present in the OsinfoList, several issues occur:
- g_hash_table_insert() is used, which means the preexisting entity with
the same id is going to get removed, and thus g_object_unref'ed.
However, the _old_ key will still be used by the hash table, which
means that if the OsinfoList was holding the last reference to the
old OsinfoEntity, the key stored in the hash table is going to
point to freed memory
- similarly, we make no attempt at removing the preexisting entity from
the GPtrArray, so this will also contain stale data
This commit makes sure we remove entities with the same id from the
GPtrArray when this situation occurs. It uses g_hash_table_replace()
rather than g_hash_table_insert() which replaces both the key and the
value if the hash table already contains the same key.
This fixes some valgrind issues or crashes that occurred when running
make check in a libosinfo tree with 2 databases, one in the old layout
and one using the new layout.
test-isodetect: Fix GDataInputStream leak in load_iso()
This fixes:
==12890== 1,024,600 (15,040 direct, 1,009,560 indirect) bytes in 235 blocks are definitely lost in loss r
==12890== at 0x67E2C88: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C4B7A: ??? (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6A14: g_object_new_valist (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6D80: g_object_new (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x40244F: load_iso (test-isodetect.c:101)
==12890== by 0x4029B1: load_distro (test-isodetect.c:205)
==12890== by 0x402B28: load_distros (test-isodetect.c:252)
==12890== by 0x402C51: load_isos (test-isodetect.c:283)
==12890== by 0x403058: test_one (test-isodetect.c:331)
==12890== by 0x4033B8: test_windows (test-isodetect.c:387)
==12890== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890== by 0x532BB7C: srunner_run (check_run.c:782)
==12890== by 0x4037B9: main (test-isodetect.c:496)
test-isodetect: Fix leak when loading ISO data
The string returned by g_data_input_stream_read_line() must be freed
when no longer needed.
This fixes:
==12890== 199,410 bytes in 6,710 blocks are definitely lost in loss record 2,166 of 2,169
==12890== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12890== by 0x6A514D8: g_malloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x646F9AE: g_data_input_stream_read_line (in /usr/lib64/libgio-2.0.so.0.4600.1)
==12890== by 0x402806: load_iso (test-isodetect.c:135)
==12890== by 0x4029B1: load_distro (test-isodetect.c:205)
==12890== by 0x402B28: load_distros (test-isodetect.c:252)
==12890== by 0x402C51: load_isos (test-isodetect.c:283)
==12890== by 0x403058: test_one (test-isodetect.c:331)
==12890== by 0x4033B8: test_windows (test-isodetect.c:387)
==12890== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890== by 0x532BB7C: srunner_run (check_run.c:782)
==12890== by 0x4037B9: main (test-isodetect.c:496)
test-isodetect: Fix GFileInfo leak
This fixes:
==12890== 10,438 (520 direct, 9,918 indirect) bytes in 13 blocks are definitely lost in loss record 2,151
==12890== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12890== by 0x6A514D8: g_malloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A68622: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A68CBD: g_slice_alloc0 (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x67E2B63: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C4B7A: ??? (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6460: g_object_newv (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6D93: g_object_new (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x652836D: ??? (in /usr/lib64/libgio-2.0.so.0.4600.1)
==12890== by 0x652587B: ??? (in /usr/lib64/libgio-2.0.so.0.4600.1)
==12890== by 0x6481253: g_file_enumerator_next_file (in /usr/lib64/libgio-2.0.so.0.4600.1)
==12890== by 0x402B7A: load_distros (test-isodetect.c:246)
==12890== by 0x402C51: load_isos (test-isodetect.c:283)
==12890== by 0x403058: test_one (test-isodetect.c:331)
==12890== by 0x4033B8: test_windows (test-isodetect.c:387)
==12890== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890== by 0x532BB7C: srunner_run (check_run.c:782)
==12890== by 0x4037B9: main (test-isodetect.c:496)
test-isodetect: Fix leak of 'langs' GList
This fixes:
==12890== 1,032 bytes in 43 blocks are definitely lost in loss record 2,129 of 2,169
==12890== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12890== by 0x6A514D8: g_malloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A68622: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A47EA9: g_list_copy_deep (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x55400A8: osinfo_entity_get_param_value_list (osinfo_entity.c:424)
==12890== by 0x555476E: osinfo_media_get_languages (osinfo_media.c:1238)
==12890== by 0x402CCA: test_langs (test-isodetect.c:300)
==12890== by 0x4031E8: test_one (test-isodetect.c:350)
==12890== by 0x4033B8: test_windows (test-isodetect.c:387)
==12890== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890== by 0x532BB7C: srunner_run (check_run.c:782)
==12890== by 0x4037B9: main (test-isodetect.c:496)
db: Fix leak of 'variants' GList
The GList returned by osinfo_entity_get_param_value_list() must be freed
when no longer needed.
This fixes:
==12890== 2,112 bytes in 88 blocks are definitely lost in loss record 2,139 of 2,169
==12890== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12890== by 0x6A514D8: g_malloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A68622: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x6A47EA9: g_list_copy_deep (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890== by 0x55400A8: osinfo_entity_get_param_value_list (osinfo_entity.c:424)
==12890== by 0x555A58F: fill_media (osinfo_db.c:654)
==12890== by 0x555A8C4: osinfo_db_identify_media (osinfo_db.c:709)
==12890== by 0x4030C5: test_one (test-isodetect.c:338)
==12890== by 0x4033B8: test_windows (test-isodetect.c:387)
==12890== by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890== by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890== by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890== by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890== by 0x532BB7C: srunner_run (check_run.c:782)
==12890== by 0x4037B9: main (test-isodetect.c:496)
=
l10n: Update translations from zanata
2015-10-22 Daniel P. Berrange <berrange@redhat.com>
loader: re-add support for loading files explicitly
Some existing applications pass an XML file to the
osinfo_loader_process_path method, so we must continue
to support this, even though we want apps to switch to
using a directory of XML files, one per entity.
This requires us to re-add the 'skipMissing' flag for
use when loading files.
The other change is that we need to disable the code
that checks relative paths when loading a single file,
instead of files inside a directory.
loader: remove leading / from relative path
Fix the warning
** (gnome-boxes:5499): WARNING **: Entity http://opensuse.org/opensuse/11.4 should be in file /os/opensuse.org/opensuse-11.4.xml not os/opensuse.org/opensuse-11.4.xml
by removing the leading '/', since g_file_get_relative_path
does not use a leading '/'
2015-10-20 Daniel P. Berrange <berrange@redhat.com>
loader: don't return NULL from a void method
loader: implement new semantics for entity overriding
This implements the new scheme for allowing entities to
be overridden. If an XML file relative path matches one
in an earlier datbase directory, the original file is
not loaded at all. Any files in a ENTITY-NAME.d will
now augment earlier data rather than replace it.
eg consider these files
1. /usr/share/libosinfo/db/os/fedoraproject.org/fedora-22.xml
2. /etc/libosinfo/db/os/fedoraproject.org/fedora-22.xml
3. $HOME/.config/libosinfo/db/os/fedoraproject.org/fedora-22.d/extra.xml
File #1 will not get loaded, because file #2 is detected
as a full override. File #2 will get loaded to define the
main Fedora 22 OS, and then file #3 will get loaded to
augment the main data.
Most of the PCI and USB device info in the local DB is
just augmenting the pci.ids and usb.ids master files,
so these need to move to .d directories now
loader: skip leading whitespace in USB/PCI ids strings
When parsing the usb.ids & pci.ids files, we must skip any
leading whitespace in the vendor/device/subsystem strings.
loader: sanity check entity filenames when loading
When we have loaded the id attribute of the entity, check it
against the entity filename to ensure its XML document was
held in a file with the modern naming.
This merely prints out a warning for now to avoid breaking
existing users, but in the future, files with non-compliant
names will not be loaded at all.
loader: rework handling of pci.ids and usb.ids
Currently we have the option to download pci.ids/usb.ids or
symlink to the distro provided version given to configure.
Change configure so that it searches for the files in a
variety of expected locations. This ensures we always use
the external files, in any modern Linux distro, without
the user needing to give an arg. We look for them in
/usr/share/hwdata/{pci.ids,usb.ids} (RHEL/Fedora)
/usr/share/misc/{pci.ids,usb.ids} (Ubuntu/Debian/Gentoo)
/usr/share/{pci.ids,usb.ids} (SLES/OpenSuse)
Instead of loading the pci.ids/usb.ids files as part of
the main database file enumeration process, explicitly
load them from their expected location. This avoids the
need to symlink the distro provided files into the database
dir.
loader: rewrite loader to separate file enumeration from loading
The current loader code enumerates files, processing them as it
finds them. This changes it into a two stage process, first
enumerating all files and then loading all files. This will
facilitate later patches which will change the way files are
enumerated.
loader: re-arrange code for loading list of directories
Re-arrange the loading code so that there is a single helper
method that takes an array of GFile * to load. This will
facilitate future code for handling overrides between
directories.
loader: pull out code for building database paths
Create standalone helper methods for constructing a GFile
object for the system/local/user database paths.
data: remove "virtio" and "ide" as buses
The virtio devices don't use a virtio bus, rather than virtio
protocol is layered over another bus like pci.
IDE is not a bus type we need to track compatibility for.
tests: switch to use XML from builddir only
All XML files are given a .in suffix, even if they don't contain
translations, so we can assume all .xml files are now in the
build dir, and nothing in the source dir needs loading.
Update ignore files for new database layout
data: remove pluralization from data directories
eg instead of platforms/qemu.org/qemu-1.2.0.xml we just have
platform/qemu.org/qemu-1.2.0. The top level directory name
now matches the entity name exactly
data: split devices into one file per device
data: split windows-* into one file per install script
data: split ubuntu into one file per install script
data: split rhel into one file per install script
data: split fedora into one file per install script
data: split debian into one file per install script
data: split x11-keyboard into one file per datamap
data: split windows-lang into one file per datamap
data: split xen into one file per platform
data: split rhel-xen into one file per platform
data: split qemu into one file per platform
data: split kvm into one file per platform
data: split windows into one file per OS
data: split ubuntu into one file per OS
data: split suse into one file per OS
data: split solaris into one file per OS
data: split rhl into one file per OS
data: split rhel into one file per OS
data: split opensuse into one file per OS
data: split openbsd into one file per OS
data: split netware into one file per OS
data: split netbsd into one file per OS
data: split mandriva into one file per OS
data: split mandrake into one file per OS
data: split mageia into one file per OS
data: split macos into one file per OS
data: split gnome into one file per OS
data: split freebsd into one file per OS
data: split fedora into one file per OS
data: split dos into one file per OS
data: split debian into one file per OS
data: split centos into one file per OS
data: split altlinux into one file per OS
data: rename 'hypervisors' to 'platforms'
The database directory name matches the object name, except in
the case of the platform object, where the directory is named
"hypevisors". Change the dir name to "platforms" to be consistent.
data: standard install script URI format
Fix the URI format for install scripts to take the scheme
http://$domain-name/$distro/$script/$profile
where "$script" is the type of install script (ie kickstart,
preseed, unattend, etc) for the distro in question.
data: change domain name for x11 keyboard map
The X11 keyboard mapping is associated with the X.org
site, not the libosinfo site.
data: change PS2 device URIs to refer to ibm.com
The PS2 computer spec originated with IBM, so the correct
URI to refer to is ibm.com not qemu.org
data: fix URI scheme use for ib700 device
The ib700 device currently uses a URI of "isa://ib700". Change the
URI to refer to the product vendor (http://ibasetechnologies.net)
and use a path of "isa/ib700" for the device.
data: change URIs for netware OS
The common URI path format is distro/version, so make netware
URIs comply.
data: fix typos in altlinux, debian and rhl datasets
The versions for altlinux 5/6/7 are inconsistent, sometimes
using 1 digit, sometimes 2 digits and sometimes 3 digits.
Change them all to use 2 digits as was practice for earlier
versions. Also remove codenames from the product name.
Debian buzz was 1.1, not 1.0 - there was never an
official 1.0 release.
The version of RHL 6.2 was wrong
data: change GNOME URIs to include 'gnome' prefix
Change GNOME URIs to include 'gnome' as the first part of
the URI path, since this will be used to identify filenames
later.
data: change QEMU/KVM ID URIs to include product string
Include "qemu" and "qemu-kvm" as the first part of the path
component of the URIs, since this will be used to form a
filename later.
data: fix RHEL Xen platform versions & adjust IDs
Currently the RHEL Xen platform is returning the same version
number for multiple entities. Fix this by suffixing the Xen
version with the RHEL version. Change the short-id and URI
IDs so they are of the form 'xen-rhel-$VERSION' eg
http://redhat.com/xen-rhel/3.1.0.5.6
xen-rhel-3.1.0.5.6
data: sanitize Xen device ID URIs and add missing devs
The Xen devices have a formal device ID value, which is used
in Xen bus. We should record that in the <product-id> field
and add a corresponding <product> string. Change the device
ID URIs so that they are of the format
http://xen.org/xen/$PRODUCT-ID
Finally add various devices that were missing.
data: remove duplication in Xen hypervisor devices
Every Xen hypervisor platform has duplicated the list of
supported devices. The RHEL Xen platforms also missed out
the <upgrades> relationships. Remove all the device
duplication and rely on inheritance instead.
data: change PCI and USB device ID URIs
Currently PCI and USB device URIs look like
http://pciids.sourceforge.net/v2.2/pci.ids/8086/2668
http://www.linux-usb.org/usb.ids/80ee/0021
We want to associate filenames with URIs in a well-defined format.
These existing URIs, particular the PCI one, are too long in the
path component.
It is also desirable to use the industry standards body as the
domain name, rather than the domain of the specific project
we happen to import data from right now.
Thus the URIs are changed to
http://pcisig.com/pci/1af4/1000
http://usb.org/usb/80ee/0021
data: remove most information about PCI devices
We already load PCI/USB information from the pci.ids/usb.ids
files, so should not duplicate it again in XML files. The
only info we need to retain are the device classes.
docs: add document describing database organization
Add a document that sets out the desired end goal for the
database organization that the following patches will move
towards.
docs: describe entity URI ID scheme
Add a doc describing the best practice guidelines around
the format of URIs for various entities.
2015-10-16 Christophe Fergeau <cfergeau@redhat.com>
test-isodetect: Don't set size when block size is unknown
When parsing an isoinfo file, we don't try to set the volume size if the
'vol_size' was not set. This commit does the same when 'blk_size' is not
set as volume size is set to vol_size * blk_size.
test-isodetect: Ignore empty isoinfo fields
While parsing isoinfo files, test-isodata is going to add empty
strings ("") to the libosinfo database for the fields it can parse. This
commit ignores them instead.
test-isodetect: Fix invalid read when parsing isoinfo files
While parsing the isoinfo files, we check if the current line starts
with some prefix, but then we skip one byte more when we pass the string
to osinfo_entity_set_param(). This accounts for a space which comes
right after the prefix.
It can happen that the line being parsed ends right after the prefix
with no additional space, in which case we'd be accessing invalid memory
when we try to skip the space.
This commit adds the additional space to the prefix check, and uses
strlen() rather than a hardcoded len when skipping the prefix later on.
This fixes
==10921== Conditional jump or move depends on uninitialised value(s)
==10921== at 0x4C2BC29: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==10921== by 0x6A6B222: g_strdup (gstrfuncs.c:362)
==10921== by 0x553F4F2: osinfo_entity_set_param (osinfo_entity.c:190)
==10921== by 0x402716: load_iso (test-isodetect.c:141)
==10921== by 0x4029C7: load_distro (test-isodetect.c:203)
==10921== by 0x402B3E: load_distros (test-isodetect.c:250)
==10921== by 0x402C67: load_isos (test-isodetect.c:281)
==10921== by 0x40306E: test_one (test-isodetect.c:329)
==10921== by 0x4032E1: test_rhel (test-isodetect.c:367)
==10921== by 0x532B78A: ??? (in /usr/lib64/libcheck.so.0.0.0)
==10921== by 0x532BB7C: srunner_run (in /usr/lib64/libcheck.so.0.0.0)
==10921== by 0x403A4C: main (test-isodetect.c:490)
2015-10-12 Jasper Lievisse Adriaanse <jasper@humppa.nl>
data: add OpenBSD 5.7 and 5.8
https://bugzilla.redhat.com/show_bug.cgi?id=1270735
2015-10-07 Daniel P. Berrange <berrange@redhat.com>
data: add missing Xen 3.1.0 release
The RHEL Xen platforms reference a Xen 3.1.0 release which
was missing entirely.
The 3.1.0 was not officially released as a tar.gz but several
enterprise distros shipped it based off the GIT tag.
Similarly 3.1.1 & 3.1.2 were not officially released. These
are not added since no distro is thought to have used them.
data: fix bad upgrades reference for KVM platform
The KVM 1.2.0 platform is referencing a non-existant
platform via the upgrades relationship.
data: fix reference to windows install script for vista
Previous commit
commit 12e13186165f9f6ecb5e1eb92fea450502bb81c2
Author: Fabiano Fidêncio <fabiano@fidencio.org>
Date: Thu Aug 16 15:54:11 2012 -0300
Add desktop profile for Windows
Changed the URI for the existing install scripts to
have a 'desktop' or 'jeos' suffix. It added both new
install scripts to existing OS entries, but forgot
to update the Windows vista entry, so it was left
pointing to a non-existant script.
loader: identify referenced but not defined entities
When loading the database we often have to instantiate
entities to represent relationships (upgrades, derives,
etc) before the entity is actually defined. This makes
the code liable to bugs as we might instantiate entities
which are never defined.
This extends the loader so that it tracks all entities
that are created via references, and once loading is
complete it prints out a warning if any referenced
entities were not defined fully.
This identifies a number of mistakes in our current
database that the following patches will fix.
loader: fix memory leaks when loading data
The 'lang' attribute needs to be free'd with xmlFree.
The install script config param needs to be unref'd
since when it is added to the install script an extra
ref is taken.
The install script avatar needs to be unref'd since
when it is added to the install script an extra ref is
taken.
2015-09-25 Daniel P. Berrange <berrange@redhat.com>
build: fix path to locale files in mingw RPM
The mingw RPM spec listed the locale files in the libdir
instead of datadir
test: load XML files from builddir too
If the builddir is separate from the sourcedir we must load
files from the former too, otherwise we miss all the XML
files which are translated.
build: fix ChangeLog generation in VPATH build
When running 'make dist' from a VPATH, the ChangeLog file
is not generated because it doesn't find the .git directory
build: fix VPATH based builds
The VPATH build fails because the enum generator is told to
look for two generated files in the $srcdir instead of builddir.
We should not in fact loom the generated files at all when building
enums, so they can be removed.
The g-ir-scanner is also missing a -I$(build_dir) to let it find
the generated files.
Finally the gtk-doc tools were not being told to look in the
$(build_dir)
2015-09-24 Christophe Fergeau <cfergeau@redhat.com>
rhel: Add RHELSA 7.1 volume ID
rhel: Narrow down RHELSA 7.0 volume ID regexp
It's currently matching RHELSA.*aarch64 regardless of the version number
present in the volume ID. This means it will likely match all RHELSA 7.x
releases in addition to RHELSA 7.0
win10: Add one volume ID
Data was provided by Vaclav Ehrlich
win8.1: Add 2 more volume IDs
The regex matching x86-64 enterprise variants is not as strict as it
could: it's going to match IR5_CENNA_X64FREV or IR1_CENA_X64FREV for
example for which we don't have test cases.
However, I'm confident this will match
en_windows_8.1_enterprise_n_with_update_x64_dvd.iso and
en_windows_8.1_enterprise_x64_dvd.iso
if such ISOs exist, and that it's not going to give us false
positives. Since it might allow us to identify unknown ISOs
without false positives, I went for it.
Data was provided Vaclav Ehrlich
2015-09-23 Marc Deslauriers <marc.deslauriers@ubuntu.com>
ubuntu: Update Ubuntu information
- Fix typos
- Use official release names instead of codenames
- Update release and eol dates
- Update repo URLs for eol releases
2015-09-17 Christophe Fergeau <cfergeau@redhat.com>
fedora: Add Fedora 20 for PowerPC volume ID
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
centos: Add CentOS 6.3 Live volume ID
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
freebsd: Add FreeBSD 10.1 volume ID
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
win: Add Windows 8.1 volume IDs
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
win: Add more Windows 8 test cases
These ISOs are already covered by libosinfo volume IDs.
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
win: Add Windows 7 volume IDs
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
win: Add Windows Server 2012 R2 volume IDs
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
win: Add Windows Server 2012 volume IDs
Data provided by John Snow in
https://bugzilla.redhat.com/show_bug.cgi?id=1212599
2015-09-11 Christophe Fergeau <cfergeau@redhat.com>
win: Fix wrong comment added in 7b454eff
'debug' variant is introduced by a /* Starter */ comment.
2015-09-10 Christophe Fergeau <cfergeau@redhat.com>
Add Windows 10 Education volume-id
2015-09-02 Daniel P. Berrange <berrange@redhat.com>
Fix sun/oracle confusion in solaris metadata
There are multiple mistakes in the solaris metadata
- Solaris 11 was released after Oracle acquisition, so vendor
should be Oracle
- The product name of Solaris >= 11 includes "Oracle" and
not "Sun", so should be "Oracle Solaris 11"
- The original product names for earlier versions of Solaris
did not include "Sun", so just "Solaris 10"
- The domain name in the URL for OpenSolaris should be sun.com
not oracle.com
- The domain name in the URL for Solaris 11 should be oracle.com
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1257151
2015-08-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Ditch udev rule
New udev/blkid expose more ISO9660 properties that apps can grab and
set on install media for detection to work. As a result our udev rule
becomes redundant.
This improves system bootup time conciderably if there is an ISO9660
media inserted during bootup as our udev rule needed to parse the XML
etc and is therefore pretty slow (keeping in mind that a few seconds are
a long time in the land of modern udev/systemd).
2015-08-17 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Bump version
2015-07-23 Victor Toso <victortoso@redhat.com>
windows: Add a win7 volume ID
Iso downloaded directly from MSDN with the name:
Windows 7 Home Premium with Service Pack 1 (x64) - DVD (English)
Related: https://bugzilla.gnome.org/show_bug.cgi?id=752635
2015-07-17 Christophe Fergeau <cfergeau@redhat.com>
fedora: Fix fedora-unknown regexp
It's currently matching fedora 21 and fedora 22, causing make distcheck
failures.
2015-07-16 T A Mahadevan <ta.mahadevan@gmail.com>
Added support for qemu upto version 2.3.0
2015-07-09 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Add data about RHEL 7.1
2015-06-04 Lin Ma <lma@suse.com>
suse: Add opensuse 13.2 info
2015-05-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.12
NEWS: Fix year for last 2 releases
fedora: Add F22 info
This time around, we also recommend RAM and storage to some nice sane
values.
Test data for each media is included.
fedora,script: More generic test for netinstaller
Instead of checking if variant is 'netinst', let's check if it contains
'netinst' in it. In Fedora 22, networkinstaller media are provided for
both Server and Workstation variant so we'll need two different variants
for both but the same installer script could be used with both.
2015-05-26 Christophe Fergeau <cfergeau@redhat.com>
ubuntu: Add Ubuntu 15.04 info
ubuntu: Add Ubuntu 14.04 info
debian: Add Debian 8.0 info
2015-05-26 Lin Ma <lma@suse.com>
suse: Add sled11 sp1, sp2, sp3 and sp4
Add entries for SUSE Linux Enterprise Desktop 11 SP1, SP2, SP3 and SP4.
I can't find out the release date information about these SLED distros,
will update them when I figure them out.
Change in V1: Removed the fix for sles 11 32bit to another patch.
suse: Fix the volume-id information for sles 11.x 32bit
2015-05-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Enable installer scripts for F21
Now that these scripts work for at least one of the variants (which was
always the case for all Fedora versions we supported the installer
scripts for anyway), let's enable them.
fedora,script: Fix netinst auto-install
The fedora install script was written for and tested against installer
DVDs so it does not work for netiso. This patch fixes the issue by
removing the install method commands and adding remote repos if the
media is detected to be a netiso.
https://bugzilla.redhat.com/show_bug.cgi?id=1178787
fedora: Separate variant for F21 netiso
tools,install-script: Allow arg to be a media file
Now that we have API to generate scripts for specific media and since
it is the recommended path to generating scripts, let's allow users of
this tool to provide an installer or live media as argument.
tests: Pass media to script generator
Now that we have an API to pass media to script generation methods, let's
test that API instead since its not only the recommended API but also this
way we get to test both passing of OS and media information to script
template.
One of the test cases still uses the existing API on purpose to keep the
case of 'no media available' covered as well.
Recommend osinfo_install_script_generate_*for_media()
Recommend the use of the new script generation API that takes an
identified media object as argument rather than OS, in the docs.
Add osinfo_install_script_generate_command_line_for_media()
Add variant of osinfo_install_script_generate_command_line() that takes
(an identified) media instead of an OS. Currently no commandline
template needs access to media but lets add this to be future safe and
be consistent with other osinfo_install_script_generation*() API.
Add osinfo_install_script_generate_output_for_media*()
Add variant of osinfo_install_script_generate_for_media*() that
generates the script into a file.
Add osinfo_install_script_generate_for_media*()
Add API that allows apps to pass the media matched against the OS they
are generating the script for. Scripts can use this information to make
decisions about how installation should be setup. For example, we are
going to use this in the Fedora installer script to decide whether to
install from ISO or from network, based on whether or not media is a
network installer.
install-script: Add some missing docs
2015-05-19 Lin Ma <lma@suse.com>
suse: Add sles11 sp1, sp2, sp3 and sp4
Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4.
2015-05-19 Christophe Fergeau <cfergeau@redhat.com>
vista: Re-add volume id removed by mistake
In my recent commit adding 2 new Windows Vista IDs, I mistakenly removed
a preexisting one, breaking make distcheck in the process.
2015-05-18 Christophe Fergeau <cfergeau@redhat.com>
win: Add ISO data for 2 more Vista releases
2015-05-12 Christophe Fergeau <cfergeau@redhat.com>
test-isodetect: Remove space before parens
This fixes make syntax-check which is currently failing with:
GEN sc_bracket_spacing_check
test/test-isodetect.c:153: blk_size = (gint64) atoll (line + 23);
test/test-isodetect.c:155: vol_size = atoll (line + 16);
2015-05-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
install-script: Minor fix to a doc comment
build: Ignore 'strings exceeding C90 limit' warning
We don't really need to care about C90 compliance (it's pretty old
standard by now) to have to limit our strings to 509 characters.
tools,install-script: Add missing '\n' to error msg
2015-05-06 Cole Robinson <crobinso@redhat.com>
rhel: Add AArch64 ISO
RHELSA will be its own release for a short while, but long term it's
expected to just be another RHEL architecture. So piggyback on the rhel7.0
entry for now. If needed we can add a toplevel rhelsa entry later.
schema: Sync arch names with libvirt
Next patch will add aarch64, and we will may have ppc64le variants
in the future too
2015-04-29 Charles Arnold <carnold@suse.com>
suse: Add sles12 and sled12
Add entries for SUSE Linux Enterprise Server and Desktop 12.
suse: Change vendor from Novell to SUSE
SUSE has been run as an independent entity since about 2011 and while all
things Novell have been absorbed into the parent company (now Micro Focus
International), Novell no longer exists as a company.
suse: Rename Suse to SUSE
Rename Suse to SUSE because this is the official spelling.
2015-04-20 Christophe Fergeau <cfergeau@redhat.com>
tests: Rename ISO test data from .iso to .iso.txt
A few files containing iso-info -d -i output have a .iso extension
instead of a .txt extension. test-isodetect only looks at .txt files,
so they need to be renamed.
make check still passes after these changes.
2015-04-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
windows: Add a win8.1 volume ID
Add volume ID of a Windows 8.1 enterprise ISO and test data for it.
2015-03-17 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
test: Add all F21 ISO testcases
fedora: Add F21 server netiso media entries
fedora: Add volume size info for F21 ISOs
tests,fedora: Add testcases for all F20 ISOs
fedora: Separate media entry for each ISO
Different ISOs have different volume sizes so to be able to add volume
size info to all medias, we have to create separate media entry for each
ISO. Moreover, apart from the fact that this makes one particular XML
file a lot bigger than we'd like it to be, this change makes a lot of
sense anyway.
This will also make addition of sequence numbers to multi-disc
installer medias, much easier later.
test: Replace F19 & F21 Alpha ISO data w/ released
Both F19 and F21 has been released. Not only its better to keep test
data against released ISOs rather than Alpha ISOs, the volume-size is
obviously different between released and Alpha ISO so if we want to add
volume-size for these ISOs to our database, we need this change to avoid
breaking the tests.
db: Use volume-size info for detection
If volume-size is known of a media, ensure that it's the same as media
being compared with, for detection. This will enable us to differentiate
ISOs with exactly same volume-id, system-id and application-id.
It's possible that we encounter two different ISOs that have the same
volume-size, not just the other IDs but chances of that happening are
extremely small. Even if that happens, this patch doesn't make things
worse for that scenario.
test-isodetect: Load volume size info
Our data on various ISOs provide volume size information. Lets load
that information so that its part of our tests.
schema: Allow volume-size attribute for ISO9660 media
Allow medias to specify the size of ISO9660 volumes.
media: Extract volume size from ISO9660 device/image
When creating a media object from an ISO9660 device/image, extract
volume size too along with other other information.
media: API to get/set ISO9660 volume size
2015-03-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Correct indentation in .syms file
Bump version
2015-03-04 Rick Kerkhof <rick.2889@gmail.com>
Add a Windows 7 CD ID
2015-03-04 Christophe Fergeau <cfergeau@redhat.com>
os: Free minimum/recommended resources in _finalize()
These OsinfoResourcesList objects will be leaked otherwise.
2015-02-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Add entry for 3.14
2015-02-23 Daniel P. Berrange <berrange@redhat.com>
Switch to using zanata for translations
Push new pot with
cd po
make libosinfo.pot
zanata push
Pull new translations with
cd po
zanata pull
2015-02-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
script,rhel: Specify boot partition size for < 7
Seems even RHEL 6.6 Anaconda can't handle the --recommended option of
part command so lets not use that unless its RHEL >= 7.
2015-02-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel,script: Don't specify interface
Its not guaranteed that we'll have 'eth0' available or that it will be
named 'eth0' by kernel. Since kickstart allows us not to specify the
name of the interface, lets omit that and let kickstart choose the best
device for us.
This change has only been tested against RHEL 7.0. Would probably be
best to test against 6.x too.
2015-01-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,script: Don't specify interface
Its not guaranteed that we'll have 'eth0' available or that it will be
named 'eth0' by kernel. Since kickstart allows us not to specify the
name of the interface, lets omit that and let kickstart choose the best
device for us.
2015-01-06 Daniel P. Berrange <berrange@redhat.com>
Allow tree/media elements in any order
Put all child elements for <tree> and <media> inside an
<interleave> to allow them to appear in any order
2015-01-05 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Add/update media & tree info for F21
Fedora now has variants and simply updating the ISO URLs is not a good
way forward. This patch adds information about media/tree of each
variant seperately.
Unfortunately, there is no installer media for Workstation variant and
even though Server netiso is actually generic enough to let user install
Workstation as well, both netiso and full installer ISO have the exact
same volume-id so we can't simply assign netiso a (fake) generic variant
and be done with it. :( For more details:
https://bugzilla.redhat.com/show_bug.cgi?id=1178787
schema: Allow variants for install trees
Allow install trees to be associated with specific variants of the OS.
2014-12-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Mark F21 as released
F21 was release on Dec 3, 2014. Add release date for F21 and update
release status.
2014-12-01 Lasse Schuirmann <lasse.schuirmann@gmail.com>
openSUSE: Add information on factory images
openSUSE: Add information on future versions
2014-11-14 Giuseppe Scrivano <gscrivan@redhat.com>
oses: Add RHEL Atomic 7.0
2014-11-06 Jasper Lievisse Adriaanse <jasper@humppa.nl>
Add OpenBSD 5.6
2014-11-06 Satoru Satoh <ssato@redhat.com>
Add rhel-5.9..11 and rhel-6.6 info
2014-10-14 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,rhel: Bigger boot partition
I had a RHEL VM where I got into trouble when yum wasn't able to upgrade
system as my boot partition was too small to fit new kernel image.
Kickstart format allows us to just say that we want the size to be
whatever is the recommended value so lets make use of that.
I tested against RHEL 7.0 and /boot was allocated 512MB.
2014-10-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win: Use direct HTTPS URLs to drivers
HTTP URLs we have in DB redirect to the actual HTTPS URLs. Its better to
point to the actual URL anyway (for efficiency for one) but currently
this also breaks driver download in Boxes 3.14.x as it can't handle
indirection at the moment.
https://bugzilla.gnome.org/show_bug.cgi?id=738168
2014-10-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
windows-unattend: Remove bogus architecture attribute
This was supposed to be removed when we moved this script template from
Boxes to libosinfo. I think it hasn't caused any issues so far because we
declare this attribute again soon after and probably Windows ignores the
first value and takes the last one it parses.
2014-09-25 Giuseppe Scrivano <gscrivan@redhat.com>
oses: Fix upgrades and derives-from for Ubuntu 14.04
2014-09-24 Cole Robinson <crobinso@redhat.com>
Add symlink to allow using OSINFO_DATA_DIR=$srcdir
Creates a symlink 'db' pointing to 'data'. Now If I want to test commits
to ensure osinfo-detect works, I do:
OSINFO_DATA_DIR=`pwd` ./tools/osinfo-detect
oses: Add Fedora21
This just adds a plain Fedora21 entry. F21 is going to have different
versions like 'Workstation' and 'Server' but we don't seem to distinguish
for other distros so I just stuck with the pattern here.
This currently doesn't work for detecting Workstation media, since their
volume IDs are truncated. Bug tracking that:
https://bugzilla.redhat.com/show_bug.cgi?id=1145264
2014-09-23 Cole Robinson <crobinso@redhat.com>
oses: Add Ubuntu 14.04 LTS
2014-09-22 Cole Robinson <crobinso@redhat.com>
gitignore: Ignore build-aux/compile
Which appears on f21
m4: Update manywarnings from gnulib
Fixes these noisy errors on Fedora 21:
gcc: warning: switch '-Wmudflap' is no longer supported
2014-09-17 Fabiano Fidêncio <fidencio@redhat.com>
Add a missing win8.1 i686 entry
Just replicating an x86_64 entry to the i686 volume-ids
Add more win8.1 data to DB
And replicating the x86_64 entry to the i686 volume-ids
2014-08-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.11
2014-08-19 Christophe Fergeau <cfergeau@redhat.com>
Add win2k12r2 info
Add win2k12 info
win8.1: Add missing volume id
win7: Add missing volume id
Add openSUSE 13.1 Live detection
It's relying on the iso application id data to differentiate between 32
and 64 bit versions. Different live ISOs will have a different
application ID, so this could be used to differentiate between KDE and
GNOME ISOs for example.
build-sys: Generate glib enum files in $(builddir)
Since b4c5a1b5c which introduced the generation of an osinfo_version.h
file when configure is run, the glib enum files will be regenerated
during make distcheck instead of using the one from the tarball.
osinfo/Makefile.am currently attempts to generate these files in
$(srcdir), which causes make distcheck to fail as it makes $(srcdir)
read-only.
This patch makes sure these files are generated in $(builddir) and that
they are cleaned up afterwards.
2014-08-16 Lasse Schuirmann <lasse.schuirmann@gmail.com>
debian: Add needs-internet flag to JEOS script
Maybe it is possible to avoid the need of an internet connection in this
script but in the current version debian will notify the user with a
"bad archive mirror" message if the connection is not present. This
question seems not to be meant to be preseeded and I don't know a way
to do it.
debian: Allow empty passwords
This uses the same workaround as the Fedora express installation script.
If an empty password is given, the password is set to a dummy password
to prevent the installer from erroring out and deleted later.
debian: Better resources for wheezy
We currently specify recommended RAM for wheezy to be 512MiB and storage
to be 5.4GB. Given that the user might not only want to install a bare
system but also do something with the system 20GB of disk space and 1GiB
of RAM are a reasonable amount. Furthermore the debian desktop express
installation script will fail with less than about 15GB or so.
2014-08-12 Giuseppe Scrivano <gscrivan@redhat.com>
syntax-check: fix warning
osinfo/osinfo_install_script.c:1333:can not
maint.mk: undesirable word sequence
2014-08-11 Lasse Schuirmann <lasse.schuirmann@gmail.com>
debian: Add desktop installation script
This script needs an internet connection because it seems not possible
to install the desktop that is present on the ISO.
Choosing the 'desktop' package always installs GNOME which is not always
shipped with the ISO hence is fetched from the internet.
More info: https://wiki.debian.org/tasksel#Desktop_environment
install-script: Add needs-internet param
Add API to query install scripts whether they can work properly without
an internet connection or not.
debian: Fix JEOS installation script
grub-installer does not accept the boot device unless given after a
certain command.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666974 for more
info.
2014-08-06 Giuseppe Scrivano <gscrivan@redhat.com>
rhel7: set resources for ppc64
At least 2 GiB of memory are needed by the Anaconda installer.
https://access.redhat.com/articles/rhel-limits
cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests
Avoid the usage of atoi and atof which are believed to be not safe, as
they don't do any error reporting.
cfg.mk: enable and fix sc_space_tab
It checks that tab indentation is not used together with white spaces
indentation.
cfg.mk: enable more syntax-check tests
maint.mk: update from gnulib
2014-08-06 Fabiano Fidêncio <fidencio@redhat.com>
win7: Add one more volume ID to DB
2014-08-01 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
install-script: Default to DISK injection method
If script does not declare an injection method, assume DISK as every
script must at least support one injection method and there is no need
to require scripts to always explicitly declare supported injection
methods.
2014-07-29 Roman Bogorodskiy <bogorodskiy@gmail.com>
freebsd: drop ISO info
Apparently, FreeBSD ISOs have the same metadata for every
version, so it's not possible to distinguish releases.
Drop this information from OS data to avoid ambiguity in version
detection.
2014-07-28 Roman Bogorodskiy <bogorodskiy@gmail.com>
Add FreeBSD 9.3
EOL info obtained from http://www.freebsd.org/security/security.html.
2014-07-28 Giuseppe Scrivano <gscrivan@redhat.com>
Update RHEL7 status and add ISOs info
Add CentOS 7.0
Add CentOS 6.5
2014-07-11 Lasse Schuirmann <lasse.schuirmann@gmail.com>
debian: Assume defaults for l10n & disk
This introduces default values so that no questions are asked if
localization or target disk are not given or 'C'.
2014-06-05 Jasper Lievisse Adriaanse <jasper@humppa.nl>
OpenBSD supports virtio net/disk
Fix typo for FreeBSD
There's a small typo in an XML comment.
2014-06-05 Giuseppe Scrivano <gscrivan@redhat.com>
osinfo_loader: avoid multiple calls to OSINFO_ENTITY
osinfo_loader: do not use xpath to read localized strings
osinfo_loader: replace some xpath queries with direct data access
osinfo_loader: introduce a compiled xpaths cache
entity: use g_hash_table_replace instead of remove+insert
2014-06-04 Giuseppe Scrivano <gscrivan@redhat.com>
enforce bracket spacing with a syntax rule
The build-aux/bracket-spacing.pl script was copied from libvirt.
osinfo: fix spacing to satisfy sc_bracket_spacing_check
tools: fix spacing to satisfy sc_bracket_spacing_check
test: fix spacing to satisfy sc_bracket_spacing_check
osinfo_loader: don't wrap return value with parentheses
2014-05-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
docs: Add missing docs links from main docs page
2014-05-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
install-config: Document hostname limitations
Since Microsoft Windows has several limitations on allowed characters and
number of characters in ComputerName (which is what hostname is
translated to), lets inform the app developers about these limitations.
http://technet.microsoft.com/en-us/library/ff715676.aspx
2014-05-16 Giuseppe Scrivano <gscrivan@redhat.com>
openbsd: add missing 5.* releases
2014-05-14 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7,installer: 'EN-GB' not supported as UI language
Apparently 'EN-GB' is not supported as UI language but only as locale by
win7 installer. Lets override 'EN-GB' to 'EN-US' for UI language so
unattended installation doesn't break on EN-GB locale.
http://www.wincert.net/forum/topic/9550-add-en-gb-language-and-kb-to-autounattend/
http://technet.microsoft.com/library/dd744369%28WS.10%29.aspx
2014-05-12 Jasper Lievisse Adriaanse <jasper@humppa.nl>
Update OpenBSD information and add test data
2014-04-24 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7: Put pro n sp1 regex under correct architecture
In commit 39f22d2 (win7: Generalize volume-id for professional), I
generalized the regex of windows 7 professional to include N SP1 but I
ended up adding the regex for both i386 and x86_64 architectures under
i386.
This patch fixes that.
2014-04-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7: Generalize volume-id for professional
Generalize volume-id to include 'N SP1' variant.
2014-04-16 Cole Robinson <crobinso@redhat.com>
Export OSINFO_*_VERSION values
There isn't any to get the version number when using libosinfo from
python. Export the VERSION macros, similar to what gtk does.
2014-04-14 Cole Robinson <crobinso@redhat.com>
freebsd: 10.0 is released, and supports virtio
dates from: http://www.freebsd.org/security/
virtio support from: http://www.freebsd.org/cgi/man.cgi?query=virtio&sektion=4
And the fact that the gnome 3.12 freebsd image requires it.
2014-04-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Add testcase for a 6.5 ISO
2014-03-26 Cole Robinson <crobinso@redhat.com>
windows: Add some win7 and vista volume IDs
These are from DVD media I snagged off MSDN years ago. Unfortunately
I renamed them a long time ago and I don't know the original file
names, hence the generic 'unknown' in the test data names.
Update .gitignore
It was missing mageia.xml. Ignore all xml files from data/oses as they will
be generated from .xml.in files in order to integrate translations.
Based on a patch from Cole Robinson.
2014-03-20 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.10
2014-03-20 Giuseppe Scrivano <gscrivan@redhat.com>
osinfo-install-script: read config values as strings
Prefer xmlNewDocRawNode to xmlNewDocNode when the content is a raw
string.
Solves this problem:
$ osinfo-install-script rhel6.5 -c "admin-password=a&b"
error : unterminated entity reference b
2014-03-14 Christophe Fergeau <cfergeau@redhat.com>
README: Fix typo
This fixes a typo in the 'Patch submission' header
2014-03-06 Giuseppe Scrivano <gscrivan@redhat.com>
installer,rhel: Add injection method info
installer,fedora: Add injection method info
installer,windows: Add injection method info
2014-03-06 Fabiano Fidêncio <fabiano@fidencio.org>
ubuntu: Add jeos install-script (version >= 12.04)
script based on: https://github.com/clalancette/oz/tree/master/oz/auto
Co-Author: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-06 Giuseppe Scrivano <gscrivan@redhat.com>
debian: add installer script
osinfo-install-script: support --list-injection-methods
installer: Add get_injection_methods()
The API allows applications to query the available methods to inject the
script to the installation process.
2014-02-28 Giuseppe Scrivano <gscrivan@redhat.com>
README: fix mailing list URL
2014-02-21 Fabiano Fidêncio <fidencio@redhat.com>
win8.1: Disable unattended installation
When win8.1 entry was added it was mostly a c&p from a previous
version and the installer part was mistakenly also copied. Since
win8.1 unattended installation has never been tested and some people
have reported it not to work, lets disable it for now and re-enable
when we assure it works.
2014-01-26 Christophe Fergeau <cfergeau@redhat.com>
Add hypervisor data for newer QEMUs
2014-01-24 Giuseppe Scrivano <gscrivan@redhat.com>
oses: add missing "distro" element for Debian 7
2014-01-17 Ryan Lortie <desrt@desrt.ca>
Switch to using the upstream m4 macros for GObject-introspection integration.
https://fedorahosted.org/libosinfo/ticket/11
2014-01-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Uncomment installer URLs
Now that Fedora 20 is released and these URLs are valid, time to enable
this data.
win7: Add data/test for an enterprise N ISO
2014-01-07 Ryan Lortie <desrt@desrt.ca>
build: add libraries via _LIBADD, not _LDFLAGS
Make sure we use the _LIBADD variable for adding our dependencies.
Adding libraries via _LDFLAGS means that we have our libraries appearing
before the user's LDFLAGS environment variable, which is bad, because
the LDFLAGS from pkg-config could contain -L for system paths and
jhbuild sets LDFLAGS to -L${prefix}/lib so that we can find the
libraries in the user's jhbuild install path. If the system path flags
come before the user's directory then we'll get the wrong version.
Also: automake documentation says it's wrong and would actually error
out on this if it wasn't hidden behind a variable substitution.
https://fedorahosted.org/libosinfo/ticket/12
2013-12-17 Giuseppe Scrivano <gscrivan@redhat.com>
ubuntu: add Saucy Salamander
ubuntu: mark 13.04 as released
solaris: add Solaris 11
mandriva: add Mandriva Business Server 1.0
mandrake: remove wrong codename for 10.2
freebsd: add version 9.2 and 10.0
freebsd: add missing eol-date
Taken from: http://www.freebsd.org/security/
2013-12-17 Fabiano Fidêncio <fidencio@redhat.com>
opensuse: Add 13.1 information
2013-12-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.9
2013-12-16 Fabiano Fidêncio <fidencio@redhat.com>
debian: Update URL for 6 and 7
debian: fix ISO's recogntion for debian7
Debian 7 is using 7.\d.\d format of ISOs instead of the usual 7.0.\d
2013-12-15 Giuseppe Scrivano <gscrivan@redhat.com>
test: distribute test-os.xml
It fixes "make check" within a distributed tarball
build: specify the full path to libosinfo.syms
It fixes "make check" in a VPATH build
2013-12-11 Daniel P. Berrange <berrange@redhat.com>
Remove trailing blank line in test file
Add scripts for validating the libosinfo.syms file
Import two test scripts from libvirt code which validate that
all symbols in libosinfo.syms exist in the ELF binary, and
also validate the alphabetical sorting. These are hooked up
to run with 'make check'.
Sort symbols in libosinfo.syms alphabetically
We had mostly tried to sort symbols alphabetically but had screwed
up in a large number of places.
Remove non-existant osinfo_device_driver_set_signed sym
The libosinfo.syms file listed osinfo_device_driver_set_signed
which does not exist in the C code. This causes build errors
on Win32 platforms which don't tolerate non-existant symbols
2013-12-06 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7,xp: Version driver location
This is so that apps can differentiate between different versions of
drivers.
2013-12-05 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Add comment for future 6.x entries
2013-12-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
install-script,rhel: Adjust for RHEL 7
rhel: Add RHEL 7.0 info
install-script,rhel: Make it work for 'Server' variant
Apparently there is neither office suite nor 'internet-applications'
package group on (at least the first) 'Server' variant ISO and they are
not exactly needed by default on workstation/client either. User can
easily install them later if needed.
install-script,rhel: Specify installation method/source
This is the same change as we made to fedora install script in commit
d04f022cc30d03f451e27284b6311309cf1dee9f.
While installation method/source has always been mandatory, Anaconda
has ignored us not specifying it so far. Our luck runs out in RHEL 7
though, where unattended installation breaks if this is not explicitly
specified.
rhel: Add info on 6.5
2013-11-29 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7: List all variants
List all variants and map appr. medias to them.
tools: osinfo-detect prints variant
If a particular variant is matched against, osinfo-detect should print
the name of that variant rather than the OS itself.
media: Add variant info API/XML
Add:
* ability to associate media to one or more variants of the OS in the
'media' XML node. For example:
<os id="http://microsoft.com/win/7">
<short-id>win7</short-id>
<name>Microsoft Windows 7</name>
..
<variant id="starter">
<name>Microsoft Windows 7 Starter</name>
</variant>
<variant id="home-basic">
<name>Microsoft Windows 7 Home Basic</name>
</variant>
<variant id="home-premium">
<name>Microsoft Windows 7 Home Premium</name>
</variant>
..
<media installer-reboots="2" arch="x86_64">
<variant id="home-premium"/>
<iso>
..
</iso>
</media>
</os>
* API to query variants of the OS, media is associated with.
os: Add variant info API/XML
Add:
* ability to specificy various variants of an OS under the 'os' XML node.
For example:
<os id="http://microsoft.com/win/7">
<short-id>win7</short-id>
<name>Microsoft Windows 7</name>
..
<variant id="starter">
<name>Microsoft Windows 7 Starter</name>
</variant>
<variant id="home-basic">
<name>Microsoft Windows 7 Home Basic</name>
</variant>
<variant id="home-premium">
<name>Microsoft Windows 7 Home Premium</name>
</variant>
..
</os>
* API to add and query variants of an OS.
Introducing OsinfoOsVariantList
Just a OsinfoList subclass that is meant to contain Variant objects.
Introducing OsinfoOsVariant
This is a new entity class that will represent variants of an OS. For
example professional, enterprise and ultimate editions of Windows OSs
and workstation and server variants of RHEL etc.
2013-11-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Add generic entry for future releases
This is to ensure that we do recognise medias of future (pre-)releases of
Fedora and therefore give apps some clue about what they are dealing
with and some rough estimate of required resources.
gnome: Add info for gnome-continuous 3.12
gnome-continuous is continuous integration system so images produced by
it track the git master of all modules and now that GNOME 3.10 is out and
many projects have branched for 3.10 maintainance, these images are
already 3.12 (3.11 at the moment but thats splitting hair I guess).
2013-11-26 Christophe Fergeau <cfergeau@redhat.com>
Add testcase for loading OS XML
There was no test testing that OS XML data is correctly loaded. This test
is also an opportunity to test the various ways of representing a boolean
in XML.
2013-11-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add release status info to OS entries
Applications can use this to determine if an OS is an actual released
OS, a pre-release or a development snapshot.
Co-author: Christophe Fergeau <cfergeau@redhat.com>
2013-11-13 Christophe Fergeau <cfergeau@redhat.com>
Fix warnings in OsinfoLoader boolean support
I always build with -O0, which sometimes makes me some warnings. The newly
introduced boolean support in OsinfoLoader triggers some warnings when building with the
default flags:
osinfo_loader.c: In function 'osinfo_loader_boolean':
osinfo_loader.c:200:255: error: return makes integer from pointer without a cast [-Werror]
g_return_val_if_fail(ctxt != NULL, NULL);
^
osinfo_loader.c:201:257: error: return makes integer from pointer without a cast [-Werror]
g_return_val_if_fail(xpath != NULL, NULL);
^
osinfo_loader.c: In function 'osinfo_loader_entity.isra.8':
osinfo_loader.c:331:48: error: 'value_bool' may be used uninitialized in this function [-Werror=maybe-uninitialized]
osinfo_entity_set_param_boolean(entity, keys[i].name, value_bool);
Stop using <foo>true</foo> in libosinfo database
libosinfo can now parse <foo/> as an alternative to <foo>true</foo> to
represent a boolean. As the former is the preferred representation, switch
to using this in the data libosinfo ships.
Teach osinfo_loader_entity() how to parse booleans
We want to support both <foo>true</foo> and <foo/> to specify booleans. Now
that osinfo_loader_entity additional keys have type information, we can
use a dedicated boolean parser for boolean keys.
Add type info to osinfo_loader_entity() 'key' argument
When using 'string(./foo)' as an XPath query, if foo does not exist, an
empty string ("") will be returned. Thus osinfo_loader_string() ignores
empty strings during parsing. This happens during regular parsing as we try
to lookup string(./foo[lang(XX-xx)]) for localized nodes, and ignore its
result if the XPath query returns ""
However, we want to represent booleans as <foo/>. Boolean values are
currently parsed using osinfo_loader_string(). Parsing <foo/> as a string
would return an empty string. This means such nodes would be ignored as the
current parser is not able to make the difference between an existing node
with empty content and a non-existing node.
By associating type information to the additional keys we want
osinfo_loader_entity() to parse, we'll be able to indicate which values are
booleans, and to parse them accordingly.
2013-11-06 Christophe Fergeau <cfergeau@redhat.com>
Allow to pass a NULL 'keys' argument to osinfo_loader_entity()
Some callers don't want to pass in any additional keys, and would have to
resort to build a dummy empty key list to pass to osinfo_loader_entity().
It's better to allow for that 'keys' argument to be NULL and have
osinfo_loader_entity() deal with it.
2013-10-16 Fabiano Fidêncio <fabiano@fidencio.org>
win7: Add another win7 ISO data
configure: Fix mailing list address
2013-10-15 Christophe Fergeau <cfergeau@redhat.com>
Add mageia ISO data
2013-10-11 Giuseppe Scrivano <gscrivan@redhat.com>
Fix RHEL 5.8 data
2013-10-07 Fabiano Fidêncio <fabiano@fidencio.org>
win8.1: Add Windows 8.1 support
This commit adds the volume IDs and test cases data for the
Windows 8.1 ISOs I have access in MSDN
2013-10-03 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post release version bump
2013-09-27 Christophe Fergeau <cfergeau@redhat.com>
Use latest warnings.m4 from gnulib
The one we were using does not work properly with clang, causing
the build process to try to use -f/-W options that are not
supported by clang.
2013-09-25 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Enable installer for Fedora 20
2013-09-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.8
Update .gitignore
windows: Use latest (0.65) version of spice-guest-tools
2013-09-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Add info about gnome-continuous 3.10 images
Unlike the previous os entries for 'gnome', that were targetted towards
Fedora-based live ISOs, this one is targetted for qcow2 (and hopefully in
future ISOs) images produced by gnome-continuous:
https://wiki.gnome.org/GnomeContinuous
http://build.gnome.org/ostree/buildmaster/images/z/current/
Would be really nice for libosinfo to be able to detect OS from images
too but that might not be feasible so at least for now apps would have
to do their own detection (perhaps through guestfs). Once OS matched to
a libosinfo's OS definition, apps can at least use libosinfo to figure
minimum/recommended resources, which devices are supported and a nice
default name etc to be able to create a decent/working VM given an
installed disk image.
The resources set were based on Colin Walters advice:
<zeenix> walters: hi. Would you be able to approximate min. system
requirements for 3.10 images?
<zeenix> walters: i was thinking of just copying the ones from fedora 19
(at least for now)
<walters> zeenix: offhand i'd say dual core and 1G of memory
<drago01> is llvmpipe really happy with just two cores?
<ebassi> "happy" is probably too strong
<ebassi> but it works reasonably well
<ebassi> you probably don't want to be on battery power, though
<ebassi> or, at least, you won't be for long if you do
<drago01> ok
2013-09-12 Fabiano Fidêncio <fidencio@redhat.com>
Fix "propfile" typo in osinfo-install-script.c
2013-09-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Sync 3.8 min. requirements with F19
Also remove comment about copying from F17/18 as 3.8 inheriting from F19
is indication enough of the relationship.
fedora: Add data about F20
Its mostly just (edited) copy&paste of F19 data.
fedora: More correct/appr. system reqs for F19
These values are based on F19 docs:
http://fedorapeople.org/groups/docs/release-notes/en-US/sect-Release_Notes-Welcome_to_Fedora_.html#hardware_overview
Unfortunately the docs do not specify any recommended resources so this
patch also removes the made-up recommended resources info. Apps
will have to figure those on their own, perhaps based on mininum
resources.
2013-09-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Link 3.8 to Fedora 19
GNOME 3.8 is more alike & related to Fedora 19 than it is to GNOME 3.6,
so we better specify that it inherits from that.
fedora: Fix version of F19 media trees
fedora: Uncomment media info about F19
Uncomment some info that was supposed to be uncommented after release of
F19 but got forgotten. Also correct URLs of live ISOs.
2013-09-09 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
build: Fix build against latest intltool
The use of IT_PROG_INTLTOOL and AM_GNU_GETTEXT together is not
supported anymore apparently.
Without this change you'll get this error at the end of configure script
run:
config.status: error: po/Makefile.in.in was not created by intltoolize.
2013-09-06 Eric Blake <eblake@redhat.com>
build: avoid missing file on parallel build
Fabiano Fidêncio reported a case where make failed due to one
generated file not existing in time for the generation of the
other:
GEN osinfo_enum_types.c
Can't open ./osinfo_enum_types.h: No such file or directory at /usr/bin/glib-mkenums line 296, <> line 3630.
* osinfo/Makefile.am (osinfo_enum_types.c): Add dependence on .h file.
2013-08-28 Christophe Fergeau <cfergeau@redhat.com>
Don't install private headers
Export more missing symbols
All these symbols are present in the public headers but not listed
in libosinfo.syms.
They were found using abi-compliance-checker by
comparing one build where the use of the .syms file is disabled (all
non-static functions get exported), and one regular build.
Move osinfo_install_script_add_config_param to private header
When this method was added, we forgot to add it to the .sym file.
It's meant to work with the osinfo_install_script_*_config_param()
API, but these methods are not really consistent with the rest of
libosinfo API, they belong in an OsinfoInstallConfigParamList class
which was added in 789adb2a.
We could decide to export this method, but since noone should have
been able to use it, it's better to not export it now, and have one
less deprecated method in our ABI.
2013-08-27 Christophe Fergeau <cfergeau@redhat.com>
Export more missing OsinfoProduct symbols
They were listed in public header files, but not exported in
libosinfo.syms.
2013-08-27 Giuseppe Scrivano <gscrivan@redhat.com>
Export the symbol osinfo_product_get_codename
2013-08-13 Daniel P. Berrange <berrange@redhat.com>
Remove deprecated SOUP_TYPE_PROXY_RESOLVER_GNOME
2013-08-13 Alexey Shabalin <a.shabalin@gmail.com>
Add ALTLinux support
2013-07-29 Marcus Karlsson <mk@acc.umu.se>
freebsd: Add OS info for FreeBSD 9.1
freebsd: Add OS info for FreeBSD 8.4
freebsd: Add OS info for FreeBSD 8.3
2013-06-06 Christophe Fergeau <cfergeau@redhat.com>
Add hypervisor data for newer QEMUs
2013-06-03 Christophe Fergeau <cfergeau@redhat.com>
Fix ubuntu 11.10 detection
The ISO system ID is not set to LINUX on these ISOs but is empty
Adjust ubuntu URLs
Some older releases have been moved from http://releases.ubuntu.com
to http://old-releases.ubuntu.com
Add test case for win2k8r2 ISO
Add volume id for Windows 7 Enterprise N SP1
2013-05-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.7
2013-05-09 Fabiano Fidêncio <fidencio@redhat.com>
debian,test: Add OS info/testcase for Debian 7.0.*
2013-04-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora: Specify installation method/source
While installation method/source has always been mandatory, Anaconda has
ignored us not specifying it so far. Our luck runs out in Fedora 19
though, where unattended installation breaks if this is not explicitly
specified.
I'm not sure if hard coding the method is a good idea though. Ideas?
2013-04-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Add data for GNOME 3.8
Its mostly just adjusted copy&paste of 3.6 data. The actual live media
is not yet available for 3.8 itself but for 3.7.91/2 they are available
and people have been using them already so better add some info already
so those ISOs are recognized at least.
Before anyone asks, the 3.7.91/2 ISOs use the same volume ID as it will
be on 3.8 ISO.
2013-04-18 Christophe Fergeau <cfergeau@redhat.com>
ubuntu: Add 13.04 ISO data
It's unreleased yet, but should make testing in VMs easier.
ubuntu: Add 12.10 test data
fedora: Add Fedora 19 Alpha detection
This adds recognition of F19 Alpha ISO to libosinfo database.
As VMs are often used to test pre-releases of OSes, having libosinfo
detection for such ISOs early in the distro development process is
a nice thing to have.
2013-04-14 Fabiano Fidêncio <fidencio@redhat.com>
rhel,fedora: Add kickstart commandline
installer: API to generate commandline info
Each OS has a specific method to handle unattended installations.
To start an unattended installation one needs to pass a command line to
the kernel.
This API enables apps to query such command line, if any.
2013-04-12 Fabiano Fidêncio <fidencio@redhat.com>
rhel,installer: Change RHEL's install script expected filename
Although Kickstart doesn't care about the script filename, once the path
to the file is correct, let's use the correct distribution name as
expected filename.
Fix "FASLSE" typo in osinfo_install_script_get_can_pre_install_drivers() API doc
2013-04-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
(Very late) post-release version bump
2013-04-09 Fabiano Fidêncio <fidencio@redhat.com>
Update .gitignore
test: Add testcase for Fedora 18
test: Add testcase for Fedora 17
centos,test: Add OS info/testcase for CentOS 6.4
centos,test: Add OS info/testcase for CentOS 6.3
centos,test: Add OS info/testcase for CentOS 6.2
centos,test: Add OS info/testcase for CentOS 6.1
centos,test: Add OS info/testcase for CentOS 6.0
rhel,test: Add OS info/testcase for RHEL 6.4
fedora,rhel,installer: Don't use "--activate"
This option doesn't work with RHEL < 6.1 and the documentation
(http://fedoraproject.org/wiki/Anaconda/Kickstart#network) says
'Device of the first network command is activated if network is required,
e.g. in case of network installation or using vnc.'
2013-04-09 Daniel P. Berrange <berrange@redhat.com>
Auto-generate AUTHORS file from GIT logs
Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs
2013-04-09 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
installer,win7: Setup user avatar for desktop profile
While I failed to find a way to setup avatar for the user we create, I
did find this method to setup avatar for admin. Since we setup our user
as admin, this in the end means the same as setting up user's avatar.
2013-04-08 Daniel P. Berrange <berrange@redhat.com>
Disable static libraries by default
Every source file is currently built twice by libtool, once for
the shared library and once for the static library. Static libs
are not commonly packaged by distros and slow down compilation
time by almost 100% compared to a shared-only build time.
Time for non-parallel make
shared only: 22 secs
shared + static: 40 secs
Those few people who really want them, can pass --enable-static
to configure
Disabling them by default requires use of LT_INIT. We don't need
to support older libtool, so drop use of AM_PROG_LIBTOOL entirely.
Also add the 'win32-dll' flag, since that should have been there
already
2013-04-08 Christophe Fergeau <cfergeau@redhat.com>
build: Make sure $(pkgdatadir)/db exists
When creating symlinks to usb.ids/pci.ids, we assume the
destination directory already exists. However, this assumption
could very well break during parallel builds if we try to create
the symlinks before anything create the db/ directory. This commit
creates it explicitly as part of the symlink rule to avoid any
potential issue.
Issue pointed out by Samuli Suominen <ssuominen@gentoo.org>
build: Use $(MKDIR_P) rather than mkdir -p
Add osinfo_platform_get_all_devices() documentation
Use 'unsigned int' rather than enum type for flag param
Setting an enum variable to a value that is not part of the enum
(as will happen when passing a bitwise-or flag param to
osinfo_product_foreach_related) is undefined behaviour in C.
Add osinfo_product_foreach_related() documentation
It's not exported, but API doc never hurts.
Fix relations that osinfo_platform_get_all_devices follows
We want to consider both platforms that are upgraded from
(qemu 1.2.0 -> qemu 1.2.1) and derived from
(qemu 1.2.0 -> qemu-kvm 1.2.0). Should have been part of commit
da20e3a
2013-04-03 Christophe Fergeau <cfergeau@redhat.com>
Implement osinfo_platform_get_all_devices()
Implement osinfo_os_get_all_devices() with osinfo_product_foreach_related()
Add osinfo_product_foreach_related()
This method iterates over all products that are related to a
given product. This will be useful to implement
osinfo_platform_get_all_devices().
2013-03-29 Christophe Fergeau <cfergeau@redhat.com>
Replace tab with space
Fixes make syntax-check
Add Andreas to AUTHORS
Use g_getenv() instead of getenv()
It's likely to be more portable
Fix a few string leaks
2013-03-27 Christophe Fergeau <cfergeau@redhat.com>
build: Try to remove symlink before trying to create it
Symlink creation fails if a file/symlink with the same name already
exists. This causes issues when installing in a tree where libosinfo
was already installed.
build: More portable symlink creation
Follow the recommendations from
http://www.nondot.org/sabre/Mirrored/autoconf-2.12/autoconf_4.html#IDX111
regarding symlink creation.
2013-03-27 Andreas Henriksson <andreas@fatal.se>
build: Take DESTDIR into account when creating symlinks
2013-03-25 Christophe Fergeau <cfergeau@redhat.com>
Fix 'retreives' typo in osinfo_os_get_all_devices API doc
2013-03-22 Christophe Fergeau <cfergeau@redhat.com>
Add openSUSE data
ISO information by courtesy of Frédéric Crozat <fcrozat@suse.com>
2013-03-18 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.6
2013-03-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
installer: API to query device driver signing requirement
Some OS vendors recommend or require device drivers to be signed by them
before these device drivers could be installed on their OS. This
recommendation/requirement then also applies to the installer scripts of
that particular OS.
This API enables apps to query such requirement/recommendation, if any.
install-config,winxp,win7: API to enable/disable driver signing
While I thought that I had solved the problem of Windows requiring
signed device drivers and QXL driver being unsigned, I could't be more
wrong:
* The registry key magic I used for disabling driver signature checks
on XP seems to be far from reliable. I tested it many many times but
on a weird broken version of XP home edition that I can't seem to
have access to anymore. I now tested against both home and professional
editions both with and without this registry key magic and I observed
the same result in both cases: Drivers do get installed but they remain
unused by the OS after installation. The only reliable way of
effectively disabling signture checks during installation is through
the 'DriverSigningPolicy' option in .sif file, which means disabling
signature checks permanently.
* On Windows 7, disabling integrity checks and test signing after
drivers' installation disables the already installed drivers too if
they are not signed.
* The reason I thought QXL was functional at first was that automatic
resolution setting was working. Turns out that unlike on Linux, on
windows automatic resolution setting only requires spice-vdagent where
as QXL is only required for arbitrary resolutions.
So to make QXL working out of the box, I'm afraid we don't have any
choice but to disable driver signature checks permanently. Since
signature checks is a security measure from vendors, we need to leave
it to applications to decide whether they want to do this or not.
API to query signed status of device drivers
Some OS vendors recommend or require device drivers to be signed by them
before these device drivers could be installed on their OS. An API to
query signed status of the device driver will be useful for apps to be
able to make a decision whether they want to use the driver or not.
Later patches add API for querying signature requirements from a script
and to possibly disable these checks.
2013-03-14 Christophe Fergeau <cfergeau@redhat.com>
Don't ignore vendor/device name in pci/usb id parser
These values were parsed but ignored using ignore_value(), leading
to very incomplete device information when using pci.ids/usb.ids.
As generally this data comes from <device> nodes in
libosinfo database, which takes precedence over
the pci.ids/usb.ids data, this bug is not visible without removing
the additional <device> data from the osinfo database.
2013-03-12 Christophe Fergeau <cfergeau@redhat.com>
Remove FSF address from source file headers
The FSF moved a while ago which made the address we use in every
source file header invalid. Follow the recommendation from
http://www.gnu.org/licenses/gpl-howto.html and don't put any address
in these headers, just a link to the fsf website.
2013-03-06 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post-release version bump
2013-03-05 Christophe Fergeau <cfergeau@redhat.com>
spec: Don't require udev on newer distros
96c66b8 disabled building of the udev rule on newer Fedoras, however
the .spec still has a Requires: udev, which is not relevant
when the udev rule is not built.
Allow to use system pci.ids/usb.ids files
Most distros already ship copies of pci.ids/usb.ids. This commit
allows to make use of these rather than the ones shipped with
libosinfo. This is achieved through the use of
--with-usb-ids-path and --with-pci-ids-path configure flags.
2013-03-05 Cole Robinson <crobinso@redhat.com>
spec: Add explicit dep on pod2man
pod2man used to be in the default Fedora build root, but that's
changed in current rawhide.
The containing package is perl-podlators, but since that package
doesn't exist on F18 and earlier, it's easiest just to depend on
the needed binary.
2013-03-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.5
2013-03-04 Christophe Fergeau <cfergeau@redhat.com>
Add identification data for win7sp1 checked build
Data kindly provided by Alon Levy.
2013-03-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Use complete IDs of installer scripts
This fix combined with previous 2 patches enable apps to create
unattended installation for Windows 8.
win7,installer: Adapt for Windows 8
Win8 seems to require Microsoft-Windows-Setup/UserData/ProductKey/Key to
be set, which seems to be exclusive with using
Microsoft-Windows-Setup/ImageInstall/OSImage/InstallFrom/MetaData (or at
least some care needs to be taken when using both together). As letting
the Windows installer decide on which OSImage to use from the product key
rather than hardcoding use of the first OSImage on the ISO seems more
robust, we switch from InstallFrom installation image selection to
ProductKey installation image selection.
Co-author: Christophe Fergeau <cfergeau@redhat.com>
installer,win7: Require product key
It turns out that windows installer media can have multiple products and
product key is one of the ways for windows to choose which product to
install. In case of Windows 8, unattended installation breaks if a
product is not choosen as part of autounattend.xml file.
Since we already require product key for windows XP and we'll use this
same script for Windows 8 too, its not too bad to start requiring this
for Windows 7 as well.
Also, the product key will be used to automatically activate the Windows
copy during unattended installation rather than requiring the user to do
it him/herself at most 30 days after installation.
Moreover, the following patch that removes /IMAGE/INDEX, will break
unattended install without a product key in place.
Co-author: Christophe Fergeau <cfergeau@redhat.com>
2013-03-01 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
installer,win7: Use post-installation script
Launch post-installation setup file, windows.cmd at the end of Windows 7
installation as well.
This combined will previous patches in this series, enables out of the
box installation of virtio, and QXL drivers and vdagent for apps making
use of our post-installation drivers API (currently only Boxes).
installer,win7: Adapt windows-cmd.xml for Windows 7
On Windows 7, we need to make use of integrated bcdedit.exe to enable
test signing and disable integrity checks before we could attempt to
install (possibly) unsigned drivers. We use the same app to disable test
signing and enable integrity checks after installing drivers.
Since bcdedit.exe does not exist in Window XP, we don't use it on that
OS. Moreover, since the registry key manipulation on Windows 7 does not
help anything, we better not fiddle with those on Windows 7 as doing so
is always discouraged.
Also since the certutil.exe thats used by driver's .cmd file to add
driver publisher to trusted list does not exist on Windows XP, we have to
continue resorting to registry fiddling to enable installation of drivers
from untrusted publishers for Windows XP.
While we are talking about win7, you'll note that the checks are for
vista (6.0 rather than 6.1). This is because the same changes will also
be most probably needed for vista:
http://www.overclock.net/t/187919/how-to-disable-driver-signature-enforcement-in-vista
2013-02-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7,winxp: Add new driver files of virtio/QXL drivers
These are publisher certificates that the driver's .cmd file use to
silence Windows 7 installer warning about untrusted publisher. Obviously
such a warning dialog that requires user interaction breaks unattended
installation for apps.
Although these are (at least currently) redundant for Windows XP, we
better list them for completion/consistency.
2013-02-25 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
installer,windows: Use '/c' option of cmd.exe
Use '/c' option of cmd.exe instead of '/k' as that apparently keeps the
process running (at least on windows7) and any commands after the loop
never gets executed.
TBH I'm a bit confused about '/c' vs '/k' option and the docs don't
help: http://technet.microsoft.com/en-us/library/bb490880.aspx#EBAA
What I know for certain is that without this change, Windows 7 installer
just hangs with an empty cmd.exe window open forever at the end of
installation. Also I have tested that this change doesn't break this
script for Windows XP.
installer,windows: Minor indentation fixes
2013-02-22 Daniel P. Berrange <berrange@redhat.com>
Add pod2man dep to mingw-libosinfo.spec.in
Fixes to mingw RPM spec from Fedora
Remove the .la files.
Remove the man pages
2013-02-21 Daniel P. Berrange <berrange@redhat.com>
Formalize architecture names to align with libvirt
The libosinfo database is using a arbitrary unchecked mix of
architecture names. Libvirt has defined a canonical set of
architectures, so copy that across to the RNG schema and then
update the data to match.
The main change is that i386, i486, i586, all merge to just
i686, since in practice these differences haven't mattered
for at least 15 years now.
The 'hppa' arch for Ubuntu images is changed to 'parisc'.
2013-02-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.4
2013-02-19 Christophe Fergeau <cfergeau@redhat.com>
spec: Disable udev rule on newer Fedoras
Changes in udev > 197 and libblkid > 2.22.2 have made this rule obsolete.
2013-02-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add forgotten ignore-value.h to build
Fixes `make distcheck`
2013-02-18 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
winxp,installer: Make use of post-installation drivers
winxp,win7: Add virtio & QXL device drivers info
Add an all-in-one virtio and QXL device driver setup binary to Windows
XP and 7. This needs to be listed separately from virtio block driver as
not all of these are pre-installable.
Same binary also installs spice-vdagent for us.
winxp,installer: Log post-install commands
Redirect stdio and stderr of post-install commands to a file on target
disk. We put it in 'c:\windows' because thats where windows puts its own
installation log files.
2013-02-11 Christophe Fergeau <cfergeau@redhat.com>
Use gnulib's ignore-value.h to silence gcc
osinfo_loader.c contains a few local hacks to avoid gcc warnings
about set-but-not-read variables. While they are good to silence
gcc, they also cause warnings from the Coverity checker.
Use the ignore_value() macro from gnulib to avoid these warnings
as they don't cause Coverity warnings.
2013-02-11 Cole Robinson <crobinso@redhat.com>
osinfo-detect: Fix segfault with non bootable media
With a movie DVD in my drive:
$ osinfo-detect -f env /dev/cdrom
OSINFO_BOOTABLE=0
** (osinfo-detect:24211): CRITICAL **: osinfo_db_identify_media: assertion `OSINFO_IS_MEDIA(media)' failed
(osinfo-detect:24211): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)
We weren't exiting after detecting the media as non bootable.
https://bugzilla.redhat.com/show_bug.cgi?id=901910
.gitignore: Add latest hypervisors and oses
install-script tool: Fix compiler warning
osinfo-install-script.c: In function 'main':
osinfo-install-script.c:245:19: error: 'dir' may be used uninitialized in this function [-Werror=maybe-uninitialized]
osinfo-install-script.c:196:12: note: 'dir' was declared here
And add me to AUTHORS to appease syntax-check
2013-02-11 Christophe Fergeau <cfergeau@redhat.com>
spec: Switch URL to libosinfo.org
Now that libosinfo has an official website, let's point the .spec
at it.
2013-02-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
winxp,installer: Don't assume script disk is specified
Declare that script optionally uses script disk if specified and hardcode
a fallback for the case when its not specified.
install-script tool: Display names of generated files
Also add a commandline option (-q/--quiet) to disable this behavior.
Add Marc-André to AUTHORS
Fixes `make syntax-check`
install-script tool: Take GFile creation out of the loop
Also, unref the GFile when done.
2013-01-31 Christophe Fergeau <cfergeau@redhat.com>
Remove unused 'priv' variable from _init methods
In most instance _init() methods, the instance priv member
is initialized, but a local 'priv' variable was also declared and
assigned, but not actually used. Kill this intermediate variable
as this causes Coverity warnings.
Add QEMU/QEMU-KVM hypervisor data
2013-01-22 Michal Privoznik <mprivozn@redhat.com>
Don't redefine _FORTIFY_SOURCE macro
If the _FORTIFY_SOURCE has been already defined, we unconditionally
redefine it, leaving us with warning/error thrown at compilation time.
2013-01-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
openSUSE: Correct C&P mistakes in volume IDs
2013-01-21 Marc-André Lureau <marcandre.lureau@redhat.com>
build-sys: g_type_init() is deprecated in 2.36
2013-01-15 Daniel P. Berrange <berrange@redhat.com>
Update RPM specs to include datamaps & locale files
2013-01-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
gnome: Add release date
Post-release version bump
2013-01-14 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.3
Fix `make syntax-check`
* Add Yuri Chornoivan to AUTHORS file.
* Remove osinfo/osinfo_install_config.c from translated sources.
test: Distribute test DB data
build: Add forgotten header file
2013-01-11 Daniel P. Berrange <berrange@redhat.com>
Add ability to list install script config params & profiles
When using 'osinfo-install-script' it is useful to know what
profiles and config parameters are available. Add two new
flags --list-configs and --list-profiles to output this
information
# osinfo-install-script --list-profiles win7
desktop: autounattend.xml
jeos: autounattend.xml
# osinfo-install-script --list-config winxp
admin-password: optional
user-realname: required
reg-product-key: required
2013-01-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,installer: Adapt desktop script to F18
Package groups have changed in Fedora 18 yet again. This patch makes the
desktop profile script work against Fedora 18 without breaking it against
older releases.
2013-01-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,installer: Don't drop 'base' package group
In commit e625641, we dropped 'base' package group from destkop profile
script thinking that this essential package is pulled as dep by other
groups. This turned out to be not true and Fedora 18 documentation states
that this package must be explicitly requested.
So instead, we now do the same as we do in jeos profile: Use 'standard'
group if dealing with >= F18, 'base' otherwise.
2013-01-10 Daniel P. Berrange <berrange@redhat.com>
Apply datamap to config parameters when generating install script
When creating the XML to use in the install script XSL transform,
apply any datamap associated with the config parameters.
2013-01-09 Daniel P. Berrange <berrange@redhat.com>
Revert "Add OsinfoInstallConfig:config-params property"
This reverts commit 36e5364c1a3e67f8656bfd2db570717b5d2e6e15.
Revert "OsinfoInstallConfig: Use config-params if set"
This reverts commit 72f00ce4673d1f3cc18f8dddd73f75a2a05a306a.
Revert "Add osinfo_install_config_new_for_script"
This reverts commit 82784b5f446e2b0cc47704df6ebddff804b4b667.
Revert "Set OsinfoInstallConfig:config-params in osinfo_install_script_apply_template"
This reverts commit 04f95d473865ed257a4d98a9f0ca17cdee3900f3.
Revert "Use OS-specific config in OsinfoInstallScript"
This reverts commit 99beb54c7b9a0cfa6285fb2988ed93c406c452a3.
2013-01-09 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add install script for RHEL 6.x
The same script might work for other RHEL 6.x too but I have only tested
it against RHEL 6.3 for now. Still some issues though:
1. For some reason user's avatar is ignored although according to the docs
I could find*, copying the avatar to /home/${USER}/.face should be
enough.
2. We don't set the keyboard layout properly yet and just hardcode it to
'us'. This will require the same kind of mapping as Fedora 17 and older.
* http://projects.gnome.org/gdm/docs/2.14/configuration.html
rhel: Specify resources for all RHEL 6 releases
2013-01-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7: Use a datamap for GETTEXT to ISO language mapping
Lets make use of new datamaps to map GETTEXT language codes (that
libosinfo expect from apps) to ISO language codes (that Windows
expects).
fedora: Use a datamap for GETTEXT->X11 layout mapping
Lets make use of new datamaps to map GETTEXT language codes (that
libosinfo expect from apps) to X11 keyboard layout codes (that Fedora 18
expects).
install-config: Drop support for encoding in l10n params
This doesn't just simplify existing scripts but will also make it easier
to port these l10n mapping to datamaps.
install-config: Correct docs about lang string format
We don't really support variants in language/keyboard specifier strings
so lets not claim its support in the docs.
install-config: Correct default keyboard layout
After commit 35a87594, format of keyboard layout string is the same as
the language.
2013-01-07 Yuri Chornoivan <yurchor@ukr.net>
debian,macos: Fix typos in OS names
2013-01-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
ubuntu: Correct required/recommended resources for 12.10
This is as based on "Getting Started with Ubuntu 12.10 - Ubuntu Manual"
(page 11 in en_US version).
2013-01-04 Fabiano Fidêncio <fabiano@fidencio.org>
opensuse: Add 12.2 information
opensuse: Fix .iso URLs
debian: Update volume-id for Squeeze
2013-01-02 Fabiano Fidêncio <fabiano@fidencio.org>
opensuse: Fix kernel & initrd paths
2013-01-02 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
l10n: Add forgotten file to POTFILES.in
Add forgotten osinfo_install_config.c file to po/POTFILES.in.
Fixes `make check`.
win7: Use product key in desktop profile as well
Although optional, product key should be used when specifiedy by app.
Before anyone asks, yes I have tested that win7 accepts empty product
key node in installer script XML.
l10n: Merge Ukrainian from transifex
l10n: Merge Polish from transifex
configure: Use LINGUAS file
Setting ALL_LINGUAS in configure.in is obsolete according to po.m4 in
favor of LINGUAS file. This is the reason why all (as far as I can see)
GNOME modules use LINGUAS file.
Also the rule in configure.ac creates broken Makefile if there is more
than one translation files:
[zeenix@z-laptop libosinfo]$ make
Makefile:166: *** missing separator. Stop.
[zeenix@z-laptop libosinfo]$ head -n 166 Makefile|tail -n 2
ALL_LINGUAS = pl
uk
2013-01-02 Fabiano Fidêncio <fabiano@fidencio.org>
opensuse: Fix 12.1 minimum & recommended resources
According to http://en.opensuse.org/Hardware_requirements
opensuse: Add missing kernel/initrd information
opensuse: Fix indentation
debian: Fix kernel/initrd path
debian: Fix .iso URL for Squeeze
2012-12-29 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Specify kernel/initrd paths for all 6.x media
rhel: Set recommended RAM to 1G for RHEL 6.3
db: _identify_media() should also set media ID
For the new _identify_media() method to be able to easily replace
_db_guess_os_from_media() usage in apps as it intends to, it must
provide the ID of the media in the DB.
This fixes a recent regression in Boxes caused by switching to
_identify_media():
https://bugzilla.gnome.org/show_bug.cgi?id=685826#c35 (and following
comments)
Osinfo:entity is no longer construct-only
As you'll see in the following patch, we need to set ID on existing media
instances now.
rhel: Really correct minimum RAM for RHEL6
RHEL6 requires 512MB, not 256 as per documentation:
http://www.redhat.com/resourcelibrary/articles/articles-red-hat-enterprise-linux-6-technology-capabilities-and-limit
Thanks to Christophe Fergeau for pointing this one out as well.
2012-12-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Correct minimum RAM for RHEL6
According to the docs, 256MB is required minimum:
http://www.redhat.com/resourcelibrary/articles/articles-red-hat-enterprise-linux-6-technology-capabilities-and-limits
Thanks to Christophe Fergeau for pointing this out.
2012-12-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Specify min/recommended resources for 6.3
Its just a C&P from F18 and seems to work nicely in practice.
rhel: Specify kernel/initrd paths in 6.3 media
2012-12-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
rhel: Fix a typo causing infinit loops/recursion
RHEL 6.3 derives from 6.2, not 6.3 itself.
2012-12-21 Christophe Fergeau <cfergeau@redhat.com>
test: Add test for param remapping in install scripts
Use OS-specific config in OsinfoInstallScript
When generating the unattended installation script, we can now
use osinfo_install_config_get_param_list() to get OS-specific
values when available. This will only work when an
OsinfoInstallConfigParamList is associated with the
OsinfoInstallConfig being processed.
Set OsinfoInstallConfig:config-params in osinfo_install_script_apply_template
This allows translation of generic config to OS-specific config if
the install script XML specified some datamaps to transform these
parameters.
Add osinfo_install_config_new_for_script
In order to be able to automatically transform configuration parameters set
on OsinfoInstallConfig instances (ie translate from generic value to
OS-specific value), we need to have access to the
OsinfoInstallConfigParamList for the current OsinfoInstallScript as
this is where the OsinfoDatamaps needed to do the remapping are stored.
After the previous commits we can now associate an
OsinfoInstallConfigParamList with an OsinfoInstallConfig instance,
and we can get the OsinfoInstallConfigParamList corresponding to
an OsinfoInstallScript instance, so this commit just adds a new
osinfo_install_config_new_for_script which will create a new
OsinfoInstallConfig instance associated with the
OsinfoInstallConfigParamList for a given installation script.
OsinfoInstallConfig: Use config-params if set
Now that OsinfoInstallConfig has a 'config-params' property
which describes the config parameters when it's set, we can
use it when it's available. OsinfoInstallConfigParams can indeed
contain a datamap to be used to translate generic libosinfo values
to OS-specific values.
This commit introduces an osinfo_install_config_get_param_value_list
method that will be used in subsequent commits to get these
OS-specific values when generating install scripts.
2012-12-20 Christophe Fergeau <cfergeau@redhat.com>
Add OsinfoInstallConfig:config-params property
This property lists the parameters that can be set for a given
OsinfoInstallConfig. This is not enforced, it's only there for
informative purpose. This will also be used in later commits
in order to automatically apply transformations on values
for parameters which have an associated OsinfoDatamap.
OsinfoInstallScript: Use an OsinfoInstallConfigParamList
Currently the install script config parameters are stored in a
raw GList. However, OsinfoInstallScript ends up reimplementing
part of the OsinfoList API, and the raw GList also does not make
it convenient to pass the list of config parameters around.
Replace the internal GList with an OsinfoInstallConfigParamList,
which has the side-effect of nicely simplifying the code.
Set id in osinfo_install_config_param_new
OsinfoInstallConfigParam is an OsinfoEntity, but its _new method
does not set an id when creating it. This is needed if we want
to be able to use an OsinfoInstallConfigParamList. The "name"
argument that is passed at creation time is expected to be unique,
so we can use that as the entity id even though a full URI would have
been nicer.
Add OsinfoInstallConfigParamList
loader: Parse OsinfoInstallConfigParam::value-map from XML
Add OsinfoInstallConfigParam::value-map
If set, this OsinfoDatamap value will be used to map generic
values to OS-specific values.
docs: Small improvements to API doc
Improve the (short) description of the OsinfoInstallConfigParam and
OsinfoInstallScript classes.
docs: Improve osinfo_install_config_new API doc
It was inaccurately saying that the newly created OsinfoInstallConfig
is empty while it has some default values set.
2012-12-19 Fabiano Fidêncio <fabiano@fidencio.org>
docs: add missing ":" for proper introspection
docs: Add missing documentation
Annotations for:
- osinfo_install_script_generate_finish()
- osinfo_install_script_generate_output_finish()
docs: Fix typos
- a -> an
- to -> for
- add a missing word (elements)
- references: @param: an Osinfo* -> @param: an #Osinfo*
syms: expose a forgotten method
2012-12-17 Christophe Fergeau <cfergeau@redhat.com>
db: Fix gtk-doc name of 2 function for proper introspection
This was causing warnings during generation of introspection
information.
2012-12-14 Christophe Fergeau <cfergeau@redhat.com>
Add missing NULL initialization
In error cases, this 'ret' variable can be gfree'd before having
been set, so it must be initialized to NULL at the beginning
of the function. Issue spotted by Coverity.
Add missing break; in switch()
Issues spotted by Coverity
2012-12-13 Christophe Fergeau <cfergeau@redhat.com>
test-isodetect: Add test for osinfo_media_get_languages
By dropping a .lng file similar to:
[general]
l10n-language=fr_FR;en_EN;
it's possible to specify which languages a given media is supposed
to support. test-isodetect will then check that the languages for this
media in the OsinfoDb match the expected ones.
win: Add language information to Windows medias
Now that libosinfo knows how to use the l10n-language OsinfoDB attribute,
we can add this data to the various Windows <media> definitions in
the database.
Set language in osinfo_db_identify_media
When an OsinfoMedia for OsinfoDb has a l10n-language property set,
we are now able to turn it into a proper language list set on the
media being identified.
loader: Read media language information
Getting language information can either be supplied through a
series of <l10n-language> tag set on the <media> element or through
a regex that will be applied on the media volume ID.
The former should be all that is needed for most Linux distros while
the latter will be useful to get the language of Windows images.
media: Add OsinfoMedia::languages property
This lists all the languages a given media can show its UI in.
Deprecate osinfo_db_guess_os_from_media
Add osinfo_db_identify_media
Set OsinfoOs::media for OSes stored in an OsinfoDb
Add OsinfoMedia::os property
Add datamaps to rng for validation
loader: Load datamaps
Install scripts can add a 'datamap' attribute when they declare
their config parameters. The value of this attribute is the ID
of a datamap, which is an XML file containing key/value pairs:
<?xml version="1.0" encoding="UTF-8"?>
<libosinfo version="0.0.1">
<datamap id="http://example.com/osinfo/test">
<entry inval="generic-val1" outval="foo"/>
<entry> inval="generic-val2" outval="bar"/>
</datamap>
</libosinfo>
This commit adds support for loading these datamaps. The next patches
will then make use of these datamaps when the libosinfo user set
a value for the corresponding config parameter.
Add datamap classes
These will be used to remap generic values set by libosinfo users
to OS-specific values used by OS solution files for automatic
installation.
Based on a patch from Daniel P. Berrange.
loader: Don't harcode '+ 9' in tree loading
When loading <tree> elements, we want to skip the 'treeinfo-' part
of entity property names. This is currently done by using a '+ 9',
using sizeof("treeinfo-") instead will make things more obvious.
Use G_PARAM_STATIC_STRINGS everywhere
Remove the last uses of G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB
Fix GObject property gtk-doc name
They must be described as ClassName:property-name: or gtk-doc
won't pick them up. There were some files where '::' was used instead
of ':' as the class name/property name separator.
build-sys: Build data/ before test/
Some test cases use the in-tree database data. Since some database files
are transformed from .xml.in to .xml during build, it's better to
build data/ first to ensure they are there when tests try to use
this data.
2012-12-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post release version bump
2012-12-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.2
data: Add forgotten macos.xml.in file
This file got never added to Makefile.am so was never installed or
distributed.
2012-12-10 Christophe Fergeau <cfergeau@redhat.com>
loader: Use symbolic names in osinfo_loader_install_config_params
osinfo_loader_install_config_params.h defines
OSINFO_INSTALL_CONFIG_PARAMS_* constants, better to use these
rather than string literals.
2012-12-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,win,installer: Assume full paths
According to the documentation, we expect apps to specify full paths for
disks and locations so we must assume they are so in the scripts.
fedora,installer: Set keyboard config for >= F18
Now that we have established what kind of string to expect in
'l10n-keyboard' config, lets correctly set this for F18 and higher.
For F17 and older, we hardcode the layout to 'us'. Those require layout
to be a console layout so we'll need some complicated XSL magic to
translate from X to console layout if we want to properly support those.
2012-12-07 Christophe Fergeau <cfergeau@redhat.com>
syms: Alphabetically order osinfo_install_config_*
This is ordered on the name of the property that is read/set
list: Include osinfo_filter.h in osinfo_list.h
osinfo_list.h uses OsinfoFilter so it must include osinfo_filter.h
to be self-contained.
Remove obsolete methods from OsinfoDeviceDriverList
These methods were never part of a libosinfo release, so we can
remove them without breaking ABI.
Deprecate osinfo_*list_new_*
The generic equivalent provided by OsinfoList should be used instead.
Use new osinfo_list_new_* helpers everywhere
We need to do that before deprecating all the derived class
implementations of osinfo_xxxlist_new_*.
Add osinfo_list_new_*
Currently, every class inheriting from OsinfoList reimplements
_new_copy, _new_filtered, _new_intersection and _new_union. This
commit adds generic implementations of these methodes in OsinfoList
which will allow us to deprecate all the other implementations.
2012-12-07 Michal Privoznik <mprivozn@redhat.com>
osinfo_install_config.c: Describe function arguments
This patch adds small description to each undocumented
argument for each function within osinfo_install_config.c.
Document OsinfoInstallConfigParamPolicy enum
Document even more arguments
These files were still missing function arguments description:
* osinfo/osinfo_install_script.c
* osinfo/osinfo_os.c
Suppress gtk-doc warnings on missing field description
Each public visible struct and enum must have documented
items. If it hasn't, gtk-doc produces a lot of warnings.
However, things it's complaining about doesn't have any
interesting attributes, so mark them as private.
2012-12-07 Christophe Fergeau <cfergeau@redhat.com>
Fix internal function names in OsinfoInstallScript
A few static methods were prefixed with osinfo_os_ instead of
osinfo_install_script_
Add missing osinfo_install_script_get_config_param_list annotation
Add Fabiano's copyright to some source files
Fabiano made significant work in the installer code, this commit
adds his copyright to the files where he is listed in the 'Authors'
section, this makes things clearer.
Fix osinfo_loader_root comment
Some newly added tags were missing from the description
syms: Remove duplicated symbol
libosinfo.syms contains the osinfo_install_config_param_new symbol
twice. Reorder the LIBOSINFO_0.2.0 section to make this obvious,
and remove the duplicated symbol.
loader: Fix one newly introduced leak
This is a follow-up to my previous series fixing leaks as a similar
one was just introduced.
loader: Fix memory leaks in error paths
loader: Fix leak in osinfo_loader_os
loader: Don't leak 'arch'
loader: Set GError on osinfo_loader_nodeset failures
Most of the code in OsinfoLoader check if osinfo_loader_nodeset
set a GError to see if it failed and never test if it returned -1.
Better to make sure that we actually set the GError when this
function fails.
loader: Use xmlFree to free libxml2 strings
As libxml2 and glib memory allocation functions can be overridden
with custom functions, it's important to use the right free functions
for allocated memory.
build-sys: Fix circular make dependency
osinfo_enum_types.h was depending on libosinfo_1_0_include_HEADERS,
which contains osinfo_enum_types.h. This caused a build-time warning
from make about a circular dependency.
2012-12-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win7,installer: Setup pre-installation drivers
install-config: API to specify drivers disk & location
Add API for apps to be able to tell where pre- and post-installation
drivers are available.
winxp,win7,installer: Claim drivers pre-install capability
install-script: Add driver install capability API
Add API to query install scripts whether they can pre- and post-install
drivers, meaning at the beginning and end of installation, respectively.
win7,xp: Provide info on viostor drivers
The drivers are currently availalable from my own webspace, we should
probably put it in a more canonical location and update this patch once
the approach taken here is agreed upon by everyone.
loader: Load device drivers from DB
Load device driver information from os nodes in database.
schema: Allow driver info under os nodes
This defines the XML we'll use to add device driver information to our XML
database.
os: API to add & list device drivers
Add DeviceDriverList class
OsinfoDeviceDriverList is a list specialization that stores only
OsinfoDeviceDriver objects.
Add DeviceDriver class
install-config: Document expected kbd layout format
2012-12-05 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
loader: Fix media object leaks
2012-12-03 Christophe Fergeau <cfergeau@redhat.com>
Fix OsinfoMedia::installer-reboots default value
By default, we report 1 reboot during installation, not -1.
This default value is not used at all (the property is not _CONSTRUCT),
but it's better to be consistent with one the getter does.
2012-12-01 Christophe Fergeau <cfergeau@redhat.com>
More Windows 8 coverage
This covers the whole range of English Windows 8 ISOs available on
MSDN. Hopefully this will extend to non-English win8 ISOs on MSDN,
and to all non-MSDN win8 releases as well.
Update .gitignore
Add generated enumeration C/H files
win: 2 trivial indentation fixes in XML file
2012-11-30 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Export osinfo_install_script_get_product_key_format
This function was never added to libosinfo.syms and hence not exported
in the so files.
2012-11-28 Christophe Fergeau <cfergeau@redhat.com>
Remove duplicate EXTRA_DIST definition
Add test case for handling int in entities
This test case would have caught the bugs fixed by 14defe8e and
4e86e2bf
2012-11-28 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
fedora,installer: Fix against Fedora 18
'base' package group has been replaced by 'standard'. For jeos profile,
we now use the right name of the group depending on the OS version. For
desktop profile, we can simply drop this group from the list as its
pulled-in by other groups anyways.
2012-11-28 Christophe Fergeau <cfergeau@redhat.com>
Add RHEL 6.3 OS information
Add RHEL 5.8 media information
Add RHEL 5.5 media information
Add RHEL data to test suite
Remove extra blank spaces from .sym file
win: Small indentation fix
media: Use G_PARAM_STATIC_STRINGS
media: Don't mark properties as _CONSTRUCT
Marking them as _CONSTRUCT will cause the property setter to be
called at object construction time to set the property default
value. For the properties of OsinfoMedia, this causes the default
value to be stored in the entity store as the property setters
call osinfo_entity_set_param.
However, as the getters are careful to use
osinfo_entity_get_param_*_with_default, this is not useful,
and wastes memory. This can even be harmful if the default gobject
property value and the default value passed to
osinfo_entity_get_param are different, the gobject default will be
returned, which can be unexpected.
Fix 'inirtd' typo
Fix gint64 format string in osinfo_entity_set_param_int64
osinfo_entity_set_param_int64 printed gint64 values using
G_GUINT64_FORMAT which is unwanted when the value is
negative. This bug caused breakage after the changes in
84969ff9 and 4e86e2bf when trying to read the install-reboot value.
Until these commits, we stored the textual representation
of (guint64)-1 (GUINT_MAX) in the entity store, and when trying to convert
it, g_ascii_strtod was returning -GINT64_MAX, and
osinfo_entity_get_param_value_int64_with_default was returning the
default value as this value is negative.
After these commits, g_ascii_strtoll returns GINT64_MAX-1 when trying
to parse the overlong string stored in the database, and the default
value is not returned as the data was found in the database.
Just using the right format (G_GINT64_FORMAT) to convert a gint64 to a
string fixes this bug.
2012-11-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
install-config: Document format of 'l10n-language'
Co-author & reviewer: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2012-11-27 Fabiano Fidêncio <fabiano@fidencio.org>
win7,installer: Translate l10n-language configuration
The expected format of l10n_language string is the gettext locale names
standard:
https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Locale-Names.html,
While Windows expect this to be in *the* standard format:
http://www.ietf.org/rfc/rfc4646.txt
So we need to translate the language code for windows.
Co-author & reviewer: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
2012-11-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
win8: Add one more volume ID pattern
win8: Remove 'EN' suffix from volume ID patterns
xp: Add recommended resources for 64-bit arch as well
2012-11-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
xp: Bump recommended RAM and storage
A RAM of 128 MiB and storage of 2 GiB might have been adequate in the
days when XP came out but now a days its not a lot at all. So lets
recommend at least 512 MiB RAM and 10 GiB storage.
win7: Add one more volume ID to DB
2012-11-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
API to query required user avatar format
Add a new API for apps to be able to query in which format do the user
avatar file need to be in.
Based on a patch from Fabiano Fidêncio <fabiano@fidencio.org>.
2012-11-23 Christophe Fergeau <cfergeau@redhat.com>
entity: Fix osinfo_entity_get_param_value_int64_with_default
The way it's currently implemented,
osinfo_entity_get_param_value_int64_with_default will return the
default value if the value which is being parsed is negative.
This happens because it tries to reuse osinfo_entity_get_param_value_int64
to do the parsing, which returns -1 when the value could not be found.
However, we have no way of knowing if the -1 means that the value could
not be found, or if this means the value was found and its value is -1.
This is made worse by the fact that we return the default value as
soon as osinfo_entity_get_param_value_int64 returns a negative value,
not just -1.
By implementing osinfo_entity_get_param_value_int64 by calling
osinfo_entity_get_param_value_int64_with_default rather than doing the
contrary, we can avoid this issue.
entity: Use g_ascii_strtoll to parse int64 strings
osinfo_entity_get_param_value_int64 uses g_ascii_strod to parse
strings to int64, better to use g_ascii_strtoll which is there
for that purpose.
2012-11-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
More use of G_PARAM_STATIC_STRINGS
2012-11-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Correct RNG for install-script tree
* Expect 'install-script' node at toplevel in XML
* Interleave all child nodes of 'install-script' node
* Remove duplicate entries for 'id' nodes
* 'config' node has 'param' nodes under it and they have the attributes
* Remove redundant nodes that probably got there due to c&p mistake
* 'product-key-format' and 'config' nodes are optional
Also validate install scripts
Make 'filename' more consistent w/ other restrictions
'filename' should be toplevel node under 'install-script' rather than
an attribute of its toplevel 'template' child. The reason this was
previously put in the incorrect place was that the first idea was to have
multiple files under one install script but we later decided to go for 1
file per install script.
Also note that I'm naming the element to 'expected-filename'. This is
to make it consistent with associated API and to simplify loading code.
Separate root & user passwd setup in fedora installer
Separate out root and user password setup in fedora installer so that
root account is not made passwordless just because user password was
not specified.
Specify product key format for windows installers
Document osinfo_install_script_get_product_key_format
Document the format of the string returned by this function.
win7 desktop installer can also use product key
Product key is optional for win7
Remove now redundant code in InstallConfigParam
Remove private structure and finalize implementation. This should have
been part of commit ee9e797.
Add a NULL check
Allow apps to specify install script disk
Allow apps to specify target disk
Don't assume avatar location and disk
Instead of hardcoding avatar path and disk, lets get those from
application.
Add InstallScript:path-format
Inform the applications in which format the paths are expected by the
installer.
2012-11-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Remove redundant install script defines
Correct a C&P mistake in prop registration
Minor indentation corrections
Rename a function to better reflect its task
osinfo_loader_install_config_param ->
osinfo_loader_install_config_params.
Correct InstallConfigParam:policy prop to enum type
Although this means ABI "breakage", we must keep in mind:
a. The property getter (the API used by apps) was treating the string
value as enum, i-e it was broken for apps so if any app is using this
API, they were totally screwed anyways.
b. Its doubtful that this new API is used by any application out there.
InstallConfigParam:policy should not be writable
This actually not only breaks ABI but also the API: we remove one argument
of _new() function. The prop getter is the main part of this API that an
app will be using if its using this API at all so I think its worth it to
correct this now (while we are causing other breakage here: See next
patch in this series).
I am also not certain that _new() should be part of the public API.
InstallConfigParam props should map to entity params
Without entity params usage, there is no real benefit of deriving from
Entity class so this was very much intended from start.
Add enum param getter/setter helpers
Add:
* osinfo_entity_get_param_value_enum
* osinfo_entity_set_param_enum
Minor syntax correction to windows-unattend.xml
Use glib-mkenums to register enums with glib
This commit adds the generation of osinfo_enum_types.[ch] using
glib-mkenums. These files will register the various enums that will get
added to osinfo header files with glib.
Commit message shamelessly stolen from a similar commit to libvirt-glib
by Christophe Fergeau <cfergeau@redhat.com>.
2012-11-08 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Bump version
2012-11-06 Eric Blake <eblake@redhat.com>
maint: update to latest gnulib maint.mk
* maint.mk: Resynchronize from gnulib.
* cfg.mk (_gl_translatable_string_re): Reflect new gnulib naming.
2012-10-31 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Steal libvirt magic for picking translation files
Since we don't keep a static LINGUAS file, we need to do this for
intltool to pick-up our translation (.po) files.
Translate all (potentially) user visible strings
Make some strings more translator-friendly at the same time.
2012-10-30 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
autogen: Remove redundant intltoolize call
gnome-autogen.sh calls this for us.
Thanks to Christophe Fergeau <cfergeau@redhat.com> for pointing this out.
Update .gitignore
2012-10-29 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Mark obvious strings in DB for translation
Mark 'name' and 'vendor' in oses and hypervisor, and 'name' in devices
for translation.
This implies that now we generate the actual XML files to automatically
get translations inserted into them.
Co-author: Eric Blake <eblake@redhat.com>
2012-10-29 Eric Blake <eblake@redhat.com>
maint.mk: Resync from gnulib.
AUTHORS: Add myself.
2012-10-29 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Load localized values for entity params
Attempt to use the localized values of entity params if available before
using the non-localized values.
This does not yet include custom (ones starting with 'x-') params as I
haven't yet figured the right xpath magic to (cleanly) achieve that.
Suggestions welcome!
2012-10-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add translation framework
Note that we are calling bindtextdomain() from Loader's class init.
AFAICT, its a common practice in libraries without any main _init()
function to make this call in init of the most common/useful class (e.g
gdk-pixbuf and gdbus).
Update .gitignore
2012-10-19 Michal Privoznik <mprivozn@redhat.com>
95-osinfo.rules.in: drop empty line at EOF
AUTHORS: Add David to the authors file
as he contributed by fixing udev rule.
2012-10-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add data for Finnish windows 7 professional
Although this is tested against only Finnish ISOs, I'm almost sure the
volume IDs I added to DB are generic and should work for ISOs of other
locales as well.
2012-10-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.1
2012-10-12 David Zeuthen <davidz@redhat.com>
Fix udev rule
The udev rules for detecting OS'es are too complicated and they also don't
work when detecting OS'es on e.g. a loop device. For example, the stuff
about DISK_MEDIA_CHANGE is kinda wrong.
The latter is pretty annoying as the default action in F18 for an .ISO file
is to loopback mount it - as a result the user is presented with "Open with
Files" instead of "Open with Boxes".
Fixes rhbz#863468
2012-10-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Specify relationship between gnome 3.6 & fedora 18
This is so that application know the supported devices.
2012-10-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
docs: Remove redundant .types file
Since we pass --rebuild-types to gtkdoc scanner, .types file is
generated for us and therefore we don't want to keep this in VCS.
Add 'installer-reboots' attr. to RNG
Last patches broke `make check`, this one fixes it.
Correct 'installer-reboots' value for XP & win7
The default value of '1' is not correct for these OSs at least.
Add 'installer-reboots' parameter to OsinfoMedia
If media is an installer, this specifies the number of reboots the
installer takes before installation is complete. Default value is '1'.
This is mainly needed for applications like GNOME Boxes and virt-install
to be able to tell when OS installation from a given media is complete so
that they can take whatever post installation steps they may need to.
2012-10-07 Fabiano Fidêncio <fabiano@fidencio.org>
config_param: add is_{required, optional} functions
These functions help applications to check if a config_param is required
or optional.
install_script: add get_config_param function
Return, if exists, the sought OsinfoInstallConfigParam from an
OsinfoInstallScript. Otherwise, NULL is returned.
differenciate between expected/output script name
We need to differenciate between the expected filename and the output
filename. While former always remains the same (as some operating
systems expect it with a particular name), the latter is dependent on
the output prefix (set by application)
2012-10-05 Fabiano Fidêncio <fabiano@fidencio.org>
docs: remove type include twice
2012-10-02 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Bump version
Add data on GNOME 3.6
Currently this is just so that apps can recognise GNOME live ISOs but
later could be re-used when/if we need to treat GNOME as an OS:
http://afaikblog.wordpress.com/2012/08/07/gnome-os/
Add data on Fedora 18
Most of this data is simply a modified copy of Fedora 17 data. Some of
it (e.g ISO URLs) will not be valid until the actual release is out.
2012-09-28 Michal Privoznik <mprivozn@redhat.com>
RNG: Add IDE and virtio bus types
RNG: Adapt examples to updated schema
Demo scripts and example database needs to be updated
to reflect updated RNG schema.
RNG: Adapt deployment to the code
as it should contain one os, platform and multiple devices elements.
RNG: Allow devices to have driver
device: Introduce SUBSYSTEM property
PCI IDs database allows devices to have subsystem so we
should reflect this in our model as well under optional
element <subsystem>.
DB: convert <device> into <product>
and <device-id> into <product-id> as they were mistakenly
switch for the latter and hence not parsed at all.
RNG: Move product-attr and product-content to interleave
2012-09-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Remove a redundant private function
2012-09-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
More type-specific entity value getters/setters
Add:
* osinfo_entity_get_param_value_boolean_with_default
* osinfo_entity_get_param_value_int64
* osinfo_entity_get_param_value_int64_with_default
* osinfo_entity_set_param_int64
Most of these methods already existed as private functions in media and
resources subclasses. This patch puts them where they belong, exposes
them in public API and renames them appropriately.
2012-09-11 Christophe Fergeau <cfergeau@redhat.com>
Add ubuntu 12.10 data
It's not released yet so may need some adjustments post-release,
but most of this information should be accurate. It allows libosinfo
to identify 12.10 beta isos already.
2012-09-04 Christophe Fergeau <cfergeau@redhat.com>
osinfo-detect: ignore DB loading errors
osinfo-detect is currently exiting with a failure when a DB loading
error occurs. However, such errors should not be fatal as they can
happen when the user put a malformed XML file in
~/.local/share/libosinfo. The worse that can happen when this function
fails is that the OsinfoDB will not be populated, but this shouldn't
cause memory corruption or crashes, so we can log the error and go on.
loader: remove debug g_print
When an error occurs in osinfo_loader_process_default_path, there's
a g_print("Fail"); call. This commit removes this.
fedora: fix min RAM requirements
Fedora 16 and 17 need 768MB as a minimum as indicated in the release
notes:
http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Release_Notes-Welcome_to_Fedora_16.html#sect-Release_Notes-Hardware_Overview
http://docs.fedoraproject.org/en-US/Fedora/17/html/Release_Notes/sect-Release_Notes-Welcome_to_Fedora_17.html#sect-Release_Notes-Hardware_Overview
2012-08-31 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.2.0
2012-08-28 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add varirables for DB paths in pkg-config file
For both system and local databases. These are paths where applications
can put custom database files. Libosinfo will load from these paths
after loading its default database so applications can also override
information from default database and not just add more information.
Check log of commit b12f417d3b568ac12cebecd8c439b51be7419393 for
details about these paths.
2012-08-27 Fabiano Fidêncio <fabiano@fidencio.org>
Fix typo in InstallConfigParam header
2012-08-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Remove bogus min storage info for Fedora
This information was added by me in commit d0253b5a and was the result
of me misreading the docs[1]. This 94 MiB is not actually the minimum
required total disk space but minimum of *additional* disk space
required by the installer itself.
[1] http://docs.fedoraproject.org/en-US/Fedora/15/html/Release_Notes/sect-Release_Notes-Welcome_to_Fedora_15.html#sect-Release_Notes-Hardware_Overview
2012-08-23 Daniel P. Berrange <berrange@redhat.com>
Bump version to 0.2.0 to recognise major new features
2012-08-23 Fabiano Fidêncio <fabiano@fidencio.org>
Fix typo in win2k8 media architecture
Fix missing ":" at comments
Add desktop profile for Windows
To create an user and set their avatar, we need to create 2 new files,
that will be used in older Windows.
(http://bugzilla-attachments.gnome.org/attachment.cgi?id=214681)
Was discussed in the ML about don't create this files and put all
information in only one script, separating each file in one template, as
suggested in:
https://www.redhat.com/archives/virt-tools-list/2012-June/msg00078.html
In the implementation time, a limitation occurred, and I realized that
I was doing the things in the wrong way. (if there is 1 script for all
the files and _generate*() gives you 1 file as output, how we could
generate different files from the unique file?) So, I would like to go
back with the first implementation, creating different files for each
file used by windows xp (e. g.)
Add desktop profile for Fedora 15 and newer
As talked on IRC, was decided to not install QXL drivers for older
Fedora (16 or lesser). Why? We are keeping some hacks only to avoid
broken QXL driver and, at least for now, we are removing these.
install script: add config_param entity
Now we need to set what are the configs that will be used in each
script. To set it, just add, in the .xml's script file:
<config>
<param name="..." policy="mandatory"|"optional"/>
</config>
For manage these configs, a new entity was created, called:
OsinfoInstallConfigParam. And the OsinfoInstallScript entity is, now,
keeping an internal list of the OsinfoInstallConfigParam entity.
With these changes, applications that uses/will use libosinfo can check
if an install script has some config to be set using, consulting by:
- ConfigParam entity:
osinfo_install_script_has_config_param(OsinfoInstallScript *script,
const OsinfoInstallConfigParameter config_param);
- Parameter name:
osinfo_install_script_has_config_param_name(OsinfoInstallScript *script,
const gchar* name);
install script: generates the output in a file
Add variant of osinfo_install_script_generate() that outputs the
script into a file in the given directory. Also add API to specify a
custom prefix for generated file.
Moreover, the "filename" attribute was added in the "template" element
in the install script data, and it will be used as the output filename
for each script and will be more detailed below. Also, support to this
field was provided in the XML schema and in the osinfo_loader as well.
About the osinfo-install-script tool:
If the prefix argument is NULL, the output files will be written as
set in data/install-scripts/*.xml (in filename attribute from
template element):
- Linuxes: fedora.ks
- Windows 2k3r2 and older: windows.sif
- Windows 2k8 and newer: windows.xml
Otherwise, the prefix will be prepended in the filename as:
<prefix>-<filename>
If the dirname argument is NULL, the output files will be written in
the current directory.
It will be used to create, easily, multiple scripts, as used in:
http://bugzilla-attachments.gnome.org/attachment.cgi?id=214681
Don't return a gboolean when a gchar * is expected
Add "hostname" prop to install-script-config
It is desirable to configure the hostname of the new virtual
machine during initial automated provisioning
Add win2k and win7 forgotten installers tag
Expose forgotten APIs from install script config
These APIs will be used, at least, by boxes
Standardize function names
Rename some functions' names to accord with the rest of API
Fix function's name exposed by osinfo_db
osinfo_db_get_install_script_list was being exposed with a wrong
standard name (osinfo_db_get_install_scripts).
Update README file
Add dependencies needed by install scripts
2012-08-23 Daniel P. Berrange <berrange@redhat.com>
Update git ignore rules
Add data files for Fedora & Windows unattended installs
For Fedora this adds a kickstart file template which self-adapts
to all Fedora versions 1-> 16
For Windows this adds two file templates, one using the legacy
SIF .ini file format for Win2k3 or earlier, and the other using
the modern unattended XML format for Win2k8 or newer
Add a command line tool for generating install scripts
Add test suite for install script generation
This test suite creates an OsinfoInstallConfig object and along
with a demo XSL template, it generates some install scripts
Associate install scripts with operating systems
Operating systems now get a new element
<installer>
<script id='http://fedoraproject.org/scripts/fedora/jeos'/>
</installer>
And there is a new top level element to go along with
this:
<install-script id='http://fedoraproject.org/scripts/fedora/jeos'>
<profile>jeos</profile>
<template>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
....template for install script...
</xsl:template>
</xsl:stylesheet>
</template>
</install-script>
Add APIs for dealing with installer automation scripts
This introduces two new objects
- OsinfoInstallConfig - stores configuration parameters which get
substituted into the install script template.
- OsinfoInstallScript - provides a template and the mechanism for
turning it into an install script using XSLT
Add helper APIs to OsinfoEntity for boolean params
Misc Fedora review fixes to Mingw RPM specfile
2012-08-14 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
API for getting product logo URLs
While we will be able to neither ship any product logos nor provide URLs
to them for legal reasons, this patch simply adds API for easily fetch
URLs from *a* libosinfo database.
2012-06-20 Daniel P. Berrange <berrange@redhat.com>
Fix source URL for mingw-libosinfo.spec.in
Convert to build with mingw64 toolchain
2012-06-14 Daniel P. Berrange <berrange@redhat.com>
Add Wanlong Gao to AUTHORS file
2012-06-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post release version bump
Release 0.1.2
Add two Ubuntu 6.06 alternate ISOs
This fixes the `make check` breakage from commit 2e4ceff.
2012-06-11 Christophe Fergeau <cfergeau@redhat.com>
Add information about Ubuntu 12.04
Based on a patch from Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-06-08 Christophe Fergeau <cfergeau@redhat.com>
Add Windows 7 Ultimate N identification
This fixes https://bugzilla.gnome.org/show_bug.cgi?id=676248
Data provided by Vladimir Beneš <benesv@email.cz>
build: allow building with newer glibc-headers and -O0
Commit log and autoconf snippet written by Eric Blake for libvirt.
glibc 2.15 (on Fedora 17) coupled with explicit disabling of
optimization during development dies a painful death:
In file included from /usr/include/limits.h:27:0,
from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:169,.
from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/syslimits.h:7,
from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:34,
from util/bitmap.c:26:
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
cc1: all warnings being treated as errors
Work around this by only conditionally defining _FORTIFY_SOURCE,
in the case where glibc can actually use it. The trick is using
AH_VERBATIM instead of AC_DEFINE.
* m4/libosinfo-compile-warnings.m4 (LIBOSINFO_COMPILE_WARNINGS): Squelch
_FORTIFY_SOURCE when needed to avoid glibc #warnings.
Add a few more Win 7 volume IDs
This commit adds test case data for the Windows 7 ISOs I have
available locally and updates the windows 7 volume ID list
so that make check still passes after these additions.
Add more Windows XP test cases and a new volume ID
Add the output of isoinfo -d -i image.iso for the Windows XP I
have available locally, this makes make check a bit more extensive.
Since make check was failing after these additions, this commit
also adds the missing volume ID for Windows XP 64 bit with debugging
enabled to windows.xml
Add missing VX2PRMFPP Windows XP volume ID
The commit adding lots of Windows XP signatures inadvertantly dropped one
preexisting volume ID. This causes a make check failure
2012-06-08 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Stricter volume ID regex for Ubuntu server spins
Without this fix, we end-up getting destkop media wrongly matched to
server media.
2012-06-05 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fix osinfo_list_add_union()
This function was adding the second list elements to new list first so
the order of elements in the new list was contrary to what user will
expect of this function (and all wrapper/using functions).
2012-06-05 Wanlong Gao <gaowanlong@cn.fujitsu.com>
libosinfo: update the information of Fedora 17
2012-05-31 Christophe Fergeau <cfergeau@redhat.com>
Rework udev rule some more
Now that the rules to remove device properties when the CD is ejected
have been fixed, another bug in these rules shows up: there are 2 rules
very similar to the rules for disk insertion. One of them matches
ID_FS_TYPE != "iso9660" and the other matches ID_FS_TYPE != "udf" which
means that at least one of them will trigger and will remove the
OSINFO_* properties that have been just set by the insertion rules.
While attempting to fix them, I've noticed that these properties go
away anyway when the disk is removed and this has been confirmed on
#udev, so we can get rid of them. While at it, I've added a test to
check that the 'change' events correspond to a media change.
2012-05-23 Fabiano Fidêncio <fabiano@fidencio.org>
Import more Windows ISO signatures
Based on: http://www.tacktech.com/Software.cfm
2012-05-15 Christophe Fergeau <cfergeau@redhat.com>
Add missing % to %{rhel} macro
This fixes the previous commit.
Fix spec file for RHEL builds
%fedora is not defined when building for RHEL, so we need to use
%{?fedora} instead of %{fedora}. This commit also makes sure that
newer RHELs will build libosinfo with introspection support.
2012-04-13 Christophe Fergeau <cfergeau@redhat.com>
Fix Ubuntu 10.04 detection
LTS Ubuntu versions are respinned several times throughout their
lifetime to integrate all the updates on the iso. When this
happens, the volume ID becomes "Ubuntu 10.04.4 LTS i386" for example.
The additional 3rd digit is properly handled for 8.04 but not for
10.04. This commit fixes the 10.04 volume ID regexp so that it handles
this case, and also adds the missing "LTS" to the regexp (rhbz#811871).
This fixes detection of the ubuntu 10.04.4 iso, I couldn't get my hands
on an older 10.04 iso to double check this doesn't cause a regression.
2012-04-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post release version bump
There is no libsoup-gnome-devel package
2012-04-12 Daniel P. Berrange <berrange@redhat.com>
Don't generate man pages in source directory
2012-04-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release notes for 0.1.1
2012-04-06 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add information about Fedora 17
2012-03-27 Christophe Fergeau <cfergeau@redhat.com>
configure.ac: don't error out when vala autodetection fails
When --enable-vala or --disable-vala are not passed to configure,
configure.ac automatically checks for vala availability. However,
in this case, it's erroring out when vapigen cannot be found instead
of silently disabling it.
configure.ac: set VAPIGEN when --enable-vala is passed
It was only set when the vala detection was automatic (ie no
--enable-vala on the command line)
2012-03-26 Daniel P. Berrange <berrange@redhat.com>
Fix schema compliance bugs in OS data
Expand RNG schema to cover latest additions
- Add 'distro' to RNG schema
- Allow 'short-id', 'upgrades' and 'derives-from' to occur
1 or more times
Rename test data files to match changed distro short-id
2012-03-23 Fabiano Fidêncio <fabiano@fidencio.org>
Don't call memset() with zero length for padding
Add missing initializers for OsinfoLabel structs
2012-03-22 Daniel P. Berrange <berrange@redhat.com>
Disable vendor, distro & family display by default
To make the output of osinfo-query more managable disable the
display of vendor, distro & family fields. Only short-id,
name, version & id are shown.
Add 'distro' field to osinfo-query command
Enable the osinfo-query command to display the contents of
the 'distro' field
Remove 'generic-linux' which are not an OS distro entries
The 'generic-linux.xml' file was only present because virt-install
had some generic entries. Compatibility for virt-install does not
need to be in libosinfo itself.
Standardize format for OS id, short-id, distro, version
Standardize the format used for creating 'id' and 'short-id' fields,
based on distro, version & vendor website URL
- id: http://{VENDORSITE}/{DISTRONAME}/{VERSION}
- short-id {DISTRONAME}{VERSION}
eg,
distro=rhel
version=6.0
vendor=Red Hat
Then
short-id=rhel6.0
id=http://redhat.com/rhel/6.0
Also allow for a second short-id, which can be based on the
codename {DISTRONAME}{CODENAME}, eg short-id=ubuntuedgy
The exception is windows where the {VERSION} number isn't
really a distro version, but rather a kernel version.
Use the common distro suffix in short-id / id instead
ie, 2k, 2k3, vista, me, 95
Add ancient Win16/NT operating systems
For completness add in the 16-bit Windows OS and Win NT line
of OS
Rename 'vista' to 'winvista'
All windows distros have a short name prefix of 'win'
except for 'vista'. Fix that to be 'winvista'
Add release/eol dates for windows
Get rid of generic 'windows' template OS
Make the OS database only contain real OS entries, no virtual
ones like 'windows'. Create a diagram of the windows upgrade
and derives paths, and apply this to the metadata correctly
so we inherit in the same way the product code inherits
Standardize OS family names as all lowercase
The OS family names effectively refer to the kernel used.
Switch them all to lowercase, and correct a few mistakes,
MacOS -> darwin
Windows -> win9x or winnt
Other -> msdos or netware
<family>darwin</family>
<family>freebsd</family>
<family>linux</family>
<family>msdos</family>
<family>netbsd</family>
<family>netware</family>
<family>openbsd</family>
<family>solaris</family>
<family>win9x</family>
<family>winnt</family>
Fill in '<distro>' element for everything
The following distro names are used, all in lowercase for
compatibility with libguestfs
<distro>centos</distro>
<distro>debian</distro>
<distro>fedora</distro>
<distro>freebsd</distro>
<distro>mandrake</distro>
<distro>mandriva</distro>
<distro>mes</distro>
<distro>msdos</distro>
<distro>netbsd</distro>
<distro>netware</distro>
<distro>openbsd</distro>
<distro>opensolaris</distro>
<distro>opensuse</distro>
<distro>osx</distro>
<distro>rhel</distro>
<distro>rhl</distro>
<distro>sled</distro>
<distro>sles</distro>
<distro>solaris</distro>
<distro>ubuntu</distro>
<distro>windows</distro>
2012-03-21 Daniel P. Berrange <berrange@redhat.com>
Fix handling of const path strings when loading files
Handle short reads when extracting ISO headers
You cannot assume that g_input_stream_read_async will return
as many bytes as you requested. It is perfectly valid to get
a short read. Code must be prepared to repeat the read operation
multiple times until all data is read, or EOF/error occurs.
Add support for loading extra local database files
In addition to loading the system files from /usr/share/libosinfo/db,
it will now also load files in /etc/libosinfo/db/ (if it exists) and
$HOME/.local/config/libosinfo/db/ (if it exists)
New APIs are also added to allow an application to load a subset
of these locations, if they don't like the default behaviour
Move database files into $datadir/db instead of $datadir/data
2012-03-15 Daniel P. Berrange <berrange@redhat.com>
Add osinfo-query man page to RPMs
2012-03-14 Daniel P. Berrange <berrange@redhat.com>
Remove obsolete scripts for PCI/USB id conversion
The osinfo-pciids-convert and osinfo-usbids-convert scripts
are no longer required, since we can load the data files
natively. Remove them to avoid a runtime dep on Perl.
Fix whitespace at end of file
2012-03-13 Daniel P. Berrange <berrange@redhat.com>
Update entity test to cope with new 'id' parameter
Move openbsd test data to take account of rename
Add a 'osinfo-query' command line tool
Enable end users to search the database with a new osinfo-query
command. For example
$ osinfo-query --fields=short-id,name os vendor="Fedora Project"
Short ID | Name
----------------------+------------------
fedora1 | Fedora Core 1
fedora2 | Fedora Core 2
fedora3 | Fedora Core 3
fedora4 | Fedora Core 4
fedora5 | Fedora Core 5
fedora6 | Fedora Core 6
...
Update git ignore rules
Add a dummy "ID" property for entities
When querying/processing entities, it is useful if the 'id' field
appears just like other properties. Add a special case to handle
this
Fix XML loader to correctly distinguish vendor/product names & IDs
The loading of pci.ids/usb.ids was setting the 'product' and
'vendor' properties with ID values. The loading of devices from
XML was setting 'product' and 'vendor' properties with name
strings, but forgetting to parse ID values from the XML
Flesh out FreeBSD & Mandriva distro data. Add NetBsd & Mandrake
Add a 'distro' property for OS objects
The OS 'family' property is used to refer to the kernel type of
the OS. The new 'distro' property refers to the grouping of OS
by a particular vendor. For example all Linux distros have a
family of 'Linux', but their own distinct 'distro' value (Fedora,
Ubuntu, etc). Debian is even more fun having alternate releases
which use a Hurd of FreeBSD kernel, these variants will each have
the 'hurd' or 'freebsd' family, with a common 'debian' distro.
2012-03-12 Daniel P. Berrange <berrange@redhat.com>
Fix generation of docs in a VPATH builder
The DOC_SOURCE_DIR variable was missing the $(top_srcdir) variable
so it could not find the source files when run from a VPATH build.
Empirically the previous comment saying that $(top_srcdir) was not
needed is wrong.
2012-03-03 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Specify 'derives-from' relationship for openSUSE OSs
2012-03-02 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Proper/complete name of Canonical & Microsoft
2012-03-01 Daniel P. Berrange <berrange@redhat.com>
Add Win8 previous ISO signature
Import yet more Windows ISO signatures, including Windows 8 preview
2012-02-28 Daniel P. Berrange <berrange@redhat.com>
Add yet more Windows ISO signatures
Add openbsd.xml to the EXTRA_DIST list & sort it alphabeticaly
Import OpenBSD ISO data
2012-02-24 Daniel P. Berrange <berrange@redhat.com>
Import GNULIB's syntax checking rules
Add libosinfo.rng to mingw32 spec
Add <config.h> to all files & remove trailing blanks
Normalize whitespace at end of file
Fix 'the the' typo
Fix Red Hat copyright line
Fill out AUTHORS file
Death to TABs
Switch over to GNULIB's compiler warning code
Don't jump over variable declarations
Remove redundant 'packed' attribute since struct is fully aligned
Rename 'link' variables to avoid clash with global symbol
Add a man page for the osinfo-detect command
Add a test case which validates all schemas in tree
Add an osinfo-db-validate command for verifying XML files
The osinfo-db-validate command takes a list of paths or URIs
on the command line and validates them against the RNG
schema
Fix numerous schema non-compliance bugs in the XML database
Add an RNG schema for the libosinfo XML documents
Create an RNG schema that will be installed into
/usr/share/libosinfo/schemas/libosinfo.rng and can
be used to validate XML files
Import more Ubuntu distro ISO tests
2012-02-23 Daniel P. Berrange <berrange@redhat.com>
Remove bogus treeinfo data for Fedora <= 6 & replace with initrd/kernel/bootiso
Add test for tree URIs
Add Fedora tree URLs
Add support for install tree metadata
The <media> element and OsinfoMedia class can be used to identify
install media, ie ISO images.
The <tree> element and OsinfoTree class are the same concept but
used to identify installation trees.
Add tests for Debian distro signatures
Fix regex matching for OS media
The current regex match rule is
If pattern is NULL and string is NULL
-> accept media
else if pattern is NULL or string is NULL
-> reject media
else
-> do regex compare
The regex match rules ought to be
If pattern is NULL
-> accept media
Else if string is NULL
-> reject media
else
-> do regex compare
The idea is that if the Osinfo database pattern is NULL, then
regardless of whether the string is NULL or not, then we should
allow that match. In effect a pattern == NULL, should be treated
as equivalent to a regex ".*"
Update git ignore files
Yet more ubuntu ISO file signatures
2012-02-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Proper/complete name of Canonical & Microsoft
2012-02-22 Daniel P. Berrange <berrange@redhat.com>
Add yet more Windows ISO signatures
Fix two RHEL-2.1 release dates
2012-02-22 Matthew Booth <mbooth@redhat.com>
Separate win2k3/win2k3r2 and win2k8/win2k8r2
Import more Windows ISO signatures
2012-02-22 Daniel P. Berrange <berrange@redhat.com>
Fix make dist
* configure.ac: Require POSIX tar format for long filenames
* test/Makefile.am: Include isodata/ in dist
* test/test-isodetect.c: Fix VPATH builds
* test/test-mediauris.c: Skip network tests unless LIBOSINFO_NETWORK_TESTS is set
Add more Windows ISO image signatures
Add codenames for Fedora & Ubuntu
Add more RHEL distros, add RHL distros
Add support for product codenames
2012-02-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Specify 'derives-from' relationship for Ubuntu & Debian OSs
2012-02-22 Daniel P. Berrange <berrange@redhat.com>
Add Win7 enterprise edition ISO signatures
Add release / end-of-life dates for Fedora, RHEL & Ubuntu distros
Add support for filtering products based on release/eol dates
Disable Debian/OpenSuse URIs
Add test case for validating all URIs
Add test case for Ubuntu distro media
Fill out media for all Ubuntu distros
Add remaining Ubuntu distro releases
Add test data for Windows ISO detection
Fill out more Windows ISO signatures
2012-02-21 Daniel P. Berrange <berrange@redhat.com>
Add test case for validating ISO detection
Fill out complete Fedora ISO/DVD metadata
Also extract application ID from ISO PVD
Add missing Fedora releases & fix name of those pre Core/Extras merge
Add missing export of osinfo_entity_set_param
2012-02-11 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Post release version bump
2012-02-10 Christophe Fergeau <cfergeau@redhat.com>
Add RHEL 6.2
2012-02-07 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.1.0
Put symbols into their corresponding versions in syms file
Match substring regex in the end
Sometimes volume-id expression of one architecture is a substring of
volume-id expression of another architecture for the same OS. For
example '.*G.*RMC.*' is volume-id expression for i386 media of win7,
while '.*G.*RMC.*X.*' is for x86_64. To avoid incorrect matching, we
need to ensure that matching is done against '.*G.*RMC.*X.*' first and
then '.*G.*RMC.*'.
2012-01-27 Christophe Fergeau <cfergeau@redhat.com>
Use ENV{} in udev rule
There are only a handful of key names that can be directly assigned
in an udev rule (through FOO=....), for device-specific properties,
ENV{FOO} must be used.
2012-01-24 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Utility function to retrieve OS devices by property
2012-01-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add missing 'const' OsinfoList function params
Post release version bump
2012-01-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.0.5
2012-01-10 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add osinfo_os_get_all_devices()
Add a function to retreive all supported devices from an OS.
Specify 'derives-from' relationship for Fedora OSs
Bump version
2012-01-09 Christophe Fergeau <cfergeau@redhat.com>
Check PrimaryVolumeDescriptor size at compile-time
Eric Blake suggested on the mailing list that we can use a dummy
array declaration to trigger a compile error if the
PrimaryVolumeDescriptor structure size isn't 2048 bytes.
2012-01-06 Christophe Fergeau <cfergeau@redhat.com>
Mark the volume descriptor structs as packed
This tells gcc it shouldn't add some padding between the struct
members. which is important because we rely on this structure size
being exactly 2048. One of its members is guint8 ignored2[246]; (only
a 2 byte multiple) so all the fields of the struct won't be aligned
on a 8 byte boundary, so gcc could do some unexpected things on
some arch.
The 2 structs changed by this patch only use arrays whose elements have
the same size as chars so gcc will probably don't try to change their
alignment, but one never knows..
Use g_str_has_suffix instead of opencoding it
2011-12-27 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
List supported audio devices for Windows & Fedora
2011-12-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add all metadata from default path
We were only loading OS XML files from default path.
Distribute and install forgotten device XML files
2011-12-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add QXL to supported devices of windows & Fedora
2011-12-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.0.4
2011-12-18 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add mandatory commas to udev rules file
2011-12-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Release 0.0.3
2011-12-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Minor correction to win2k8 volume ID
2011-12-02 Christophe Fergeau <cfergeau@redhat.com>
Handle NULL GError **
It's valid to pass NULL GError ** around when we are not interested
in error reporting. This means we have to make sure the GError** is
not NULL before dereferencing it. In particular, the right way of
testing if GError **err; is set is to do if (err && *err) {}
This commit adds a helper to do this check and uses it where needed.
Fix OSINFO_MEDIA_ERROR_INSUFFIENT_METADATA typo
This is an API change, but I don't think many application are
checking error code values of libosinfo errors so I'd say we can
do it a this point. A #define for the old symbolic name can be
added if we don't want to break the API.
Fix "insufficient metadata" test in on_pvd_read
There are 2 issues with this test:
1) it's not using is_str_empty, which means it won't do what's
expected on some ISOs where "empty" descriptors are read as a
string full of blank space
2) it mandates the presence of a system or publisher descriptor in
ISOs, which is not the case on ubuntu 11.10 ISOs. They only have a
volume descriptor. Since on most ISOs, publisher is empty and
system is "LINUX", they don't add much to discriminate between ISOs,
so we don't really need to mandate the presence of one of these.
Handle empty/NULL strings in is_str_empty
2011-11-30 Christophe Fergeau <cfergeau@redhat.com>
Remove useless prototype
The static function it declares is defined immediatly after it.
Remove unused python gobject import
Nothing in examples/demo.py uses this import, and having it causes a
runtime error:
Traceback (most recent call last):
File "examples/demo.py", line 4, in <module>
from gi.repository import Libosinfo as osinfo;
File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 23, in <module>
from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using
gi.repository you must not import static modules like "gobject". Please
change all occurrences of "import gobject" to "from gi.repository import
GObject".',))
Make sure we don't set a GError twice in OSInfoLoader
When parsing OSInfo XML documents, the catchXMLError callback may
be called for non fatal errors. When this happens, we get a pointer
to a parsed document which we can use, but we may have set a GError
during the parsing if a non fatal error was logged. This means we
have to make sure the error is cleared after the parsing, otherwise
we may attempt to set it twice which is forbidden
This can be triggered by running examples/demo.py:
$ python examples/demo.py
/usr/lib/python2.7/dist-packages/gi/types.py:43: 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: Incorrect root element
return info.invoke(*args, **kwargs)
Traceback (most recent call last):
File "examples/demo.py", line 6, in <module>
loader.process_path("./")
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: at line 18: Namespace prefix xi on include is not defined
Bug report and initial fix from Guido Günther <agx@sigxcpu.org>
2011-11-28 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add more OS metadata
- More metadata on Debian, *SUSE, Ubuntu and Windows.
- Correct some metadata.
Based on a patch from Mateusz Kaplon <mateusz.kaplon@gmail.com>.
Add some information about Apple OSs
Based on a patch from Mateusz Kaplon <mateusz.kaplon@gmail.com>.
2011-11-24 Christophe Fergeau <cfergeau@redhat.com>
Fix setting of property default value
This commit reverts 4ba6a970dd4a6ba5e8efc49bb190c059f0d5b604.
For the default value of a GObject to be set upon object construction,
it needs to be marked as G_PARAM_CONSTRUCT or G_PARAM_CONSTRUCT_ONLY.
This commit adds this flag for the "installer" and "live" properties
("installer" defaults to TRUE and we want this to be set when the
object is created).
2011-11-24 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Correct flags for most Media properties
Most properties are not supposed be construct-only.
Initialize Media.installer to default value
Don't entertain empty ID headers from ISOs
Expose Media properties as gobject properties
Detection tool should set env for media ID
Detection tool now prints an environment variable 'OSINFO_MEDIA' with
the value of the ID of the media in the OS that was positively matched
against the media in question.
This implies setting of a udev property for the device by the same name.
Correct pattern matching logic
If both pattern and string are NULL, they should match.
API to indicate media is live and/or installer
Add live and installer boolean getters to Media.
Add live media data for Fedora 14-16
Return matched OS media
osinfo_db_guess_os_from_media() now has an out parameter that provides
the caller a reference to returned OS's media that was matched against
the passed media instance.
WARNING: This commit breaks API but its not really an issue since we
haven't yet promised API stability.
Don't match non-live Fedora ISOs against live ones
2011-11-24 Daniel P. Berrange <berrange@redhat.com>
Update to newer COPYING.LIB file with correct FSF address
Also include libosinfo.spec in tar.gz
Update RPM spec with tweaks from Fedora submission
2011-11-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Bump version
2011-11-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Remove contributors list from NEWS file
This release is out but doing this so I don't forget the rule of not
including contributors' list in next release announcement.
Release 0.0.2
2011-11-21 Christophe Fergeau <cfergeau@redhat.com>
Add VolumeIDs for CentOS
It doesn't seem to be possible to make the difference between a 32
or 64 bit CentOS iso just by looking at its headers so the iso type
guessing will need to be improved
Fix CentOS 6.1 entry
There were a few copy and paste typos
Add VolumeIDs for 2011 Ubuntu releases
Note that due to a bug in libosinfo, the detection of 11.10 won't work.
The 11.10 isos don't have a system id nor a publisher id, so they end
up as NULL in the parsed database, but they are a string of N consecutive
space when read from the iso. This prevents the match from working.
Fix <volume-id> for RHEL 5.x
The VolumeID for RHEL 5.x was RHEL/5.x, it was changed to RHEL_6.x
for RHEL6. I checked this with ISOs straight from RHN.
Fix <volume-id> for RHEL 4.x
The VolumeID for RHEL 4.x was RHEL/4-Ux, it was changed to RHEL_6.x
for RHEL6. I checked this with ISOs straight from RHN.
Fix <version> for RHEL 5.4
There was a typo.
Add openSUSE data
2011-11-21 Daniel P. Berrange <berrange@redhat.com>
Add homepage/mailing list / download links to README
2011-11-21 Christophe Fergeau <cfergeau@redhat.com>
Add #include <string.h> for strcmp
2011-11-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Recommend 9GiB for Fedora 14-16
Test for check if tests are enabled, not gir
Slightly more linient volume IDs for Fedora
2011-11-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add Fedora 16 OS metadata
2011-11-01 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add forgotten new classes to docs
Ask gtkdoc-scan to generate the sections file
This frees us from maintaining the sections file.
2011-10-26 Christophe Fergeau <cfergeau@redhat.com>
Improved volume ID regex for Windows 7
2011-10-25 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
First public release
Generate ChangeLog from git history on dist
Stole the Makefile.am rule and gitlog-to-changelog from libvirt.
Don't ignore the whole build-aux directory
Add a MAINTAINERS file
Update AUTHORS file
2011-10-21 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Improved README file
2011-10-20 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Consistent properties enum naming
Properties for Product attributes
2011-10-18 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add API to fetch paths to kernel and initrd images
2011-10-17 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Provide paths to kernel & initrd in the install tree
2011-10-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Minimum/recommended resources for F14 & F15
Set UDEV properties for UDF media as well
2011-10-05 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Let there be Vala bindings!
Generate Vala bindings if vapigen tool is available, unless explicitly
asked not to.
Correct Cflags and Libs in .pc file
2011-10-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Include libxml2 in gir files
2011-10-03 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fix two small introspection annotations
Stop using deprecated g-ir-scanner option
Properties for Resources attributes
Add setters for Resources' attributes
2011-09-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Constant for Kibibytes
2011-09-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Media ID strings are now regular expressions
Fix 2 small mistakes in syms and docs
Better udev rule installation
Provide a configure option to set the udev rule directory. If this
option is not set, udev directory defaults to '$prefix/lib/udev/rules.d'
unless $prefix is '/usr' in which case it defaults to '/lib/udev/rules.d'.
2011-09-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add udev rules file to RPM package
2011-09-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Make *.ids generation optional (failable)
Just because one is hacking on git repo, doesn't mean he/she always have
access to Internet so download of *.ids should not fail the entire
build. They are not strictly needed anyways.
2011-09-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Don't worry on failure to install udev rule file
This can easily fail (e.g if `make install` is run unprivileged) and its
not a big deal if it does.
Hard-code GIBIBYTES definition
GIR scanner doesn't like it and its not like this value is going to
ever change anyways.
Load resources metadata from XML
Implement loading of OS minimum and recommended resources from XML.
Minor code clean-up
API to add/list resources to/from Os
Add API to add/list minimum and recommended resources to/from Os.
Add ResourcesList class
Add special list class to hold Resources instances.
Add Resources class
Add a new class to represent resource requirements/recommendations for OSs.
Add resource data for windows OSs
Add resource requirements and recommendations data for windows OSs.
2011-09-12 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fix typos in OsinfoMedia doc comments
2011-09-02 Daniel P. Berrange <dan@berrange.com>
Allow OSINFO_DATA_DIR env var to override default location for DB
Avoid referencing NULL pointer if data dir does not exist
Add osinfo-detect.exe to the mingw32 RPM spec
2011-09-02 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add Udev support
If enabled, provide a udev rule to listen to insertion/removal of
ISO9660 media and sets some helpful (to apps) properties on the device
if media is bootable.
2011-09-01 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add utility app that detects OS given a media
Given a path to a ISO9660 image/device, detects if media is bootable and
the relavent OS if media is an installer for it.
2011-08-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Async variant of osinfo_media_create_from_location()
'new' -> 'create' in osinfo_media_new_from_location()
Renaming osinfo_media_new_from_location() to
osinfo_media_create_from_location() to emphasize the factory nature
of this function.
Also the convention in g* world is to keep _new() as only thin wrappers
around g_object_new() calls.
Replace OsinfoDb.guess_os_from_location() by guess_os_from_media()
Add osinfo_media_new_from_location()
Add API to create a OsinfoMedia object, given an installation media
location. This includes moving of installation media errors to
osinfo_media module and rename from OsinfoInstallMediaError to
OsinfoMediaError.
Some application/libraries will want to be able to get basic information
about an installation media without having to load the whole metadata DB.
2011-08-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add osinfo_db_guess_os_from_location()
Add API to guess OS given an installation media location.
Explicitly reguire Gio GIR
2011-08-04 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add media metatadata to RHEL & some Windows OSs XML
Add ISO metatadata to Fedora media XML
Load media metadata from XML
Add API to add/list medias to/from OS
Add MediaList class
Add special list class to hold Media instances.
Add Media class
Add a new class to represent installation media, typically an CD/DVD ISO
or an online filesystem hierarchy.
Correct a typo in OSinfoOS doc comment
2011-07-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Remove '-' from Fedora OSs' short ID
This is to ensure compatibility with existing OS dictionary of
python-virtinst and virt-manager.
2011-07-01 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Correct node name
The 'derives' element in OS XML is supposed to be 'derives-from'.
Use correct param names in Product getters
2011-06-29 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add a 'class' attribute to OS
This is the generic family this OS belongs to, for example Linux, Windows,
Solaris, UNIX etc.
2011-06-28 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
VBox USB Tablet is an 'input' device, not 'block'
2011-06-28 Daniel P. Berrange <berrange@redhat.com>
Tricks to avoid gcc set-but-not-read-vars warning
2011-06-23 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Correct 2 small spelling mistakes in docs
Add osinfo_loader_process_default_path()
Add a method that enables applications to load the metadata osinfo
provides without having to specify any paths.
Micro coding-style fixes
- Remove redundant newlines.
- Add newlines where needed.
Add some randome OS metadata
Add MS-DOS and Novell Netware metadata.
2011-06-22 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add *BSD OS metadata
Add Sun Solaris OS metadata
2011-06-17 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add Windows OS metadata
Correct a typo in all XML files
Add generic Linux OS metadata
Add Ubuntu OS metadata
Add Debian OS metadata
Add Mandriva OS metadata
Add Suse Linux Server OS metadata
2011-06-15 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add more Fedora OS metadata
Now libosinfo knows every Fedora OS known to python-virtinst.
Add media information for f13 & f14
Add more RHEL OS metadata
Now libosinfo knows every RHEL OS known to python-virtinst.
2011-06-09 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add basic devices to RHEL OSes
2011-06-08 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Rename RHEL OS metadata file as par latest changes
Add OS metadata for supported RHEL releases
Also add last supported RHEL releases to allow upgrades to supported
ones.
Add XML for Qemu/KVM PS2 devices
Add PS2 keyboard and mouse to Qemu/KVM device DB.
2011-06-03 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Add XML for Qemu/KVM USB devices
Currently, it only has one device.
2011-06-01 Daniel P. Berrange <berrange@redhat.com>
Fix some API docs to make introspection work again
Add some more realistic data files
Start on basic metadata for Fedora/RHEL and QEMU/Xen
Only load DB files with a .xml extension
To ensure we skip over random files, only load things ending
with a '.xml' extension
2011-06-01 Zeeshan Ali <zeeshanak@gnome.org>
Strip correct C namespace
Fixes build against latest GIR.
2011-04-19 Daniel P. Berrange <berrange@redhat.com>
Add some scripts for converting USB/PCI ID lists to XML
Add some scripts which are able to convert from the raw USB
and PCI device ID lists to the osinfo XML format. Do not
actually use these scripts by default though, because the
osinfo loader can read the native formats *much* faster
than reading the XML variant
Pull down USB and PCI device IDs from sourceforge
Populate the database with all USB and PCI device IDs known
to the master sourceforge databases
Load all files in data directory in example scripts
* examples/demo.js, examples/demo.py: Load all files
from data/
Allow the DB loader to process sf.net PCI/USB id lists
Allow the DB loader to process the master lists of PCI and
USB device IDs, as downloadable from sourceforge.
Improve scalability of object list lookups
Looking up a entity by ID is O(n) due to iteration over an
array. This is impossibly slow with the full set of PCI
and USB device IDs loaded. Add in a hashtable to provide
for O(1) lookups
Remove TAB characters (again)
Allow arbitrary custom xml attributes with an x- prefix
* data/libosinfo-dummy-data.xml: Some example custom attrs
* osinfo/osinfo_entity.c, osinfo/osinfo_entity.h: Add a
method for setting a parameter, rather than just adding
to it
* osinfo/osinfo_loader.c: Allow custom xml attrs with
an 'x-' prefix
* demo.js, demo.py: Update to demo new capabilities
Add constants and API accessors for common parameters
There are some standard parameters for products, devices and
devicelinks. Add static constants and API accessors for these
2010-09-02 Daniel P. Berrange <berrange@redhat.com>
Add notes about possible data sources for populating the database
Add notes about the possible sources for finding device info
about operating systems and hypervisor platforms
* docs/data-sources.txt: Note data sources for OS and hypervisors
Remove some bogus symbols to fix Win32
Win32 linker does not like linker scripts containing symbols
which do not exist
* osinfo/libosinfo.syms: Remove bogus symbols
Introduce a OsinfoDeployment object
The supported devices for deploying an OS on a platform are
tracked as part of the main OS device list. This is not
sufficiently flexible because it does not allow for tracking
extra metadata against a (os, platform) pair. Introduce a
new "deployment" object to track the metadata for deploying
an OS on a platform.
* docs/object-model.fig: Illustrate the object model
* data/libosinfo-dummy-data.xml: Introduce deployment
metadata
* examples/demo.py, examples/demo.js: Update for new
APIs
* osinfo/Makefile.am, osinfo/libosinfo.syms,
osinfo/osinfo.h, osinfo/osinfo_db.c, osinfo/osinfo_db.h
osinfo/osinfo_db.h, osinfo/osinfo_deployment.h,
osinfo/osinfo_deploymentlist.c, osinfo/osinfo_deploymentlist.h,
osinfo/osinfo_devicelink.c, osinfo/osinfo_loader.c: Introduce
an explicit deployment object
* osinfo/osinfo_os.c, osinfo/osinfo_os.h, test/test-db.c,
test/test-os.c: Remove tracking of hypervisor preferred
devices
* osinfo/osinfo_devicelinkfilter.c,
osinfo/osinfo_devicelinkfilter.h: Allow filtering against
a link and its target device at the same time.
Introduce a new OsinfoProduct abstract class
It is neccessary to track upgrades/clones/derives relationships
for platforms as well as operating systems. Introduce a common
parent class for both called OsinfoProduct
* data/libosinfo-dummy-data.xml: Make platform XML use the
common product XML attributes/relationships
* docs/reference/Libosinfo-docs.xml, docs/reference/Libosinfo-sections.txt,
docs/reference/Libosinfo.types: Update for new/renamed classes
* osinfo/Makefile.am, osinfo/libosinfo.syms,
osinfo/osinfo.h: New OsinfoProduct class
* osinfo/osinfo_product.c, osinfo/osinfo_product.h,
osinfo/osinfo_productlist.h, osinfo/osinfo_productlist.c: New
classes
* osinfo/osinfo_os.c, osinfo/osinfo_os.h,
osinfo/osinfo_platform.c, osinfo/osinfo_platform.h: Change
to inherit from OsinfoProduct
* osinfo/osinfo_oslist.c, osinfo/osinfo_oslist.h,
osinfo/osinfo_platformlist.c, osinfo/osinfo_platformlist.h:
Change to inherit from OsinfoProductList
* osinfo/osinfo_db.c, osinfo/osinfo_db.h, osinfo/osinfo_loader.c:
Update for new class hierarchy
* osinfo/osinfo_osfilter.c, osinfo/osinfo_osfilter.h,
osinfo/osinfo_osfilter.h, osinfo/osinfo_productfilter.h: Rename
filter class
Rename 'OsinfoHypervisor' to 'OsinfoPlatform'
Not all virtualization technologies are hypervisors. Rename the
OsinfoHypervisor object to the more general term OsinfoPlatform.
* data/libosinfo-dummy-data.xml: Rename 'hypervisor' element
to 'platform'
* docs/reference/Libosinfo-docs.xml, docs/reference/Libosinfo-docs.xml
docs/reference/Libosinfo.types: Update docs for new object name
* examples/demo.js, examples/demo.py: Update for object name
* osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_hypervisorlist.c, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_platform.h, osinfo/osinfo_platformlist.c,
osinfo/osinfo_platformlist.h, osinfo/osinfo_platform.c,
osinfo/osinfo.h, osinfo/osinfo_db.c , osinfo/osinfo_db.h,
osinfo/osinfo_device.c, osinfo/osinfo_devicelink.c,
osinfo/osinfo_devicelink.c, osinfo/osinfo_os.h,
osinfo/osinfo_loader.c, osinfo/libosinfo.syms,
osinfo/Makefile.am: Rename OsinfoHypervisor to OsinfoPlatform
* test/Makefile.am, test/test-os.c, test/test-hypervisor.c,
test/test-platform.c, test/test-db.c: Update for object
name
Expand example programs
Expand the example programs to demonstrate how to obtain the
the preferred device for an operating system/hypervisor pair
* examples/demo.js, examples/demo.py: Demonstrate device
filtering
Turn internal device link into a public object
To enable arbitrary parameters to be set on the association
between the device & hypervisor/os objects, turn the internal
device link struct into a formal managed OsinfoEntity called
OsinfoDeviceLink.
* data/libosinfo-dummy-data.xml: Make 'driver' into a entity
parameter instead of link text content
* docs/reference/Libosinfo-docs.xml,
docs/reference/Libosinfo-sections.txt: Add OsinfoDeviceLink
and OsinfoDeviceLinkList objects
* docs/reference/Libosinfo-sections.txt, osinfo/libosinfo.syms,
osinfo/osinfo.h, osinfo/osinfo_devicelink.c,
osinfo/osinfo_devicelink.h, osinfo/osinfo_devicelinklist.c,
osinfo/osinfo_devicelinklist.h: Add OsinfoDeviceLink and
OsinfoDeviceLinkList objects.
* osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_os.c, osinfo/osinfo_os.c: Convert internal
device links to use OsinfoDeviceLink object
* osinfo/osinfo_loader.c: Allow setting of 'driver' attribute
on device links
* test/test-hypervisor.c, test/test-os.c: Update for API
change
2010-09-01 Daniel P. Berrange <berrange@redhat.com>
Fix VPATH build for gtk-doc
gtkdoc-scan is run from the source dir, so it the path must be
relative to the source dir, not using $(top_srcdir) which is
relative to the build dir.
* docs/reference/Makefile.am: Fix docs path
Add two examples using GObject introspection
Add two example programs using GObject introspection bindings
for Python (PyGObject) and Javascript (GJS)
* examples/demo.js: Javascript demo
* examples/demo.py: Python demo
* Makefile.am, configure.ac: Add examples Makefile
* examples/Makefile.am: Include demos in dist
* libosinfo.spec.in: Include demo programs + docs
* mingw32-libosinfo.spec.in: Kill docs
Ensure args can be passed to autogen.sh
Ensure that autogen.sh honours args passed to it, but passing
them on down to gnome-autogen.sh, enabling usage such as
./autogen.sh --enable-coverage
* autogen.sh: Pass command line args down to gnome-autogen.sh
Remove list iterator & add API to retrieve a GList
The OsinfoList iterator method does not play nicely with
gobject introspection bindings. Remove it, and replace with
a method that returns a GList of elements. This trivially
maps to the language bindings native list/array classes
which are natively iterable.
* docs/reference/Libosinfo-sections.txt: Remove osinfo_list_foreach
and add osinfo_list_get_elements
* osinfo/osinfo_list.c, osinfo/osinfo_list.h: Remove osinfo_list_foreach
and add osinfo_list_get_elements
* osinfo/osinfo_db.c: Rewrite to use g_list_foreach and
fix some GList annotations to specify element type
correctly.
* test/test-list.c: Rewrite to use g_list_foreach
Add API docs for all public methods
Add GTK-DOC api docs for all public methods, signals, objects,
enums, etc. Include annotations required for GObject Introspection
to get reference counting / memory allocation correct when doing
automatic language binding generation
* osinfo/*.c: Add API docs for all methods / signals / objects / enums
* osinfo/*.h: Ensure parameter names match those in the corresponding
.c file implementation to avoid confusing gtk-doc
Remove 'self' as a parameter name.
Using 'self' as a parameter name in methods makes the code feel
more object-oriented, but it doesn't play nicely with gtk-doc
because 'self' isn't a very descriptive name for docs. Replace
all occurances of a 'self' with a short name for the object in
question.
* osinfo/*.c, osinfo/*.h: Remove use of 'self' as a parameter
name
Integrate gtk-doc into the build for API docs
* Makefile.am: Add docs subdir
* autogen.sh: Enable gtk-doc build by default
* configure.ac: Add check for gtk-doc
* doc/api.txt, doc/overview.txt: Remove inaccurate, outdated
docs
* docs/Makefile.am: Add reference/ subdir
* docs/reference/: bare template for gtk-doc content
2010-08-31 Daniel P. Berrange <berrange@redhat.com>
Add emacs magic for indentation rules
Fix some files where tabs have crept in for indentation and
add emacs magic to ensure they don't return.
* osinfo/*.h, osinfo/*.c, tests/*c: Add footer setting emacs
indentation rules. Re-indent to comply.
Avoid directly exposing internal lists in OsinfoDb
Don't directly expose the OsinfoList objects used by the
OsinfoDb class. Instead return a shallow copy of the lists.
Add formal APIs for adding entities to the DB.
* osinfo/osinfo_devicelist.c, osinfo/osinfo_devicelist.h,
osinfo/osinfo_hypervisorlist.c, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_oslist.c, osinfo/osinfo_oslist.h: Add new
constructor to copy an existing list
* osinfo/osinfo_list.c, osinfo/osinfo_list.h: Add API to
copy elements of an existing list
* osinfo/osinfo_db.c, osinfo/osinfo_db.h: Shallow copy
the lists before returning them. New APIs for adding
entities to the DB.
* test/test-list.c, test/test-db.c: Update for changed APIs
2010-08-27 Daniel P. Berrange <berrange@redhat.com>
Ensure all GList return values are duplicated
To avoid exposing callers to the internal implementation,
ensure all returned GList * values are shallow-copied.
All callers must g_list_free the value. The elements are
not copied.
* osinfo/osinfo_db.c, osinfo/osinfo_db.c,
osinfo/osinfo_filter.c, osinfo/osinfo_osfilter.c: Copy
all GList return values.
* test/test-entity.c, test/test-filter.c,
test/test-osfilter.c: Free GList values
Enable test suite during automated & RPM builds
* autobuild.sh: Enable tests
* configure.ac: Allow tests to be disabled for Win32
* libosinfo.spec.in: Enable tests
* libosinfo.spec.in: Disable tests
* test/test-loader.c, test/Makefile.am: Fix VPATH build
Ignore more test programs
Convert loader to use GIO
Direct use of POSIX/stdc I/O is deprecated in favour of
the GIO system. Re-write the OsinfoLoader to use GIO
for loading XML from arbitrary paths/uris.
* configure.ac: Check for GIO library
* osinfo/Makefile.am: Link to GIO
* osinfo/osinfo_loader.c, osinfo/osinfo_loader.h: Port
to GIO
* test/osinfo.suppression: Supress many GIO data types
* test/test-loader.c: update for new GIO api.
Pull XML loader into a separate class
Instead of having a method on the OsinfoDb class
for loading XML, introduce a new object that can
handle XML loading. This then gives back a DB when
loading is finished
* osinfo/osinfo_db.c, osinfo/osinfo_db.h: Remove
backing-store property and xml loader methods
* osinfo/osinfo_loader.c, osinfo/osinfo_loader.h: New class
for loading XML files
* osinfo/osinfo_dataread.c: Delete old loader
* osinfo/libosinfo.syms, osinfo/osinfo.h,
osinfo/Makefile.am: New loader class
* test/Makefile.am, test/osinfo.suppression,
test/test-db.c, test/test-loader.c: Update to
use new loader class
Make OsinfoList typecheck the elements for compatibility
To avoid have an OsinfoList with a mixture of hypervisor,
os and device objects, associate an explicit type with
each list. The list will validate the data type matches
whenever adding elements to the list, or producing new
lists via union/intersect/filter operations.
* osinfo/osinfo_list.c, osinfo/osinfo_list.h: Add an
element-type property
* osinfo/osinfo_devicelist.c, osinfo/osinfo_hypervisorlist.c,
osinfo/osinfo_oslist.c: Set the element-type when creating
a new list
Lots of code fixes based on results from testsuite
This fixes numerous memory leaks throughout the code
identified by valgrind. It also fixes the const-ness
of many parameters
* osinfo/osinfo_dataread.c: Rewrite from scratch using DOM
APIs instead of streaming APIs
* osinfo/osinfo_db.h, osinfo/osinfo_db.c: Remove 'libvirtVer' property
and declare all gchar * parameters to be const. Fix some mem leaks
* osinfo/osinfo_entity.c, osinfo/osinfo_entity.h: Remove some
unnecessary strdup()s and fix some mem leaks
* osinfo/osinfo_filter.c: Fix mem leaks
* osinfo/osinfo_hypervisor.c, osinfo/osinfo_os.c: Allow some
object parameters to be NULL. Fix some mem leaks
* osinfo/osinfo_list.c: Fix some mem leaks
* osinfo/osinfo_osfilter.c: Fix some mem leaks
Comprehensive test suite
This adds a comprehensive test suite. Each test case
fulls covers a single class. Combined, they provide
100% function and 99% line coverage. All important
code branches are also covered.
* Makefile.am: Target to generate code coverage reports
* osinfo/Makefile.am: Add code coverage flags
* configure.ac: Enable use of 'check' for test suite
and use of gcc coverage flags
* test/test-*.c: One test suite per class
* test/test-skeleton.c: Remove obsoleted test
* test/osinfo.suppression: supress valgrind warning for
static data in glib type system
* test/Makefile.am: Link tests against libcheck library
2010-08-26 Daniel P. Berrange <berrange@redhat.com>
Add missing AC_ARG_ENABLE declaration
The configure.ac script was missing the AC_ARG_ENABLE declaration
for the gobject introspection code
* configure.ac: Add AC_ARG_ENABLE
2010-08-25 Daniel P. Berrange <berrange@redhat.com>
Add LGPLv2+ header to all source files
* osinfo/*.h, osinfo/*.c: Add license header text
* COPYING.LIB: LGPLv2+ license
* libosinfo.spec.in, mingw32-libosinfo.spec.in,
Makefile.am: Use COPYING.LIB instead of COPYING
Add formal RPM build infrastructure
* autogen.sh: Rewrite to use gnome-autogen.sh
* autobuild.sh: Automated RPM build control script
* configure.ac: Generate RPM specfiles
* Makefile.am: Distribute RPM specfile templates
* libosinfo.spec.in, mingw32-libosinfo.spec.in: RPM specs
* osinfo/Makefile.am, osinfo/libosinfo.syms: Fix Win32
portability problem
Fix Win32 portability problem in XML reader
stpcpy is a non-standard extension and can be replaced with
g_strdup_printf resulting in much clearer code. The d_type
entry doesn't exist in readdir() for most platforms.
* osinfo/osinfo_dataread.c: Fix Win32 portability
Add support for GObject introspection
Introspect the libosinfo API so that non-C language bindings
can be automagically generated
* osinfo/osinfo.h, osinfo/osinfo_dataread.c, osinfo/osinfo_db.h,
osinfo/osinfo_device.h, osinfo/osinfo_devicelist.h,
osinfo/osinfo_entity.h, osinfo/osinfo_filter.h,
osinfo/osinfo_hypervisor.h, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_os.h, osinfo/osinfo_oslist.h: Add explicit
includes to match build dependancies, to satisfy g-ir-scanner
limitations. Rename enum values to allow them to be extracted
with correct names
Add a pkg-config data file for building apps
* configure.ac: Generate libosinfo.pc
* osinfo/Makefile.am: Install pkg-config file
* osinfo/libosinfo-1.0.pc.in: Master pkg-config template
Use pkg-config for checking for libxml
Rather than creating huge amounts of m4 logic, just use pkg-config
to check for libxml2 library. Make libxml2 compulsory
* configure.ac: Simplify libxml2 check
Add proper ELF versioning
Rename library to libosinfo-1.0.la to allow parallel install if
we need to break ABI in the future. Add per-symbol version tagging
to allow fine grained automatic RPM dependancies. Make version
script portable to Win32
* configure.ac: Detect args for linker symbol file / format
* osinfo/Makefile.am: Rename library and use symbol versioning
* osinfo/libosinfo.syms: Symbol version script
Run configure at end of autogen.sh
It is usual practice to run configure at the end of
autogen.sh to save having to manually run it afterwards
* autogen.sh: Run configure
Pull OS relationship filtering into a subclass
The base filter object should only be concerned with
filtering OsinfoEntity objects. Filtering OsinfoOs
objects should be done by a sub-class.
* osinfo/osinfo_filter.c, osinfo/osinfo_filter.h: Remove
OS relationship filtering
* osinfo/osinfo_osfilter.c, osinfo/osinfo_osfilter.h:
New object to handle OS relationship filtering
* osinfo/osinfo_entity.h, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_os.h: Tweak some typedefs to santize
build ordering constraints
* osinfo/osinfo.h: Re-arrange include ordering to
match declaration usage
Move filter matching code out of entity into filter object
To eliminate a circular dependency, move the filter matching
code out of the OsinfoEntity object and into OsinfoFilter
object.
* osinfo/osinfo_entity.c, osinfo/osinfo_entity.h,
osinfo/osinfo_filter.c, osinfo/osinfo_filter.h,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_list.c,
osinfo/osinfo_os.c: Move filter matching code into
the OsinfoFilter object APIs
Fix filter class/object inheritance & add constructor
The OsinfoFilter structs mistakenly included the OsinfoEntity
structs, even though the type inherits direct from GObject.
* osinfo/osinfo_filter.c, osinfo/osinfo_filter.h: Fix
struct parent, and add an explicit constructor
Remove osinfo common module
Finally all objects are fully private and the common
code module can be banished.
* osinfo/osinfo_common.c, osinfo/osinfo_common.h: Delete
* osinfo/Makefile.am, osinfo/osinfo.h: Remove osinfo_common.h
* configure.ac: Use osinfo/osinfo_db.c in CONFIG_SRCDIR
* osinfo/osinfo_dataread.c, osinfo/osinfo_db.c,
osinfo/osinfo_db.h, osinfo/osinfo_device.h,
osinfo/osinfo_devicelist.h, osinfo/osinfo_entity.c,
osinfo/osinfo_entity.h, osinfo/osinfo_filter.c,
osinfo/osinfo_hypervisor.h, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_list.h, osinfo/osinfo_os.c,
osinfo/osinfo_os.h, osinfo/osinfo_oslist.h: Add the
main object typedefs, previously in the common module.
Rename osinfoRelationship to OsinfoOsRelationship.
Convert filter constraints from GTree to GHashTable
Simply code and follow more normal GLib practice by
using a GHashTable of GLists for filter property
storage, instead of a GTree of GPtrArrays
* osinfo/osinfo_filter.c, osinfo/osinfo_filter.h:
Convert to use a GHashTable of GLists for filter
properties
* osinfo/osinfo_common.c, osinfo/osinfo_common.h:
Remove unused int/string comparators
* osinfo/osinfo_dataread.c: Remove unused variable
Remove all remaining Hypervisor/Os structs out of common code
Make OsinfoOsPrivate, OsinfoHypervisorPrivate structs private
to their respective objects, and update all code which poked
at private data to use formal APIs
* osinfo/osinfo_common.h, osinfo/osinfo_common.c: Remove the
OsinfoOsPrivate, OsinfoHypervisorPrivate structs and
related helper methods
* osinfo/osinfo_os.c: Add OsinfoOsPrivate struct & helper
methods
* osinfo/osinfo_hypervisor.c: Add OsinfoHypervisorPrivate
struct & helper methods.
* osinfo/osinfo_db.c, osinfo/osinfo_entity.c,
osinfo/osinfo_filter.c: Convert to use APIs instead of
accessing private data of OS/Hypervisor objects.
Make entity object fully private
Make the OsinfoEntityPrivate struct fully private to
the OsinfoEntity object.
* osinfo/osinfo_common.h: Remove OsinfoEntityPrivate
* osinfo/osinfo_entity.c: Add OsinfoEntityPrivate
* osinfo/osinfo_list.c: Use API instead of direct
access to private data of OsinfoEntity objects
Convert entity property data into a GHashTable of GLists
Simply code and follow more normal GLib practice by
using a GHashTable of GLists for entity property
storage, instead of a GTree of GPtrArrays
* osinfo/osinfo_common.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_entity.c, osinfo/osinfo_entity.h: Convert
to use a GHashTable of GLists for properties
Turn OS relationships into a GList structure
Simplify storage of OS relationships by using a single GList
instead of a pair of GTree objects. The data access patterns
mean there is no change in access efficiency
* osinfo/osinfo_common.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_db.c, osinfo/osinfo_entity.c,
osinfo/osinfo_os.c, osinfo/osinfo_os.h: Replace
GTree with GList for OS relationships.
Remove sections from OS device list
Arranging devices in sections against operating systems duplicates
information already available via the 'class' attribute on
the device object. Removing this unneccessary data simplifies
the code, allowing a pair of GTree maps to be replaced by
a single GList.
* data/libosinfo-dummy-data.xml: Remove os sections
* osinfo/osinfo_common.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_os.c, osinfo/osinfo_os.h: Model
hypervisor devices in a GList instead of pair of GTrees
* osinfo/osinfo_device.c, osinfo/osinfo_device.h,
osinfo/osinfo_hypervisor.c: Update for API changes
Remove sections from hypervisor device list
Arranging devices in sections against hypervisors duplicates
information already available via the 'class' attribute on
the device object. Removing this unneccessary data simplifies
the code, allowing a pair of GTree maps to be replaced by
a single GList.
* data/libosinfo-dummy-data.xml: Remove hypervisor sections
* osinfo/osinfo_common.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h: Model
hypervisor devices in a GList instead of pair of GTrees
Pass a GError all the way through the XML parser
When reading the XML files, a GError should be passed
all the way into the parser functions to enable more
useful error reporting
* osinfo/osinfo_dataread.c: Pass GError down into
all XML parser APIs
* osinfo/osinfo_db.c, osinfo/osinfo_db.h: Remove
return value, since this can be detected from
the GError status
* test/test-skeleton.c: Pass in a GError & report
on failures
Convert OS hypervisor sections from GTree to GHashTable
Remove another GTree data structure in favour of GHashTable
for simpler, more efficient code
* osinfo/osinfo_common.h: Change OsinfoOsPrivate struct
to use a GHashTable
* osinfo/osinfo_common.c, osinfo/osinfo_dataread.c,
osinfo/osinfo_device.c, osinfo/osinfo_os.c: Update to
use hash table APIs
Remove 2 unused struct definitions
The __osinfoPopulateListArgs and __osinfoFilterPassArgs structs
are not used anymore.
* osinfo/osinfo_common.h: Remove unused structs
Remove unused FREE_N macro
The FREE_N macro is not used anywhere
* osinfo/osinfo_common.h: Remove FREE_N
Fix reference count handling in device list
When adding an OsinfoEntity to an OsinfoList, an explicit
reference should be taken on the entity, rather than
relying on the caller to have done it.
* osinfo/osinfo_list.c: Take an extra reference when
adding an entity to the list
* osinfo/osinfo_dataread.c: Release a reference
after adding an entity to the list
Turn filter matching functions into formal APIs
Instead of having the osinfo_common.c module poking into
the private parts of OsinfoFilter and OsinfoEntity
objects, move the code into OsinfoEntity and use formal
APIs for all data access
* osinfo/osinfo_filter.c, osinfo/osinfo_filter.h,
osinfo/osinfo_entity.c, osinfo/osinfo_entity.h: Add
API for matching entities against filters
* osinfo/osinfo_common.c, osinfo/osinfo_common.h: Remove
all entity filtering code.
* osinfo/osinfo_device.c, osinfo/osinfo_hypervisor.c,
osinfo/osinfo_list.c, osinfo/osinfo_os.c: Update to
use formal entity filtering APIs
Replace some temporary GTree objects with GHashTable
Using a GHashTable + GList combination instead of GTree
and GPtrArray results in shorter, simpler code and is
more inline with normal GLib practice.
* osinfo/osinfo_common.h, osinfo/osinfo_db.c,
osinfo/osinfo_db.h, osinfo/osinfo_list.c: Replace
several GTree objects with GHashTable
Remove unused error strings
Since most of the GError code was remove, the method
__osinfoErrorToString is now unused, as are all the
error strings. Remove them all
* osinfo/osinfo_common.c, osinfo/osinfo_common.h: Remove
__osinfoErrorToString and all strings
Make device object struct fully private
Classes should not expose their private bits to each other. Make
the OsinfoDevice private struct truely private.
* osinfo/osinfo_common.h: Remove OsinfoDevicePrivate
* osinfo/osinfo_device.c: Add OsinfoDevicePrivate
* osinfo/osinfo_devicelist.c, osinfo/osinfo_hypervisorlist.c,
osinfo/osinfo_oslist.c: Change 'int tmp' to 'gboolean unsed'
Make osinfo DB struct private & change to use a OsinfoList internally
Classes should expose their private bits to each other. Make
the OsinfoDb private struct truely private. Switch from using
a GTree in OsinfoDb over to a OsinfoList to simplify the code.
* osinfo/osinfo_db.c, osinfo/osinfo_db.h: Add private data
struct & convert from OsinfoList instead of GTree
* osinfo/osinfo_common.h: Remove OsinfoDbPrivate
* osinfo/osinfo_dataread.c, osinfo/osinfo_devicelist.h,
osinfo/osinfo_hypervisorlist.h, osinfo/osinfo_oslist.h: Update
for API changes
* osinfo/osinfo_list.c, osinfo/osinfo_list.h: Add API
for iterating over elements & finding an entity based
on its id.
Add constructors for all objects. Remove constructor for abstract list object
While using g_object_new() is functionally fine, it is not
type-safe/checked. It should generally only be used by
bindings for non-C language. Add explicit constructors for
every object and update all callers of g_object_new to use
the new constructors.
* osinfo/osinfo.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_db.c, osinfo/osinfo_db.h,
osinfo/osinfo_device.c, osinfo/osinfo_device.h,
osinfo/osinfo_devicelist.c, osinfo/osinfo_devicelist.h,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_hypervisorlist.c, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_list.c, osinfo/osinfo_list.h,
osinfo/osinfo_os.c, osinfo/osinfo_os.h,
osinfo/osinfo_oslist.c, osinfo/osinfo_oslist.h: Add
constructors for all objects & use them
Remove 'db' property from entity object to avoid circular reference
The OsinfoDb object holds a reference to every OsinfoEntity.
If the OsinfoEntity also holds a back-reference to OsinfoDb
then no memory will ever be freed. The back-reference is
not used in the code, so just remove it
* osinfo/osinfo_common.h, osinfo/osinfo_dataread.c,
osinfo/osinfo_entity.c: Remove back-reference to the
OsinfoDb object from OsinfoEntity
Remove GError from most APIs
GLib documents that GError should only be used for recoverable
runtime errors, not programmer errors. The latter should use
g_return_val_if_fail / g_return_if_fail macros to display the
programmer error
* osinfo/osinfo_common.c, osinfo/osinfo_common.h,
osinfo/osinfo_db.c, osinfo/osinfo_db.h,
osinfo/osinfo_device.c, osinfo/osinfo_device.h,
osinfo/osinfo_entity.c, osinfo/osinfo_entity.h,
osinfo/osinfo_filter.c, osinfo/osinfo_filter.h,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_os.c, osinfo/osinfo_os.h: Remove GError
from most public APIs
Remove unused error variables from more iterators
The iterators used in the OsinfoDb class pass around an GError
object but none of the codepaths can ever fail, since all the
ENOMEM code was remove. The GError variable is thus redundant
* osinfo/osinfo_common.h, osinfo/osinfo_db.c: Remove GError
from the iterators
Remove many duplicate methods from device, hv & os list classes
The OsinfoDeviceList, OsinfoHypervisorList and OsinfoOsList
classes don't need to provide accessors for list elements,
since those are all available via the superclass OsinfoList.
Re-work list intersection, union & filter APIs so that
they add to the current list. Add constructors that
allow creation of new lists with intersections, unions
and filtering.
* osinfo/osinfo_devicelist.c, osinfo/osinfo_devicelist.h,
osinfo/osinfo_hypervisorlist.c, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_oslist.c, osinfo/osinfo_oslist.h: Remove all
list element accessors
* osinfo/osinfo_list.c, osinfo/osinfo_list.h: Add constructors
for union, filter & intersection operations.
Remove unused error variable from db populate list iterator
The GError object passed around when getting lists of OS,
or Hypervisor objects from the DB, is never actually set,
nor can failure ever occur in any of the codepaths.
Since it is unused, it can be removed completely.
* osinfo/osinfo_common.h: Remove errcode & err from
struct __osinfoPopulateListArgs.
* osinfo/osinfo_db.c: Don't pass around GError object
when populating entity lists
Make osinfo_list_add into a public API
Make osinfo_list_add a public API on OsinfoList since
apps should be allowed to manipulate objects at will
if they're not using the XML loader. This also avoids
compile warnings from other objects using this API
without it being declared
* osinfo/osinfo_list.h, osinfo/osinfo_list.c: Make
osinfo_list_add a public API
* osinfo/osinfo_db.c, osinfo/osinfo_filter.c,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_os.c: Update
for changing API name
Remove all bad signed/unsigned casts in XML handling
libxml2 strings are all 'unsigned char*' but C world normally
uses 'char *', or 'gchar *' in GLib. Add appropriate casts
and change variable types to avoid compiler warnings about
implicit signed/unsigned casts.
* osinfo/osinfo_dataread.c: Fix compile warnings about
signed/unsigned string casts
Remove more malloc failure checks
GLib will always abort() upon malloc failure, so there is
no need to check return value of any g_object_new, g_new
or g_strdup API call. Remove all this redundant ENOMEM
checking
* osinfo/osinfo_common.c, osinfo/osinfo_dataread.c,
osinfo/osinfo_db.c, osinfo/osinfo_devicelist.c,
osinfo/osinfo_entity.c, osinfo/osinfo_filter.c,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisorlist.c,
osinfo/osinfo_list.c, osinfo/osinfo_os.c,
osinfo/osinfo_oslist.c: Remove all ENOMEM checks
Sanitize naming of filter object APIs
The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.
* osinfo/osinfo_filter.c, osinfo/osinfo_filter.h: Convert
API naming to use lowercase + underscores. Add an
explicit constructor.
Sanitize naming of all list object APIs
The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.
* osinfo/osinfo_devicelist.c, osinfo/osinfo_devicelist.h,
osinfo/osinfo_hypervisorlist.c, osinfo/osinfo_hypervisorlist.h,
osinfo/osinfo_list.c, osinfo/osinfo_list.h: Convert
API naming to use lowercase + underscores. Add
explicit constructors.
* osinfo/osinfo_db.c, osinfo/osinfo_filter.c,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_os.c: Update
for changing API naming
Santize naming of device, hypervisor and os object APIs
The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.
* osinfo/osinfo_device.c, osinfo/osinfo_device.h,
osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
osinfo/osinfo_os.c, osinfo/osinfo_os.h: Convert
API naming to use lowercase + underscores. Add
explicit constructors.
Sanitize API naming for OsinfoEntity class
The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.
* osinfo/osinfo_common.h: Remove declaration of
methods that belong in osinfo_entity.h
* osinfo/osinfo_entity.c, osinfo/osinfo_entity.h: Convert
API naming to use lowercase + underscores. Add an
explicit constructor.
* osinfo/osinfo_filter.c, osinfo/osinfo_hypervisor.c: Update
for changed API names
Sanitize API naming for OsinfoDb class
The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.
* osinfo/Makefile.am: Add -Wl,-no-undefined to ensure
any undefined symbols are caught
* osinfo/osinfo_common.h: Remove declaration of
methods that belong in osinfo_db.h
* osinfo/osinfo_db.c, osinfo/osinfo_db.h: Convert
API naming to use lowercase + underscores. Add an
explicit constructor.
* test/test-skeleton.c: Fix for changed API naming
and use OsinfoDb constructor
Remove all redundant malloc failure checks
GLib will always abort() upon malloc failure, so there is
no need to check return value of any g_object_new, g_new
or g_strdup API call. Remove all this redundant ENOMEM
checking
* osinfo/osinfo_common.c, osinfo/osinfo_db.c,
osinfo/osinfo_device.c, osinfo/osinfo_entity.c,
osinfo/osinfo_filter.c, osinfo/osinfo_os.c: Remove
all ENOMEM checking
Add decl for all _get_type() methods & enable warnings
Eliminate compile warnings about undeclared XXX_get_type()
methods, by adding declarations for all objects.
Switch to using standard GNOME m4 magic for compile
warnings. Force enablement of automake maintainer
mode, so that Makefile is re-generated if Makefile.am
ever changes. Enable silent build rules so that compile
warnings can be more easily spotted.
* Makefile.am: Whitespace tweak
* configure.ac: Remove -Wall, -Werror. Add
GNOME_COMPILE_WARNINGS, GNOME_MAINTAINER_MODE_DEFINES,
AM_MAINTAINER_MODE, AM_SILENT_RULES
* osinfo/*.h: Add XXX_get_type() declarations for all
objects
* osinfo/Makefile.am: Add $(WARN_CFLAGS) to build
Move Makefile.am into each sub-dir
Move Makefile.am into each sub-dir so that built objects end
up in the same directory as the sources, instead of polluting
the top level. This will also enable the gobject introspection
makefile rules to be imported later
* .gitignore: test-skeleton & test-skeleton.sh
* Makefile.am: Remove all build rules, add SUBDIRS
* osinfo/Makefile.am: Add build rules for library
* test/Makefile.am: Add build rules for tests
* test/test-skeleton.c: Update to reflect changed
current directory during test execution
Move all source & headers into osinfo/ directory
The GLib/GObject standard practice is to have all source and
header files in the same directory, named after the library
prefix. Move all headers from api/ and inc/ into src/, then
rename src/ to osinfo/
* src/*, api/*, inc/*: Move to osinfo/
* Makefile.am: Update build rules for changed locations
* configure.ac: change AC_CONFIG_SRCDIR
2010-07-01 Arjun Roy <arroy@redhat.com>
Moved over API to use glib/gobject. API definitions have changed, though functionality remains identical. Added new features to list classes.
TODO: Extensive testing. Codebase compiles and simplest test of
creating/destroying DB works, but more is required.
2010-02-03 Arjun Roy <arroy@redhat.com>
Added autogen.sh
2010-02-03 Jim Meyering <meyering@redhat.com>
avoid legitimate gcc used-before-set warning
* test/test-filter.c (main): Initialize filter buffer before
trying to free it.
fix used-uninitialized bugs
* src/osi_device.c (dev_property_all_values): Initialize "kv" to NULL
to avoid using it uninitialized when there is no match.
* src/osi_hv.c (osi_get_hv_property_all_values): Likewise.
* src/osi_os.c (os_property_all_values): Likewise.
* src/osi_hv.c (osi_get_hv_property_first_value): Likewise.
* src/osi_os.c (osi_get_os_property_first_value): Likewise.
* src/osi_device.c (osi_get_device_property_value): Likewise.
include <string.h> for decl of strcmp, in test programs
remove more declarations of unused variables
avoid FP unused "osname" warning
* test/sample.c (main): Print "osname", so that variable
does not appear to be unused.
tests: fix test-filter failure
* test/test-filter.c (main): Don't reference "filter"
after freeing it: remove the failing assertion.
fix failing tests
remove decls of unused variables
avoid gcc warnings
* src/osi_os.c: Avoid warnings:
declaration of 'index' shadows a global declaration: s/index/idx/
unused variable 'cursor'
unused variable 'i'
* src/osi_device.c (osi_get_device_by_index): s/index/idx/
libraries must not call chdir; avoid getcwd, too
* src/osi_dataread.c: Include <stdlib.h>.
(osi_initialize_data): Don't call chdir. Use ".", rather than getcwd.
Add a directory name parameter.
Construct the dir-relative file name we'll read from.
Adjust sole caller.
autoconfiscate
* Makefile.am: New file.
* configure.ac: New file.
* Makefile: Remove.
* .gitignore: List ignorable files.
2010-01-28 Arjun Roy <arroy@redhat.com>
Updated README.
TODO:
1. Update docs
2. Better error handling and messages for reading XML data
3. More unit tests and more automation for unit tests.
2010-01-26 Arjun Roy <arroy@redhat.com>
Changed tests to accept data dir as a command line parameter.
Initial working codebase.
2009-11-09 Arjun Roy <arroy@redhat.com>
Added a few unit tests to the API for initializing/closing the library and setting hypervisors.
No implementation yet.
2009-11-08 Arjun Roy <arroy@redhat.com>
Added dummy data for testing purposes.
2009-11-06 Arjun Roy <arroy@redhat.com>
Initial commit with API definition, overview, and sample program.
No implementation at all yet.
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat