summaryrefslogtreecommitdiffstats
path: root/php-snuffleupagus.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-05 10:23:51 +0100
committerRemi Collet <remi@remirepo.net>2021-01-05 10:23:51 +0100
commitc000cb5ad571699f23a9a09f784b1e7be4375dc7 (patch)
treef9fa3058a4bb155f82182b1d23bd8667e5beec3d /php-snuffleupagus.spec
parent3494f8af6d039ef52df8e13f85b0cfe67dcb5ac0 (diff)
update to 0.7.0
sources from jvoisin instead of nbs-system add patch for system libpcre from https://github.com/jvoisin/snuffleupagus/pull/369
Diffstat (limited to 'php-snuffleupagus.spec')
-rw-r--r--php-snuffleupagus.spec55
1 files changed, 27 insertions, 28 deletions
diff --git a/php-snuffleupagus.spec b/php-snuffleupagus.spec
index 4580b53..c52be26 100644
--- a/php-snuffleupagus.spec
+++ b/php-snuffleupagus.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-snuffleupagus
#
-# Copyright (c) 2018-2020 Remi Collet
+# Copyright (c) 2018-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -18,9 +18,9 @@
%global pkg_name %{name}
%endif
-%global gh_commit 0410dd1ee69f5040e0a81d57d20d860139b0c32c
+%global gh_commit 047b2d08a5d01c2c8654f16fb97bb99d0b25052b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner nbs-system
+%global gh_owner jvoisin
%global gh_project snuffleupagus
#global gh_date 20180117
%global pecl_name snuffleupagus
@@ -31,24 +31,24 @@
Summary: Security module for PHP
Name: %{?sub_prefix}php-snuffleupagus
-Version: 0.5.0
+Version: 0.7.0
%if 0%{?gh_date}
Release: 2%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: LGPLv3
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pkg_name}-%{version}-%{gh_short}.tar.gz
-Patch0: https://github.com/jvoisin/snuffleupagus/commit/1b52614c06b60ced6caecd8dcaa0911ed3aa72e2.patch
+Patch0: https://patch-diff.githubusercontent.com/raw/jvoisin/snuffleupagus/pull/369.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: pcre-devel
# For tests/upload_validation_real.phpt
-BuildRequires: %{?scl_prefix}php-vld
+# BuildRequires: %%{?scl_prefix}php-vld
BuildRequires: %{?scl_prefix}php-curl
BuildRequires: %{?scl_prefix}php-dom
BuildRequires: %{?scl_prefix}php-simplexml
@@ -60,36 +60,21 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-Obsoletes: php70u-%{pecl_name} <= %{version}
-Obsoletes: php70w-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-%{pecl_name} <= %{version}
-Obsoletes: php71w-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-%{pecl_name} <= %{version}
-Obsoletes: php72w-%{pecl_name} <= %{version}
-%endif
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
%if "%{php_version}" > "7.3"
Obsoletes: php73-%{pecl_name} <= %{version}
-Obsoletes: php73w-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-%{pecl_name} <= %{version}
-Obsoletes: php74w-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-%{pecl_name} <= %{version}
%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
%endif
%description
-Snuffleupagus is a PHP7+ module designed to drastically raise the cost of
+Snuffleupagus is a PHP module designed to drastically raise the cost of
attacks against websites. This is achieved by killing entire bug classes
and providing a powerful virtual-patching system, allowing the administrator
to fix specific vulnerabilities without having to touch the PHP code.
@@ -101,7 +86,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1 -b .ups
+%patch0 -p1 -b .pr369
cd src
# Sanity check, really often broken
@@ -173,7 +158,15 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
-sed -e 's:#!/usr/bin/env php:#!%{__php}:' -i scripts/upload_validation.php
+if [ -f %{php_extdir}/vld.so ]; then
+ sed -e 's:#!/usr/bin/env php:#!%{__php}:' -i scripts/upload_validation.php
+else
+ rm src/tests/upload_validation/upload_validation_real.phpt
+fi
+
+%if "%{php_version}" < "8"
+rm -rf src/tests/*php8*/
+%endif
# add extensions used by test suite
TEST_DEPS="-d extension=xml.so -d extension=dom.so -d extension=curl.so -d extension=simplexml.so"
@@ -225,6 +218,12 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Jan 4 2021 Remi Collet <remi@remirepo.net> - 0.7.0-1
+- update to 0.7.0
+- sources from jvoisin instead of nbs-system
+- add patch for system libpcre from
+ https://github.com/jvoisin/snuffleupagus/pull/369
+
* Fri Feb 21 2020 Remi Collet <remi@remirepo.net> - 0.5.0-4
- fix test suite