diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 6921.patch | 26 | ||||
-rw-r--r-- | glpi.spec | 18 |
3 files changed, 42 insertions, 3 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( @@ -55,7 +55,7 @@ Name: %{gh_project} %global upstream_version 9.4.5 #global upstream_prever RC2 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique @@ -79,6 +79,7 @@ Source7: %{name}-user.ini Patch0: %{name}-bin.patch # Upstream patches Patch1: https://patch-diff.githubusercontent.com/raw/glpi-project/glpi/pull/6783.patch +Patch2: https://patch-diff.githubusercontent.com/raw/glpi-project/glpi/pull/6921.patch BuildArch: noarch BuildRequires: gettext @@ -323,6 +324,7 @@ techniciens grâce à une maintenance plus cohérente. %setup -q -n %{name}-%{gh_commit} %patch0 -p1 -b .rpm %patch1 -p1 +%patch2 -p1 grep %{upstream_version} inc/define.php @@ -471,6 +473,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 +497,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 +509,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 +620,11 @@ fi %changelog +* 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 |