[packages/glpi] Up to 11.0.6

arekm arekm at pld-linux.org
Thu Apr 2 00:45:05 CEST 2026


commit ef6ca23218e86191ad1f2d2b05103cfc4ec3508b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Apr 2 00:40:36 2026 +0200

    Up to 11.0.6

 downstream.php     |   2 +
 glpi-apache.conf   |  36 ++++++
 glpi-lighttpd.conf |  11 ++
 glpi.cron          |   5 +
 glpi.logrotate     |   9 ++
 glpi.spec          | 344 ++++++++++++++++++++++++++++++-----------------------
 local_define.php   |   4 +
 7 files changed, 263 insertions(+), 148 deletions(-)
---
diff --git a/glpi.spec b/glpi.spec
index 9794365..9484ad2 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -1,48 +1,57 @@
-# TODO
-# - patch for tinymce
-# - specs phpcas
-# - %s#%{_sysconfdir}#%{_webapps}/%{_webapp}#g
-# - config for lighttpd
-# - description
-
-%define		ver	9.3
-%define		relver	0
-
-Summary:	GLPI - the Information Resource-Manager with an additional Administration Interface
-Summary(fr.UTF-8):	GLPI - une application libre, destinée à la gestion de parc informatique et de helpdesk
-Summary(pl.UTF-8):	GLPI - zarządca informacji z dodatkowym interfejsem administracyjnym
+%define		php_min_version 8.3
+Summary:	GLPI - IT Asset Management
+Summary(fr.UTF-8):	GLPI - Gestion Libre de Parc Informatique
+Summary(pl.UTF-8):	GLPI - zarządzanie zasobami IT
 Name:		glpi
-Version:	%{ver}.%{relver}
+Version:	11.0.6
 Release:	1
-License:	GPL
+License:	GPL v3+
 Group:		Applications/WWW
-Source0:	https://github.com/glpi-project/glpi/releases/download/%{version}/%{name}-%{ver}.tgz
-# Source0-md5:	e6ec142ee886bab0b20468c5830160da
-URL:		http://glpi-project.org/
+Source0:	https://github.com/glpi-project/glpi/releases/download/%{version}/%{name}-%{version}.tgz
+# Source0-md5:	249f8feda9d0c744a6c64d40e78bfeb9
+Source1:	%{name}-apache.conf
+Source2:	%{name}-lighttpd.conf
+Source3:	%{name}.cron
+Source4:	%{name}.logrotate
+Source5:	downstream.php
+Source6:	local_define.php
+URL:		https://glpi-project.org/
 BuildRequires:	rpmbuild(macros) >= 1.268
-Requires(triggerpostun):	sed >= 4.0
+BuildRequires:	sed >= 4.0
+Requires:	crondaemon
 Requires:	group(http)
+Requires:	php(core) >= %{php_min_version}
+Requires:	php(bcmath)
+Requires:	php(ctype)
 Requires:	php(curl)
-Requires:	php(domxml)
+Requires:	php(dom)
+Requires:	php(exif)
+Requires:	php(fileinfo)
+Requires:	php(filter)
 Requires:	php(gd)
-Requires:	php(imap)
+Requires:	php(iconv)
+Requires:	php(intl)
 Requires:	php(json)
-Requires:	php(ldap)
 Requires:	php(mbstring)
 Requires:	php(mysqli)
 Requires:	php(openssl)
 Requires:	php(session)
-Requires:	php(xmlrpc)
-Requires:	tinymce
-Requires:	user(http)
+Requires:	php(simplexml)
+Requires:	php(tokenizer)
+Requires:	php(xml)
+Requires:	php(xmlreader)
+Requires:	php(xmlwriter)
+Requires:	php(zlib)
 Requires:	webapps
-#Requires:	webserver(access)
-#Requires:	webserver(alias)
-Requires:	webserver(auth)
-#Requires:	webserver(cgi)
-#Requires:	webserver(indexfile)
+Requires:	webserver(access)
+Requires:	webserver(alias)
 Requires:	webserver(php)
+Suggests:	php(bz2)
+Suggests:	php(ldap)
 Suggests:	php(opcache)
+Suggests:	php(phar)
+Suggests:	php(sodium)
+Suggests:	php(zip)
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -51,128 +60,139 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		_sysconfdir	%{_webapps}/%{_webapp}
 %define		_appdir		%{_datadir}/%{_webapp}
 
