Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jul 18, 2019 4:03 am

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to apply patches
PostPosted: Thu Nov 25, 2004 3:26 am 

Joined: Sat Oct 23, 2004 10:03 am
Posts: 7
Where do you get the patches?
You can get the patches at Choose your current version and download the patch(es) to your running cacti directory.

Where to place the patches?
Have a look at the patch file. You will see something like
--- cacti-release-0.8.6/user_admin.php  2004-08-29 11:36:04.000000000 -0400
+++ cacti-unstable/user_admin.php       2004-11-02 00:28:15.000000000 -0500

This patch goes to the cacti main directory.
Often you will see something like
--- cacti-0.8.6b/lib/functions.php      2004-10-06 22:20:35.000000000 -0400
+++ cacti-0.8.6b-new/lib/functions.php  2004-11-14 20:49:56.000000000 -0500

Put this patch into cacti ./lib/ directory.

How to apply the patch?
Ok, I only know how to patch for linux. There is (or at least: should be) a programm called patch. cd to the requested directory, e.g. the cacti ./lib/ directory. Then apply the patch via
patch < filename_of_the_patch_you_want_to_apply

What will look strange?
Sometimes, you will see
    # patch < xml_import_error_reporting.patch
    patching file config_arrays.php
    can't find file to patch at input line 26
    Perhaps you should have used the -p or --strip option?
    The text leading up to this was:
    |diff -ruBbd cacti-0.8.6b/lib/import.php cacti-0.8.6b-new/lib/import.php
    |--- cacti-0.8.6b/lib/import.php 2004-10-06 22:20:35.000000000 -0400
    |+++ cacti-0.8.6b-new/lib/import.php 2004-11-17 17:55:28.000000000 -0500
    File to patch:
Answer with the requested filename
    File to patch: ../lib/import.php
    patching file ../lib/import.php
(All file names in italics will vary according to the specific patch)

What, if patch applied in incorrect order?
If there are 2 or more patches going to the same file, the line numbers used may not match exactly. You will see
    # patch < cdef_similar_data_sources.patch
    patching file rrd.php
    Hunk #1 succeeded at 802 (offset 4 lines).
    Hunk #3 succeeded at 823 (offset 4 lines).
    Hunk #5 succeeded at 847 (offset 4 lines).

That's fine, you should not be worried.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 7 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group