Re: [gentoo-portage-dev] [PATCH] Allow ESYSROOT and BROOT in the pkg_setup phase

2019-08-13 Thread Zac Medico
On 8/11/19 6:51 AM, James Le Cuirot wrote:
> From: Michał Górny 
> 
> This follows a recent change to PMS.
> 
> Signed-off-by: James Le Cuirot 
> ---
>  lib/portage/package/ebuild/config.py | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> Sending this on behalf of mgorny as requested.
> 
> diff --git a/lib/portage/package/ebuild/config.py 
> b/lib/portage/package/ebuild/config.py
> index 83a15b370..e0dda54d4 100644
> --- a/lib/portage/package/ebuild/config.py
> +++ b/lib/portage/package/ebuild/config.py
> @@ -2820,12 +2820,13 @@ class config(object):
>   if not eapi_exports_merge_type(eapi):
>   mydict.pop("MERGE_TYPE", None)
>  
> - src_phase = _phase_func_map.get(phase, '').startswith('src_')
> + src_like_phase = (phase == 'setup' or
> + _phase_func_map.get(phase, 
> '').startswith('src_'))
>  
> - if not (src_phase and eapi_attrs.sysroot):
> + if not (src_like_phase and eapi_attrs.sysroot):
>   mydict.pop("ESYSROOT", None)
>  
> - if not (src_phase and eapi_attrs.broot):
> + if not (src_like_phase and eapi_attrs.broot):
>   mydict.pop("BROOT", None)
>  
>   # Prefix variables are supported beginning with EAPI 3, or when
> 

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f28d32f298d4b089a2e36bebca2a55b6aeabe2a3
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support

2019-08-13 Thread Kent Fredric
On Tue, 13 Aug 2019 20:39:01 +0100
James Le Cuirot  wrote:

> Unfortunately there's currently no way to say that the versions of a
> package across BDEPEND, DEPEND, and RDEPEND must be (roughly?) equal so
> there's nothing to stop an ancient Perl in / building a module for a
> newer Perl in ROOT but that's a problem that goes far beyond Perl.
> Cross-compiling Perl modules is still a bit of a car crash anyway.

I'd imagine that for CC, you'd need all perl modules installed to
BDEPEND _and_ DEPEND _AND_ RDEPEND,

Because the configure stage runs Makefile.PL on the host perl, and it
checks the existence of all "runtime" and "compile time" dependencies
itself, and it does this by *loading* them into the host perl.

Failure to load them on the host perl produces lots of warnings in the
best of cases, and errors in the worst of cases.


pgp_nMQcqcogr.pgp
Description: OpenPGP digital signature


[gentoo-portage-dev] [PATCH v2] portage/glsa.py: only check for revisions based on GLSA DTD

2019-08-13 Thread Aaron Bauman
* All GLSA's have been converted to use the revision attribute
* If there is no count attribute then raise a GlsaFormatException
* Ensure the attribute is an integer

Signed-off-by: Aaron Bauman 
---
 lib/portage/glsa.py | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py
index ccf93439d..f94e9834d 100644
--- a/lib/portage/glsa.py
+++ b/lib/portage/glsa.py
@@ -528,25 +528,20 @@ class Glsa:
self.synopsis = 
getText(myroot.getElementsByTagName("synopsis")[0], format="strip")
self.announced = 
format_date(getText(myroot.getElementsByTagName("announced")[0], 
format="strip"))
 
