LogoLogo
DownloadGLPI ChangelogPricesGLPI Webiste45-day free trial
  • Welcome
  • FAQ
  • FAQ Plugins
  • Tutorials
  • Videos
  • Most popular
    • Setting up Oauth IMAP Entra
    • Customise my logo
    • Setting up Oauth SMTP Entra
  • Account and subscription
    • Subscribe to GLPI cloud
  • Authentication
    • Activate sso
    • Authenticate with local LDAP
    • Integrate GLPI Network Cloud and LDAPS (Entra)
    • Setting up LDAP
  • Automatic actions
    • Setting up automatic actions
    • Check automatic actions
  • General
    • Setting up your calendar
    • Managing dashboards
    • Fields unicity
  • Helpdesk
    • Add a task
    • Add changes
    • Creating ITIL Category
    • Add an external planning
    • Managing problems
    • Add a pending reason
    • Creating Templates for Tickets
    • Using survey satisfaction
    • Setting up Service levels (SLA)
  • Inventory
    • Using blacklist
    • Collect Data
    • Inventory Android smartphones
    • Computer inventory
    • Deploying agents via GPO
    • Deploy via GlpiInventory
    • Using impact analysis
    • Installing the GLPI agent Toolbox
    • Setting up mirror servers
    • Setting up remote inventory
    • Securing exchanges between GLPI agents <-> GLPI server
    • Inventory printers and network hardware
  • Knowledge
    • Overview
    • Search engine
  • My instance
    • Customise my logo
    • Final migration
    • Export local database
    • Export my data
    • Find out my address
    • Migrate my existing GLPI on GLPI Network Cloud
    • Privacy policy and GPRD
    • Rename my instance
    • Slowdown on my instance
  • Notifications
    • Setting up Oauth SMTP Entra
    • Oauth SMTP Google
    • Setup notifications
    • Reminders
  • Plugins
    • Install and update plugins
    • Marketplace
  • Procedures
    • Apply patch
    • Free up space on your database
    • Install GLPI on Ubuntu
    • Use Percona's tools for large GLPI databases
    • Registration key marketplace
  • Receivers
    • Setting up OAuth IMAP Google
    • Setting up receiver and tickets
    • Collect emails from Gmail
    • Setting up Oauth IMAP Entra
    • Receiver iCloud
    • Receiver and delegating mailboxes
    • Receiver Office365
  • Rules
    • Authorizations rules
    • Business rules for tickets
    • Rules engine and dictionaries
  • Tools
    • Manage your projects
    • rssfeed
Powered by GitBook
On this page
  • You have patch file
  • You have a commit number
  • You have PR number (Pull Request)
  • Apply patch
  • Patching GLPI
  • Patching a plugin
  • Check that the patch binary is installed
  • Cancel a patch

Was this helpful?

Edit on GitHub
Export as PDF
  1. Procedures

Apply patch

PreviousProceduresNextFree up space on your database

Last updated 2 months ago

Was this helpful?

LogoLogo

Social Media

  • GitHub
  • Instagram
  • LinkedIn
  • Facebook
  • Youtube
  • X
  • Reddit
  • Telegram

Category

  • FAQ
  • FAQ Plugins
  • Tutorials
  • Videos

Ressources

  • Download
  • GLPI Changelog
  • Prices
  • GLPI Website
  • 45-day free trial

©2025 - Teclib

You have patch file

Service support give you a file, the extension can be patch or diff

Example : bug-fix.diff

  • Go to apply patch section

You have a commit number

Service support give you this commit number ex: adc9876

  • First, you need to retrieve changes from commit

  • Go to https://github.com/glpi-project/glpi/commit/ + COMMIT_NUMBER

Example

https://github.com/glpi-project/glpi/commit/adc9876

  • Then, transform the commit into a patch by adding .diff at the end of url.

Like this https://github.com/glpi-project/glpi/commit/adc9876.diff

  • Copy the patch URL and run a wget on your GLPI server wget https://github.com/glpi-project/glpi/commit/adc9876.diff

Info

If it's a core patch, perform the wget directly at the root of GLPI. If it's a plugin patch, perform the wget directly in the folder of the plugin concerned. If you've done it elsewhere, the apply patch section will help you move it to the right place.Finally, go to apply patch section

You have PR number (Pull Request)

Service support give you a PR number 4770

  • First, you need to retrieve the PR

  • Go to https://github.com/glpi-project/glpi/pull/ + PR_NUMBER

Example

https://github.com/glpi-project/glpi/pull/4770

  • First , transform the PR into a patch by adding .diff at the end of url.

Like this https://github.com/glpi-project/glpi/pull/4770.diff

  • Copy the patch URL and run a wget on your GLPI server wget https://github.com/glpi-project/glpi/pull/4770.diff

Info

If it's a core patch, perform the wget directly at the root of GLPI. If it's a plugin patch, perform the wget directly in the folder of the plugin concerned. If you've done it elsewhere, the apply patch section will help you move it to the right place.

Finally, go to apply patch section

Apply patch


Patching GLPI

  • Move the previously created file to the root folder of GLPI.

  • Go to the GLPI root folder

cd


Patching a plugin

  • Go the previously created file to the root folder of the plugin

  • Go to the root folder of the plugin

cd


Check that the patch binary is installed

  • To known if it installed, just find the version of the binary patch installed

patch -v

If it installed you should have this

GNU patch 2.7.6
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Larry Wall and Paul Eggert

If not you should have this

command not found: patch
  • Install it with this command

Ubuntu/Debian

apt-get install patch

CentOS/RHEL

yum install patch

Test patch before apply it

  • Before appling patch, you have to test it with this command and parameter --dry-run

grep -v "phpunit/" buf-fix.diff | patch -p1 --dry-run

Test is successfull ✅

In case of a success you should have this

patching file inc/config.class.php

or this

patching file inc/config.class.php
Hunk #1 succeeded at 891 with fuzz 1 (offset 23 lines).
Hunk #2 succeeded at 1301 with fuzz 2 (offset 41 lines).
  • You can now apply the patch for real with this command

grep -v "phpunit/" buf-fix.diff | patch -p1

Congratulation the patch is applied !

Now you have to test this patch, feel free to give us a feedback


Test is failed ❌

In case of an error you should have this

patching file inc/config.class.php
Hunk #1 FAILED at 400.
1 out of 1 hunk FAILED -- saving rejects to file inc/config.class.php.rej

Many things can lead to failure :

  • Your version of GLPI is different from the version used to make the patch

  • The file that must be modified by the patch has already been previously

Contact support and explain your problem (do not hesitate to add screenshot, GLPI version, command used etc)


Cancel a patch

To cancel a patch, enter the command :

patch -p1 < bug-fix.diff -R

Alt text
Alt text
Alt text
Alt text