[PATCH core-updates] gnu: glib-networking: Fix 32-bit builds.

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • Kaelyn Takata
Owner
unassigned
Submitted by
Kaelyn Takata
Severity
normal
K
K
Kaelyn Takata wrote on 15 Mar 2023 18:47
(address . guix-patches@gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
1ad88ac769189d36139fbfd3ceb562fbe3a1fed5.1678902428.git.kaelyn.alexi@protonmail.com
* gnu/packages/gnome.scm (glib-networking): Remove obsolete patch.
* gnu/packages/patches/glib-networking-32-bit-time.patch: Remove patch.
* gnu/local: Remove it.
---
gnu/local.mk | 1 -
gnu/packages/gnome.scm | 11 ----
.../patches/glib-networking-32-bit-time.patch | 61 -------------------
3 files changed, 73 deletions(-)
delete mode 100644 gnu/packages/patches/glib-networking-32-bit-time.patch

Toggle diff (103 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 73617d3af7..ff35978f07 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,7 +1204,6 @@ dist_patch_DATA = \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
%D%/packages/patches/glib-appinfo-watch.patch \
%D%/packages/patches/glib-networking-gnutls-binding.patch \
- %D%/packages/patches/glib-networking-32-bit-time.patch \
%D%/packages/patches/glib-skip-failing-test.patch \
%D%/packages/patches/glibc-CVE-2019-7309.patch \
%D%/packages/patches/glibc-CVE-2019-9169.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 62b3ae72c7..ce7f3b6cec 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4911,17 +4911,6 @@ (define-public glib-networking
(patches
(search-patches "glib-networking-gnutls-binding.patch"))))
(build-system meson-build-system)
- (arguments
- (if (target-64bit?)
- '()
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'work-around-32-bit-time-t
- (lambda _
- (invoke "patch" "--force" "-p1" "-i"
- #$(local-file
- (search-patch
- "glib-networking-32-bit-time.patch")))))))))
(native-inputs
(list pkg-config gettext-minimal))
(inputs
diff --git a/gnu/packages/patches/glib-networking-32-bit-time.patch b/gnu/packages/patches/glib-networking-32-bit-time.patch
deleted file mode 100644
index a437310270..0000000000
--- a/gnu/packages/patches/glib-networking-32-bit-time.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Work around a year-2038 issue when building with a 32-bit 'time_t'
-on 32-bit platforms:
-
- https://gitlab.gnome.org/GNOME/glib-networking/-/issues/172
-
-From 4f8ca86a0e460794188c3355f0c7cc11fdbe4229 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Date: Tue, 21 Sep 2021 17:07:44 +0000
-Subject: [PATCH] tests: Accept GNUTLS' workaround for limited size of time_t
-
----
- tls/tests/certificate.c | 15 +++++++++++++++
- tls/tests/meson.build | 1 +
- 2 files changed, 16 insertions(+)
-
-diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c
-index c0100d30..d216c710 100644
---- a/tls/tests/certificate.c
-+++ b/tls/tests/certificate.c
-@@ -672,6 +672,12 @@ test_certificate_not_valid_before (void)
- g_object_unref (cert);
- }
-
-+/* On 32-bit, GNUTLS caps expiry times at 2037-12-31 23:23:23 to avoid
-+ * overflowing time_t. Hopefully by 2037, either 32-bit will finally have
-+ * died out, or GNUTLS will rethink its approach to
-+ * https://gitlab.com/gnutls/gnutls/-/issues/370 */
-+#define GNUTLS_32_BIT_NOT_VALID_AFTER_MAX 2145914603
-+
- static void
- test_certificate_not_valid_after (void)
- {
-@@ -686,7 +692,16 @@ test_certificate_not_valid_after (void)
- actual = g_tls_certificate_get_not_valid_after (cert);
- g_assert_nonnull (actual);
- actual_str = g_date_time_format_iso8601 (actual);
-+
-+#if SIZEOF_TIME_T <= 4
-+ if (g_date_time_to_unix (actual) == GNUTLS_32_BIT_NOT_VALID_AFTER_MAX)
-+ g_test_incomplete ("not-valid-after date not representable on 32-bit");
-+ else
-+ g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#else
- g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#endif
-+
- g_free (actual_str);
- g_date_time_unref (actual);
- g_object_unref (cert);
-diff --git a/tls/tests/meson.build b/tls/tests/meson.build
-index e9c7d8c6..7415f913 100644
---- a/tls/tests/meson.build
-+++ b/tls/tests/meson.build
-@@ -69,6 +69,7 @@ foreach backend: backends
- test_cflags = cflags + [
- '-DBACKEND="@0@"'.format(backend),
- '-DBACKEND_IS_' + backend.to_upper(),
-+ '-DSIZEOF_TIME_T=@0@'.format(cc.sizeof('time_t', prefix: '#include <time.h>')),
- ]
-
- if backend == 'openssl'

base-commit: 37399b18ef70f2b32c50ea45b3bfa649bbf58f16
--
2.39.1
K
K
Kaelyn Takata wrote on 17 Mar 2023 21:39
[PATCH v2] gnu: glib-networking: Fix 32-bit builds.
(address . 62209@debbugs.gnu.org)(name . Kaelyn Takata)(address . kaelyn.alexi@protonmail.com)
1ad88ac769189d36139fbfd3ceb562fbe3a1fed5.1679085527.git.kaelyn.alexi@protonmail.com
* gnu/packages/gnome.scm (glib-networking): Remove obsolete patch.
* gnu/packages/patches/glib-networking-32-bit-time.patch: Remove patch.
* gnu/local: Remove it.
---
gnu/local.mk | 1 -
gnu/packages/gnome.scm | 11 ----
.../patches/glib-networking-32-bit-time.patch | 61 -------------------
3 files changed, 73 deletions(-)
delete mode 100644 gnu/packages/patches/glib-networking-32-bit-time.patch
Toggle diff (103 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 73617d3af7..ff35978f07 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,7 +1204,6 @@ dist_patch_DATA = \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
%D%/packages/patches/glib-appinfo-watch.patch \
%D%/packages/patches/glib-networking-gnutls-binding.patch \
- %D%/packages/patches/glib-networking-32-bit-time.patch \
%D%/packages/patches/glib-skip-failing-test.patch \
%D%/packages/patches/glibc-CVE-2019-7309.patch \
%D%/packages/patches/glibc-CVE-2019-9169.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 62b3ae72c7..ce7f3b6cec 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4911,17 +4911,6 @@ (define-public glib-networking
(patches
(search-patches "glib-networking-gnutls-binding.patch"))))
(build-system meson-build-system)
- (arguments
- (if (target-64bit?)
- '()
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'work-around-32-bit-time-t
- (lambda _
- (invoke "patch" "--force" "-p1" "-i"
- #$(local-file
- (search-patch
- "glib-networking-32-bit-time.patch")))))))))
(native-inputs
(list pkg-config gettext-minimal))
(inputs
diff --git a/gnu/packages/patches/glib-networking-32-bit-time.patch b/gnu/packages/patches/glib-networking-32-bit-time.patch
deleted file mode 100644
index a437310270..0000000000
--- a/gnu/packages/patches/glib-networking-32-bit-time.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Work around a year-2038 issue when building with a 32-bit 'time_t'
-on 32-bit platforms:
-
- https://gitlab.gnome.org/GNOME/glib-networking/-/issues/172
-
-From 4f8ca86a0e460794188c3355f0c7cc11fdbe4229 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Date: Tue, 21 Sep 2021 17:07:44 +0000
-Subject: [PATCH] tests: Accept GNUTLS' workaround for limited size of time_t
-
----
- tls/tests/certificate.c | 15 +++++++++++++++
- tls/tests/meson.build | 1 +
- 2 files changed, 16 insertions(+)
-
-diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c
-index c0100d30..d216c710 100644
---- a/tls/tests/certificate.c
-+++ b/tls/tests/certificate.c
-@@ -672,6 +672,12 @@ test_certificate_not_valid_before (void)
- g_object_unref (cert);
- }
-
-+/* On 32-bit, GNUTLS caps expiry times at 2037-12-31 23:23:23 to avoid
-+ * overflowing time_t. Hopefully by 2037, either 32-bit will finally have
-+ * died out, or GNUTLS will rethink its approach to
-+ * https://gitlab.com/gnutls/gnutls/-/issues/370 */
-+#define GNUTLS_32_BIT_NOT_VALID_AFTER_MAX 2145914603
-+
- static void
- test_certificate_not_valid_after (void)
- {
-@@ -686,7 +692,16 @@ test_certificate_not_valid_after (void)
- actual = g_tls_certificate_get_not_valid_after (cert);
- g_assert_nonnull (actual);
- actual_str = g_date_time_format_iso8601 (actual);
-+
-+#if SIZEOF_TIME_T <= 4
-+ if (g_date_time_to_unix (actual) == GNUTLS_32_BIT_NOT_VALID_AFTER_MAX)
-+ g_test_incomplete ("not-valid-after date not representable on 32-bit");
-+ else
-+ g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#else
- g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#endif
-+
- g_free (actual_str);
- g_date_time_unref (actual);
- g_object_unref (cert);
-diff --git a/tls/tests/meson.build b/tls/tests/meson.build
-index e9c7d8c6..7415f913 100644
---- a/tls/tests/meson.build
-+++ b/tls/tests/meson.build
-@@ -69,6 +69,7 @@ foreach backend: backends
- test_cflags = cflags + [
- '-DBACKEND="@0@"'.format(backend),
- '-DBACKEND_IS_' + backend.to_upper(),
-+ '-DSIZEOF_TIME_T=@0@'.format(cc.sizeof('time_t', prefix: '#include <time.h>')),
- ]
-
- if backend == 'openssl'
base-commit: 37399b18ef70f2b32c50ea45b3bfa649bbf58f16
A
A
Andreas Enge wrote on 18 Mar 2023 18:31
Re: State of core-updates
(name . Kaelyn)(address . kaelyn.alexi@protonmail.com)
ZBX1dsBqyfW3hCIv@jurong
Am Sat, Mar 18, 2023 at 04:36:26PM +0000 schrieb Kaelyn:
Toggle quote (2 lines)
> I'm at a complete loss as to why the patch won't apply properly.

Ah, the joys of email formatting maybe.

Toggle quote (2 lines)
> I've attached the original patch as generated by "git format-patch

Thanks, I applied and pushed it and am closing the bug.

Andreas
Closed
?