[gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation

2021-04-09 Thread Nekun
Signed-off-by: Nekun 
---
// seems like previous message has wrong Message-Id, resending
Starting from EAPI6, this is a built-in Portage functionality, maybe it
was not included in Portage documentation eralier because it was epatch.eclass
functionality which is exclusive for gentoo repo, but according with today's
mandatory "eapply_user" it should be here.

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

diff --git a/man/portage.5 b/man/portage.5
index 247ec5ab0..083abd77e 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,24 @@ 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
+
+More-specific directories overrides less-specific, i.e. if more than one 
directory for the same package coexist, only patches 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




[gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation

2021-04-09 Thread Nekun

Signed-off-by: Nekun 
---
Starting from EAPI6, this is a built-in Portage functionality, maybe it 
was not included in Portage documentation earlier because it was 
epatch.eclass functionality which is exclusive for gentoo repo, but 
according with today's mandatory "eapply_user" it should be here.


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

diff --git a/man/portage.5 b/man/portage.5
index 247ec5ab0..083abd77e 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,24 @@ 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
+
+More-specific directories overrides less-specific, i.e. if more than 
one directory for the same package coexist, only patches 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




[gentoo-portage-dev] [PATCH] make.conf.5: Sugest PORTAGE_LOG_FILTER_FILE_CMD supervisor for cat fallback (bug 781854)

2021-04-09 Thread Zac Medico
If PORTAGE_LOG_FILTER_FILE_CMD fails after exec, then output
will be lost. Therefore, suggest to use bash as a supervisor,
with fallback to cat.

Bug: https://bugs.gentoo.org/781854
Signed-off-by: Zac Medico 
---
 man/make.conf.5 | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/man/make.conf.5 b/man/make.conf.5
index 8d551c95e..8a4a2ae30 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Feb 2021" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Apr 2021" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -998,7 +998,18 @@ will set idle io priority. For more information about 
ionice, see
 .B PORTAGE_LOG_FILTER_FILE_CMD
 This variable specifies a command that filters build log output to a
 log file. In order to filter ANSI escape codes from build logs,
-\fBansifilter\fR(1) is a convenient setting for this variable.
+\fBansifilter\fR(1) is a convenient setting for this variable. Generally,
+PORTAGE_LOG_FILTER_FILE_CMD should include a supervisor that falls back
+to cat if the real filter command fails after exec. For example, a
+supervisor is needed for ansifilter, in case it fails after exec due to
+a problem resolving libstdc++ during a gcc upgrade.
+.br
+.I Example:
+.nf
+# Use bash as a supervisor, for fallback to cat if asifilter fails
+# after exec due to a problem resolving libstdc++ during a gcc upgrade.
+PORTAGE_LOG_FILTER_FILE_CMD="bash -c \\"ansifilter; exec cat\\""
+.fi
 .TP
 .B PORTAGE_LOGDIR
 This variable defines the directory in which per\-ebuild logs are kept.
-- 
2.26.2