Re: Implicit use of versionator.eclass in ebuilds and eclasses (was: Re: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/)

2018-05-18 Thread M. J. Everitt
On 19/05/18 01:01, Andreas Sturmlechner wrote:
> On Freitag, 18. Mai 2018 23:53:06 CEST Michał Górny wrote:
>> One of the reasons we do mailing list reviews of widely used eclasses is
>> to let people tell you that you've left 'version_is_at_least' here.
> I see the error of my ways.
>
> Meanwhile, here's a list of packages implicitly using versionator.eclass 
> functions:
>
> eclasses:
>
> haskell-cabal.eclass
> mozextension.eclass
>
> ebuilds:
>
> app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild
> app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild
> app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild
> app-admin/rsyslog/rsyslog-8.34.0.ebuild
> app-admin/rsyslog/rsyslog-8.35.0.ebuild
> app-emulation/qemu/qemu-2.11.1-r2.ebuild
> app-emulation/qemu/qemu-2.11.1-r53.ebuild
> app-emulation/qemu/qemu-2.12.0.ebuild
> app-emulation/qemu/qemu-.ebuild
> dev-java/htmlparser-org/htmlparser-org-1.6.ebuild
> dev-java/vecmath/vecmath-1.6.0_pre12.ebuild
> dev-ruby/rspec-core/rspec-core-3.5.4.ebuild
> dev-ruby/rspec-core/rspec-core-3.6.0.ebuild
> dev-ruby/rspec-core/rspec-core-3.7.0.ebuild
> dev-ruby/rspec-core/rspec-core-3.7.1.ebuild
> dev-ruby/rspec-expectations/rspec-expectations-3.5.0.ebuild
> dev-ruby/rspec-expectations/rspec-expectations-3.6.0.ebuild
> dev-ruby/rspec-expectations/rspec-expectations-3.7.0.ebuild
> dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild
> dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild
> dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild
> dev-vcs/bzr/bzr-2.7.1_pre.ebuild
> net-fs/samba/samba-4.2.14.ebuild
> net-fs/samba/samba-4.5.16.ebuild
> net-fs/samba/samba-4.6.15.ebuild
> net-fs/samba/samba-4.7.7.ebuild
> net-fs/samba/samba-4.8.1.ebuild
> net-fs/samba/samba-4.8.2.ebuild
> net-misc/openvswitch/openvswitch-2.7.2.ebuild
> net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
> net-misc/openvswitch/openvswitch-2.8.1.ebuild
> sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
> sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild
> sys-kernel/mips-sources/mips-sources-4.13.16.ebuild
> sys-kernel/mips-sources/mips-sources-4.4.110.ebuild
> sys-kernel/mips-sources/mips-sources-4.9.75.ebuild
>
>
>
>
Can that be parsed into a list of (unique) maintainers to ping maybe?

Someone might have to pick up any maintainer-needed ones I s'pose.



signature.asc
Description: OpenPGP digital signature


Implicit use of versionator.eclass in ebuilds and eclasses (was: Re: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/)

2018-05-18 Thread Andreas Sturmlechner
On Freitag, 18. Mai 2018 23:53:06 CEST Michał Górny wrote:
> One of the reasons we do mailing list reviews of widely used eclasses is
> to let people tell you that you've left 'version_is_at_least' here.

I see the error of my ways.

Meanwhile, here's a list of packages implicitly using versionator.eclass 
functions:

eclasses:

haskell-cabal.eclass
mozextension.eclass

ebuilds:

