From 3cf7c3ef441822c889356fd1812ebf2944a59851 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 25 Aug 2020 10:45:55 +0100 Subject: gentoo resync : 25.08.2020 --- .../files/3.36.0-avoid-gnupg-circular-dep.patch | 52 +++++++++++++ app-crypt/gcr/files/3.36.0-fix-gck-slot-test.patch | 37 +++++++++ app-crypt/gcr/files/3.36.0-meson-enum-race.patch | 31 ++++++++ .../3.36.0-meson-fix-gtk-doc-without-ui.patch | 24 ++++++ app-crypt/gcr/files/3.36.0-meson-vapi-deps.patch | 48 ++++++++++++ app-crypt/gcr/files/3.36.0-optional-vapi.patch | 88 ++++++++++++++++++++++ 6 files changed, 280 insertions(+) create mode 100644 app-crypt/gcr/files/3.36.0-avoid-gnupg-circular-dep.patch create mode 100644 app-crypt/gcr/files/3.36.0-fix-gck-slot-test.patch create mode 100644 app-crypt/gcr/files/3.36.0-meson-enum-race.patch create mode 100644 app-crypt/gcr/files/3.36.0-meson-fix-gtk-doc-without-ui.patch create mode 100644 app-crypt/gcr/files/3.36.0-meson-vapi-deps.patch create mode 100644 app-crypt/gcr/files/3.36.0-optional-vapi.patch (limited to 'app-crypt/gcr/files') diff --git a/app-crypt/gcr/files/3.36.0-avoid-gnupg-circular-dep.patch b/app-crypt/gcr/files/3.36.0-avoid-gnupg-circular-dep.patch new file mode 100644 index 000000000000..313b65628e46 --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-avoid-gnupg-circular-dep.patch @@ -0,0 +1,52 @@ +From d3fd10fa3d3fe3e2e60a9ca5cfb401faa5e9c5bd Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen +Date: Wed, 11 Mar 2020 11:49:08 +0100 +Subject: [PATCH 4/6] meson: allow building without gpg(2) installed + +This avoids circular dependencies, such as gcr -> gpg2 -> pinentry -> gcr +--- + meson.build | 7 +++++-- + meson_options.txt | 5 +++++ + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index f19af0f..57b625b 100644 +--- a/meson.build ++++ b/meson.build +@@ -41,7 +41,10 @@ gobject_dep = dependency('gobject-2.0', version: '>=' + min_glib_version) + gio_dep = dependency('gio-2.0', version: '>=' + min_glib_version) + gio_unix_dep = dependency('gio-unix-2.0',version: '>=' + min_glib_version) + glib_deps = [ glib_dep, gmodule_dep, gthread_dep, gobject_dep, gio_dep, gio_unix_dep, ] +-gpg_bin = find_program('gpg2', 'gpg') ++gpg_path = get_option('gpg_path') ++if gpg_path == '' ++ gpg_path = find_program('gpg2', 'gpg').path() ++endif + libgcrypt_dep = dependency('libgcrypt', version: '>= 1') + p11kit_dep = dependency('p11-kit-1', version: '>= 0.19.0') + p11_system_config_modules = p11kit_dep.get_pkgconfig_variable('p11_system_config_modules') +@@ -65,7 +68,7 @@ conf.set('HAVE_GETTEXT', true) + conf.set('HAVE_LOCALE_H', cc.has_header('locale.h')) + conf.set('HAVE_TIMEGM', cc.has_function('timegm')) + conf.set('HAVE_MLOCK', cc.has_function('mlock')) +-conf.set_quoted('GPG_EXECUTABLE', gpg_bin.path()) ++conf.set_quoted('GPG_EXECUTABLE', gpg_path) + conf.set_quoted('LIBGCRYPT_VERSION', libgcrypt_dep.version()) + config_file = configure_file( + output: 'config.h', +diff --git a/meson_options.txt b/meson_options.txt +index bbdc8e3..ae0f524 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -13,3 +13,8 @@ option('gtk_doc', + value: true, + description: 'Build the reference documentation (requires gtk-doc)', + ) ++option('gpg_path', ++ type: 'string', ++ value: '', ++ description: 'Path to gpg, autodetected if not set', ++) +-- +2.20.1 + diff --git a/app-crypt/gcr/files/3.36.0-fix-gck-slot-test.patch b/app-crypt/gcr/files/3.36.0-fix-gck-slot-test.patch new file mode 100644 index 000000000000..44a7919ea8d4 --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-fix-gck-slot-test.patch @@ -0,0 +1,37 @@ +From 4835310d233899f8b541e1c75c79f5c3a9ebf928 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Sun, 15 Mar 2020 13:00:08 +0000 +Subject: [PATCH 1/6] gck-slot: Initialize struct tm to all-zeroes + +If the format string for strptime() doesn't include a time zone, +then the tm_isdst member will be left uninitialized (see NOTES in +Linux strptime(3)). This means we will be off by an hour from the +intended time if whatever arbitrary junk is on the stack happens to +include a positive value for tm.tm_isdst. + +Resolves: https://gitlab.gnome.org/GNOME/gcr/issues/42 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953981 +Signed-off-by: Simon McVittie +(cherry picked from commit b1c8213b64fdfcad8c4ae0ff33a31105c0a0a312) +--- + gck/gck-slot.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gck/gck-slot.c b/gck/gck-slot.c +index f3b2f97..f00857f 100644 +--- a/gck/gck-slot.c ++++ b/gck/gck-slot.c +@@ -607,7 +607,9 @@ _gck_token_info_from_pkcs11 (CK_TOKEN_INFO_PTR info) + { + GckTokenInfo *token_info; + gchar *string; +- struct tm tm; ++ /* Must be zero-filled, because strptime will leave tm_isdst ++ * unchanged */ ++ struct tm tm = { 0 }; + + token_info = g_new0 (GckTokenInfo, 1); + token_info->label = gck_string_from_chars (info->label, sizeof (info->label)); +-- +2.20.1 + diff --git a/app-crypt/gcr/files/3.36.0-meson-enum-race.patch b/app-crypt/gcr/files/3.36.0-meson-enum-race.patch new file mode 100644 index 000000000000..ef9d7a1bc3ad --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-meson-enum-race.patch @@ -0,0 +1,31 @@ +From b04d117d5f8275a4c605743825faf2d5a28ae028 Mon Sep 17 00:00:00 2001 +From: Niels De Graef +Date: Fri, 19 Jun 2020 22:37:31 +0200 +Subject: [PATCH 3/6] meson: Make sure gcr-oids.h is built + +Fixes https://gitlab.gnome.org/GNOME/gcr/-/issues/48 + +(cherry picked from commit 9fca6ae0aa7355c27d0922c561b9fbe18dde5b3d) +--- + gcr/meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcr/meson.build b/gcr/meson.build +index 199452f..06c3a63 100644 +--- a/gcr/meson.build ++++ b/gcr/meson.build +@@ -178,7 +178,10 @@ endif + gcr_base_dep = declare_dependency( + link_with: gcr_base_lib, + include_directories: include_directories('..'), +- sources: gcr_enums_gen[1], # Make sure gcr-enum-types-base.h can be included ++ sources: [ ++ gcr_enums_gen[1], ++ gcr_oids[1], ++ ], + ) + + if get_option('introspection') +-- +2.20.1 + diff --git a/app-crypt/gcr/files/3.36.0-meson-fix-gtk-doc-without-ui.patch b/app-crypt/gcr/files/3.36.0-meson-fix-gtk-doc-without-ui.patch new file mode 100644 index 000000000000..72950d381ea2 --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-meson-fix-gtk-doc-without-ui.patch @@ -0,0 +1,24 @@ +From 9343a5b0afb8265e02798c48ab52758d6cdfddf9 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp +Date: Tue, 18 Aug 2020 09:53:38 +0300 +Subject: [PATCH 6/6] build: Don't build gcr gtk-doc without ui enabled + +gcr gtk-doc includes both gcr and gcr ui documentation, so we can't build +it without ui enabled +--- + docs/meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/docs/meson.build b/docs/meson.build +index f353516..8984ef2 100644 +--- a/docs/meson.build ++++ b/docs/meson.build +@@ -1,2 +1,4 @@ + subdir('reference/gck') +-subdir('reference/gcr') ++if get_option('gtk') ++ subdir('reference/gcr') ++endif +-- +2.20.1 + diff --git a/app-crypt/gcr/files/3.36.0-meson-vapi-deps.patch b/app-crypt/gcr/files/3.36.0-meson-vapi-deps.patch new file mode 100644 index 000000000000..60d1058ee654 --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-meson-vapi-deps.patch @@ -0,0 +1,48 @@ +From fc2bc7e230b745dbbd4f4b2cd82e1e5e0c7bf109 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 11 May 2020 22:19:16 +0000 +Subject: [PATCH 2/6] meson.build: correctly set internal vapi dependencies + +If they are set as strings, meson will supply the right +arguments to vapigen, but will not set the ninja dependencies +to ensure they get built first, and so races will occur: +https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1881/steps/8/logs/step1b + +Signed-off-by: Alexander Kanavin +(cherry picked from commit 91712a2e131692fa727a0da2868bc23e8df1bf17) +--- + gcr/meson.build | 2 +- + ui/meson.build | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcr/meson.build b/gcr/meson.build +index 254a933..199452f 100644 +--- a/gcr/meson.build ++++ b/gcr/meson.build +@@ -203,7 +203,7 @@ if get_option('introspection') + + gcr_vapi = gnome.generate_vapi('gcr-@0@'.format(gcr_major_version), + sources: gcr_gir[0], +- packages: [ 'glib-2.0', 'gio-2.0', 'gck-@0@'.format(gck_major_version) ], ++ packages: [ 'glib-2.0', 'gio-2.0', gck_vapi ], + metadata_dirs: meson.current_source_dir(), + vapi_dirs: [ + build_root / 'gck', +diff --git a/ui/meson.build b/ui/meson.build +index 5ca3753..477412d 100644 +--- a/ui/meson.build ++++ b/ui/meson.build +@@ -174,8 +174,8 @@ if get_option('introspection') + packages: [ + 'glib-2.0', + 'gio-2.0', +- 'gck-@0@'.format(gck_major_version), +- 'gcr-@0@'.format(gcr_major_version), ++ gck_vapi, ++ gcr_vapi, + 'gtk+-3.0' + ], + metadata_dirs: meson.current_source_dir(), +-- +2.20.1 + diff --git a/app-crypt/gcr/files/3.36.0-optional-vapi.patch b/app-crypt/gcr/files/3.36.0-optional-vapi.patch new file mode 100644 index 000000000000..50969fdae409 --- /dev/null +++ b/app-crypt/gcr/files/3.36.0-optional-vapi.patch @@ -0,0 +1,88 @@ +From 525f5c7dbfdff6c1b24510a22eeffa804836e1bf Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp +Date: Tue, 18 Aug 2020 09:36:19 +0300 +Subject: [PATCH 5/6] build: Make vapi optional + +--- + gck/meson.build | 2 ++ + gcr/meson.build | 2 ++ + meson_options.txt | 5 +++++ + ui/meson.build | 2 ++ + 4 files changed, 11 insertions(+) + +diff --git a/gck/meson.build b/gck/meson.build +index 756b486..a15f4ed 100644 +--- a/gck/meson.build ++++ b/gck/meson.build +@@ -142,6 +142,7 @@ if get_option('introspection') + install: true, + ) + ++if get_option('vapi') + gck_vapi = gnome.generate_vapi('gck-@0@'.format(gck_major_version), + sources: gck_gir[0], + metadata_dirs: meson.current_source_dir(), +@@ -153,6 +154,7 @@ if get_option('introspection') + install_dir: get_option('datadir') / 'vala' / 'vapi', + ) + endif ++endif + + # pkg-config file + pkgconfig.generate(gck_lib, +diff --git a/gcr/meson.build b/gcr/meson.build +index 06c3a63..cc642cf 100644 +--- a/gcr/meson.build ++++ b/gcr/meson.build +@@ -204,6 +204,7 @@ if get_option('introspection') + install: true, + ) + ++if get_option('vapi') + gcr_vapi = gnome.generate_vapi('gcr-@0@'.format(gcr_major_version), + sources: gcr_gir[0], + packages: [ 'glib-2.0', 'gio-2.0', gck_vapi ], +@@ -217,6 +218,7 @@ if get_option('introspection') + install: true, + ) + endif ++endif + + # pkg-config file + pkgconfig.generate(gcr_base_lib, +diff --git a/meson_options.txt b/meson_options.txt +index ae0f524..f68cb95 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -18,3 +18,8 @@ option('gpg_path', + value: '', + description: 'Path to gpg, autodetected if not set', + ) ++option('vapi', ++ type: 'boolean', ++ value: true, ++ description: 'Generate vapi data (requires vapigen and introspection option)', ++) +diff --git a/ui/meson.build b/ui/meson.build +index 477412d..0b89b24 100644 +--- a/ui/meson.build ++++ b/ui/meson.build +@@ -169,6 +169,7 @@ if get_option('introspection') + install: true, + ) + ++if get_option('vapi') + gcr_ui_vapi = gnome.generate_vapi('gcr-ui-@0@'.format(gcr_major_version), + sources: gcr_ui_gir[0], + packages: [ +@@ -190,6 +191,7 @@ if get_option('introspection') + install: true, + ) + endif ++endif + + # gcr-viewer + gcr_viewer = executable('gcr-viewer', +-- +2.20.1 + -- cgit v1.2.3