zhous's blog

How to create and use a patch in Linux

(Copy from http://www.cpqlinux.com/patch.html)

Creating a Patch File:


diff -Naur olddir newdir > new-patch

- or -

diff -Naur oldfile newfile >new-patch



A Note concerning Patch and the number of Directory Levels used:


Try to make sure when creating a patchfile that you have the same number of directories levels for both the olddir path and newdir path. For Ex:

--- old/modules/pcitable	Mon Sep 27 11:03:56 1999
+++ new/modules/pcitable	Tue Dec 19 20:05:41 2000

The above diff would work ok as a patch.

--- old/try1/other/modules/pcitable	Mon Sep 27 11:03:56 1999

integration of geeklog and webiso

  • Login user automatically with user's blazerid
  • In index.php check if $_SERVER['REMOTE_USER'] has been set (which means pubcookie authentication is enabled) and $_USER['uid'] hasn't been set (which means user hasn't logged in). If that is the case, redirect to users.php by setting a Refresh header. I have also tried the Location header, which always leads to a pubcookie error page saying the user has already loged in.

    In order to prevent user from seeing the blinking effect of redirecting, the php processing is terminated with exit() after setting the header.

Syndicate content