summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION77
-rw-r--r--composer.json13
-rw-r--r--php-pecl-uuid.spec93
-rw-r--r--uuid-workaround.patch42
5 files changed, 109 insertions, 120 deletions
diff --git a/PHPINFO b/PHPINFO
index fa74e96..fdbc958 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,6 +2,6 @@
uuid
UUID extension => enabled
-Version => 1.2.0 (stable)
-Released => 2020-10-06
+Version => 1.3.0 (stable)
+Released => 2025-05-12
Authors => Hartmut Holzgraefe, Remi Collet
diff --git a/REFLECTION b/REFLECTION
index d6a04df..ccb2871 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,97 +1,112 @@
-Extension [ <persistent> extension #102 uuid version 1.2.0 ] {
+Extension [ <persistent> extension #124 uuid version 1.3.0 ] {
- - Constants [14] {
- Constant [ int UUID_VARIANT_NCS ] { 0 }
- Constant [ int UUID_VARIANT_DCE ] { 1 }
- Constant [ int UUID_VARIANT_MICROSOFT ] { 2 }
- Constant [ int UUID_VARIANT_OTHER ] { 3 }
- Constant [ int UUID_TYPE_DEFAULT ] { 0 }
- Constant [ int UUID_TYPE_DCE ] { 4 }
- Constant [ int UUID_TYPE_NAME ] { 1 }
- Constant [ int UUID_TYPE_TIME ] { 1 }
- Constant [ int UUID_TYPE_SECURITY ] { 2 }
- Constant [ int UUID_TYPE_MD5 ] { 3 }
- Constant [ int UUID_TYPE_RANDOM ] { 4 }
- Constant [ int UUID_TYPE_SHA1 ] { 5 }
- Constant [ int UUID_TYPE_NULL ] { -1 }
- Constant [ int UUID_TYPE_INVALID ] { -42 }
+ - Constants [17] {
+ Constant [ <persistent> int UUID_VARIANT_NCS ] { 0 }
+ Constant [ <persistent> int UUID_VARIANT_DCE ] { 1 }
+ Constant [ <persistent> int UUID_VARIANT_MICROSOFT ] { 2 }
+ Constant [ <persistent> int UUID_VARIANT_OTHER ] { 3 }
+ Constant [ <persistent> int UUID_TYPE_DEFAULT ] { 0 }
+ Constant [ <persistent, deprecated> int UUID_TYPE_DCE ] { 4 }
+ Constant [ <persistent, deprecated> int UUID_TYPE_NAME ] { 1 }
+ Constant [ <persistent> int UUID_TYPE_TIME ] { 1 }
+ Constant [ <persistent> int UUID_TYPE_TIME_V6 ] { 6 }
+ Constant [ <persistent> int UUID_TYPE_TIME_V7 ] { 7 }
+ Constant [ <persistent> int UUID_TYPE_VENDOR ] { 8 }
+ Constant [ <persistent> int UUID_TYPE_SECURITY ] { 2 }
+ Constant [ <persistent> int UUID_TYPE_MD5 ] { 3 }
+ Constant [ <persistent> int UUID_TYPE_RANDOM ] { 4 }
+ Constant [ <persistent> int UUID_TYPE_SHA1 ] { 5 }
+ Constant [ <persistent> int UUID_TYPE_NULL ] { -1 }
+ Constant [ <persistent> int UUID_TYPE_INVALID ] { -42 }
}
- Functions {
Function [ <internal:uuid> function uuid_create ] {
- Parameters [1] {
- Parameter #0 [ <optional> $uuid_type ]
+ Parameter #0 [ <optional> int $uuid_type = UUID_TYPE_DEFAULT ]
}
+ - Return [ string ]
}
Function [ <internal:uuid> function uuid_is_valid ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ bool ]
}
Function [ <internal:uuid> function uuid_compare ] {
- Parameters [2] {
- Parameter #0 [ <required> $uuid1 ]
- Parameter #1 [ <required> $uuid2 ]
+ Parameter #0 [ <required> string $uuid1 ]
+ Parameter #1 [ <required> string $uuid2 ]
}
+ - Return [ int ]
}
Function [ <internal:uuid> function uuid_is_null ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ bool ]
}
Function [ <internal:uuid> function uuid_generate_md5 ] {
- Parameters [2] {
- Parameter #0 [ <required> $uuid_ns ]
- Parameter #1 [ <required> $name ]
+ Parameter #0 [ <required> string $uuid_ns ]
+ Parameter #1 [ <required> string $name ]
}
+ - Return [ string ]
}
Function [ <internal:uuid> function uuid_generate_sha1 ] {
- Parameters [2] {
- Parameter #0 [ <required> $uuid_ns ]
- Parameter #1 [ <required> $name ]
+ Parameter #0 [ <required> string $uuid_ns ]
+ Parameter #1 [ <required> string $name ]
}
+ - Return [ string ]
}
Function [ <internal:uuid> function uuid_type ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ int ]
}
Function [ <internal:uuid> function uuid_variant ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ int ]
}
Function [ <internal:uuid> function uuid_time ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ int ]
}
Function [ <internal:uuid> function uuid_mac ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ string ]
}
Function [ <internal:uuid> function uuid_parse ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ string ]
}
Function [ <internal:uuid> function uuid_unparse ] {
- Parameters [1] {
- Parameter #0 [ <required> $uuid ]
+ Parameter #0 [ <required> string $uuid ]
}
+ - Return [ string ]
}
}
}
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..60737a8
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "name": "pecl/uuid",
+ "type": "php-ext",
+ "license": "LGPL-2.1-or-later",
+ "description": "UUID extension",
+ "require": {
+ "php": ">= 7.0.0"
+ },
+ "php-ext": {
+ "extension-name": "uuid",
+ "configure-options": []
+ }
+}
diff --git a/php-pecl-uuid.spec b/php-pecl-uuid.spec
index 8151d1c..d61b34d 100644
--- a/php-pecl-uuid.spec
+++ b/php-pecl-uuid.spec
@@ -3,9 +3,9 @@
#
# Fedora spec file for php-pecl-uuid
#
-# Copyright (c) 2012-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2012-2026 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -14,27 +14,35 @@
%bcond_without tests
+%global pie_vend pecl
+%global pie_proj uuid
%global pecl_name uuid
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
#global prever RC1
-%global sources %{pecl_name}-%{version}%{?prever}
+%global sources %{archivename}
%global _configure ../%{sources}/configure
-Summary: Universally Unique Identifier extension for PHP
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-networking-uuid
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
+
Name: %{?scl_prefix}php-pecl-uuid
-Version: 1.2.0
-Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: Universally Unique Identifier extension for PHP
License: LGPL-2.1-or-later
-URL: https://pecl.php.net/package/uuid
-Source: https://pecl.php.net/get/%{sources}.tgz
-
-Patch0: %{pecl_name}-workaround.patch
+Version: 1.3.0
+Release: 4%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: libuuid-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -43,16 +51,18 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api}
# both provides same extension, with different API
Conflicts: %{?scl_prefix}uuid-php
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+# Extension
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
%description
-A wrapper around Universally Unique Identifier library (libuuid).
+A wrapper around Universally Unique IDentifier library (libuuid).
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -60,14 +70,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
cd %{sources}
-%patch -P0 -p1 -b .orig
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_UUID_VERSION/{s/.* "//;s/".*$//;p}' php_uuid.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -127,15 +130,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Install the package XML file
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-# Documentation
-cd %{sources}
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
cd %{sources}
@@ -158,21 +152,14 @@ REPORT_EXIT_STATUS=1 \
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-
-%if %{with tests}
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
-%endif
%endif
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/*.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -184,6 +171,22 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Mar 17 2026 Remi Collet <remi@remirepo.net> - 1.3.0-4
+- drop pear/pecl dependency
+- sources from github
+
+* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.3.0-3
+- rebuild for PHP 8.5.0RC1
+
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 1.3.0-2
+- rebuild for 8.5.0alpha3
+
+* Mon May 12 2025 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+
+* Tue Oct 8 2024 Remi Collet <remi@remirepo.net> - 1.2.1-1
+- update to 1.2.1
+
* 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
deleted file mode 100644
index a41e21a..0000000
--- a/uuid-workaround.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -up uuid-1.2.0/config.m4.orig uuid-1.2.0/config.m4
---- uuid-1.2.0/config.m4.orig 2020-10-06 12:50:46.000000000 +0200
-+++ uuid-1.2.0/config.m4 2024-09-30 13:55:26.600108993 +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 13:56:33.329669413 +0200
-@@ -27,6 +27,15 @@
-
- #ifdef HAVE_UUID
-
-+#if defined(uuid_time)
-+/* workround with define uuid_time uuid_time64 */
-+/* Also see https://bugzilla.redhat.com/2315645 */
-+#undef uuid_time
-+#if !defined(HAVE_UUID_TIME64)
-+extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
-+#endif
-+#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
-@@ -374,7 +383,11 @@ PHP_FUNCTION(uuid_time)
- VALUE_ERROR(1, "$uuid", "UUID DCE TIME expected");
- }
-
-+#if defined(HAVE_UUID_TIME64)
-+ RETURN_LONG(uuid_time64(u, NULL));
-+#else
- RETURN_LONG(uuid_time(u, NULL));
-+#endif
- }
- /* }}} uuid_time */
-