File php73-APCu-bc.spec of Package php73-APCu-bc

#
# spec file for package php7-APCu
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

BuildRequires:  -php7
BuildRequires:  -php7-pear
%define pkg_name apcu_bc
Name:           php73-APCu-bc
Version:        1.0.5
Release:        lp151.14.1
Summary:        APCu - APC User Cache - Backward Compatibility
License:        PHP-3.01
Group:          Productivity/Networking/Web/Servers
Url:            http://pecl.php.net/package/apcu_bc
Source:         http://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Source1:        apcu_bc.ini
BuildRequires:  php73-devel >= 7.0
BuildRequires:  xz
BuildRequires:  php73-APCu-devel
Requires:       php(api) = %{php_core_api}
Requires:       php(zend-abi) = %{php_zend_api}
Provides:       php-APCu-bc = %{version}
Obsoletes:      php-APCu-bc < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This module provides a backwards APC compatible API using APCu.

%prep
%setup -q -n %{pkg_name}-%{version}

%build
export CFLAGS="%optflags -fvisibility=hidden"
%{_bindir}/phpize
%configure --enable-apcu
make %{?_smp_mflags}

%check
make %{?_smp_mflags} test PHP_EXECUTABLE=%{_bindir}/php NO_INTERACTION=1

%install
make install INSTALL_ROOT=%{buildroot}
mv %{buildroot}%{_libdir}/php73/extensions/apc.so %{buildroot}%{_libdir}/php73/extensions/%{pkg_name}.so
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/php73/conf.d/%{pkg_name}.ini

# remove not used header file(s)
rm -rf %{buildroot}/%{_includedir}/php7/ext/%{pkg_name}/

%files
%defattr(-,root,root,-)
%{_libdir}/php73/extensions/%{pkg_name}.so
%config(noreplace) %{_sysconfdir}/php73/conf.d/%{pkg_name}.ini
%doc README.md
%license LICENSE

%changelog
* Sat Dec 15 2018 ecsos@opensuse.org
- Updated to 5.1.15
  - Restore apc.serializer=php as the default, as the "default"
    serializer still/again has issues.
  - Fix possible issues in persistence of arrays with the "default"
    serializer.
  - Attempt to reduce shared memory fragementation.
- Updated to 5.1.14
  - Fixed GH #347: Disable slam defense by default.
  - Fix potential issue with destruction of locks. This does not
    affect Linux, but might affect Windows and BSD.
  - Use mutex instead of rwlock for shared memory allocator
    (if pthreads mutex available).
  - Require only read-lock for apcu_cas(), by using atomic
    compare-and-swap.
- Updated to 5.1.13
  - Reimplement persistence logic using precise allocation rather
    than memory pools. This reduces memory usage of cache entries,
    especially for small values, and improves performance of
    persisting and unpersisting values.
  - Fixed GH #335: Stampede protection is broken.
  - Fixed GH #328: Segfault in apcu_key_info() if APCu is disabled.
  - Generally make the behavior of functions if APCu is disabled
    more consistent.
  - Fixed PHP bug #72980: Empty strings are now consistently
    allowed as cache keys.
  - Optimized apcu_key_info() and apcu_cache_info() by using
    interned strings.
  - Fix build against PHP master (PHP 7.4).
  - Many changes to internal C APIs.
* Wed Aug 15 2018 crrodriguez@opensuse.org
- Updated to 5.1.12
- gh#307: Fix 'Timout' sort option (apc.php).
- gh#308: Keep search parameter on cache entry detail link (apc.php).
- Fix --enable-apcu-clear-signal support.
- Show entries with expired global TTL in APCuIterator.
- Respect TTL when calculating APCuIterator totals.
- The per-entry TTL now always takes precedence over the global TTL.
- The global TTL is now always relative to the access time.
- apcu_inc() and apcu_dec() no longer update hard-expired entries. Instead a new entry is created.
- Added optional $ttl argument to apcu_inc() and apcu_dec(), used when creating a new entry.
- PHP bug #76145: Fix use of APCu inside Serializer::(un)serialize().
- gh#304: If apcu_cas() is used on a non-existing entry, don't insert it.
- gh#295: Improve APCuIterator performance by using PCRE JIT and preallocating key strings.
- Reduce the memory overhead of cache entries.
- Prevent potential memory corruption in the cache slam defense implementation.
- Ensure cache entry references are released on bailout during unserialization.
- Make support for atomic operations a hard requirement for building APCu.
- Check write-lock acquisition for failure, to help debugging deadlock situations.
- Make sure apcu_inc/dec are atomic when working on a non-existing entry.
- Many changes to internal C APIs.
* Fri Apr 20 2018 jweberhofer@weberhofer.at
- updated to 5.1.11
  - fix gh#krakjoe/apcu#246 apcu_entry hangs
  - fix gh#krakjoe/apcu#259 deadlock in apcu_store
  - fix gh#krakjoe/apcu#281 undefined variable in apc.php
  - fix handling of fatal errors in apcu_entry
  - check string lengths when looking up keys
  - many internal C APIs changed
