Personalised patches in ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Nov 26 01:07:26 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Roland Smith wrote:
> On Mon, Nov 26, 2007 at 11:52:31AM +0700, Olivier Nicole wrote:
>> Hi,
>>
>>>> How can I incorporate my patch into the portupgrade system, so that an
>>>> upgrade of Xpdf will apply my patch? If I download the bzip file,
>>>> apply the patch, re-bzip the sources, and then try to force an
>>>> upgrade, the checksum fails (as expected).
>>>>
>>>> How does one do thes properly?
>>> It's actually much easier than in Linux, since the ports system already
>>> has to do this. Each port has a files directory into which you can put
>>> patches, which will get applied automatically each time you build. See
>>> the porter's handbook for details:
>> But wouldn't that personnal patch file be erased by next cvsup of the
>> ports?
> 
> Not if you 'chflags schg,sunlnk' it. 

If you add another file into a ports' files directory that cvsup knows
nothing about, then cvsup will refuse to touch it.  No need for chflags
in that case.  If you need to make local modifications to a file already
in that directory, then yes, cvsup will replace it with the canonical
version next time you update.

'portsnap extract' or 'portsnap update' will however blow away local
additions in the part of the ports tree it is operating on -- there are
clear warnings to that effect in the man page.  chflags will preserve
your changes in this case, but my guess is that portsnap might well 
abort in the middle of what it's doing if it runs into an immutable file.

You could be exceedingly sneaky though and use a union mount -- keep a
pristine copy of the ports tree as the base layer, maintained by portsnap
or cvsup or how you will -- and keep all your modifications in an overlay.
See mount_unionfs(8) -- although this page still contains the 'BEWARE OF
THE DOG' warning on RELENG_6, I believe that the outstanding bugs with
unionfs have been fixed, and that it is now recognised as safe to use.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW, UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSoyl3jDkPpsZ+VYRA5hQAJ0aT4bf1MVDaDmLcmiT4zR0qdwApQCglcI5
1Vf1jMy474rTJemuPQY7zRA=
=qtP7
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list