If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to REGISTER before you can post. To start viewing messages, select the forum that you want to visit from the selection below.
The best way to create a patch is to maintain two distinct versions of Zabbix. I usually have them listed as zabbix-<version> for the old versions and zabbix for the patched version. Then I make my changes in zabbix. Now, from there I take it one level further and create a zabbix_work, which is just a directory tree with symlinks to the files instead of the files themselves. The reason for the third is that I can run a full compile / test run in zabbix_work without corrupting the zabbix directory.
Once I am done with the changes and ready to create a patch, I cd to the parent directory where zabbix-<version> and zabbix are. In this directory, I run the command 'diff -ruN zabbix-<version> zabbix' and output the resulting patch to a file called zabbix-<version>-<brief description>.patch.txt.
The .txt extension is only required by vbulletin as it does not allow direct patch uploads.
If you are unfamiliar with diff, it is a simple program that compares two files / directories and prints out what has changed between them. The arguments that I use are for Recursive (r) which will descend into the directory tree, Unified (u) which will create a single patch file, and New (N) which tells it to also diff new files.
Comment