summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION60
-rw-r--r--php-pecl-uuid.spec199
4 files changed, 148 insertions, 117 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/PHPINFO b/PHPINFO
index a3930cc..fdbc958 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,6 +2,6 @@
uuid
UUID extension => enabled
-Version => 1.0.5 (stable)
-Released => 2019-11-28
+Version => 1.3.0 (stable)
+Released => 2025-05-12
Authors => Hartmut Holzgraefe, Remi Collet
diff --git a/REFLECTION b/REFLECTION
index ba49ab0..1ee6d97 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,15 +1,21 @@
-Extension [ <persistent> extension #156 uuid version 1.0.5 ] {
+Extension [ <persistent> extension #115 uuid version 1.3.0 ] {
- - Constants [11] {
+ - Constants [17] {
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_TIME ] { 1 }
Constant [ int UUID_TYPE_DCE ] { 4 }
Constant [ int UUID_TYPE_NAME ] { 1 }
+ Constant [ int UUID_TYPE_TIME ] { 1 }
+ Constant [ int UUID_TYPE_TIME_V6 ] { 6 }
+ Constant [ int UUID_TYPE_TIME_V7 ] { 7 }
+ Constant [ int UUID_TYPE_VENDOR ] { 8 }
+ 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 }
}
@@ -18,63 +24,89 @@ Extension [ <persistent> extension #156 uuid version 1.0.5 ] {
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> string $uuid_ns ]
+ Parameter #1 [ <required> string $name ]
+ }
+ - Return [ string ]
+ }
+ Function [ <internal:uuid> function uuid_generate_sha1 ] {
+
+ - Parameters [2] {
+ 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/php-pecl-uuid.spec b/php-pecl-uuid.spec
index ed4ee5f..7f88453 100644
--- a/php-pecl-uuid.spec
+++ b/php-pecl-uuid.spec
@@ -3,86 +3,55 @@
#
# Fedora spec file for php-pecl-uuid
#
-# Copyright (c) 2012-2019 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2012-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
+%{?scl:%scl_package php-pecl-uuid}
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-uuid
-%endif
+%bcond_without tests
+%global pie_vend pecl
+%global pie_proj uuid
%global pecl_name uuid
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
%global ini_name 40-%{pecl_name}.ini
-%endif
#global prever RC1
+%global sources %{pecl_name}-%{version}%{?prever}
+%global _configure ../%{sources}/configure
Summary: Universally Unique Identifier extension for PHP
-Name: %{?sub_prefix}php-pecl-uuid
-Version: 1.0.5
+Name: %{?scl_prefix}php-pecl-uuid
+Version: 1.3.0
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: LGPLv2+
-URL: http://pecl.php.net/package/uuid
-Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+License: LGPL-2.1-or-later
+URL: https://pecl.php.net/package/uuid
+Source: https://pecl.php.net/get/%{sources}.tgz
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: libuuid-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
# 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}
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared object
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
+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-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})}.
@@ -92,12 +61,10 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
-mv %{pecl_name}-%{version}%{?prever} NTS
-cd NTS
-
+cd %{sources}
# 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
@@ -106,9 +73,9 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Drop in the bit of configuration
@@ -122,22 +89,25 @@ EOF
%{?dtsenable}
export PHP_RPATH=no
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config \
+ --with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \
--with-uuid
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__ztsphpconfig} \
--with-libdir=%{_lib} \
--with-uuid
-make %{?_smp_mflags}
+%make_build
%endif
@@ -145,12 +115,12 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
# Install the ZTS stuff
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -158,54 +128,38 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Documentation
-cd NTS
+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 NTS
+cd %{sources}
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php
+: Minimal load test for NTS extension
+%{__php} --no-php-ini \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --modules | grep '^%{pecl_name}$'
-%if %{with_zts}
-cd ../ZTS
-
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
-NO_INTERACTION=1 \
+%if %{with tests}
+: Upstream test suite for NTS extension
+TEST_PHP_EXECUTABLE=%{__php} \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__php} -n run-tests.php -q --show-diff
%endif
-
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
+%if %{with_zts}
+: Minimal load test for NTS extension
+%{__ztsphp} --no-php-ini \
+ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
+ --modules | grep '^%{pecl_name}$'
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -219,6 +173,49 @@ fi
%changelog
+* 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
+
+* Tue Aug 27 2024 Remi Collet <remi@remirepo.net> - 1.2.0-8
+- workaround for recent util-linux
+
+* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 1.2.0-7
+- build out of sources tree
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.2.0-6
+- rebuild for PHP 8.3.0RC1
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.2.0-5
+- rebuild for PHP 8.2.0RC1
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.2.0-4
+- rebuild for 8.1.0RC1
+
+* Fri Apr 30 2021 Remi Collet <remi@remirepo.net> - 1.2.0-3
+- F34 rebuild for https://github.com/remicollet/remirepo/issues/174
+
+* Tue Oct 6 2020 Remi Collet <remi@remirepo.net> - 1.2.0-1
+- update to 1.2.0
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.1.0-4
+- rebuild for PHP 8.0.0RC1
+
+* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 1.1.0-3
+- rebuild for PHP 8.0.0beta3
+
+* Wed Aug 5 2020 Remi Collet <remi@remirepo.net> - 1.1.0-2
+- rebuild for 8.0.0beta1
+
+* Thu Nov 28 2019 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+
* Thu Nov 28 2019 Remi Collet <remi@remirepo.net> - 1.0.5-1
- update to 1.0.5