-   # Support both formats of revised:
-   # December 30, 2007: 02
+   # Support only format defined in GLSA DTD
# 2007-12-30
revisedEl = myroot.getElementsByTagName("revised")[0]
self.revised = getText(revisedEl, format="strip")
count = revisedEl.getAttribute("count")
if not count:
-   if self.revised.find(":") >= 0:
-   (self.revised, count) = self.revised.split(":")
-   else:
-   count = 1
-
-   self.revised = format_date(self.revised)
+   raise GlsaFormatException("Invalid revision attribute 
in GLSA: " + myroot.getAttribute("id"))
 
try:
self.count = int(count)
except ValueError:
-   # TODO should this raise a GlsaFormatException?
-   self.count = 1
+   raise GlsaFormatException("Revision attribute in GLSA: 
" + myroot.getAttribute("id") + " is not an integer")
+
+   self.revised = format_date(self.revised)
 
# now the optional and 0-n toplevel, #PCDATA tags and references
try:
-- 
2.22.0




[gentoo-portage-dev] [PATCH] portage/glsa.py: only check for revisions based on GLSA DTD

2019-08-13 Thread Aaron Bauman
* All GLSA's have been converted to use the revision attribute
* Only check that the revision attribute is populated which defaults to 1 from
tooling (e.g. GLSAMaker)
* If there is no count attribute then raise a GlsaFormatException
* Remove 'try' logic as we already check if the attribute is populated
* We only check if the attribute is populated. Whether it is an int or not is
not a concern as it is only significant to security team.

Signed-off-by: Aaron Bauman 
---
 lib/portage/glsa.py | 14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py
index ccf93439d..f0ce34f3f 100644
--- a/lib/portage/glsa.py
+++ b/lib/portage/glsa.py
@@ -528,26 +528,16 @@ class Glsa:
self.synopsis = 
getText(myroot.getElementsByTagName("synopsis")[0], format="strip")
self.announced = 
format_date(getText(myroot.getElementsByTagName("announced")[0], 
format="strip"))
 
-   # Support both formats of revised:
-   # December 30, 2007: 02
+   # Support only format defined in GLSA DTD
# 2007-12-30
revisedEl = myroot.getElementsByTagName("revised")[0]
self.revised = getText(revisedEl, format="strip")
count = revisedEl.getAttribute("count")
if not count:
-   if self.revised.find(":") >= 0:
-   (self.revised, count) = self.revised.split(":")
-   else:
-   count = 1
+   raise GlsaFormatException("Invalid revision attribute 
in GLSA: " + myroot.getAttribute("id"))
 
self.revised = format_date(self.revised)
 
-   try:
-   self.count = int(count)
-   except ValueError:
-   # TODO should this raise a GlsaFormatException?
-   self.count = 1
-
# now the optional and 0-n toplevel, #PCDATA tags and references
try:
self.access = 
getText(myroot.getElementsByTagName("access")[0], format="strip")
-- 
2.22.0




Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Michael Orlitzky
On 8/13/19 3:15 PM, Lars Wendler wrote:
> 
> I'm not really sure what the impact might be. I have only one single
> apache installation and that is a productive one. I do not want to mess
> with that installation.
> 

I'm not trying to hassle you, but now's the time to get it right. The
old enewuser method would leave an existing directory alone, but (to
support homedir/permission fixes in new revisions) acct-user.eclass will
modify the ownership and permissions of an existing directory. As a
result, it's especially important that we not choose a sensitive homedir
and enforce permissions/ownership that we might not really need.



Re: [gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support

2019-08-13 Thread James Le Cuirot
On Wed, 14 Aug 2019 03:43:12 +1200
ken...@gentoo.org wrote:

> From: Andreas K. Hüttel 
> 
> Signed-off-by: Andreas K. Hüttel 
> ---
>  eclass/perl-module.eclass | 30 +++---
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
> index 20b9947caca..81f79992d76 100644
> --- a/eclass/perl-module.eclass
> +++ b/eclass/perl-module.eclass
> @@ -44,61 +44,61 @@ esac
>  case ${EAPI:-0} in
>   5)
>   [[ ${CATEGORY} == perl-core ]] && \
>   PERL_EXPF+=" pkg_postinst pkg_postrm"
>  
>   case "${GENTOO_DEPEND_ON_PERL:-yes}" in
>   yes)
>   case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in
>   yes)
>   DEPEND="dev-lang/perl:=[-build(-)]"
>   ;;
>   *)
>   DEPEND="dev-lang/perl[-build(-)]"
>   ;;
>   esac
>   RDEPEND="${DEPEND}"
>   ;;
>   esac
>  
>   case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in
>   yes)
>   EXPORT_FUNCTIONS ${PERL_EXPF}
>   ;;
>   no)
>   debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no"
>   ;;
>   *)
>   die 
> "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported 
> by perl-module.eclass"
>   ;;
>   esac
>   ;;
> - 6)
> + 6|7)
>   [[ ${CATEGORY} == perl-core ]] && \
>   PERL_EXPF+=" pkg_postinst pkg_postrm"
>  
>   case "${GENTOO_DEPEND_ON_PERL:-yes}" in
>   yes)
>   DEPEND="dev-lang/perl:="
>   RDEPEND="dev-lang/perl:="
>   ;;
>   noslotop)
>   DEPEND="dev-lang/perl"
>   RDEPEND="dev-lang/perl"
>   ;;
>   esac
>  
>   if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
> - eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in 
> EAPI=6. If you don't want a slot operator"
> + eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in 
> EAPI=6 and later. If you don't want a slot operator"
>   die"set GENTOO_DEPEND_ON_PERL=noslotop instead."
>   fi
>  
>   if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
> - eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in 
> EAPI=6. Use perl-module.eclass if you need"
> + eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 
> and later. Use perl-module.eclass if you need"
>   die"phase functions, perl-functions.eclass if not."
>   fi
>  
>   EXPORT_FUNCTIONS ${PERL_EXPF}
>   ;;
>   *)
>   die "EAPI=${EAPI:-0} is not supported by perl-module.eclass"
>   ;;

