diff options
-rw-r--r-- | composer.json | 20 | ||||
-rw-r--r-- | glpi-9.2-config_path.php | 12 | ||||
-rw-r--r-- | glpi-9.2-config_path_test.php | 12 | ||||
-rw-r--r-- | glpi-fedora-autoloader.php | 20 | ||||
-rw-r--r-- | glpi.spec | 87 |
5 files changed, 76 insertions, 75 deletions
diff --git a/composer.json b/composer.json index a0c67f4..e0f408c 100644 --- a/composer.json +++ b/composer.json @@ -19,19 +19,19 @@ "ext-gd": "*", "ext-zlib": "*", "ext-curl": "*", - "jasig/phpcas": "~1.3.0", "iamcal/lib_autolink": "~1.7", - "phpmailer/phpmailer": "~5.2", + "phpmailer/phpmailer": "~6.0", "sabre/vobject": "~4.1", "simplepie/simplepie": "^1.5", "tecnickcom/tcpdf": "~6.2.16", - "zendframework/zend-cache": "^2.7", - "zendframework/zend-i18n": "^2.7", - "zendframework/zend-serializer": "^2.7", + "zendframework/zend-cache": "^2.8", + "zendframework/zend-i18n": "^2.8", + "zendframework/zend-serializer": "^2.8", "michelf/php-markdown": "^1.6", "true/punycode": "^2.1", "paragonie/random_compat": "^2.0", - "sebastian/diff": "^1.4" + "monolog/monolog": "^1.23", + "sebastian/diff": "^1.4 || ^2.0 || ^3.0" }, "require-dev": { "guzzlehttp/guzzle": "~6", @@ -41,6 +41,7 @@ "patchwork/jsqueeze": "^2.0", "atoum/atoum": "^3.3", "atoum/telemetry-extension": "^1.0", + "sensiolabs/security-checker": "^4.1", "fzaninotto/Faker": "^1.7" }, "suggest": { @@ -59,12 +60,9 @@ "testunits": "php -d memory_limit=512M vendor/bin/atoum --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage -d tests/units", "testweb": "php -d memory_limit=512M vendor/bin/atoum --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/web", "testldap": "php -d memory_limit=512M vendor/bin/atoum --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/LDAP", - "csp": "vendor/bin/phpcs --parallel=500 -p --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore=/vendor/,/plugins/,/files/,/lib/,/config/,/tests/config,/.git ./", + "csp": "vendor/bin/phpcs --parallel=500 -p --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore=/vendor/,/plugins/,/files/,/lib/,/config/,/tests/config,/css/tiny_mce,/.git ./", "cs": "vendor/bin/phpcs -d memory_limit=512M -p --standard=vendor/glpi-project/coding-standard/GlpiStandard/ --ignore=/vendor/,/plugins/,/files/,/lib/,/config/,/tests/config,/css/tiny_mce,/.git ./", - "post-install-cmd": [ - "@php -r \"file_put_contents('.composer.hash', sha1_file('composer.lock'));\"", - "patch -d vendor/zendframework/zend-cache/ -p1 < tools/zend-cache-php7.2.patch" - ], + "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-9.2-config_path.php b/glpi-9.2-config_path.php index 5c0e672..b7a1a7e 100644 --- a/glpi-9.2-config_path.php +++ b/glpi-9.2-config_path.php @@ -16,18 +16,6 @@ define('GLPI_CONFIG_DIR', '/etc/glpi'); // Runtime Data defined('GLPI_VAR_DIR') or define('GLPI_VAR_DIR', '/var/lib/glpi/files'); -defined('GLPI_DOC_DIR') or define('GLPI_DOC_DIR', GLPI_VAR_DIR); -defined('GLPI_CRON_DIR') or define('GLPI_CRON_DIR', GLPI_VAR_DIR . '/_cron'); -defined('GLPI_DUMP_DIR') or define('GLPI_DUMP_DIR', GLPI_VAR_DIR . '/_dumps'); -defined('GLPI_GRAPH_DIR') or define('GLPI_GRAPH_DIR', GLPI_VAR_DIR . '/_graphs'); -defined('GLPI_LOCK_DIR') or define('GLPI_LOCK_DIR', GLPI_VAR_DIR . '/_lock'); -defined('GLPI_PICTURE_DIR') or define('GLPI_PICTURE_DIR', GLPI_VAR_DIR . '/_pictures'); -defined('GLPI_PLUGIN_DOC_DIR') or define('GLPI_PLUGIN_DOC_DIR', GLPI_VAR_DIR . '/_plugins'); -defined('GLPI_RSS_DIR') or define('GLPI_RSS_DIR', GLPI_VAR_DIR . '/_rss'); -defined('GLPI_SESSION_DIR') or define('GLPI_SESSION_DIR', GLPI_VAR_DIR . '/_sessions'); -defined('GLPI_TMP_DIR') or define('GLPI_TMP_DIR', GLPI_VAR_DIR . '/_tmp'); -defined('GLPI_UPLOAD_DIR') or define('GLPI_UPLOAD_DIR', GLPI_VAR_DIR . '/_uploads'); -defined('GLPI_CACHE_DIR') or define('GLPI_CACHE_DIR', GLPI_VAR_DIR . '/_cache'); // Log defined('GLPI_LOG_DIR') or define('GLPI_LOG_DIR', '/var/log/glpi'); diff --git a/glpi-9.2-config_path_test.php b/glpi-9.2-config_path_test.php index 05c24f2..f159a57 100644 --- a/glpi-9.2-config_path_test.php +++ b/glpi-9.2-config_path_test.php @@ -2,17 +2,7 @@ // for Redhat/Fedora RPM buiding test suite // Runtime Data -define('GLPI_DOC_DIR', __DIR__ . '/../files'); -define('GLPI_CRON_DIR', GLPI_DOC_DIR . '/_cron'); -define('GLPI_DUMP_DIR', GLPI_DOC_DIR . '/_dumps'); -define('GLPI_GRAPH_DIR', GLPI_DOC_DIR . '/_graphs'); -define('GLPI_LOCK_DIR', GLPI_DOC_DIR . '/_lock'); -define('GLPI_PICTURE_DIR', GLPI_DOC_DIR . '/_pictures'); -define('GLPI_PLUGIN_DOC_DIR', GLPI_DOC_DIR . '/_plugins'); -define('GLPI_RSS_DIR', GLPI_DOC_DIR . '/_rss'); -define('GLPI_SESSION_DIR', GLPI_DOC_DIR . '/_sessions'); -define('GLPI_TMP_DIR', GLPI_DOC_DIR . '/_tmp'); -define('GLPI_UPLOAD_DIR', GLPI_DOC_DIR . '/_uploads'); +define('GLPI_VAR_DIR', __DIR__ . '/../files'); // System libraries define('GLPI_HTMLAWED', '/usr/share/php/htmLawed/htmLawed.php'); diff --git a/glpi-fedora-autoloader.php b/glpi-fedora-autoloader.php index 6224a52..534ac96 100644 --- a/glpi-fedora-autoloader.php +++ b/glpi-fedora-autoloader.php @@ -5,12 +5,10 @@ require_once "$vendor/Fedora/Autoloader/autoload.php"; // Dependencies from composer.json \Fedora\Autoloader\Dependencies::required([ - // "jasig/phpcas": "~1.3.0", - '##DATADIR##/pear/CAS/Autoload.php', // "iamcal/lib_autolink": "~1.7", "$vendor/php-iamcal-lib-autolink/autoload.php", - // "phpmailer/phpmailer": "~5.2", - "$vendor/PHPMailer/PHPMailerAutoload.php", + // "phpmailer/phpmailer": "~6.0", + "$vendor/PHPMailer/PHPMailer6/autoload.php", // "sabre/vobject": "~4.1", "$vendor/Sabre/VObject4/autoload.php", // "simplepie/simplepie": "^1.5", @@ -38,7 +36,17 @@ require_once "$vendor/Fedora/Autoloader/autoload.php"; "$vendor/TrueBV/autoload.php", // "paragonie/random_compat": "^2.0" "$vendor/random_compat/autoload.php", -// "sebastian/diff": "^1.4" - "$vendor/SebastianBergmann/Diff/autoload.php", +// "monolog/monolog": "^1.23", + "$vendor/Monolog/autoload.php", +// "sebastian/diff": "^1.4 || ^2.0 || ^3.0" + [ + "$vendor/SebastianBergmann/Diff3/autoload.php", + "$vendor/SebastianBergmann/Diff2/autoload.php", + "$vendor/SebastianBergmann/Diff/autoload.php", + ] +]); +\Fedora\Autoloader\Dependencies::optional([ + // "jasig/phpcas": "~1.3.0", + '##DATADIR##/pear/CAS/Autoload.php', ]); @@ -7,12 +7,11 @@ # Please, preserve the changelog entries # -%global gh_commit 84b68efa767f66f5d4bf90de8851751f9e8b8aeb +%global gh_commit 222fd2dc5d8a301bd4b691f760200ce10ae8e34f %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20160923 %global gh_owner glpi-project %global gh_project glpi -#global prever RC2 %if 0%{?rhel} == 6 %global useselinux 1 @@ -31,8 +30,9 @@ %global with_httpd 0 %endif # remirepo:4 -%if 0%{?fedora} < 19 && 0%{?rhel} < 7 +%if 0%{?fedora} < 19 && 0%{?rhel} < 8 # MySQL need another bootstrap method +# GLPI requires MySQL >= 5.6 or MariaDB >= 10 %global with_tests 0%{?_with_tests:1} %else %global with_tests 0%{!?_without_tests:1} @@ -40,15 +40,18 @@ %endif Name: %{gh_project} -Version: 9.2.3 -Release: 2%{?dist} +%global upstream_version 9.3 +%global upstream_prever RC2 +# use 9.3.0~RC2 < 9.3 (for plugin compatibility check) +Version: %{upstream_version}.0%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique 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}%{?prever}-%{gh_short}.tar.gz +Source0: https://github.com/%{gh_owner}/%{name}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever:-%{upstream_prever}}-%{gh_short}.tar.gz Source1: %{name}-httpd.conf Source2: %{name}-9.2-config_path.php @@ -65,7 +68,7 @@ BuildArch: noarch BuildRequires: gettext BuildRequires: php-cli %if %{with_tests} -BuildRequires: mariadb-server +BuildRequires: mariadb-server >= 10 # Missing in mariadb BuildRequires: hostname BuildRequires: php-mysqli @@ -74,30 +77,28 @@ BuildRequires: php-xmlrpc BuildRequires: php-htmLawed # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(jasig/phpcas) >= 1.3 with php-composer(jasig/phpcas) < 2) BuildRequires: (php-composer(iamcal/lib_autolink) >= 1.7 with php-composer(iamcal/lib_autolink) < 2) -BuildRequires: (php-composer(phpmailer/phpmailer) >= 5.2 with php-composer(phpmailer/phpmailer) < 6) +BuildRequires: (php-composer(phpmailer/phpmailer) >= 6.0 with php-composer(phpmailer/phpmailer) < 7) BuildRequires: (php-composer(sabre/vobject) >= 4.1 with php-composer(sabre/vobject) < 5) BuildRequires: (php-composer(simplepie/simplepie) >= 1.5 with php-composer(simplepie/simplepie) < 2) BuildRequires: (php-composer(tecnickcom/tcpdf) >= 6.2.16 with php-composer(tecnickcom/tcpdf) < 7) -BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2) -BuildRequires: (php-autoloader(zendframework/zend-cache) >= 2.7 with php-autoloader(zendframework/zend-cache) < 3) -BuildRequires: (php-autoloader(zendframework/zend-i18n) >= 2.7 with php-autoloader(zendframework/zend-i18n) < 3) -BuildRequires: (php-autoloader(zendframework/zend-serializer) >= 2.7 with php-autoloader(zendframework/zend-serializer) < 3) +BuildRequires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 4) +BuildRequires: (php-autoloader(zendframework/zend-cache) >= 2.8 with php-autoloader(zendframework/zend-cache) < 3) +BuildRequires: (php-autoloader(zendframework/zend-i18n) >= 2.8 with php-autoloader(zendframework/zend-i18n) < 3) +BuildRequires: (php-autoloader(zendframework/zend-serializer) >= 2.8 with php-autoloader(zendframework/zend-serializer) < 3) BuildRequires: (php-composer(michelf/php-markdown) >= 1.6 with php-composer(michelf/php-markdown) < 2) BuildRequires: (php-composer(true/punycode) >= 2.1 with php-composer(true/punycode) < 3) BuildRequires: (php-composer(paragonie/random_compat) >= 2.0 with php-composer(paragonie/random_compat) < 3) +BuildRequires: (php-composer(monolog/monolog) >= 1.23 with php-composer(monolog/monolog) < 2) # requires-dev BuildRequires: (php-composer(guzzlehttp/guzzle) >= 6 with php-composer(guzzlehttp/guzzle) < 7) BuildRequires: (php-composer(atoum/atoum) >= 3.3 with php-composer(atoum/atoum) < 4) # remirepo:33 %else -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(phpmailer/phpmailer) < 6 -BuildRequires: php-composer(phpmailer/phpmailer) >= 5.2 +BuildRequires: php-composer(phpmailer/phpmailer) < 7 +BuildRequires: php-composer(phpmailer/phpmailer) >= 6.0 BuildRequires: php-composer(sabre/vobject) < 5 BuildRequires: php-composer(sabre/vobject) >= 4.1 BuildRequires: php-composer(simplepie/simplepie) < 2 @@ -107,17 +108,19 @@ BuildRequires: php-composer(tecnickcom/tcpdf) >= 6.2.16 # Because 3 versions exists TODO: use range dependency BuildRequires: php-phpunit-diff >= 1.4 BuildRequires: php-composer(zendframework/zend-cache) < 3 -BuildRequires: php-composer(zendframework/zend-cache) >= 2.7 +BuildRequires: php-composer(zendframework/zend-cache) >= 2.8 BuildRequires: php-composer(zendframework/zend-i18n) < 3 -BuildRequires: php-composer(zendframework/zend-i18n) >= 2.7 +BuildRequires: php-composer(zendframework/zend-i18n) >= 2.8 BuildRequires: php-composer(zendframework/zend-serializer) < 3 -BuildRequires: php-composer(zendframework/zend-serializer) >= 2.7 +BuildRequires: php-composer(zendframework/zend-serializer) >= 2.8 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 +BuildRequires: php-composer(monolog/monolog) < 2 +BuildRequires: php-composer(monolog/monolog) >= 1.23 # requires-dev BuildRequires: php-composer(guzzlehttp/guzzle) < 7 BuildRequires: php-composer(guzzlehttp/guzzle) >= 6 @@ -175,27 +178,25 @@ Requires: php-zlib Requires: php-htmLawed # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(jasig/phpcas) >= 1.3 with php-composer(jasig/phpcas) < 2) Requires: (php-composer(iamcal/lib_autolink) >= 1.7 with php-composer(iamcal/lib_autolink) < 2) -Requires: (php-composer(phpmailer/phpmailer) >= 5.2 with php-composer(phpmailer/phpmailer) < 6) +Requires: (php-composer(phpmailer/phpmailer) >= 6.0 with php-composer(phpmailer/phpmailer) < 7) Requires: (php-composer(sabre/vobject) >= 4.1 with php-composer(sabre/vobject) < 5) Requires: (php-composer(simplepie/simplepie) >= 1.5 with php-composer(simplepie/simplepie) < 2) Requires: (php-composer(tecnickcom/tcpdf) >= 6.2.16 with php-composer(tecnickcom/tcpdf) < 7) -Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 2) -Requires: (php-autoloader(zendframework/zend-cache) >= 2.7 with php-autoloader(zendframework/zend-cache) < 3) -Requires: (php-autoloader(zendframework/zend-i18n) >= 2.7 with php-autoloader(zendframework/zend-i18n) < 3) -Requires: (php-autoloader(zendframework/zend-serializer) >= 2.7 with php-autoloader(zendframework/zend-serializer) < 3) +Requires: (php-composer(sebastian/diff) >= 1.4 with php-composer(sebastian/diff) < 4) +Requires: (php-autoloader(zendframework/zend-cache) >= 2.8 with php-autoloader(zendframework/zend-cache) < 3) +Requires: (php-autoloader(zendframework/zend-i18n) >= 2.8 with php-autoloader(zendframework/zend-i18n) < 3) +Requires: (php-autoloader(zendframework/zend-serializer) >= 2.8 with php-autoloader(zendframework/zend-serializer) < 3) Requires: (php-composer(michelf/php-markdown) >= 1.6 with php-composer(michelf/php-markdown) < 2) Requires: (php-composer(true/punycode) >= 2.1 with php-composer(true/punycode) < 3) Requires: (php-composer(paragonie/random_compat) >= 2.0 with php-composer(paragonie/random_compat) < 3) +Requires: (php-composer(monolog/monolog) >= 1.23 with php-composer(monolog/monolog) < 2) # remirepo:28 %else -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(phpmailer/phpmailer) < 6 -Requires: php-composer(phpmailer/phpmailer) >= 5.2 +Requires: php-composer(phpmailer/phpmailer) < 7 +Requires: php-composer(phpmailer/phpmailer) >= 6.0 Requires: php-composer(sabre/vobject) < 5 Requires: php-composer(sabre/vobject) >= 4.1 Requires: php-composer(simplepie/simplepie) < 2 @@ -204,11 +205,11 @@ Requires: php-composer(tecnickcom/tcpdf) < 7 Requires: php-composer(tecnickcom/tcpdf) >= 6.2.16 Requires: php-phpunit-diff >= 1.4 Requires: php-composer(zendframework/zend-cache) < 3 -Requires: php-composer(zendframework/zend-cache) >= 2.7 +Requires: php-composer(zendframework/zend-cache) >= 2.8 Requires: php-composer(zendframework/zend-i18n) < 3 -Requires: php-composer(zendframework/zend-i18n) >= 2.7 +Requires: php-composer(zendframework/zend-i18n) >= 2.8 Requires: php-composer(zendframework/zend-serializer) < 3 -Requires: php-composer(zendframework/zend-serializer) >= 2.7 +Requires: php-composer(zendframework/zend-serializer) >= 2.8 Requires: php-composer(zendframework/zend-loader) Requires: php-composer(michelf/php-markdown) < 2 Requires: php-composer(michelf/php-markdown) >= 1.6 @@ -216,6 +217,8 @@ 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: php-composer(monolog/monolog) < 2 +Requires: php-composer(monolog/monolog) >= 1.23 %endif Requires: gnu-free-sans-fonts %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -228,6 +231,8 @@ 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(js-gridstack) +Provides: bundled(js-leaflet-control-osm-geocoder) Provides: bundled(prism) Provides: bundled(tiny_mce) = 4.3.13 # Autoloader @@ -270,7 +275,7 @@ techniciens grâce à une maintenance plus cohérente. %prep %setup -q -n %{name}-%{gh_commit} -grep %{version} inc/define.php +grep %{upstream_version} inc/define.php find . -name \*.orig -exec rm {} \; -print @@ -301,11 +306,12 @@ 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/gridstack/LICENSE LICENSE.gridstack 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 +mv lib/leaflet/plugins/leaflet-control-osm-geocoder/LICENSE LICENSE.leaflet-control-osm-geocoder rm scripts/glpi_cron_*.sh @@ -396,6 +402,9 @@ done >%{name}.lang %check %if %{with_tests} +# See https://github.com/glpi-project/glpi/issues/4165 +rm tests/functionnal/Auth.php + RET=0 : Hack for vendor sed -e '/Development dependencies/s:^://:' -i tests/bootstrap.php @@ -547,6 +556,14 @@ fi %changelog +* Tue Jun 12 2018 Remi Collet <remi@remirepo.net> - 9.3.0~RC2-1 +- update to 9.3-RC2 +- drop dependency on jasig/phpcas +- raise dependency on phpmailer/phpmailer 6.0 +- raise dependency on zendframework 2.8 +- allow sebastian/diff 2.0 and 3.0 +- add dependency on monolog/monolog + * Fri Apr 27 2018 Remi Collet <remi@remirepo.net> - 9.2.3-2 - use range dependencies on F27+ |