Bug 251680 - www/glpi: version 9.5.3
Summary: www/glpi: version 9.5.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-08 09:10 UTC by O. Hartmann
Modified: 2020-12-11 15:12 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mathias)


Attachments
Preliminary GLPI patch GLPI >= 9.5 (206.54 KB, patch)
2020-12-09 06:32 UTC, O. Hartmann
no flags Details | Diff
Patch GLPI 9.5.3 (206.58 KB, patch)
2020-12-09 06:55 UTC, O. Hartmann
no flags Details | Diff
Rreliminary GLPI patch 9.5.3 (206.36 KB, patch)
2020-12-09 07:05 UTC, O. Hartmann
no flags Details | Diff
Patch 9.4.5 to 9.5.3 (349.66 KB, patch)
2020-12-09 08:30 UTC, Mathias Monnerville
no flags Details | Diff
patch from 9.4.5 to 9.5.3 (349.70 KB, patch)
2020-12-09 13:58 UTC, Mathias Monnerville
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2020-12-08 09:10:43 UTC
Port www/glpi doesn't have a maintainer and is at this moment stuck at revision 9.4.3. The PHP default version has recently been elevated to 7.4 and GLPI < 9.5 doesn't support PHP 7.4.

We are speaking of base systems running FreeBSD 12.2-RELENG, 13-CURRENT.

For those of us running several systems and updating via poudriere, the recent policy ripped off www/glpi out of the build process as long as PHP is at the default 7.2. pkg deletes www/glpi on an automated update, so some people get stuck with a non working GLPI installation right now. That is a very bad situation.

Is there any solution for this dilemma? We tried to setup a dedicated jail for servicing GLPI requests and fed the ports via the quarterly ports repository of pkg, but also the package www/glpi was gone.

I tried to mitigate the problem via an ad hoc replacement with GLPI 9.5.3, but I ran into problems regarding the USES_PHP= tag in the ports framework's Makefile. It seems, some elementary php portions of the port are not covered by what usr/ports/Mk/Uses covers.

