[Pkg-libvirt-commits] [Git][libvirt-team/libosinfo][upstream/latest] 192 commits: Post release version bump to 1.5.0

Guido Günther gitlab at salsa.debian.org
Sat Mar 14 21:23:16 GMT 2020



Guido Günther pushed to branch upstream/latest at Libvirt Packaging Team / libosinfo


Commits:
09db0c80 by Fabiano Fidêncio at 2019-03-01T17:18:18+01:00
Post release version bump to 1.5.0

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
a6df8b72 by Fabiano Fidêncio at 2019-03-07T10:58:28+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
c7402d1e by Fabiano Fidêncio at 2019-03-07T10:59:03+01:00
tests: Add coverage for _set_installation_url()

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
8480b222 by Fabiano Fidêncio at 2019-03-07T10:59:07+01:00
haikunightly: Update test data

Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
dd7c4f5e by Fabiano Fidêncio at 2019-03-07T10:59:07+01:00
haikur1beta1: Add tests data

Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
6c4b002d by Fabiano Fidêncio at 2019-03-07T15:36:26+01:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
769a8edf by Fabiano Fidêncio at 2019-03-07T15:37:09+01:00
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."

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
6e34c937 by Fabiano Fidêncio at 2019-03-07T15:37:25+01:00
spec: Add "BuildRequires: gcc"

Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
1f170d9e by Fabiano Fidêncio at 2019-03-07T15:38:58+01:00
spec: Use standard vala packaging pattern where vapi files are in -devel

This commit brings upstream the changes done on Fedora on
42b96ea66d7b3e.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
f99d8f13 by Fabiano Fidêncio at 2019-03-07T15:49:16+01:00
mingw: Use %mingw_find_Lang macro

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
b2245cb4 by Fabiano Fidêncio at 2019-03-07T15:49:20+01:00
mingw,spec: Fix the Source URL

https://releases.pagure.org/libosinfo/... instead of
https://releases.pagure.io/libosinfo/...

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>

- - - - -
6c039a40 by Cole Robinson at 2019-03-07T17:47:44-05:00
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 at redhat.com>
Signed-off-by: Cole Robinson <crobinso at redhat.com>

- - - - -
b19c1259 by Cole Robinson at 2019-03-07T17:47:44-05:00
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 at redhat.com>
Signed-off-by: Cole Robinson <crobinso at redhat.com>

- - - - -
63b735e3 by Fabiano Fidêncio at 2019-03-15T09:37:45+01:00
isodata,centos: Add a new LiveGNOME isodata

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
085cc956 by Fabiano Fidêncio at 2019-03-21T13:40:14+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
f5c9ab33 by Fabiano Fidêncio at 2019-03-21T13:41:02+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
0ad18102 by Fabiano Fidêncio at 2019-03-21T13:41:05+01:00
test-os: Remove test_resources_minimum_recommended_maximum

This test is now part of osinfo-db.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
4d19afbf by Fabiano Fidêncio at 2019-03-21T13:41:09+01:00
test-os: Remove test_resources_uniqueness

This test is now part of osinfo-db.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
01d9d5a3 by Fabiano Fidêncio at 2019-03-21T13:41:14+01:00
test-os: Remove test_devices_duplication

This test is now part of osinfo-db.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
0cb094a5 by Fabiano Fidêncio at 2019-03-27T08:42:01+01:00
Add a git-publish configuration file

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
e8e0ca90 by Fabiano Fidêncio at 2019-03-28T08:46:19+01:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
f834d281 by Fabiano Fidêncio at 2019-03-28T08:55:33+01:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
6aedc6df by Fabiano Fidêncio at 2019-03-28T08:58:02+01:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
27715e53 by Pino Toscano at 2019-04-02T14:32:35+02:00
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 at redhat.com>