app-admin/rsyslog/rsyslog-8.28.0-r1.ebuild
app-admin/rsyslog/rsyslog-8.32.0-r4.ebuild
app-admin/rsyslog/rsyslog-8.33.1-r1.ebuild
app-admin/rsyslog/rsyslog-8.34.0.ebuild
app-admin/rsyslog/rsyslog-8.35.0.ebuild
app-emulation/qemu/qemu-2.11.1-r2.ebuild
app-emulation/qemu/qemu-2.11.1-r53.ebuild
app-emulation/qemu/qemu-2.12.0.ebuild
app-emulation/qemu/qemu-.ebuild
dev-java/htmlparser-org/htmlparser-org-1.6.ebuild
dev-java/vecmath/vecmath-1.6.0_pre12.ebuild
dev-ruby/rspec-core/rspec-core-3.5.4.ebuild
dev-ruby/rspec-core/rspec-core-3.6.0.ebuild
dev-ruby/rspec-core/rspec-core-3.7.0.ebuild
dev-ruby/rspec-core/rspec-core-3.7.1.ebuild
dev-ruby/rspec-expectations/rspec-expectations-3.5.0.ebuild
dev-ruby/rspec-expectations/rspec-expectations-3.6.0.ebuild
dev-ruby/rspec-expectations/rspec-expectations-3.7.0.ebuild
dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild
dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild
dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild
dev-vcs/bzr/bzr-2.7.1_pre.ebuild
net-fs/samba/samba-4.2.14.ebuild
net-fs/samba/samba-4.5.16.ebuild
net-fs/samba/samba-4.6.15.ebuild
net-fs/samba/samba-4.7.7.ebuild
net-fs/samba/samba-4.8.1.ebuild
net-fs/samba/samba-4.8.2.ebuild
net-misc/openvswitch/openvswitch-2.7.2.ebuild
net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
net-misc/openvswitch/openvswitch-2.8.1.ebuild
sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild
sys-kernel/mips-sources/mips-sources-4.13.16.ebuild
sys-kernel/mips-sources/mips-sources-4.4.110.ebuild
sys-kernel/mips-sources/mips-sources-4.9.75.ebuild






[gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/

2018-05-18 Thread Michał Górny
W dniu pią, 18.05.2018 o godzinie 20∶36 +, użytkownik Andreas
Sturmlechner napisał:
> commit: d780c05e4459175eb314c82de9f3b998e2b4fc6e
> Author: Andreas Sturmlechner  gentoo  org>
> AuthorDate: Thu May 10 20:42:15 2018 +
> Commit: Andreas Sturmlechner  gentoo  org>
> CommitDate: Fri May 18 20:36:12 2018 +
> URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d780c05e
> 
> cmake-utils.eclass: Switch to eapi7-ver
> 
>  eclass/cmake-utils.eclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
> index 3302f27608b..cbce280625e 100644
> --- a/eclass/cmake-utils.eclass
> +++ b/eclass/cmake-utils.eclass
> @@ -109,11 +109,11 @@ case ${EAPI} in
>   *) die "EAPI=${EAPI:-0} is not supported" ;;
>  esac
>  
> -inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing versionator 
> xdg-utils
> +inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils
>  
>  case ${EAPI} in
>   7) ;;
> - *) inherit eutils multilib ;;
> + *) inherit eapi7-ver eutils multilib ;;
>  esac
>  
>  EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
> @@ -512,7 +512,7 @@ cmake-utils_src_configure() {
>   # we need to add ""
>   local includes=
>   if [[ ${PN} == cmake ]] ; then
> - if $(version_is_at_least 3.4.0 $(get_version_component_range 
> 1-3 ${PV})) ; then
> + if $(version_is_at_least 3.4.0 $(ver_cut 1-3 ${PV})) ; then

One of the reasons we do mailing list reviews of widely used eclasses is
to let people tell you that you've left 'version_is_at_least' here.

>   includes=""
>   fi
>   elif ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1 ; then
> 

-- 
Best regards,
Michał Górny




[gentoo-portage-dev] [PATCH] preinst_selinux_labels: disable LD_PRELOAD sandbox (bug 655996)

2018-05-18 Thread Zac Medico
Since SELinux does not allow LD_PRELOAD across domain transitions.
disable the LD_PRELOAD sandbox for preinst_selinux_labels.

Bug: https://bugs.gentoo.org/655996
---
 pym/_emerge/EbuildPhase.py | 37 +-
 pym/_emerge/MiscFunctionsProcess.py|  6 +-
 pym/portage/package/ebuild/doebuild.py | 26 +---
 3 files changed, 60 insertions(+), 9 deletions(-)

diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py
index 890b17870..9795bec13 100644
--- a/pym/_emerge/EbuildPhase.py
+++ b/pym/_emerge/EbuildPhase.py
@@ -275,7 +275,7 @@ class EbuildPhase(CompositeTask):
# when FEATURES=compress-build-logs is enabled.
fd, logfile = tempfile.mkstemp()
os.close(fd)
-   post_phase = 
MiscFunctionsProcess(background=self.background,
+   post_phase = 
_PostPhaseCommands(background=self.background,
commands=post_phase_cmds, 
fd_pipes=self.fd_pipes,
logfile=logfile, phase=self.phase, 
scheduler=self.scheduler,
settings=settings)
@@ -405,3 +405,38 @@ class EbuildPhase(CompositeTask):
log_path = self.settings.get("PORTAGE_LOG_FILE")
self.scheduler.output(msg, log_path=log_path,
background=background)
+
+
+class _PostPhaseCommands(CompositeTask):
+
+   __slots__ = ("fd_pipes", "logfile", "phase", "settings", "commands",
+   "_remaining_cmds")
+
+   def _start(self):
+   if isinstance(self.commands, list):
+   self._remaining_cmds = [({}, self.commands)]
+   else:
+   self._remaining_cmds = list(reversed(self.commands))
+
+   if 'selinux' not in self.settings.features:
+   self._remaining_cmds = [(kwargs, commands) for kwargs, 
commands in
+   self._remaining_cmds if not 
kwargs.get('selinux_only')]
+
+   self._start_phase_cmds()
+
+   def _start_phase_cmds(self, previous=None):
+   if previous is not None:
+   if not self._remaining_cmds:
+   self._default_final_exit(previous)
+   self._async_wait()
+   return
+   elif self._default_exit(previous) != os.EX_OK:
+   self._async_wait()
+   return
+
+   kwargs, commands = self._remaining_cmds.pop()
+
+   
self._start_task(MiscFunctionsProcess(background=self.background,
+   commands=commands, fd_pipes=self.fd_pipes,
+   logfile=self.logfile, phase=self.phase, 
scheduler=self.scheduler,
+   settings=self.settings, **kwargs), 
self._start_phase_cmds)
diff --git a/pym/_emerge/MiscFunctionsProcess.py 
b/pym/_emerge/MiscFunctionsProcess.py
index 99cf5983f..89fd22635 100644
--- a/pym/_emerge/MiscFunctionsProcess.py
+++ b/pym/_emerge/MiscFunctionsProcess.py
@@ -13,7 +13,7 @@ class MiscFunctionsProcess(AbstractEbuildProcess):
Spawns misc-functions.sh with an existing ebuild environment.
"""
 
-   __slots__ = ('commands',)
+   __slots__ = ('commands', 'ld_preload_sandbox')
 
def _start(self):
settings = self.settings
@@ -29,6 +29,10 @@ class MiscFunctionsProcess(AbstractEbuildProcess):
AbstractEbuildProcess._start(self)
 
def _spawn(self, args, **kwargs):
+   # If self.ld_preload_sandbox is None, default to free=False,
+   # in alignment with the spawn(free=False) default.
+   kwargs.setdefault('free', False if self.ld_preload_sandbox is 
None
+   else not self.ld_preload_sandbox)
 
if self._dummy_pipe_fd is not None:
self.settings["PORTAGE_PIPE_FD"] = 
str(self._dummy_pipe_fd)
diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index 31b552ff3..499492b94 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1722,13 +1722,25 @@ _post_phase_cmds = {
"install_symlink_html_docs",
"install_hooks"],
 
-   "preinst" : [
-   "preinst_sfperms",
-   "preinst_selinux_labels",
-   "preinst_suid_scan",
-   "preinst_qa_check",
-   ],
-
+   "preinst" : (
+   (
+   {
+   "ld_preload_sandbox": False,
+   "selinux_only": True,
+   },
+   [
+   "preinst_selinux_labels",
+