I need some help here. Later I'll upload my first attempt to change the Makefile to reflect GitHub (GH) as the main source. That Makefile works so far, but the installation is wrecked, missing portions of the framework.
Comment 1 Mathias Monnerville 2020-12-08 19:18:56 UTC
(In reply to O. Hartmann from comment #0)

I'm looking into it now. Will let you know ASAP.
Comment 2 Mathias Monnerville 2020-12-08 19:59:37 UTC
(In reply to O. Hartmann from comment #0)

BTW current port version is 9.4.5, see PR 244971.

Anyway, thanks for reporting.
Comment 3 Mathias Monnerville 2020-12-08 20:12:07 UTC
@ohartmann

Seems like GLPI 9.5.0 has dropped support of PHP < 7.2.0 according to https://github.com/glpi-project/glpi/pull/6828.

Upgrading the GLPI port to 9.5.0 should be working on 12.2-RELEASE systems and newer with PHP 7.3+.
Comment 4 Mathias Monnerville 2020-12-08 20:18:26 UTC
> For those of us The recent policy ripped off www/glpi out
> of the build process as long as PHP is at the default 7.2.

According to https://github.com/glpi-project/glpi/pull/6828, GLPI 9.5.x should be working with PHP 7.2 too. 

See also https://glpi-install.readthedocs.io/en/latest/prerequisites.html#php.

What PHP version are you using?
Comment 5 Mathias Monnerville 2020-12-08 20:38:08 UTC
Okay, www/glpi has been removed because of the dependency to wddx listed in the 9.4.5 port's Makefile (See https://svnweb.freebsd.org/ports?view=revision&revision=543581)

However, PHP 7.4 dropped support of wddx and GLPI 9.5 does not need this module anymore (see https://glpi-install.readthedocs.io/en/latest/prerequisites.html#mandatory-extensions).

I think it's safe to remove `wddx` from USE_PHP and add a couple of additional extensions to it. In this case, the IGNORE_WITH_PHP variable could also be removed, making the www/glpi port available again.
Comment 6 O. Hartmann 2020-12-09 06:32:34 UTC
Created attachment 220381 [details]
Preliminary GLPI patch GLPI >= 9.5

The attachment is a preliminary first try of push GLPI towards > 9.5 and PHP > 7.2.
Comment 7 O. Hartmann 2020-12-09 06:54:23 UTC
(In reply to Mathias Monnerville from comment #5)

Sorry for the late response.

I was aware of the fact that GLPI dropped PHP support for php <= 7.2.

You will find my preliminary attempt to save our GLPI installation from a week ago. The patch fetches the sources, extract them and patches them as far as there are to be patched files. It also build with poudriere, but the port itself seems incomplete at this very state.

You'll find the dropped wddx tag from USE_PHP=. I do not know whether it is wise to wrap this around with an if-conditional to target FreeBSD 11 with PHP 7.2.

I could not find  devel/php-composer as valid tag in Mk/Uses/php.mk as it should be, for my understanding, therefore the RUN_DEPENDS tag is enriched with its dependency.

I also turned the Makefile to use Github (GH), which might more convenient.

Feel free to edit, use or completely drop the above patches. As said, they are completely preliminary.
Comment 8 O. Hartmann 2020-12-09 06:55:35 UTC
Created attachment 220382 [details]
Patch GLPI 9.5.3

This patch is against www/glpi in the ports tree, not simply the glpi folder withing www. Correction.
Comment 9 O. Hartmann 2020-12-09 07:05:53 UTC
Created attachment 220383 [details]
Rreliminary GLPI patch 9.5.3

cosmetics
Comment 10 Mathias Monnerville 2020-12-09 08:29:48 UTC
(In reply to O. Hartmann from comment #7)

Hi,

I don't think php-composer is required at all. I patched the Makefile and the pkg-plist.

Can you try with the attached patch and let me know? (to be applied against a 9.4.5).

I successfully built the 9.5.3 port for FreeBSD 12.2 with Poudriere.

Thanks for any more feedback before I submit a PR with the patch.
Comment 11 Mathias Monnerville 2020-12-09 08:30:31 UTC
Created attachment 220387 [details]
Patch 9.4.5 to 9.5.3
Comment 12 O. Hartmann 2020-12-09 09:34:21 UTC
Hello,
sorry, wasn't at the console, tried to find another problem with GLPI right now.

I followed some hints on the GLPI web page at GITHUB and they recommended some additional php modules and one of them seemed to be php-composer. The reason is: the patch I made does build the framework successfully on both our poudriere and the traditinal make within the ports tree, but the installed GLPI doesn't work out of the box.

By using the same configs for Apache 2.4 and the config file for DB access, accessing the website configured as a sub directory on an Apache 2.4 server as with the GLPI 9.4.5 results in:

[...]
Application dependencies are not up to date.
Run "php bin/console dependencies install" in the glpi tree to fix this.
[...]

On a test installation I did do and ran into trouble, but first php complained about a missing composer module.

I'm not familiar that deep with PHP and GLPI's interior to determine the needs of GLPI at this very moment, maybe you can shed some light on this. I do not see what is missing, nor do I know the bin/console sequence to check for those missing dependencies right now.
Comment 13 Mathias Monnerville 2020-12-09 09:52:28 UTC
(In reply to O. Hartmann from comment #12)

Thanks for your feedback! Very interesting. Not familiar with PHP either, but ofc I want something that works out of the box.

I will investigate more later today and will perform a complete setup (with web server and DB) to see what is going on.
Comment 14 Mathias Monnerville 2020-12-09 13:57:42 UTC
So, please have a look at the new patch, the dependencies are correct this time and the list complete.

I tested on a fresh 12.2 installation, with Apache 2.4 and MySQL 5.7. After Apache and MySQL are properly configured, I could reach the GLPI installer. All the extension checks succeeded, GLPI reported no error. I could go straight to the GLPI login page in a couple of minutes.

Connecting with glpi/glpi enters the dashboard, no errors in the logs, GLPI looks 100% functional.

Could you please try this new patch? I will then make the GH changes in the Makefile for Github but this is more a cosmetic change and not related to the issue we are discussing.

Thanks,
Mathias
Comment 15 Mathias Monnerville 2020-12-09 13:58:26 UTC
Created attachment 220395 [details]
patch from 9.4.5 to 9.5.3
Comment 16 Mathias Monnerville 2020-12-09 14:33:42 UTC
BTW with the patch above, php-composer is not required at all.

I did not have to manage PHP dependencies with Composer, nor running the PHP console.
Comment 17 O. Hartmann 2020-12-09 17:53:33 UTC
(In reply to Mathias Monnerville from comment #16)

I tried your patch and found that mine lacks in essential folders - that may contributed to GH as the base.

The patch, by the way. works installed via the traditional way (make in the ports tree).
Comment 18 Mathias Monnerville 2020-12-09 18:09:04 UTC
(In reply to O. Hartmann from comment #17)

Perfect, glad to hear that!

I won't add the github vars to the Makefile though, as the porters handbook states than USE_GITHUB should only be used "If the distribution file comes from a specific commit or tag on GitHub for which there is no officially released file". Since there are official releases, the current MASTER_SITES can be used.

I will submit a new *maintainer  request* PR today for upgrading GLPI to 9.5.3 and will reference it here so that your PR gets closed too when my patch is merged.

Again, thanks for reporting.
Comment 19 Mathias Monnerville 2020-12-10 22:19:52 UTC
Done, submitted PR 251744.

Let's hope it will be merged soon.
Comment 20 commit-hook freebsd_committer freebsd_triage 2020-12-11 08:27:39 UTC
A commit references this bug:

Author: mikael
Date: Fri Dec 11 08:26:47 UTC 2020
New revision: 557702
URL: https://svnweb.freebsd.org/changeset/ports/557702

Log:
  www/glpi: Update to 9.5.3

  ChangeLogs
  - 9.5.3: https://github.com/glpi-project/glpi/milestone/44?closed=1
  - 9.5.2: https://github.com/glpi-project/glpi/milestone/43?closed=1
  - 9.5.1: https://github.com/glpi-project/glpi/milestone/42?closed=1
  - 9.5.0: https://github.com/glpi-project/glpi/milestone/42?closed=1
  - 9.4.6: https://github.com/glpi-project/glpi/milestone/39?closed=1
  - 9.4.5: https://github.com/glpi-project/glpi/milestone/38?closed=1

  PR:		251680, 251744
  Submitted by:	Mathias Monnerville (maintainer)
  MFH:		2020Q4 (bugfix release)

Changes:
  head/www/glpi/Makefile
  head/www/glpi/distinfo
  head/www/glpi/pkg-plist
Comment 21 Mikael Urankar freebsd_committer freebsd_triage 2020-12-11 08:36:49 UTC
Thanks!
Comment 22 commit-hook freebsd_committer freebsd_triage 2020-12-11 09:18:47 UTC
A commit references this bug:

Author: mikael
Date: Fri Dec 11 09:18:41 UTC 2020
New revision: 557708
URL: https://svnweb.freebsd.org/changeset/ports/557708

Log:
  MFH: r557702

  www/glpi: Update to 9.5.3

  ChangeLogs
  - 9.5.3: https://github.com/glpi-project/glpi/milestone/44?closed=1
  - 9.5.2: https://github.com/glpi-project/glpi/milestone/43?closed=1
  - 9.5.1: https://github.com/glpi-project/glpi/milestone/42?closed=1
  - 9.5.0: https://github.com/glpi-project/glpi/milestone/42?closed=1
  - 9.4.6: https://github.com/glpi-project/glpi/milestone/39?closed=1
  - 9.4.5: https://github.com/glpi-project/glpi/milestone/38?closed=1

  PR:		251680, 251744
  Submitted by:	Mathias Monnerville (maintainer)

Changes:
_U  branches/2020Q4/
  branches/2020Q4/www/glpi/Makefile
  branches/2020Q4/www/glpi/distinfo
  branches/2020Q4/www/glpi/pkg-plist
Comment 23 O. Hartmann 2020-12-11 15:12:06 UTC
Thank you very much.