diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 6921.patch | 26 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | glpi.spec | 31 |
4 files changed, 49 insertions, 11 deletions
@@ -1,3 +1,4 @@ +clog package-*.xml *.tgz *.tar.gz diff --git a/6921.patch b/6921.patch new file mode 100644 index 0000000..80ff8eb --- /dev/null +++ b/6921.patch @@ -0,0 +1,26 @@ +From 205a35302eb50cb6ef88f66187e6d9bbb52a501a Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 10 Feb 2020 11:37:39 +0100 +Subject: [PATCH] Fix #6919 allow installation on UDS + +--- + inc/console/database/installcommand.class.php | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/inc/console/database/installcommand.class.php b/inc/console/database/installcommand.class.php +index 6f0b45961c..5d9387bf24 100644 +--- a/inc/console/database/installcommand.class.php ++++ b/inc/console/database/installcommand.class.php +@@ -235,7 +235,11 @@ protected function execute(InputInterface $input, OutputInterface $output) { + } + + $mysqli = new \mysqli(); +- @$mysqli->connect($db_host, $db_user, $db_pass, null, $db_port); ++ if (intval($db_port) > 0) { // Network port ++ @$mysqli->connect($db_host, $db_user, $db_pass, null, $db_port); ++ } else { // Unix Domain Socket ++ @$mysqli->connect($db_host, $db_user, $db_pass, null, 0, $db_port); ++ } + + if (0 !== $mysqli->connect_errno) { + $message = sprintf( diff --git a/composer.json b/composer.json index 8923385..3788f2a 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "zendframework/zend-serializer": "^2.8" }, "require-dev": { - "atoum/atoum": "dev-master", + "atoum/atoum": "^3.4", "atoum/telemetry-extension": "^1.0", "consolidation/robo": "^1.0", "fzaninotto/Faker": "^1.7", @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # -%global gh_commit b7f90388babf6b621dff121701b69f8d20124e77 +%global gh_commit 7fbee4f15b37c98f6f2078bd10634ef02b5edc25 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20160923 %global gh_owner glpi-project @@ -52,10 +52,10 @@ %endif Name: %{gh_project} -%global upstream_version 9.4.5 +%global upstream_version 9.4.6 #global upstream_prever RC2 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique @@ -77,8 +77,6 @@ Source7: %{name}-user.ini # allow to install in /usr/bin Patch0: %{name}-bin.patch -# Upstream patches -Patch1: https://patch-diff.githubusercontent.com/raw/glpi-project/glpi/pull/6783.patch BuildArch: noarch BuildRequires: gettext @@ -111,7 +109,7 @@ BuildRequires: (php-composer(symfony/console) >= 3.4 with php BuildRequires: (php-composer(leafo/scssphp) >= 0.7.7 with php-composer(leafo/scssphp) < 1) # 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) +BuildRequires: (php-composer(atoum/atoum) >= 3.4 with php-composer(atoum/atoum) < 4) BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6 with php-composer(mikey179/vfsStream) < 2) # remirepo:40 %else @@ -150,7 +148,7 @@ BuildRequires: php-symfony3-console >= 3.4 BuildRequires: php-composer(guzzlehttp/guzzle) < 7 BuildRequires: php-composer(guzzlehttp/guzzle) >= 6 BuildRequires: php-composer(atoum/atoum) < 4 -BuildRequires: php-composer(atoum/atoum) >= 3.3 +BuildRequires: php-composer(atoum/atoum) >= 3.4 BuildRequires: php-composer(mikey179/vfsStream) < 2 BuildRequires: php-composer(mikey179/vfsStream) >= 1.6 %endif @@ -322,7 +320,6 @@ techniciens grâce à une maintenance plus cohérente. %prep %setup -q -n %{name}-%{gh_commit} %patch0 -p1 -b .rpm -%patch1 -p1 grep %{upstream_version} inc/define.php @@ -471,6 +468,11 @@ MYSQL_TEST_HOST=127.0.0.1 MYSQL_TEST_PORT=3308 MYSQL_TEST_SOCKET=$PWD/mysql.sock MYSQL_PID_FILE=$PWD/mysql.pid +%if 0%{?fedora} >= 32 +MYSQL_USER=mockbuild +%else +MYSQL_USER=root +%endif rm -rf data mkdir data @@ -490,7 +492,7 @@ mkdir data n=15 while [ $n -gt 0 ]; do - RESPONSE=$(%{_bindir}/mysqladmin --no-defaults --socket="$MYSQL_TEST_SOCKET" --user=root ping 2>&1 || :) + RESPONSE=$(%{_bindir}/mysqladmin --no-defaults --socket="$MYSQL_TEST_SOCKET" --user=$MYSQL_USER ping 2>&1 || :) if [ "$RESPONSE" == "mysqld is alive" ]; then break fi @@ -502,7 +504,7 @@ done cp %{SOURCE12} inc/downstream.php : Run upstream test suite -bin/console.rpm glpi:database:install --config-dir=./tests --no-interaction --db-host=127.0.0.1:3308 --db-name=glpitest --db-user=root --force || RET=1 +bin/console.rpm glpi:database:install --config-dir=./tests --no-interaction --db-port=$MYSQL_TEST_SOCKET --db-name=glpitest --db-user=$MYSQL_USER --force || RET=1 : Ignore test which raise memory issue rm tests/functionnal/Search.php @@ -613,6 +615,15 @@ fi %changelog +* Tue May 05 2020 Johan Cwiklinski <jcwiklinski AT teclib DOT com> - 9.4.6-1 +- update to 9.4.6 +- drop patches applied upstream + +* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 9.4.5-3 +- switch test suite on UDS using patch from + https://github.com/glpi-project/glpi/pull/6921 + fix FTBFS with mariadb 10.4 #1799419 + * Thu Jan 9 2020 Remi Collet <remi@remirepo.net> - 9.4.5-2 - add upstream patches for PHP 7.4 - re-enable test suite |