Skip to contentSkip to conversation

libsecret: upgrade 0.21.7 -> 0.21.8.2

PATCH Superseded Jaipaul Cheernam 4 participants 13 messages Sep 17 – Sep 23 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover libsecret: upgrade 0.21.7 -> 0.21.8.2

Upgrading libsecret to 0.21.8.2 exposed a bug in gnome_verdir(): it derived the GNOME download directory by stripping the last version component, which produced 0.21.8/ for the four-component version 0.21.8.2 instead of GNOME's 0.21/, causing the fetch to 404.

The first patch fixes gnome_verdir() to use the major.minor directory, which is unchanged for all existing gnomebase recipes. The second patch performs the libsecret upgrade and refreshes the downstream pam-tests patch.

Jaipaul Cheernam (2):
gnomebase: fix gnome_verdir for four-component versions
libsecret: upgrade 0.21.7 -> 0.21.8.2

 meta/classes-recipe/gnomebase.bbclass          |  7 ++++++-
 ...meson-add-option-to-disable-pam-tests.patch | 18 +++++++++++-------
 ...bsecret_0.21.7.bb => libsecret_0.21.8.2.bb} |  2 +-
 3 files changed, 18 insertions(+), 9 deletions(-)
 rename meta/recipes-gnome/libsecret/{libsecret_0.21.7.bb => libsecret_0.21.8.2.bb} (92%)
#1 lore raw

PATCH 1/2 gnomebase: fix gnome_verdir for four-component versions

gnome_verdir() stripped the last version component to build the download directory, which broke four-component versions: libsecret 0.21.8.2 was fetched from 0.21.8/ instead of GNOME's 0.21/, causing a 404.

Use the first two components instead. This is unchanged for all existing gnomebase recipes and fixes four-component versions.

---
 meta/classes-recipe/gnomebase.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes-recipe/gnomebase.bbclass +6 -1
index 57933dda71..e5aac95a16 100644
@@ -5,7 +5,12 @@
 #
 
 def gnome_verdir(v):
-    return ".".join(v.split(".")[:-1]) or v
+    # GNOME hosts tarballs under the major.minor directory (major only for
+    # two-component versions). Take the first two components rather than
+    # stripping the last, so four-component versions (e.g. 0.21.8.2 -> 0.21)
+    # resolve correctly.
+    parts = v.split(".")
+    return ".".join(parts[:2] if len(parts) >= 3 else parts[:-1]) or v
 
 
 GNOME_COMPRESS_TYPE ?= "xz"
#2 lore raw

PATCH 2/2 libsecret: upgrade 0.21.7 -> 0.21.8.2

In reply to Jaipaul Cheernam

NEWS: https://github.com/GNOME/libsecret/blob/0.21.8.2/NEWS

0.21.8.2
* Release to bump meson.build version

0.21.8.1
* Make secret_item_load_secrets_sync match async behavior [!180]

