public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH v2 1/2] man/portage.5: Add userpatch documentation
@ 2021-04-11  1:23 Nekun
  2021-04-11  1:23 ` [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation Nekun
  0 siblings, 1 reply; 3+ messages in thread
From: Nekun @ 2021-04-11  1:23 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Nekun

Signed-off-by: Nekun <nekokun@firemail.cc>
---
Also document eapply|eapply_user|PATCHES and fix override logic description

 man/portage.5 | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/man/portage.5 b/man/portage.5
index 247ec5ab0..257dc9d17 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -78,6 +78,9 @@ site-specific overrides of \fB/etc/portage/make.profile/\fR
 .BR /etc/portage/sets/
 user\-defined package sets
 .TP
+.BR /etc/portage/patches/
+user-provided patches to packages
+.TP
 .BR /var/db/repos/gentoo/
 .nf
 sets.conf
@@ -1375,6 +1378,34 @@ Also see \fB/var/lib/portage/world_sets\fR and the \fBemerge\fR(1)
 \fB\-\-list\-sets\fR option.
 .RE
 .TP
+.BR /etc/portage/patches/
+.RS
+In this directory patches to the package source tree can be created.
+For each package, patches are taken from these subdirectories in the
+following order:
+.nr step 1 1
+.IP \n[step]. 3
+/etc/portage/patches/${CATEGORY}/${P}-${PR}[:${SLOT}]
+.IP \n+[step].
+/etc/portage/patches/${CATEGORY}/${P}[:${SLOT}]
+.IP \n+[step].
+/etc/portage/patches/${CATEGORY}/${PN}[:${SLOT}]
+.RE 2
+
+Patches from more-specific directories overrides patches from less-specific,
+i.e. if patches with the same name coexist in different directories matches
+same package, only patch from directory matches the first matching pattern
+will be applied. Patches for each package are applied in the POSIX
+lexicographic order. Patch file name must end in ".patch" or, for
+\fBEAPI\fR >= \fB6\fR, in ".diff".
+
+If package ebuild uses \fBEAPI\fR <= \fB5\fR, it must explicitly invoke
+\fBepatch_user\fR or inherit \fBepatch.eclass\fR(5) and rely on default
+\fBsrc_prepare\fR for apply patches. Otherwise, patches are silently
+ignored. If package ebuild uses \fBEAPI\fR >= \fB6\fR, applying user
+patches is mandatory.
+.RE
+.TP
 .BR /var/db/repos/gentoo/
 .RS
 .TP
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation
  2021-04-11  1:23 [gentoo-portage-dev] [PATCH v2 1/2] man/portage.5: Add userpatch documentation Nekun
@ 2021-04-11  1:23 ` Nekun
  2021-04-25  3:43   ` Zac Medico
  0 siblings, 1 reply; 3+ messages in thread
From: Nekun @ 2021-04-11  1:23 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Nekun

Signed-off-by: Nekun <nekokun@firemail.cc>
---
 man/ebuild.5 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/man/ebuild.5 b/man/ebuild.5
index 1afa59eef..460fc0069 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -799,6 +799,11 @@ Beginning with \fBEAPI 4\fR, an array or space\-delimited list of documentation
 files for the default src_install function to install using dodoc. If
 undefined, a reasonable default list is used. See the documentation for
 src_install below.
+.TP
+.B PATCHES
+Beginning with \fBEAPI 6\fR, an array of patches for applying in the default
+\fIsrc_prepare\fR function using \fIeapply\fR.
+
 
 .SS "QA Control Variables:"
 .TP
@@ -1210,6 +1215,21 @@ message\fR is displayed.
 This function uncompresses and/or untars a list of sources into the current
 directory. The function will append \fIsource\fR to the \fBDISTDIR\fR variable.
 
+.SS "Prepare:"
+.TP
+.B eapply\fR \fI[patch options]\fR \fI<files|directories>
+Applies patches to the \fB${WORKDIR}\fR with specified options. Default patch level is \fI-p1\fR. If a directory specified, all patches from it with
+\fI.patch\fR or \fI.diff\fR suffix are applied.
+This function is available beginning with \fBEAPI 6\fR, replacing old
+\fBepatch.eclass\fR(5) functions.
+.TP
+.B eapply_user
+Applies user-provided patches to the \fB${WORKDIR}\fR from Portage config
+directory tree. For directory syntax and applying rules, see
+\fI/etc/portage/patches/\fR section in \fBportage\fR(5). This function is
+available beginning with \fBEAPI 6\fR, replacing old \fBepatch.eclass\fR(5)
+functions.
+
 .SS "Compile:"
 .TP
 .B econf\fR \fI[configure options]
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation
  2021-04-11  1:23 ` [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation Nekun
@ 2021-04-25  3:43   ` Zac Medico
  0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2021-04-25  3:43 UTC (permalink / raw
  To: gentoo-portage-dev, Nekun


[-- Attachment #1.1: Type: text/plain, Size: 282 bytes --]

On 4/10/21 6:23 PM, Nekun wrote:
> Signed-off-by: Nekun <nekokun@firemail.cc>
> ---
>  man/ebuild.5 | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
Thank you! I've merged these and noted it on the bug here:

https://bugs.gentoo.org/698244#c1

Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-25  3:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-11  1:23 [gentoo-portage-dev] [PATCH v2 1/2] man/portage.5: Add userpatch documentation Nekun
2021-04-11  1:23 ` [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation Nekun
2021-04-25  3:43   ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox