diff options
-rw-r--r-- | php-bartlett-php-compatinfo-db-1.19.0-rpm.patch | 50 | ||||
-rw-r--r-- | php-bartlett-php-compatinfo-db.spec | 7 |
2 files changed, 42 insertions, 15 deletions
diff --git a/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch index 15175ac..4a256a8 100644 --- a/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch +++ b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch @@ -1,6 +1,6 @@ diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm 2017-03-16 21:26:06.000000000 +0100 -+++ ./data/handleDB.php 2017-03-17 06:32:29.487099296 +0100 +--- ./data/handleDB.php.rpm 2017-07-17 13:41:26.000000000 +0200 ++++ ./data/handleDB.php 2017-07-17 20:24:00.271263969 +0200 @@ -12,7 +12,8 @@ * @since Release 1.0.0alpha1 of PHP_CompatInfo_Db */ @@ -12,22 +12,46 @@ diff -up ./data/handleDB.php.rpm ./data/handleDB.php use Bartlett\CompatInfoDb\ExtensionFactory; diff -up ./src/Bartlett/CompatInfoDb/Environment.php.rpm ./src/Bartlett/CompatInfoDb/Environment.php ---- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2017-03-17 06:32:29.487099296 +0100 -+++ ./src/Bartlett/CompatInfoDb/Environment.php 2017-03-17 06:41:35.210029823 +0100 -@@ -55,6 +55,10 @@ class Environment - // install DB only if necessary (missing or modified) - copy($source, $dest); - } -+ } else if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) { +--- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2017-07-17 20:24:00.271263969 +0200 ++++ ./src/Bartlett/CompatInfoDb/Environment.php 2017-07-17 20:31:52.645050200 +0200 +@@ -39,28 +39,13 @@ class Environment + { + $database = 'compatinfo.sqlite'; + +- if (PATH_SEPARATOR == ';') { +- // windows +- $userHome = getenv('USERPROFILE'); ++ if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) { + $tempDir = dirname($db); + } else if (file_exists($db = '/usr/share/php-bartlett-php-compatinfo-db/' . $database)) { + $tempDir = dirname($db); } else { - $tempDir = dirname(dirname(dirname(__DIR__))) . '/data'; - } +- // unix +- $userHome = getenv('HOME'); +- } +- $tempDir = $userHome . '/.bartlett'; +- +- if (!file_exists($tempDir)) { +- mkdir($tempDir); +- } +- $source = dirname(dirname(dirname(__DIR__))) . '/data/' . $database; +- $dest = $tempDir . '/' . $database; +- +- if (!file_exists($dest) +- || sha1_file($source) !== sha1_file($dest) +- ) { +- // install DB only if necessary (missing or modified) +- copy($source, $dest); +- } +- ++ $tempDir = dirname(dirname(dirname(__DIR__))) . '/data'; ++ } + $pdo = new PDO('sqlite:' . $tempDir . '/' . $database); + return $pdo; + } diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2017-03-16 21:26:06.000000000 +0100 -+++ ./tests/bootstrap.php 2017-03-17 06:32:29.488099301 +0100 +--- ./tests/bootstrap.php.rpm 2017-07-17 13:41:26.000000000 +0200 ++++ ./tests/bootstrap.php 2017-07-17 20:24:00.272263975 +0200 @@ -1,6 +1,7 @@ <?php diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec index 762c134..3f6ef22 100644 --- a/php-bartlett-php-compatinfo-db.spec +++ b/php-bartlett-php-compatinfo-db.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # # See https://github.com/llaville/php-compatinfo-db/releases -%global gh_commit a5e1d789569589efbc9949f7df3a28215111b169 +%global gh_commit 865499fbcaffc54bdabf0667ab771bc7328cd2bb %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151031 %global gh_owner llaville @@ -27,7 +27,7 @@ %endif Name: php-%{c_vendor}-%{c_project} -Version: 1.22.0 +Version: 1.23.0 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Reference Database to be used with php-compatinfo library @@ -190,6 +190,9 @@ export BARTLETT_COMPATINFO_DB=%{buildroot}%{_datadir}/%{name}/compatinfo.sqlite %changelog +* Mon Jul 17 2017 Remi Collet <remi@remirepo.net> - 1.23.0-1 +- Update to 1.23.0 + * Sat Jun 10 2017 Remi Collet <remi@remirepo.net> - 1.22.0-1 - Update to 1.22.0 |