From owner-freebsd-questions@FreeBSD.ORG Mon Nov 26 09:07:26 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1723016A41B for ; Mon, 26 Nov 2007 09:07:26 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 772F113C4DB for ; Mon, 26 Nov 2007 09:07:25 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from lack-of-gravitas.thebunker.net (gateway.ash.thebunker.net [213.129.64.4]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.1/8.14.1) with ESMTP id lAQ96kH1037770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Nov 2007 09:06:51 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <474A8CA5.60300@infracaninophile.co.uk> Date: Mon, 26 Nov 2007 09:06:45 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.6 (X11/20071101) MIME-Version: 1.0 To: Olivier Nicole , fbsd06@mlists.homeunix.com, bob@tania.servebbs.org, freebsd-questions@freebsd.org References: <20071121221955.10f80f09@tania.servebbs.org> <20071123032011.57dcfc96@gumby.homeunix.com.> <200711260452.lAQ4qVuN098618@banyan.cs.ait.ac.th> <20071126072727.GA3259@slackbox.xs4all.nl> In-Reply-To: <20071126072727.GA3259@slackbox.xs4all.nl> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [81.187.76.162]); Mon, 26 Nov 2007 09:06:54 +0000 (GMT) X-Virus-Scanned: ClamAV 0.91.2/4915/Mon Nov 26 07:43:40 2007 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_FAIL autolearn=no version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on happy-idiot-talk.infracaninophile.co.uk Cc: Subject: Re: Personalised patches in ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2007 09:07:26 -0000 -----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-----