- - - - -
53521628 by Fabiano Fidêncio at 2019-04-03T08:39:52+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
64d70a98 by Fabiano Fidêncio at 2019-04-03T08:40:02+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
8b3d24a9 by Fabiano Fidêncio at 2019-04-03T08:40:07+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
ec0e85b5 by Fabiano Fidêncio at 2019-04-03T08:40:12+02:00
test-db: Add test for guessing tree from OS

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
c62b8651 by Fabiano Fidêncio at 2019-04-03T08:40:17+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
24be8df5 by Fabiano Fidêncio at 2019-04-03T08:40:29+02:00
test-db: Add test to cover identifying a media with "unknown" arch

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
2626058a by Fabiano Fidêncio at 2019-04-03T08:41:41+02:00
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!).

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
19407398 by Fabiano Fidêncio at 2019-04-10T13:45:14+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
04ffe395 by Fabiano Fidêncio at 2019-04-10T13:50:19+02:00
test-image: Add test for loading an entry

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
46a75ec2 by Fabiano Fidêncio at 2019-04-12T11:21:55+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
1581f3f1 by Fabiano Fidêncio at 2019-04-12T11:22:26+02:00
test-image: Expand the tests to consider variants

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
8134ce75 by Fabiano Fidêncio at 2019-04-12T11:22:29+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
e971e7ab by Fabiano Fidêncio at 2019-04-12T11:25:00+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
7159b2cc by Fabiano Fidêncio at 2019-04-12T11:25:17+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
44cab892 by Fabiano Fidêncio at 2019-04-12T11:48:36+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
da7ce6a0 by Fabiano Fidêncio at 2019-04-23T09:23:38+02:00
spec: Require GVFS

GVFS is required as g_file_new_from_path() and g_file_new_from_uri()
rely on GVFS.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
04df3bf2 by Fabiano Fidêncio at 2019-04-23T09:23:40+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
4627049c by Fabiano Fidêncio at 2019-05-02T09:06:08+02:00
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 at dahmer ~/src/upstream/libosinfo $ osinfo-install-script debian9
preseed.cfg
fidencio at dahmer ~/src/upstream/libosinfo $ osinfo-install-script debianstretch
Error finding OS: debianstretch
fidencio at dahmer ~/src/upstream/libosinfo $ osinfo-install-script ubuntu19.04
preseed.cfg
fidencio at 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 at dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script debian9
preseed.cfg
fidencio at dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script debianstretch
preseed.cfg
fidencio at dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script ubuntu19.04
preseed.cfg
fidencio at dahmer ~/src/upstream/libosinfo $ ./tools/osinfo-install-script ubuntudisco
preseed.cfg
````

https://gitlab.com/libosinfo/libosinfo/issues/19

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
d430b3cc by Fabiano Fidêncio at 2019-05-02T09:06:42+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
7f0cc3f3 by Fabiano Fidêncio at 2019-05-02T09:08:35+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
111621d3 by Fabiano Fidêncio at 2019-05-09T08:47:01+02:00
Revert "osinfo-detect: print os variants info for env format"

This reverts commit 44cab89243220223b0ac6312237c08a514055664, as the
commit was mistakenly pushed.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
0c89aa4b by Fabiano Fidêncio at 2019-05-09T08:47:20+02:00
install_config: Fix _get_installation_url docs

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
4ff424e9 by Fabiano Fidêncio at 2019-05-09T08:47:25+02:00
media: Document OSINFO_MEDIA_ERROR_NO_DIRECTORY_RECORD_EXTENT

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
577f5126 by Fabiano Fidêncio at 2019-05-09T08:48:37+02:00
media: Use the same parameter's name for .c and .h

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
f7b135ff by Fabiano Fidêncio at 2019-05-09T08:48:41+02:00
install_script: Document OsinfoInstallScriptInstallationSource

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
70fb25d1 by Fabiano Fidêncio at 2019-05-09T08:48:41+02:00
install_script: Use the same parameter's name in .c and .h

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
b453c51e by Fabiano Fidêncio at 2019-05-09T08:48:41+02:00
docs: Add missing docs links from main docs page

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
f1152e84 by Fabiano Fidêncio at 2019-05-09T08:48:41+02:00
Refresh translations from zanata

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
83a085e3 by Fabiano Fidêncio at 2019-05-09T09:50:05+02:00
Update NEWS for 1.5.0 release

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
bac86349 by Fabiano Fidêncio at 2019-05-09T11:24:49+02:00
Post release version bump to 1.6.0

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
bd88a6cb by Fabiano Fidêncio at 2019-05-10T23:53:04+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
949ad5e0 by Fabiano Fidêncio at 2019-05-22T13:19:42+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
d7bc838a by Fabiano Fidêncio at 2019-05-22T13:20:15+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
dfda0259 by Fabiano Fidêncio at 2019-05-22T13:20:18+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
eda448d0 by Fabiano Fidêncio at 2019-06-25T16:21:56+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
2494b56a by Fabiano Fidêncio at 2019-06-25T16:22:36+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
121952d8 by Fabiano Fidêncio at 2019-06-25T16:28:07+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
d958b461 by Fabiano Fidêncio at 2019-06-25T16:29:07+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
fa2af2da by Fabiano Fidêncio at 2019-06-25T16:29:25+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
242a1c5a by Fabiano Fidêncio at 2019-06-25T16:29:51+02:00
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).

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
a612bb47 by Fabiano Fidêncio at 2019-07-02T14:01:57+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
5fbf30e7 by Fabiano Fidêncio at 2019-07-02T14:02:57+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
12d73e90 by Fabiano Fidêncio at 2019-07-02T14:03:03+02:00
tree: Add treeinfo-* properties

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
47ac5983 by Fabiano Fidêncio at 2019-07-02T14:03:10+02:00
tree: Fix treeinfo APIs' documentation

