Re: Personalised patches in ports

2007-11-26 Thread Roland Smith
On Mon, Nov 26, 2007 at 09:06:45AM +, Matthew Seaman wrote:
> > 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.

It hasn't aborted on me yet. But these days I tend to keep my own
patches separately, and re-apply them if necessary after a
portsnap. Just to make sure I don't screw things up. :-/

Having said that, I usually try to get changes accepted into the
official ports tree if possible. Saves a lot of hassle.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpKoMN65TzDp.pgp
Description: PGP signature


Re: Personalised patches in ports

2007-11-26 Thread RW
On Mon, 26 Nov 2007 09:06:45 +
Matthew Seaman <[EMAIL PROTECTED]> wrote:


> '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.  

There are clear warnings that 'portsnap extract' will delete extra
files, but not for 'portsnap update'. And my recollection, from when I
briefly tried portsnap, is that it leaves derived files, like
README.html, untouched. So I guess that after the initial extract is
done  portsnap behaves like csup in this respect.

I think the main difference between csup and 'portsnap update' is in
the way they handle files that are under CVS, such as port makefiles.
csup always removes changes, which I like because I know where I stand.
I think with portsnap it depends on the CVS history.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Personalised patches in ports

2007-11-26 Thread Matthew Seaman
-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-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Personalised patches in ports

2007-11-25 Thread Roland Smith
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. 

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpXZaicgH11p.pgp
Description: PGP signature


Re: Personalised patches in ports

2007-11-25 Thread RW
On Mon, 26 Nov 2007 11:52:31 +0700 (ICT)
Olivier Nicole <[EMAIL PROTECTED]> 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?
>
c[v]sup only deletes files that have been deleted under cvs - other
files are left alone. The only risk is in choosing a patch filename
that previously been used by the port maintainer, but that's easy to
avoid.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Personalised patches in ports

2007-11-25 Thread Olivier Nicole
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?

Best regards,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Personalised patches in ports

2007-11-23 Thread Bob
On Fri, 23 Nov 2007 03:20:11 +
RW <[EMAIL PROTECTED]> wrote:
>... 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:

Wonderful! 

That worked Thanks loads

Bob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Personalised patches in ports

2007-11-22 Thread RW
On Wed, 21 Nov 2007 22:19:55 +
Bob <[EMAIL PROTECTED]> wrote:

> 
> Hi folks:
> 
> What is the approved method of applying personalised patches to ports
> sources?
> 
> A current example, which was no problem under Linux, is giving me a
> bit of a hassle under FreeBSD>
> 
> I use pdftotext extensively to translate pdf files to ascii text.
> Sometimes, a publicly posted PDF file has it's security option turned
> on, making pdftotext refuse to translate the file into text. 
> 
> It's a simple hack on the source code to skip security checking, and
> under Linux I just patch the sources to not check for same.
> 
> 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:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"