-%description
-GLPI is the Information Resource-Manager with an additional
-Administration Interface. You can use it to build up a database with
-an inventory for your company (computer, software, printers...). It
-has enhanced functions to make the daily life for the administrators
-easier, like a job-tracking-system with mail-notification and methods
-to build a database with basic information about your
-network-topology.
-
-The principal functionalities of the application are:
-
-1) the precise inventory of all the technical resources. All their
-characteristics will be stored in a database.
-
-2) management and the history of the maintenance actions and the bound
-procedures. This application is dynamic and is directly connected to
-the users who can post requests to the technicians. An interface thus
-authorizes the latter with if required preventing the service of
-maintenance and indexing a problem encountered with one of the
-technical resources to which they have access.
-
-%description -l fr.UTF-8
-GLPI est une application libre, destinée à la gestion de parc
-informatique et de helpdesk.
-
-GLPI est composé d'un ensemble de services web écrits en PHP qui
-permettent de recenser et de gérer l'intégralité des composantes
-matérielles ou logicielles d'un parc informatique, et ainsi
-d'optimiser le travail des techniciens grâce à une maintenance plus
-cohérente.
-
-Les fonctionnalités principales de l'application s'articulent autour
-des axes suivants :
-
-- Inventaire des ordinateurs, périphériques, réseau, imprimantes et
-  consommables associés.
-
-- Gestion des licences (acquises, à acquérir, sites, oem..) et des
-  dates d'expiration.
+# bad depsolver
+%define		_noautopear	pear
+# exclude optional php dependencies
+%define		_noautophp	php-ldap php-sodium
 
-- Affectation du matériel par zone géographique (salle, étage...).
+# put it together for rpmbuild
+%define		_noautoreq	%{?_noautophp} %{?_noautopear}
 
-- Gestion des informations commerciales et financières (achat,
-  garantie et extension, amortissement).
-
-- Gestion des états de matériel.
-
-- Gestion des demandes d'intervention pour tous les types de matériel
-  de l'inventaire.
-
-- Interface utilisateur finale pour demande d'intervention.
-
-- Gestion des entreprises, contrats, documents liés aux éléments
-  d'inventaires...
-
-- Réservation de matériel.
+%description
+GLPI is an open source IT Asset Management, issue tracking system and
+service desk solution. It provides ITIL compliant features for managing
+IT infrastructure, tracking issues, creating forms, and managing
+inventory.
+
+Key features include:
+- IT asset management (computers, software, printers, network equipment)
+- Issue tracking and service desk with ITIL processes
+- Financial and contract management
+- Knowledge base
+- Administrative and financial management of IT assets
+- Automatic inventory via agents
 
-- Gestion d'un sytème de base de connaissances hiérarchique (FAQ) ,
-  gestion d'une FAQ publique.
+%description -l fr.UTF-8
+GLPI est une application libre de gestion de parc informatique et de
+helpdesk. GLPI est composé d'un ensemble de services web écrits en PHP
+qui permettent de recenser et de gérer l'intégralité des composantes
+matérielles ou logicielles d'un parc informatique, et ainsi d'optimiser
+le travail des techniciens grâce à une maintenance plus cohérente.
 
-- Génération de rapports sur le matériel, de rapports réseau, de
-  rapports sur les interventions.
+%description -l pl.UTF-8
+GLPI to otwarty system zarządzania zasobami IT, śledzenia zgłoszeń i
+obsługi helpdesku. Oferuje funkcjonalność zgodną z ITIL do zarządzania
+infrastrukturą IT, śledzenia problemów, tworzenia formularzy i
+zarządzania inwentarzem.
+
+Główne funkcje obejmują:
+- zarządzanie zasobami IT (komputery, oprogramowanie, drukarki,
+  urządzenia sieciowe)
+- system śledzenia zgłoszeń i helpdesk z procesami ITIL
+- zarządzanie finansami i umowami
+- bazę wiedzy
+- automatyczną inwentaryzację przez agentów
+
+%package setup
+Summary:	GLPI setup package
+Summary(pl.UTF-8):	Pakiet do wstępnej konfiguracji GLPI
+Group:		Applications/WWW
+Requires:	%{name} = %{version}-%{release}
 