The documention was copied & pasted from media APIs. Let's fix them ir
order to actually match trees/treeinfo.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
5b7711c5 by Fabiano Fidêncio at 2019-07-02T14:03:19+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
722e7d1d by Fabiano Fidêncio at 2019-07-02T14:03:25+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
a928ffc4 by Fabiano Fidêncio at 2019-07-02T14:03:34+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Tested-by: Cole Robinson <crobinso at redhat.com>

- - - - -
08fb8316 by Fabiano Fidêncio at 2019-07-10T13:15:36+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
3654abee by Fabiano Fidêncio at 2019-07-10T13:16:08+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
b62a2654 by Fabiano Fidêncio at 2019-07-16T15:10:51+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
567a734f by Fabiano Fidêncio at 2019-07-16T15:10:57+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
46a2ce7e by Fabiano Fidêncio at 2019-07-16T15:11:01+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
b6dc2c39 by Fabiano Fidêncio at 2019-07-16T15:11:05+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
0627a49c by Fabiano Fidêncio at 2019-07-16T15:11:08+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
255c5cf6 by Fabiano Fidêncio at 2019-07-16T15:11:12+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
4b456231 by Fabiano Fidêncio at 2019-07-16T15:11:16+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
d56f3eed by Fabiano Fidêncio at 2019-07-16T15:11:20+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
ac7eb2bb by Fabiano Fidêncio at 2019-07-16T15:11:23+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
9e278539 by Fabiano Fidêncio at 2019-07-16T15:11:27+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
3399704c by Fabiano Fidêncio at 2019-07-16T15:11:32+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
3715c9a1 by Fabiano Fidêncio at 2019-07-16T15:11:36+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
90e9512c by Fabiano Fidêncio at 2019-07-16T15:11:39+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
3d60d886 by Fabiano Fidêncio at 2019-07-16T15:11:43+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
627e8bf9 by Fabiano Fidêncio at 2019-07-16T15:11:48+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
6a7150b0 by Fabiano Fidêncio at 2019-07-16T15:11:52+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
2594c9ce by Fabiano Fidêncio at 2019-07-16T15:11:55+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
d8ed1fad by Fabiano Fidêncio at 2019-07-16T15:11:58+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
4e8d24f3 by Fabiano Fidêncio at 2019-07-16T15:12:03+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
84d96466 by Fabiano Fidêncio at 2019-07-16T15:12:07+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
e2cce9be by Fabiano Fidêncio at 2019-07-17T08:57:13+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
93783da4 by Fabiano Fidêncio at 2019-07-17T08:57:51+02:00
media: Fix indentation in create_from_location_async_data_free()

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
1c7dfc40 by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
tree: Remove not used Tree from _CreateFromLocationAsyncData struct