First off, I don't think the SLOT operator in DEPEND actually does
anything? I believe it's only meaningful for RDEPEND?

Apart from that, I would say that dev-lang/perl should go in BDEPEND
too, again without the SLOT operator. You need to execute Perl to build
Perl modules, right? Whether it's also needed in DEPEND is a little
more nuanced. For modules including native code, yes definitely. For
others, maybe not but it's not worth complicating things here.

Unfortunately there's currently no way to say that the versions of a
package across BDEPEND, DEPEND, and RDEPEND must be (roughly?) equal so
there's nothing to stop an ancient Perl in / building a module for a
newer Perl in ROOT but that's a problem that goes far beyond Perl.
Cross-compiling Perl modules is still a bit of a car crash anyway.

Regards,
-- 
James Le Cuirot (chewi)
Gentoo Linux Developer


pgpKWUALqcWLE.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Lars Wendler
On Tue, 13 Aug 2019 14:43:11 -0400 Michael Orlitzky wrote:

>On 8/13/19 2:30 PM, Lars Wendler wrote:
>> 
>> If we leave ACCT_USER_HOME empty HOME will be set to
>> /dev/null for apache user. I don't know if this is what we want.
>I'm not 100% sure either, but it's pretty likely that if an unwritable
>root-owned home directory would work, then so would /dev/null.
>
>(It works fine on our web servers, but nothing is actually running as
>"apache" on them.)
>

I'm not really sure what the impact might be. I have only one single
apache installation and that is a productive one. I do not want to mess
with that installation.

Lars

-- 
Lars Wendler
Gentoo package maintainer
GPG: 21CC CF02 4586 0A07 ED93  9F68 498F E765 960E 9B39


pgpuXDFFFkNsa.pgp
Description: Digitale Signatur von OpenPGP


Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Michael Orlitzky
On 8/13/19 2:30 PM, Lars Wendler wrote:
> 
> If we leave ACCT_USER_HOME empty HOME will be set to
> /dev/null for apache user. I don't know if this is what we want.
I'm not 100% sure either, but it's pretty likely that if an unwritable
root-owned home directory would work, then so would /dev/null.

(It works fine on our web servers, but nothing is actually running as
"apache" on them.)



Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Lars Wendler
On Tue, 13 Aug 2019 14:21:29 -0400 Michael Orlitzky wrote:

>On 8/13/19 1:53 PM, Lars Wendler wrote:
>> 
>> thanks for the review. I've force-pushed the acct-user/apache commit
>> with ACCT_USER_HOME_OWNER being set to root:root.
>> 
>
>Is there any benefit to
>
>  ACCT_USER_HOME=/var/www
>  ACCT_USER_HOME_OWNER=root:root
>
>versus
>
>  keepdir /var/www
>
>in the eclass?

