*BSD News Article 91151


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!arclight.uoregon.edu!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Question about making patches
Date: 15 Mar 1997 22:38:14 GMT
Organization: Private BSD site, Dresden
Lines: 46
Message-ID: <5gf8cm$p8@uriah.heep.sax.de>
References: <3328B540.41C67EA6@iamerica.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37120

Matthew Kiser <mkiser@iamerica.net> wrote:

> I want to know how to make a patch.

Basically, by

	diff -c oldfile newfile

or

	diff -u oldfile newfile

If it's more than one file, you can also diff directories:

	diff -u -r olddir newdir

>  I've made some changes to xbiff,
> such as the ability to play audio files instead of that boring beep,
> the ability to fork off your mail program, and XPM support.  I would
> like to contribute these, so I need to make a patch.

Well, if this means a diff to add to an existing FreeBSD port, do it
this way:

	cd /usr/ports/x11/xbiff
	make configure
	cd work/xbiff
	cp -p myfile.c myfile.c.orig
	vi myfile.c			# edit what you need
	diff -u myfile.c.orig myfile.c > ../../patches/patch-xy

patch-xy is the next patch in sequence that would fit there.  Repeat
the above for any files you had to patch.  If you have been adding a
new file, use /dev/null as the source.  You might squash more than a
single patch into one file (by using >>), but it's wise to only put
related diffs into a single file.

When you're done, submit the new patch files to the maintainer of the
port.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)