As the OsinfoTree is not used anywhere in our code, let's just remove
it.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
dd3eaa29 by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
c9fc9c39 by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
ac692eaa by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
e0e06c7b by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
16c99cfd by Fabiano Fidêncio at 2019-07-17T08:57:58+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
a6e17af9 by Fabiano Fidêncio at 2019-07-17T16:58:41-04:00
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 at redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
534dbfe9 by Fabiano Fidêncio at 2019-07-17T16:58:41-04:00
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 at redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
87ce15b4 by Fabiano Fidêncio at 2019-07-17T16:58:41-04:00
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 at redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
6151812a by Fabiano Fidêncio at 2019-07-18T11:38:27+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
04041c62 by Fabiano Fidêncio at 2019-07-18T11:38:33+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
76c35dac by Fabiano Fidêncio at 2019-07-26T16:01:19+02:00
spec,mingw: Add mingw*-libsoup as dependency

Commit ac692eaa4680 introduced libsoup dependency but forgot to add it
to the mingw spec files.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
8e057ee2 by Fabiano Fidêncio at 2019-07-26T20:58:46+02:00
Refresh translations from zanata

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
0b4fd657 by Fabiano Fidêncio at 2019-07-26T21:04:48+02:00
Update NEWS for 1.6.0 release

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
63b7de4b by Fabiano Fidêncio at 2019-07-26T21:18:34+02:00
Post release version bump to 1.7.0

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
af15a56e by Guido Günther at 2019-07-28T10:40:43+02:00
New upstream version 1.6.0
- - - - -
e707c331 by Fabiano Fidêncio at 2019-08-01T11:10:03+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
fb002362 by Fabiano Fidêncio at 2019-08-06T17:32:12+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
79511af6 by Fabiano Fidêncio at 2019-08-07T09:11:34+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
da64f89c by Fabiano Fidêncio at 2019-08-07T09:13:49+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
a87087d7 by Fabiano Fidêncio at 2019-08-07T09:13:55+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
cae73edb by Fabiano Fidêncio at 2019-08-16T08:38:17+02:00
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)

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Felipe Borges feborges at redhat.com

- - - - -
b907ebec by Fabiano Fidêncio at 2019-08-16T08:38:52+02:00
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)

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Felipe Borges feborges at redhat.com

- - - - -
1a2bf360 by Fabiano Fidêncio at 2019-08-20T08:48:43+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
a8eece63 by Fabiano Fidêncio at 2019-08-20T08:53:42+02:00
tools,detect: Remove 'env' output type

--format env was intended for udev scripts which was dropped in

  commit 16cf1f797728dff9e361033937faea9f38ffbe49
  Author: Zeeshan Ali (Khattak) <zeeshanak at 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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
1d185b05 by Fabiano Fidêncio at 2019-08-20T09:01:07+02:00
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().

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
7c27ebc6 by Fabiano Fidêncio at 2019-09-02T10:29:54+02:00
media: Check whether an InputStream is seekable

