Apply patch
Last updated
Was this helpful?
Last updated
Was this helpful?
Service support give you a file, the extension can be patch
or diff
Example : bug-fix.diff
Go to apply patch section
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
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
Move the previously created file to the root folder of GLPI.
Go to the GLPI root folder
cd
Go the previously created file to the root folder of the plugin
Go to the root folder of the plugin
cd
To known if it installed, just find the version of the binary patch installed
If it installed you should have this
If not you should have this
Install it with this command
Ubuntu/Debian
CentOS/RHEL
Before appling patch, you have to test it with this command and parameter --dry-run
In case of a success you should have this
or this
You can now apply the patch for real with this command
Congratulation the patch is applied !
Now you have to test this patch, feel free to give us a feedback
In case of an error you should have this
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)
To cancel a patch, enter the command :