If we leave ACCT_USER_HOME empty HOME will be set to
/dev/null for apache user. I don't know if this is what we want.

>I think root:root is correct for /var/www, but setting it explicitly
>will clobber any existing permissions that the administrator or other
>packages have set. For example, if my web developers have write access
>to /var/www via group membership, then when I install acct-user/apache,
>/var/www will get set back to root:root with mode 755 and they'll be
>locked out temporarily.
>

Lars

-- 
Lars Wendler
Gentoo package maintainer
GPG: 21CC CF02 4586 0A07 ED93  9F68 498F E765 960E 9B39




pgpBT1OmrG_18.pgp
Description: Digitale Signatur von OpenPGP


Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Michael Orlitzky
On 8/13/19 1:53 PM, Lars Wendler wrote:
> 
> thanks for the review. I've force-pushed the acct-user/apache commit
> with ACCT_USER_HOME_OWNER being set to root:root.
> 

Is there any benefit to

  ACCT_USER_HOME=/var/www
  ACCT_USER_HOME_OWNER=root:root

versus

  keepdir /var/www

in the eclass?

I think root:root is correct for /var/www, but setting it explicitly
will clobber any existing permissions that the administrator or other
packages have set. For example, if my web developers have write access
to /var/www via group membership, then when I install acct-user/apache,
/var/www will get set back to root:root with mode 755 and they'll be
locked out temporarily.



Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Mike Gilbert
On Tue, Aug 13, 2019 at 1:39 PM Michael Orlitzky  wrote:
>
> On 8/13/19 1:14 PM, Lars Wendler wrote:
> > I would like to reserve UID/GID 81 for apache (www-servers/apache).
> >
> > This is the historical UID/GID for apache user in Gentoo.
> > Fedora and RedHat use UID/GID 48. Arch Linux has no
> > "apache" user but a "http" user with UID/GID 33 (which is already
> > reserved in Gentoo).
> >
> > Here are the commits for possible review:
> > https://github.com/Polynomial-C/gentoo/commits/accts-apache
> >
>
> By setting /var/www as apache's home directory, we're going to wind up
> with /var/www being owned by apache:root.

The ebuild sets ACCT_USER_HOME_OWNER=root:root.



Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Lars Wendler
Hi Michael,

On Tue, 13 Aug 2019 13:39:34 -0400 Michael Orlitzky wrote:

>On 8/13/19 1:14 PM, Lars Wendler wrote:
>> I would like to reserve UID/GID 81 for apache (www-servers/apache).
>> 
>> This is the historical UID/GID for apache user in Gentoo.
>> Fedora and RedHat use UID/GID 48. Arch Linux has no
>> "apache" user but a "http" user with UID/GID 33 (which is already
>> reserved in Gentoo).
>> 
>> Here are the commits for possible review:
>> https://github.com/Polynomial-C/gentoo/commits/accts-apache
>> 
>
>By setting /var/www as apache's home directory, we're going to wind up
>with /var/www being owned by apache:root. That's not quite right, for a
>couple reasons:
>
>  * The anonymous website user shouldn't be able to delete the entire
>web hierarchy using e.g. a wordpress exploit.
>
>  * Every other web server wants to share /var/www, too.
>
>For example, www-servers/cherokee wants /var/www to be the home
>directory for the cherokee user, as does www-servers/ocsigenserver.
>Hiawatha stores stuff under /var/www/hiawatha, and just about everybody
>uses /var/www/localhost for the default vhost.
>
>Thinking ahead -- would anything bad happen if we left the home
>directory at its default? I don't think our default apache config needs
>to own /var/www for any reason, but I'm not certain.
>

thanks for the review. I've force-pushed the acct-user/apache commit
with ACCT_USER_HOME_OWNER being set to root:root.

Lars
-- 
Lars Wendler
Gentoo package maintainer
GPG: 21CC CF02 4586 0A07 ED93  9F68 498F E765 960E 9B39


pgpxFTpbrWbP2.pgp
Description: Digitale Signatur von OpenPGP


Re: [gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Michael Orlitzky
On 8/13/19 1:14 PM, Lars Wendler wrote:
> I would like to reserve UID/GID 81 for apache (www-servers/apache).
> 
> This is the historical UID/GID for apache user in Gentoo.
> Fedora and RedHat use UID/GID 48. Arch Linux has no
> "apache" user but a "http" user with UID/GID 33 (which is already
> reserved in Gentoo).
> 
> Here are the commits for possible review:
> https://github.com/Polynomial-C/gentoo/commits/accts-apache
> 

By setting /var/www as apache's home directory, we're going to wind up
with /var/www being owned by apache:root. That's not quite right, for a
couple reasons:

  * The anonymous website user shouldn't be able to delete the entire
web hierarchy using e.g. a wordpress exploit.

  * Every other web server wants to share /var/www, too.

For example, www-servers/cherokee wants /var/www to be the home
directory for the cherokee user, as does www-servers/ocsigenserver.
Hiawatha stores stuff under /var/www/hiawatha, and just about everybody
uses /var/www/localhost for the default vhost.

Thinking ahead -- would anything bad happen if we left the home
directory at its default? I don't think our default apache config needs
to own /var/www for any reason, but I'm not certain.



[gentoo-dev] RFC: UID/GID assignment for apache (81)

2019-08-13 Thread Lars Wendler
I would like to reserve UID/GID 81 for apache (www-servers/apache).

This is the historical UID/GID for apache user in Gentoo.
Fedora and RedHat use UID/GID 48. Arch Linux has no
"apache" user but a "http" user with UID/GID 33 (which is already
reserved in Gentoo).

Here are the commits for possible review:
https://github.com/Polynomial-C/gentoo/commits/accts-apache

-- 
Lars Wendler
Gentoo package maintainer
GPG: 21CC CF02 4586 0A07 ED93  9F68 498F E765 960E 9B39


pgpwEDbny_POL.pgp
Description: Digitale Signatur von OpenPGP


[gentoo-dev] [PATCH 2/2] perl-module.class: Enable EAPI=7 support

2019-08-13 Thread kentnl
From: Andreas K. Hüttel 

Signed-off-by: Andreas K. Hüttel 
---
 eclass/perl-module.eclass | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 20b9947caca..81f79992d76 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,19 +1,19 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: perl-module.eclass
 # @MAINTAINER:
 # p...@gentoo.org
 # @AUTHOR:
 # Seemant Kulleen 
 # Andreas K. Hüttel 
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: eclass for installing Perl module distributions
 # @DESCRIPTION:
 # The perl-module eclass is designed to allow easier installation of Perl
 # module distributions, and their incorporation into the Gentoo Linux system.
 # All exported functions from perl-functions.eclass (inherited here)
 # explicitly also belong to the interface of perl-module.eclass.
 # If your package does not use any Perl-specific build system (as, e.g.,
 # ExtUtils::MakeMaker or Module::Build), we recommend to use 
perl-functions.eclass
 # instead.
@@ -21,12 +21,12 @@
 case ${EAPI:-0} in
5)
inherit eutils multiprocessing unpacker perl-functions
PERL_EXPF="src_unpack src_prepare src_configure src_compile 
src_test src_install"
;;
-   6)
+   6|7)
inherit multiprocessing perl-functions
PERL_EXPF="src_prepare src_configure src_compile src_test 
src_install"
;;
*)
die "EAPI=${EAPI} is not supported by perl-module.eclass"
;;
@@ -44,61 +44,61 @@ esac
 case ${EAPI:-0} in
5)
[[ ${CATEGORY} == perl-core ]] && \
PERL_EXPF+=" pkg_postinst pkg_postrm"
 
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes)
case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in
yes)
DEPEND="dev-lang/perl:=[-build(-)]"
;;
*)
DEPEND="dev-lang/perl[-build(-)]"
;;
esac
RDEPEND="${DEPEND}"
;;
esac
 