SoupInputStream is not seekable, causing errors as:
```
fidencio at 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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
43d1983a by Fabiano Fidêncio at 2019-09-12T10:59:07+02:00
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

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
904b65e7 by Fabiano Fidêncio at 2019-09-17T13:13:51+02:00
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"/>

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
ced9d122 by Fabiano Fidêncio at 2019-09-17T13:14:49+02:00
tests: Add test-firmware

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
32d1aba4 by Fabiano Fidêncio at 2019-09-17T13:14:54+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
750febb4 by Fabiano Fidêncio at 2019-09-17T13:14:59+02:00
tests: Add test-firmwarelist

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
e1861009 by Fabiano Fidêncio at 2019-09-17T13:15:04+02:00
os: Add support to Firmware

Let's add APIs for both adding a firmware to or retrieving the list of
firmwares from an OS.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
905b1610 by Fabiano Fidêncio at 2019-09-17T13:15:08+02:00
loader: Load Firmwares to OSes

Let's read the <firmware> attribute from the XMLs and store this into
our OS representation.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
6b8f93e0 by Fabiano Fidêncio at 2019-09-17T13:15:12+02:00
test-firmware: Add tests

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Cole Robinson <crobinso at redhat.com>

- - - - -
2d00c82b by Fabiano Fidêncio at 2019-09-25T13:25:23+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
11823700 by Fabiano Fidêncio at 2019-09-25T13:25:53+02:00
Indent includes/defines

By doing this, we can stop excluding files from
sc_preprocessor_indentation check.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
22d44b3d by Fabiano Fidêncio at 2019-09-25T13:25:55+02:00
cfg.mk: Remove exclude_file_name_regexp--sc_preprocessor_indentation

Let's run the check in all files.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
87b8dfea by Fabiano Fidêncio at 2019-09-25T13:25:57+02:00
cfg.mk: Remove exclude_file_name_regexp--sc_require_config_h*

Those were added as a copy & paste mistake from libvirt-glib.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
c3fa6667 by Fabiano Fidêncio at 2019-09-25T13:26:00+02:00
cfg.mk: Remove exclude_file_name_regexp--sc_prohibit_atoi_atof

Let's run sc_prohibit_atoi_atof in all files.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
cd693e65 by Fabiano Fidêncio at 2019-09-25T13:26:03+02:00
cfg.mk: Remove exclude_file_name_regexp--sc_space_tab

tests/isodata has been removed a long time ago.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
870f2bbc by Fabiano Fidêncio at 2019-09-25T13:26:05+02:00
cfg.mk: Update exclude_file_name_regexp--sc_bindtextdomain

Let's *not* run the check only for tests files.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
407916b4 by Fabiano Fidêncio at 2019-09-25T13:26:07+02:00
cfg.mk: Update exclude_file_name_regexp--sc_trailing_blank

tests/isodata/* have been removed a long time ago.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
e47cb25f by Fabiano Fidêncio at 2019-09-25T13:26:11+02:00
maint.mk: Update to the latest gnulib

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
4e0a3e87 by Fabiano Fidêncio at 2019-09-25T13:26:14+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
8421a0cd by Fabiano Fidêncio at 2019-09-25T13:26:17+02:00
readme: Add "Testing" section

Let's add a short section explaning how to build & run the libosinfo
tests.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
daf4faf5 by Fabiano Fidêncio at 2019-09-25T13:26:19+02:00
loader: Fix "switch-default" warning

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
25c45ffd by Fabiano Fidêncio at 2019-09-25T13:26:22+02:00
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).

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
c5acd148 by Fabiano Fidêncio at 2019-09-25T13:26:25+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
6b48b4a2 by Fabiano Fidêncio at 2019-09-25T13:26:28+02:00
spec: Remove BuildRoot definition

None of the currently supported distributions need that. Last one which
did was EL5 (which, thankfully, is EOL now).

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
aedb45b1 by Fabiano Fidêncio at 2019-09-25T13:26:31+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
37e117f6 by Fabiano Fidêncio at 2019-09-25T13:26:34+02:00
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+.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
634db79c by Fabiano Fidêncio at 2019-09-25T13:26:37+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
aa841e23 by Fabiano Fidêncio at 2019-09-25T13:26:41+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
58916e10 by Fabiano Fidêncio at 2019-09-25T13:26:44+02:00
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;

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
2cf6a6be by Fabiano Fidêncio at 2019-09-25T13:26:46+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
c4815cc7 by Fabiano Fidêncio at 2019-09-25T16:20:56+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
fd50c20f by Fabiano Fidêncio at 2019-09-25T16:21:03+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
99fe87eb by Fabiano Fidêncio at 2019-09-25T16:30:07+02:00
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;

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
2dcdc6d2 by Fabiano Fidêncio at 2019-09-25T17:49:55+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
f8ce7ac8 by Pino Toscano at 2019-10-08T10:42:02+02:00
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

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
2f621820 by Fabiano Fidêncio at 2019-10-14T13:09:24+02:00
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
'''

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
89a6160f by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
d7839b35 by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
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}'`

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
32cdda6d by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
ci: Keep the containers alphabetically sorted

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
d944535d by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
a12e1415 by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
ci: Add Debian 9 container

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
58b341a6 by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
ci: Add Ubuntu 16 container

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
466ff4bd by Fabiano Fidêncio at 2019-10-14T13:14:37+02:00
ci: Add Ubuntu 18 container

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
d061a1aa by Diego Escalante Urrelo at 2019-11-06T14:21:28+01:00
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 at redhat.com>

- - - - -
706b6fd0 by Diego Escalante Urrelo at 2019-11-06T14:21:31+01:00
list: Update GObject boilerplate

Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
371f3962 by Diego Escalante Urrelo at 2019-11-06T14:21:38+01:00
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 at redhat.com>