-Utilisée conjointement avec un logiciel d'inventaire automatique comme
-OCS Inventory NG, vous disposerez d'une solution puissante
-d'inventaire et gestion de parc avec mises à jour automatique des
-configurations.
+%description setup
+Install this package to configure initial GLPI installation. You
+should uninstall this package when you're done, as it considered
+insecure to keep the setup files in place.
 
-%description -l pl.UTF-8
-GLPI to zarządca zasobów informacyjnych z dodatkowym interfejsem
-administracyjnym. Można go wykorzystać do stworzenia bazy danych z
-inwentarzem firmy (komputery, oprogramowanie, drukarki...). Ma
-rozszerzone funkcje ułatwiające codzienne życie administratorom, takie
-jak system śledzenie zadań z powiadamianiem pocztowym oraz tworzenie
-bazy danych z podstawowymi informacjami o topologii sieci.
-
-Podstawowe funkcje aplikacji obejmują:
-- dokładny inwentarz zasobów technicznych; cała ich charakterystyka
-  jest przechowywana w bazie danych
-
-- zarządzanie i historia zadań administracyjnych oraz związanych z
-  nimi procedur. Ta aplikacja jest dynamiczna i związana bezpośrednio z
-  użytkownikami, którzy mogą wysyłać żądania do techników. Interfejs po
-  zautoryzowaniu tych drugich pokazuje im zgłoszony problem wraz z
-  jednym z powiązanych z nimi zasobów technicznych, do których mają
-  dostęp.
+%description setup -l pl.UTF-8
+Ten pakiet należy zainstalować w celu wstępnej konfiguracji GLPI po
+pierwszej instalacji. Potem należy go odinstalować, jako że
+pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
 
 %prep
 %setup -q -n %{name}
-rm -r ./lib/tiny_mce
 
-cat > apache.conf <<'EOF'
-Alias /%{name} %{_appdir}
-<Directory %{_appdir}>
-	Allow from all
-</Directory>
-EOF
+# fix env shebangs
+%{__sed} -i -e '1s,^#!/usr/bin/env php,#!/usr/bin/php,' bin/console
+find vendor -type f '(' -name '*.php' -o -name 'cam' -o -name 'patch-type-declarations' \
+	-o -name 'var-dump-server' -o -name 'generate_vcards' -o -name 'vobject' \
+	-o -name 'generate-defuse-key' -o -name 'html-to-markdown' -o -name 'validate' \
+	-o -name 'refresh_hw_sources' -o -name 'build_hw_jsons' -o -name 'convert' \
+	-o -name 'generate-factory-for-class' -o -name 'generate-deps-for-config-factory' \
+	-o -name 'jsonlint' -o -name 'import-cldr-data' -o -name 'export-plural-rules' ')' \
+	-print0 | xargs -0 -r %{__sed} -i -e '1s,^#!/usr/bin/env php,#!/usr/bin/php,'
+find vendor -type f '(' -name 'naturalselection' -o -name 'sabredav' ')' \
+	-print0 | xargs -0 -r %{__sed} -i -e '1s,^#!/usr/bin/env sh,#!/bin/sh,'
+find vendor -type f -name 'naturalselection' \
+	-print0 | xargs -0 -r %{__sed} -i -e '1s,^#!/usr/bin/env python,#!/usr/bin/python3,'
+
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/lib/%{name}}
-
-cp -a *.php COPYING.txt $RPM_BUILD_ROOT%{_appdir}
-cp -aR {ajax,css,front,inc,install,js,lib,locales,pics,plugins,scripts,sound,vendor} $RPM_BUILD_ROOT%{_appdir}
-for dir in config files; do
-  cp -aR ${dir} $RPM_BUILD_ROOT/var/lib/%{name}/${dir}
-  ln -s /var/lib/%{name}/${dir} $RPM_BUILD_ROOT%{_appdir}/${dir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/etc/{cron.d,logrotate.d}}
+install -d $RPM_BUILD_ROOT/var/{log/%{name},lib/%{name}}
+
+# install application files
+cp -a ajax bin config css dependency_injection front inc install lib locales marketplace plugins public resources routes src templates vendor $RPM_BUILD_ROOT%{_appdir}
+cp -p index.html LICENSE README.md CHANGELOG.md $RPM_BUILD_ROOT%{_appdir}
+cp -a version $RPM_BUILD_ROOT%{_appdir}
+
+# symlink files/ -> /var/lib/glpi (writable data)
+ln -s ../../../var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
+
+# create writable data subdirectories
+for dir in _cache _cron _dumps _graphs _inventories _locales _lock _log marketplace _pictures _plugins _rss _sessions _themes _tmp _uploads; do
+	install -d $RPM_BUILD_ROOT/var/lib/%{name}/${dir}
 done
 