case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in
yes)
EXPORT_FUNCTIONS ${PERL_EXPF}
;;
no)
debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no"
;;
*)
die 
"PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by 
perl-module.eclass"
;;
esac
;;
-   6)
+   6|7)
[[ ${CATEGORY} == perl-core ]] && \
PERL_EXPF+=" pkg_postinst pkg_postrm"
 
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes)
DEPEND="dev-lang/perl:="
RDEPEND="dev-lang/perl:="
;;
noslotop)
DEPEND="dev-lang/perl"
RDEPEND="dev-lang/perl"
;;
esac
 
if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
-   eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in 
EAPI=6. If you don't want a slot operator"
+   eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in 
EAPI=6 and later. If you don't want a slot operator"
die"set GENTOO_DEPEND_ON_PERL=noslotop instead."
fi
 
if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
-   eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in 
EAPI=6. Use perl-module.eclass if you need"
+   eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 
and later. Use perl-module.eclass if you need"
die"phase functions, perl-functions.eclass if not."
fi
 
EXPORT_FUNCTIONS ${PERL_EXPF}
;;
*)
die "EAPI=${EAPI:-0} is not supported by perl-module.eclass"
;;
@@ -107,43 +107,43 @@ esac
 LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
 
 # @ECLASS-VARIABLE: DIST_NAME
 # @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override PN for the calculation of 
S,
+# (EAPI=6 and later) This variable provides a way to override PN for the 
calculation of S,
 # SRC_URI, and HOMEPAGE. Defaults to PN.
 
 # @ECLASS-VARIABLE: DIST_VERSION
 # 

[gentoo-dev] [PATCH 1/2] perl-functions.eclass: Add EAPI=7 support

2019-08-13 Thread kentnl
From: Andreas K. Hüttel 

