summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION45
-rw-r--r--composer.json13
-rw-r--r--php-pecl-xattr.spec214
5 files changed, 139 insertions, 137 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 fa7967b..931a890 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,4 +2,4 @@
xattr
xattr support => enabled
-PECL module version => 1.3.1
+PECL module version => 1.4.1
diff --git a/REFLECTION b/REFLECTION
index 9e97b4b..1afd935 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #99 xattr version 1.3.1 ] {
+Extension [ <persistent> extension #126 xattr version 1.4.1 ] {
- Constants [9] {
Constant [ int XATTR_CREATE ] { 1 }
@@ -16,41 +16,46 @@ Extension [ <persistent> extension #99 xattr version 1.3.1 ] {
Function [ <internal:xattr> function xattr_set ] {
- Parameters [4] {
- Parameter #0 [ <required> $path ]
- Parameter #1 [ <required> $name ]
- Parameter #2 [ <required> $value ]
- Parameter #3 [ <optional> $flags ]
+ Parameter #0 [ <required> string $path ]
+ Parameter #1 [ <required> string $name ]
+ Parameter #2 [ <required> string $value ]
+ Parameter #3 [ <optional> int $flag = 0 ]
}
+ - Return [ bool ]
}
Function [ <internal:xattr> function xattr_get ] {
- Parameters [3] {
- Parameter #0 [ <required> $path ]
- Parameter #1 [ <required> $name ]
- Parameter #2 [ <optional> $flags ]
+ Parameter #0 [ <required> string $path ]
+ Parameter #1 [ <required> string $name ]
+ Parameter #2 [ <optional> int $flags = 0 ]
}
+ - Return [ string|false ]
}
- Function [ <internal:xattr> function xattr_remove ] {
+ Function [ <internal:xattr> function xattr_supported ] {
- - Parameters [3] {
- Parameter #0 [ <required> $path ]
- Parameter #1 [ <required> $name ]
- Parameter #2 [ <optional> $flags ]
+ - Parameters [2] {
+ Parameter #0 [ <required> string $path ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Return [ bool ]
}
- Function [ <internal:xattr> function xattr_list ] {
+ Function [ <internal:xattr> function xattr_remove ] {
- - Parameters [2] {
- Parameter #0 [ <required> $path ]
- Parameter #1 [ <optional> $flags ]
+ - Parameters [3] {
+ Parameter #0 [ <required> string $path ]
+ Parameter #1 [ <required> string $name ]
+ Parameter #2 [ <optional> int $flags = 0 ]
}
+ - Return [ bool ]
}
- Function [ <internal:xattr> function xattr_supported ] {
+ Function [ <internal:xattr> function xattr_list ] {
- Parameters [2] {
- Parameter #0 [ <required> $path ]
- Parameter #1 [ <optional> $flags ]
+ Parameter #0 [ <required> string $path ]
+ Parameter #1 [ <optional> int $flags = 0 ]
}
+ - Return [ array|false ]
}
}
}
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..6ce4969
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "name": "pecl/xattr",
+ "type": "php-ext",
+ "license": "PHP-3.01",
+ "description": "Extended attributes",
+ "require": {
+ "php": ">= 7.2.0"
+ },
+ "php-ext": {
+ "extension-name": "pecl/xattr",
+ "configure-options": []
+ }
+}
diff --git a/php-pecl-xattr.spec b/php-pecl-xattr.spec
index 168a522..19c5039 100644
--- a/php-pecl-xattr.spec
+++ b/php-pecl-xattr.spec
@@ -1,68 +1,51 @@
# remirepo spec file for php-pecl-xattr
#
-# Copyright (c) 2013-2020 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-xattr
-%endif
-
-%global pecl_name xattr
-%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
+%{?scl:%scl_package php-pecl-xattr}
+
+%global pecl_name xattr
+%global pie_vend pecl
+%global pie_proj xattr
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{gh_proj}-%{version}
+%global _configure ../%{sources}/configure
+
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-file_system-xattr
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
Summary: Extended attributes
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.3.1
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.4.1
+%forgemeta
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel
-BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: make
+BuildRequires: %{?scl_prefix}php-devel >= 7.2
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-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.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
+# 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
@@ -75,15 +58,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"/' \
- %{?_licensedir:-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_XATTR_VERSION/{s/.* "//;s/".*$//;p}' php_xattr.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -92,10 +67,7 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
fi
cd ..
-%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
-%endif
+mkdir NTS ZTS
# Create configuration file
cat > %{ini_name} << 'EOF'
@@ -107,102 +79,75 @@ EOF
%build
%{?dtsenable}
-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-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# 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
-%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
-%endif
-
-
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+%{__php} -n run-tests.php -q --show-diff
%if %{with_zts}
cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
-
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{_bindir}/zts-php -n run-tests.php --show-diff
+ --modules | grep '^%{pecl_name}$'
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license %{sources}/LICENSE
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/*.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -214,6 +159,43 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Mar 11 2026 Remi Collet <remi@remirepo.net> - 1.4.1-3
+- drop pear/pecl dependency
+- sources from github
+
+* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.4.1-2
+- rebuild for PHP 8.5.0RC1
+
+* Wed Sep 17 2025 Remi Collet <remi@remirepo.net> - 1.4.1-1
+- update to 1.4.1
+- re-license spec file to CECILL-2.1
+- add pie virtual provides
+
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 1.4.0-8
+- rebuild for 8.5.0alpha3
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.4.0-7
+- rebuild for PHP 8.3.0RC1
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.4.0-6
+- rebuild for PHP 8.2.0RC1
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.4.0-5
+- rebuild for 8.1.0RC1
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.4.0-4
+- rebuild for PHP 8.0.0RC1
+
+* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 1.4.0-3
+- rebuild for PHP 8.0.0beta3
+
+* Wed Aug 5 2020 Remi Collet <remi@remirepo.net> - 1.4.0-2
+- rebuild for 8.0.0beta1
+
+* Fri Apr 24 2020 Remi Collet <remi@remirepo.net> - 1.4.0-1
+- update to 1.4.0
+- raise dependency on PHP 7.2
+
* Wed Apr 22 2020 Remi Collet <remi@remirepo.net> - 1.3.1-1
- update to 1.3.1