summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-11 10:59:55 +0200
committerRemi Collet <remi@remirepo.net>2017-09-11 10:59:55 +0200
commit6062ec43eb88e47e5144e45ce50929c4dce92ddc (patch)
tree6b3357403922f03c7f1c800673d22608f825a864
parent904f77917e5a304e6ca99ef407107c71bd87a17d (diff)
v1.7.1 from Fedora
-rw-r--r--.gitignore8
-rw-r--r--composer.json14
-rwxr-xr-xphp-doctrine-cache-get-source.sh64
-rw-r--r--php-doctrine-cache.spec83
4 files changed, 121 insertions, 48 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 7ef1727..893012e 100644
--- a/composer.json
+++ b/composer.json
@@ -13,12 +13,16 @@
{"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
],
"require": {
- "php": "~5.5|~7.0"
+ "php": "~7.1"
},
"require-dev": {
- "phpunit/phpunit": "~4.8|~5.0",
- "satooshi/php-coveralls": "~0.6",
- "predis/predis": "~1.0"
+ "alcaeus/mongo-php-adapter": "^1.1",
+ "mongodb/mongodb": "^1.1",
+ "phpunit/phpunit": "^5.7",
+ "predis/predis": "~1.0"
+ },
+ "suggest": {
+ "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
},
"conflict": {
"doctrine/common": ">2.2,<2.4"
@@ -31,7 +35,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
}
}
diff --git a/php-doctrine-cache-get-source.sh b/php-doctrine-cache-get-source.sh
new file mode 100755
index 0000000..f8f69e8
--- /dev/null
+++ b/php-doctrine-cache-get-source.sh
@@ -0,0 +1,64 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+SPEC=`ls *.spec`
+NAME=`echo $SPEC | sed 's#\.spec##'`
+VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+
+GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+CMP_FILE=$PWD/composer.json
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ cp composer.json $CMP_FILE
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec
index 520158a..3581e74 100644
--- a/php-doctrine-cache.spec
+++ b/php-doctrine-cache.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-cache
#
-# Copyright (c) 2013-2016 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,14 +12,14 @@
%global github_owner doctrine
%global github_name cache
-%global github_version 1.6.1
-%global github_commit b6f544a20f4807e81f7044d31e679ccbb1866dc3
+%global github_version 1.7.1
+%global github_commit b3217d58609e9c8e661cd41357a54d926c4a2a1a
%global composer_vendor doctrine
%global composer_project cache
-# "php": "~5.5|~7.0"
-%global php_min_ver 5.5
+# "php": "~7.1"
+%global php_min_ver 7.1
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -34,42 +34,42 @@ Summary: Doctrine Cache
Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# GitHub export does not include tests.
+# Run php-doctrine-cache-get-source.sh to create full source.
+Source0: %{name}-%{version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
+
BuildArch: noarch
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 1.6.1)
+## phpcompatinfo (computed from version 1.7.1)
BuildRequires: php-date
BuildRequires: php-hash
+BuildRequires: php-pecl(igbinary)
BuildRequires: php-reflection
BuildRequires: php-spl
-%if 0%{?rhel} != 5
BuildRequires: php-sqlite3
-%endif
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.6.1)
+# phpcompatinfo (computed from version 1.7.1)
Requires: php-date
Requires: php-hash
Requires: php-spl
-%if 0%{?rhel} != 5
-Requires: php-sqlite3
-%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
# Weak dependencies
%if 0%{?fedora} > 21
Suggests: php-composer(predis/predis)
Suggests: php-pecl(apcu)
+Suggests: php-pecl(igbinary)
Suggests: php-pecl(memcache)
Suggests: php-pecl(memcached)
Suggests: php-pecl(mongo)
@@ -114,19 +114,18 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{phpdir}
-cp -rp lib/* %{buildroot}%{phpdir}/
+mkdir -p %{buildroot}%{phpdir}/Doctrine/Common
+cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/
%check
%if %{with_tests}
-: Create tests autoloader
-cat <<'AUTOLOAD' | tee autoload.php
+: Create tests bootstrap
+cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr0('Doctrine\\Tests\\', __DIR__.'/tests');
-AUTOLOAD
+\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
+BOOTSTRAP
: Skip tests known to fail
rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
@@ -134,40 +133,30 @@ rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
: Skip tests requiring a server to connect to
rm -f \
tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php \
+ tests/Doctrine/Tests/Common/Cache/ExtMongoDBCacheTest.php \
+ tests/Doctrine/Tests/Common/Cache/LegacyMongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php \
tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php \
tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php \
tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
-%if 0%{?rhel} == 5
-rm tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php
-%endif
-: Run tests
-run=0
-if which php56; then
- php56 %{_bindir}/phpunit --bootstrap autoload.php
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit --bootstrap autoload.php
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --verbose --bootstrap autoload.php
-fi
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
+ || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -178,6 +167,14 @@ rm -rf %{buildroot}
%changelog
+* Sun Sep 10 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.1-1
+- Update to 1.7.1 (RHBZ #1485327)
+
+* Sat Aug 05 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.0-1
+- Update to 1.7.0 (RHBZ #1473989)
+- Add "get source" script
+- Test with SCLs if available
+
* Fri Nov 04 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.6.1-1
- Updated to 1.6.1 (RHBZ #1389915)
- Removed PHP max version dependency