Re: Patching with diff. files

"Julian H. Stacey" <[email protected]> Fri, 01 Apr 2011 21:38:44 +0200
Newsgroups gmane.mail.majordomo.general
Organization http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany
Message-ID <[email protected]>
Dale Riegle wrote:
> Hi all,
> 
> I am trying to add MajorCool (1.3.2) to a new installation of Majordomo 
> (1.94.5).
> 
> The documentation I have indicates that I need to apply  some patches to 
> Majordomo to add functionality from MajorCool.
> 
> The Majorcool distribution includes several diff.* files but I do not 
> know what to do with them.
> 
> diff.config_parse.pl
> diff.majordomo
> diff.resend
> diff.sample.cf
> diff.auto_cache
> 
> Do I need to edit these files manually?

Disclaimer: I havent used majorcool, but I've generated & used
patches for loads of other code for years, so in general this should
point you in the right direction:

patch files are generated by the diff program
	eg diff -c old_refernce/program/main.c new_version/program/main.c \
		> main.c.diff
	Try:	man diff
	Try lightly editing some file, & generating your own patch file 
	with 'diff' to understand the output format.

patch files are applied by a prohram called patch,
	the patch program automatically extracts the name of the
	source file to be patched from the patch file.
	The patch program can also strip directory prefixes with -p
	Try:	man patch

	cd new_version/program ; patch -p2 < where_my_patches_are/main.c.diff

PS http://freebsd.org handles patches for people, by :
	cd /usr/ports/mail/majorcool ; make ; make install
probably whatever modern Unix, Linux etc systems you are using, there' likely
some automatic build wrappers for sources, thatv its name may vary,
but they'll likely all be using 'patch' underneath.

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Mail plain text;  Not quoted-printable, Not HTML, Not base 64.
 Reply below text sections not at top, to avoid breaking cumulative context.