From e778af463d251bb1a526cfaa67a1d4c214b5a098 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 May 2022 19:07:32 +0200 Subject: [PATCH 1/6] remove GoaKerberosIdentityQueryMode It is duplicate of GoaIdentityQueryMode and causes -Wenum-conversion errors. --- src/goaidentity/goakerberosidentityinquiry.c | 12 ++++++------ src/goaidentity/goakerberosidentityinquiry.h | 6 ------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/goaidentity/goakerberosidentityinquiry.c b/src/goaidentity/goakerberosidentityinquiry.c index 42d52c5b..ec2fc018 100644 --- a/src/goaidentity/goakerberosidentityinquiry.c +++ b/src/goaidentity/goakerberosidentityinquiry.c @@ -333,17 +333,17 @@ goa_kerberos_identity_query_get_mode (GoaIdentityInquiry * inquiry, GoaKerberosIdentityQuery *kerberos_query = (GoaKerberosIdentityQuery *) query; g_return_val_if_fail (GOA_IS_KERBEROS_IDENTITY_INQUIRY (inquiry), - GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE); + GOA_IDENTITY_QUERY_MODE_INVISIBLE); g_return_val_if_fail (inquiry == kerberos_query->inquiry, - GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE); + GOA_IDENTITY_QUERY_MODE_INVISIBLE); if (kerberos_query->kerberos_prompt->hidden) { - return GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE; + return GOA_IDENTITY_QUERY_MODE_INVISIBLE; } else { - return GOA_KERBEROS_IDENTITY_QUERY_MODE_VISIBLE; + return GOA_IDENTITY_QUERY_MODE_VISIBLE; } } @@ -354,7 +354,7 @@ goa_kerberos_identity_query_get_prompt (GoaIdentityInquiry * inquiry, GoaKerberosIdentityQuery *kerberos_query = (GoaKerberosIdentityQuery *) query; g_return_val_if_fail (GOA_IS_KERBEROS_IDENTITY_INQUIRY (inquiry), - GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE); + GOA_IDENTITY_QUERY_MODE_INVISIBLE); g_return_val_if_fail (inquiry == kerberos_query->inquiry, NULL); return g_strdup (kerberos_query->kerberos_prompt->prompt); @@ -367,7 +367,7 @@ goa_kerberos_identity_query_is_answered (GoaIdentityInquiry * inquiry, GoaKerberosIdentityQuery *kerberos_query = (GoaKerberosIdentityQuery *) query; g_return_val_if_fail (GOA_IS_KERBEROS_IDENTITY_INQUIRY (inquiry), - GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE); + GOA_IDENTITY_QUERY_MODE_INVISIBLE); g_return_val_if_fail (inquiry == kerberos_query->inquiry, FALSE); return kerberos_query->is_answered; diff --git a/src/goaidentity/goakerberosidentityinquiry.h b/src/goaidentity/goakerberosidentityinquiry.h index 6181818c..febee126 100644 --- a/src/goaidentity/goakerberosidentityinquiry.h +++ b/src/goaidentity/goakerberosidentityinquiry.h @@ -32,12 +32,6 @@ G_BEGIN_DECLS #define GOA_TYPE_KERBEROS_IDENTITY_INQUIRY (goa_kerberos_identity_inquiry_get_type ()) G_DECLARE_FINAL_TYPE (GoaKerberosIdentityInquiry, goa_kerberos_identity_inquiry, GOA, KERBEROS_IDENTITY_INQUIRY, GObject); -typedef enum -{ - GOA_KERBEROS_IDENTITY_QUERY_MODE_INVISIBLE, - GOA_KERBEROS_IDENTITY_QUERY_MODE_VISIBLE -} GoaKerberosIdentityQueryMode; - GoaIdentityInquiry *goa_kerberos_identity_inquiry_new (GoaKerberosIdentity *identity, const char *name, const char *banner, -- GitLab From 68c7a16d7d0435690e02d7746b95e439e64cc757 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 May 2022 20:20:59 +0200 Subject: [PATCH 2/6] Fedora and Kerberos dependencies are only needed if backends are enabled --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 00d9fde9..dddfc4a3 100644 --- a/meson.build +++ b/meson.build @@ -129,7 +129,7 @@ config_h.set_quoted('GOA_FEDORA_NAME', 'fedora') config_h.set_quoted('GOA_FEDORA_REALM', 'FEDORAPROJECT.ORG') enable_fedora = get_option('fedora') -if enable_fedora +if enable_goabackend and enable_fedora gcr_dep = dependency('gcr-3') krb5_dep = dependency('krb5') @@ -159,7 +159,7 @@ config_h.set('GOA_IMAP_SMTP_ENABLED', enable_imap_smtp) config_h.set_quoted('GOA_KERBEROS_NAME', 'kerberos') enable_kerberos = get_option('kerberos') -if enable_kerberos +if enable_goabackend and enable_kerberos gcr_dep = dependency('gcr-3') krb5_dep = dependency('krb5') -- GitLab From e1332dacff4a7de75744596424797ee2bf50e325 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 May 2022 20:21:24 +0200 Subject: [PATCH 3/6] do not install examples --- src/examples/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/examples/meson.build b/src/examples/meson.build index 34583296..3c2d1818 100644 --- a/src/examples/meson.build +++ b/src/examples/meson.build @@ -16,6 +16,7 @@ foreach program: programs program[0], program[0] + '.c', include_directories: common_incs, - dependencies: program[1] + dependencies: program[1], + install: false, ) endforeach -- GitLab From f81441b761aa0457a5ab337d20ec857234b6466b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 May 2022 19:11:54 +0200 Subject: [PATCH 4/6] add frontend-only build to CI --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eec22f4a..e194baa5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,3 +14,16 @@ build-meson: - meson setup -Dgtk_doc=true _build - meson compile -C _build - meson test -C _build + +build-meson-nobackend: + image: fedora:latest + stage: build + before_script: + - dnf update -y + - dnf -y install + meson gcc dbus-devel glib2-devel gobject-introspection-devel + gtk3-devel rest-devel vala + script: + - meson setup -Dgtk_doc=false -Dgoabackend=false _build + - meson compile -C _build + - meson test -C _build -- GitLab From 67c4eed60a5a7defead2f3d001ebe6d8b2f8305e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 May 2022 08:58:53 +0200 Subject: [PATCH 5/6] examples can be compiled even if !enable_goabackend This also means searching for librest even if !enable_goabackend. However, in that case the build can proceed without the library and only the example that uses it is removed. --- meson.build | 11 ++++++----- src/examples/meson.build | 5 +++-- src/meson.build | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index dddfc4a3..f2171414 100644 --- a/meson.build +++ b/meson.build @@ -102,13 +102,14 @@ if enable_goabackend libsecret_dep = dependency('libsecret-1') libsoup_dep = dependency('libsoup-3.0', version: '>= 3.0', fallback: ['libsoup']) libxml_dep = dependency('libxml-2.0') - rest_dep = dependency('rest-1.0', - version: '>= 0.9.0', - fallback: ['librest', 'librest_dep'], - default_options: ['soup2=false', 'examples=false', 'tests=false', 'gtk_doc=false'], - ) webkit_gtk_dep = dependency('webkit2gtk-4.1', version: '>= 2.33.1') endif +rest_dep = dependency('rest-1.0', + version: '>= 0.9.0', + fallback: ['librest', 'librest_dep'], + required: enable_goabackend, + default_options: ['soup2=false', 'examples=false', 'tests=false', 'gtk_doc=false'], +) config_h.set('GOA_BACKEND_ENABLED', enable_goabackend) enable_inspector = get_option('inspector') diff --git a/src/examples/meson.build b/src/examples/meson.build index 3c2d1818..cef3062e 100644 --- a/src/examples/meson.build +++ b/src/examples/meson.build @@ -1,9 +1,10 @@ programs = [ # program name, deps ['list-accounts', libgoa_dep], - ['lastfm-shout', [libgoa_dep, rest_dep]] ] - +if rest_dep.found() + ['lastfm-shout', [libgoa_dep, rest_dep]] +endif if enable_goabackend programs += [ ['introspect-providers', libgoa_backend_dep], diff --git a/src/meson.build b/src/meson.build index d9a5d656..a87e282e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,5 +11,6 @@ if enable_goabackend subdir('goabackend') subdir('daemon') - subdir('examples') endif + +subdir('examples') -- GitLab From d150678dde9ec8f2443a22ac1cc22eb72d969e9d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 22 Jun 2022 21:34:27 +0200 Subject: [PATCH 6/6] remove more vestiges of GoaOAuthProvider Remove it from the documentation sections. --- doc/goa-sections.txt | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/doc/goa-sections.txt b/doc/goa-sections.txt index a91a4455..e7c4934a 100644 --- a/doc/goa-sections.txt +++ b/doc/goa-sections.txt @@ -503,36 +503,6 @@ GoaOAuth2ProviderPrivate goa_oauth2_provider_get_type -
-goaoauthprovider -GoaOAuthProvider -GoaOAuthProviderClass -goa_oauth_provider_get_request_uri -goa_oauth_provider_get_request_uri_params -goa_oauth_provider_get_authorization_uri -goa_oauth_provider_get_token_uri -goa_oauth_provider_get_callback_uri -goa_oauth_provider_get_consumer_key -goa_oauth_provider_get_consumer_secret -goa_oauth_provider_build_authorization_uri -goa_oauth_provider_get_use_mobile_browser -goa_oauth_provider_is_deny_node -goa_oauth_provider_is_identity_node -goa_oauth_provider_is_password_node -goa_oauth_provider_add_account_key_values -goa_oauth_provider_get_identity_sync -goa_oauth_provider_get_access_token_sync -goa_oauth_provider_parse_request_token_error - -GOA_OAUTH_PROVIDER -GOA_OAUTH_PROVIDER_CLASS -GOA_OAUTH_PROVIDER_GET_CLASS -GOA_IS_OAUTH_PROVIDER -GOA_IS_OAUTH_PROVIDER_CLASS -GOA_TYPE_OAUTH_PROVIDER -goa_oauth_provider_get_type -
-
GoaMail GoaMail -- GitLab