- updated to 5.1.10
  - fix gh#krakjoe/apcu#247 when a NUL char is used as key, apcu_fetch(array) truncates the key
  - fix gh#krakjoe/apcu#248 apcu_fetch may return values causing zend_mm_corruption or segfaults
    when custom serializer is used
  - fix gh#krakjoe/apcu#260 apcu.serializer=default results in segfault
  - fix gh#krakjoe/apcu#274 non-portable shell == in config.m4
  - fix crash when passing bad array to apcu_delete
  - improve fix gh#krakjoe/apcu#266 refcounting errors in APCIterator
  - fix for PHP 7.3 compatibility
* Tue Jan 30 2018 crrodriguez@opensuse.org
- Build with -fvisibility=hidden, PHP process namespace
  pollution must be heavily limited to avoid symbol clashes.
- Use SOURCE_DATE_EPOCH if set instead of custom build hack.
- Update to version 5.1.9
- fix gh#234 mmap disabled when configure is called with --enable-apcu-mmap
- fix gh#226 Warning: apcu_fetch(): apc_fetch() expects a string or array of strings.
- mitigate gh#223 Fatal error when starting php on windows
- add support for PCRE2 in 7.3
- use row formatting for information in phpinfo() tables
- set IS_STR_PERSISTENT so refcounting failures are reported by -DRC_DEBUG=1
- fix gh#266 refcounting errors in APCIterator
* Fri Apr  7 2017 jweberhofer@weberhofer.at
- Removed unneccesary -devel package
* Fri Mar 17 2017 jweberhofer@weberhofer.at
- updated to 5.1.8
  * fix gh#krakjoe/apcu#207 Segmentation fault in apc_sma_api_free()
  * fix gh#krakjoe/apcu#221 memory leak
  * update to apc dashboard (Tyson Andre)
- updated to 5.1.7
  * fixes gh#krakjoe/apcu#19: hung apaches on pthread wrlocks
  * fixes gh#krakjoe/apcu#203: segfaults in bailout / longjmp
- updated to 5.1.6
  * fixes gh#krakjoe/apcu#19: Hung apaches on pthread wrlocks
  * fixes gh#krakjoe/apcu#188: Fix Segfault in ZTS build when locking (Tyson Andre)
  * fixes gh#krakjoe/apcu#194: apcu_entry ttl not working
  * fixes gh#krakjoe/apcu#189: SegFault in apc_copy_zval
  * fixes gh#krakjoe/apcu#185: zend_mm_heap corrupted
  * fixes gh#krakjoe/apcu#190: memory leak/failed check for duplicates
- updated to 5.1.5
  * fix version check in control panel page (gh#krakjoe/apcu#182, lennartwesdijk)
  * do not create null strings, palloc may fail
* Thu May 19 2016 pgajdos@suse.cz
- updated to 5.1.4
  * fix possible memory leak
  * fix #168 drop trying to return strings from shm
  * fix #170 do not create entries when serialization fails
* Fri Jan 29 2016 pgajdos@suse.com
- updated to 5.1.3
- package renamed to php7-APCu
- package provides php-APCu symbol
* Tue Jan 12 2016 pgajdos@suse.com
- call spec-cleaner
* Fri Jul 25 2014 crrodriguez@opensuse.org
- version 4.0.6
* Wed Nov 27 2013 michele.catalano@mayflower.de
- Initial.