-#TODO patch
-ln -s %{_datadir}/tinymce $RPM_BUILD_ROOT%{_appdir}/lib/tiny_mce
+# install downstream config (redirects GLPI to our config dir)
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/inc/downstream.php
 
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-#install lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+# symlink local_define.php into app config dir where GLPI hardcodes the load path
+# (SystemConfigurator loads root_dir/config/local_define.php before downstream.php)
+ln -s %{_sysconfdir}/local_define.php $RPM_BUILD_ROOT%{_appdir}/config/local_define.php
 
-rm $RPM_BUILD_ROOT/var/lib/%{name}/files/_*/remove.txt
+# install config files
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/local_define.php
+:> $RPM_BUILD_ROOT%{_sysconfdir}/config_db.php
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+if [ "$1" = "1" ]; then
+%banner %{name} <<EOF
+GLPI has been installed. To complete setup:
+1. Create a MySQL/MariaDB database for GLPI
+2. Navigate to http://yourhost/glpi/ to run the web installer
+3. After setup, remove the glpi-setup package:
+   rpm -e glpi-setup
+EOF
+fi
+
+%triggerpostun -- %{name} < %{version}-%{release}
+%banner %{name} -e <<EOF
+GLPI has been upgraded to %{version}. Run the database migration:
+  su -s /bin/sh http -c "php %{_appdir}/bin/console db:update"
+  su -s /bin/sh http -c "php %{_appdir}/bin/console cache:clear"
+EOF
+
 %triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
 
