Applying a patch to a port

Vincent Hoffman vince at unsane.co.uk
Fri Sep 3 10:56:09 UTC 2010


 On 03/09/2010 08:53, bsd wrote:
> Hello, 
>
> I have a patch for clamav that was submited by a developer of clamav. 
> I don't know how to apply It to the source code of the port. 
>
> What I would like to do: 
>
> 1. Get the source code 
> 2. cd to the source directory 
> 3. Apply the patch 
> 4. Recompile 
> 5. Test 
>
> If this is ok, then as an option: 
>
> 6. validate changes & updates 
> 7. submit patch to the FBSD port
>
Not too hard, the infrastructure for patching ports is there already.

1) cd /usr/ports/catagory/portname  (obviously make this the port
directory you want
2) make patch (this will fetch the source if you need it  and extract it
and apply any patches already needed/supplied )
3) cd work (this is where the tarball is extracted.) and possibly into
the clamav-$version directory
4) apply  your patchfile :)
5)  cd back into the port directory
6) make (or make install if you want to install it.

All current patches are in the files directory of the port so you can
use them as a template for naming etc so the port can automatically use
you patch once your happy its working. The porters handbook is well
worth a look though if your planing on doing much with a port.
(http://www.freebsd.org/doc/en/books/porters-handbook/)


Vince
> Thanks for your support. 
>
>
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
> Gregober ---> PGP ID --> 0x1BA3C2FD
> bsd @at@ todoo.biz
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
>
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list