diff options
author | Remi Collet <remi@remirepo.net> | 2024-09-30 13:48:02 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-09-30 13:48:02 +0200 |
commit | 99e1123175b6aaaf150c4862f3f65677e86ca584 (patch) | |
tree | 9d0456b03bca5b9669a7346dee13c5af99a6f2ff | |
parent | c3a46aa7918297c251df1a7e6677016b5ad03052 (diff) |
fix workaround for recent util-linux
see https://bugzilla.redhat.com/2315645
-rw-r--r-- | php-pecl-uuid.spec | 4 | ||||
-rw-r--r-- | uuid-workaround.patch | 65 |
2 files changed, 20 insertions, 49 deletions
diff --git a/php-pecl-uuid.spec b/php-pecl-uuid.spec index a84efd0..8151d1c 100644 --- a/php-pecl-uuid.spec +++ b/php-pecl-uuid.spec @@ -24,7 +24,7 @@ Summary: Universally Unique Identifier extension for PHP Name: %{?scl_prefix}php-pecl-uuid Version: 1.2.0 -Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: LGPL-2.1-or-later URL: https://pecl.php.net/package/uuid Source: https://pecl.php.net/get/%{sources}.tgz @@ -184,7 +184,7 @@ REPORT_EXIT_STATUS=1 \ %changelog -* Mon Sep 30 2024 Remi Collet <remi@remirepo.net> - 1.2.0-9 +* Mon Sep 30 2024 Remi Collet <remi@remirepo.net> - 1.2.0-10 - fix workaround for recent util-linux see https://bugzilla.redhat.com/2315645 diff --git a/uuid-workaround.patch b/uuid-workaround.patch index 430f54f..5c82105 100644 --- a/uuid-workaround.patch +++ b/uuid-workaround.patch @@ -1,57 +1,28 @@ -From 3080c0be6da7477954862e1ed9a267ce39b268ad Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Tue, 27 Aug 2024 16:04:16 +0200 -Subject: [PATCH 1/2] workround with define uuid_time uuid_time64 - ---- - uuid.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/uuid.c b/uuid.c -index ae024e7..73136f0 100644 ---- a/uuid.c -+++ b/uuid.c -@@ -27,6 +27,12 @@ +diff -up uuid-1.2.0/config.m4.orig uuid-1.2.0/config.m4 +--- uuid-1.2.0/config.m4.orig 2024-09-30 12:18:50.826731569 +0200 ++++ uuid-1.2.0/config.m4 2024-09-30 12:20:00.330402220 +0200 +@@ -18,6 +18,7 @@ if test "$PHP_UUID" != "no"; then + PHP_CHECK_FUNC_LIB(uuid_variant, uuid) + PHP_CHECK_FUNC_LIB(uuid_generate_md5, uuid) + PHP_CHECK_FUNC_LIB(uuid_generate_sha1, uuid) ++ PHP_CHECK_FUNC_LIB(uuid_time64, uuid) + + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_UUID" +diff -up uuid-1.2.0/uuid.c.orig uuid-1.2.0/uuid.c +--- uuid-1.2.0/uuid.c.orig 2020-10-06 12:50:46.000000000 +0200 ++++ uuid-1.2.0/uuid.c 2024-09-30 12:18:50.826731569 +0200 +@@ -27,6 +27,13 @@ #ifdef HAVE_UUID ++#if !defined(HAVE_UUID_TIME64) && defined(uuid_time) +/* workround with define uuid_time uuid_time64 */ -+#ifdef uuid_time ++/* Also see https://bugzilla.redhat.com/2315645 */ +#undef uuid_time -+#define HAVE_TIME64 ++extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); +#endif + #if PHP_VERSION_ID < 80000 #define VALUE_ERROR(n,name,msg) php_error_docref(NULL, E_WARNING, "Argument #%d (%s) %s", n, name, msg); RETURN_FALSE #define RETURN_THROWS() return --- -2.46.2 - -From 77720b2b4c2c57cd18ffc5dbf32a247b6952abed Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Mon, 30 Sep 2024 11:45:34 +0200 -Subject: [PATCH 2/2] fix workaround - ---- - uuid.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/uuid.c b/uuid.c -index 73136f0..c45aa2a 100644 ---- a/uuid.c -+++ b/uuid.c -@@ -28,9 +28,10 @@ - #ifdef HAVE_UUID - - /* workround with define uuid_time uuid_time64 */ -+/* Also see https://bugzilla.redhat.com/2315645 */ - #ifdef uuid_time - #undef uuid_time --#define HAVE_TIME64 -+extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); - #endif - - #if PHP_VERSION_ID < 80000 --- -2.46.2 - |