0.21.8
* Allow the content type to have additional parameters [#114, !175]
* Support individually encrypted items [!174]
* Ensure we return chained up GTask [!179]
* Ensure length of DH shared secret match length of prime on GnuTLS [!170]
* file-backend: Add thread safety and file-based locking to prevent concurrent write races [!171]
* file-backend: Fix possible memory leak in error path of secret_file_backend_real_search() [!173]
* file-collection: Fix memory leaks on repeated calls [!173]
* Replace some SecretSync with a sync implementation [!108]
* Add linker version script to hide private symbols [#70, !159]
* Stop using CONST annotations on non-const fns [!176]
* secret-tool: align behavior for collection option [!164]
* secret-tool: document --collection option [#31, !164]
* meson: Put test setup behind a feature option [#101, !162]
* Several test and CI improvements [!172, !177, !178]
* Updated translations

- Refresh the pam-tests patch for the new release.

---
 ...meson-add-option-to-disable-pam-tests.patch | 18 +++++++++++-------
 ...bsecret_0.21.7.bb => libsecret_0.21.8.2.bb} |  2 +-
 2 files changed, 12 insertions(+), 8 deletions(-)
 rename meta/recipes-gnome/libsecret/{libsecret_0.21.7.bb => libsecret_0.21.8.2.bb} (92%)
meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch +11 -7
index e0a5737eab..e57aa94337 100644
@@ -1,24 +1,28 @@
-From a9fd7dcddf8bc64646f2945ab564357c23111541 Mon Sep 17 00:00:00 2001
+From 5a7a8d10d08892dda84092afbcf5fbdeceed0287 Mon Sep 17 00:00:00 2001
 From: Markus Volk <[email protected]>
 Date: Tue, 3 Dec 2024 15:58:17 +0100
 Subject: [PATCH] meson: add option to disable pam tests
 
 Upstream-Status: Denied [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/151]
 
+refreshed for 0.21.8.2
+
 Signed-off-by: Markus Volk <[email protected]>
+Signed-off-by: Jaipaul Cheernam <[email protected]>
 ---
- meson_options.txt |  1 +
+ meson_options.txt |  6 ++++++
  pam/meson.build   | 44 +++++++++++++++++++++++---------------------
- 2 files changed, 24 insertions(+), 21 deletions(-)
+ 2 files changed, 29 insertions(+), 21 deletions(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 936eff8..2ae14f2 100644
+index d7b1628..0bed21d 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -61,3 +61,8 @@
-   description: 'Build PAM module',
+@@ -66,3 +66,9 @@ option('test_setup',
+   value: 'auto',
+   description: 'Automatically setup a test environment when running tests',
  )
-
++
 +option('pam-tests',
 +  type: 'boolean',
 +  value: true,
meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb renamed from meta/recipes-gnome/libsecret/libsecret_0.21.7.bb +1 -1
similarity index 92%
rename from meta/recipes-gnome/libsecret/libsecret_0.21.7.bb
rename to meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb
index e77f83e92f..d7c5410a96 100644
@@ -13,7 +13,7 @@ inherit gnomebase gi-docgen vala gobject-introspection manpages
 DEPENDS += "glib-2.0 libgcrypt gettext-native"
 
 SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch"
-SRC_URI[archive.sha256sum] = "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e"
+SRC_URI[archive.sha256sum] = "142948339c5b971d8f6a8c7099521f6fd319b6fe73d2694b4e6d3310ed28b6e6"
 
 EXTRA_OEMESON += "-Dpam-tests=false"
 
#3 lore raw
Quoted 25 lines · Jaipaul Cheernam via lists.openembedded.org

NEWS: https://github.com/GNOME/libsecret/blob/0.21.8.2/NEWS

0.21.8.2
 * Release to bump meson.build version

0.21.8.1
 * Make secret_item_load_secrets_sync match async behavior [!180]

0.21.8
 * Allow the content type to have additional parameters [#114, !175]
 * Support individually encrypted items [!174]
 * Ensure we return chained up GTask [!179]
 * Ensure length of DH shared secret match length of prime on GnuTLS [!170]
 * file-backend: Add thread safety and file-based locking to prevent concurrent write races [!171]
 * file-backend: Fix possible memory leak in error path of secret_file_backend_real_search() [!173]
 * file-collection: Fix memory leaks on repeated calls [!173]
 * Replace some SecretSync with a sync implementation [!108]
 * Add linker version script to hide private symbols [#70, !159]
 * Stop using CONST annotations on non-const fns [!176]
 * secret-tool: align behavior for collection option [!164]
 * secret-tool: document --collection option [#31, !164]
 * meson: Put test setup behind a feature option [#101, !162]
 * Several test and CI improvements [!172, !177, !178]
 * Updated translations

Quoted 8 lines

 - Refresh the pam-tests patch for the new release.

---
 ...meson-add-option-to-disable-pam-tests.patch | 18 +++++++++++------- ...bsecret_0.21.7.bb => libsecret_0.21.8.2.bb} |  2 +-

 2 files changed, 12 insertions(+), 8 deletions(-)

 rename meta/recipes-gnome/libsecret/{libsecret_0.21.7.bb => libsecret_0.21.8.2.bb} (92%)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/3394

Cheers,

Richard

#5 lore raw

v2 cover libsecret: upgrade to 0.21.8.2 and fix gnomebase verdir

In reply to Jaipaul Cheernam

This series upgrades libsecret to 0.21.8.2 and fixes gnome_verdir() so the four-component version resolves to the correct GNOME download dir.

Changes since v1:
- gnomebase: shorten commit message and code comment (no code change).
- libsecret: backport upstream <fcntl.h> fix (MR !181) for musl build.

Jaipaul Cheernam (2):
gnomebase: fix gnome_verdir for four-component versions
libsecret: upgrade 0.21.7 -> 0.21.8.2

 meta/classes-recipe/gnomebase.bbclass         |  4 ++-
 ...eson-add-option-to-disable-pam-tests.patch | 18 ++++++----
 ...lection-Make-sure-we-include-fcntl.h.patch | 33 +++++++++++++++++++
 ...secret_0.21.7.bb => libsecret_0.21.8.2.bb} |  6 ++--
 4 files changed, 51 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch
 rename meta/recipes-gnome/libsecret/{libsecret_0.21.7.bb => libsecret_0.21.8.2.bb} (86%)
#6 lore raw

PATCH v2 1/2 gnomebase: fix gnome_verdir for four-component versions

gnome_verdir() stripped the last version component, so four-component versions broke: libsecret 0.21.8.2 resolved to 0.21.8/ instead of 0.21/, causing a fetch 404. Use the first two components instead, which is unchanged for existing recipes.

---
Changes since v1: shorten commit message and code comment; no functional change.

 meta/classes-recipe/gnomebase.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes-recipe/gnomebase.bbclass +3 -1
index 57933dda71a..9715e90f165 100644
@@ -5,7 +5,9 @@
 #
 
 def gnome_verdir(v):
-    return ".".join(v.split(".")[:-1]) or v
+    # GNOME dirs use the first two version components, e.g. 0.21.8.2 -> 0.21
+    parts = v.split(".")
+    return ".".join(parts[:2] if len(parts) >= 3 else parts[:-1]) or v
 
 
 GNOME_COMPRESS_TYPE ?= "xz"
#7 lore raw

Re: [OE-core] [PATCH v2 1/2] gnomebase: fix gnome_verdir for four-component versions

This also fixes the upgrade to at-spi2-core 2.62.0.1

Quoted 42 lines · Jaipaul Cheernam via lists.openembedded.org

gnome_verdir() stripped the last version component, so four-component versions broke: libsecret 0.21.8.2 resolved to 0.21.8/ instead of 0.21/, causing a fetch 404. Use the first two components instead, which is unchanged for existing recipes.

---
Changes since v1: shorten commit message and code comment; no functional change.

 meta/classes-recipe/gnomebase.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes-recipe/gnomebase.bbclass +1 -1
index 57933dda71a..9715e90f165 100644
@@ -5,7 +5,9 @@
 #
 
 def gnome_verdir(v):
-    return ".".join(v.split(".")[:-1]) or v
+    # GNOME dirs use the first two version components, e.g. 0.21.8.2 ->

0.21

meta/classes-recipe/gnomebase.bbclass +2 -1
+    parts = v.split(".")
+    return ".".join(parts[:2] if len(parts) >= 3 else parts[:-1]) or v
 
 
 GNOME_COMPRESS_TYPE ?= "xz"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#246093):
https://lists.openembedded.org/g/openembedded-core/message/246093
Mute This Topic: https://lists.openembedded.org/mt/121304875/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw

Re: [OE-core] [PATCH v2 1/2] gnomebase: fix gnome_verdir for four-component versions

In reply to Jaipaul Cheernam

meta/classes-recipe/gnomebase.bbclass line 10

Quoted 5 lines · Jaipaul Cheernam via lists.openembedded.org

def gnome_verdir(v):

meta/classes-recipe/gnomebase.bbclass +3 -1
-    return ".".join(v.split(".")[:-1]) or v
+    # GNOME dirs use the first two version components, e.g. 0.21.8.2 -> 0.21
+    parts = v.split(".")
+    return ".".join(parts[:2] if len(parts) >= 3 else parts[:-1]) or v

The original logic was slightly overcomplicated, and this seems even more so.

Why isn’t this sufficient?

def gnome_verdir(v):
return “.”.join(v.split(“.”)[:2])

#9 lore raw

Re: [OE-core] [PATCH v2 1/2] gnomebase: fix gnome_verdir for four-component versions

Quoted 8 lines · Ross Burton via lists.openembedded.org

meta/classes-recipe/gnomebase.bbclass line 10

Quoted 5 lines · Jaipaul Cheernam via lists.openembedded.org

def gnome_verdir(v):

meta/classes-recipe/gnomebase.bbclass +3 -1
-    return ".".join(v.split(".")[:-1]) or v
+    # GNOME dirs use the first two version components, e.g. 0.21.8.2 -> 0.21
+    parts = v.split(".")
+    return ".".join(parts[:2] if len(parts) >= 3 else parts[:-1]) or v
Quoted 6 lines

The original logic was slightly overcomplicated, and this seems even more so.

Why isn’t this sufficient?

def gnome_verdir(v):
return “.”.join(v.split(“.”)[:2])

Hm because the required logic _is_ overcomplicated.

epiphany 50.6 is in the 50/ directory, libsecret 0.21.8 is in the 0.21 directory, and libsecret 0.21.8.1 is also in the 0.21 directory. My proposal doesn’t work for the 50.6 case.

I’m checking with GNOME to see if they’ve actually documented the algorithm used so we can be sure to match it.

Ross

#10 lore raw

Re: [OE-core] [PATCH v2 1/2] gnomebase: fix gnome_verdir for four-component versions

Quoted 1 line · Ross Burton

I’m checking with GNOME to see if they’ve actually documented the algorithm used so we can be sure to match it.

See get_majmin() in utils.py:
https://gitlab.gnome.org/Infrastructure/openshift-images/gnome-release-service/-/blob/main/gnome_release_service/gnome_release_system/utils.py?blame=1&ref_type=heads#L31

The code used to populate the server uses a major of 40 to change the logic. I’ve just sent a patch replicating that behaviour, linking to the upstream code.

Ross

#11 lore raw

Re: [OE-core] [PATCH v2 1/2] gnomebase: fix gnome_verdir for four-component versions

Quoted 1 line · Ross Burton

The code used to populate the server uses a major of 40 to change the logic. I’ve just sent a patch replicating that behaviour, linking to the upstream code.

Hi Ross,

If your new patch covers all usecases, please drop mine .

//Jaipaul

#12 lore raw

PATCH v2 2/2 libsecret: upgrade 0.21.7 -> 0.21.8.2

In reply to Jaipaul Cheernam

NEWS: https://gitlab.gnome.org/GNOME/libsecret/-/blob/0.21.8.2/NEWS

0.21.8.2
* Release to bump meson.build version

0.21.8.1
* Make secret_item_load_secrets_sync match async behavior [!180]

0.21.8
* Allow the content type to have additional parameters [#114, !175]
* Support individually encrypted items [!174]
* Ensure we return chained up GTask [!179]
* Ensure length of DH shared secret match length of prime on GnuTLS [!170]
* file-backend: Add thread safety and file-based locking to prevent concurrent write races [!171]
* file-backend: Fix possible memory leak in error path of secret_file_backend_real_search() [!173]
* file-collection: Fix memory leaks on repeated calls [!173]
* Replace some SecretSync with a sync implementation [!108]
* Add linker version script to hide private symbols [#70, !159]
* Stop using CONST annotations on non-const fns [!176]
* secret-tool: align behavior for collection option [!164]
* secret-tool: document --collection option [#31, !164]
* meson: Put test setup behind a feature option [#101, !162]
* Several test and CI improvements [!172, !177, !178]
* Updated translations

- Refresh the pam-tests patch for the new release.

- Backport a fcntl.h include fix so the file backend builds with musl [!181].

---
Changes since v1: backport upstream <fcntl.h> fix (MR !181) for the musl
build; use the GitLab NEWS link.

 ...eson-add-option-to-disable-pam-tests.patch | 18 ++++++----
 ...lection-Make-sure-we-include-fcntl.h.patch | 33 +++++++++++++++++++
 ...secret_0.21.7.bb => libsecret_0.21.8.2.bb} |  6 ++--
 3 files changed, 48 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch
 rename meta/recipes-gnome/libsecret/{libsecret_0.21.7.bb => libsecret_0.21.8.2.bb} (86%)
meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch +11 -7
index e0a5737eab8..e57aa94337b 100644
@@ -1,24 +1,28 @@
-From a9fd7dcddf8bc64646f2945ab564357c23111541 Mon Sep 17 00:00:00 2001
+From 5a7a8d10d08892dda84092afbcf5fbdeceed0287 Mon Sep 17 00:00:00 2001
 From: Markus Volk <[email protected]>
 Date: Tue, 3 Dec 2024 15:58:17 +0100
 Subject: [PATCH] meson: add option to disable pam tests
 
 Upstream-Status: Denied [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/151]
 
+refreshed for 0.21.8.2
+
 Signed-off-by: Markus Volk <[email protected]>
+Signed-off-by: Jaipaul Cheernam <[email protected]>
 ---
- meson_options.txt |  1 +
+ meson_options.txt |  6 ++++++
  pam/meson.build   | 44 +++++++++++++++++++++++---------------------
- 2 files changed, 24 insertions(+), 21 deletions(-)
+ 2 files changed, 29 insertions(+), 21 deletions(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 936eff8..2ae14f2 100644
+index d7b1628..0bed21d 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -61,3 +61,8 @@
-   description: 'Build PAM module',
+@@ -66,3 +66,9 @@ option('test_setup',
+   value: 'auto',
+   description: 'Automatically setup a test environment when running tests',
  )
-
++
 +option('pam-tests',
 +  type: 'boolean',
 +  value: true,
meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch new file +33 -0
new file mode 100644
index 00000000000..2150e310b00
@@ -0,0 +1,33 @@
+From a5cd57f103038c06b64d5f6ebfd0e627bb40af4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Schwarz?= <[email protected]>
+Date: Tue, 15 Sep 2026 00:11:56 +0000
+Subject: [PATCH] file-collection: Make sure we include <fcntl.h>
+
+Without it, libsecret fails to compile with musl/libc++. Specifically,
+Clang compiler complains that the `open()` and the constants `O_CREAT`
+and `O_RDRW` are not defined.
+
+Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/work_items/117
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/181]
+Signed-off-by: Jaipaul Cheernam <[email protected]>
+---
+ libsecret/secret-file-collection.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libsecret/secret-file-collection.c b/libsecret/secret-file-collection.c
+index d528023..59667a4 100644
+--- a/libsecret/secret-file-collection.c
++++ b/libsecret/secret-file-collection.c
+@@ -24,6 +24,8 @@
+ #include <sys/file.h>
+ #include <errno.h>
+ 
++#include <fcntl.h>
++
+ EGG_SECURE_DECLARE (secret_file_collection);
+ 
+ #ifdef WITH_GCRYPT
+-- 
+GitLab
+
meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb renamed from meta/recipes-gnome/libsecret/libsecret_0.21.7.bb +4 -2
similarity index 86%
rename from meta/recipes-gnome/libsecret/libsecret_0.21.7.bb
rename to meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb
index e77f83e92fe..409a2c0857c 100644
@@ -12,8 +12,10 @@ inherit gnomebase gi-docgen vala gobject-introspection manpages
 
 DEPENDS += "glib-2.0 libgcrypt gettext-native"
 
-SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch"
-SRC_URI[archive.sha256sum] = "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e"
+SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch \
+            file://0002-file-collection-Make-sure-we-include-fcntl.h.patch \
+            "
+SRC_URI[archive.sha256sum] = "142948339c5b971d8f6a8c7099521f6fd319b6fe73d2694b4e6d3310ed28b6e6"
 
 EXTRA_OEMESON += "-Dpam-tests=false"