summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-19 07:20:57 +0100
committerRemi Collet <remi@remirepo.net>2020-12-19 07:20:57 +0100
commit52e7fb8a99ad3546c1b9e0e7e092aa19f08104fe (patch)
tree6615882a312b3ba43fa7a787b2f2fbc8526998ce
parent5ad9eb5786ebfd3e623d792aac834532cdd4276c (diff)
update to 3.0.0
-rw-r--r--.gitignore2
-rw-r--r--79c9c119a1ba3cb7f0ebd3cffb6011fb09415404.patch115
-rw-r--r--REFLECTION48
-rw-r--r--php-pecl-inotify.spec19
4 files changed, 32 insertions, 152 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/79c9c119a1ba3cb7f0ebd3cffb6011fb09415404.patch b/79c9c119a1ba3cb7f0ebd3cffb6011fb09415404.patch
deleted file mode 100644
index ee9e398..0000000
--- a/79c9c119a1ba3cb7f0ebd3cffb6011fb09415404.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 79c9c119a1ba3cb7f0ebd3cffb6011fb09415404 Mon Sep 17 00:00:00 2001
-From: Florian Engelhardt <florian.engelhardt@oxid-esales.com>
-Date: Fri, 8 Nov 2019 14:01:35 +0100
-Subject: [PATCH] Remove all TSRMLS for PHP8 support
-
----
- inotify.c | 20 ++++++++++----------
- php_inotify.h | 4 ++--
- 2 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/inotify.c b/inotify.c
-index 94b8fbb..b3a0475 100644
---- a/inotify.c
-+++ b/inotify.c
-@@ -149,14 +149,14 @@ PHP_MINFO_FUNCTION(inotify)
- }
- /* }}} */
-
--static int php_inotify_queue_len(const int fd TSRMLS_DC) /* {{{ */
-+static int php_inotify_queue_len(const int fd) /* {{{ */
- {
- int ret;
- int queue_len;
-
- ret = ioctl(fd, FIONREAD, &queue_len);
- if (ret < 0) {
-- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
-+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
- return 0;
- }
- return queue_len;
-@@ -199,11 +199,11 @@ PHP_FUNCTION(inotify_add_watch)
- long mask, wd;
- int fd;
-
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsl", &zstream, &pathname, &pathname_len, &mask) == FAILURE) {
-+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsl", &zstream, &pathname, &pathname_len, &mask) == FAILURE) {
- return;
- }
-
-- if (php_check_open_basedir(pathname TSRMLS_CC)) {
-+ if (php_check_open_basedir(pathname)) {
- RETURN_FALSE;
- }
-
-@@ -237,7 +237,7 @@ PHP_FUNCTION(inotify_rm_watch)
- int fd;
- long wd;
-
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &wd) == FAILURE) {
-+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zstream, &wd) == FAILURE) {
- return;
- }
-
-@@ -265,14 +265,14 @@ PHP_FUNCTION(inotify_queue_len)
- int fd;
- long queue_len;
-
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstream) == FAILURE) {
-+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
- return;
- }
-
- php_stream_from_zval(stream, zstream);
- INOTIFY_FD(stream, fd);
-
-- queue_len = php_inotify_queue_len(fd TSRMLS_CC);
-+ queue_len = php_inotify_queue_len(fd);
-
- RETURN_LONG(queue_len);
- }
-@@ -291,14 +291,14 @@ PHP_FUNCTION(inotify_read)
- zval event_ary;
- int fd;
-
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstream) == FAILURE) {
-+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
- return;
- }
-
- php_stream_from_zval(stream, zstream);
- INOTIFY_FD(stream, fd);
-
-- readbuf_size = (double) php_inotify_queue_len(fd TSRMLS_CC) * 1.6;
-+ readbuf_size = (double) php_inotify_queue_len(fd) * 1.6;
- if (readbuf_size < 1) {
- readbuf_size = sizeof(struct inotify_event) + 32;
- }
-@@ -315,7 +315,7 @@ PHP_FUNCTION(inotify_read)
- continue;
- } else if (readden < 0) {
- if (errno != EAGAIN) {
-- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
-+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
- }
- efree(readbuf);
- RETURN_FALSE;
-diff --git a/php_inotify.h b/php_inotify.h
-index 14bd478..bff8a65 100644
---- a/php_inotify.h
-+++ b/php_inotify.h
-@@ -73,11 +73,11 @@ PHP_FUNCTION(inotify_read);
-
- #define INOTIFY_ERROR_CASE(func, errno) \
- case (errno): \
-- php_error_docref(NULL TSRMLS_CC, E_WARNING, INOTIFY_##func##_##errno); \
-+ php_error_docref(NULL, E_WARNING, INOTIFY_##func##_##errno); \
- break;
- #define INOTIFY_DEFAULT_ERROR(errno) \
- default: \
-- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); \
-+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); \
- break;
-
-
diff --git a/REFLECTION b/REFLECTION
index 89c6ac4..7c29461 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,29 +1,29 @@
-Extension [ <persistent> extension #61 inotify version 2.0.0 ] {
+Extension [ <persistent> extension #117 inotify version 3.0.0 ] {
- Constants [23] {
- Constant [ integer IN_ACCESS ] { 1 }
- Constant [ integer IN_MODIFY ] { 2 }
- Constant [ integer IN_ATTRIB ] { 4 }
- Constant [ integer IN_CLOSE_WRITE ] { 8 }
- Constant [ integer IN_CLOSE_NOWRITE ] { 16 }
- Constant [ integer IN_OPEN ] { 32 }
- Constant [ integer IN_MOVED_FROM ] { 64 }
- Constant [ integer IN_MOVED_TO ] { 128 }
- Constant [ integer IN_CREATE ] { 256 }
- Constant [ integer IN_DELETE ] { 512 }
- Constant [ integer IN_DELETE_SELF ] { 1024 }
- Constant [ integer IN_MOVE_SELF ] { 2048 }
- Constant [ integer IN_UNMOUNT ] { 8192 }
- Constant [ integer IN_Q_OVERFLOW ] { 16384 }
- Constant [ integer IN_IGNORED ] { 32768 }
- Constant [ integer IN_CLOSE ] { 24 }
- Constant [ integer IN_MOVE ] { 192 }
- Constant [ integer IN_ALL_EVENTS ] { 4095 }
- Constant [ integer IN_ONLYDIR ] { 16777216 }
- Constant [ integer IN_DONT_FOLLOW ] { 33554432 }
- Constant [ integer IN_MASK_ADD ] { 536870912 }
- Constant [ integer IN_ISDIR ] { 1073741824 }
- Constant [ integer IN_ONESHOT ] { 2147483648 }
+ Constant [ int IN_ACCESS ] { 1 }
+ Constant [ int IN_MODIFY ] { 2 }
+ Constant [ int IN_ATTRIB ] { 4 }
+ Constant [ int IN_CLOSE_WRITE ] { 8 }
+ Constant [ int IN_CLOSE_NOWRITE ] { 16 }
+ Constant [ int IN_OPEN ] { 32 }
+ Constant [ int IN_MOVED_FROM ] { 64 }
+ Constant [ int IN_MOVED_TO ] { 128 }
+ Constant [ int IN_CREATE ] { 256 }
+ Constant [ int IN_DELETE ] { 512 }
+ Constant [ int IN_DELETE_SELF ] { 1024 }
+ Constant [ int IN_MOVE_SELF ] { 2048 }
+ Constant [ int IN_UNMOUNT ] { 8192 }
+ Constant [ int IN_Q_OVERFLOW ] { 16384 }
+ Constant [ int IN_IGNORED ] { 32768 }
+ Constant [ int IN_CLOSE ] { 24 }
+ Constant [ int IN_MOVE ] { 192 }
+ Constant [ int IN_ALL_EVENTS ] { 4095 }
+ Constant [ int IN_ONLYDIR ] { 16777216 }
+ Constant [ int IN_DONT_FOLLOW ] { 33554432 }
+ Constant [ int IN_MASK_ADD ] { 536870912 }
+ Constant [ int IN_ISDIR ] { 1073741824 }
+ Constant [ int IN_ONESHOT ] { 2147483648 }
}
- Functions {
diff --git a/php-pecl-inotify.spec b/php-pecl-inotify.spec
index 51e3773..1b6469a 100644
--- a/php-pecl-inotify.spec
+++ b/php-pecl-inotify.spec
@@ -16,15 +16,14 @@
Summary: Inotify
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 2.0.0
-Release: 12%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 3.0.0
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-Patch0: https://github.com/arnaud-lb/php-inotify/commit/79c9c119a1ba3cb7f0ebd3cffb6011fb09415404.patch
-
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -53,12 +52,6 @@ Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
-
%description
The inotify extension allows to use inotify functions in a PHP script.
@@ -69,7 +62,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
mv %{pecl_name}-%{version} NTS
-mv package2.xml package.xml
sed -e '/inotify.php/s/role="php"/role="doc"/' \
-e '/tail.php/s/role="php"/role="doc"/' \
@@ -78,8 +70,6 @@ sed -e '/inotify.php/s/role="php"/role="doc"/' \
-i package.xml
cd NTS
-%patch0 -p1
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_INOTIFY_VERSION/{s/.* "//;s/".*$//;p}' php_inotify.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -212,6 +202,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Dec 18 2020 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+
* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 2.0.0-12
- rebuild for PHP 8.0.0RC1