- - - - -
32de858c by Diego Escalante Urrelo at 2019-11-06T14:21:42+01:00
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 at redhat.com>

- - - - -
c91cd017 by Diego Escalante Urrelo at 2019-11-06T14:21:45+01:00
list: Fix gtk-doc string

Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
1f1e0e83 by Diego Escalante Urrelo at 2019-11-06T14:21:47+01:00
list: Remove unnecessary casts

Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
4647abdf by Diego Escalante Urrelo at 2019-11-06T14:21:48+01:00
list: Improve API safety

Add checks across the API to validate objects before trying to operate
on them.

Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
71cf18b0 by Fabiano Fidêncio at 2019-11-08T13:24:38+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by; Daniel P. Berrangé <berrange at redhat.com>

- - - - -
7ce3f790 by Andrea Bolognani at 2019-11-11T13:39:54+01:00
ci: Add Fedora 31

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
5011123a by Andrea Bolognani at 2019-11-11T13:39:59+01:00
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.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
07a532f5 by Fabiano Fidêncio at 2019-11-26T16:23:23+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
afffabae by Fabiano Fidêncio at 2019-11-26T16:23:37+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
23c856f4 by Fabiano Fidêncio at 2019-11-29T13:53:11+01:00
Refresh translations from zanata

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
92de6cad by Fabiano Fidêncio at 2019-11-29T14:02:29+01:00
Update NEWS for 1.7.0 release

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Reviewed-by: Ján Tomko <jtomko at redhat.com>

- - - - -
5bb663ca by Fabiano Fidêncio at 2019-11-29T15:27:09+01:00
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
```

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
cd6bd525 by Fabiano Fidêncio at 2019-11-29T15:51:45+01:00
Post release version bump to 1.8.0

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
e4c9dc6d by Fabiano Fidêncio at 2019-12-02T13:12:59+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
89379622 by Fabiano Fidêncio at 2019-12-02T13:21:33+01:00
mingw,spec: Add intltool as BuildRequires

Otherwise the translations are not generated.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
47f18f3f by Fabiano Fidêncio at 2019-12-02T13:21:33+01:00
mingw.spec: Add gcc as BuildRequires

meson requires both compiler and cross-compiler in order to perform a
cross build.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
c76c7c98 by Fabiano Fidêncio at 2019-12-02T13:21:33+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
add531d3 by Fabiano Fidêncio at 2019-12-02T13:21:33+01:00
mingw,spec: Drop gettext BuildRequires

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
328b7004 by Fabiano Fidêncio at 2019-12-02T13:21:33+01:00
mingw,spec: Use %autosetup

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
feeb7e08 by Fabiano Fidêncio at 2019-12-03T17:08:00+01:00
build: Use versioned symbols

During 25c45ffd9a1b8f18f56974d5b9b6b2c1da8cbd0c, supported for versioned
symbols were (wrongly) introduced but never used.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
bdef1d53 by Fabiano Fidêncio at 2019-12-04T12:20:20+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
1410f1b7 by Fabiano Fidêncio at 2019-12-04T12:20:23+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

- - - - -
b6df8e13 by Fabiano Fidêncio at 2019-12-04T14:18:16+01:00
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.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
1246a55a by Fabiano Fidêncio at 2019-12-04T14:19:50+01:00
Update NEWS for 1.7.1 release

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>

- - - - -
29e856f1 by Guido Günther at 2020-03-14T19:56:01+01:00
New upstream version 1.7.1
- - - - -


4 changed files:

- + .dir-locals.el
- + .mailmap
- − ABOUT-NLS
- AUTHORS


The diff was not included because it is too large.


View it on GitLab: https://salsa.debian.org/libvirt-team/libosinfo/-/compare/8ab1ba3b21b87e22cac5f3e636a589b975bfe801...29e856f129f1c4af90d969a627abbda9b0c500fe

-- 
View it on GitLab: https://salsa.debian.org/libvirt-team/libosinfo/-/compare/8ab1ba3b21b87e22cac5f3e636a589b975bfe801...29e856f129f1c4af90d969a627abbda9b0c500fe
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20200314/c2b5f123/attachment-0001.html>


More information about the Pkg-libvirt-commits mailing list