diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-01-20 18:25:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-21 12:52:53 +0000 |
commit | 4f16bee889014ff5c4253ceb6ef766b017bdfb9b (patch) | |
tree | 9e49e23e994b18d8da14e7fc4df6811218471654 | |
parent | 5b0a057493987d9d416993d2fc2d7f77e3498748 (diff) | |
download | poky-4f16bee889014ff5c4253ceb6ef766b017bdfb9b.tar.gz |
libsecret: upgrade 0.19.1 -> 0.20.0
Add a backported patch to fix musl builds.
(From OE-Core rev: d28f0d41949143cf130e7f73aa8421711dd13914)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-gnome/libsecret/libsecret/0001-secret-file-collection-Rename-internal-functions-to-.patch | 144 | ||||
-rw-r--r-- | meta/recipes-gnome/libsecret/libsecret_0.20.0.bb (renamed from meta/recipes-gnome/libsecret/libsecret_0.19.1.bb) | 5 |
2 files changed, 147 insertions, 2 deletions
diff --git a/meta/recipes-gnome/libsecret/libsecret/0001-secret-file-collection-Rename-internal-functions-to-.patch b/meta/recipes-gnome/libsecret/libsecret/0001-secret-file-collection-Rename-internal-functions-to-.patch new file mode 100644 index 0000000000..269c12b010 --- /dev/null +++ b/meta/recipes-gnome/libsecret/libsecret/0001-secret-file-collection-Rename-internal-functions-to-.patch | |||
@@ -0,0 +1,144 @@ | |||
1 | From 59bcb169c4777bb3b1a50fee2ae20e4e8574b749 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daiki Ueno <dueno@src.gnome.org> | ||
3 | Date: Tue, 14 Jan 2020 10:09:29 +0100 | ||
4 | Subject: [PATCH] secret-file-collection: Rename internal functions to avoid | ||
5 | conflicts | ||
6 | |||
7 | As encrypt() is a standard POSIX function, its declaration had | ||
8 | conflict with our own. Let's be more verbose about naming of the | ||
9 | internal crypto functions. | ||
10 | |||
11 | Fixes #35. | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/GNOME/libsecret/commit/cf21ad50b62f7c8e4b22ef374f0a73290a99bdb8] | ||
14 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
15 | --- | ||
16 | libsecret/secret-file-collection.c | 38 +++++++++++++++--------------- | ||
17 | 1 file changed, 19 insertions(+), 19 deletions(-) | ||
18 | |||
19 | diff --git a/libsecret/secret-file-collection.c b/libsecret/secret-file-collection.c | ||
20 | index 79863ea..8ffb542 100644 | ||
21 | --- a/libsecret/secret-file-collection.c | ||
22 | +++ b/libsecret/secret-file-collection.c | ||
23 | @@ -68,7 +68,7 @@ enum { | ||
24 | }; | ||
25 | |||
26 | static gboolean | ||
27 | -derive (SecretFileCollection *self) | ||
28 | +do_derive_key (SecretFileCollection *self) | ||
29 | { | ||
30 | const gchar *password; | ||
31 | gsize n_password; | ||
32 | @@ -93,9 +93,9 @@ derive (SecretFileCollection *self) | ||
33 | } | ||
34 | |||
35 | static gboolean | ||
36 | -calculate_mac (SecretFileCollection *self, | ||
37 | - const guint8 *value, gsize n_value, | ||
38 | - guint8 *buffer) | ||
39 | +do_calculate_mac (SecretFileCollection *self, | ||
40 | + const guint8 *value, gsize n_value, | ||
41 | + guint8 *buffer) | ||
42 | { | ||
43 | gcry_mac_hd_t hd; | ||
44 | gcry_error_t gcry; | ||
45 | @@ -130,9 +130,9 @@ calculate_mac (SecretFileCollection *self, | ||
46 | } | ||
47 | |||
48 | static gboolean | ||
49 | -decrypt (SecretFileCollection *self, | ||
50 | - guint8 *data, | ||
51 | - gsize n_data) | ||
52 | +do_decrypt (SecretFileCollection *self, | ||
53 | + guint8 *data, | ||
54 | + gsize n_data) | ||
55 | { | ||
56 | gcry_cipher_hd_t hd; | ||
57 | gcry_error_t gcry; | ||
58 | @@ -164,9 +164,9 @@ decrypt (SecretFileCollection *self, | ||
59 | } | ||
60 | |||
61 | static gboolean | ||
62 | -encrypt (SecretFileCollection *self, | ||
63 | - guint8 *data, | ||
64 | - gsize n_data) | ||
65 | +do_encrypt (SecretFileCollection *self, | ||
66 | + guint8 *data, | ||
67 | + gsize n_data) | ||
68 | { | ||
69 | gcry_cipher_hd_t hd; | ||
70 | gcry_error_t gcry; | ||
71 | @@ -311,7 +311,7 @@ on_load_contents (GObject *source_object, | ||
72 | self->modified = g_date_time_new_now_utc (); | ||
73 | self->usage_count = 0; | ||
74 | |||
75 | - if (!derive (self)) { | ||
76 | + if (!do_derive_key (self)) { | ||
77 | g_task_return_new_error (task, | ||
78 | SECRET_ERROR, | ||
79 | SECRET_ERROR_PROTOCOL, | ||
80 | @@ -375,7 +375,7 @@ on_load_contents (GObject *source_object, | ||
81 | g_assert (n_data == salt_size); | ||
82 | |||
83 | self->salt = g_bytes_new (data, n_data); | ||
84 | - if (!derive (self)) { | ||
85 | + if (!do_derive_key (self)) { | ||
86 | g_task_return_new_error (task, | ||
87 | SECRET_ERROR, | ||
88 | SECRET_ERROR_PROTOCOL, | ||
89 | @@ -442,7 +442,7 @@ hash_attributes (SecretFileCollection *self, | ||
90 | GVariant *variant; | ||
91 | |||
92 | value = g_hash_table_lookup (attributes, l->data); | ||
93 | - if (!calculate_mac (self, (guint8 *)value, strlen (value), buffer)) { | ||
94 | + if (!do_calculate_mac (self, (guint8 *)value, strlen (value), buffer)) { | ||
95 | g_list_free (keys); | ||
96 | return NULL; | ||
97 | } | ||
98 | @@ -485,7 +485,7 @@ hashed_attributes_match (SecretFileCollection *self, | ||
99 | return FALSE; | ||
100 | } | ||
101 | |||
102 | - if (!calculate_mac (self, value, strlen ((char *)value), buffer)) { | ||
103 | + if (!do_calculate_mac (self, value, strlen ((char *)value), buffer)) { | ||
104 | g_variant_unref (hashed_attribute); | ||
105 | return FALSE; | ||
106 | } | ||
107 | @@ -584,7 +584,7 @@ secret_file_collection_replace (SecretFileCollection *self, | ||
108 | g_variant_store (serialized_item, data); | ||
109 | g_variant_unref (serialized_item); | ||
110 | memset (data + n_data, n_padded - n_data, n_padded - n_data); | ||
111 | - if (!encrypt (self, data, n_padded)) { | ||
112 | + if (!do_encrypt (self, data, n_padded)) { | ||
113 | egg_secure_free (data); | ||
114 | g_set_error (error, | ||
115 | SECRET_ERROR, | ||
116 | @@ -593,8 +593,8 @@ secret_file_collection_replace (SecretFileCollection *self, | ||
117 | return FALSE; | ||
118 | } | ||
119 | |||
120 | - if (!calculate_mac (self, data, n_padded + IV_SIZE, | ||
121 | - data + n_padded + IV_SIZE)) { | ||
122 | + if (!do_calculate_mac (self, data, n_padded + IV_SIZE, | ||
123 | + data + n_padded + IV_SIZE)) { | ||
124 | egg_secure_free (data); | ||
125 | g_set_error (error, | ||
126 | SECRET_ERROR, | ||
127 | @@ -681,7 +681,7 @@ _secret_file_item_decrypt (GVariant *encrypted, | ||
128 | } | ||
129 | n_padded -= IV_SIZE + MAC_SIZE; | ||
130 | |||
131 | - if (!calculate_mac (collection, data, n_padded + IV_SIZE, mac)) { | ||
132 | + if (!do_calculate_mac (collection, data, n_padded + IV_SIZE, mac)) { | ||
133 | egg_secure_free (data); | ||
134 | g_set_error (error, | ||
135 | SECRET_ERROR, | ||
136 | @@ -699,7 +699,7 @@ _secret_file_item_decrypt (GVariant *encrypted, | ||
137 | return FALSE; | ||
138 | } | ||
139 | |||
140 | - if (!decrypt (collection, data, n_padded)) { | ||
141 | + if (!do_decrypt (collection, data, n_padded)) { | ||
142 | egg_secure_free (data); | ||
143 | g_set_error (error, | ||
144 | SECRET_ERROR, | ||
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb b/meta/recipes-gnome/libsecret/libsecret_0.20.0.bb index 3da2a4acac..aa3dfab581 100644 --- a/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb +++ b/meta/recipes-gnome/libsecret/libsecret_0.20.0.bb | |||
@@ -13,8 +13,9 @@ DEPENDS += "glib-2.0 libgcrypt gettext-native" | |||
13 | 13 | ||
14 | PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" | 14 | PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" |
15 | 15 | ||
16 | SRC_URI[archive.md5sum] = "ea673119c00570d6434f8fd3636f1eb8" | 16 | SRC_URI += " file://0001-secret-file-collection-Rename-internal-functions-to-.patch" |
17 | SRC_URI[archive.sha256sum] = "8583e10179456ae2c83075d95455f156dc08db6278b32bf4bd61819335a30e3a" | 17 | SRC_URI[archive.md5sum] = "335750caeed47f50496b3b0e6a1875ff" |
18 | SRC_URI[archive.sha256sum] = "f1187370b453106af878e30c284a121ba0c513da8bb4170b329d66e250bdae43" | ||
18 | 19 | ||
19 | # http://errors.yoctoproject.org/Errors/Details/20228/ | 20 | # http://errors.yoctoproject.org/Errors/Details/20228/ |
20 | ARM_INSTRUCTION_SET_armv4 = "arm" | 21 | ARM_INSTRUCTION_SET_armv4 = "arm" |