Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2017 09:11:20 +0200
From:      Stefan Esser <se@freebsd.org>
To:        koobs@FreeBSD.org, Russell Haley <russ.haley@gmail.com>
Cc:        doc@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: Porters Handbook section 4.4
Message-ID:  <9a7b7e17-d4c8-6a22-76ea-70aa303b6c9d@freebsd.org>
In-Reply-To: <7b2f2464-5c35-e24a-2047-838c1a9e96a3@FreeBSD.org>
References:  <CABx9NuSC=tVieJ=dk6%2BFucvfEfNGHCRMuHcy%2BNxo9QW%2BtS8-gA@mail.gmail.com> <8a3e663a-d94f-0ef7-bbc7-8ebaa111f6dd@FreeBSD.org> <CABx9NuS6ie6fVwMh68wpRmRE6MsuGDfKQgLdVVZaeL_HJrKVOg@mail.gmail.com> <7b2f2464-5c35-e24a-2047-838c1a9e96a3@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 26.09.17 um 08:21 schrieb Kubilay Kocak:
> In section:
> 
> 4.4. Patching
> 
> - Add new section (at/numbered 4.4.2)
>   - Name: Automatic Patch Generation
> - Renumber sections (4.4.2 -> 4.4.3)
> 
> Text:
> 
> The ports framework provides a {{{makepatch}} target, which when run,
> automatically creates correctly named and formatted patch files in the
> correct location. The general process is as follows:
> 
> % cd <port directory>
> % make patch
> 
> Note: In the general case, {{{make patch}} is used (not just {{{make
> extract}}} to extract the DISTFILES), because ports that contain
> existing patches need to have the patches applied so that they are also
> generated (regenerated) in the last step.
> 
> ```
> % cd work/<directory> (WRKSRC)
> ```
> 
> At this point, make the source changes in WRKSRC:
> 
> ```
> % cp <file> <file>.orig

Do not perform this copy operation, IF the .orig file does already exist
(from the earlier "make patch" step).

I'd also use "cp -p" to preserve the original modification time, which
will be included in the patch ...

Else, your change will be against a patched file, without the patch that
lead to this state being conserved.

Regards, STefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9a7b7e17-d4c8-6a22-76ea-70aa303b6c9d>