Ad Widget

Collapse

How to create a patch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rickardp
    Junior Member
    • Dec 2004
    • 27

    #1

    How to create a patch

    There should be a sticky thread here where the procedure for creating a patch is documented.

    How do I go about creating a correct patch?
  • Arthur
    Member
    • May 2006
    • 31

    #2
    Yep including comment form Alex "How to comment it"

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #3
      Greetings,

      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.
      Unofficial Zabbix Developer

      Comment

      Working...