| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
One specfile containing both native and mingw builds is the
new best practice for Fedora. This reduces the maint burden
and ensures the mingw packages don't fall behind.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
This allows distributions that ship both versions of libsoup and choose
which version of libsoup will be linked.
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
|
|
| |
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
|
| |
See https://blog.tingping.se/2021/02/23/future-of-libsoup.html
This will fallback to libsoup-2.4 when libsoup3 isn't available.
Signed-off-by: Felipe Borges <felipeborges@gnome.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add_project_arguments() sets flags that apply to all invokations of the C
compiler toolchain by meson. On the surface it sounds fine to use this
for setting
-DGLIB_VERSION_MIN_REQUIRED=VER
-DGLIB_VERSION_MAX_ALLOWED=VER
as we want all our code to be constrained by these declared glib
versions to prevent us accidentally using APIS from newer glib by
mistake.
A subtle problem was revealed with the arrival of gobject-introspection
version 1.70. The g-ir-scanner program auto-generates some glib code
for handling introspection, and this generated code uses glib APIs that
are newer than our declared version and this triggers compile failures
tmp-introspectg6xadxkr/Libosinfo-1.0.c:251:3: error: ‘G_TYPE_FLAG_FINAL’ is deprecated: Not available before 2.70 [-Werror=deprecated-declarations]
251 | if (G_TYPE_IS_FINAL (type))
| ^~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from tmp-introspectg6xadxkr/Libosinfo-1.0.c:30:
/usr/include/glib-2.0/gobject/gtype.h:1050:3: note: declared here
1050 | G_TYPE_FLAG_FINAL GLIB_AVAILABLE_ENUMERATOR_IN_2_70 = (1 << 6)
| ^~~~~~~~~~~~~~~~~
tmp-introspectg6xadxkr/Libosinfo-1.0.c:251:13: error: Not available before 2.70 [-Werror]
251 | if (G_TYPE_IS_FINAL (type))
| ^~~~~~~~~~~~~~~~~
This is actually harmless, because systems with an older glib will also
have older g-ir-scanner and thus not be using these new APIs.
We need to exclude the glib version constraints from code generated by
glib tools, and thus means we have to stop using add_project_arguments()
and set cflags explicitly on each target.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
| |
They depend on the compiler in use, not the operating system
Signed-off-by: Timm Bäder <tbaeder@redhat.com>
|
|
|
|
| |
Signed-off-by: Rafael Fontenelle <rafaelff@gnome.org>
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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
Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
|
|
|
|
|
|
|
| |
Enforcing that variables are only declared in the beginning of a block
makes the code easier to read.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
| |
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@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
During 25c45ffd9a1b8f18f56974d5b9b6b2c1da8cbd0c, supported for versioned
symbols were (wrongly) introduced but never used.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|