Signed-off-by: Andreas K. Hüttel 
---
 eclass/perl-functions.eclass | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e7775f31b8e..e6168a07534 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -1,26 +1,26 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: perl-functions.eclass
 # @MAINTAINER:
 # p...@gentoo.org
 # @AUTHOR:
 # Seemant Kulleen 
 # Andreas K. Huettel 
 # Kent Fredric 
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: helper functions eclass for perl modules
 # @DESCRIPTION:
 # The perl-functions eclass is designed to allow easier installation of perl
 # modules, and their incorporation into the Gentoo Linux system.
 # It provides helper functions, no phases or variable manipulation in
 # global scope.
 
 [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
 
 case "${EAPI:-0}" in
-   5|6)
+   5|6|7)
;;
*)
die "EAPI=${EAPI} is not supported by perl-functions.eclass"
;;
@@ -130,70 +130,70 @@ perl_delete_emptybsdir() {
 # @FUNCTION: perl_fix_packlist
 # @DESCRIPTION:
 # Look through ${D} for .packlist text files containing the temporary 
installation
 # folder (i.e. ${D}). If the pattern is found, silently replace it with `/'.
 # Remove duplicate entries; then validate all entries in the packlist against 
${D}
 # and prune entries that do not correspond to installed files.
 perl_fix_packlist() {
debug-print-function $FUNCNAME "$@"
 
local packlist_temp="${T}/.gentoo_packlist_temp"
find "${D}" -type f -name '.packlist' -print0 | while read -rd '' f ; do
if file "${f}" | grep -q -i " text" ; then
 einfo "Fixing packlist file /${f#${D}}"
 
# remove the temporary build dir path
-   sed -i -e "s:${D}:/:g" "${f}"
+   sed -i -e "s:${D%/}/:/:g" "${f}"
 
# remove duplicate entries
sort -u "${f}" > "${packlist_temp}"
mv "${packlist_temp}" "${f}"
 
# remove files that dont exist
cat "${f}" | while read -r entry; do
if [ ! -e "${D}/${entry}" ]; then
einfo "Pruning surplus packlist entry 
${entry}"
grep -v -x -F "${entry}" "${f}" > 
"${packlist_temp}"
mv "${packlist_temp}" "${f}"
fi
done
fi
done
 }
 
 # @FUNCTION: perl_remove_temppath
 # @DESCRIPTION:
 # Look through ${D} for text files containing the temporary installation
 # folder (i.e. ${D}). If the pattern is found, replace it with `/' and warn.
 perl_remove_temppath() {
debug-print-function $FUNCNAME "$@"
 
find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
if file "${f}" | grep -q -i " text" ; then
grep -q "${D}" "${f}" && ewarn "QA: File contains a 
temporary path ${f}"
-   sed -i -e "s:${D}:/:g" "${f}"
+   sed -i -e "s:${D%/}/:/:g" "${f}"
fi
done
 }
 
 # @FUNCTION: perl_rm_files
 # @USAGE: 
 # @DESCRIPTION:
 # Remove certain files from a Perl release and remove them from the MANIFEST
 # while we're there.
 #
 # Most useful in src_prepare for nuking bad tests, and is highly recommended
 # for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what they
 # test is completely irrelevant to end users, and frequently fail simply
 # because the authors of Test::Pod... changed their recommendations, and thus
 # failures are only useful feedback to Authors, not users.
 #
 # Removing from MANIFEST also avoids needless log messages warning
 # users about files "missing from their kit".
 #
 # Example:
 # @CODE
 # src_test() {
 #   perl_rm_files t/pod{,-coverage}.t
 #   perl-module_src_test
 # }
 # @CODE
-- 
2.22.0




[gentoo-dev] [PATCH 0/2] EAPI7 Support for perl-{functions,module}.eclass

2019-08-13 Thread kentnl
From: Kent Fredric 

These are already committed to tree [ :( ] just relaying to the list
for added oversight/feedback and to make sure any EAPI7 specific
changes like BROOT/BDEPENDS etc get checked off before widespread usage
starts happening.

Any follow-up submissions will be relayed to the list on top of this
series.

Andreas K. Hüttel (2):
  perl-functions.eclass: Add EAPI=7 support
  perl-module.class: Enable EAPI=7 support

-- 
2.22.0




[gentoo-dev] RFC: UID/GID assignment for knot (53)

2019-08-13 Thread Pierre-Olivier Mercier
I would like to reserve UID/GID 53 for knot (net-dns/knot).

The UID and GID 53 are assigned by Fedora to tomcat, which is currently
265 on Gentoo; and nsfnobody by RedHat (along with 65 and 4).

The knot user and group don't have any fixed UID/GID on others
distributions. 53 is the ID initially defined by Ondřej Surý for this
package.

Pending PR: https://github.com/gentoo/gentoo/pull/12481

-- 
Pierre-Olivier "nemunaire" Mercier


signature.asc
Description: PGP signature


[gentoo-dev] [PATCH] kernel-2.eclass: Inherit python-any-r1 only in deblob branch

2019-08-13 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/kernel-2.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 1b2b5d3e8b60..d672b295c37c 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -193,7 +193,7 @@
 
 PYTHON_COMPAT=( python{2_6,2_7} )
 
-inherit toolchain-funcs python-any-r1
+inherit toolchain-funcs
 [[ ${EAPI:-0} == [012345] ]] && inherit epatch
 [[ ${EAPI:-0} == [0123456] ]] && inherit estack eapi7-ver
 case ${EAPI:-0} in
@@ -621,6 +621,8 @@ if [[ ${ETYPE} == sources ]]; then
kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
K_DEBLOB_AVAILABLE=1
if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then
+   inherit python-any-r1
+
IUSE="${IUSE} deblob"
 
# Reflect that kernels contain firmware blobs unless 
otherwise
-- 
2.23.0.rc2




Re: [gentoo-dev] [PATCH] xorg-3.eclass: Add XORG_TARBALL_SUFFIX

2019-08-13 Thread Ulrich Mueller
> On Tue, 13 Aug 2019, Michael Orlitzky wrote:

> The devmanual is probably wrong,

>   https://bugs.gentoo.org/485356

> but no one agrees on how exactly to change it.

Thanks for reminding us of that bug. :) Read my comments #13 and #16.

Ulrich


signature.asc
Description: PGP signature