diff options
| -rw-r--r-- | 2800.patch | 125 | ||||
| -rw-r--r-- | composer.json | 34 | ||||
| -rw-r--r-- | glpi-fedora-autoloader.php | 42 | ||||
| -rw-r--r-- | glpi.spec | 185 | 
4 files changed, 282 insertions, 104 deletions
| diff --git a/2800.patch b/2800.patch new file mode 100644 index 0000000..5bbec35 --- /dev/null +++ b/2800.patch @@ -0,0 +1,125 @@ +From 599e1c7859ee1369b98d9ad825a26ca745e92810 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 21 Sep 2017 10:14:16 +0200 +Subject: [PATCH 1/5] retrieve test server URI from environment + +--- + tests/bootstrap.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/bootstrap.php b/tests/bootstrap.php +index a1793d32b3..cd8cc691a0 100644 +--- a/tests/bootstrap.php ++++ b/tests/bootstrap.php +@@ -34,7 +34,7 @@ +  + define('GLPI_CONFIG_DIR', __DIR__); + define('GLPI_LOG_DIR', __DIR__ . '/files/_log'); +-define('GLPI_URI', 'http://localhost:8088'); ++define('GLPI_URI', (getenv('GLPI_URI') ?: 'http://localhost:8088')); + define('TU_USER', '_test_user'); + define('TU_PASS', 'PhpUnit_4'); +  + +From d3f2a000407a3f5066b89f5272359e97f49bca46 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 21 Sep 2017 10:26:21 +0200 +Subject: [PATCH 2/5] fix test + +--- + tests/units/NotificationEventAjax.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/units/NotificationEventAjax.php b/tests/units/NotificationEventAjax.php +index 814aae3deb..ef90f74f5e 100644 +--- a/tests/units/NotificationEventAjax.php ++++ b/tests/units/NotificationEventAjax.php +@@ -167,7 +167,7 @@ public function testRaise() { +          'replytoname' => null, +          'headers' => '', +          'body_html' => null, +-         'body_text' => 'URL : http://localhost:8088/index.php?redirect=ticket_'.$ticket->getID().'&noAUTO=1  ++         'body_text' => 'URL : ' . GLPI_URI . '/index.php?redirect=ticket_'.$ticket->getID().'&noAUTO=1 +  + Ticket: Description +  + +From 374d28644abed93766698ffa15036680c9d4dbfc Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 21 Sep 2017 10:30:18 +0200 +Subject: [PATCH 3/5] fix test, relying on "vendor" is terribly bad... + +--- + tests/units/Config.php | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/tests/units/Config.php b/tests/units/Config.php +index 16865fcd46..8cbb570fab 100644 +--- a/tests/units/Config.php ++++ b/tests/units/Config.php +@@ -247,10 +247,12 @@ public function testGetLibraryDir() { +       $this->boolean(\Config::getLibraryDir('abcde'))->isFalse(); +  +       $expected = realpath(__DIR__ . '/../../vendor/phpmailer/phpmailer'); +-      $this->string(\Config::getLibraryDir('PHPMailer'))->isIdenticalTo($expected); ++      if (is_dir($expected)) { // skip when system library is used ++         $this->string(\Config::getLibraryDir('PHPMailer'))->isIdenticalTo($expected); +  +-      $mailer = new \PHPMailer(); +-      $this->string(\Config::getLibraryDir($mailer))->isIdenticalTo($expected); ++         $mailer = new \PHPMailer(); ++         $this->string(\Config::getLibraryDir($mailer))->isIdenticalTo($expected); ++      } +  +       $expected = realpath(__DIR__ . '/../'); +       $this->string(\Config::getLibraryDir('getItemByTypeName'))->isIdenticalTo($expected); + +From efcf895548cb06667376f1ef6bc473f1299e069d Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 21 Sep 2017 10:36:10 +0200 +Subject: [PATCH 4/5] fix + +--- + tests/units/NotificationEventAjax.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/units/NotificationEventAjax.php b/tests/units/NotificationEventAjax.php +index ef90f74f5e..da1dabc600 100644 +--- a/tests/units/NotificationEventAjax.php ++++ b/tests/units/NotificationEventAjax.php +@@ -167,7 +167,7 @@ public function testRaise() { +          'replytoname' => null, +          'headers' => '', +          'body_html' => null, +-         'body_text' => 'URL : ' . GLPI_URI . '/index.php?redirect=ticket_'.$ticket->getID().'&noAUTO=1 ++         'body_text' => 'URL : ' . GLPI_URI . '/index.php?redirect=ticket_'.$ticket->getID().'&noAUTO=1  +  + Ticket: Description +  + +From ae7b72cdcae66c063aee460d4939954a8988b66e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 21 Sep 2017 10:54:33 +0200 +Subject: [PATCH 5/5] create GLPI_SKIP_ONLINE + +--- + tests/units/NotificationMailing.php | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/units/NotificationMailing.php b/tests/units/NotificationMailing.php +index 3373143371..3f488df840 100644 +--- a/tests/units/NotificationMailing.php ++++ b/tests/units/NotificationMailing.php +@@ -44,8 +44,10 @@ public function testCheck() { +       $this->boolean($instance->check('user'))->isFalse(); +       $this->boolean($instance->check('user@localhost'))->isTrue(); +       $this->boolean($instance->check('user@localhost.dot'))->isTrue(); +-      $this->boolean($instance->check('user@localhost.dot', ['checkdns' => true]))->isFalse(); +-      $this->boolean($instance->check('user@glpi-project.org', ['checkdns' => true]))->isTrue(); ++      if (!getenv('GLPI_SKIP_ONLINE')) { ++          $this->boolean($instance->check('user@localhost.dot', ['checkdns' => true]))->isFalse(); ++          $this->boolean($instance->check('user@glpi-project.org', ['checkdns' => true]))->isTrue(); ++      } +    } +  +    public function testSendNotification() { diff --git a/composer.json b/composer.json index 9dcb29a..9ba359c 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@          "docs": "https://github.com/glpi-project/doc"      },      "require": { -        "php": ">=5.4.0", +        "php": ">=5.6.0",          "ext-mysqli": "*",          "ext-fileinfo": "*",          "ext-json": "*", @@ -19,32 +19,42 @@          "ext-gd": "*",          "ext-zlib": "*",          "ext-curl": "*", -        "ircmaxell/password-compat": "~1.0.0",          "jasig/phpcas": "~1.3.0",          "iamcal/lib_autolink": "~1.7",          "phpmailer/phpmailer": "~5.2", -        "sabre/vobject": "~3.4", +        "sabre/vobject": "~4.1",          "simplepie/simplepie": "^1.5",          "tecnickcom/tcpdf": "~6.2", -        "zendframework/zend-cache": "~2.4.0", -        "zendframework/zend-i18n": "~2.4.0", -        "zendframework/zend-loader": "~2.4.0", -        "zetacomponents/graph": "~1.5", -        "ramsey/array_column": "^1.1.3", +        "zendframework/zend-cache": "^2.7", +        "zendframework/zend-i18n": "^2.7",          "michelf/php-markdown": "^1.6", -        "true/punycode": "^2.1" +        "true/punycode": "^2.1", +        "paragonie/random_compat": "^2.0"      },      "require-dev": { -        "guzzlehttp/guzzle": "~5", -        "phpunit/phpunit": "^4.8 || ^5.7 || ^6.0" +        "guzzlehttp/guzzle": "~6", +        "glpi-project/coding-standard": "0.6", +        "consolidation/robo": "^1.0", +        "natxet/CssMin": "^3.0", +        "patchwork/jsqueeze": "^2.0", +        "atoum/atoum": "^3.2"      },      "suggest": {          "ext-ldap": "Used ot provide LDAP authentication and synchronization",          "ext-imap": "Used for collection from IMAP"      },      "config": { +        "optimize-autoloader": true,          "platform": { -            "php": "5.4.0" +            "php": "5.6.0"          } +    }, +    "scripts": { +        "test": "vendor/bin/atoum --debug --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/units", +        "testapi": "vendor/bin/atoum --debug --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/api", +        "post-install-cmd": [ +           "@php -r \"file_put_contents('.composer.hash', sha1_file('composer.lock'));\"" +        ], +        "post-update-cmd": "@php -r \"file_put_contents('.composer.hash', sha1_file('composer.lock'));\""      }  } diff --git a/glpi-fedora-autoloader.php b/glpi-fedora-autoloader.php index 128d592..a9ea4fa 100644 --- a/glpi-fedora-autoloader.php +++ b/glpi-fedora-autoloader.php @@ -2,38 +2,24 @@  $vendor = '##DATADIR##/php';  // Dependencies from composer.json -// "ircmaxell/password-compat" -// => useless for php >= 5.5 -//require_once $vendor . '/password_compat/password.php'; -// "jasig/phpcas" +//        "jasig/phpcas": "~1.3.0",  require_once '##DATADIR##/pear/CAS/Autoload.php'; -// "iamcal/lib_autolink" +//        "iamcal/lib_autolink": "~1.7",  require_once $vendor . '/php-iamcal-lib-autolink/autoload.php'; -// "phpmailer/phpmailer" +//        "phpmailer/phpmailer": "~5.2",  require_once $vendor . '/PHPMailer/PHPMailerAutoload.php'; -// "sabre/vobject" -if (file_exists($vendor . '/Sabre/VObject4/autoload.php')) { -   require_once $vendor . '/Sabre/VObject4/autoload.php'; -} else { -   require_once $vendor . '/Sabre/VObject/autoload.php'; -} -// "simplepie/simplepie" +//        "sabre/vobject": "~4.1", +require_once $vendor . '/Sabre/VObject4/autoload.php'; +//        "simplepie/simplepie": "^1.5",  require_once $vendor . '/php-simplepie/autoloader.php'; -// "tecnickcom/tcpdf" +//        "tecnickcom/tcpdf": "~6.2",  require_once $vendor . '/tcpdf/autoload.php'; -// "zendframework/zend-cache" -// "zendframework/zend-i18n" -// "zendframework/zend-loader" +//        "zendframework/zend-cache": "^2.7", +//        "zendframework/zend-i18n": "^2.7",  require_once $vendor . '/Zend/autoload.php'; -// "zetacomponents/graph" -require_once $vendor . '/ezc/Graph/autoloader.php'; -// "ramsey/array_column" -// => useless for php >= 5.5 -// "michelf/php-markdown" +//        "michelf/php-markdown": "^1.6",  require_once $vendor . '/Michelf/markdown-autoload.php'; -// "true/punycode" -if (file_exists($vendor . '/TrueBV/autoload.php')) { -    require_once $vendor . '/TrueBV/autoload.php'; -} else { -    require_once $vendor . '/TrueBV/Punycode.php'; -} +//        "true/punycode": "^2.1", +require_once $vendor . '/TrueBV/autoload.php'; +//         "paragonie/random_compat": "^2.0" +require_once $vendor . '/random_compat/autoload.php'; @@ -7,7 +7,7 @@  # Please, preserve the changelog entries  # -%global gh_commit  2683ce0cfe4cce4786e52eec3cf2a54f54f01225 +%global gh_commit  f38701abbb7f5a451c25b3905e49e3cd8a10572a  %global gh_short   %(c=%{gh_commit}; echo ${c:0:7})  #global gh_date    20160923  %global gh_owner   glpi-project @@ -42,18 +42,22 @@  %endif  Name:           %{gh_project} -Version:        9.1.6 -%global schema  9.1.3 +%global upstream_version 9.2 +%global upstream_prever  RC2 +Version:        %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +%global schema  9.2  Release:        1%{?dist}  Summary:        Free IT asset management software  Summary(fr):    Gestion Libre de Parc Informatique  Group:          Applications/Internet -License:        GPLv2+ and GPLv3+ +License:        GPLv2+ and GPLv3+ and MIT  URL:            http://www.glpi-project.org/  # Upstream sources (not the github auto-generated archive)  Source0:        https://github.com/%{gh_owner}/%{name}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Patch1:         2800.patch +  Source1:        %{name}-httpd.conf  Source2:        %{name}-9.1-config_path.php  Source12:       %{name}-9.1-config_path_test.php @@ -65,34 +69,39 @@ BuildArch:      noarch  BuildRequires:  gettext  %if %{with_tests}  BuildRequires:  php-cli -%if 0%{?fedora} >= 26 -%global phpunit %{_bindir}/phpunit6 -%else -%global phpunit %{_bindir}/phpunit -%endif -BuildRequires:  %{phpunit}  BuildRequires:  mariadb-server  # Missing in mariadb  BuildRequires:  hostname +BuildRequires:  php-mysqli +BuildRequires:  php-xmlrpc  # PHP libs  BuildRequires:  php-htmLawed -BuildRequires:  php-composer(zendframework/zend-cache)  >= 2.4 -BuildRequires:  php-composer(zendframework/zend-i18n)   >= 2.4 -BuildRequires:  php-composer(zendframework/zend-loader) >= 2.4 -BuildRequires:  php-composer(guzzlehttp/guzzle)         >= 5 -BuildRequires:  php-composer(guzzlehttp/guzzle)         < 6 +BuildRequires:  php-composer(jasig/phpcas)              <  2  BuildRequires:  php-composer(jasig/phpcas)              >= 1.3 +BuildRequires:  php-composer(iamcal/lib_autolink)       <  2  BuildRequires:  php-composer(iamcal/lib_autolink)       >= 1.7 -BuildRequires:  php-composer(sabre/vobject)             >= 3.4 -BuildRequires:  php-composer(michelf/php-markdown)      >= 1.6 -BuildRequires:  php-composer(true/punycode)             >= 2 -BuildRequires:  php-composer(simplepie/simplepie)       >= 1.5 +BuildRequires:  php-composer(phpmailer/phpmailer)       <  6  BuildRequires:  php-composer(phpmailer/phpmailer)       >= 5.2 -# 6.2.13 to ensure we have the classmap autoloader +BuildRequires:  php-composer(sabre/vobject)             <  5 +BuildRequires:  php-composer(sabre/vobject)             >= 4.1 +BuildRequires:  php-composer(simplepie/simplepie)       <  2 +BuildRequires:  php-composer(tecnickcom/tcpdf)          <  7  BuildRequires:  php-composer(tecnickcom/tcpdf)          >= 6.2.13 -BuildRequires:  php-mysqli -BuildRequires:  php-xmlrpc -BuildRequires:  php-composer(zetacomponents/graph) +BuildRequires:  php-composer(zendframework/zend-cache)  <  3 +BuildRequires:  php-composer(zendframework/zend-cache)  >= 2.7 +BuildRequires:  php-composer(zendframework/zend-i18n)   <  3 +BuildRequires:  php-composer(zendframework/zend-i18n)   >= 2.7 +BuildRequires:  php-composer(michelf/php-markdown)      <  2 +BuildRequires:  php-composer(michelf/php-markdown)      >= 1.6 +BuildRequires:  php-composer(true/punycode)             <  3 +BuildRequires:  php-composer(true/punycode)             >= 2.1 +BuildRequires:  php-composer(paragonie/random_compat)   <  3 +BuildRequires:  php-composer(paragonie/random_compat)   >= 2.0 +# requires-dev +BuildRequires:  php-composer(guzzlehttp/guzzle)         <  7 +BuildRequires:  php-composer(guzzlehttp/guzzle)         >= 6 +BuildRequires:  php-composer(atoum/atoum)               <  4 +BuildRequires:  php-composer(atoum/atoum)               >= 3.2  %endif  %if %{with_nginx} @@ -107,13 +116,14 @@ Requires:       php(httpd)  %else  Requires:       httpd, mod_php  %endif -# use 5.5+ to avoid dependency on ircmaxell/password-compat and ramsey/array_column -Requires:       php(language) >= 5.5 +Requires:       php(language) >= 5.6 +Requires:       php-reflection +Requires:       php-simplexml  Requires:       php-ctype  Requires:       php-curl  Requires:       php-date -Requires:       php-exif  Requires:       php-fileinfo +Requires:       php-filter  Requires:       php-gd  Requires:       php-imap  Requires:       php-json @@ -122,27 +132,49 @@ Requires:       php-mbstring  Requires:       php-mysqli  Requires:       php-pcre  Requires:       php-session -Requires:       php-simplexml -Requires:       php-wddx +Requires:       php-tokenizer +Requires:       php-xml  Requires:       php-xmlrpc  Requires:       php-zlib  Requires:       php-htmLawed -Requires:       php-composer(zendframework/zend-cache)  >= 2.4 -Requires:       php-composer(zendframework/zend-i18n)   >= 2.4 -Requires:       php-composer(zendframework/zend-loader) >= 2.4 +Requires:       php-composer(jasig/phpcas)              <  2  Requires:       php-composer(jasig/phpcas)              >= 1.3 +Requires:       php-composer(iamcal/lib_autolink)       <  2  Requires:       php-composer(iamcal/lib_autolink)       >= 1.7 -Requires:       php-composer(sabre/vobject)             >= 3.4 -Requires:       php-composer(michelf/php-markdown)      >= 1.6 -# upstream ask 2.1, compatibility with 2.0 ensure by autoloader -Requires:       php-composer(true/punycode)             >= 2.1 -Requires:       php-composer(simplepie/simplepie)       >= 1.5 +Requires:       php-composer(phpmailer/phpmailer)       <  6  Requires:       php-composer(phpmailer/phpmailer)       >= 5.2 +Requires:       php-composer(sabre/vobject)             <  5 +Requires:       php-composer(sabre/vobject)             >= 4.1 +Requires:       php-composer(simplepie/simplepie)       <  2 +Requires:       php-composer(simplepie/simplepie)       >= 1.5  # 6.2.13 to ensure we have the classmap autoloader +Requires:       php-composer(tecnickcom/tcpdf)          <  7  Requires:       php-composer(tecnickcom/tcpdf)          >= 6.2.13 - -Requires:       php-composer(zetacomponents/graph) +Requires:       php-composer(zendframework/zend-cache)  <  3 +Requires:       php-composer(zendframework/zend-cache)  >= 2.7 +Requires:       php-composer(zendframework/zend-i18n)   <  3 +Requires:       php-composer(zendframework/zend-i18n)   >= 2.7 +Requires:       php-composer(zendframework/zend-loader) +Requires:       php-composer(michelf/php-markdown)      <  2 +Requires:       php-composer(michelf/php-markdown)      >= 1.6 +Requires:       php-composer(true/punycode)             <  3 +Requires:       php-composer(true/punycode)             >= 2.1 +Requires:       php-composer(paragonie/random_compat)   <  3 +Requires:       php-composer(paragonie/random_compat)   >= 2.0  Requires:       gnu-free-sans-fonts +%if 0%{?fedora} +Requires:       fontawesome-fonts >= 4.7.0 +%else +Provides:       bundled(fontawesome-fonts) = 4.7.0 +%endif +Provides:       bundled(js-chartist-js) = 0.10.1 +Provides:       bundled(js-chartist-plugin-legend) = 0.6.0 +Provides:       bundled(js-chartist-plugin-tooltip) = 0.0.17 +Provides:       bundled(js-fuzzy) +Provides:       bundled(js-jquery) +Provides:       bundled(prism) +Provides:       bundled(tiny_mce) = 4.3.13 +  Requires:         %{_sysconfdir}/logrotate.d  Requires(postun): /sbin/service  Requires(post):   /sbin/service @@ -152,8 +184,9 @@ Requires(post):   /usr/sbin/semanage  Requires(postun): /usr/sbin/semanage  %endif  Requires:         crontabs -%if 0%{?fedora} >= 22 +%if 0%{?fedora}  Recommends:       php-pecl-apcu +Recommends:       php-opcache  %endif @@ -178,8 +211,9 @@ techniciens grâce à une maintenance plus cohérente.  %prep  %setup -q -n %{name}-%{gh_commit} +%patch1 -p1 -grep %{version} config/define.php +grep %{upstream_version} inc/define.php  find . -name \*.orig -exec rm {} \; -print @@ -187,7 +221,14 @@ find . -name \*.orig -exec rm {} \; -print  find lib -name \*.swf -exec rm {} \; -print  # Use system lib -rm -rf lib/htmlawed +rm -r lib/htmlawed +rm    lib/FreeSans.ttf +%if 0%{?fedora} +rm lib/font-awesome-4.7.0/fonts/FontAwesome.otf +rm lib/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf +ln -s /usr/share/fonts/fontawesome/FontAwesome.otf         lib/font-awesome-4.7.0/fonts/FontAwesome.otf +ln -s /usr/share/fonts/fontawesome/fontawesome-webfont.ttf lib/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf +%endif  : bundled JS libraries  ls lib @@ -197,7 +238,16 @@ mkdir vendor  sed -e "s,##DATADIR##,%{_datadir}," \      %{SOURCE5} > vendor/autoload.php -mv lib/tiny_mce/license.txt LICENSE.tiny_mce +mv lib/tiny_mce/license.txt                       LICENSE.tiny_mce +mv lib/chartist-js-0.10.1/LICENSE-MIT             LICENSE.chartist-js +mv lib/chartist-plugin-legend-0.6.0/LICENSE       LICENSE.chartist-plugin-legend +mv lib/chartist-plugin-tooltip-0.0.17/LICENSE     LICENSE.chartist-plugin-tooltip +mv lib/jqueryplugins/select2/LICENSE              LICENSE.jqueryplugins.select2 +mv lib/jqueryplugins/spectrum-colorpicker/LICENSE LICENSE.jqueryplugins.spectrum-colorpicker +mv lib/jqueryplugins/fullcalendar/LICENSE.txt     LICENSE.jqueryplugins.fullcalendar +mv lib/jqueryplugins/jstree/LICENSE-MIT           LICENSE.jqueryplugins.jstree +mv lib/fuzzy/LICENSE-MIT                          LICENSE.fuzzy +  rm scripts/glpi_cron_*.sh  sed -i -e 's/\r//' LICENSE.tiny_mce @@ -212,15 +262,6 @@ cat >cron <<EOF  * * * * * apache %{_bindir}/php %{_datadir}/%{name}/front/cron.php  EOF -# We only need 1 sql sdchema -if [ "%{version}" != "%{schema}" -a -f install/mysql/glpi-%{version}-empty.sql ]; then -  echo -e "\n*** check schema version as glpi-%{version}-empty.sql exists***\n" -  exit 1; -fi -mv install/mysql/glpi-%{schema}-empty.sql . -rm install/mysql/*.sql -mv glpi-%{schema}-empty.sql install/mysql/ -  %build  # Regenerate the locales @@ -233,7 +274,7 @@ done  %install  # ===== application =====  mkdir -p %{buildroot}/%{_datadir}/%{name} -cp -a COPYING.txt *.php *.js apirest.md %{buildroot}/%{_datadir}/%{name}/ +cp -a COPYING.txt *.php apirest.md %{buildroot}/%{_datadir}/%{name}/  for i in ajax css front inc install lib locales pics plugins scripts vendor  do   cp -ar $i %{buildroot}/%{_datadir}/%{name}/$i @@ -298,23 +339,25 @@ done >%{name}.lang  RET=0  : Hack for vendor  sed -e '/Development dependencies/s:^://:' -i tests/bootstrap.php - -: Ignore bad date -sed -e 's/testGetCopyrightMessage/skipGetCopyrightMessage/' -i tests/HtmlTest.php +rm composer.lock  : Add developement dependecies  cat << 'EOF' | tee -a vendor/autoload.php -//        "guzzlehttp/guzzle": "~5" -require_once $vendor . '/GuzzleHttp/autoload.php'; +//        "guzzlehttp/guzzle": "~6" +require_once $vendor . '/GuzzleHttp6/autoload.php';  EOF -: Running a PHP server -sed -e 's/localhost:8088/127.0.0.1:8089/' phpunit.xml.dist >phpunit.xml +: No internet on the builder +export GLPI_SKIP_ONLINE=1 +: Running a PHP server +export GLPI_URI=http://127.0.0.1:8089  %{_bindir}/php -S 127.0.0.1:8089 tests/router.php &>/dev/null & -  PHPPID=$! +: Skip LDAP tests for now +rm tests/units/AuthLdap* +  : Running a MariaDB server  MYSQL_TEST_HOST=127.0.0.1  MYSQL_TEST_PORT=3308 @@ -323,9 +366,12 @@ MYSQL_PID_FILE=$PWD/mysql.pid  rm -rf data  mkdir  data +: Create the Database  %{_bindir}/mysql_install_db \ +   --log-error=$PWD/mysql.log \     --datadir=$PWD/data +: Launch the Server  %{_libexecdir}/mysqld \     --socket=$MYSQL_TEST_SOCKET \     --log-error=$PWD/mysql.log \ @@ -349,13 +395,15 @@ cp %{SOURCE12} config/config_path.php  : Run upstream test suite  php tools/cliinstall.php --host=127.0.0.1:3308 --db=glpitest --user=root --tests --force --lang=en_GB || RET=1 -%{phpunit} --verbose || RET=1 +#atoum --debug --bootstrap-file tests/bootstrap.php --no-code-coverage --use-light-report --max-children-number 1 -d tests/database || RET=1 +atoum  --debug --bootstrap-file tests/bootstrap.php --no-code-coverage --use-light-report --max-children-number 1 -d tests/units || RET=1 +atoum  --debug --bootstrap-file tests/bootstrap.php --no-code-coverage --use-light-report --max-children-number 1 -d tests/api || RET=1  : Cleanup  if [ -s $MYSQL_PID_FILE ]; then    kill $(cat $MYSQL_PID_FILE)  fi -kill $PHPPID +kill $PHPPID || :  exit $RET  %else @@ -404,7 +452,9 @@ fi  %files -f %{name}.lang -%doc *.txt LICENSE.* +%{!?_licensedir:%global license %%doc} +%license LICENSE.* +%doc *.txt *.md  %attr(2770,root,apache) %dir %{_sysconfdir}/%{name}  %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/config_db.php @@ -421,7 +471,6 @@ fi  %dir %{_datadir}/%{name}  %{_datadir}/%{name}/*.php -%{_datadir}/%{name}/*.js  %{_datadir}/%{name}/apirest.md  # License file required by installation process  %{_datadir}/%{name}/COPYING.txt @@ -441,6 +490,14 @@ fi  %changelog +* Thu Sep 21 2017 Remi Collet <remi@remirepo.net> - 9.2~RC1-1 +- update to 9.2RC1 +- drop dependency on zetacomponents/graph +- raise dependency on zend-cache, zend-i18n 2.7 +- raise dependency on sabre/vobject 4.1 +- add dependency on paragonie/random_compat +- switch from phpunit to atoum for test suite +  * Sat Jul 22 2017 Johan Cwiklinski <johan AT x-tnd DOT be> - 9.1.6-1  - update to 9.1.6 | 