@@ -193,32 +213,60 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGELOG.md README.md apirest.md
-%dir %attr(750,root,http) %{_sysconfdir}
+%doc README.md CHANGELOG.md
+%dir %attr(770,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local_define.php
+%attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/config_db.php
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %dir %{_appdir}
-%attr(770,root,http) %dir /var/lib/%{name}
-# displayed in app
-%{_appdir}/COPYING.txt
-%{_appdir}/*.php
+%{_appdir}/LICENSE
+%{_appdir}/README.md
+%{_appdir}/CHANGELOG.md
+%{_appdir}/index.html
+%{_appdir}/version
 %{_appdir}/ajax
-%dir %{_appdir}/config
-%attr(770,root,http) %dir /var/lib/%{name}/config
-/var/lib/%{name}/config/.htaccess
+%{_appdir}/config
 %{_appdir}/css
+%{_appdir}/dependency_injection
 %{_appdir}/files
-%attr(711,root,http) %dir /var/lib/%{name}/files
-/var/lib/%{name}/files/.htaccess
-%attr(770,root,http) %dir /var/lib/%{name}/files/_*
 %{_appdir}/front
 %{_appdir}/inc
-%{_appdir}/install
-%{_appdir}/js
 %{_appdir}/lib
 %{_appdir}/locales
-%{_appdir}/pics
+%{_appdir}/marketplace
 %{_appdir}/plugins
-%{_appdir}/scripts
-%{_appdir}/sound
+%{_appdir}/public
+%{_appdir}/resources
+%{_appdir}/routes
+%{_appdir}/src
+%{_appdir}/templates
 %{_appdir}/vendor
+%dir %{_appdir}/bin
+%attr(755,root,root) %{_appdir}/bin/console
+%exclude %{_appdir}/install
+%dir %attr(770,root,http) /var/lib/%{name}
+%dir %attr(770,root,http) /var/lib/%{name}/_cache
+%dir %attr(770,root,http) /var/lib/%{name}/_cron
+%dir %attr(770,root,http) /var/lib/%{name}/_dumps
+%dir %attr(770,root,http) /var/lib/%{name}/_graphs
+%dir %attr(770,root,http) /var/lib/%{name}/_inventories
+%dir %attr(770,root,http) /var/lib/%{name}/_locales
+%dir %attr(770,root,http) /var/lib/%{name}/_lock
+%dir %attr(770,root,http) /var/lib/%{name}/_log
+%dir %attr(770,root,http) /var/lib/%{name}/_pictures
+%dir %attr(770,root,http) /var/lib/%{name}/_plugins
+%dir %attr(770,root,http) /var/lib/%{name}/_rss
+%dir %attr(770,root,http) /var/lib/%{name}/_sessions
+%dir %attr(770,root,http) /var/lib/%{name}/_themes
+%dir %attr(770,root,http) /var/lib/%{name}/_tmp
+%dir %attr(770,root,http) /var/lib/%{name}/_uploads
+%dir %attr(770,root,http) /var/lib/%{name}/marketplace
+%dir %attr(770,root,http) /var/log/%{name}
+
+%files setup
+%defattr(644,root,root,755)
+%{_appdir}/install
diff --git a/downstream.php b/downstream.php
new file mode 100644
index 0000000..10c940f
--- /dev/null
+++ b/downstream.php
@@ -0,0 +1,2 @@
+<?php
+define('GLPI_CONFIG_DIR', '/etc/webapps/glpi/');
diff --git a/glpi-apache.conf b/glpi-apache.conf
new file mode 100644
index 0000000..9afd154
--- /dev/null
+++ b/glpi-apache.conf
@@ -0,0 +1,36 @@
+#
+# GLPI - IT Asset Management
+#
+
+Alias /glpi /usr/share/glpi/public
+<Directory /usr/share/glpi/public>
+	<IfModule mod_rewrite.c>
+		RewriteEngine On
+		RewriteCond %{REQUEST_FILENAME} !-f
+		RewriteRule ^(.*)$ index.php [QSA,L]
+	</IfModule>
+	<IfModule !mod_rewrite.c>
+		FallbackResource /glpi/index.php
+	</IfModule>
+
+	<IfModule mod_authz_core.c>
+		# Apache 2.4
+		Require all granted
+	</IfModule>
+	<IfModule !mod_authz_core.c>
+		# Apache 1.3, 2.x
+		Order allow,deny
+		Allow from all
+	</IfModule>
+</Directory>
+
+# Deny access to non-public directories
+<Directory /usr/share/glpi>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+	<IfModule !mod_authz_core.c>
+		Order deny,allow
+		Deny from all
+	</IfModule>
+</Directory>
diff --git a/glpi-lighttpd.conf b/glpi-lighttpd.conf
new file mode 100644
index 0000000..1de4150
--- /dev/null
+++ b/glpi-lighttpd.conf
@@ -0,0 +1,11 @@
+# GLPI - IT Asset Management
+
+alias.url += (
+    "/glpi" => "/usr/share/glpi/public",
+)
+
+$HTTP["url"] =~ "^/glpi/" {
+    url.rewrite-if-not-file = (
+        "^/glpi/(.*)$" => "/glpi/index.php?$1",
+    )
+}
diff --git a/glpi.cron b/glpi.cron
new file mode 100644
index 0000000..8c3b31b
--- /dev/null
+++ b/glpi.cron
@@ -0,0 +1,5 @@
+# vim:ft=crontab
+MAILTO=root
+
+# GLPI scheduled task
+*/5 * * * * http /usr/bin/php /usr/share/glpi/front/cron.php >/dev/null 2>&1
diff --git a/glpi.logrotate b/glpi.logrotate
new file mode 100644
index 0000000..c920ba5
--- /dev/null
+++ b/glpi.logrotate
@@ -0,0 +1,9 @@
+/var/log/glpi/*.log {
+	su root http
+	missingok
+	notifempty
+	rotate 14
+	weekly
+	compress
+	create 660 root http
+}
diff --git a/local_define.php b/local_define.php
new file mode 100644
index 0000000..f909de3
--- /dev/null
+++ b/local_define.php
@@ -0,0 +1,4 @@
+<?php
+define('GLPI_VAR_DIR', '/var/lib/glpi');
+define('GLPI_LOG_DIR', '/var/log/glpi');
+define('GLPI_MARKETPLACE_DIR', '/var/lib/glpi/marketplace');
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glpi.git/commitdiff/ef6ca23218e86191ad1f2d2b05103cfc4ec3508b



More information about the pld-cvs-commit mailing list