[gentoo-commits] proj/portage:master commit in: lib/portage/tests/util/, lib/portage/tests/ebuild/, /, ...

2024-08-03 Thread Zac Medico
commit: 8b5b5186965c47605ba004d317e8fd58e70e97cd
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug  3 21:33:41 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug  3 21:33:41 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b5b5186

_EbuildFetcherProcess: Handle SIGTERM

Fix _EbuildFetcherProcess to handle SIGTERM, so that FETCHCOMMAND
processes will not be left running in the background:

* Convert the fetch function to an async_fetch coroutine function
  so that it can use asyncio.CancelledError handlers to terminate
  running processes.

* Use multiprocessing.active_children() to detect and terminate
  any processes that asyncio.CancelledError handlers did not have
  an opportunity to terminate because the exception arrived too
  soon after fork/spawn.

* Add unit test to verify that a child process is correctly
  killed when EbuildFetcher is cancelled, with short timeout in
  case it takes some time for the process to disappear.

Bug: https://bugs.gentoo.org/936273
Signed-off-by: Zac Medico  gentoo.org>

 NEWS   |   3 +
 lib/_emerge/EbuildFetcher.py   |  68 ++
 lib/portage/package/ebuild/fetch.py| 102 -
 lib/portage/tests/ebuild/test_fetch.py | 100 +++-
 lib/portage/tests/util/test_socks5.py  |  16 --
 5 files changed, 257 insertions(+), 32 deletions(-)

diff --git a/NEWS b/NEWS
index 04ce6069db..3b71349508 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,9 @@ Bug fixes:
 * repository: config: Allow a repository to be configured using one of its
   aliases rather than its primary name (bug #935830).
 
+* emerge: Fix parallel-fetch to properly terminate FETCOMMAND processes when
+  needed, using a SIGTERM handler (bug #936273).
+
 portage-3.0.65 (2024-06-04)
 --
 

diff --git a/lib/_emerge/EbuildFetcher.py b/lib/_emerge/EbuildFetcher.py
index 81d4b1054b..994271236c 100644
--- a/lib/_emerge/EbuildFetcher.py
+++ b/lib/_emerge/EbuildFetcher.py
@@ -4,6 +4,8 @@
 import copy
 import functools
 import io
+import multiprocessing
+import signal
 import sys
 
 import portage
@@ -17,11 +19,12 @@ from portage.package.ebuild.fetch import (
 _check_distfile,
 _drop_privs_userfetch,
 _want_userfetch,
-fetch,
+async_fetch,
 )
 from portage.util._async.AsyncTaskFuture import AsyncTaskFuture
 from portage.util._async.ForkProcess import ForkProcess
 from portage.util._pty import _create_pty_or_pipe
+from portage.util.futures import asyncio
 from _emerge.CompositeTask import CompositeTask
 
 
@@ -34,6 +37,7 @@ class EbuildFetcher(CompositeTask):
 "logfile",
 "pkg",
 "prefetch",
+"pre_exec",
 "_fetcher_proc",
 )
 
@@ -253,6 +257,7 @@ class _EbuildFetcherProcess(ForkProcess):
 self._get_manifest(),
 self._uri_map,
 self.fetchonly,
+self.pre_exec,
 )
 ForkProcess._start(self)
 
@@ -263,7 +268,10 @@ class _EbuildFetcherProcess(ForkProcess):
 self._settings = None
 
 @staticmethod
-def _target(settings, manifest, uri_map, fetchonly):
+def _target(settings, manifest, uri_map, fetchonly, pre_exec):
+if pre_exec is not None:
+pre_exec()
+
 # Force consistent color output, in case we are capturing fetch
 # output through a normal pipe due to unavailability of ptys.
 portage.output.havecolor = settings.get("NOCOLOR") not in ("yes", 
"true")
@@ -273,17 +281,53 @@ class _EbuildFetcherProcess(ForkProcess):
 if _want_userfetch(settings):
 _drop_privs_userfetch(settings)
 
-rval = 1
 allow_missing = manifest.allow_missing or "digest" in settings.features
-if fetch(
-uri_map,
-settings,
-fetchonly=fetchonly,
-digests=copy.deepcopy(manifest.getTypeDigests("DIST")),
-allow_missing_digests=allow_missing,
-):
-rval = os.EX_OK
-return rval
+
+async def main():
+loop = asyncio.get_event_loop()
+task = asyncio.ensure_future(
+async_fetch(
+uri_map,
+settings,
+fetchonly=fetchonly,
+digests=copy.deepcopy(manifest.getTypeDigests("DIST")),
+allow_missing_digests=allow_missing,
+)
+)
+
+def sigterm_handler(signum, _frame):
+loop.call_soon_threadsafe(task.cancel)
+signal.signal(signal.SIGTERM, signal.SIG_IGN)
+
+signal.signal(signal.SIGTERM, sigterm_handler)
+try:
+await task
+except asyncio.CancelledError:
+# If asyncio.CancelledError arrives too

[gentoo-commits] proj/portage:master commit in: /

2024-08-03 Thread Zac Medico
commit: 5f0bc595e6cd49b36fc5462ae494276d3bfbbd29
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug  4 05:07:59 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug  4 05:09:33 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=5f0bc595

NEWS: Fix FETCHCOMMAND spelling

Signed-off-by: Zac Medico  gentoo.org>

 NEWS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 3b71349508..58dd83bf17 100644
--- a/NEWS
+++ b/NEWS
@@ -28,7 +28,7 @@ Bug fixes:
 * repository: config: Allow a repository to be configured using one of its
   aliases rather than its primary name (bug #935830).
 
-* emerge: Fix parallel-fetch to properly terminate FETCOMMAND processes when
+* emerge: Fix parallel-fetch to properly terminate FETCHCOMMAND processes when
   needed, using a SIGTERM handler (bug #936273).
 
 portage-3.0.65 (2024-06-04)



[gentoo-commits] repo/gentoo:master commit in: sys-fabric/mstflint/

2024-08-05 Thread Zac Medico
commit: 7ad787bc9776039dae95d54ce01a2630eaceea8e
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug  6 00:26:41 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug  6 00:26:47 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad787bc

sys-fabric/mstflint: drop 4.18.0_p1-r1, 4.20.0_p1

Signed-off-by: Zac Medico  gentoo.org>

 sys-fabric/mstflint/Manifest |  2 --
 sys-fabric/mstflint/mstflint-4.18.0_p1-r1.ebuild | 46 
 sys-fabric/mstflint/mstflint-4.20.0_p1.ebuild| 46 
 3 files changed, 94 deletions(-)

diff --git a/sys-fabric/mstflint/Manifest b/sys-fabric/mstflint/Manifest
index cfcd1e932dcd..0ab9136d928a 100644
--- a/sys-fabric/mstflint/Manifest
+++ b/sys-fabric/mstflint/Manifest
@@ -1,3 +1 @@
-DIST mstflint-4.18.0_p1.tar.gz 4877851 BLAKE2B 
7fb995561155ccc73b0c36d2994c0398483a92788c5ce045f0263a3e5b0ff7230ca8bb0f5b821e957d5879e0629f11716b179e3bc581849335cc95715631c1d6
 SHA512 
aed2302dc88b9b95892eb6dd929a922ac6257ddae808db656c7fd01c393f9f0a0d3aa4e13da6c07fe0118cd48a43795f39cc16e619408b05e6bed7d085dbf0d4
-DIST mstflint-4.20.0_p1.tar.gz 5176386 BLAKE2B 
065fbf1884de70b57b602bb2a46e34c903b7419050622f2e6d55589f066555a43e781e35cfa4751f4d3af4394f3bbcff3c61e5618acb6696d0c22790ccaf50b8
 SHA512 
7298c425831f6e8f80145fb0f79af9d63ed013eeac6a99a5d9fe804a6e5c044ecffaf0ce62cd3edd07d185732bdb6ae3a99ecbb31b94047831d710b0b7fe1738
 DIST mstflint-4.23.0_p1.tar.gz 6269497 BLAKE2B 
95c8fda6a1532baa50de7bcfffc128d24f30c41e670ee9fb19193025dee75fecf3b3e5bebec30bfd7ce9cc138c8eb61ba66a24d14ccec304cc75cae95d62995f
 SHA512 
e0f98587272334d30910b7e8ea4c61ee0404924c85bfedd298ef0ae9321b177d56c8469588a2f59bc1584da79cd2908a222f3608b240d3b5498fb0cd87c06146

diff --git a/sys-fabric/mstflint/mstflint-4.18.0_p1-r1.ebuild 
b/sys-fabric/mstflint/mstflint-4.18.0_p1-r1.ebuild
deleted file mode 100644
index 810536121d18..
--- a/sys-fabric/mstflint/mstflint-4.18.0_p1-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="Mstflint - an open source version of MFT (Mellanox Firmware 
Tools)"
-HOMEPAGE="https://github.com/Mellanox/mstflint";
-LICENSE="|| ( GPL-2 BSD-2 )"
-KEYWORDS="~amd64 ~x86"
-EGIT_COMMIT="ab6f72086a2aa3a07629536fa091141f40a6f0c0"
-MY_PV=${PV/_p/-}
-MY_P=""
-SRC_URI="https://github.com/Mellanox/mstflint/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz"
-IUSE="adb-generic-tools inband ssl"
-SLOT="0"
-RDEPEND="dev-db/sqlite:3=
-   sys-libs/zlib:=
-   inband? ( sys-cluster/rdma-core )
-   adb-generic-tools? (
-   dev-libs/boost:=
-   dev-libs/expat:=
-   )
-   ssl? ( dev-libs/openssl:= )"
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
-   default
-   echo '#define TOOLS_GIT_SHA "'${EGIT_COMMIT}'"' > ./common/gitversion.h 
|| die
-}
-
-src_configure() {
-   eautoreconf
-   econf $(use_enable inband) $(use_enable ssl openssl) $(use 
adb-generic-tools && printf -- '--enable-adb-generic-tools')
-}
-
-src_compile() {
-   if use adb-generic-tools; then
-   pushd ext_libs/json >/dev/null || die
-   emake
-   popd >/dev/null || die
-   fi
-   default
-}

diff --git a/sys-fabric/mstflint/mstflint-4.20.0_p1.ebuild 
b/sys-fabric/mstflint/mstflint-4.20.0_p1.ebuild
deleted file mode 100644
index d323798bc98f..
--- a/sys-fabric/mstflint/mstflint-4.20.0_p1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="Mstflint - an open source version of MFT (Mellanox Firmware 
Tools)"
-HOMEPAGE="https://github.com/Mellanox/mstflint";
-LICENSE="|| ( GPL-2 BSD-2 )"
-KEYWORDS="~amd64 ~x86"
-EGIT_COMMIT="d23c7b44193a6697a49211d2232dfe094a0e6530"
-MY_PV=${PV/_p/-}
-MY_P=""
-SRC_URI="https://github.com/Mellanox/mstflint/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz"
-IUSE="adb-generic-tools inband ssl"
-SLOT="0"
-RDEPEND="dev-db/sqlite:3=
-   sys-libs/zlib:=
-   inband? ( sys-cluster/rdma-core )
-   adb-generic-tools? (
-   dev-libs/boost:=
-   dev-libs/expat:=
-   )
-   ssl? ( dev-libs/openssl:= )"
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
-   default
-   echo '#define TOOLS_GIT_SHA "'${EGIT_COMMIT}'"' > ./common/gitversion.h 
|| die
-}
-
-src_configure() {
-   eautoreconf
-   econf $(use_enable inband) $(use_enable ssl openssl) $(use 
adb-generic-tools && printf -- '--enable-adb-generic-tools')
-}
-
-src_compile() {
-   if use adb-generic-tools; then
-   pushd ext_libs/json >/dev/null || die
-   emake
-   popd >/dev/null || die
-   fi
-   default
-}



[gentoo-commits] repo/gentoo:master commit in: sys-fabric/mstflint/

2024-08-05 Thread Zac Medico
commit: 5ed91a25cb4038e0ca0a1da891a9f9af3cd5
Author: Filip Kobierski  pm  me>
AuthorDate: Mon Aug  5 14:21:20 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug  6 00:28:42 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ed91a25

sys-fabric/mstflint: fix pkgcheck issues

Signed-off-by: Filip Kobierski  pm.me>
Closes: https://github.com/gentoo/gentoo/pull/37978
Signed-off-by: Zac Medico  gentoo.org>

 sys-fabric/mstflint/mstflint-4.23.0_p1.ebuild | 25 +++--
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/sys-fabric/mstflint/mstflint-4.23.0_p1.ebuild 
b/sys-fabric/mstflint/mstflint-4.23.0_p1.ebuild
index 44fd3ec31adb..625933e4b2ff 100644
--- a/sys-fabric/mstflint/mstflint-4.23.0_p1.ebuild
+++ b/sys-fabric/mstflint/mstflint-4.23.0_p1.ebuild
@@ -1,21 +1,25 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 inherit autotools
 
+MY_PV="${PV/_p/-}"
+EGIT_COMMIT="acfaf553f2f571b1f9256b6cd558eafa767d9172"
+
 DESCRIPTION="Mstflint - an open source version of MFT (Mellanox Firmware 
Tools)"
 HOMEPAGE="https://github.com/Mellanox/mstflint";
+SRC_URI="https://github.com/Mellanox/mstflint/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
 LICENSE="|| ( GPL-2 BSD-2 )"
+SLOT="0"
 KEYWORDS="~amd64 ~x86"
-EGIT_COMMIT="acfaf553f2f571b1f9256b6cd558eafa767d9172"
-MY_PV=${PV/_p/-}
-MY_P=""
-SRC_URI="https://github.com/Mellanox/mstflint/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz"
 IUSE="adb-generic-tools inband ssl"
-SLOT="0"
-RDEPEND="dev-db/sqlite:3=
+
+RDEPEND="
+   dev-db/sqlite:3=
sys-libs/zlib:=
inband? ( sys-cluster/rdma-core )
adb-generic-tools? (
@@ -24,8 +28,8 @@ RDEPEND="dev-db/sqlite:3=
)
ssl? ( dev-libs/openssl:= )"
 DEPEND="${RDEPEND}"
-S="${WORKDIR}/${PN}-${MY_PV}"
-PATCHES=("${FILESDIR}"/mstflint-4.23.0_p1-C99-compat.patch)
+
+PATCHES=( "${FILESDIR}"/mstflint-4.23.0_p1-C99-compat.patch )
 
 src_prepare() {
default
@@ -36,7 +40,8 @@ src_prepare() {
 
 src_configure() {
eautoreconf
-   econf $(use_enable inband) $(use_enable ssl openssl) $(use 
adb-generic-tools && printf -- '--enable-adb-generic-tools')
+   econf $(use_enable inband) $(use_enable ssl openssl) \
+ $(use adb-generic-tools && printf -- 
'--enable-adb-generic-tools')
 }
 
 src_compile() {



[gentoo-commits] repo/gentoo:master commit in: app-shells/nushell/

2024-08-06 Thread Zac Medico
commit: cd6db84801d87062f18fa447fbc09359468b1093
Author: Jonas Frei  pm  me>
AuthorDate: Tue Aug  6 05:47:53 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Aug  7 02:26:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd6db848

app-shells/nushell: add 0.96.1

Signed-off-by: Jonas Frei  pm.me>
From: https://github.com/gentoo/gentoo/pull/37989
Signed-off-by: Zac Medico  gentoo.org>

 app-shells/nushell/Manifest  |  53 +++
 app-shells/nushell/nushell-0.96.1.ebuild | 772 +++
 2 files changed, 825 insertions(+)

diff --git a/app-shells/nushell/Manifest b/app-shells/nushell/Manifest
index 40fe25366e48..129f8d2858e6 100644
--- a/app-shells/nushell/Manifest
+++ b/app-shells/nushell/Manifest
@@ -244,18 +244,23 @@ DIST csv-core-0.1.11.crate 25852 BLAKE2B 
9f56cea786b5b35f6fd5c4f41fc3cc06d777f6d
 DIST ctrlc-3.4.0.crate 14098 BLAKE2B 
709de25815437bc91d18bc66ce139fe4c051d201b01a8dc90c97d275137e048452fa63d73b6fbe881370727153c9bee7d3ec6a97efb9710982639388ab683294
 SHA512 
94e2f5580ab178c50d56a6b40490e3a61d121c9de681f54f56c1e50596709835eee0b26df0436d1313af77cec1c4422051f1959221ea82536b8a709ef84c18fd
 DIST ctrlc-3.4.2.crate 14171 BLAKE2B 
65bcbaff2a58a78370888e988e52bdf7b8c1dec5963854374a87fa31b4db633f41b7a7e9965027411c14b089680eaaf32db1ab26ceeebaecbe09c0c3b5e1fce9
 SHA512 
99fc52445a51438bbbefefedf6409efc6b9c8db8f8932bde8eebeda3bfa952d116923b6ea9762e3bd28521ddee17ca1c8fb9b24cf8fe287063ec2ffc696ec408
 DIST ctrlc-3.4.4.crate 14660 BLAKE2B 
fe7c2ca8352dbe40e60ad2c63654beafd9ad3f62483b23b3c614a22dacc8ce0edd2b94e9ec3a2472c581f6a1b8befe0952df092b4c7d34ad92414190e285e51b
 SHA512 
c09c5bb87e4116e4f2604023d9a94afb9985678a4d02aac17baf5b5d13d0ac7321e07dd7b20ed620af9670926acdb6b78be37a56c8be171c21975d34ebf0196c
+DIST curl-0.4.46.crate 94864 BLAKE2B 
bcfc97c19ce299abd3e8a9769a30c0ec5dc6692b5c1d81423f47aeea39066d1840ca7ec1d4713132519f3bea94d43aebd8d733a19028280e2e6c2a8e91eb1948
 SHA512 
c08f857b385582ba635a76744c940017b74c3f241d28cc7c8c6eeff958c76c01a1a51df41b3a7a6a9a38a31f8cf5b9b3b639eaa163c441fdec29d0b3f14c8336
+DIST curl-sys-0.4.73+curl-8.8.0.crate 1759967 BLAKE2B 
85a2304632b81cfffa9deb9d90078d6e05587599218d343cba7ec39a0cc4e246815dfec1f747708429146b2c9847db943f49c8ab4a80f2056a0acd074c7f4785
 SHA512 
7c669747ede48191e6a75f118084bc473fac3ec2fe78882bd13527df3d98a0c26c00b30055230298685afc741aa99e369b8bc2bb6d89712aaa3e5208c7ee9fc0
 DIST dashmap-5.5.0.crate 24067 BLAKE2B 
48f48215e459e4a3973d90b10b15fe346f6f02340b876016b2d6ea82ac3cc8a69be82127ddcb4ecca7c7d86b55440d78c89bfa95a081abe761601bc9fb8d6ef6
 SHA512 
191448f8366c9462b268c93f975196522d3094ace757617e0dd895b3361884b11d4be68cee49c090d2aa6d8d7c6ce1a76194791fdc11a6605782933b721b4744
 DIST dashmap-5.5.3.crate 24061 BLAKE2B 
2bdd62f674e90007a81b76419dd5df1b58c3d9b80bed4324d9e0298355cd66706794c7187c74bd9a6ce119d81ba9400c47aa2729ec923979b0bc081329051e71
 SHA512 
15079a921d768224defebdf8d5339257c9e94a46d115b37ddfca8eb83718b2448555a8982bcf0381a915d292aff9d271a89d3398d2ae2f396dd581cc6883963a
 DIST deranged-0.3.11.crate 18043 BLAKE2B 
738d5a88732e227bb0e0d33c04ab8248a699c7c499100666ffcd78673d1f38ad2d740222ab405e3eaa7a0a6f4596cfef90bd581a1baf77c954dca830c22e74f9
 SHA512 
48485666d3e50eb7976e91bed36bddbaea80fac4ac664723130069bd7d17893b6d1a2b82a4c3dd61677162e4305ba5ea8aec7bc2793d1b8b92dd1666c204fc43
 DIST derive-new-0.5.9.crate 7733 BLAKE2B 
3f0a19b794c10e529da5b3618cfeaa4e575ee31597d2ff1f95618eb5163568c6c8836c5a634323dda65f448bf3fba2bbf066df5f815feb07f59ff99d1f46da26
 SHA512 
9ce0991fe63d8339a88d9552fcd8cc744d8bbc2c6525f60959faf519e1ffa84256c773291df2101912483c0d9accd4fe5f7dbb199dbd36d299ceae8f607e0b30
 DIST derive-new-0.6.0.crate 7694 BLAKE2B 
8c7f33653f01961eb8df131e9f61422a54b3fed986a4116b7174693649e8762ec60e5251e9a34713a8e0126e4e2fb2fefe1d6e8c5591d806b1dcd480512cb153
 SHA512 
2f603df3765657e1dc857012610d849705002c8f710136ddf4717cde5d7f827d7d886074a08ec75d4678601c17b8cac83961db25bd10e49840777a4e89c4f7cd
 DIST derive_more-0.99.17.crate 55771 BLAKE2B 
b290bfbf06119018206be0f8ad4c92508be4cbc443f1a937c38961e207fc3f433d8a87b2b5a17e72aa1735520799540557d9dd9e49e26b8eb7cc80289afd44bd
 SHA512 
0bb5a94e56d35a17ff4deed61c437ba75c9063694032ba98b58be1b072d33f2fb170d51bd262a17ff1beed2110b334528de75d5315ac627202ccb13d8c490baf
+DIST deunicode-1.6.0.crate 170864 BLAKE2B 
db0a3d0459a43c224fc0bbe84bed044ff81b9f05063e364fa38c44bc51a12106805f93569d07469b6544745b684097cf3f03d6cebefc93dfa0deb232fc73f7f9
 SHA512 
39e5de0d1ed93bf3fcd37e87a04ac3b23d3a50d28b37b0962b30f9461753b3c1e3639c9760101bbaf1d4269c7eaa8568764b481d3cac6faa6b9580f51d11144c
 DIST dialoguer-0.10.4.crate 29928 BLAKE2B 
98442debedfc4661f3179aad4b756c91b392632259da0347c6eb3c9706c95c687331891c7dcb961171e4de2e807c6fa46489ac281191aa3b1a9b57c79cb66d26
 SHA512 
0ad01a3cf177b2877c4d6a12f8368e6543f514d9d7993e38826c52f22b1181039b4140c618965f3c1ec20a175f477a759ac6948ca3b6c39c5508b87d64fe8002
 DIST dialoguer-0.11.0.crate 3

[gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/

2024-08-07 Thread Zac Medico
commit: 9e6451c88e3da11e0eb7b0bd6b1497c5ca4fb67f
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug  6 04:48:26 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Aug  7 14:39:25 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=9e6451c8

doebuild.spawn: Skip socks5 proxy for "depend" phase

Skip the socks5 proxy for the "depend" phase. It should not be needed
because we only allow bash builtin commands during this phase.

Since the socks5 proxy requires portage's event loop to be explictly
closed before exit, skipping it will allow programs like eclean-dist
to avoid the need to explicitly close portage's event loop before exit.

Bug: https://bugs.gentoo.org/937384
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/package/ebuild/doebuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/doebuild.py 
b/lib/portage/package/ebuild/doebuild.py
index 403836b80b..b5fb46df70 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -2009,7 +2009,7 @@ def spawn(
 
 if (
 not networked
-and mysettings.get("EBUILD_PHASE") != "nofetch"
+and mysettings.get("EBUILD_PHASE") not in ("depend", "nofetch")
 and ("network-sandbox-proxy" in features or "distcc" in features)
 ):
 # Provide a SOCKS5-over-UNIX-socket proxy to escape sandbox



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-08-19 Thread Zac Medico
commit: e97acd3c62ff02eb41ff643e75eb5e07c27717f8
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 18 14:59:46 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 18 15:46:45 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=e97acd3c

_wrap_loop: Prevent redundant AsyncioEventLoop instances

Ultimately the loop arguments that necessitate the _wrap_loop
function can be removed, because our aim since bug 761538 should
be to eliminate them. Meanwhile, we don't want _wrap_loop to return
redundant AsyncioEventLoop instances if we can easily prevent it.

Therefore, use _safe_loop(create=False) to look up the AsyncioEventLoop
instance associated with the current thread, and avoid creating
redundant instances. This serves to guard against garbage collection
of AsyncioEventLoop instances which may have _coroutine_exithandlers
added by the atexit_register function since commit cb0c09d8cecb from
bug 937740.

If _safe_loop(create=False) fails to associate a loop with the current
thread, raise an AssertionError for portage internal API consumers.
It's not known whether external API consumers will trigger this case,
so if it happens then emit a UserWarning and return a temporary
AsyncioEventLoop instance.

Fixes: cb0c09d8cecb ("Support coroutine exitfuncs for non-main loops")
Bug: https://bugs.gentoo.org/938127
Bug: https://bugs.gentoo.org/937740
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 43 +++
 1 file changed, 38 insertions(+), 5 deletions(-)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index 8805e35756..c960d03630 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -26,6 +26,7 @@ __all__ = (
 
 import sys
 import types
+import warnings
 import weakref
 
 import asyncio as _real_asyncio
@@ -46,6 +47,7 @@ from asyncio import (
 )
 
 import threading
+from typing import Optional
 
 import portage
 
@@ -251,11 +253,35 @@ def _wrap_loop(loop=None):
 # The default loop returned by _wrap_loop should be consistent
 # with global_event_loop, in order to avoid accidental registration
 # of callbacks with a loop that is not intended to run.
-loop = loop or _safe_loop()
-return loop if hasattr(loop, "_asyncio_wrapper") else 
_AsyncioEventLoop(loop=loop)
+if hasattr(loop, "_asyncio_wrapper"):
+return loop
+
+# This returns a running loop if it exists, and otherwise returns
+# a loop associated with the current thread.
+safe_loop = _safe_loop(create=loop is None)
+if safe_loop is not None and (loop is None or safe_loop._loop is loop):
+return safe_loop
+
+if safe_loop is None:
+msg = f"_wrap_loop argument '{loop}' not associated with thread 
'{threading.get_ident()}'"
+else:
+msg = f"_wrap_loop argument '{loop}' different frome loop 
'{safe_loop._loop}' already associated with thread '{threading.get_ident()}'"
+
+if portage._internal_caller:
+raise AssertionError(msg)
 
+# It's not known whether external API consumers will trigger this case,
+# so if it happens then emit a UserWarning before returning a temporary
+# AsyncioEventLoop instance.
+warnings.warn(msg, UserWarning, stacklevel=2)
 
-def _safe_loop():
+# We could possibly add a weak reference in _thread_weakrefs.loops when
+# safe_loop is None, but if safe_loop is not None, then there is a
+# collision in _thread_weakrefs.loops that would need to be resolved.
+return _AsyncioEventLoop(loop=loop)
+
+
+def _safe_loop(create: Optional[bool] = True) -> Optional[_AsyncioEventLoop]:
 """
 Return an event loop that's safe to use within the current context.
 For portage internal callers or external API consumers calling from
@@ -276,8 +302,13 @@ def _safe_loop():
 are added to a WeakValueDictionary, and closed via an atexit hook
 if they still exist during exit for the current pid.
 
-@rtype: asyncio.AbstractEventLoop (or compatible)
-@return: event loop instance
+@type create: bool
+@param create: Create a loop by default if a loop is not already associated
+with the current thread. If create is False, then return None if a loop
+is not already associated with the current thread.
+@rtype: AsyncioEventLoop or None
+@return: event loop instance, or None if the create parameter is False and
+a loop is not already associated with the current thread.
 """
 loop = _get_running_loop()
 if loop is not None:
@@ -292,6 +323,8 @@ def _safe_loop():
 try:
 loop = _thread_weakrefs.loops[thread_key]
 except KeyError:
+if not create:
+return None
 try:
 try:
 _loop = _real_asyncio.get_running_loop()



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-08-19 Thread Zac Medico
commit: a62faf99dbd0078cd58a76e6419e0a2d0d14d636
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 18 15:00:07 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 18 15:47:01 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=a62faf99

Remove unused and unimplemented asyncio.Task class

This class originated from commit 142d08c0636b and it is unused
since _PortageEventLoop was removed in commit 20204fd8c29.

Fixes: 20204fd8c29 ("Remove unused _PortageEventLoop and _PortageChildWatcher")
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index c960d03630..bdacda59ce 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -19,7 +19,6 @@ __all__ = (
 "run",
 "shield",
 "sleep",
-"Task",
 "wait",
 "wait_for",
 )
@@ -174,16 +173,6 @@ class Lock(_Lock):
 super().__init__(**kwargs)
 
 
-class Task(Future):
-"""
-Schedule the execution of a coroutine: wrap it in a future. A task
-is a subclass of Future.
-"""
-
-def __init__(self, coro, loop=None):
-raise NotImplementedError
-
-
 def ensure_future(coro_or_future, loop=None):
 """
 Wrap a coroutine or an awaitable in a future.



[gentoo-commits] proj/portage:master commit in: man/

2024-08-20 Thread Zac Medico
commit: 747b2d2079281adc60206c52b8bbf475fd982969
Author: Allen-Kristjan Päll  fst  ee>
AuthorDate: Tue Aug 20 06:09:52 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug 20 16:29:16 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=747b2d20

man/emerge.1: Fixed a typo

Signed-off-by: Allen-Kristjan Päll  fst.ee>
Closes: https://github.com/gentoo/portage/pull/1373
Signed-off-by: Zac Medico  gentoo.org>

 man/emerge.1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/emerge.1 b/man/emerge.1
index e30f5f813e..c629c68262 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -30,7 +30,7 @@ distribution.
 .SH "EBUILDS, TBZ2S, SETS AND ATOMS"
 \fBemerge\fR primarily installs packages.  You can specify
 packages to install in five possible ways: an \fIatom\fR,
-a \fIset\fR, an installed \fIfile\fR, an \fIebuild\fR, a
+a \fIset\fR, an installed \fIfile\fR, an \fIebuild\fR,
 a \fItbz2\fR file, or a \fIgpkg\fR file.
 .LP
 .TP



[gentoo-commits] repo/gentoo:master commit in: net-misc/passt/

2024-08-24 Thread Zac Medico
commit: 652f17bcfc5b13438990110166cc20f569375999
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sat Aug 24 08:29:53 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 24 15:27:18 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=652f17bc

net-misc/passt: use https:// instead of git:// for cloning

git:// is unencrypted and could be used by an attacker (mitm) to insert 
malicious code, see also [1].
git:// runs on port 9418 which is also less likely open behind a firewall.

[1] git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
From: https://github.com/gentoo/gentoo/pull/38276
Signed-off-by: Zac Medico  gentoo.org>

 net-misc/passt/passt-2024.03.26.ebuild | 2 +-
 net-misc/passt/passt-2024.04.05.ebuild | 2 +-
 net-misc/passt/passt-2024.04.26.ebuild | 2 +-
 net-misc/passt/passt-2024.05.10.ebuild | 2 +-
 net-misc/passt/passt-2024.06.07.ebuild | 2 +-
 net-misc/passt/passt-.ebuild   | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net-misc/passt/passt-2024.03.26.ebuild 
b/net-misc/passt/passt-2024.03.26.ebuild
index 90df839f93d9..91d818f5b4a1 100644
--- a/net-misc/passt/passt-2024.03.26.ebuild
+++ b/net-misc/passt/passt-2024.03.26.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="4988e2b"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"

diff --git a/net-misc/passt/passt-2024.04.05.ebuild 
b/net-misc/passt/passt-2024.04.05.ebuild
index e4201215e520..be03e08a6fab 100644
--- a/net-misc/passt/passt-2024.04.05.ebuild
+++ b/net-misc/passt/passt-2024.04.05.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="954589b"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"

diff --git a/net-misc/passt/passt-2024.04.26.ebuild 
b/net-misc/passt/passt-2024.04.26.ebuild
index c73a0f7c146b..cf83c50f72ed 100644
--- a/net-misc/passt/passt-2024.04.26.ebuild
+++ b/net-misc/passt/passt-2024.04.26.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="d03c4e2"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"

diff --git a/net-misc/passt/passt-2024.05.10.ebuild 
b/net-misc/passt/passt-2024.05.10.ebuild
index ce44d6abe4eb..022bbfc62aa7 100644
--- a/net-misc/passt/passt-2024.05.10.ebuild
+++ b/net-misc/passt/passt-2024.05.10.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="7288448"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"

diff --git a/net-misc/passt/passt-2024.06.07.ebuild 
b/net-misc/passt/passt-2024.06.07.ebuild
index 9ffe1a0980df..37ba4d13c25f 100644
--- a/net-misc/passt/passt-2024.06.07.ebuild
+++ b/net-misc/passt/passt-2024.06.07.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="8a83b53"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"

diff --git a/net-misc/passt/passt-.ebuild b/net-misc/passt/passt-.ebuild
index 9ffe1a0980df..37ba4d13c25f 100644
--- a/net-misc/passt/passt-.ebuild
+++ b/net-misc/passt/passt-.ebuild
@@ -12,7 +12,7 @@ RELEASE_COMMIT="8a83b53"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
-   EGIT_REPO_URI="git://passt.top/passt"
+   EGIT_REPO_URI="https://passt.top/passt";
 else

SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"



[gentoo-commits] repo/gentoo:master commit in: app-text/calibre/files/

2024-08-24 Thread Zac Medico
commit: ac1592bc68a4c95d66398cf5318fdfc845b196e8
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Thu Aug 22 05:37:38 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 24 22:22:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac1592bc

app-text/calibre: remove unused patch

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
From: https://github.com/gentoo/gentoo/pull/38243
Signed-off-by: Zac Medico  gentoo.org>

 .../files/calibre-2.9.0-no_updates_dialog.patch| 27 --
 1 file changed, 27 deletions(-)

diff --git a/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch 
b/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch
deleted file mode 100644
index 4d37c3b642f5..
--- a/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -burN calibre-2.9.0.orig/src/calibre/gui2/main.py 
calibre-2.9.0/src/calibre/gui2/main.py
 calibre-2.9.0.orig/src/calibre/gui2/main.py2014-11-09 
20:09:54.081231882 +0800
-+++ calibre-2.9.0/src/calibre/gui2/main.py 2014-11-09 20:15:48.193033844 
+0800
-@@ -37,8 +37,9 @@
-   help=_('Start minimized to system tray.'))
- parser.add_option('-v', '--verbose', default=0, action='count',
-   help=_('Ignored, do not use. Present only for legacy 
reasons'))
--parser.add_option('--no-update-check', default=False, action='store_true',
--help=_('Do not check for updates'))
-+parser.add_option('--update-check', dest='no_update_check', default=True,
-+action='store_false',
-+help=_('Check for updates'))
- parser.add_option('--ignore-plugins', default=False, action='store_true',
- help=_('Ignore custom plugins, useful if you installed a plugin'
- ' that is preventing calibre from starting'))
-diff -burN calibre-2.9.0.orig/src/calibre/gui2/update.py 
calibre-2.9.0/src/calibre/gui2/update.py
 calibre-2.9.0.orig/src/calibre/gui2/update.py  2014-11-09 
20:09:54.082231864 +0800
-+++ calibre-2.9.0/src/calibre/gui2/update.py   2014-11-09 20:17:49.954767115 
+0800
-@@ -154,6 +154,8 @@
- self.update_checker.signal.update_found.connect(self.update_found,
- type=Qt.QueuedConnection)
- self.update_checker.start()
-+else:
-+self.update_checker = None
- 
- def recalc_update_label(self, number_of_plugin_updates):
- self.update_found(self.last_newest_calibre_version, 
number_of_plugin_updates)



[gentoo-commits] repo/gentoo:master commit in: net-vpn/frp/

2024-08-25 Thread Zac Medico
commit: da1c40b1eeaa97c850d38c17ffc176514e1eecbe
Author: Puqns67  puqns67  icu>
AuthorDate: Sun Aug 25 15:05:10 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Aug 26 01:06:09 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da1c40b1

net-vpn/frp: add 0.60.0

Signed-off-by: Puqns67  puqns67.icu>
Closes: https://github.com/gentoo/gentoo/pull/38286
Signed-off-by: Zac Medico  gentoo.org>

 net-vpn/frp/Manifest  |  2 ++
 net-vpn/frp/frp-0.60.0.ebuild | 65 +++
 2 files changed, 67 insertions(+)

diff --git a/net-vpn/frp/Manifest b/net-vpn/frp/Manifest
index fc780a5df065..4a66e7bda912 100644
--- a/net-vpn/frp/Manifest
+++ b/net-vpn/frp/Manifest
@@ -2,3 +2,5 @@ DIST frp-0.56.0-deps.tar.xz 2890568 BLAKE2B 
cabeeba66d4fa94ff95637020178310c984b
 DIST frp-0.56.0.tar.gz 1080201 BLAKE2B 
493e8b21aab6d5fae2d762eafba7d94de59394e9c4cb3c3dfce2bd8b5a0d0fcca6ef471917e8257022e079bececf34e910fe3b6bc845753862da59a1d00ca20c
 SHA512 
883dce220aa78296f2b7eb9d64b3d1598bc2df436c52a48bc813d725a6f8fa43028359b0507bf4a586a29f4739310474047abfefd46249c0c9942990ceac0e2d
 DIST frp-0.58.1-deps.tar.xz 2916740 BLAKE2B 
49256c40ca359a5b76a92e2999e3a5a3ca4899f71e4804544296ee71fa6c079f563b1892195243e9e8792c72c445f779fb5a32b1cc5c4ebca9265d88808072e3
 SHA512 
3295e0e6b5a7ace8c5af1dd9e15ffb893930c0f03755e8de46dfbca2272747b95d8e58f4034f4fa2c44896c5036654b3c805a6d3dd0d3926335330d28d07
 DIST frp-0.58.1.tar.gz 1081317 BLAKE2B 
e5d897a9d866df1075c9fb397f1cbcf23efb738fd89e58bce4fba5abce23d9cb6c826b50d4cda52b3fa40a6194003a51c6209f2d4aef43d9dc62f08b51a776a7
 SHA512 
809e86e9cd2cb67ae338b2584c0c8f5d4f01104cc7725826743f48eb5c893bce9cd678bcd90e04953bb6bfc6523fcf400c6bc1bdf03ff335666b05af5e0c4b55
+DIST frp-0.60.0-vendor.tar.xz 2816520 BLAKE2B 
3f58f108c1dc563d73d119293d9cbcb181059c24bb58731f5d6d870a320982c976c8a0938ff0442bd21ffd0bb86218aaa20f1b382fb7a045422aaea411ad3557
 SHA512 
9825d39cd4bce25ad796b3ac817e690ca41daf9f028ac4e88aa43b4e295d20f9ede57a1be8933efca00a512ff238f8e34a85f24a4b56f9c52cf40aa1f26118f9
+DIST frp-0.60.0.tar.gz 1073862 BLAKE2B 
c6169818bbca656d44bc945c70b73474a4f427bd123fa7a546285fb63d3a156dc90d7fa1d46f2ba4ae971281e546fb43a217ad2527b7bd20a402810cb356d7ac
 SHA512 
4c86b91a28b58ce5b681e5f8c886efd57a41fb6ac92606facce0b6f6f6cbd6cf6f789209252455bc6bc6a3ad043f2470040ac84b893926653cc036b40907e60c

diff --git a/net-vpn/frp/frp-0.60.0.ebuild b/net-vpn/frp/frp-0.60.0.ebuild
new file mode 100644
index ..994a8b5d4b28
--- /dev/null
+++ b/net-vpn/frp/frp-0.60.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd shell-completion
+
+DESCRIPTION="A reverse proxy that exposes a server behind a NAT or firewall to 
the internet"
+HOMEPAGE="https://github.com/fatedier/frp";
+SRC_URI="https://github.com/fatedier/frp/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://github.com/Puqns67/gentoo-deps/releases/download/${P}/${P}-vendor.tar.xz";
+
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~riscv"
+IUSE="+client +server"
+REQUIRED_USE="|| ( client server )"
+BDEPEND=">=dev-lang/go-1.22"
+
+src_compile() {
+   mkdir -pv comp || die
+
+   if use client; then
+   ego build -trimpath -ldflags "-s -w" -tags frpc -o frpc 
./cmd/frpc
+   ./frpc completion bash > comp/frpc || die
+   ./frpc completion fish > comp/frpc.fish || die
+   ./frpc completion zsh > comp/_frpc || die
+   fi
+
+   if use server; then
+   ego build -trimpath -ldflags "-s -w" -tags frps -o frps 
./cmd/frps
+   ./frps completion bash > comp/frps || die
+   ./frps completion fish > comp/frps.fish || die
+   ./frps completion zsh > comp/_frps || die
+   fi
+}
+
+src_install() {
+   _install() {
+   # Install binary file
+   dobin "${1}"
+
+   # Install completion files
+   dobashcomp "${S}/comp/${1}"
+   dofishcomp "${S}/comp/${1}.fish"
+   dozshcomp "${S}/comp/_${1}"
+
+   # Install systemd services
+   systemd_dounit "${FILESDIR}/${1}.service"
+   systemd_newunit "${FILESDIR}/${1}_at_.service" "${1}@.service"
+
+   # Install config files
+   insinto "/etc/${PN}"
+   newins "${S}/conf/${1}.toml" "${1}.toml.example"
+   newins "${S}/conf/${1}_full_example.toml" 
"${1}_full.toml.example"
+   }
+
+   if use client; then
+   _install frpc
+   fi
+
+   if use server; then
+   _install frps
+   fi
+}



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-09-01 Thread Zac Medico
commit: b30ddb1913e8aa2947d20e43f455d2060aa6257f
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug 31 20:08:35 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Sep  1 06:59:44 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=b30ddb19

asyncio: Avoid _wrap_loop prior to create_subprocess_exec

Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index 48d9b68104..4cf337998c 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -119,7 +119,7 @@ def run(coro):
 run.__doc__ = _real_asyncio.run.__doc__
 
 
-def create_subprocess_exec(*args, **kwargs):
+def create_subprocess_exec(*args, loop=None, **kwargs):
 """
 Create a subprocess.
 
@@ -140,7 +140,6 @@ def create_subprocess_exec(*args, **kwargs):
 @rtype: asyncio.subprocess.Process (or compatible)
 @return: asyncio.subprocess.Process interface
 """
-loop = _wrap_loop(kwargs.pop("loop", None))
 # Python 3.4 and later implement PEP 446, which makes newly
 # created file descriptors non-inheritable by default.
 kwargs.setdefault("close_fds", False)



[gentoo-commits] repo/gentoo:master commit in: net-misc/passt/

2024-08-31 Thread Zac Medico
commit: 10ee7afe94f44465509290da003e94391e89bd2b
Author: Michal Privoznik  gmail  com>
AuthorDate: Fri Aug 30 07:47:16 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 31 17:53:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10ee7afe

net-misc/passt: add 2024.08.21

Signed-off-by: Michal Privoznik  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38342
Signed-off-by: Zac Medico  gentoo.org>

 net-misc/passt/Manifest|  1 +
 net-misc/passt/passt-2024.08.21.ebuild | 36 ++
 2 files changed, 37 insertions(+)

diff --git a/net-misc/passt/Manifest b/net-misc/passt/Manifest
index d1b7a339a1a1..6822119362e6 100644
--- a/net-misc/passt/Manifest
+++ b/net-misc/passt/Manifest
@@ -3,3 +3,4 @@ DIST passt-2024.04.05.tar.xz 195772 BLAKE2B 
4c237aeda56455f948d4309624d171612d59
 DIST passt-2024.04.26.tar.xz 196148 BLAKE2B 
f3a9b9d2a9fa42e0dd35894d4c92890af9935965ccfb3b1751c396080ab0482bd541fe22f09ae7b068f336f1e985b6905d2cc93987a17f243ba6ec97d880ee68
 SHA512 
f25b9bc695de555048f6a24ec9bb603ec6def0449227ce837b6e46f8cda5816c2450aa733257aaa349260b0b7c05b2d5580ad21010a1a45a74e9eb3027e37d98
 DIST passt-2024.05.10.tar.xz 195992 BLAKE2B 
9f4b680daa8103c7de0c92c01824df74e1b221a48cf7724c2c09aae13a3575bdc529eeca01d5015095c51194045e1019bbdf38cc7ef2333d61eaa03b4e0249ae
 SHA512 
04add1113ffbc98d61b7c63352899505d8f19bbdf937a0c025726813163ec7fc31abdb94c12ceefed9b49f18b388acc0687298bce8ba156bbb044d1b1bcdaee3
 DIST passt-2024.06.07.tar.xz 198360 BLAKE2B 
378d4b18f245309fde54b244ffc435afb417d9d9711247234632ba0ae8dea35cac639c7674e6a6be008a678262af74a1dbe960477088d0b75045e6372d329488
 SHA512 
103955058c9a4e83264d3f65e3ff6d1a5e8a83b15f2fc73cba45101304fe79ab3c449ce2dc6add398a27f9d6556d5f902cf083223ed5e27228a0bbb506559cf0
+DIST passt-2024.08.21.tar.xz 198360 BLAKE2B 
378d4b18f245309fde54b244ffc435afb417d9d9711247234632ba0ae8dea35cac639c7674e6a6be008a678262af74a1dbe960477088d0b75045e6372d329488
 SHA512 
103955058c9a4e83264d3f65e3ff6d1a5e8a83b15f2fc73cba45101304fe79ab3c449ce2dc6add398a27f9d6556d5f902cf083223ed5e27228a0bbb506559cf0

diff --git a/net-misc/passt/passt-2024.08.21.ebuild 
b/net-misc/passt/passt-2024.08.21.ebuild
new file mode 100644
index ..056444e46eba
--- /dev/null
+++ b/net-misc/passt/passt-2024.08.21.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="User-mode networking daemons for VMs and namespaces, replacement 
for Slirp"
+HOMEPAGE="https://passt.top/";
+
+RELEASE_COMMIT="8a83b53"
+
+if [[ ${PV} == * ]]; then
+   inherit git-r3
+   EGIT_REPO_URI="https://passt.top/passt";
+else
+   
SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
+   S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
+   KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
+fi
+
+LICENSE="BSD GPL-2+"
+SLOT="0"
+IUSE="static"
+
+src_prepare() {
+   default
+   tc-export CC
+}
+
+src_compile() {
+   [[ ${PV} != * ]] && export VERSION="${PV}"
+   export prefix="${EPREFIX}/usr" docdir="${EPREFIX}/usr/share/doc/${P}"
+
+   emake $(usev static)
+}



[gentoo-commits] repo/gentoo:master commit in: net-misc/passt/

2024-08-31 Thread Zac Medico
commit: dd01dfed9af62b7f5c729bf3978108fae9c541d7
Author: Michal Privoznik  gmail  com>
AuthorDate: Fri Aug 30 07:43:40 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 31 17:53:03 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd01dfed

net-misc/passt: Don't apply Makefile-2024.03.20.patch on live ebuild

The passt's Makefile was changed so that it no longed enables
_FORTIFY_SOURCE explicitly [1]. This means, the patch that's
applied on top can be dropped.

1: https://passt.top/passt/commit/?id=38363964fc96008761195984c989b036227e0e5c
Signed-off-by: Michal Privoznik  gmail.com>
From: https://github.com/gentoo/gentoo/pull/38342
Signed-off-by: Zac Medico  gentoo.org>

 net-misc/passt/passt-.ebuild | 4 
 1 file changed, 4 deletions(-)

diff --git a/net-misc/passt/passt-.ebuild b/net-misc/passt/passt-.ebuild
index 37ba4d13c25f..056444e46eba 100644
--- a/net-misc/passt/passt-.ebuild
+++ b/net-misc/passt/passt-.ebuild
@@ -23,10 +23,6 @@ LICENSE="BSD GPL-2+"
 SLOT="0"
 IUSE="static"
 
-PATCHES=(
-   "${FILESDIR}"/Makefile-2024.03.20.patch
-)
-
 src_prepare() {
default
tc-export CC



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-09-01 Thread Zac Medico
commit: 7f6b2b04878209130d44fc06105f521bae2b2173
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug 31 05:35:32 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Sep  1 06:58:56 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=7f6b2b04

asyncio: Use default sleep implementation when possible

When a loop argument is not given, use the default asyncio sleep
implementation and avoid unnecessary _wrap_loop usage.

Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index 23c664e763..a235d87246 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -210,9 +210,12 @@ def sleep(delay, result=None, loop=None):
 @param result: result of the future
 @type loop: asyncio.AbstractEventLoop (or compatible)
 @param loop: event loop
-@rtype: asyncio.Future (or compatible)
-@return: an instance of Future
+@rtype: collections.abc.Coroutine or asyncio.Future
+@return: an instance of Coroutine or Future
 """
+if loop is None:
+return _real_asyncio.sleep(delay, result=result)
+
 loop = _wrap_loop(loop)
 future = loop.create_future()
 handle = loop.call_later(delay, future.set_result, result)



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-08-31 Thread Zac Medico
commit: ee17cbd807ba976491e4c657be8aa9b9a29fe059
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug 31 19:06:25 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 31 19:06:25 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee17cbd8

_safe_loop: Discard wrapped asyncio.run loop that was closed

Since commit cb0c09d8cecb, _get_running_loop can wrap loops from
asyncio.run, so these loops need to be discarded if they've been
closed.

Fixes: cb0c09d8cecb ("Support coroutine exitfuncs for non-main loops")
Bug: https://bugs.gentoo.org/938761
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index bdacda59ce..23c664e763 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -311,6 +311,13 @@ def _safe_loop(create: Optional[bool] = True) -> 
Optional[_AsyncioEventLoop]:
 _thread_weakrefs.loops = weakref.WeakValueDictionary()
 try:
 loop = _thread_weakrefs.loops[thread_key]
+if loop.is_closed():
+# Discard wrapped asyncio.run loop that was closed.
+del _thread_weakrefs.loops[thread_key]
+if loop is _thread_weakrefs.mainloop:
+_thread_weakrefs.mainloop = None
+loop = None
+raise KeyError(thread_key)
 except KeyError:
 if not create:
 return None



[gentoo-commits] proj/portage:master commit in: lib/portage/util/futures/_asyncio/

2024-09-01 Thread Zac Medico
commit: e5457915f7929db3781ded384bdb089b0760221f
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug 31 17:32:12 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Sep  1 06:59:34 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5457915

asyncio: Use default ensure_future implementation when possible

When a loop argument is not given, use the default asyncio
ensure_future implementation and avoid unnecessary _wrap_loop
usage.

Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/portage/util/futures/_asyncio/__init__.py 
b/lib/portage/util/futures/_asyncio/__init__.py
index a235d87246..48d9b68104 100644
--- a/lib/portage/util/futures/_asyncio/__init__.py
+++ b/lib/portage/util/futures/_asyncio/__init__.py
@@ -186,6 +186,9 @@ def ensure_future(coro_or_future, loop=None):
 @rtype: asyncio.Future (or compatible)
 @return: an instance of Future
 """
+if loop is None:
+return _real_asyncio.ensure_future(coro_or_future)
+
 loop = _wrap_loop(loop)
 if isinstance(loop._asyncio_wrapper, _AsyncioEventLoop):
 # Use the real asyncio loop and ensure_future.



[gentoo-commits] repo/gentoo:master commit in: net-misc/passt/

2024-09-01 Thread Zac Medico
commit: df9764779da1097f2715c56bc281340702b9ebf3
Author: Sasha Finkelstein  gmail  com>
AuthorDate: Sun Sep  1 18:46:28 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Sep  1 18:49:03 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df976477

net-misc/passt: Actually build 2024.08.21 instead of 2024.06.07

Closes: https://bugs.gentoo.org/938882

Signed-off-by: Sasha Finkelstein  gmail.com>
Fixes: 10ee7afe94f4 ("net-misc/passt: add 2024.08.21")
Closes: https://github.com/gentoo/gentoo/pull/38366
Signed-off-by: Zac Medico  gentoo.org>

 net-misc/passt/Manifest  | 2 +-
 .../{passt-2024.08.21.ebuild => passt-2024.08.21-r1.ebuild}  | 9 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/net-misc/passt/Manifest b/net-misc/passt/Manifest
index 6822119362e6..3be7239020e1 100644
--- a/net-misc/passt/Manifest
+++ b/net-misc/passt/Manifest
@@ -3,4 +3,4 @@ DIST passt-2024.04.05.tar.xz 195772 BLAKE2B 
4c237aeda56455f948d4309624d171612d59
 DIST passt-2024.04.26.tar.xz 196148 BLAKE2B 
f3a9b9d2a9fa42e0dd35894d4c92890af9935965ccfb3b1751c396080ab0482bd541fe22f09ae7b068f336f1e985b6905d2cc93987a17f243ba6ec97d880ee68
 SHA512 
f25b9bc695de555048f6a24ec9bb603ec6def0449227ce837b6e46f8cda5816c2450aa733257aaa349260b0b7c05b2d5580ad21010a1a45a74e9eb3027e37d98
 DIST passt-2024.05.10.tar.xz 195992 BLAKE2B 
9f4b680daa8103c7de0c92c01824df74e1b221a48cf7724c2c09aae13a3575bdc529eeca01d5015095c51194045e1019bbdf38cc7ef2333d61eaa03b4e0249ae
 SHA512 
04add1113ffbc98d61b7c63352899505d8f19bbdf937a0c025726813163ec7fc31abdb94c12ceefed9b49f18b388acc0687298bce8ba156bbb044d1b1bcdaee3
 DIST passt-2024.06.07.tar.xz 198360 BLAKE2B 
378d4b18f245309fde54b244ffc435afb417d9d9711247234632ba0ae8dea35cac639c7674e6a6be008a678262af74a1dbe960477088d0b75045e6372d329488
 SHA512 
103955058c9a4e83264d3f65e3ff6d1a5e8a83b15f2fc73cba45101304fe79ab3c449ce2dc6add398a27f9d6556d5f902cf083223ed5e27228a0bbb506559cf0
-DIST passt-2024.08.21.tar.xz 198360 BLAKE2B 
378d4b18f245309fde54b244ffc435afb417d9d9711247234632ba0ae8dea35cac639c7674e6a6be008a678262af74a1dbe960477088d0b75045e6372d329488
 SHA512 
103955058c9a4e83264d3f65e3ff6d1a5e8a83b15f2fc73cba45101304fe79ab3c449ce2dc6add398a27f9d6556d5f902cf083223ed5e27228a0bbb506559cf0
+DIST passt-2024.08.21-r1.tar.xz 209692 BLAKE2B 
1b6b540f64528e375e6f0cfd90cec788b2b2281f7ab6dbe0f6df933757dcc4f37e154b2cd8e9e00adbc2b647a044fca05f2c48f49d05c0443c396831a2e13754
 SHA512 
ec09210b471377cc9f3d0044c97924834fadcfed7523aaab2f6c0fddb2d3d098c0730d1573e7c44963334d33dba5fbf660b0b222d4c71fab27cebf8edb52abf1

diff --git a/net-misc/passt/passt-2024.08.21.ebuild 
b/net-misc/passt/passt-2024.08.21-r1.ebuild
similarity index 77%
rename from net-misc/passt/passt-2024.08.21.ebuild
rename to net-misc/passt/passt-2024.08.21-r1.ebuild
index 056444e46eba..c5749fff3812 100644
--- a/net-misc/passt/passt-2024.08.21.ebuild
+++ b/net-misc/passt/passt-2024.08.21-r1.ebuild
@@ -8,14 +8,15 @@ inherit toolchain-funcs
 DESCRIPTION="User-mode networking daemons for VMs and namespaces, replacement 
for Slirp"
 HOMEPAGE="https://passt.top/";
 
-RELEASE_COMMIT="8a83b53"
+RELEASE_COMMIT="1d6142f"
+MY_PV="${PV//./_}.${RELEASE_COMMIT}"
 
 if [[ ${PV} == * ]]; then
inherit git-r3
EGIT_REPO_URI="https://passt.top/passt";
 else
-   
SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> 
${P}.tar.xz"
-   S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
+   SRC_URI="https://passt.top/passt/snapshot/passt-${MY_PV}.tar.xz -> 
${PF}.tar.xz"
+   S="${WORKDIR}/${PN}-${MY_PV}"
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
 fi
 
@@ -30,7 +31,7 @@ src_prepare() {
 
 src_compile() {
[[ ${PV} != * ]] && export VERSION="${PV}"
-   export prefix="${EPREFIX}/usr" docdir="${EPREFIX}/usr/share/doc/${P}"
+   export prefix="${EPREFIX}/usr" docdir="${EPREFIX}/usr/share/doc/${PF}"
 
emake $(usev static)
 }



[gentoo-commits] repo/gentoo:master commit in: sys-fs/linux-apfs-rw/

2024-07-28 Thread Zac Medico
commit: f37aa8023fa8e23a31a867c43d02d9799e89257a
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Jul 28 23:43:51 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Jul 28 23:45:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f37aa802

sys-fs/linux-apfs-rw: add 0.3.10

Includes this set_blocksize pointer type fix for kernel 6.10:

https://github.com/linux-apfs/linux-apfs-rw/commit/071cdacc32e15c6121b925c130ff6b509dfc5693

Closes: https://bugs.gentoo.org/936845
Signed-off-by: Zac Medico  gentoo.org>

 sys-fs/linux-apfs-rw/Manifest   | 2 +-
 .../{linux-apfs-rw-0.3.9.ebuild => linux-apfs-rw-0.3.10.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-fs/linux-apfs-rw/Manifest b/sys-fs/linux-apfs-rw/Manifest
index 09edd1b8f6dc..f1dfb52b34db 100644
--- a/sys-fs/linux-apfs-rw/Manifest
+++ b/sys-fs/linux-apfs-rw/Manifest
@@ -1 +1 @@
-DIST linux-apfs-rw-0.3.9.tar.gz 209682 BLAKE2B 
663007f1b7c7af6cf4198066b6ba141c3bb625685508fe06f72bb3654438bac03ecc50204227fd724d16a4bb757f0df9ed7d19fb08fece8b98f08da9cfb3c8f5
 SHA512 
b241044c6faa175c1523f0ba391f9bb9ba336b3c39fd3528f43e0df5e9c6090691ab226091948f9f32f33748e8c435a0881ccc00fed4badca97d195c1982f9a7
+DIST linux-apfs-rw-0.3.10.tar.gz 210033 BLAKE2B 
a7714ed7e0f2334fe8b534cf88cca5c5dba62592046e8c4957171350de17d808fb64cc809facd2b385ef27b7f8c3f6001e675e34437c609daf5b6b2cd9afd1f0
 SHA512 
cebdbbda67f282edaf00e6b1da9ed4905a068205c2af6a1b723da4007c39c3ea02c2a2935e2e07395b51dda58b6f1ad00beb9547fed81690f77455b96fb9e672

diff --git a/sys-fs/linux-apfs-rw/linux-apfs-rw-0.3.9.ebuild 
b/sys-fs/linux-apfs-rw/linux-apfs-rw-0.3.10.ebuild
similarity index 100%
rename from sys-fs/linux-apfs-rw/linux-apfs-rw-0.3.9.ebuild
rename to sys-fs/linux-apfs-rw/linux-apfs-rw-0.3.10.ebuild



[gentoo-commits] repo/gentoo:master commit in: sys-apps/yarn/

2024-07-30 Thread Zac Medico
commit: 347cfef6bae84210b9828345ff2300d6789d33aa
Author: Filip Kobierski  pm  me>
AuthorDate: Tue Jul 30 12:59:52 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Jul 31 03:06:57 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=347cfef6

sys-apps/yarn: drop old

Signed-off-by: Filip Kobierski  pm.me>
Closes: https://github.com/gentoo/gentoo/pull/37815
Signed-off-by: Zac Medico  gentoo.org>

 sys-apps/yarn/Manifest|  3 ---
 sys-apps/yarn/yarn-1.22.17.ebuild | 40 ---
 sys-apps/yarn/yarn-1.22.19.ebuild | 40 ---
 sys-apps/yarn/yarn-1.22.21.ebuild | 40 ---
 4 files changed, 123 deletions(-)

diff --git a/sys-apps/yarn/Manifest b/sys-apps/yarn/Manifest
index b3e157667ab3..77b9534a1b56 100644
--- a/sys-apps/yarn/Manifest
+++ b/sys-apps/yarn/Manifest
@@ -1,4 +1 @@
-DIST yarn-v1.22.17.tar.gz 1246198 BLAKE2B 
ae0b86cdb248a0f81d1a4a23d15ef9aab185fcda7ef7f8873959c3e54dfc305219afb2416264911098c4e3a6a65a33d248ff97c8e0ca043b118de64e003c3d9b
 SHA512 
1f4a76e35057687d1437d21e1fffd14fcdad9793df36b695a52a44a16f844fb966a29342eb5799f80f880ef53c14ce86a39bf1d7ad929dc0cbf09d598d106b89
-DIST yarn-v1.22.19.tar.gz 1244259 BLAKE2B 
f103d148bafa76bddcdf9e26356fbebba87f7c7c707f823a54404302571e1d09e25569406fc721d74f53cfdac8706dec6bd40da39b7d44000381b1f36d0d8de0
 SHA512 
ff4579ab459bb25aa7c0ff75b62acebe576f6084b36aa842971cf250a5d8c6cd3bc9420b22ce63c7f93a0857bc6ef29291db39c3e7a23aab5adfd5a4dd6c5d71
-DIST yarn-v1.22.21.tar.gz 1243124 BLAKE2B 
99a53db799f07c6aed1bb8d5d2997b6caef6d518118ef8bea4974fdaf3cc0b6a7a7fa17fb9244c8fb2915bffed77d5ed8dd701eecdcf4491d26b68f92750d8c7
 SHA512 
75fc33d00ee14733272c04090b3a646fb4021fce85103b2451f01f60f47be7dc9811c76b26465fe6a3735996ac55fd9e80f918cc45422af0888047f4c9ba8f9d
 DIST yarn-v1.22.22.tar.gz 1247457 BLAKE2B 
a81ec778e774f85da6d5802d4abbc579f1c9194f6e2681ef239cc336e4ec2b502b412f303fa4a8c61dda08a00444e120487e04aa19e89113f844c0db4fd54098
 SHA512 
c8b361ca353e3ca15e32eadf7f1617449f485fe488860e49774ea35dac1544f39ab1104f82bf24528de6e553eef53c4604a560e522dfab8433425ee13ccfd6f9

diff --git a/sys-apps/yarn/yarn-1.22.17.ebuild 
b/sys-apps/yarn/yarn-1.22.17.ebuild
deleted file mode 100644
index bb8df23d1c0e..
--- a/sys-apps/yarn/yarn-1.22.17.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_P="${PN}-v${PV}"
-
-DESCRIPTION="Fast, reliable, and secure node dependency management"
-HOMEPAGE="https://yarnpkg.com";
-SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/${MY_P}.tar.gz";
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
-IUSE=""
-
-RDEPEND="!dev-util/cmdtest
-   net-libs/nodejs"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
-   default
-   sed -i 's/"installationMethod": "tar"/"installationMethod": 
"portage"/g' "${S}/package.json" || die
-}
-
-src_install() {
-   local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang
-   insinto "${install_dir}"
-   doins -r .
-   dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
-   dosym "../$(get_libdir)/node_modules/yarn/bin/yarnpkg" 
"/usr/bin/yarnpkg"
-
-   while read -r -d '' path; do
-   read -r shebang < "${ED}${path}" || die
-   [[ "${shebang}" == \#\!* ]] || continue
-   fperms +x "${path}"
-   done < <(find "${ED}" -type f -printf '/%P\0' || die)
-}

diff --git a/sys-apps/yarn/yarn-1.22.19.ebuild 
b/sys-apps/yarn/yarn-1.22.19.ebuild
deleted file mode 100644
index a1a20e84d28e..
--- a/sys-apps/yarn/yarn-1.22.19.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_P="${PN}-v${PV}"
-
-DESCRIPTION="Fast, reliable, and secure node dependency management"
-HOMEPAGE="https://yarnpkg.com";
-SRC_URI="https://github.com/yarnpkg/yarn/releases/download/v${PV}/${MY_P}.tar.gz";
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
-IUSE=""
-
-RDEPEND="!dev-util/cmdtest
-   net-libs/nodejs"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
-   default
-   sed -i 's/"installationMethod": "tar"/"installationMethod": 
"portage"/g' "${S}/package.json" || die
-}
-
-src_install() {
-   local install_dir

[gentoo-commits] repo/gentoo:master commit in: net-vpn/fp-multiuser/

2024-07-31 Thread Zac Medico
commit: 924130e2955b05fd2ca3f3dbd14ccefe2cb7b02b
Author: Filip Kobierski  pm  me>
AuthorDate: Wed Jul 31 11:07:25 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Jul 31 21:49:36 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=924130e2

net-vpn/fp: fix drop empty IUSE

Signed-off-by: Filip Kobierski  pm.me>
From: https://github.com/gentoo/gentoo/pull/37849
Signed-off-by: Zac Medico  gentoo.org>

 net-vpn/fp-multiuser/fp-multiuser-0.0.2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-vpn/fp-multiuser/fp-multiuser-0.0.2.ebuild 
b/net-vpn/fp-multiuser/fp-multiuser-0.0.2.ebuild
index bc98553b747e..358f00f4c30e 100644
--- a/net-vpn/fp-multiuser/fp-multiuser-0.0.2.ebuild
+++ b/net-vpn/fp-multiuser/fp-multiuser-0.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -12,7 +12,7 @@ 
SRC_URI="https://github.com/gofrp/fp-multiuser/archive/v${PV}.tar.gz -> ${P}.tar
 LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE=""
+
 RDEPEND="
acct-user/fp-multiuser
acct-group/fp-multiuser"



[gentoo-commits] proj/portage:master commit in: lib/portage/, lib/portage/util/_async/, lib/portage/tests/, ...

2024-08-10 Thread Zac Medico
commit: d6710ee0cdab2a212ff70503f9699f1be4660bb4
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Aug  8 14:58:31 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Thu Aug  8 14:58:31 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=d6710ee0

run_exitfuncs: Support loop close via hook

Handle the case where the loop has not been explicitly closed before
exit. In this case, run_exitfuncs previously tried to call coroutine
functions as though they were normal functions, which obvously would
not behave correctly.

Solve this problem by storing the coroutine functions in a separate
_coroutine_exithandlers list that belongs exclusively to the
run_coroutine_exitfuncs function, so that it is safe to close the
loop and call run_coroutine_exitfuncs from inside a run_exitfuncs
hook. A _thread_weakrefs_atexit hook already exists that will close
weakly referenced loops. The _thread_weakrefs_atexit hook is now
fixed to release its lock when it closes a loop, since the same
lock may need to be re-acquired when run_coroutine_exitfuncs runs.

The included test case demonstrates that run_exitfuncs will run
via an atexit hook and correctly terminate the socks5 proxy in a
standalone program using the portage API (like eclean).

Due to a deadlock that will occur if an _exit_function atexit hook
from the multiprocessing module executes before run_exitfuncs, a
portage.process._atexit_register_run_exitfuncs() function needs to
be called in order to re-order the hooks after the first process
has been started via the multiprocessing module. The natural place
to call this is in the ForkProcess class, using a global variable
to trigger the call just once.

Fixes: c3ebdbb42e72 ("elog/mod_custom: Spawn processes in background")
Bug: https://bugs.gentoo.org/937384
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/process.py| 37 ---
 lib/portage/tests/__init__.py | 19 
 lib/portage/tests/util/test_socks5.py | 66 ---
 lib/portage/util/_async/ForkProcess.py|  8 
 lib/portage/util/futures/_asyncio/__init__.py | 24 ++
 5 files changed, 133 insertions(+), 21 deletions(-)

diff --git a/lib/portage/process.py b/lib/portage/process.py
index 6e4e0d7162..23e2507b53 100644
--- a/lib/portage/process.py
+++ b/lib/portage/process.py
@@ -3,6 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
+import asyncio as _asyncio
 import atexit
 import errno
 import fcntl
@@ -193,6 +194,7 @@ def spawn_fakeroot(mycommand, fakeroot_state=None, 
opt_name=None, **keywords):
 
 
 _exithandlers = []
+_coroutine_exithandlers = []
 
 
 def atexit_register(func, *args, **kargs):
@@ -200,7 +202,12 @@ def atexit_register(func, *args, **kargs):
 what is registered.  For example, when portage restarts itself via
 os.execv, the atexit module does not work so we have to do it
 manually by calling the run_exitfuncs() function in this module."""
-_exithandlers.append((func, args, kargs))
+# The internal asyncio wrapper module would trigger a circular import
+# if used here.
+if _asyncio.iscoroutinefunction(func):
+_coroutine_exithandlers.append((func, args, kargs))
+else:
+_exithandlers.append((func, args, kargs))
 
 
 def run_exitfuncs():
@@ -232,12 +239,16 @@ async def run_coroutine_exitfuncs():
 This is the same as run_exitfuncs but it uses asyncio.iscoroutinefunction
 to check which functions to run. It is called by the AsyncioEventLoop
 _close_main method just before the loop is closed.
+
+If the loop is explicitly closed before exit, then that will cause
+run_coroutine_exitfuncs to run before run_exitfuncs. Otherwise, a
+run_exitfuncs hook will close it, causing run_coroutine_exitfuncs to be
+called via run_exitfuncs.
 """
 tasks = []
-for index, (func, targs, kargs) in 
reversed(list(enumerate(_exithandlers))):
-if asyncio.iscoroutinefunction(func):
-del _exithandlers[index]
-tasks.append(asyncio.ensure_future(func(*targs, **kargs)))
+while _coroutine_exithandlers:
+func, targs, kargs = _coroutine_exithandlers.pop()
+tasks.append(asyncio.ensure_future(func(*targs, **kargs)))
 tracebacks = []
 exc_info = None
 for task in tasks:
@@ -255,7 +266,21 @@ async def run_coroutine_exitfuncs():
 raise exc_info[1].with_traceback(exc_info[2])
 
 
-atexit.register(run_exitfuncs)
+def _atexit_register_run_exitfuncs():
+"""
+Register the run_exitfuncs atexit hook. If this hook is not called
+before the multiprocessing module's _exit_function, then there will
+be a deadlock. In order to prevent the deadlock, this function must
+be called in order to re-order the hooks after the first process has
+been started via the multiprocessing module. The n

[gentoo-commits] repo/gentoo:master commit in: dev-util/android-tools/

2024-08-10 Thread Zac Medico
commit: 7dd40271d9f5637cab1e93cd7df57a6da7bed9bd
Author: Paul Zander  gmail  com>
AuthorDate: Wed Jun 12 23:13:06 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 10 19:22:50 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dd40271

dev-util/android-tools: add 35.0.1

Signed-off-by: Paul Zander  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38069
Signed-off-by: Zac Medico  gentoo.org>

 dev-util/android-tools/Manifest|  1 +
 dev-util/android-tools/android-tools-35.0.1.ebuild | 99 ++
 2 files changed, 100 insertions(+)

diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest
index a0025f84e65a..d4dcccbb0515 100644
--- a/dev-util/android-tools/Manifest
+++ b/dev-util/android-tools/Manifest
@@ -3,3 +3,4 @@ DIST android-tools-33.0.3.tar.xz 25300756 BLAKE2B 
4254f0ab8657966cf56e2a7c3e9a3d
 DIST android-tools-34.0.0.tar.xz 37882448 BLAKE2B 
19698c08dd650abba61e5cad9f7474ee3993f5b1fd2f173221560e5ccfc1677093758c325833993a68058c1427e132986b009f9e69a1eae9c4447053920b6feb
 SHA512 
2d24cd95df7da1efa902fab3c848e2ebf09d3335fac61e667b19e1892e95c30a850413d354ceda72a402014623bbda4154cc33fb93a62c31fece8857efbbd596
 DIST android-tools-34.0.1.tar.xz 37904276 BLAKE2B 
6b4d31dadbc646d52c8abd65602264dc16127eb36286d23be447539b0d9b46154592a04af37b3e7617933e62529e953b958db8cb77622e72cfe5ab176f822437
 SHA512 
413ddcca9a461d1c0a12d7fd19b9d8955619b281e1153318ed961bec17ad92bec103671abc8d63525bc83669376f37c11c887cc4cada85719120dff6c3951274
 DIST android-tools-34.0.5.tar.xz 19389824 BLAKE2B 
a86ad9d22c356d2b3d0d85dd17e5540b5d105a286dd07946659dac4ab6d1e8285eecbbf0377c542ac6ca78e0af8df320a97e24ea2b735bbec66a2d2b23d2099c
 SHA512 
2edea0c7a4c2f63531a8b5f518ed4dc9c315d08d8b23d3fac3b7024e2297860465f6df9fad43c9925fb80b5a50f5f3f4744886b552818bf3e961ba0372212496
+DIST android-tools-35.0.1.tar.xz 21460424 BLAKE2B 
e87a4ad13e5b8030069c87cbbe47f369e797e319aa3a054a668ad55f4cdd7445e5ef7825f2d185f6891958fd52f815ee0cb3909649ee3ea703061d72d0ab
 SHA512 
2dc3831f29a2c5ffc57978e4a6fa6d1469bcb0740750779b3e4f8239eaec87864f3474254a2d649ab630062be091d8b44a4e45c7e7b7e033f3b4481f81d76296

diff --git a/dev-util/android-tools/android-tools-35.0.1.ebuild 
b/dev-util/android-tools/android-tools-35.0.1.ebuild
new file mode 100644
index ..0ff6f3bbb94f
--- /dev/null
+++ b/dev-util/android-tools/android-tools-35.0.1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-r1
+
+DESCRIPTION="Android platform tools (adb, fastboot, and mkbootimg)"
+HOMEPAGE="https://github.com/nmeum/android-tools/ 
https://developer.android.com/";
+
+MY_PV="${PV//_/}"
+SRC_URI="https://github.com/nmeum/android-tools/releases/download/${MY_PV}/${PN}-${MY_PV}.tar.xz
+   https://dev.gentoo.org/~zmedico/dist/${PN}-31.0.3-no-gtest.patch
+"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+# The entire source code is Apache-2.0, except for fastboot which is BSD-2.
+LICENSE="Apache-2.0 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="python udev"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# dev-libs/libpcre only required for e2fsdroid
+DEPEND="
+   app-arch/brotli:=
+   app-arch/lz4:=
+   app-arch/zstd:=
+   dev-libs/libpcre2:=
+   >=dev-libs/protobuf-3.0.0:=
+   sys-libs/zlib:=
+   virtual/libusb:1=
+"
+RDEPEND="${DEPEND}
+   udev? ( dev-util/android-udev-rules )
+   python? ( ${PYTHON_DEPS} )
+"
+BDEPEND="
+   dev-lang/go
+   dev-lang/perl
+"
+
+DOCS=()
+
+src_prepare() {
+   eapply "${DISTDIR}/${PN}-31.0.3-no-gtest.patch"
+
+   cd "${S}/vendor/core" || die
+   eapply 
"${S}/patches/core/0011-Remove-the-useless-dependency-on-gtest.patch"
+
+   cd "${S}/vendor/libziparchive" || die
+   eapply 
"${S}/patches/libziparchive/0004-Remove-the-useless-dependency-on-gtest.patch"
+
+   cd "${S}" || die
+   rm -r patches || die
+   cmake_src_prepare
+}
+
+src_configure() {
+   local mycmakeargs=(
+   # Statically link the bundled boringssl
+   -DCMAKE_BUILD_TYPE=Release \
+   -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+   -DCMAKE_C_FLAGS="$CFLAGS" \
+   -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
+   -Dprotobuf_MODULE_COMPATIBLE=ON
+   -DBUILD_SHARED_LIBS=OFF
+   )
+   cmake_src_configure
+}
+
+src_compile() {
+   export GOCACHE="${T}/go-build"
+   export GOFLAGS="-mod=vendor"
+   cmake_src_compile
+}
+
+src_install() {
+   cmake_src_install
+   rm "${ED}/usr/bin/mkbootimg" |

[gentoo-commits] repo/gentoo:master commit in: dev-util/android-tools/files/, dev-util/android-tools/

2024-08-10 Thread Zac Medico
commit: e987962a39893738df90b693c49508a18cd13cea
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Aug 10 19:34:38 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Aug 10 19:34:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e987962a

dev-util/android-tools: drop 34.0.0, 34.0.1

Signed-off-by: Zac Medico  gentoo.org>

 dev-util/android-tools/Manifest|  2 -
 dev-util/android-tools/android-tools-34.0.0.ebuild | 94 
 dev-util/android-tools/android-tools-34.0.1.ebuild | 99 --
 .../files/android-tools-34.0.0-protobuf.patch  | 41 -
 .../android-tools-34.0.1-include-algorithm.patch   | 45 --
 5 files changed, 281 deletions(-)

diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest
index d4dcccbb0515..7e060f5bdad4 100644
--- a/dev-util/android-tools/Manifest
+++ b/dev-util/android-tools/Manifest
@@ -1,6 +1,4 @@
 DIST android-tools-31.0.3-no-gtest.patch 3152 BLAKE2B 
da71e3cba87b21ffcb144602a06d7e269faabd173233363b757cd2191c051f8d3281f591117d4551d7acc029d6e2d421f702f9f836dfe0dec6c676aa39a2d9fe
 SHA512 
a28d2264bf40c420a279acf1f4c3b4588d96ce2d6e2d6d322abbde62d773804bef10dc33f13dd52c7de80ace6c58f91ae28f5d4e8e97dfae4d2a8473d8537423
 DIST android-tools-33.0.3.tar.xz 25300756 BLAKE2B 
4254f0ab8657966cf56e2a7c3e9a3d889dfa9f26e61d8b46480bb74c5a8be33494f450827e3b2db4087006b3160892e6a846ef33719870cbbd032647cfc3ce78
 SHA512 
78c8141f5f13f1c0e5da474e1d79760a612e911519af4e9f21c0e5005f2ce99f3aeacf16f3fcdfe1250fc795a88190fa243592e1066a2156e1fd8d2b9c3d7f71
-DIST android-tools-34.0.0.tar.xz 37882448 BLAKE2B 
19698c08dd650abba61e5cad9f7474ee3993f5b1fd2f173221560e5ccfc1677093758c325833993a68058c1427e132986b009f9e69a1eae9c4447053920b6feb
 SHA512 
2d24cd95df7da1efa902fab3c848e2ebf09d3335fac61e667b19e1892e95c30a850413d354ceda72a402014623bbda4154cc33fb93a62c31fece8857efbbd596
-DIST android-tools-34.0.1.tar.xz 37904276 BLAKE2B 
6b4d31dadbc646d52c8abd65602264dc16127eb36286d23be447539b0d9b46154592a04af37b3e7617933e62529e953b958db8cb77622e72cfe5ab176f822437
 SHA512 
413ddcca9a461d1c0a12d7fd19b9d8955619b281e1153318ed961bec17ad92bec103671abc8d63525bc83669376f37c11c887cc4cada85719120dff6c3951274
 DIST android-tools-34.0.5.tar.xz 19389824 BLAKE2B 
a86ad9d22c356d2b3d0d85dd17e5540b5d105a286dd07946659dac4ab6d1e8285eecbbf0377c542ac6ca78e0af8df320a97e24ea2b735bbec66a2d2b23d2099c
 SHA512 
2edea0c7a4c2f63531a8b5f518ed4dc9c315d08d8b23d3fac3b7024e2297860465f6df9fad43c9925fb80b5a50f5f3f4744886b552818bf3e961ba0372212496
 DIST android-tools-35.0.1.tar.xz 21460424 BLAKE2B 
e87a4ad13e5b8030069c87cbbe47f369e797e319aa3a054a668ad55f4cdd7445e5ef7825f2d185f6891958fd52f815ee0cb3909649ee3ea703061d72d0ab
 SHA512 
2dc3831f29a2c5ffc57978e4a6fa6d1469bcb0740750779b3e4f8239eaec87864f3474254a2d649ab630062be091d8b44a4e45c7e7b7e033f3b4481f81d76296

diff --git a/dev-util/android-tools/android-tools-34.0.0.ebuild 
b/dev-util/android-tools/android-tools-34.0.0.ebuild
deleted file mode 100644
index d8ca6ca82456..
--- a/dev-util/android-tools/android-tools-34.0.0.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit cmake python-r1
-
-DESCRIPTION="Android platform tools (adb, fastboot, and mkbootimg)"
-HOMEPAGE="https://github.com/nmeum/android-tools/ 
https://developer.android.com/";
-
-MY_PV="${PV//_/}"
-SRC_URI="https://github.com/nmeum/android-tools/releases/download/${MY_PV}/${PN}-${MY_PV}.tar.xz
-   https://dev.gentoo.org/~zmedico/dist/${PN}-31.0.3-no-gtest.patch
-"
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-# The entire source code is Apache-2.0, except for fastboot which is BSD-2.
-LICENSE="Apache-2.0 BSD-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 x86"
-IUSE="python udev"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# dev-libs/libpcre only required for e2fsdroid
-DEPEND="
-   app-arch/brotli:=
-   app-arch/lz4:=
-   app-arch/zstd:=
-   dev-libs/libpcre2:=
-   >=dev-libs/protobuf-3.0.0:=
-   sys-libs/zlib:=
-   virtual/libusb:1=
-"
-RDEPEND="${DEPEND}
-   udev? ( dev-util/android-udev-rules )
-   python? ( ${PYTHON_DEPS} )
-"
-BDEPEND="
-   dev-lang/go
-   dev-lang/perl
-"
-
-DOCS=()
-
-src_prepare() {
-   eapply "${DISTDIR}/${PN}-31.0.3-no-gtest.patch"
-
-   cd "${S}/vendor/core" || die
-   eapply 
"${S}/patches/core/0011-Remove-the-useless-dependency-on-gtest.patch"
-
-   cd "${S}/vendor/libziparchive" || die
-   eapply 
"${S}/patches/libziparchive/0004-Remove-the-useless-dependency-on-gtest.patch"
-
-   cd "${S}" || die
-   rm -r patches || die
-   cmake_src_prepare
-

[gentoo-commits] repo/gentoo:master commit in: sys-cluster/gmqtt/

2024-08-10 Thread Zac Medico
commit: 783c7311879bbb6a309a07a9cd2c353726f9b61d
Author: Filip Kobierski  pm  me>
AuthorDate: Tue Jul 30 12:12:56 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 04:30:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=783c7311

sys-cluster/gmqtt: remove empty IUSE

Signed-off-by: Filip Kobierski  pm.me>
From: https://github.com/gentoo/gentoo/pull/37810
Signed-off-by: Zac Medico  gentoo.org>

 sys-cluster/gmqtt/gmqtt-0.5.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild 
b/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild
index b43ae3df0986..35a980655fed 100644
--- a/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild
+++ b/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild
@@ -12,7 +12,7 @@ SRC_URI+=" 
https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
 LICENSE="MIT Apache-2.0 BSD BSD-2 ISC MPL-2.0"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE=""
+
 RESTRICT="test"
 
 src_compile() {



[gentoo-commits] repo/gentoo:master commit in: sys-cluster/gmqtt/

2024-08-10 Thread Zac Medico
commit: e3ac183b07024746bde47282bde8dfbc38a0f434
Author: Filip Kobierski  pm  me>
AuthorDate: Tue Jul 30 12:13:17 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 04:30:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3ac183b

sys-cluster/gmqtt: drop 0.4.1

Signed-off-by: Filip Kobierski  pm.me>
Closes: https://github.com/gentoo/gentoo/pull/37810
Signed-off-by: Zac Medico  gentoo.org>

 sys-cluster/gmqtt/Manifest   |  2 --
 sys-cluster/gmqtt/gmqtt-0.4.1.ebuild | 42 
 2 files changed, 44 deletions(-)

diff --git a/sys-cluster/gmqtt/Manifest b/sys-cluster/gmqtt/Manifest
index 63dc1b4dff8c..881b112d7619 100644
--- a/sys-cluster/gmqtt/Manifest
+++ b/sys-cluster/gmqtt/Manifest
@@ -1,4 +1,2 @@
-DIST gmqtt-0.4.1-deps.tar.xz 50641100 BLAKE2B 
e2df0588178f3cee0f96a15c867352d9718deb9ed1b8acb0b0a26bf512308c40797275deee04be3f35d8725018b522aa807638ed17f300c337a062012fddc16d
 SHA512 
6c77dcb5bc6c029296ac8715a5796f20091273e5b322fedbe952086cb81e5abf5d5fbe5b0005f22d674565dff1d3b9dbaf84812ec22203ef1b6ccd629405115d
-DIST gmqtt-0.4.1.tar.gz 338368 BLAKE2B 
4114816d4e60f6421fcea2cb33006f416143040bc85eb97630fcbd588c9fb2e11cd0d1f9e6e56f8ad8461653a5d7772971e4978a3dfca357335309b7c9e138ed
 SHA512 
cad45a7d3d9033d9d345c72bd0568c4e6115964d980ed02451da3fb6fe7fb92785ccc39bf1632c81242b269f5e61caba18255315e12f49d5debcfc1c105a
 DIST gmqtt-0.5.0-deps.tar.xz 2274132 BLAKE2B 
c4eef28fbcf743128e9fee3f62106405343d8a6daeb018f168a16ee67f0028669a04d457ac6127e7528248c69ff38a5f469bbd242f3ce39178f8a44994706649
 SHA512 
d3f6036652d7185306f629db5660245bdb0d4e0f2bfa64ccf4e306bc725cfb2d3757097c32f495595b21ea8750ab7f0907b93b38c8512811e037f65fc38af852
 DIST gmqtt-0.5.0.tar.gz 256487 BLAKE2B 
ce1d032cf13806381c2c0d42aec5592c74b86e938d284252fd01bd23f7eb8b0c0e9b59558be5284b780edd778035c9755a0d6c6da30ccd851c8b3a06f6c49289
 SHA512 
8c696a54386282b51ce6a835fba787f465f862afd5f553fc0039b8e01a6a03660a4103deed346c683e4b0fe98fd3ac4105a3602f28f416f5c544dc6ee960645a

diff --git a/sys-cluster/gmqtt/gmqtt-0.4.1.ebuild 
b/sys-cluster/gmqtt/gmqtt-0.4.1.ebuild
deleted file mode 100644
index f55a01b13d5f..
--- a/sys-cluster/gmqtt/gmqtt-0.4.1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit go-module systemd
-
-DESCRIPTION="MQTT broker library with cluster support that implements MQTT 
V5.0 and V3.1.1"
-HOMEPAGE="https://github.com/DrmagicE/gmqtt";
-SRC_URI="https://github.com/DrmagicE/gmqtt/archive/v${PV}.tar.gz -> ${P}.tar.gz
-   https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
-
-LICENSE="MIT Apache-2.0 BSD BSD-2 ISC MPL-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-RESTRICT+=" test"
-
-src_compile() {
-   GOBIN=${S}/bin CGO_ENABLED=0 go install ./... || die
-}
-
-src_install() {
-   dobin bin/{gmqctl,gmqttd}
-   keepdir /etc/${PN}
-   systemd_dounit "${FILESDIR}/${PN}d.service"
-   newinitd "${FILESDIR}/initd" "${PN}d"
-   newconfd "${FILESDIR}/confd" "${PN}d"
-   insinto /etc/logrotate.d
-   newins "${FILESDIR}/logrotated" "${PN}"
-   docompress -x /usr/share/doc/${PF}/default_config.yml
-   dodoc CONTRIBUTING.md README*.md cmd/gmqttd/default_config.yml
-   docinto federation
-   dodoc -r plugin/federation/{examples,README.md}
-}
-
-pkg_postinst() {
-   local config=/etc/gmqtt/gmqttd.yml dest=${ROOT}/
-   if [[ ! ${REPLACING_VERSIONS} && ! -e ${ROOT}${config} ]]; then
-   einfo "Copying default config to ${config} for first install"
-   cp "${ROOT}/usr/share/doc/${PF}/default_config.yml" 
"${ROOT}${config}"
-   fi
-}



[gentoo-commits] repo/gentoo:master commit in: sys-cluster/zookeepercli/

2024-08-11 Thread Zac Medico
commit: be4cc6321e96ce9a6441f177d0d3cf422eec009c
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 17:52:04 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 17:53:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be4cc632

sys-cluster/zookeepercli: Bump to version 1.0.11 from kt315 upstream

Change upstream to github.com/kt315/zookeepercli who added
a go module build and sent it to openark here:

https://github.com/openark/zookeepercli/pull/2

Closes: https://bugs.gentoo.org/937726
Signed-off-by: Zac Medico  gentoo.org>

 sys-cluster/zookeepercli/Manifest  |  4 +--
 sys-cluster/zookeepercli/metadata.xml  |  2 +-
 .../zookeepercli/zookeepercli-1.0.11.ebuild| 22 +
 .../zookeepercli/zookeepercli-1.0.12.ebuild| 37 --
 4 files changed, 24 insertions(+), 41 deletions(-)

diff --git a/sys-cluster/zookeepercli/Manifest 
b/sys-cluster/zookeepercli/Manifest
index b5d863ef49be..98e7003495a5 100644
--- a/sys-cluster/zookeepercli/Manifest
+++ b/sys-cluster/zookeepercli/Manifest
@@ -1,3 +1 @@
-DIST github.com-outbrain-golib-ab954725f502c2be1491afadbbc66da2f99a45ae.tar.gz 
5892 BLAKE2B 
8ac98704758e0ddf121ae088b15873234f14eba14ab86379f3212638787345e618f104608364f21e9d00106242e4942293e4706dbc1bb7e5ddbf19b2f71bd511
 SHA512 
dfb5758f5c26320ca5cdf502c1e3847ed35adb85d09db7df2a0784a3ec0662dc316bab6d88e6aa9e085585fe0157aa9f83a53e30d0ac38b5cc96704e12fa8194
-DIST 
github.com-samuel-go-zookeeper-c4fab1ac1bec58281ad0667dc3f0907a9476ac47.tar.gz 
37110 BLAKE2B 
4c32afe54c27ed1532a50d386217bec3b477ceba3744bb415f906c5b0301db172289455a6631659e98b4600175ad391d09f7c60532bdc5754761a177482be37f
 SHA512 
3dab581a699336979b7be6b9792a877eee9e9fe39157b0774e38831735e1148b522617d246c7c1d146cb8c6dd3faba20cb72b94e9bd85e532f11d20f97e755d9
-DIST zookeepercli-1.0.12.tar.gz 51077 BLAKE2B 
5b5c07305407882845fe339bbc75fd7a521020f588db30303855733c6263409a6c3ad08d5c0bb287cd2c4c03aeb7ff7ee3b544c0b3480fab17952f67d6cca339
 SHA512 
fb18d1a725fe21e98039cdd19f158a344cae008eff319abeabf349921ef9f4b92b0e251ec5e6414102fe66394d287d1aa3c675bd7454665c1a47d0e9cb4fb352
+DIST zookeepercli-1.0.11.tar.gz 39371 BLAKE2B 
b024ce14e893bf9bfe4e2ffe2d5da81bf980907d37f348ac7a7063878ce05fd5f521f2c9cc32d28fb541895c2f635e5b7f0c80006a942384927bdf3a73997367
 SHA512 
91d53e8cbd3075db5f72aeb055b2d22f31948d5c8ad2ea5d3772358866ee728db53736a2cd871242ecd2929fe45ec853329ec089bdf0a88de8e48ff4e6114764

diff --git a/sys-cluster/zookeepercli/metadata.xml 
b/sys-cluster/zookeepercli/metadata.xml
index d58ea8e28fe1..4747695a9df1 100644
--- a/sys-cluster/zookeepercli/metadata.xml
+++ b/sys-cluster/zookeepercli/metadata.xml
@@ -6,6 +6,6 @@
        Zac Medico


-   openark/zookeepercli
+   kt315/zookeepercli

 

diff --git a/sys-cluster/zookeepercli/zookeepercli-1.0.11.ebuild 
b/sys-cluster/zookeepercli/zookeepercli-1.0.11.ebuild
new file mode 100644
index ..9a656b44daab
--- /dev/null
+++ b/sys-cluster/zookeepercli/zookeepercli-1.0.11.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="Simple, lightweight, dependable CLI for ZooKeeper"
+HOMEPAGE="https://github.com/kt315/zookeepercli";
+SRC_URI="https://github.com/kt315/zookeepercli/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+LICENSE+=" BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+   ego build -ldflags "-X main.Version=${PV}" -o ./bin/${PN}
+}
+
+src_install() {
+   dobin bin/${PN}
+   dodoc README.md
+}

diff --git a/sys-cluster/zookeepercli/zookeepercli-1.0.12.ebuild 
b/sys-cluster/zookeepercli/zookeepercli-1.0.12.ebuild
deleted file mode 100644
index c33552c11fc4..
--- a/sys-cluster/zookeepercli/zookeepercli-1.0.12.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGO_PN="github.com/outbrain/zookeepercli"
-EGO_VENDOR=(
-   "github.com/outbrain/golib ab954725f502c2be1491afadbbc66da2f99a45ae"
-   "github.com/samuel/go-zookeeper 
c4fab1ac1bec58281ad0667dc3f0907a9476ac47"
-)
-
-inherit golang-vcs-snapshot
-
-KEYWORDS="~amd64"
-EGIT_COMMIT="v${PV}"
-SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
-   ${EGO_VENDOR_URI}"
-S="${WORKDIR}/${P}/src/${EGO_PN}"
-DESCRIPTION="Simple, lightweight, dependable CLI for ZooKeeper"
-HOMEPAGE="https://github.com/openark/zookeepercli";
-LICENSE="Apache-2.0 BSD"
-SLOT="0"
-IUSE=""
-DEPEND=">=dev-lang/go-1.9:="
-
-src_compile() {
-   export -n GOCACHE XDG_CACHE_HOME #6789

[gentoo-commits] repo/gentoo:master commit in: sys-cluster/kubeletctl/

2024-08-11 Thread Zac Medico
commit: ddcfaf2b0c9838edec93f5b17274d5af978fb464
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 19:42:10 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 19:43:58 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddcfaf2b

sys-cluster/kubeletctl: add 1.12

Closes: https://bugs.gentoo.org/937727
Signed-off-by: Zac Medico  gentoo.org>

 sys-cluster/kubeletctl/Manifest   |  2 ++
 sys-cluster/kubeletctl/kubeletctl-1.12.ebuild | 25 +
 2 files changed, 27 insertions(+)

diff --git a/sys-cluster/kubeletctl/Manifest b/sys-cluster/kubeletctl/Manifest
index d8954572c253..97b51dbb88ac 100644
--- a/sys-cluster/kubeletctl/Manifest
+++ b/sys-cluster/kubeletctl/Manifest
@@ -1,2 +1,4 @@
+DIST kubeletctl-1.12-deps.tar.xz 1586588 BLAKE2B 
e39f271cfa2a5b0e9283139181d0d988c54643985416c1ca5fa09fd266ddcc5621d7b537b1edb2bbfdc386601bd65591417a483752ec6fbfc883e0d0ad3277bd
 SHA512 
b68bfcc0757e7e0d16648bfa35effe27a1040e189e86417c2967047ee956656eca2ed425a7bae609a076b5a5b408ad1ccb36bc4a0b063fb42df5e0b12e61d850
+DIST kubeletctl-1.12.tar.gz 47285 BLAKE2B 
f8d7784b9fd64bd91679ebb7f2306fd1613cfdf95c94f816a0823f7e0fd6892a4f5611c6263aee6363186fac2b984dadf4b5484505bf5eea87efdd3556968b5c
 SHA512 
a18d37cc383d196cf620aa48f37d0c6e95b468d29ddc8f55c8b58bfbd0a781bbfbffaa6e57d18c8ec79998a1fe28c44460321e78c05a0d4620cfe74e045138c7
 DIST kubeletctl-1.6-deps.tar.xz 36450320 BLAKE2B 
266c6ba630543684f5d20b2c0ca4d0703997fc169bb5abe09302d69981ef65e169682cb9f871b39f0ddd0d76932354983709013ece800f94a28e1f9ce9186f73
 SHA512 
82f18a1e4b9dbdd8223fea77735616071893241048a82aa7615977d873aebe10a43c8f11c56dcdc3b5c392c1a150606e478d1b04fe67c5340b5f1ccae3316a3f
 DIST kubeletctl-1.6.tar.gz 47987 BLAKE2B 
f69bf6e1e53a62f0a2f2edfd3a4ee2ec040349136f08077837050bed03de9b6cfc6019cac844227125b979b94976b5336eac5ce42f385c3f60be6b2265e57361
 SHA512 
2701d66980284cf153fe8305cb812a6bb2af550e7c7ee6aa37187a3b9d5d6ae78e4a9c7a46ae3db05b1e4d863f87f48a60091d18c35e46ce71354e894bc6922a

diff --git a/sys-cluster/kubeletctl/kubeletctl-1.12.ebuild 
b/sys-cluster/kubeletctl/kubeletctl-1.12.ebuild
new file mode 100644
index ..da824f7f6ebb
--- /dev/null
+++ b/sys-cluster/kubeletctl/kubeletctl-1.12.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="A client for kubelet"
+HOMEPAGE="https://github.com/cyberark/kubeletctl";
+SRC_URI="https://github.com/cyberark/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+   https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT+=" test"
+
+src_compile() {
+   go build -ldflags "-s -w" || die
+}
+
+src_install() {
+   dobin ${PN}
+   dodoc README.md
+}



[gentoo-commits] repo/gentoo:master commit in: app-misc/yq-go/

2024-08-11 Thread Zac Medico
commit: e7c4cd2f6ab002841a7e120664aa27f55c3725df
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 20:21:13 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 20:24:13 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7c4cd2f

app-misc/yq-go: drop 4.44.1

Signed-off-by: Zac Medico  gentoo.org>

 app-misc/yq-go/Manifest|  2 --
 app-misc/yq-go/yq-go-4.44.1.ebuild | 35 ---
 2 files changed, 37 deletions(-)

diff --git a/app-misc/yq-go/Manifest b/app-misc/yq-go/Manifest
index 2bc06ac70f66..8052e047881a 100644
--- a/app-misc/yq-go/Manifest
+++ b/app-misc/yq-go/Manifest
@@ -1,4 +1,2 @@
-DIST yq-4.44.1-deps.tar.xz 1359068 BLAKE2B 
5db0af65b75dab0148e6167d9264e7601e3f07f26d16d63387820c96d9ac28d91a57c81b300d4dd225f0a4941ce43dde4c5e27391ea9603f6862a9cf8c6564f5
 SHA512 
1670aa675e1776d2ed761c482e29920e1d200bd612e68dd22b62c6d93c8c188ef88ca35262d1f21423924d1337260991e815e332f6af312ea474c5f61226bbff
-DIST yq-4.44.1.tar.gz 296499 BLAKE2B 
6cbcc69acead2ae471e91baccc3fcc3853bba0ade0e707307c9fb724bafc1c51905a9cefb86d7d09b056b01b2c404bc30692f47e293df0894ad3b32ad67c22dd
 SHA512 
afcec4e6f99f38a342a91aff34823823e32df0498c8e617314945a00d2161d28bfcc603dcaac2eb95d510bc57fe63ca2aebf1966b7420536be42f8102564314f
 DIST yq-4.44.2-deps.tar.xz 1376032 BLAKE2B 
ddb988d0eea1aa444ad952ee0aa57d54a6276c7f4a1c5113aa85f1793789efcdb818d0d06a4def1d66e013f1351dfb430a3013770032abd453737cc7e7455540
 SHA512 
459e45068e8048a0ca14a024d3114260437f20426b30351c80e9ee4877dd7ef175c52e54a63dc9e131aaad6a3eac8b361b23f0f06e7257f8b45f20c5dda0
 DIST yq-4.44.2.tar.gz 297469 BLAKE2B 
912436af43b94cd5dc12ac5a9ff04071f35123632b950da1c5324e9ccc4b931815da92f75067055041f9dbe02a3948f716655e7dfe3feb9cab2969ee52f69fc2
 SHA512 
8b81c617dde83487445b8a85f34bb28a363238f58b6b06d7e4b5c3becdafde8f62702acd71ed33eb85601f66e2abec80edbbf1490df90eb67ece55948254c263

diff --git a/app-misc/yq-go/yq-go-4.44.1.ebuild 
b/app-misc/yq-go/yq-go-4.44.1.ebuild
deleted file mode 100644
index e5ffdf984aaa..
--- a/app-misc/yq-go/yq-go-4.44.1.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit go-module
-
-DESCRIPTION="yq is a lightweight and portable command-line YAML, JSON and XML 
processor"
-HOMEPAGE="https://github.com/mikefarah/yq";
-SRC_URI="https://github.com/mikefarah/yq/archive/refs/tags/v${PV}.tar.gz -> 
${P/-go/}.tar.gz
-   https://dev.gentoo.org/~zmedico/dist/${P/-go/}-deps.tar.xz";
-
-S=${WORKDIR}/${P/-go/}
-LICENSE="MIT"
-LICENSE+=" Apache-2.0 BSD BSD-2"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="+yq-symlink"
-DOCS=(README.md)
-RDEPEND="yq-symlink? ( !app-misc/yq[yq-symlink(+)] )"
-
-src_compile() {
-   CGO_ENABLED=0 ego build -ldflags "-X main.GitDescribe=v${PV} -s -w"
-}
-
-src_install() {
-   einstalldocs
-   newbin yq yq-go
-   if use yq-symlink; then
-   dosym yq-go /usr/bin/yq
-   fi
-}
-
-src_test() {
-   ./scripts/test.sh || die
-}



[gentoo-commits] repo/gentoo:master commit in: app-misc/yq-go/

2024-08-11 Thread Zac Medico
commit: fc83101dc52cada9570908e7f5850cd60af26aaa
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 20:22:58 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 20:24:13 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc83101d

app-misc/yq-go: add 4.44.3

Signed-off-by: Zac Medico  gentoo.org>

 app-misc/yq-go/Manifest|  2 ++
 app-misc/yq-go/yq-go-4.44.3.ebuild | 35 +++
 2 files changed, 37 insertions(+)

diff --git a/app-misc/yq-go/Manifest b/app-misc/yq-go/Manifest
index 8052e047881a..f35953d5052c 100644
--- a/app-misc/yq-go/Manifest
+++ b/app-misc/yq-go/Manifest
@@ -1,2 +1,4 @@
 DIST yq-4.44.2-deps.tar.xz 1376032 BLAKE2B 
ddb988d0eea1aa444ad952ee0aa57d54a6276c7f4a1c5113aa85f1793789efcdb818d0d06a4def1d66e013f1351dfb430a3013770032abd453737cc7e7455540
 SHA512 
459e45068e8048a0ca14a024d3114260437f20426b30351c80e9ee4877dd7ef175c52e54a63dc9e131aaad6a3eac8b361b23f0f06e7257f8b45f20c5dda0
 DIST yq-4.44.2.tar.gz 297469 BLAKE2B 
912436af43b94cd5dc12ac5a9ff04071f35123632b950da1c5324e9ccc4b931815da92f75067055041f9dbe02a3948f716655e7dfe3feb9cab2969ee52f69fc2
 SHA512 
8b81c617dde83487445b8a85f34bb28a363238f58b6b06d7e4b5c3becdafde8f62702acd71ed33eb85601f66e2abec80edbbf1490df90eb67ece55948254c263
+DIST yq-4.44.3-deps.tar.xz 1376444 BLAKE2B 
dbccf16fa939991f01762efec5f14f86394a9ff43c46dbe504040a36bf60df4402734a7883c7281617fa43f7f4c8e208b65885f6279648b8ad417cdc8ac9f4de
 SHA512 
0460ba42cc318193b09ab88961dc49e26934a74986f6a9c196e3bceb4d7842401604727be0bd63ba18fa93a237e9b401250b580cc628dd7c61fded86560a0bc9
+DIST yq-4.44.3.tar.gz 297938 BLAKE2B 
9a4e382e2fb5862302aafca2268d8551232b0636adae560151acca1060d8e09c46dc36eee8597d7763d50fc53f36fdc8c1ff3df81f88f637f6b4ad5714c6e116
 SHA512 
ad4971d7a2f3a4355a696027a178d05b7388b26241a097fc8d222f81fb8ed18b908d0e2cefe0210f70bf4e5ee2becef61206def40e908be20e60d5a074c38bb5

diff --git a/app-misc/yq-go/yq-go-4.44.3.ebuild 
b/app-misc/yq-go/yq-go-4.44.3.ebuild
new file mode 100644
index ..277186a7f1e3
--- /dev/null
+++ b/app-misc/yq-go/yq-go-4.44.3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="yq is a lightweight and portable command-line YAML, JSON and XML 
processor"
+HOMEPAGE="https://github.com/mikefarah/yq";
+SRC_URI="https://github.com/mikefarah/yq/archive/refs/tags/v${PV}.tar.gz -> 
${P/-go/}.tar.gz
+   https://dev.gentoo.org/~zmedico/dist/${P/-go/}-deps.tar.xz";
+
+S=${WORKDIR}/${P/-go/}
+LICENSE="MIT"
+LICENSE+=" Apache-2.0 BSD BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~loong"
+IUSE="+yq-symlink"
+DOCS=(README.md)
+RDEPEND="yq-symlink? ( !app-misc/yq[yq-symlink(+)] )"
+
+src_compile() {
+   CGO_ENABLED=0 ego build -ldflags "-X main.GitDescribe=v${PV} -s -w"
+}
+
+src_install() {
+   einstalldocs
+   newbin yq yq-go
+   if use yq-symlink; then
+   dosym yq-go /usr/bin/yq
+   fi
+}
+
+src_test() {
+   ./scripts/test.sh || die
+}



[gentoo-commits] repo/gentoo:master commit in: app-text/yamlfmt/

2024-08-11 Thread Zac Medico
commit: 5fc4d5785ddacffa4f419131ac446533d95b5e0c
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 21:02:26 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 21:05:37 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fc4d578

app-text/yamlfmt: add 0.13.0

Signed-off-by: Zac Medico  gentoo.org>

 app-text/yamlfmt/Manifest  |  2 ++
 app-text/yamlfmt/yamlfmt-0.13.0.ebuild | 30 ++
 2 files changed, 32 insertions(+)

diff --git a/app-text/yamlfmt/Manifest b/app-text/yamlfmt/Manifest
index da258b9b1422..6d078924a540 100644
--- a/app-text/yamlfmt/Manifest
+++ b/app-text/yamlfmt/Manifest
@@ -1,2 +1,4 @@
 DIST yamlfmt-0.12.1-deps.tar.xz 128404 BLAKE2B 
aa976bf73fb0a8094afc0ae480881aaff58c6263a57587ea6ceb22ce67776c424a7ed5d5fae6c38293f1ec5f3821de99e4bfd74f7951b826b2bb211914944c94
 SHA512 
11c9c45535ace449c3784a55707699923dcc2809db4f86a8fdb72b8b99443a92498b1c329cca40771d63414a6571bd4c590df4a304d798bb4c3709fd0edf0ef4
 DIST yamlfmt-0.12.1.tar.gz 40958 BLAKE2B 
3a1187c2a21716a16e6c86ab145eed424bb3eb65ab8b0525c1ad221c27d8be3221f668f0393dcdc117bd4d34c9283bcc30e72ccddf99f61e44050c61e88b3026
 SHA512 
ac39234977d11751802a3a8c2e2140c16e408f987d29aa4ac8e7dd329067c1cef686b0950fa4e4478aeeb214506e7d3fe498734e584abcbc4f3aa48f9f1c7504
+DIST yamlfmt-0.13.0-deps.tar.xz 128464 BLAKE2B 
c51a77b6fa84e88239fe5185761bac4ab74b48f3200a822ef98884bc34670ec07c6b87bc999de77da5da0ea33b501ef911854910f74798a7532575f7c6a36881
 SHA512 
2187441405e028dd0dfb1d302f2a047b47af175d965c7605e5464b6403b4379425f13c5a506cad5bdce6dd424247ced12126722817c02e2afeb23d33be644a1b
+DIST yamlfmt-0.13.0.tar.gz 43334 BLAKE2B 
da1828f6f8ab24236173fd5621781468e123ed4c9521ab2233b6185ab61a2e6744593f280dd786bbe3e0f38fd692b307dcde0cdce4944c9b6468425b9f7898d3
 SHA512 
28cf1d04690ce72a1330c0d93b148516e80b33306067f4dbe1b5056e243202d93ed09293b6fe5c958a341dd590edd61e6c1fdb278b28c88b421fb7364cff10b8

diff --git a/app-text/yamlfmt/yamlfmt-0.13.0.ebuild 
b/app-text/yamlfmt/yamlfmt-0.13.0.ebuild
new file mode 100644
index ..2072a436f857
--- /dev/null
+++ b/app-text/yamlfmt/yamlfmt-0.13.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+EGIT_COMMIT=dd8547d
+DESCRIPTION="An extensible command line tool or library to format yaml files"
+HOMEPAGE="https://github.com/google/yamlfmt";
+SRC_URI="https://github.com/google/yamlfmt/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz
+   https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="Apache-2.0"
+LICENSE+=" BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+   CGO_ENABLED=0 ego build -ldflags "-X main.version=${PV} -X 
main.commit=${EGIT_COMMIT} -s -w" \
+   -o yamlfmt ./cmd/yamlfmt
+}
+
+src_install() {
+   dodoc -r README.md docs
+   dobin yamlfmt
+}
+
+src_test() {
+   emake test
+}



[gentoo-commits] repo/gentoo:master commit in: app-metrics/redis_exporter/

2024-08-11 Thread Zac Medico
commit: da8a86bc58f4217370705181aa9c91cf89ae9282
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 22:44:36 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 22:45:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da8a86bc

app-metrics/redis_exporter: drop 1.44.0

Signed-off-by: Zac Medico  gentoo.org>

 app-metrics/redis_exporter/Manifest|  2 -
 .../redis_exporter/redis_exporter-1.44.0.ebuild| 55 --
 2 files changed, 57 deletions(-)

diff --git a/app-metrics/redis_exporter/Manifest 
b/app-metrics/redis_exporter/Manifest
index 5cab7bd026db..3b154bbebc05 100644
--- a/app-metrics/redis_exporter/Manifest
+++ b/app-metrics/redis_exporter/Manifest
@@ -1,4 +1,2 @@
-DIST redis_exporter-1.44.0-deps.tar.xz 103514884 BLAKE2B 
14531f87fa3c19ab791b77b39687534b66da199012337b72817f2624a7a679424f1a279a3b888eacb34c0cd7a5d0d51cc8fe3c63c92036cbc320b7e9d9d70c7c
 SHA512 
ee8ceb663c15e18991903dab3b4a5dbf2981e040694e02bcd0ff81e5690a8fbdefb775e4ccc2bfcbb7bf757f5023f3ed5ae0c918779682c55ef4d9e11181da55
-DIST redis_exporter-1.44.0.tar.gz 190542 BLAKE2B 
29228825e796def0bfe54ece2e09277fbdb614171e90f02b11b904a14a114aafe6f6810fafad19b2d56749f2edcab13bf03a0ed376310c39a5855715bfef2d53
 SHA512 
29dd210c23258c896e227d373b2c380a61b6a031f919b3da40ba2fb926f3fa534a2b1478e064b19496675935772bdad8ff490485625c1de4d470f377293efafb
 DIST redis_exporter-1.61.0-deps.tar.xz 815816 BLAKE2B 
b57f1d3094e3e03f990a5b26b75d95621d55cdd519882689c640e90b76750b4f7de7d48ebc7dd8456af33e14be14a07644211921667d2ba6b16a5f2567fc8430
 SHA512 
176442e32ec79f8621f57712a2658398f9481f0ddb1c104881305f6cfa36b74833b53078355d7fdd5e4a3d13f546fdfb844d5faf7dc5e38763f7f17228de4d68
 DIST redis_exporter-1.61.0.tar.gz 82438 BLAKE2B 
fe62e6c56206718eaf908de913dcb80dd9e27825dfc74b2f9bef3d4c914b75cfe0223924b852e8b99421ccbd0a3618bc9f9a0aea8c9a7733bcb95221731f7f97
 SHA512 
2528be4680b5cb2b1a1077a3a28ddac8f5a8a4a2b936504553cb218e8c53f8a9d9e52a9266c247f85bda03ae76eec90dbc9ab9bcc8df828d5850538e818d8188

diff --git a/app-metrics/redis_exporter/redis_exporter-1.44.0.ebuild 
b/app-metrics/redis_exporter/redis_exporter-1.44.0.ebuild
deleted file mode 100644
index 8713b5d1d586..
--- a/app-metrics/redis_exporter/redis_exporter-1.44.0.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit go-module systemd
-EGIT_COMMIT=19f7b036bb46869858eec74d8d3fc2186d641399
-
-DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x 
and 4.x"
-HOMEPAGE="https://github.com/oliver006/redis_exporter";
-SRC_URI="https://github.com/oliver006/redis_exporter/archive/v${PV}.tar.gz -> 
${P}.tar.gz
-   https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
-
-LICENSE="MIT Apache-2.0 BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-RDEPEND="
-   acct-user/redis_exporter
-   acct-group/redis_exporter"
-DEPEND="${RDEPEND}"
-RESTRICT+=" test"
-
-src_prepare() {
-   default
-   sed -e 
"s|\(^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*\).*|\1\"${PV}\"|" \
-   -e 
"s|\(^[[:space:]]*BUILD_DATE[[:space:]]*=[[:space:]]*\).*|\1\"$(LC_ALL=C date 
-u)\"|" \
-   -e 
"s|\(^[[:space:]]*COMMIT_SHA1[[:space:]]*=[[:space:]]*\).*|\1\"${EGIT_COMMIT}\"|"
 \
-   -i main.go || die
-}
-
-src_compile() {
-   export GOBIN="${S}/bin"
-   go install \
-   -ldflags="-X main.BuildVersion=${PV} -X 
main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \
-   ./... || die
-}
-
-src_test() {
-   go test -work ./... || die
-}
-
-src_install() {
-   dobin "${GOBIN}/redis_exporter"
-   dodoc README.md
-   local dir
-   for dir in /var/{lib,log}/${PN}; do
-   keepdir "${dir}"
-   fowners ${PN}:${PN} "${dir}"
-   done
-   newinitd "${FILESDIR}"/${PN}.initd ${PN}
-   newconfd "${FILESDIR}"/${PN}.confd ${PN}
-   insinto /etc/logrotate.d
-   newins "${FILESDIR}/${PN}.logrotated" "${PN}"
-   systemd_dounit "${FILESDIR}/${PN}.service"
-}



[gentoo-commits] repo/gentoo:master commit in: sys-apps/rootlesskit/

2024-08-11 Thread Zac Medico
commit: ece5ad612557cfd32c73a43657d7bdecc9403d63
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 22:47:53 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 22:47:57 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece5ad61

sys-apps/rootlesskit: drop 2.0.1

Signed-off-by: Zac Medico  gentoo.org>

 sys-apps/rootlesskit/Manifest |  2 --
 sys-apps/rootlesskit/rootlesskit-2.0.1.ebuild | 23 ---
 2 files changed, 25 deletions(-)

diff --git a/sys-apps/rootlesskit/Manifest b/sys-apps/rootlesskit/Manifest
index d6e49e7f5793..1b30848b96f3 100644
--- a/sys-apps/rootlesskit/Manifest
+++ b/sys-apps/rootlesskit/Manifest
@@ -1,4 +1,2 @@
-DIST rootlesskit-2.0.1-deps.tar.xz 66744312 BLAKE2B 
8369d7ff25212dc5bcc19dfd159d5c1592723173f0e64868d8a3aba4f9654a5457089e0ae3997efbbe12709ebe3e97d299529083b42caee60fd49ecc7e6aa156
 SHA512 
54f207035dc37e1fc1fbb2667f542696034cee4435d80db2cd889de0028c6caa3c542f5b09cbfdc9193fe8c42f48f2433a459e01df6570edd853a6315282b2d1
-DIST rootlesskit-2.0.1.tar.gz 74527 BLAKE2B 
04ae4980275c7271ce4d6a9d26917f083f89c5fe57ac3d7f43e2a0eeb5fa13e39de1f05be24940b79353bf6c2408e451f7d2ea10497bee4223757a0526f9d109
 SHA512 
1fe3eb19e1e0c97acfaae2c8aa435d3450ea9e666b00dcfe73a4835e9e8f6e2554c1f6f7491d9bc95a33cdab7c0c0d238aed7ce4bed237399660e9c16cb33324
 DIST rootlesskit-2.0.2-deps.tar.xz 769588 BLAKE2B 
fa226a8d851cd63f114e69f56a1092d4afdaaa598ceae9ca6c0167f3597e40513ba7fb2bd3240f1b906b5f8a5f5efa4eb621059aa5c2d7ca4d1911a10513f274
 SHA512 
ab4eccf71c9915b0fb3b39c0149154fa750d33ca04a5df84b12d50ed860dbf81d07464d36e98df0684279b814577f8b95bbc115b7337b8d1f525a6d7e431809b
 DIST rootlesskit-2.0.2.tar.gz 75119 BLAKE2B 
a5baa5a030986be394f4fe0941a249eb6faf55a11221f89e5710ba61d0b59150f6ddb4bc9c050182c41782921d20ce8f96d8fd211a2f57b6141eb28bd8506f41
 SHA512 
4f03f0cd1c650b2f1d3dd866b25ca2cca9cc6028f10a6f43e5bca7d736da605847262f2a2103e252e513caa9c0bf0ebb05fbfb1c10ba21e67fb434cfaa8123e3

diff --git a/sys-apps/rootlesskit/rootlesskit-2.0.1.ebuild 
b/sys-apps/rootlesskit/rootlesskit-2.0.1.ebuild
deleted file mode 100644
index 26ccf3bc7a2b..
--- a/sys-apps/rootlesskit/rootlesskit-2.0.1.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit go-module
-
-DESCRIPTION="Linux-native \"fake root\" for implementing rootless containers"
-HOMEPAGE="https://github.com/rootless-containers/rootlesskit";
-SRC_URI="https://github.com/rootless-containers/rootlesskit/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
-SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
-LICENSE="Apache-2.0"
-LICENSE+=" BSD BSD-2 ISC MIT"
-SLOT="0"
-
-KEYWORDS="~amd64"
-IUSE="selinux"
-
-RDEPEND="selinux? ( sec-policy/selinux-rootlesskit )"
-
-src_install() {
-   local -x BINDIR=${EPREFIX}/usr/bin
-   default
-}



[gentoo-commits] repo/gentoo:master commit in: dev-db/etcd/

2024-08-11 Thread Zac Medico
commit: 2375152baf241ddf66fa9fb667524aaad864d245
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Aug 12 05:26:23 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Aug 12 05:29:20 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2375152b

dev-db/etcd: add 3.5.15

Signed-off-by: Zac Medico  gentoo.org>

 dev-db/etcd/Manifest   |  2 ++
 dev-db/etcd/etcd-3.5.15.ebuild | 80 ++
 2 files changed, 82 insertions(+)

diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest
index a66e5e34c31e..7026f6c82c27 100644
--- a/dev-db/etcd/Manifest
+++ b/dev-db/etcd/Manifest
@@ -6,3 +6,5 @@ DIST etcd-3.5.12-deps.tar.xz 3935756 BLAKE2B 
c043cc55f59549734f38b1a734106bd25a1
 DIST etcd-3.5.12.tar.gz 4083299 BLAKE2B 
85615cf9095a440ef73aa59f5582293de543f7e473c8049712ff13646276c9441039c96c4e42aaedfddcfb3baede8d37f0ef68bb5ddabdb3f4833c8591ee1c8c
 SHA512 
6fc8bd64ad63cff71c7645253273418fb3fa262c2da1742dc345576caa733af7cd75acad2f57610c5883e6bf16cffd36bc5a0c89cbbb0793c00c2a4db1c6d14b
 DIST etcd-3.5.13-deps.tar.xz 5004004 BLAKE2B 
effc3c3fb8e6fff789f96030e485fb887b0f973e5943e66f744ce2d41c65c0756a81850be8f8cca96f50214a59e0eeac694c4669d809ddcee0771acc1703d9ff
 SHA512 
ed80d70a14cf049e3af22757ad5cc4abd1ce563e00e0d422d38c82d66fe4381822ef1344de3ef803dedc2bfc038dabb520ad58fd489b8916529d24357628f002
 DIST etcd-3.5.13.tar.gz 4089792 BLAKE2B 
be7a46af3978108b7e25adabe736ac111a01ab7fcb8e142b75c0c87aa33905d42d10b721ebc982e834110388669d028e6a612c9745e2f5c93210dd05ffccba7d
 SHA512 
dc85d80079b61e96eb06eb573d41d8972060392e49140a2414c283ea9edfef7b01d5554e50c7ab37c6ad079b373ae12a1b84dbcc533addc1d4d30a2a5abf7b7b
+DIST etcd-3.5.15-deps.tar.xz 5885840 BLAKE2B 
378d8136da0ca3486433ee2d55f2d65e569de3807bd41ea9dbb69e2a220a75ad3b2b1efd971738de84a21ac7a2fa1cb9703982ba571d4f115a88feddf9a1
 SHA512 
65810da4852df376b29b6023594af8da01fbdd63b3c25c4b95e2e643f327b15274750ed8db2f71da2d8a3223d00c603db5ed84ba13dce72303758e043ac62f19
+DIST etcd-3.5.15.tar.gz 4113649 BLAKE2B 
b65ae93875cefffc09ff0c61eda485abd3a32691b0b8bb2d957c109c2e43cb36d26a51c4d81b7dadb9e96452dfdbfb626dfc5a151678154339d7e08324c15efb
 SHA512 
1b22376fcda4c182ea0388b97f3b5a6a2fd62f753c2f4c13d06c3b53e9b7fb8efb2b20177f1724a5775f5ecc13bfcaabe6b308d4ee205dea86f7311fbe3a2900

diff --git a/dev-db/etcd/etcd-3.5.15.ebuild b/dev-db/etcd/etcd-3.5.15.ebuild
new file mode 100644
index ..696855a8f929
--- /dev/null
+++ b/dev-db/etcd/etcd-3.5.15.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd tmpfiles
+GIT_COMMIT=9a5533382
+
+DESCRIPTION="Highly-available key value store for shared configuration and 
service discovery"
+HOMEPAGE="https://github.com/etcd-io/etcd";
+SRC_URI="https://github.com/etcd-io/etcd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="Apache-2.0"
+LICENSE+=" BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~riscv"
+IUSE="doc +server"
+
+COMMON_DEPEND="server? (
+   acct-group/etcd
+   acct-user/etcd
+   )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+# Unit tests attempt to download go modules.
+RESTRICT="test"
+
+src_prepare() {
+   export FORCE_HOST_GO=1 GO_BUILD_FLAGS="-v -x"
+   default
+   sed -e "s|GIT_SHA=.*|GIT_SHA=${GIT_COMMIT}|" \
+   -i "${S}"/build.sh || die
+   sed -e 's:\(for p in \)shellcheck :\1 :' \
+   -e 's:^  goword \\$:\\:' \
+   -e 's:^  gofmt \\$:\\:' \
+   -e 's:^  govet \\$:\\:' \
+   -e 's:^  revive \\$:\\:' \
+   -e 's:^  mod_tidy \\$:\\:' \
+   -e 
"s|GO_BUILD_FLAGS=\"[^\"]*\"|GO_BUILD_FLAGS=\"${GO_BUILD_FLAGS}\"|" \
+   -e "s|go test |go test ${GO_BUILD_FLAGS} |" \
+   -e 's|PASSES=${PASSES:-"fmt bom dep build 
unit"}|PASSES=${PASSES:-"fmt dep unit"}|' \
+   -i ./test.sh || die
+}
+
+src_compile() {
+   ./build.sh || die
+}
+
+src_test() {
+   ./test || die
+}
+
+src_install() {
+   dobin bin/etcdctl
+   use doc && dodoc -r Documentation
+   if use server; then
+   insinto /etc/${PN}
+   sed -e 's|^data-dir:|\0 /var/lib/etcd|' -i etcd.conf.yml.sample 
|| die
+   newins etcd.conf.yml.sample etcd.conf.yml
+   dobin bin/etcd
+   dodoc README.md
+   systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
+   newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d

[gentoo-commits] repo/gentoo:master commit in: app-admin/consul/

2024-08-12 Thread Zac Medico
commit: 102dd7f8744f2a18a93b9beb0bc1a74689527706
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug 13 02:47:17 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug 13 02:48:18 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=102dd7f8

app-admin/consul: add 1.18.2

Signed-off-by: Zac Medico  gentoo.org>

 app-admin/consul/Manifest |  2 ++
 app-admin/consul/consul-1.18.2.ebuild | 61 +++
 2 files changed, 63 insertions(+)

diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
index 9532d6fa5036..942b43b65f61 100644
--- a/app-admin/consul/Manifest
+++ b/app-admin/consul/Manifest
@@ -3,3 +3,5 @@ DIST consul-1.15.11.tar.gz 28951114 BLAKE2B 
02378088d1bbc4313ec62d644b583c328bc9
 DIST consul-1.15.3-vendor.tar.gz 43434721 BLAKE2B 
7595c98cdecf67e9fb412d8fea1d790dc6b1c29f7bc427e1d0872045a05f8873dc6107f196cea04fe0a2f2553d4fbb1f8d501e5e107b2bea3ae841e5d94eda64
 SHA512 
b69e3a7c1ebb01c7a64f2c6167e63e8a530b81be9aad8b591d0a71f512f5157ba9a564b46f9effe52a5abd3ae61732e7af10c5ba002110f745eb3d94ebcec256
 DIST consul-1.18.1-deps.tar.xz 10161908 BLAKE2B 
da7e3e63470f082bf0f1e92252a2d30cce90c4268e5ad3d180ab4bfed6601e92e26e0a108fe7477a1d596cf44114e97551712bce4c2b3d13c06c3fae0fa948e5
 SHA512 
f0d3961de4c38052209d79817ba6570fc43f3b9c472c959d591cc8fd23029f32070a98c59c70c02f56b80c214ae60d4a2711ca2ec31472758209538ba00ef786
 DIST consul-1.18.1.tar.gz 34424463 BLAKE2B 
1c205471fa5d2500e4421eae37159dc3a3f8ebb46ab50266440302ca814834d39fddf0c27f4da5e78a103a2d7411eebf74bd256153b3954c6bc3c384de660a2f
 SHA512 
023ee6f2dff82343f9c3382b531c8fa7f032e1820e09d18f67201c8ae839dfc89b145a8197be2f9c241709541a915a073dd117f5523e17ba0cdaa665bffc2f4c
+DIST consul-1.18.2-deps.tar.xz 10054328 BLAKE2B 
ed8dd4188f692b9ea0104eccc9d32668a7d14b85937be1fb4c1fbae584dc7336c1247134e43918a028994a82d003e12e69072a002693194e39b83bac8b51323d
 SHA512 
1f80c5c3af228d939366306b7b9f4cada03d9ca430f3bdf52a2af71cbee65f4baa68f8c6b11cb474a10b335255320c600bf3663ab2a7167b43dc9d25407a
+DIST consul-1.18.2.tar.gz 34440848 BLAKE2B 
c1b383c088db069a5acc4b09929f0e129be6eb35b2ab1177bd78638687d1274ded75111adc0c4a1511fa10d95e0a6218d2a7ae0b8c4692afabba21392a4d2a5e
 SHA512 
e02296199bc8e53549ef4b7e63b8392c2ddb3d78a1ec5ceee2ea08acb1b7a78b25c383172a6abf8be07717b3c8462297bdf594327784854788f902e938509931

diff --git a/app-admin/consul/consul-1.18.2.ebuild 
b/app-admin/consul/consul-1.18.2.ebuild
new file mode 100644
index ..bdcf55a69a5d
--- /dev/null
+++ b/app-admin/consul/consul-1.18.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io";
+GIT_COMMIT="9fc827caf808b6ef1dc8c0748c3c4dce95d5b33a"
+GIT_DATE="2024-05-16T19:10:00Z"
+
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+LICENSE="BUSL-1.1 MPL-2.0"
+LICENSE+=" Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+RESTRICT="test"
+
+BDEPEND="dev-go/gox"
+COMMON_DEPEND="
+   acct-group/consul
+   acct-user/consul"
+   DEPEND="${COMMON_DEPEND}"
+   RDEPEND="${COMMON_DEPEND}"
+
+src_prepare() {
+   default
+   sed -e "s|^GIT_DATE=.*|GIT_DATE=${GIT_DATE}|" -i Makefile || die
+}
+
+src_compile() {
+   if use x86; then
+   #924629 pie breaks build on x86
+   GOFLAGS=${GOFLAGS//-buildmode=pie}
+   fi
+   # The dev target sets causes build.sh to set appropriate XC_OS
+   # and XC_ARCH, and skips generation of an unused zip file,
+   # avoiding a dependency on app-arch/zip.
+   GIT_DESCRIBE="v${PV}" \
+   GIT_DIRTY="" \
+   GIT_COMMIT="${GIT_COMMIT}" \
+   emake dev-build
+}
+
+src_install() {
+   dobin bin/consul
+
+   keepdir /etc/consul.d
+   insinto /etc/consul.d
+   doins "${FILESDIR}/"*.json.example
+
+   keepdir /var/log/consul
+   fowners consul:consul /var/log/consul
+
+   newinitd "${FILESDIR}/consul.initd" "${PN}"
+   newconfd "${FILESDIR}/consul.confd" "${PN}"
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+   systemd_dounit "${FILESDIR}/consul.service"
+}



[gentoo-commits] repo/gentoo:master commit in: app-admin/consul/

2024-08-12 Thread Zac Medico
commit: b6203a5f1944718de4080aa36005ed25e5df5138
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug 13 03:04:29 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug 13 03:04:33 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6203a5f

app-admin/consul: add 1.19.1

Signed-off-by: Zac Medico  gentoo.org>

 app-admin/consul/Manifest |  2 ++
 app-admin/consul/consul-1.19.1.ebuild | 61 +++
 2 files changed, 63 insertions(+)

diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
index 942b43b65f61..203b4aaa6297 100644
--- a/app-admin/consul/Manifest
+++ b/app-admin/consul/Manifest
@@ -5,3 +5,5 @@ DIST consul-1.18.1-deps.tar.xz 10161908 BLAKE2B 
da7e3e63470f082bf0f1e92252a2d30c
 DIST consul-1.18.1.tar.gz 34424463 BLAKE2B 
1c205471fa5d2500e4421eae37159dc3a3f8ebb46ab50266440302ca814834d39fddf0c27f4da5e78a103a2d7411eebf74bd256153b3954c6bc3c384de660a2f
 SHA512 
023ee6f2dff82343f9c3382b531c8fa7f032e1820e09d18f67201c8ae839dfc89b145a8197be2f9c241709541a915a073dd117f5523e17ba0cdaa665bffc2f4c
 DIST consul-1.18.2-deps.tar.xz 10054328 BLAKE2B 
ed8dd4188f692b9ea0104eccc9d32668a7d14b85937be1fb4c1fbae584dc7336c1247134e43918a028994a82d003e12e69072a002693194e39b83bac8b51323d
 SHA512 
1f80c5c3af228d939366306b7b9f4cada03d9ca430f3bdf52a2af71cbee65f4baa68f8c6b11cb474a10b335255320c600bf3663ab2a7167b43dc9d25407a
 DIST consul-1.18.2.tar.gz 34440848 BLAKE2B 
c1b383c088db069a5acc4b09929f0e129be6eb35b2ab1177bd78638687d1274ded75111adc0c4a1511fa10d95e0a6218d2a7ae0b8c4692afabba21392a4d2a5e
 SHA512 
e02296199bc8e53549ef4b7e63b8392c2ddb3d78a1ec5ceee2ea08acb1b7a78b25c383172a6abf8be07717b3c8462297bdf594327784854788f902e938509931
+DIST consul-1.19.1-deps.tar.xz 10102748 BLAKE2B 
9d121764915ff191e660450007adaab4a2b2f6ee3dbd7993a32a9d0f105584aff1940f4ebdde1811dcaedcd253df77f2227e6ddb36b165657532f1d9693b716e
 SHA512 
3981ce7dfeaf0b8bf83342edfe6cb3f01112af60b7ec155ee6df355e9f7e7a6d928a34d5be299a31dafb8bc87d369882d1ef80acce72dd53a071dc80ba37b243
+DIST consul-1.19.1.tar.gz 35683711 BLAKE2B 
47504c91413388ef3439adc848af19af2e344944845e0a275fb9b5e5df81b13d86002f4df421a467a82b194b738422e90691b281c37ff7807093905eba95ff10
 SHA512 
d5912b5340e49f38823f265c0a90f09a20d6b7d8920d6d1bcce96ee556e7edf2fca0441afe4b2f65cc50b3c228479ef6babc917c5c0f17fa521c136a5147c899

diff --git a/app-admin/consul/consul-1.19.1.ebuild 
b/app-admin/consul/consul-1.19.1.ebuild
new file mode 100644
index ..b635af45d4a7
--- /dev/null
+++ b/app-admin/consul/consul-1.19.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io";
+GIT_COMMIT="9f62fb4113d286a5642dff9da0138aa3bbef05da"
+GIT_DATE="2024-07-11T14:47:27Z" # source build-support/functions/10-util.sh; 
git_date
+
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+LICENSE="BUSL-1.1 MPL-2.0"
+LICENSE+=" Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+RESTRICT="test"
+
+BDEPEND="dev-go/gox"
+COMMON_DEPEND="
+   acct-group/consul
+   acct-user/consul"
+   DEPEND="${COMMON_DEPEND}"
+   RDEPEND="${COMMON_DEPEND}"
+
+src_prepare() {
+   default
+   sed -e "s|^GIT_DATE=.*|GIT_DATE=${GIT_DATE}|" -i Makefile || die
+}
+
+src_compile() {
+   if use x86; then
+   #924629 pie breaks build on x86
+   GOFLAGS=${GOFLAGS//-buildmode=pie}
+   fi
+   # The dev target sets causes build.sh to set appropriate XC_OS
+   # and XC_ARCH, and skips generation of an unused zip file,
+   # avoiding a dependency on app-arch/zip.
+   GIT_DESCRIBE="v${PV}" \
+   GIT_DIRTY="" \
+   GIT_COMMIT="${GIT_COMMIT}" \
+   emake dev-build
+}
+
+src_install() {
+   dobin bin/consul
+
+   keepdir /etc/consul.d
+   insinto /etc/consul.d
+   doins "${FILESDIR}/"*.json.example
+
+   keepdir /var/log/consul
+   fowners consul:consul /var/log/consul
+
+   newinitd "${FILESDIR}/consul.initd" "${PN}"
+   newconfd "${FILESDIR}/consul.confd" "${PN}"
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+   systemd_dounit "${FILESDIR}/consul.service"
+}



[gentoo-commits] repo/gentoo:master commit in: app-admin/vault/

2024-08-12 Thread Zac Medico
commit: 4f05c6ec011f43a26eedc7b3721fc768e1b5d79f
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug 13 05:51:39 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug 13 05:52:49 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f05c6ec

app-admin/vault: add 1.16.3

Added dev-go/enumer to BDEPEND.

Signed-off-by: Zac Medico  gentoo.org>

 app-admin/vault/Manifest|  3 ++
 app-admin/vault/vault-1.16.3.ebuild | 87 +
 2 files changed, 90 insertions(+)

diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index 8eb33f53ee11..13e072233ff7 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -8,3 +8,6 @@ DIST vault-1.15.6.tar.gz 31923253 BLAKE2B 
8a4e7b9d8d6753b6f717c6699b2d4822cecff2
 DIST vault-1.16.1-deps.tar.xz 21476528 BLAKE2B 
2ba0bd2165ce41bfae6fb56a0ff97fe4ed30ac5e16f30ceba14d618e30851b9bb31a964cf5035cd4089baf87c2cda5acd17558bb363acbbcc371ddf47b453c73
 SHA512 
a0262f421eacfc729a0bc98c137a580d3ca7b384b5b7a8e3bb81cc27b0791b81fdb9005ff9721159cccaf49f2ec6e86dafe7f4e2dde4b5c8d806a8bf1c68de2c
 DIST vault-1.16.1-webui.tar.xz 2213524 BLAKE2B 
40c0811c84c849beba934f110afa21fe1ebe60f9a01750fcb4c6442f6a8ef28babd4c32157e6bb3eaf7545b683a81122f445a1a0d717cf7442a678e87206f67a
 SHA512 
ca25ffaa85445070310fad9d5a05d6ff477729d64707a4da8bc433781d7f2283e18e680a9a06d6aa37496a21b148ac3bdc5eb3f475246ee3fe3cf4a8db096ffb
 DIST vault-1.16.1.tar.gz 32997180 BLAKE2B 
e8c6ccf19ce2c48eee1b4b7544c6d164bd98be3d06a08397b06049bbb6aed9304df592bcb5103e943a629aca4c2e83f661b16469e3353c022e3ca552fa1afedb
 SHA512 
e970004343abb2792aeea4db55a002d1c18701d309caab4a49e3f387028083b70dfa67b7ff34b60c5d4d34ffa8ac3bef308b7218a0344dffde3b000b0e5d43a9
+DIST vault-1.16.3-deps.tar.xz 21492052 BLAKE2B 
5800105ab4f005c9569b4fd9eee567c706d2c0e1d0fbb937af6e3348f06f2a6e8ea7c159a738d04c266d577a5b1e7419735ffae410a106aac4b65740f55c7979
 SHA512 
9e4d515dad7862f56fef8822852b6989b52b494a786a38b74ce85af60b3f562738f3af5bf1497e5af0c07b42aaff407c1d39c3bd3f18d1f646998b7ac0b100a2
+DIST vault-1.16.3-webui.tar.xz 2180172 BLAKE2B 
b1d8d59c462f7cd60ec5ef5878320591290c1655d1b1727508541faf45e5fe3c6085ff8fb66b3b82d95ca74cc1ee800fed09f0db7eb98580f7cc135a3eebfe6e
 SHA512 
61ead17ceed96f7dda7439e292d0c0497d65c8938491f70927064ed647276ae41ffa35777e2a119dee116233baca9575b82e3e53cbeb9b622eb34f1563f4e164
+DIST vault-1.16.3.tar.gz 33353350 BLAKE2B 
b185b9ad6b1e30da4ca2c2e9425a606e19fbda0b4ac529fb8410d2bff5a215eafe62d12c5c9988423ba7185a0456b7a5e364a466abe00ba9e45b57d59fd115d8
 SHA512 
b68189b978155168c42bac3e867abc44fcd4b6e9f680bd6951b99208536f1225013e8d336711ea17b9700b0ec75758dd2678e583811918e278849f306ddc9c2e

diff --git a/app-admin/vault/vault-1.16.3.ebuild 
b/app-admin/vault/vault-1.16.3.ebuild
new file mode 100644
index ..2ad80d89998d
--- /dev/null
+++ b/app-admin/vault/vault-1.16.3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module systemd
+
+DESCRIPTION="A tool for managing secrets"
+HOMEPAGE="https://vaultproject.io/";
+
+VAULT_WEBUI_ARCHIVE="${P}-webui.tar.xz"
+SRC_URI="https://github.com/hashicorp/vault/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" webui? ( 
https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE} )"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="BUSL-1.1 MPL-2.0"
+LICENSE+=" Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+IUSE="+webui"
+
+BDEPEND="
+   app-arch/zip
+   dev-go/enumer
+   dev-go/gox
+   >=dev-lang/go-1.21"
+COMMON_DEPEND="acct-group/vault
+   acct-user/vault"
+   DEPEND="${COMMON_DEPEND}"
+   RDEPEND="${COMMON_DEPEND}"
+
+FILECAPS=(
+   -m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
+)
+
+RESTRICT="test"
+PATCHES=("${FILESDIR}/${PN}-1.15.6-stubmaker-outside-git-repo-24678.patch")
+
+src_unpack() {
+   default
+}
+
+src_prepare() {
+   default
+   # Avoid the need to have a git checkout
+   sed -e 's:^\(GIT_COMMIT=\).*:\1:' \
+   -e 's:^\(GIT_DIRTY=\).*:\1:' \
+   -e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \
+   -e "s|^BUILD_DATE=.*|BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%SZ)|" \
+   -i scripts/build.sh || die
+   sed -e "/hooks/d" \
+   -e 's|^\([[:space:]]*\)goimports .*)|\1true|' \
+   -e "s/gofumpt/gofmt/g" \
+   -i Makefile || die
+   if [[ -d "${WORKDIR}/http/web_ui" ]]; then
+   rm -rf "${S}/http/web_ui" || die
+   mv "${WORKDIR}/http/web_ui" "${S}/http/

[gentoo-commits] repo/gentoo:master commit in: dev-go/enumer/

2024-08-12 Thread Zac Medico
commit: f3dc3eeb1190f54e697620ff59aaaee511c146ff
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Aug 13 05:35:14 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Aug 13 05:52:49 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3dc3eeb

dev-go/enumer: new package, add 1.5.10

Signed-off-by: Zac Medico  gentoo.org>

 dev-go/enumer/Manifest |  2 ++
 dev-go/enumer/enumer-1.5.10.ebuild | 41 ++
 dev-go/enumer/metadata.xml | 10 ++
 3 files changed, 53 insertions(+)

diff --git a/dev-go/enumer/Manifest b/dev-go/enumer/Manifest
new file mode 100644
index ..c9dcd1d7d814
--- /dev/null
+++ b/dev-go/enumer/Manifest
@@ -0,0 +1,2 @@
+DIST enumer-1.5.10-deps.tar.xz 109604 BLAKE2B 
b5aefbc35510f660f98e5d56562a30769b3dab607c2dce0abc0b8dca780e8ee59e98d70baf4f3f8d7d2d493da16f3f4d3f68108658ce08acf6a48e3012f0ddc2
 SHA512 
5306a482128fca80e525d87167e472552aec7af38f5d5788bf978015a7688a6c83f5df2d9d7241b821e5c5669f657bc2643013ee70a910d7408ed9ce9f917c03
+DIST enumer-1.5.10.tar.gz 28195 BLAKE2B 
ea3100f3d9100808ef902a22692a43009ba9139f753d3d8a9eaaf1c4b3b5b0fe727f7e1be881dcd8c1e3e5ffedece5f39813e17318aa444187c14dcce8743983
 SHA512 
3d62ec6f89ed6f1087b0c147ac502131fdb9b3d29f07e117437a9cfbbf75544f5c5b1026db30a8e9241019bb14f77fe431593846611e9304215d39ac98cfcb05

diff --git a/dev-go/enumer/enumer-1.5.10.ebuild 
b/dev-go/enumer/enumer-1.5.10.ebuild
new file mode 100644
index ..8609714f08d7
--- /dev/null
+++ b/dev-go/enumer/enumer-1.5.10.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="A Go tool to auto generate methods for your enums"
+HOMEPAGE="https://github.com/dmarkham/enumer";
+SRC_URI="https://github.com/dmarkham/enumer/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz
+   https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="BSD-2"
+LICENSE+=" BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+DOCS=(README.md)
+
+src_prepare() {
+   default
+   local sed_args=()
+   # -buildmode=pie not supported when -race is enabled
+   [[ ${GOFLAGS} == *buildmode=pie* ]] && sed_args+=(
+   -e 's/ -race / /'
+   )
+   if [[ ${#sed_args[@]} -gt 0 ]]; then
+   sed  "${sed_args[@]}" -i Makefile || die
+   fi
+}
+
+src_compile() {
+   CGO_ENABLED=0 ego build -a -o ./enumer .
+}
+
+src_install() {
+   einstalldocs
+   dobin "${PN}"
+}
+
+src_test() {
+   emake test
+}

diff --git a/dev-go/enumer/metadata.xml b/dev-go/enumer/metadata.xml
new file mode 100644
index ..9df7731b17ca
--- /dev/null
+++ b/dev-go/enumer/metadata.xml
@@ -0,0 +1,10 @@
+
+https://www.gentoo.org/dtd/metadata.dtd";>
+
+   
+   zmed...@gentoo.org
+   
+   
+   dmarkham/enumer
+   
+



[gentoo-commits] proj/portage:master commit in: lib/portage/tests/util/, lib/portage/util/_eventloop/, ...

2024-08-13 Thread Zac Medico
commit: cb0c09d8cecbcc086786e3e2c7cdd8ffc023a48a
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 11 07:50:49 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 11 07:50:49 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=cb0c09d8

Support coroutine exitfuncs for non-main loops

Since an API consumer can cause loops to be instantiated
for non-main threads, support coroutine exitfuncs for each
loop. The included Socks5ServerAtExitThreadedTestCase calls
get_socks5_proxy from a non-main thread, and demonstrates
that coroutine exitfuncs for the resulting non-main loop
will reliably stop the socks5 proxy via atexit hook.

The _thread_weakrefs_atexit function will now make a
temporary adjustment to _thread_weakrefs.loops so that a
loop is associated with the current thread when it is
closing. Also, the _get_running_loop function will now
store weak references to all _AsyncioEventLoop instances
it creates, since each has a _coroutine_exithandlers
attribute that can be modified by atexit_register calls.

Bug: https://bugs.gentoo.org/937740
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/process.py| 11 --
 lib/portage/tests/util/test_socks5.py | 38 +++--
 lib/portage/util/_eventloop/asyncio_event_loop.py | 15 ++---
 lib/portage/util/futures/_asyncio/__init__.py | 41 ---
 4 files changed, 76 insertions(+), 29 deletions(-)

diff --git a/lib/portage/process.py b/lib/portage/process.py
index 23e2507b53..38adebda66 100644
--- a/lib/portage/process.py
+++ b/lib/portage/process.py
@@ -194,7 +194,6 @@ def spawn_fakeroot(mycommand, fakeroot_state=None, 
opt_name=None, **keywords):
 
 
 _exithandlers = []
-_coroutine_exithandlers = []
 
 
 def atexit_register(func, *args, **kargs):
@@ -205,7 +204,9 @@ def atexit_register(func, *args, **kargs):
 # The internal asyncio wrapper module would trigger a circular import
 # if used here.
 if _asyncio.iscoroutinefunction(func):
-_coroutine_exithandlers.append((func, args, kargs))
+# Add this coroutine function to the exit handlers for the loop
+# which is associated with the current thread.
+global_event_loop()._coroutine_exithandlers.append((func, args, kargs))
 else:
 _exithandlers.append((func, args, kargs))
 
@@ -238,13 +239,17 @@ async def run_coroutine_exitfuncs():
 """
 This is the same as run_exitfuncs but it uses asyncio.iscoroutinefunction
 to check which functions to run. It is called by the AsyncioEventLoop
-_close_main method just before the loop is closed.
+_close method just before the loop is closed.
 
 If the loop is explicitly closed before exit, then that will cause
 run_coroutine_exitfuncs to run before run_exitfuncs. Otherwise, a
 run_exitfuncs hook will close it, causing run_coroutine_exitfuncs to be
 called via run_exitfuncs.
 """
+# The _thread_weakrefs_atexit function makes an adjustment to ensure
+# that global_event_loop() returns the correct loop when it is closing,
+# regardless of which thread the loop was initially associated with.
+_coroutine_exithandlers = global_event_loop()._coroutine_exithandlers
 tasks = []
 while _coroutine_exithandlers:
 func, targs, kargs = _coroutine_exithandlers.pop()

diff --git a/lib/portage/tests/util/test_socks5.py 
b/lib/portage/tests/util/test_socks5.py
index 35f919d970..078e3b1a23 100644
--- a/lib/portage/tests/util/test_socks5.py
+++ b/lib/portage/tests/util/test_socks5.py
@@ -194,17 +194,17 @@ class Socks5ServerTestCase(TestCase):
 asyncio.run(self._test_socks5_proxy())
 
 async def _test_socks5_proxy(self):
-loop = asyncio.get_running_loop()
+loop = global_event_loop()
 
 host = "127.0.0.1"
 content = b"Hello World!"
 path = "/index.html"
 proxy = None
 tempdir = tempfile.mkdtemp()
-previous_exithandlers = portage.process._coroutine_exithandlers
+previous_exithandlers = loop._coroutine_exithandlers
 
 try:
-portage.process._coroutine_exithandlers = []
+loop._coroutine_exithandlers = []
 with AsyncHTTPServer(host, {path: content}, loop) as server:
 settings = {
 "PORTAGE_TMPDIR": tempdir,
@@ -227,11 +227,11 @@ class Socks5ServerTestCase(TestCase):
 finally:
 try:
 # Also run_coroutine_exitfuncs to test atexit hook cleanup.
-self.assertNotEqual(portage.process._coroutine_exithandlers, 
[])
+self.assertNotEqual(loop._coroutine_exithandlers, [])
 await portage.process.run_coroutine_exitfuncs()
-self.assertEqual(portage.process._coroutine_exithandlers, [])
+self.assertEqual(loop._cor

[gentoo-commits] proj/portage:master commit in: lib/_emerge/

2024-08-14 Thread Zac Medico
commit: 74e29110d86a55ac74fdde3e1b79506b3fb695c2
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Aug 14 05:49:30 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Aug 14 15:08:12 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=74e29110

_EbuildFetcherProcess: Suppress CancelledError

Suppress CancelledError when attempting to cache the
result in the _async_uri_map method. The cancelled
result is returned for the caller to handle.

Bug: https://bugs.gentoo.org/937888
Signed-off-by: Zac Medico  gentoo.org>

 lib/_emerge/EbuildFetcher.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/_emerge/EbuildFetcher.py b/lib/_emerge/EbuildFetcher.py
index 994271236c..422d7c0a06 100644
--- a/lib/_emerge/EbuildFetcher.py
+++ b/lib/_emerge/EbuildFetcher.py
@@ -373,7 +373,7 @@ class _EbuildFetcherProcess(ForkProcess):
 def cache_result(result):
 try:
 self._uri_map = result.result()
-except Exception:
+except (CancelledError, Exception):
 # The caller handles this when it retrieves the result.
 pass
 



[gentoo-commits] proj/portage:master commit in: lib/portage/

2024-08-14 Thread Zac Medico
commit: cfd767cd35f5affd3b61b665b0f8814fe2de24c4
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Aug 14 05:30:42 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Aug 14 15:22:05 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=cfd767cd

run_exitfuncs: Drop hooks inherited via fork

Drop hooks inherited via fork because they can trigger redundant
actions as shown in bug 937891. Note that atexit hooks only work
after fork since issue 83856 was fixed in Python 3.13.

Bug: https://bugs.gentoo.org/937891
Signed-off-by: Zac Medico  gentoo.org>

 lib/portage/process.py | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/portage/process.py b/lib/portage/process.py
index 38adebda66..e6f6feb357 100644
--- a/lib/portage/process.py
+++ b/lib/portage/process.py
@@ -208,7 +208,7 @@ def atexit_register(func, *args, **kargs):
 # which is associated with the current thread.
 global_event_loop()._coroutine_exithandlers.append((func, args, kargs))
 else:
-_exithandlers.append((func, args, kargs))
+_exithandlers.append((func, args, kargs, portage.getpid()))
 
 
 def run_exitfuncs():
@@ -222,7 +222,12 @@ def run_exitfuncs():
 # original function is in the output to stderr.
 exc_info = None
 while _exithandlers:
-func, targs, kargs = _exithandlers.pop()
+func, targs, kargs, pid = _exithandlers.pop()
+if pid != portage.getpid():
+# Drop hooks inherited via fork because they can trigger redundant
+# actions as shown in bug 937891. Note that atexit hooks only work
+# after fork since issue 83856 was fixed in Python 3.13.
+continue
 try:
 func(*targs, **kargs)
 except SystemExit:



[gentoo-commits] proj/portage:master commit in: lib/_emerge/

2024-08-14 Thread Zac Medico
commit: e4f0fa4a316aba2cf2b1a47c9d2974710a1d8bd3
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Aug 14 16:03:52 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Aug 14 16:04:34 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=e4f0fa4a

_EbuildFetcherProcess: Suppress asyncio.CancelledError

Fixes: 74e29110d86a ("_EbuildFetcherProcess: Suppress CancelledError")
Bug: https://bugs.gentoo.org/937888
Signed-off-by: Zac Medico  gentoo.org>

 lib/_emerge/EbuildFetcher.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/_emerge/EbuildFetcher.py b/lib/_emerge/EbuildFetcher.py
index 422d7c0a06..554cd95973 100644
--- a/lib/_emerge/EbuildFetcher.py
+++ b/lib/_emerge/EbuildFetcher.py
@@ -373,7 +373,7 @@ class _EbuildFetcherProcess(ForkProcess):
 def cache_result(result):
 try:
 self._uri_map = result.result()
-except (CancelledError, Exception):
+except (asyncio.CancelledError, Exception):
 # The caller handles this when it retrieves the result.
 pass
 



[gentoo-commits] repo/gentoo:master commit in: app-admin/vault/

2024-08-14 Thread Zac Medico
commit: d45f658630c5c25659a87052f68f134cea513247
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Aug 15 03:00:34 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Thu Aug 15 03:00:38 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d45f6586

app-admin/vault: add 1.17.3

Signed-off-by: Zac Medico  gentoo.org>

 app-admin/vault/Manifest|  3 ++
 app-admin/vault/vault-1.17.3.ebuild | 86 +
 2 files changed, 89 insertions(+)

diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index 13e072233ff7..001207c4e4e2 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -11,3 +11,6 @@ DIST vault-1.16.1.tar.gz 32997180 BLAKE2B 
e8c6ccf19ce2c48eee1b4b7544c6d164bd98be
 DIST vault-1.16.3-deps.tar.xz 21492052 BLAKE2B 
5800105ab4f005c9569b4fd9eee567c706d2c0e1d0fbb937af6e3348f06f2a6e8ea7c159a738d04c266d577a5b1e7419735ffae410a106aac4b65740f55c7979
 SHA512 
9e4d515dad7862f56fef8822852b6989b52b494a786a38b74ce85af60b3f562738f3af5bf1497e5af0c07b42aaff407c1d39c3bd3f18d1f646998b7ac0b100a2
 DIST vault-1.16.3-webui.tar.xz 2180172 BLAKE2B 
b1d8d59c462f7cd60ec5ef5878320591290c1655d1b1727508541faf45e5fe3c6085ff8fb66b3b82d95ca74cc1ee800fed09f0db7eb98580f7cc135a3eebfe6e
 SHA512 
61ead17ceed96f7dda7439e292d0c0497d65c8938491f70927064ed647276ae41ffa35777e2a119dee116233baca9575b82e3e53cbeb9b622eb34f1563f4e164
 DIST vault-1.16.3.tar.gz 33353350 BLAKE2B 
b185b9ad6b1e30da4ca2c2e9425a606e19fbda0b4ac529fb8410d2bff5a215eafe62d12c5c9988423ba7185a0456b7a5e364a466abe00ba9e45b57d59fd115d8
 SHA512 
b68189b978155168c42bac3e867abc44fcd4b6e9f680bd6951b99208536f1225013e8d336711ea17b9700b0ec75758dd2678e583811918e278849f306ddc9c2e
+DIST vault-1.17.3-deps.tar.xz 21557340 BLAKE2B 
ba26c3921999c76e51d1548472a6e49d9be316f099ca2213879aa384ac6b70a2716d12b8950be56263f78343e8b09708905a03421eceb67e400544241a185a55
 SHA512 
6aa16d78459ffab1d5356291f196a40c9efc646baa1b10d191ab5d40d712d296e0c89b396afa16719716d178557b970278949967ba0bcacaf77d0b3bfb837e10
+DIST vault-1.17.3-webui.tar.xz 2196772 BLAKE2B 
c66ce1dcae83b18afb1bc4a76a1c69191d8bec6b7c1f392f58a66df423120a9d38a3b3c5222ae8ad0a960c6100e5dc3acaa11e4bfc04e2a43bf4df68fc036f47
 SHA512 
b9983126e403c5d4fcfdb25f02deaafe461c490ba67d5295cfdd35c69112e02677fe56e9b50cebe51afc6e896febdb5f6fac7431944f41d3bad38bad4a7670d1
+DIST vault-1.17.3.tar.gz 33565884 BLAKE2B 
cc39312ada9d889feda72d7659dfab56c53d4351882fcba1d52beed4cb41d387cec3b160413b63b3d031e0b23fe21d95b6d8cce438c274a5f39e4386a8d0b3c8
 SHA512 
e5d2f25b77e4d50f5f51cd5e2a6060745e147be328e68a9c51c142a40d83b446a6ccc27fe1414ba10f0abf8a37818b369b4d3245d44b0afb0ddf84a0e51c0995

diff --git a/app-admin/vault/vault-1.17.3.ebuild 
b/app-admin/vault/vault-1.17.3.ebuild
new file mode 100644
index ..c201204925f2
--- /dev/null
+++ b/app-admin/vault/vault-1.17.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module systemd
+
+DESCRIPTION="A tool for managing secrets"
+HOMEPAGE="https://vaultproject.io/";
+
+VAULT_WEBUI_ARCHIVE="${P}-webui.tar.xz"
+SRC_URI="https://github.com/hashicorp/vault/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" webui? ( 
https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE} )"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+
+LICENSE="BUSL-1.1 MPL-2.0"
+LICENSE+=" Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+IUSE="+webui"
+
+BDEPEND="
+   app-arch/zip
+   dev-go/enumer
+   dev-go/gox
+   >=dev-lang/go-1.21"
+COMMON_DEPEND="acct-group/vault
+   acct-user/vault"
+   DEPEND="${COMMON_DEPEND}"
+   RDEPEND="${COMMON_DEPEND}"
+
+FILECAPS=(
+   -m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
+)
+
+RESTRICT="test"
+
+src_unpack() {
+   default
+}
+
+src_prepare() {
+   default
+   # Avoid the need to have a git checkout
+   sed -e 's:^\(GIT_COMMIT=\).*:\1:' \
+   -e 's:^\(GIT_DIRTY=\).*:\1:' \
+   -e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \
+   -e "s|^BUILD_DATE=.*|BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%SZ)|" \
+   -i scripts/build.sh || die
+   sed -e "/hooks/d" \
+   -e 's|^\([[:space:]]*\)goimports .*)|\1true|' \
+   -e "s/gofumpt/gofmt/g" \
+   -i Makefile || die
+   if [[ -d "${WORKDIR}/http/web_ui" ]]; then
+   rm -rf "${S}/http/web_ui" || die
+   mv "${WORKDIR}/http/web_ui" "${S}/http/web_ui" ||
+   die "mv failed"
+   else
+   mkdir -p "${S}/http/we

[gentoo-commits] repo/gentoo:master commit in: app-containers/cri-o/

2024-08-14 Thread Zac Medico
commit: f9c13604be244bb8d585593a31774dd9a79ee968
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Aug 15 03:23:04 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Thu Aug 15 03:29:30 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9c13604

app-containers/cri-o: drop 1.29.0

Signed-off-by: Zac Medico  gentoo.org>

 app-containers/cri-o/Manifest|   1 -
 app-containers/cri-o/cri-o-1.29.0.ebuild | 102 ---
 2 files changed, 103 deletions(-)

diff --git a/app-containers/cri-o/Manifest b/app-containers/cri-o/Manifest
index 11f94eddc2da..f49f03ba1405 100644
--- a/app-containers/cri-o/Manifest
+++ b/app-containers/cri-o/Manifest
@@ -1,2 +1 @@
-DIST cri-o-1.29.0.tar.gz 21371695 BLAKE2B 
f670605f07446a78ce04f497207e0205aee23138be448bdc2d2fb172691e5bb309234daa1c5c0adbb37dcb24e9177f24f62e01e183ac6443f48054b9e65b6dfe
 SHA512 
bb83c906964e61ae68219e1374a3e0810fc982fd0389549e6fe3128156af8d5c6effce4217de4d33d3e29e986db630525694093ca3a99b6065385e1e37927fef
 DIST cri-o-1.29.2.tar.gz 21203342 BLAKE2B 
deec88f8a505bdc1f184a3512da7f6d4b78499c4a66cacf0651a9fe56b62d33d62eaaf2ce68e5d8e856e13988b26e076ab69c24b30a62b42d88656441d948fcb
 SHA512 
dd4105e0097a098b9009b00b59a8e8aeaad85b07177305e2e4b2c68a583a0c342e7a615f47a8cbcb7f179035f2c279573069f15aa1e91e491fe770eec1df326c

diff --git a/app-containers/cri-o/cri-o-1.29.0.ebuild 
b/app-containers/cri-o/cri-o-1.29.0.ebuild
deleted file mode 100644
index 9d8b95307d64..
--- a/app-containers/cri-o/cri-o-1.29.0.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-EGIT_COMMIT=d59bbdc252837107c9f5d235b8fb2650ff2b9d93=
-
-inherit go-module
-
-DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime 
Interface"
-HOMEPAGE="https://cri-o.io/";
-SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64"
-IUSE="btrfs +device-mapper selinux systemd"
-
-COMMON_DEPEND="
-   app-crypt/gpgme:=
-   app-containers/conmon
-   app-containers/runc
-   dev-libs/glib:=
-   dev-libs/libassuan:=
-   dev-libs/libgpg-error:=
-   net-firewall/conntrack-tools
-   net-firewall/iptables
-   app-containers/cni-plugins
-   net-misc/socat
-   sys-apps/iproute2
-   sys-libs/libseccomp:=
-   btrfs? ( sys-fs/btrfs-progs )
-   device-mapper? ( sys-fs/lvm2:= )
-   selinux? ( sys-libs/libselinux:= )
-   systemd? ( sys-apps/systemd:= )"
-DEPEND="
-   ${COMMON_DEPEND}
-   dev-go/go-md2man"
-RDEPEND="${COMMON_DEPEND}
-   !> Makefile || die
-
-   sed -e 's:/usr/local/bin:/usr/bin:' \
-   -i contrib/systemd/* || die
-}
-
-src_compile() {
-   [[ -f hack/btrfs_installed_tag.sh ]] || die
-   use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
-   hack/btrfs_installed_tag.sh || die; }
-
-   [[ -f hack/libdm_installed.sh ]] || die
-   use device-mapper || { echo -e "#!/bin/sh\necho 
exclude_graphdriver_devicemapper" > \
-   hack/libdm_installed.sh || die; }
-
-   [[ -f hack/selinux_tag.sh ]] || die
-   use selinux || { echo -e "#!/bin/sh\ntrue" > \
-   hack/selinux_tag.sh || die; }
-
-   mkdir -p bin || die
-   emake all \
-   GOBIN="${S}/bin" \
-   GO_BUILD="go build ${GOFLAGS}" \
-   GO_MD2MAN="$(which go-md2man)"
-}
-
-src_install() {
-   emake install install.config install.systemd \
-   DESTDIR="${D}" \
-   GO_MD2MAN="$(which go-md2man)" \
-   PREFIX="${D}${EPREFIX}/usr"
-   keepdir /etc/crio
-   mv "${ED}/etc/crio/crio.conf"{,.example} || die
-
-   newinitd "${FILESDIR}/crio.initd" crio
-
-   insinto /etc/logrotate.d
-   newins "${FILESDIR}/${PN}.logrotated" "${PN}"
-
-   # Suppress crio log error messages triggered if these don't exist.
-   keepdir /etc/containers/oci/hooks.d
-   keepdir /usr/share/containers/oci/hooks.d
-
-   # Suppress crio "Missing CNI default network" log message.
-   keepdir /etc/cni/net.d
-   insinto /etc/cni/net.d
-   doins contrib/cni/99-loopback.conflist
-}



[gentoo-commits] repo/gentoo:master commit in: app-containers/cri-o/

2024-08-14 Thread Zac Medico
commit: db954097dcea162dfdd7e65039a5a7539246a16d
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Aug 15 03:27:38 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Thu Aug 15 03:29:38 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db954097

app-containers/cri-o: add 1.30.4

Signed-off-by: Zac Medico  gentoo.org>

 app-containers/cri-o/Manifest|   1 +
 app-containers/cri-o/cri-o-1.30.4.ebuild | 102 +++
 2 files changed, 103 insertions(+)

diff --git a/app-containers/cri-o/Manifest b/app-containers/cri-o/Manifest
index f49f03ba1405..5c4967d78dee 100644
--- a/app-containers/cri-o/Manifest
+++ b/app-containers/cri-o/Manifest
@@ -1 +1,2 @@
 DIST cri-o-1.29.2.tar.gz 21203342 BLAKE2B 
deec88f8a505bdc1f184a3512da7f6d4b78499c4a66cacf0651a9fe56b62d33d62eaaf2ce68e5d8e856e13988b26e076ab69c24b30a62b42d88656441d948fcb
 SHA512 
dd4105e0097a098b9009b00b59a8e8aeaad85b07177305e2e4b2c68a583a0c342e7a615f47a8cbcb7f179035f2c279573069f15aa1e91e491fe770eec1df326c
+DIST cri-o-1.30.4.tar.gz 19645954 BLAKE2B 
bb55eb674e7703ca313ed03cf6fa9952390121440a37c3413aac0c739b2cd7f03d36993139d41ae210faabb0530cab939074a78b8aa4319e0994063132a2e344
 SHA512 
fe0d69107e186943482909dac5e332226d7dfd5a1702722edc5c4f5df3ad9c6bff63e43dc7831c057ecc3ca387ee77815d43f531ad1e7b921d645d59797aa95d

diff --git a/app-containers/cri-o/cri-o-1.30.4.ebuild 
b/app-containers/cri-o/cri-o-1.30.4.ebuild
new file mode 100644
index ..74f118a739af
--- /dev/null
+++ b/app-containers/cri-o/cri-o-1.30.4.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+EGIT_COMMIT=dbc00ffd41a487c847158032193b6dca9b49e821
+
+inherit go-module
+
+DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime 
Interface"
+HOMEPAGE="https://cri-o.io/";
+SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="btrfs +device-mapper selinux systemd"
+
+COMMON_DEPEND="
+   app-crypt/gpgme:=
+   app-containers/conmon
+   app-containers/runc
+   dev-libs/glib:=
+   dev-libs/libassuan:=
+   dev-libs/libgpg-error:=
+   net-firewall/conntrack-tools
+   net-firewall/iptables
+   app-containers/cni-plugins
+   net-misc/socat
+   sys-apps/iproute2
+   sys-libs/libseccomp:=
+   btrfs? ( sys-fs/btrfs-progs )
+   device-mapper? ( sys-fs/lvm2:= )
+   selinux? ( sys-libs/libselinux:= )
+   systemd? ( sys-apps/systemd:= )"
+DEPEND="
+   ${COMMON_DEPEND}
+   dev-go/go-md2man"
+RDEPEND="${COMMON_DEPEND}
+   !> Makefile || die
+
+   sed -e 's:/usr/local/bin:/usr/bin:' \
+   -i contrib/systemd/* || die
+}
+
+src_compile() {
+   [[ -f hack/btrfs_installed_tag.sh ]] || die
+   use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
+   hack/btrfs_installed_tag.sh || die; }
+
+   [[ -f hack/libdm_installed.sh ]] || die
+   use device-mapper || { echo -e "#!/bin/sh\necho 
exclude_graphdriver_devicemapper" > \
+   hack/libdm_installed.sh || die; }
+
+   [[ -f hack/selinux_tag.sh ]] || die
+   use selinux || { echo -e "#!/bin/sh\ntrue" > \
+   hack/selinux_tag.sh || die; }
+
+   mkdir -p bin || die
+   emake all \
+   GOBIN="${S}/bin" \
+   GO_BUILD="go build ${GOFLAGS}" \
+   GO_MD2MAN="$(which go-md2man)"
+}
+
+src_install() {
+   emake install install.config install.systemd \
+   DESTDIR="${D}" \
+   GO_MD2MAN="$(which go-md2man)" \
+   PREFIX="${D}${EPREFIX}/usr"
+   keepdir /etc/crio
+   mv "${ED}/etc/crio/crio.conf"{,.example} || die
+
+   newinitd "${FILESDIR}/crio.initd" crio
+
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+
+   # Suppress crio log error messages triggered if these don't exist.
+   keepdir /etc/containers/oci/hooks.d
+   keepdir /usr/share/containers/oci/hooks.d
+
+   # Suppress crio "Missing CNI default network" log message.
+   keepdir /etc/cni/net.d
+   insinto /etc/cni/net.d
+   doins contrib/cni/99-loopback.conflist
+}



[gentoo-commits] repo/gentoo:master commit in: dev-go/go-tools/

2024-08-18 Thread Zac Medico
commit: 6b1059633c5956e575d7468a65ad57564190f91e
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 18 19:28:01 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 18 19:33:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b105963

dev-go/go-tools: add 0.24.0

Tested with go-1.23.0 and it successfully built all of the
expected binaries.

Closes: https://bugs.gentoo.org/937934
Signed-off-by: Zac Medico  gentoo.org>

 dev-go/go-tools/Manifest   |  2 ++
 dev-go/go-tools/go-tools-0.24.0.ebuild | 52 ++
 2 files changed, 54 insertions(+)

diff --git a/dev-go/go-tools/Manifest b/dev-go/go-tools/Manifest
index 69c562a90597..e98c5f7e0f5b 100644
--- a/dev-go/go-tools/Manifest
+++ b/dev-go/go-tools/Manifest
@@ -2,3 +2,5 @@ DIST go-tools-0.1.10-deps.tar.xz 16247548 BLAKE2B 
7dc27e377eec3c7fa49d37614d2b7b
 DIST go-tools-0.1.10.tar.gz 3014465 BLAKE2B 
f3b6129ad00385539eab3426bc542a120bd41d3984174d5d8b91bee6435d7a179c0058f2a50de3235a07e5b67f6d9657288bd578591d61187447441bb6408e76
 SHA512 
9c817c98739a1788b7fb459728528b5c647226e64df495661c1b3027bfa571e884d6c28d8796558b65e2ba54774976897bddcd052568f33d4e30ce8ee5d883e1
 DIST go-tools-0.20.0-deps.tar.xz 383336 BLAKE2B 
0bddd81087bae28c2d874a2ea647a5293b32895fded73351813c1542066d7ee1a0d3d8a0aaa5c13cea3e117c692b46690282f992293d83c8fbd2901adc71911f
 SHA512 
eeaa8a85ec81eed757156f99d6bc99f69c89debf52eb862e870c7effb7a0b800736e04f507efa19be122a5246aed2519d4c33bd850bc790947f065ab8a87a323
 DIST go-tools-0.20.0.tar.gz 3779878 BLAKE2B 
42175d921dfb5acb25c9eee224138675619860aefaca09db8e354481c146faa52b2fcc64d99953d8508a79ce8375ebcc42a1e7d20f4721e55b8c843989565fbc
 SHA512 
c67706593d0a48f941955e40cadc1e39961b07ba51c9342b302ba99f93a1e55b9feec21d6171ee370f96293253be27b480274d48a16eff1055373f81b73f2dd9
+DIST go-tools-0.24.0-deps.tar.xz 423048 BLAKE2B 
0df1a18476c207e26c5397aa81d475e96ac00cbf9460899c3e66804963b5661befcd648f0bc51bf67775b533c370dcf634939bd6c5efad5ee289f73233c09b66
 SHA512 
f4eb6bfc918b947b6903e260edc99f71ebea4b8c39a118526608b9c86712e97029ab4473fd617dc8377a7021a8b606d267abf686c4a36a37556f828afd53fb4c
+DIST go-tools-0.24.0.tar.gz 6977100 BLAKE2B 
ca0a9c5d3e41ca9accbacfc4074827bb3750c7bab8b20a80c76998dc4078d889eeaaf0f7fc6cd3864b5613c8474175d626165a5e20ada12876afa0279d325887
 SHA512 
bb41b620d4e3fe2c028a618656b47e28e9ecf2ecc49bb70dcd919948d0c6a4eeeded04ef2fa7604307029686605d5d809ff671dc1b0d3143af7100e4e480a444

diff --git a/dev-go/go-tools/go-tools-0.24.0.ebuild 
b/dev-go/go-tools/go-tools-0.24.0.ebuild
new file mode 100644
index ..fedb0f72416a
--- /dev/null
+++ b/dev-go/go-tools/go-tools-0.24.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="Tools that support the Go programming language (godoc, etc.)"
+HOMEPAGE="https://godoc.org/golang.org/x/tools";
+SRC_URI="https://github.com/golang/tools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
+S=${WORKDIR}/${P#go-}
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+# Many test failures.
+RESTRICT="test"
+
+GO_TOOLS_BINS=(
+   authtest benchcmp bisect bundle callgraph compilebench cookieauth
+   deadcode defers digraph eg fieldalignment file2fuzz findcall fiximports
+   fuzz-driver fuzz-runner gitauth go-contrib-init godex godoc goimports
+   gomvpkg gonew gopackages gorename gostacks gotype goyacc html2article
+   httpmux ifaceassert lostcancel netrcauth nilness nodecount play present
+   present2md shadow splitdwarf ssadump stress stringer stringintconv
+   toolstash unmarshal unusedresult
+)
+
+src_compile() {
+   local bin packages
+   readarray -t packages < <(ego list ./...)
+   GOBIN="${S}/bin" nonfatal ego install -work "${packages[@]}" || true
+   for bin in "${GO_TOOLS_BINS[@]}"; do
+   [[ -x ${S}/bin/${bin} ]] || \
+   die "File not found, check build log: ${S}/bin/${bin}"
+   done
+}
+
+src_test() {
+   ego test -work ./...
+}
+
+src_install() {
+   # bug 558818: install binaries in $GOROOT/bin to avoid file collisions
+   local goroot=$(go env GOROOT)
+   goroot=${goroot#${EPREFIX}}
+   exeinto "${goroot}/bin"
+   doexe bin/*
+   dodir /usr/bin
+   ln "${ED}/${goroot}/bin/godoc" "${ED}/usr/bin/godoc" || die
+}



[gentoo-commits] repo/gentoo:master commit in: dev-go/go-tools/

2024-08-18 Thread Zac Medico
commit: 613cdf31149d1fbf54750b5fe3b8d11ddc8d0d95
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug 18 23:45:19 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Aug 18 23:46:35 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=613cdf31

dev-go/go-tools: update HOMEPAGE

Signed-off-by: Zac Medico  gentoo.org>

 dev-go/go-tools/go-tools-0.1.10.ebuild | 2 +-
 dev-go/go-tools/go-tools-0.20.0.ebuild | 2 +-
 dev-go/go-tools/go-tools-0.24.0.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-go/go-tools/go-tools-0.1.10.ebuild 
b/dev-go/go-tools/go-tools-0.1.10.ebuild
index 7c66827e5473..87ff0acf7a3c 100644
--- a/dev-go/go-tools/go-tools-0.1.10.ebuild
+++ b/dev-go/go-tools/go-tools-0.1.10.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 inherit go-module
 
 DESCRIPTION="Tools that support the Go programming language (godoc, etc.)"
-HOMEPAGE="https://godoc.org/golang.org/x/tools";
+HOMEPAGE="https://pkg.go.dev/golang.org/x/tools";
 SRC_URI="https://github.com/golang/tools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz";
 S=${WORKDIR}/${P#go-}

diff --git a/dev-go/go-tools/go-tools-0.20.0.ebuild 
b/dev-go/go-tools/go-tools-0.20.0.ebuild
index fe369f14fa0a..4f8e29b6be14 100644
--- a/dev-go/go-tools/go-tools-0.20.0.ebuild
+++ b/dev-go/go-tools/go-tools-0.20.0.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 inherit go-module
 
 DESCRIPTION="Tools that support the Go programming language (godoc, etc.)"
-HOMEPAGE="https://godoc.org/golang.org/x/tools";
+HOMEPAGE="https://pkg.go.dev/golang.org/x/tools";
 SRC_URI="https://github.com/golang/tools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
 S=${WORKDIR}/${P#go-}

diff --git a/dev-go/go-tools/go-tools-0.24.0.ebuild 
b/dev-go/go-tools/go-tools-0.24.0.ebuild
index fedb0f72416a..312e41f08ccd 100644
--- a/dev-go/go-tools/go-tools-0.24.0.ebuild
+++ b/dev-go/go-tools/go-tools-0.24.0.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 inherit go-module
 
 DESCRIPTION="Tools that support the Go programming language (godoc, etc.)"
-HOMEPAGE="https://godoc.org/golang.org/x/tools";
+HOMEPAGE="https://pkg.go.dev/golang.org/x/tools";
 SRC_URI="https://github.com/golang/tools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz";
 S=${WORKDIR}/${P#go-}



[gentoo-commits] repo/gentoo:master commit in: dev-go/go-tools/

2024-08-18 Thread Zac Medico
commit: f52b5bc93c2fe7f5ce1f20dea1c57410aad17a27
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Aug 19 00:05:13 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Aug 19 00:06:20 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b5bc9

dev-go/go-tools: Compile go packages selectively

This eliminates the need to use nonfatal and check for
expected binaries afterwards.

Signed-off-by: Zac Medico  gentoo.org>

 dev-go/go-tools/go-tools-0.24.0.ebuild | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/dev-go/go-tools/go-tools-0.24.0.ebuild 
b/dev-go/go-tools/go-tools-0.24.0.ebuild
index 312e41f08ccd..442e64290744 100644
--- a/dev-go/go-tools/go-tools-0.24.0.ebuild
+++ b/dev-go/go-tools/go-tools-0.24.0.ebuild
@@ -29,12 +29,8 @@ GO_TOOLS_BINS=(
 
 src_compile() {
local bin packages
-   readarray -t packages < <(ego list ./...)
-   GOBIN="${S}/bin" nonfatal ego install -work "${packages[@]}" || true
-   for bin in "${GO_TOOLS_BINS[@]}"; do
-   [[ -x ${S}/bin/${bin} ]] || \
-   die "File not found, check build log: ${S}/bin/${bin}"
-   done
+   readarray -t packages < <(ego list ./... | grep -E "/($(echo 
"${GO_TOOLS_BINS[@]}" | tr ' ' '|'))$")
+   GOBIN="${S}/bin" ego install -work "${packages[@]}"
 }
 
 src_test() {



[gentoo-commits] repo/gentoo:master commit in: app-containers/k3d/

2024-08-18 Thread Zac Medico
commit: 7cbcd50c9c409581992d7c7ee2f3c2b82e2f6c6f
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Aug 19 03:23:58 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Aug 19 03:29:15 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cbcd50c

app-containers/k3d: add 5.7.3 (bump K3S_TAG to v1.30.3-k3s1)

Signed-off-by: Zac Medico  gentoo.org>

 app-containers/k3d/Manifest |  1 +
 app-containers/k3d/k3d-5.7.3.ebuild | 43 +
 2 files changed, 44 insertions(+)

diff --git a/app-containers/k3d/Manifest b/app-containers/k3d/Manifest
index 536b64890a4f..b3995d3253af 100644
--- a/app-containers/k3d/Manifest
+++ b/app-containers/k3d/Manifest
@@ -1,2 +1,3 @@
 DIST k3d-5.4.9.tar.gz 7740293 BLAKE2B 
b7a657720524abac2c36cccef8cf6e9c5588fcc191ecc2a3f7ed138762cc23abdc2b6413c67d426635e50777b8b87fccf93dc7cd88b0dd5c67becbc3f9056472
 SHA512 
caa6566f79837deb31db991df5475369b4921a5a110b723ad6c76f8ce2349399d0843d3e5de071a4ec50b318157d8fb47cc36018a0af9bb487793269c27027bf
 DIST k3d-5.6.0.tar.gz 8022281 BLAKE2B 
93f32f65e6c42650608b94d58d2149c3fec96251500be0d95d5673f07ae8c366d80954afa4d80eec149b7a9e8af7389323c21498910a3010bb80b975f64064d0
 SHA512 
c13df93499ffde6567e4bf7dcf260cb65ca01c390bf39361122fa61553591f418213049cf29d8dde63896f026a28d96f4e2ab522a143ac66cfa9f3786f8ba9b9
+DIST k3d-5.7.3.tar.gz 9566684 BLAKE2B 
9dff7ab447b3fd790a036d61bc3a4bb61238c74eec60aa12a4ff10150ff2f4999a3b1e635aaae6211f4e05ed9c589dc08e08ba511eb7690f857c0dad954b6ce7
 SHA512 
d6e2f6fb3013429745e1663214c7dd66dd2727b592a32e81f5837bbcc997aee18418366a0e21463ba48a2d72b9a86067f492f1f44c4689a129166dcf018e5642

diff --git a/app-containers/k3d/k3d-5.7.3.ebuild 
b/app-containers/k3d/k3d-5.7.3.ebuild
new file mode 100644
index ..1a19ed584ac4
--- /dev/null
+++ b/app-containers/k3d/k3d-5.7.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="k3d creates k3s clusters in docker"
+HOMEPAGE="https://github.com/rancher/k3d";
+
+K3D_K3S_TAG=v1.30.3-k3s1
+SRC_URI="https://github.com/rancher/k3d/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0 ISC"
+SLOT="0"
+
+KEYWORDS="~amd64"
+IUSE="doc"
+
+src_prepare() {
+   default
+   rm Makefile || die
+}
+
+src_compile() {
+   local extra_ldflags=(
+   -X "github.com/k3d-io/k3d/v5/version.Version=v${PV}"
+   -X "github.com/k3d-io/k3d/v5/version.K3sVersion=${K3D_K3S_TAG}"
+   )
+   env -u GOWORK \
+   CGO_ENABLED=0 \
+   go build \
+   -mod=vendor \
+   -ldflags "-w -s ${extra_ldflags[*]}" \
+   -o bin/k3d || die
+}
+
+src_install() {
+   dobin bin/${PN}
+   DOCS=(*.md)
+   if use doc; then
+   DOCS+=(docs)
+   fi
+   default_src_install
+}



[gentoo-commits] proj/portage:master commit in: man/, lib/portage/dbapi/, lib/portage/binrepo/, lib/portage/, lib/_emerge/

2024-07-16 Thread Zac Medico
commit: 20cd76664c11991e59b7d72b782fea96259ff9af
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Jul 17 02:14:34 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Jul 17 02:14:34 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=20cd7666

binrepos.conf: Support custom download location

Download packages to a custom location if it is configured
in binrepos.conf, instead of PKGDIR. If a custom download
location is not configured then inject downloaded packages
into PKGDIR as usual.

The binarytree download_required method should now be used
instead of the isremote method to check if download is
required, since a remote package may or may not be cached
in the custom location. The get_local_repo_location method
should be used to check if there is a custom download
location, and if there is then downloaded packages must
not be injected into PKGDIR.

If any packages from a repo with a custom download location
were injected into PKGDIR in the past, their identity will
be recognized and will not be re-downloaded to the custom
location.

Bug: https://bugs.gentoo.org/934784
Signed-off-by: Zac Medico  gentoo.org>

 lib/_emerge/Binpkg.py   |  7 +++--
 lib/_emerge/BinpkgFetcher.py|  8 -
 lib/_emerge/BinpkgPrefetcher.py |  7 +
 lib/_emerge/Scheduler.py|  8 +++--
 lib/_emerge/actions.py  |  2 +-
 lib/portage/binrepo/config.py   |  3 ++
 lib/portage/dbapi/bintree.py| 70 +++--
 lib/portage/versions.py |  6 +++-
 man/portage.5   |  7 -
 9 files changed, 106 insertions(+), 12 deletions(-)

diff --git a/lib/_emerge/Binpkg.py b/lib/_emerge/Binpkg.py
index 299ae7fbc9..437111fa10 100644
--- a/lib/_emerge/Binpkg.py
+++ b/lib/_emerge/Binpkg.py
@@ -170,7 +170,7 @@ class Binpkg(CompositeTask):
 pkg_count = self.pkg_count
 fetcher = None
 
-if self.opts.getbinpkg and self._bintree.isremote(pkg.cpv):
+if self.opts.getbinpkg and self._bintree.download_required(pkg.cpv):
 fetcher = BinpkgFetcher(
 background=self.background,
 logfile=self.settings.get("PORTAGE_LOG_FILE"),
@@ -245,7 +245,10 @@ class Binpkg(CompositeTask):
 pkg = self.pkg
 pkg_count = self.pkg_count
 
-if self._fetched_pkg:
+if self._fetched_pkg and 
self._bintree.get_local_repo_location(pkg.cpv):
+os.rename(self._fetched_pkg, self._pkg_allocated_path)
+pkg_path = self._pkg_allocated_path
+elif self._fetched_pkg:
 stdout_orig = sys.stdout
 stderr_orig = sys.stderr
 out = io.StringIO()

diff --git a/lib/_emerge/BinpkgFetcher.py b/lib/_emerge/BinpkgFetcher.py
index 19d08359f0..a357bac82d 100644
--- a/lib/_emerge/BinpkgFetcher.py
+++ b/lib/_emerge/BinpkgFetcher.py
@@ -34,8 +34,14 @@ class BinpkgFetcher(CompositeTask):
 )
 binpkg_format = get_binpkg_format(binpkg_path)
 
+getname_kwargs = {}
+if not bintree.get_local_repo_location(pkg.cpv):
+getname_kwargs.update(
+dict(allocate_new=True, remote_binpkg_format=binpkg_format)
+)
+
 self.pkg_allocated_path = pkg.root_config.trees["bintree"].getname(
-pkg.cpv, allocate_new=True, remote_binpkg_format=binpkg_format
+pkg.cpv, **getname_kwargs
 )
 self.pkg_path = self.pkg_allocated_path + ".partial"
 

diff --git a/lib/_emerge/BinpkgPrefetcher.py b/lib/_emerge/BinpkgPrefetcher.py
index a8af30ca80..f7204bcc17 100644
--- a/lib/_emerge/BinpkgPrefetcher.py
+++ b/lib/_emerge/BinpkgPrefetcher.py
@@ -51,6 +51,13 @@ class BinpkgPrefetcher(CompositeTask):
 self.wait()
 return
 
+if self._bintree.get_local_repo_location(self.pkg.cpv):
+os.rename(self.pkg_path, self.pkg_allocated_path)
+self._current_task = None
+self.returncode = os.EX_OK
+self.wait()
+return
+
 injected_pkg = None
 stdout_orig = sys.stdout
 stderr_orig = sys.stderr

diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index 614df9e783..e23ebeb7ac 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -830,7 +830,7 @@ class Scheduler(PollScheduler):
 elif (
 pkg.type_name == "binary"
 and "--getbinpkg" in self.myopts
-and pkg.root_config.trees["bintree"].isremote(pkg.cpv)
+and pkg.root_config.trees["bintree"].download_required(pkg.cpv)
 ):
 prefetcher = BinpkgPrefetcher(
 background=True, pkg=pkg, scheduler=self._sched_iface
@@ -939,7 +939,7 @@ class Scheduler(PollScheduler):
 
 # Display fetch on stdout, so that it's always clear what
 # is consuming

[gentoo-commits] repo/gentoo:master commit in: app-shells/nushell/files/, app-shells/nushell/

2024-07-19 Thread Zac Medico
commit: 3bdf21c1019f87a61b1c10c373f9b3327255edb2
Author: Jonas Frei  pm  me>
AuthorDate: Sun Jun 30 16:46:06 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Jul 20 03:52:55 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bdf21c1

app-shells/nushell: Add 0.95.0, renamed patch

Signed-off-by: Jonas Frei  pm.me>
Closes: https://github.com/gentoo/gentoo/pull/37379
Closes: https://bugs.gentoo.org/936307
Signed-off-by: Zac Medico  gentoo.org>

 app-shells/nushell/Manifest| 31 +++
 ...gins.patch => nushell-dont-build-plugins.patch} |  0
 app-shells/nushell/nushell-0.94.2.ebuild   |  2 +-
 ...nushell-0.94.2.ebuild => nushell-0.95.0.ebuild} | 63 +++---
 4 files changed, 63 insertions(+), 33 deletions(-)

diff --git a/app-shells/nushell/Manifest b/app-shells/nushell/Manifest
index 37648ffd4127..40fe25366e48 100644
--- a/app-shells/nushell/Manifest
+++ b/app-shells/nushell/Manifest
@@ -206,6 +206,7 @@ DIST const_format-0.2.31.crate 77893 BLAKE2B 
61d75cbff309a23f7bdcf5b02880e662b6b
 DIST const_format-0.2.32.crate 77317 BLAKE2B 
69b87c1d9dd81f5f92fe7cbc09dea126d386adb2cfb359ed9a906af554fe9b4083d49b87558e019777aff4d93e52babbf39e5d9934ce7163435168656ddb11a1
 SHA512 
05f883696902f13bb78278e0c202c092fe232cfab7a33c078a16b5f67825a85dede0b6bbb2969dad685977f67098c468916c7fb1d9c5c65bf7fee0a5f8329091
 DIST const_format_proc_macros-0.2.31.crate 24402 BLAKE2B 
9ab560ca7119fafbaa5c0275fb79e7c5be415ba54c3829a36d2e71cabb18407786ebf6f9a0754547ba673ca69b7d8522ae0279b8a5817026af7fd78c51fd48ce
 SHA512 
4e00b71994a57b8ccc8343d06fce01a346688780b2f3f939e44ec35515dead9de65012bebdfa1fbe3a32de17e9e8361d9322279bf63800d0aad9fce7967bb97a
 DIST const_format_proc_macros-0.2.32.crate 24389 BLAKE2B 
fdb8dad234c45a2fb179c41573765dc0495ffd7268e325403ee9e56b80e68999bd886e22c414c6591ff6be798ae1c172b671d167a7e3ceb853185613f1e4c1c1
 SHA512 
01b4fb82eb8e3c59a80bb4a819db9218c25d57e947eee6e8a7e4bcc9339c423a2f028fac0959f3781da5e20d7012d2264f05751661b0df7f7011701da124ad0e
+DIST convert_case-0.6.0.crate 18675 BLAKE2B 
5e5ab159a61e68b801f1c95dc5336f3af7ffe6fee212c8ffb9905af1121f0b272b234b4e70a30f29f5ed24f4825ccfb59722057b69549fec0fc3472857ee1ce9
 SHA512 
3b17449195a9a36e3965db89eeb967979c192ad7743217ea08e8c8b91ecae1ac1674362d05dc6f32f1f361fface3f783398285bb78060403f65a777a9d29adf2
 DIST core-foundation-0.9.3.crate 27059 BLAKE2B 
d94fec51b1b1055c285609f4bba45c5169a8cc775e251eac7fbf0da7ef894e1be9ca9f4236b82b67be0610bdf811366e0c6fd3cdb671a1e83c49717e2c5b2d03
 SHA512 
de07967c4f5e2d2e730b6f21984c228dad2cb2f55187f13074a2200f4ce9f906763ee818267a9c67ea560229db7363473b230670a6dbd224fc335f32ba03d072
 DIST core-foundation-0.9.4.crate 27743 BLAKE2B 
5b695e671cc833170bc6bad436b2d0d8d386ffb8181bfcf2e92a1d93cee67c3ba1768cf57064fb91b0897c6aec1be7db40b5bd256a052c1bdaf872ec19f6e15e
 SHA512 
82d0878a1b9e3d56b3666fb5a78f92c6f7806d01665c242c06a640bd6b1fd36260211e92dc05e1a16d1430622bfdd650aabb0b5bd8e5592f74abdcf412448e33
 DIST core-foundation-sys-0.8.4.crate 17725 BLAKE2B 
8afe47838dc91c8848c0d6a96a604149e5f0762228dbc10c17b85e4e9cd2c3928712bd0b28e1071f5fd6fd76d4ef972cb86c6c929246fb6e8456933a8ac7
 SHA512 
15da472316d6decc213e4e5f08ecd22a108ebefe427b890741de4f9199614f19123e64329da76de5e8b4c9ff74ffc31738fd929acc1460fc757b4aa1fd3fdbb6
@@ -262,6 +263,7 @@ DIST dlib-0.5.2.crate 5806 BLAKE2B 
2a8be2d76c44c95d5b1b9a5439a99a75daa703a341980
 DIST dlv-list-0.5.0.crate 22112 BLAKE2B 
ed6ba7f0621dea6bad42a96423c147e55d6b120bedf7b1f8eee9f1101e38bc44f5e030c67df29d281829a9951233c0a8138906dd59c454caa44aeca443f08758
 SHA512 
4acfd27f975f314edb8e520fdd36c45f9dce60db7d0f1a8b483689ce01e099663fb5608a0463b0c4c3453d493787ba4167b21fab50eadceb90bbe202396ef2a6
 DIST dlv-list-0.5.2.crate 22373 BLAKE2B 
9edcbd42af8665750bf633dfea9543db4e5f37208523ee05300a599d7107a57e35e9eee2c60ab9cc1c5dc5d7408187dbf846fb0019a1e7ea7de905e08f018453
 SHA512 
f2fe69a3a5d319ea963c53e6a410f3a5553d6f6b5708e6318b450ae3b5319a19f9d492bcddd233d7a5a65355ca378bc41232c335deb9c4987dd9350a37afbca3
 DIST doc-comment-0.3.3.crate 4123 BLAKE2B 
a82d1c1a7a90af6e111b5e684a1298d7eac5fd8e4bf7d5baf6c7403d26b609958716d57e51122fe7ad7626fe00a2d824dcfef3cc2fd7679fdb7b5099603de1cd
 SHA512 
e98ff9646a3612bd41bb6f278e7b6e9a0c58747f8b82524da814cf51b7f06c76ad4d65b502ac5740e818744abb295f78f15f8262d0b50ced1523f6d1a26939ba
+DIST doctest-file-1.0.0.crate 5703 BLAKE2B 
eafa2ab1455e07bf20006d8a254c1dc15ee6ecd94e2d0f78c2500490419d18a4ec8abb0615b8b444797efd1c1be6c9a8cfab2e8849425868b447a253a265939a
 SHA512 
a02e3071c51a7cf9de9551c84054c3e7ded8823bfeef8ca5a9c7fa0c7e0c49a7221908039ab19541728e0591c5b8261227cde10ccaacde6857c00097f203f3ef
 DIST downcast-rs-1.2.0.crate 11670 BLAKE2B 
7d44d708c1ac068a02ea5d72dd3caa8a7f6d18b7ee653d520600acc9c52365824f5b8d3c68143d1d13aa438a18b16ff9975e15131cac7ec48b2d995184673d37
 SHA512 
b80b72f30b42c5e6b2bd33287f2dd22be5673b2fa5c1a8c75c5de224fc7eca46a55f2fce63c02d225dfbc94ac3462b4b2fec53d63331c70da6307ebcdcc6cb14

[gentoo-commits] repo/gentoo:master commit in: app-portage/kuroo/

2024-07-20 Thread Zac Medico
commit: 89a007fc844e8dac80373dd424b497173da32679
Author: A Schenck  users  sourceforge  net>
AuthorDate: Sat Jul 20 21:57:25 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Jul 20 22:00:20 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a007fc

app-portage/kuroo: add 1.2.3

Closes: https://bugs.gentoo.org/936066
Signed-off-by: Zac Medico  gentoo.org>

 app-portage/kuroo/Manifest   |  1 +
 app-portage/kuroo/kuroo-1.2.3.ebuild | 48 
 2 files changed, 49 insertions(+)

diff --git a/app-portage/kuroo/Manifest b/app-portage/kuroo/Manifest
index c0b12acacf38..58a4dceb1903 100644
--- a/app-portage/kuroo/Manifest
+++ b/app-portage/kuroo/Manifest
@@ -1 +1,2 @@
 DIST kuroo-1.2.2.tar.xz 250284 BLAKE2B 
57bb80fde83e4506b0e8e9230a9e619ec887327779e1d9700e51bd534fa3d14ab51d3d80aad1def1a67cc14fd446f84f1ea551919578bf7f92cbb5dc4368e172
 SHA512 
6120508d77fe2b6787aa62994327882bd7abd0a08bfce0905920ab17b7837aabfa271c572377fe16131dd9770e5fd45c82409c6aeae5f27f8c0eb33d4e0cdb4c
+DIST kuroo-1.2.3.tar.xz 253408 BLAKE2B 
621e4e6a54d9beadb33ff550f505405cfdb3a052bb82522e5890e9884c0d3b8e79a589a1d5a464d4ff9e0464b7931e661c83e98ff55ed85c0d83f1ccb0d0cea9
 SHA512 
f441054bcb97f9ff21a9df2f9a9615ec7445bcbe2ce1d11ba413ce94a265cc1de37fdac901ffb6dae8c3e58dcb128b7d24ca686fa74ef6bd428f6b6056d481a6

diff --git a/app-portage/kuroo/kuroo-1.2.3.ebuild 
b/app-portage/kuroo/kuroo-1.2.3.ebuild
new file mode 100644
index ..75678dec77e9
--- /dev/null
+++ b/app-portage/kuroo/kuroo-1.2.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.96.0
+inherit ecm
+
+DESCRIPTION="Graphical Portage frontend based on KDE Frameworks"
+HOMEPAGE="https://sourceforge.net/projects/kuroo/";
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+   dev-db/sqlite:3
+   dev-qt/qtgui:5
+   dev-qt/qtwidgets:5
+   >=kde-frameworks/kauth-${KFMIN}:5
+   >=kde-frameworks/kconfig-${KFMIN}:5
+   >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+   >=kde-frameworks/kcoreaddons-${KFMIN}:5
+   >=kde-frameworks/kcrash-${KFMIN}:5
+   >=kde-frameworks/ki18n-${KFMIN}:5
+   >=kde-frameworks/kio-${KFMIN}:5
+   >=kde-frameworks/kitemviews-${KFMIN}:5
+   >=kde-frameworks/knotifications-${KFMIN}:5
+   >=kde-frameworks/ktextwidgets-${KFMIN}:5
+   >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+   >=kde-frameworks/kxmlgui-${KFMIN}:5
+   >=kde-frameworks/threadweaver-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+   app-portage/gentoolkit
+   kde-apps/kompare:5
+"
+
+pkg_postinst() {
+   if ! has_version app-admin/logrotate ; then
+   elog "Installing app-admin/logrotate is recommended to keep"
+   elog "portage's summary.log size reasonable to view in the 
history page."
+   fi
+
+   ecm_pkg_postinst
+}



[gentoo-commits] repo/gentoo:master commit in: dev-util/android-tools/

2024-09-04 Thread Zac Medico
commit: 754f240e6662ee4ac5d93fd52adca345d037f6c2
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Sep  5 05:32:20 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Thu Sep  5 05:36:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754f240e

dev-util/android-tools: Depend on dev-cpp/abseil-cpp:=

Bug: https://bugs.gentoo.org/939089
Signed-off-by: Zac Medico  gentoo.org>

 dev-util/android-tools/android-tools-33.0.3-r1.ebuild | 3 ++-
 dev-util/android-tools/android-tools-34.0.5.ebuild| 1 +
 dev-util/android-tools/android-tools-35.0.1.ebuild| 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-util/android-tools/android-tools-33.0.3-r1.ebuild 
b/dev-util/android-tools/android-tools-33.0.3-r1.ebuild
index 155cf7f10a4b..b79b27a92a04 100644
--- a/dev-util/android-tools/android-tools-33.0.3-r1.ebuild
+++ b/dev-util/android-tools/android-tools-33.0.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -28,6 +28,7 @@ DEPEND="
app-arch/brotli:=
app-arch/lz4:=
app-arch/zstd:=
+   dev-cpp/abseil-cpp:=
dev-libs/libpcre2:=
>=dev-libs/protobuf-3.0.0:=
sys-libs/zlib:=

diff --git a/dev-util/android-tools/android-tools-34.0.5.ebuild 
b/dev-util/android-tools/android-tools-34.0.5.ebuild
index 32ad5c7b7ab0..8cec6941f76e 100644
--- a/dev-util/android-tools/android-tools-34.0.5.ebuild
+++ b/dev-util/android-tools/android-tools-34.0.5.ebuild
@@ -28,6 +28,7 @@ DEPEND="
app-arch/brotli:=
app-arch/lz4:=
app-arch/zstd:=
+   dev-cpp/abseil-cpp:=
dev-libs/libpcre2:=
>=dev-libs/protobuf-3.0.0:=
sys-libs/zlib:=

diff --git a/dev-util/android-tools/android-tools-35.0.1.ebuild 
b/dev-util/android-tools/android-tools-35.0.1.ebuild
index 9dacbecf215d..3ffcb47e9012 100644
--- a/dev-util/android-tools/android-tools-35.0.1.ebuild
+++ b/dev-util/android-tools/android-tools-35.0.1.ebuild
@@ -28,6 +28,7 @@ DEPEND="
app-arch/brotli:=
app-arch/lz4:=
app-arch/zstd:=
+   dev-cpp/abseil-cpp:=
dev-libs/libpcre2:=
>=dev-libs/protobuf-3.0.0:=
sys-libs/zlib:=



[gentoo-commits] repo/gentoo:master commit in: app-containers/cri-tools/

2024-09-08 Thread Zac Medico
commit: daf65d92fa0382189822b3def322ee68adbd6771
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Sep  8 21:55:30 2024 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Sep  8 22:03:20 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daf65d92

app-containers/cri-tools: add 1.31.1

Signed-off-by: Zac Medico  gentoo.org>

 app-containers/cri-tools/Manifest|  1 +
 app-containers/cri-tools/cri-tools-1.31.1.ebuild | 33 
 2 files changed, 34 insertions(+)

diff --git a/app-containers/cri-tools/Manifest 
b/app-containers/cri-tools/Manifest
index a67abf87f207..f6b768507883 100644
--- a/app-containers/cri-tools/Manifest
+++ b/app-containers/cri-tools/Manifest
@@ -1,2 +1,3 @@
 DIST cri-tools-1.25.0.tar.gz 7905707 BLAKE2B 
79595f31fc22aff608406bad4319a60dddcabda5f4dab8706305f11500b3db43f1d7021a340a096227d4580212953f32a95b05bbf81c1236f8fa8cf635017abb
 SHA512 
dc04359320d59d6b3789e4e81fb613f3795b7e82dbad681393eaeff2c876e5b0393dd9384d7857d24ada5de34d03e151f7cf121367cc20e71d0b78607372b3a1
 DIST cri-tools-1.27.0.tar.gz 8465050 BLAKE2B 
d6c0429271ebc4085e75b54d7f3b9f75ab796e63bc9ae7562105296b13bbad8b512293a7d25abf1ab946f4bf54e672016fdb72696c12c730d21ac74724da465c
 SHA512 
b94122e6401eb0c33b9c3d112274b7ab20cbbad05e76a54933e79d2e42ded2d684771cb9ed703a6c1afa381844142b6f1b4dc77d17e915f9a42c236fd8426b9b
+DIST cri-tools-1.31.1.tar.gz 7830559 BLAKE2B 
5ec935be8d453a2d024fb8b07c8c7a21a15c23c7aba03b9030806c5ed47698f41a5167b02c3d38e792fec035725fccdff92867e68c5b2c8a06ff040e4c37cc9e
 SHA512 
a72946944207d20f27236da12f7c2d532a1c9ebc881c3af4709494f7abc6f7b2d421934006a535a0b4a35926f09f58315ff0aaf4da870fd5a65281f547ef86a1

diff --git a/app-containers/cri-tools/cri-tools-1.31.1.ebuild 
b/app-containers/cri-tools/cri-tools-1.31.1.ebuild
new file mode 100644
index ..21381a7af4bb
--- /dev/null
+++ b/app-containers/cri-tools/cri-tools-1.31.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 go-module
+
+DESCRIPTION="CLI and validation tools for Kubelet Container Runtime (CRI)"
+HOMEPAGE="https://github.com/kubernetes-sigs/cri-tools";
+SRC_URI="https://github.com/kubernetes-sigs/cri-tools/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+RESTRICT="test"
+
+DOCS=( docs {README,RELEASE,CHANGELOG,CONTRIBUTING}.md )
+
+src_compile() {
+   emake VERSION="${PV}"
+   find build/ -name crictl -exec cp {} build/bin/ \; || die
+   ./build/bin/crictl completion bash > "crictl.bash" || die
+   ./build/bin/crictl completion zsh > "crictl.zsh" || die
+}
+
+src_install() {
+   einstalldocs
+
+   dobin ./build/bin/crictl
+   newbashcomp crictl.bash crictl
+   insinto /usr/share/zsh/site-functions
+   newins crictl.zsh _crictl
+}



[gentoo-commits] proj/portage:master commit in: pym/portage/util/, bin/

2014-11-03 Thread Zac Medico
commit: a899fee4b565d31c65ad8e458a2acf65f77fcb03
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Nov  3 21:17:19 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Nov  3 21:17:19 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a899fee4

Remove redundant PORTAGE_XATTR_EXCLUDE defaults (527636)

In install.py and movefile.py there were some redundant default
PORTAGE_XATTR_EXCLUDE settings. The default settings in make.globals
should be sufficient. Therefore, remove the redundant settings so that
we don't have to maintain them.

Fixes: 2fcdb5f36fac ("Add btrfs.* to default PORTAGE_XATTR_EXCLUDE (527636)")
X-Gentoo-Bug: 527636
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=527636
Acked-by: Brian Dolbec  gentoo.org>
Acked-by: Anthony G. Basile  gentoo.org>

---
 bin/install.py   | 2 +-
 pym/portage/util/movefile.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/install.py b/bin/install.py
index 3c5e0de..5bbe97b 100755
--- a/bin/install.py
+++ b/bin/install.py
@@ -171,7 +171,7 @@ def copy_xattrs(opts, files):
source, target = files, opts.target_directory
target_is_directory = True
 
-   exclude = os.environ.get("PORTAGE_XATTR_EXCLUDE", "security.* 
system.nfs4_acl")
+   exclude = os.environ.get("PORTAGE_XATTR_EXCLUDE", "")
 
try:
if target_is_directory:

diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py
index 452e77f..d00f624 100644
--- a/pym/portage/util/movefile.py
+++ b/pym/portage/util/movefile.py
@@ -328,7 +328,7 @@ def movefile(src, dest, newmtime=None, sstat=None, 
mysettings=None,
if xattr_enabled:
try:
_copyxattr(src_bytes, 
dest_tmp_bytes,
-   
exclude=mysettings.get("PORTAGE_XATTR_EXCLUDE", "security.* system.nfs4_acl"))
+   
exclude=mysettings.get("PORTAGE_XATTR_EXCLUDE", ""))
except SystemExit:
raise
except:



[gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/

2014-11-05 Thread Zac Medico
commit: 7c9a9a45874816aa42c6667a18caa4655083e3b3
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Nov  5 06:32:24 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Nov  5 19:35:31 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7c9a9a45

doebuild: fix bug #528272

The doebuild function has a boolean "unpacked" variable which it sets
to True if it determines that the "unpack" phase has already executed
and the last modification times of the distfiles are older than the
last modification time of WORKDIR. The code which sets the "unpacked"
flag does not need to run unless the current phase is supposed to have
a build directory. Therefore, disable this code for all phases that are
not supposed to have a build directory. This fixes incorrect behavior
of the "fetch" phase as reported in bug #528272.

X-Gentoo-Bug: 528272
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528272
Acked-by: Alexander Berntsen  gentoo.org>

---
 pym/portage/package/ebuild/doebuild.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index 544d193..6df3c69 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -829,7 +829,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, 
settings=None, debug=0,
alist = set(mysettings.configdict["pkg"].get("A", "").split())
 
unpacked = False
-   if tree != "porttree":
+   if tree != "porttree" or \
+   mydo in _doebuild_commands_without_builddir:
pass
elif "unpack" not in phases_to_run:
unpacked = os.path.exists(os.path.join(



[gentoo-commits] proj/portage:master commit in: bin/

2014-11-08 Thread Zac Medico
commit: b30f0a8527485b3dacf9255bd03f471c20d97ef1
Author: Theo Chatzimichos  gentoo  org>
AuthorDate: Sat Nov  8 16:36:51 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Nov  8 19:43:28 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b30f0a85

Add support for SUSE based distros in etc-update

Add support for reading/merging *.rpmnew files created in SUSE based distros.
Configuration from etc-update will be read:
- from portage config vars in Gentoo based distros
- from portage config vars in non Gentoo distros if portage is installed
- from /etc/sysconfig/etc-update in SUSE distros if portage is absent

Signed-off-by: Michal Hrušecký  gentoo.org>
X-Gentoo-Bug: 456128
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=456128

---
 bin/etc-update | 58 +++---
 1 file changed, 51 insertions(+), 7 deletions(-)

diff --git a/bin/etc-update b/bin/etc-update
index 1d78e96..0307688 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -32,6 +32,35 @@ get_config() {
"${PORTAGE_CONFIGROOT}"etc/etc-update.conf)
 }
 
+OS_RELEASE_ID=$(cat /etc/os-release 2>/dev/null | grep '^ID=' | cut -d'=' -f2)
+
+case $OS_RELEASE_ID in
+   suse|opensuse) OS_FAMILY='suse' ;;
+   *) OS_FAMILY='gentoo' ;;
+esac
+
+if [[ $OS_FAMILY == 'gentoo' ]]; then
+   get_basename_find_opt() {
+   echo "._cfg_${1}"
+   }
+   get_scan_regexp() {
+   echo "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3$b\1$b\2$b\3:"
+   }
+   get_live_file() {
+   echo "${rpath}/${rfile:10}"
+   }
+elif [[ $OS_FAMILY == 'suse' ]]; then
+   get_basename_find_opt() {
+   echo "${1}.rpmnew"
+   }
+   get_scan_regexp() {
+   echo "s:\(^.*/\)\(.*\)\(\.rpmnew\):\1\2\3$b\1$b\3$b\2:"
+   }
+   get_live_file() {
+   echo "${cfg_file%.rpmnew}"
+   }
+fi
+
 cmd_var_is_valid() {
# return true if the first whitespace-separated token contained
# in "${1}" is an executable file, false otherwise
@@ -82,12 +111,13 @@ scan() {
# parent directory doesn't exist, we can safely skip it.
path=${path%/}
[[ -d ${path%/*} ]] || continue
-   local my_basename="${path##*/}"
+   local name_opt=$(get_basename_find_opt "${path##*/}")
path="${path%/*}"
-   find_opts=( -maxdepth 1 -name 
"._cfg_${my_basename}" )
+   find_opts=( -maxdepth 1 -name "$name_opt" )
else
# Do not traverse hidden directories such as .svn or 
.git.
-   find_opts=( -name '.*' -type d -prune -o -name 
'._cfg_*' )
+   local name_opt=$(get_basename_find_opt '*')
+   find_opts=( -name '.*' -type d -prune -o -name 
"$name_opt" )
fi
find_opts+=( ! -name '.*~' ! -iname '.*.bak' -print )
 
@@ -97,10 +127,11 @@ scan() {
fi
 
local file ofile b=$'\001'
+   local scan_regexp=$(get_scan_regexp)
for file in $(find "${path}"/ "${find_opts[@]}" |
  sed \
-e 's://*:/:g' \
-   -e 
"s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3$b\1$b\2$b\3:" |
+   -e "${scan_regexp}" |
  sort -t"$b" -k2,2 -k4,4 -k3,3 |
  LC_ALL=C cut -f1 -d"$b")
do
@@ -108,7 +139,7 @@ scan() {
rpath=${file%/*}
rfile=${file##*/}
cfg_file="${rpath}/${rfile}"
-   live_file="${rpath}/${rfile:10}"
+   live_file=$(get_live_file)
 
local mpath
for mpath in ${CONFIG_PROTECT_MASK}; do
@@ -702,7 +733,14 @@ while [[ -n $1 ]] ; do
 done
 ${SET_X} && set -x
 
-type -P portageq >/dev/null || die "missing portageq"
+if [[ $OS_FAMILY == 'suse' ]]; then
+   PORTAGE_CONFIGROOT='/'
+   PORTAGE_TMPDIR='/tmp'
+   CONFIG_PROTECT='/etc'
+   CONFIG_PROTECT_MASK=''
+   [[ -f /etc/sysconfig/etc-update ]] && . /etc/sysconfig/etc-update
+fi
+
 portage_vars=(
CONFIG_PROTECT{,_MASK}
PORTAGE_CONFIGROOT
@@ -712,7 +750,13 @@ portage_vars=(
USERLAND
NOCOLOR
 )
-eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" envvar -v 
${portage_vars[@]})
+
+if type -P portageq > /dev/null; then
+   eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" 
envvar -v ${portage_vars[@]})
+else
+   [[ $OS_FAMILY == 'gentoo' ]] && die "missing portageq"
+fi
+
 export PORTAGE_TMPDIR
 SCAN_PATHS=${*:-${CONFIG_PROTECT}}
 



[gentoo-commits] proj/portage:master commit in: bin/

2014-11-08 Thread Zac Medico
commit: 59471df7a8d05bd060f3b4eb0c25d806cc4883a4
Author: Theo Chatzimichos  gentoo  org>
AuthorDate: Sat Nov  8 16:36:51 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Nov  8 20:26:14 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=59471df7

Add support for SUSE based distros in etc-update

Add support for reading/merging *.rpmnew files created in SUSE based distros.
Configuration from etc-update will be read:
- from portage config vars in Gentoo based distros
- from portage config vars in non Gentoo distros if portage is installed
- from /etc/sysconfig/etc-update in SUSE distros if portage is absent

Signed-off-by: Michal Hrušecký  gentoo.org>
X-Gentoo-Bug: 456128
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=456128
Acked-by: Brian Dolbec  gentoo.org>
Acked-by: Zac Medico  gentoo.org>

---
 bin/etc-update | 58 +++---
 1 file changed, 51 insertions(+), 7 deletions(-)

diff --git a/bin/etc-update b/bin/etc-update
index 1d78e96..0307688 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -32,6 +32,35 @@ get_config() {
"${PORTAGE_CONFIGROOT}"etc/etc-update.conf)
 }
 
+OS_RELEASE_ID=$(cat /etc/os-release 2>/dev/null | grep '^ID=' | cut -d'=' -f2)
+
+case $OS_RELEASE_ID in
+   suse|opensuse) OS_FAMILY='suse' ;;
+   *) OS_FAMILY='gentoo' ;;
+esac
+
+if [[ $OS_FAMILY == 'gentoo' ]]; then
+   get_basename_find_opt() {
+   echo "._cfg_${1}"
+   }
+   get_scan_regexp() {
+   echo "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3$b\1$b\2$b\3:"
+   }
+   get_live_file() {
+   echo "${rpath}/${rfile:10}"
+   }
+elif [[ $OS_FAMILY == 'suse' ]]; then
+   get_basename_find_opt() {
+   echo "${1}.rpmnew"
+   }
+   get_scan_regexp() {
+   echo "s:\(^.*/\)\(.*\)\(\.rpmnew\):\1\2\3$b\1$b\3$b\2:"
+   }
+   get_live_file() {
+   echo "${cfg_file%.rpmnew}"
+   }
+fi
+
 cmd_var_is_valid() {
# return true if the first whitespace-separated token contained
# in "${1}" is an executable file, false otherwise
@@ -82,12 +111,13 @@ scan() {
# parent directory doesn't exist, we can safely skip it.
path=${path%/}
[[ -d ${path%/*} ]] || continue
-   local my_basename="${path##*/}"
+   local name_opt=$(get_basename_find_opt "${path##*/}")
path="${path%/*}"
-   find_opts=( -maxdepth 1 -name 
"._cfg_${my_basename}" )
+   find_opts=( -maxdepth 1 -name "$name_opt" )
else
# Do not traverse hidden directories such as .svn or 
.git.
-   find_opts=( -name '.*' -type d -prune -o -name 
'._cfg_*' )
+   local name_opt=$(get_basename_find_opt '*')
+   find_opts=( -name '.*' -type d -prune -o -name 
"$name_opt" )
fi
find_opts+=( ! -name '.*~' ! -iname '.*.bak' -print )
 
@@ -97,10 +127,11 @@ scan() {
fi
 
local file ofile b=$'\001'
+   local scan_regexp=$(get_scan_regexp)
for file in $(find "${path}"/ "${find_opts[@]}" |
  sed \
-e 's://*:/:g' \
-   -e 
"s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3$b\1$b\2$b\3:" |
+   -e "${scan_regexp}" |
  sort -t"$b" -k2,2 -k4,4 -k3,3 |
  LC_ALL=C cut -f1 -d"$b")
do
@@ -108,7 +139,7 @@ scan() {
rpath=${file%/*}
rfile=${file##*/}
cfg_file="${rpath}/${rfile}"
-   live_file="${rpath}/${rfile:10}"
+   live_file=$(get_live_file)
 
local mpath
for mpath in ${CONFIG_PROTECT_MASK}; do
@@ -702,7 +733,14 @@ while [[ -n $1 ]] ; do
 done
 ${SET_X} && set -x
 
-type -P portageq >/dev/null || die "missing portageq"
+if [[ $OS_FAMILY == 'suse' ]]; then
+   PORTAGE_CONFIGROOT='/'
+   PORTAGE_TMPDIR='/tmp'
+   CONFIG_PROTECT='/etc'
+   CONFIG_PROTECT_MASK=''
+   [[ -f /etc/sysconfig/etc-update ]] && . /etc/sysconfig/etc-upd

[gentoo-commits] proj/portage:master commit in: man/

2014-11-10 Thread Zac Medico
commit: 7f38c9cbe3ce4a1eb4791b81b1ccd1a2f4eebfd1
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Nov  9 19:16:58 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Nov 10 18:29:30 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7f38c9cb

man/ebuild.5: document assert for bug #528760

X-Gentoo-Bug: 528760
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528760
Acked-by: Alexander Berntsen  gentoo.org>

---
 man/ebuild.5 | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/man/ebuild.5 b/man/ebuild.5
index 89bd6a2..b587264 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -1,4 +1,4 @@
-.TH "EBUILD" "5" "Jan 2014" "Portage VERSION" "Portage"
+.TH "EBUILD" "5" "Nov 2014" "Portage VERSION" "Portage"
 
 .SH "NAME"
 ebuild \- the internal format, variables, and functions in an ebuild script
@@ -969,6 +969,11 @@ default_src_test
 
 .SS "General:"
 .TP
+.B assert\fR \fI[reason]
+Checks the value of the shell's PIPESTATUS array variable, and if any
+component is non-zero (indicating failure), calls die with \fIreason\fR
+as a failure message.
+.TP
 .B die\fR \fI[reason]
 Causes the current emerge process to be aborted. The final display will
 include \fIreason\fR.



[gentoo-commits] proj/portage:master commit in: pym/portage/

2014-11-11 Thread Zac Medico
commit: a2b958f6af818816b2207b3e66836ee8e7683f12
Author: Sven Vermeulen  gentoo  org>
AuthorDate: Tue Nov 11 21:43:41 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Nov 11 22:27:49 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a2b958f6

_selinux.setexec: improve failure message (525726)

This converts "OSError: [Errno 22] Invalid argument" into a more
meaningful error message that is designed to guide users in the
right direction. Also, add an import that was missing for the "sys"
module, since it is referenced in the error paths of many functions
in this module.

X-Gentoo-Bug: 525726
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525726
Acked-by: Brian Dolbec  gentoo.org>
Acked-by: Zac Medico  gentoo.org>

---
 pym/portage/_selinux.py | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/pym/portage/_selinux.py b/pym/portage/_selinux.py
index 2a7194c..c5e8b2c 100644
--- a/pym/portage/_selinux.py
+++ b/pym/portage/_selinux.py
@@ -5,6 +5,7 @@
 # the whole _selinux module itself will be wrapped.
 import os
 import shutil
+import sys
 
 import portage
 from portage import _encodings
@@ -77,7 +78,18 @@ def settype(newtype):
 
 def setexec(ctx="\n"):
ctx = _native_string(ctx, encoding=_encodings['content'], 
errors='strict')
-   if selinux.setexeccon(ctx) < 0:
+   rc = 0
+   try:
+   rc = selinux.setexeccon(ctx)
+   except OSError:
+   msg = _("Failed to set new SELinux execution context. " + \
+   "Is your current SELinux context allowed to run 
Portage?")
+   if selinux.security_getenforce() == 1:
+   raise OSError(msg)
+   else:
+   portage.writemsg("!!! %s\n" % msg, noiselevel=-1)
+
+   if rc < 0:
if sys.hexversion < 0x300:
ctx = _unicode_decode(ctx, 
encoding=_encodings['content'], errors='replace')
if selinux.security_getenforce() == 1:



[gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/

2014-11-14 Thread Zac Medico
commit: 3b08575233ecf1d3e6f31f959741a4826aeac4a9
Author: Zac Medico  gentoo  org>
AuthorDate: Fri Nov 14 06:57:45 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Fri Nov 14 17:28:19 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3b085752

portageq: fix eroot parameter (bug #529200)

The portageq eroot parameter has been broken since commit
c9f6aa9f0151adb3c86706eaef1914cdbdcf2b6d, due to premature instantiation
of portage.settings (before the ROOT variable was set). Premature access
to the portage.settings attribute must be avoided by using other
available means to determine the EPREFIX.

Fixes: c9f6aa9f0151 ("Add cross-prefix support")
X-Gentoo-Bug: 529200
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=529200
Acked-by: Alexander Berntsen  gentoo.org>

---
 bin/portageq|  9 -
 pym/portage/tests/emerge/test_simple.py | 10 --
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/bin/portageq b/bin/portageq
index 009f116..ef565d1 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -1392,7 +1392,14 @@ def main(argv):
sys.stderr.write("Run portageq with --help for info\n")
sys.stderr.flush()
sys.exit(os.EX_USAGE)
-   eprefix = portage.settings["EPREFIX"]
+   # Calculate EPREFIX and ROOT that will be used to construct
+   # portage.settings later. It's tempting to use
+   # portage.settings["EPREFIX"] here, but that would force
+   # instantiation of portage.settings, which we don't want to do
+   # until after we've calculated ROOT (see bug #529200).
+   eprefix = os.environ.get("EPREFIX", portage.const.EPREFIX)
+   if eprefix:
+   eprefix = portage.util.normalize_path(eprefix)
eroot = portage.util.normalize_path(argv[2])
 
if eprefix:

diff --git a/pym/portage/tests/emerge/test_simple.py 
b/pym/portage/tests/emerge/test_simple.py
index 6c20a07..0101362 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -217,6 +217,8 @@ pkg_preinst() {
self.assertFalse(test_ebuild is None)
 
cross_prefix = os.path.join(eprefix, "cross_prefix")
+   cross_root = os.path.join(eprefix, "cross_root")
+   cross_eroot = os.path.join(cross_root, eprefix.lstrip(os.sep))
 
test_commands = (
env_update_cmd,
@@ -318,6 +320,10 @@ pkg_preinst() {
portageq_cmd + ("has_version", cross_prefix, 
"dev-libs/A"),
({"EPREFIX" : cross_prefix},) + \
portageq_cmd + ("has_version", cross_prefix, 
"dev-libs/B"),
+
+   # Test ROOT support
+   ({"ROOT": cross_root},) + emerge_cmd + ("dev-libs/B",),
+   portageq_cmd + ("has_version", cross_eroot, 
"dev-libs/B"),
)
 
distdir = playground.distdir
@@ -372,8 +378,8 @@ pkg_preinst() {
os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"]
 
updates_dir = os.path.join(test_repo_location, "profiles", 
"updates")
-   dirs = [cachedir, cachedir_pregen, cross_prefix, distdir, 
fake_bin,
-   portage_tmpdir, updates_dir,
+   dirs = [cachedir, cachedir_pregen, cross_eroot, cross_prefix,
+   distdir, fake_bin, portage_tmpdir, updates_dir,
user_config_dir, var_cache_edb]
etc_symlinks = ("dispatch-conf.conf", "etc-update.conf")
# Override things that may be unavailable, or may have 
portability



[gentoo-commits] proj/portage:master commit in: pym/portage/cache/

2014-11-14 Thread Zac Medico
commit: 9f6967dbc38ea55c0de5fbf5ad663ca676c54743
Author: Zac Medico  gentoo  org>
AuthorDate: Thu Nov 13 19:35:48 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Fri Nov 14 17:30:31 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9f6967db

fs_template._ensure_dirs: handle EEXIST (529120)

There was a race inside fs_template._ensure_dirs which could cause it to
raise EEXIST if a concurrent process created the directory after
os.path.exists returned False. Fix it by using the util.ensure_dirs
function, which already handles EEXIST.

X-Gentoo-Bug: 529120
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=529120
Acked-by: Alexander Berntsen  gentoo.org>

---
 pym/portage/cache/fs_template.py | 25 ++---
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/pym/portage/cache/fs_template.py b/pym/portage/cache/fs_template.py
index de4fe4b..fa44abc 100644
--- a/pym/portage/cache/fs_template.py
+++ b/pym/portage/cache/fs_template.py
@@ -10,7 +10,7 @@ from portage import os
 from portage.proxy.lazyimport import lazyimport
 lazyimport(globals(),
'portage.exception:PortageException',
-   'portage.util:apply_permissions',
+   'portage.util:apply_permissions,ensure_dirs',
 )
 del lazyimport
 
@@ -61,20 +61,15 @@ class FsBased(template.database):
 
for dir in 
path.lstrip(os.path.sep).rstrip(os.path.sep).split(os.path.sep):
base = os.path.join(base,dir)
-   if not os.path.exists(base):
-   if self._perms != -1:
-   um = os.umask(0)
-   try:
-   perms = self._perms
-   if perms == -1:
-   perms = 0
-   perms |= 0o755
-   os.mkdir(base, perms)
-   if self._gid != -1:
-   os.chown(base, -1, self._gid)
-   finally:
-   if self._perms != -1:
-   os.umask(um)
+   if ensure_dirs(base):
+   # We only call apply_permissions if ensure_dirs 
created
+   # a new directory, so as not to interfere with
+   # permissions of existing directories.
+   mode = self._perms
+   if mode == -1:
+   mode = 0
+   mode |= 0o755
+   apply_permissions(base, mode=mode, 
gid=self._gid)
 
def _prune_empty_dirs(self):
all_dirs = []



[gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/

2014-11-14 Thread Zac Medico
commit: 690b9deaf22f85a3cc7b366f5bd126b9e603c90d
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Nov  9 23:19:11 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sat Nov 15 05:12:14 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=690b9dea

unprivileged mode: generate PORTAGE_DEPCACHEDIR

For unprivileged mode, if PORTAGE_DEPCACHEDIR is unset and the default
PORTAGE_DEPCACHEDIR setting does not refer to a writable directory
(or there are not sufficient permissions to create it), then
automatically make PORTAGE_DEPCACHEDIR relative to the current target
root (which should always be writable for unprivileged mode). Also, in
create_trees, propagate the automatically generated PORTAGE_DEPCACHEDIR
setting to the config instance that is instantiated for ROOT = "/".

The result is that unprivileged mode will get a writable
PORTAGE_DEPCACHEDIR by default, and the default can be overridden by
setting the PORTAGE_DEPCACHEDIR variable.

Fixes: 1364fcd89384 ("Support unprivileged mode for bug #433453.")
X-Gentoo-Bug: 433453
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=433453
Acked-by: Alexander Berntsen  gentoo.org>

---
 pym/portage/__init__.py  |  3 +++
 pym/portage/package/ebuild/config.py | 39 +++-
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 66bfeb0..d8046f3 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -570,6 +570,7 @@ def create_trees(config_root=None, target_root=None, 
trees=None, env=None,
env=env, eprefix=eprefix)
settings.lock()
 
+   depcachedir = settings.get('PORTAGE_DEPCACHEDIR')
trees._target_eroot = settings['EROOT']
myroots = [(settings['EROOT'], settings)]
if settings["ROOT"] == "/" and settings["EPREFIX"] == const.EPREFIX:
@@ -587,6 +588,8 @@ def create_trees(config_root=None, target_root=None, 
trees=None, env=None,
v = settings.get(k)
if v is not None:
clean_env[k] = v
+   if depcachedir is not None:
+   clean_env['PORTAGE_DEPCACHEDIR'] = depcachedir
settings = config(config_root=None, target_root="/",
env=clean_env, eprefix=None)
settings.lock()

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 2ceb122..c7308a4 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -8,6 +8,7 @@ __all__ = [
 ]
 
 import copy
+import errno
 from itertools import chain
 import grp
 import logging
@@ -826,16 +827,6 @@ class config(object):
if "USE_ORDER" not in self:
self.backupenv["USE_ORDER"] = 
"env:pkg:conf:defaults:pkginternal:repo:env.d"
 
-   self.depcachedir = DEPCACHE_PATH
-   if portage.const.EPREFIX:
-   self.depcachedir = 
os.path.join(portage.const.EPREFIX,
-   DEPCACHE_PATH.lstrip(os.sep))
-
-   if self.get("PORTAGE_DEPCACHEDIR", None):
-   self.depcachedir = self["PORTAGE_DEPCACHEDIR"]
-   self["PORTAGE_DEPCACHEDIR"] = self.depcachedir
-   self.backup_changes("PORTAGE_DEPCACHEDIR")
-
if "CBUILD" not in self and "CHOST" in self:
self["CBUILD"] = self["CHOST"]
self.backup_changes("CBUILD")
@@ -898,6 +889,34 @@ class config(object):
self[var] = default_val
self.backup_changes(var)
 
+   self.depcachedir = self.get("PORTAGE_DEPCACHEDIR")
+   if self.depcachedir is None:
+   self.depcachedir = os.path.join(os.sep,
+   portage.const.EPREFIX, 
DEPCACHE_PATH.lstrip(os.sep))
+   if unprivileged and target_root != os.sep:
+   # In unprivileged mode, automatically 
make
+   # depcachedir relative to target_root 
if the
+   # default depcachedir is not writable.
+   current_dir = self.depcachedir
+   found_dir = False
+   while current_dir != os.sep and not 
found_dir:
+  

[gentoo-commits] proj/portage:master commit in: pym/portage/tests/resolver/, pym/_emerge/

2014-11-16 Thread Zac Medico
commit: 390f90c2bee92ee5c845cdd765824b48ed6718ad
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Nov 16 04:32:43 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Nov 16 08:58:53 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=390f90c2

_slot_operator_update_probe: fix bug #528610

This fixes a case inside _slot_operator_update_probe where it would
select an inappropriate replacement_parent of a lower version than
desired. The problem is solved by rejecting replacement_parent if its
version is lower than the existing parent, and a downgrade is not
desired.

X-Gentoo-Bug: 528610
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528610
Acked-by: Brian Dolbec  gentoo.org>

---
 pym/_emerge/depgraph.py|  8 +++
 ..._slot_operator_update_probe_parent_downgrade.py | 68 ++
 2 files changed, 76 insertions(+)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 94eaed8..2a839d0 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1659,6 +1659,7 @@ class depgraph(object):
debug = "--debug" in self._frozen_config.myopts
selective = "selective" in self._dynamic_config.myparams
want_downgrade = None
+   want_downgrade_parent = None
 
def check_reverse_dependencies(existing_pkg, candidate_pkg,
replacement_parent=None):
@@ -1706,6 +1707,13 @@ class depgraph(object):
for replacement_parent in 
self._iter_similar_available(dep.parent,
dep.parent.slot_atom, 
autounmask_level=autounmask_level):
 
+   if replacement_parent < dep.parent:
+   if want_downgrade_parent is None:
+   want_downgrade_parent = 
self._downgrade_probe(
+   dep.parent)
+   if not want_downgrade_parent:
+   continue
+
if not check_reverse_dependencies(dep.parent, 
replacement_parent):
continue
 

diff --git 
a/pym/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
 
b/pym/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
new file mode 100644
index 000..2ec15b6
--- /dev/null
+++ 
b/pym/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
@@ -0,0 +1,68 @@
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import \
+   ResolverPlayground, ResolverPlaygroundTestCase
+
+class SlotOperatorUpdateProbeParentDowngradeTestCase(TestCase):
+
+   def testSlotOperatorUpdateProbeParentDowngrade(self):
+
+   ebuilds = {
+   "net-nds/openldap-2.4.40-r3": {
+   "EAPI": "5",
+   "RDEPEND": "

[gentoo-commits] proj/portage:master commit in: pym/_emerge/

2014-09-24 Thread Zac Medico
commit: d7f7112b410bfead272f3d07829efc8fa80c4023
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Sep 24 02:28:22 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Sep 24 15:48:17 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d7f7112b

_want_update_pkg: fix bug #523532

This fixes depth increment to handle _UNREACHABLE_DEPTH. Note that there
are some remaining "depth > deep" and "depth + 1" expressions that are
protected by short-circuit evaluation (when deep is True).

Fixes: 336ab90212c8 ("depgraph._add_dep: fix bug #520950")
X-Gentoo-Bug: 523532
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523532

---
 pym/_emerge/depgraph.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f4e5a1b..f6f716d 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -4993,7 +4993,8 @@ class depgraph(object):
raise
 
depth = parent.depth or 0
-   depth += 1
+   if isinstance(depth, int):
+   depth += 1
 
if arg_atoms:
for arg, atom in arg_atoms:



[gentoo-commits] proj/portage:master commit in: misc/, bin/

2014-09-24 Thread Zac Medico
commit: 779a9e686d89e31af43e33b1163b01aeff65d7ea
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Sep 24 16:47:58 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Wed Sep 24 16:47:58 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=779a9e68

emerge-webrsync: fix bug #523494

Use PATH instead of PORTAGE_BIN_PATH to locate emerge.

Fixes: 0cc4c1ac21a2 ("Install Portage using setup.py")
X-Gentoo-Bug: 523494
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523494

---
 bin/emerge-webrsync| 4 ++--
 misc/emerge-delta-webrsync | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2f0689c..2443c2d 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -249,12 +249,12 @@ sync_local() {
 
if has metadata-transfer ${FEATURES} ; then
__vecho "Updating cache ..."
-   "${PORTAGE_BIN_PATH}/emerge" --metadata
+   emerge --metadata
fi
local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
[ -x "${post_sync}" ] && "${post_sync}"
# --quiet suppresses output if there are no relevant news items
-   has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news 
--quiet
+   has news ${FEATURES} && emerge --check-news --quiet
return 0
 }
 

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 96564af..a412ac8 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -338,12 +338,12 @@ sync_local() {
 
if has metadata-transfer ${FEATURES} ; then
__vecho "Updating cache ..."
-   "${PORTAGE_BIN_PATH}/emerge" --metadata
+   emerge --metadata
fi
local post_sync=${PORTAGE_CONFIGROOT}etc/portage/bin/post_sync
[ -x "${post_sync}" ] && "${post_sync}"
# --quiet suppresses output if there are no relevant news items
-   has news ${FEATURES} && "${PORTAGE_BIN_PATH}/emerge" --check-news 
--quiet
+   has news ${FEATURES} && emerge --check-news --quiet
return 0
 }
 



[gentoo-commits] proj/portage:master commit in: misc/

2014-10-19 Thread Zac Medico
commit: 84bba68958ccf8d84a271f110fdb858e4f7700b4
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Oct  8 17:56:31 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Oct 19 17:18:10 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=84bba689

emerge-delta-webrsync: fix bug #506192

This fixes the sync_local function so that it doesn't prematurely remove
the whole TMPDIR when tarsync is not installed. In this case, we really
only want to remove the "${TMPDIR}"/portage directory which contains a
temporary copy of the portage tree. The faulty code was introduced in
commit 24f6a9599bcf445c468022264cd6952aad4d4076 when a bunch of code
from emerge-webrsync was merged into emerge-delta-webrsync.

Fixes: 24f6a9599bcf ("emerge-delta-webrsync: check full snapshot sig")
X-Gentoo-Bug: 506192
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=506192

---
 misc/emerge-delta-webrsync | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index a412ac8..05a0ac7 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -333,7 +333,7 @@ sync_local() {
cd "${DISTDIR}"
 
__vecho "Cleaning up ..."
-   rm -fr "${TMPDIR}"
+   rm -fr "${TMPDIR}"/portage
fi
 
if has metadata-transfer ${FEATURES} ; then



[gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, pym/portage/dbapi/

2014-10-19 Thread Zac Medico
commit: 5f7b4865ecafe4f04a92c5e1158f657b0dcd41d6
Author: Zac Medico  gentoo  org>
AuthorDate: Fri Sep 26 03:02:41 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Oct 19 17:23:07 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f7b4865

dblink.mergeme: implement bug #523684

If a CONFIG_PROTECTed file was installed but no longer exists in the
file system, then it may have been deleted or renamed by the admin.
Therefore, force the file to be merged with a ._cfg name, so that the
admin will be prompted for this update.

X-Gentoo-Bug: 523684
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523684

---
 pym/portage/dbapi/vartree.py| 32 
 pym/portage/tests/emerge/test_simple.py | 19 +--
 2 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index b46ba0b..11384bf 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4687,10 +4687,7 @@ class dblink(object):
zing = "!!!"
mymtime = None
protected = self.isprotected(mydest)
-   if mydmode != None:
-   # destination file exists
-
-   if stat.S_ISDIR(mydmode):
+   if mydmode is not None and 
stat.S_ISDIR(mydmode):
# install of destination is 
blocked by an existing directory with the same name
newdest = 
self._new_backup_path(mydest)
msg = []
@@ -4703,12 +4700,15 @@ class dblink(object):
self._eerror("preinst", msg)
mydest = newdest
 
-   elif stat.S_ISREG(mydmode) or 
(stat.S_ISLNK(mydmode) and os.path.exists(mydest) and 
stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
+   elif mydmode is None or stat.S_ISREG(mydmode) 
or \
+   (stat.S_ISLNK(mydmode) and 
os.path.exists(mydest)
+   and 
stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
# install of destination is 
blocked by an existing regular file,
# or by a symlink to an 
existing regular file;
# now, config file management 
may come into play.
# we only need to tweak mydest 
if cfg file management is in play.
-   if protected:
+   destmd5 = None
+   if protected and mydmode is not 
None:
destmd5 = 
perform_md5(mydest, calc_prelink=calc_prelink)
if protect_if_modified:
contents_key = \
@@ -4721,7 +4721,21 @@ class dblink(object):
if protected:
# we have a protection 
path; enable config file management.
cfgprot = 0
-   if mymd5 == destmd5:
+   cfgprot_force = False
+   if mydmode is None:
+   if 
self._installed_instance is not None and \
+   
self._installed_instance._match_contents(
+   
myrealdest) is not False:
+   # If 
the file doesn't exist, then it may
+   # have 
been deleted or renamed by the
+   # 
admin. Therefore, force the file to be
+   # 
merged with a ._cfg name, so that the
+   # admin 
will be prompted for this update
+   # (see 
bug #523684).
+ 

[gentoo-commits] proj/portage:master commit in: bin/

2014-10-19 Thread Zac Medico
commit: 0903a300c9d79900389e59eab6fcfe9f12dbab51
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Oct  8 04:52:08 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Oct 19 17:29:28 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0903a300

bin/ebuild-ipc.py: nonblocking fifo write

Use nonblocking write instead of a fork for writing to the fifo.
This has the advantage of avoiding a possible python futex deadlock
following fork as reported in bug #524328.

X-Gentoo-Bug: 524328
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524328

---
 bin/ebuild-ipc.py | 64 ---
 1 file changed, 56 insertions(+), 8 deletions(-)

diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 3e6d90c..b47ee23 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -5,6 +5,7 @@
 # This is a helper which ebuild processes can use
 # to communicate with portage's main python process.
 
+import errno
 import logging
 import os
 import pickle
@@ -44,19 +45,66 @@ import portage
 portage._internal_caller = True
 portage._disable_legacy_globals()
 
-from portage.util._async.ForkProcess import ForkProcess
 from portage.util._eventloop.global_event_loop import global_event_loop
+from _emerge.AbstractPollTask import AbstractPollTask
 from _emerge.PipeReader import PipeReader
 
-class FifoWriter(ForkProcess):
+RETURNCODE_WRITE_FAILED = 2
 
-   __slots__ = ('buf', 'fifo',)
+class FifoWriter(AbstractPollTask):
 
-   def _run(self):
-   # Atomically write the whole buffer into the fifo.
-   with open(self.fifo, 'wb', 0) as f:
-   f.write(self.buf)
-   return os.EX_OK
+   __slots__ = ('buf', 'fifo', '_fd', '_reg_id',)
+
+   def _start(self):
+   try:
+   self._fd = os.open(self.fifo, os.O_WRONLY|os.O_NONBLOCK)
+   except OSError as e:
+   if e.errno == errno.ENXIO:
+   # This happens if the daemon has been killed.
+   self.returncode = RETURNCODE_WRITE_FAILED
+   self._unregister()
+   self._async_wait()
+   return
+   else:
+   raise
+   self._reg_id = self.scheduler.io_add_watch(
+   self._fd,
+   self.scheduler.IO_OUT | self.scheduler.IO_HUP | \
+   self._exceptional_events, self._output_handler)
+   self._registered = True
+
+   def _output_handler(self, fd, event):
+   if event & self.scheduler.IO_OUT:
+   # The whole buf should be able to fit in the fifo with
+   # a single write call, so there's no valid reason for
+   # os.write to raise EAGAIN here.
+   buf = self.buf
+   while buf:
+   buf = buf[os.write(fd, buf):]
+   self.returncode = os.EX_OK
+   self._unregister()
+   self.wait()
+   return False
+   else:
+   self._unregister_if_appropriate(event)
+   if not self._registered:
+   self.returncode = RETURNCODE_WRITE_FAILED
+   self.wait()
+   return False
+   return True
+
+   def _cancel(self):
+   self.returncode = self._cancelled_returncode
+   self._unregister()
+
+   def _unregister(self):
+   self._registered = False
+   if self._reg_id is not None:
+   self.scheduler.source_remove(self._reg_id)
+   self._reg_id = None
+   if self._fd is not None:
+   os.close(self._fd)
+   self._fd = None
 
 class EbuildIpc(object):
 



[gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/

2014-10-19 Thread Zac Medico
commit: 03cbe2762903601fe679ccd766456f6f6cba8ea2
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Oct 11 04:32:54 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Sun Oct 19 17:32:23 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=03cbe276

bin/ebuild-helpers/portageq: fix bug #524964

Since commit 0cc4c1ac21a2ea94cfb1f6ff4b461a9e349d47df,
$PORTAGE_BIN_PATH/portageq no longer exists, which breaks
bin/ebuild-helpers/portageq. Note that has_version and best_version
rely on bin/ebuild-helpers/portageq if IPC is disabled, so breakage
extends beyond ebuilds that call portageq "illegally". Since
$PORTAGE_BIN_PATH no longer works, use PATH to locate the real
portageq python script.

Fixes: 0cc4c1ac21a2 ("Install Portage using setup.py")
X-Gento-Bug: 524964
X-Gentoo-URL: https://bugs.gentoo.org/show_bug.cgi?id=524964

---
 bin/ebuild-helpers/portageq | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index b67b03f..4151bac 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -2,9 +2,25 @@
 # Copyright 2009-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+scriptpath=${BASH_SOURCE[0]}
+scriptname=${scriptpath##*/}
+
 PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
 PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 # Use safe cwd, avoiding unsafe import for bug #469338.
 cd "${PORTAGE_PYM_PATH}"
-PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-   exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/portageq" 
"$@"
+
+IFS=':'
+set -f # in case ${PATH} contains any shell glob characters
+
+for path in ${PATH}; do
+   [[ -x ${path}/${scriptname} ]] || continue
+   [[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
+   PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
+   exec "${PORTAGE_PYTHON:-/usr/bin/python}" \
+   "${path}/${scriptname}" "$@"
+done
+
+unset IFS
+echo "${scriptname}: command not found" 1>&2
+exit 127



[gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/

2014-10-19 Thread Zac Medico
commit: d55690aa3a1a9b4a78e87acd6ce179c17262966e
Author: Greg Kubaryk  vt  edu>
AuthorDate: Mon Oct 20 00:07:20 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 00:07:20 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d55690aa

emerge: add -U option short for --changed-use

X-Gentoo-Bug: 524426
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524426

---
 man/emerge.1| 4 ++--
 pym/_emerge/main.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/emerge.1 b/man/emerge.1
index 2264b58..9873ba9 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Sep 2014" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Oct 2014" "Portage VERSION" "Portage"
 .SH "NAME"
 emerge \- Command\-line interface to the Portage system
 .SH "SYNOPSIS"
@@ -399,7 +399,7 @@ Creates binary packages for all ebuilds processed without 
actually
 merging the packages.  This comes with the caveat that all build-time
 dependencies must already be emerged on the system.
 .TP
-.BR "\-\-changed\-use"
+.BR "\-\-changed\-use " (\fB\-U\fR)
 Tells emerge to include installed packages where USE flags have
 changed since installation. This option also implies the
 \fB\-\-selective\fR option. Unlike \fB\-\-newuse\fR, the

diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 3883f72..f5f2ec4 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -69,7 +69,7 @@ shortmapping={
 "r":"--resume",
 "s":"--search","S":"--searchdesc",
 "t":"--tree",
-"u":"--update",
+"u":"--update","U":"--changed-use",
 "V":"--version"
 }
 



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/rsync/

2014-10-19 Thread Zac Medico
commit: 3fbed9a9f964ee1b60ebf8d8bb4c94f406847702
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri May  2 17:04:39 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3fbed9a9

sync/modules/rsync: Refactor legacy code

Split up the _sync() into logical chunks.
Replace out my* variables.
Move constants out of code, to top of the file.

---
 pym/portage/sync/modules/rsync/rsync.py | 508 +---
 1 file changed, 267 insertions(+), 241 deletions(-)

diff --git a/pym/portage/sync/modules/rsync/rsync.py 
b/pym/portage/sync/modules/rsync/rsync.py
index d0ee886..76d83f2 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -24,6 +24,10 @@ from _emerge.UserQuery import UserQuery
 from portage.sync.syncbase import SyncBase
 
 
+SERVER_OUT_OF_DATE = -1
+EXCEEDED_MAX_RETRIES = -2
+
+
 class RsyncSync(SyncBase):
'''Rsync sync module'''
 
@@ -40,112 +44,47 @@ class RsyncSync(SyncBase):
 
def _sync(self):
'''Internal sync function which performs only the sync'''
-   myopts = self.options.get('emerge_config').opts
-   usersync_uid = self.options.get('usersync_uid', None)
-   enter_invalid = '--ask-enter-invalid' in myopts
+   opts = self.options.get('emerge_config').opts
+   self.usersync_uid = self.options.get('usersync_uid', None)
+   enter_invalid = '--ask-enter-invalid' in opts
out = portage.output.EOutput()
syncuri = self.repo.sync_uri
-   dosyncuri = syncuri
vcs_dirs = frozenset(VCS_DIRS)
vcs_dirs = vcs_dirs.intersection(os.listdir(self.repo.location))
 
-
for vcs_dir in vcs_dirs:
writemsg_level(("!!! %s appears to be under revision " 
+ \
"control (contains %s).\n!!! Aborting rsync 
sync.\n") % \
(self.repo.location, vcs_dir), 
level=logging.ERROR, noiselevel=-1)
return (1, False)
-   mytimeout=180
+   self.timeout=180
 
rsync_opts = []
if self.settings["PORTAGE_RSYNC_OPTS"] == "":
-   portage.writemsg("PORTAGE_RSYNC_OPTS empty or unset, 
using hardcoded defaults\n")
-   rsync_opts.extend([
-   "--recursive",# Recurse directories
-   "--links",# Consider symlinks
-   "--safe-links",   # Ignore links outside of tree
-   "--perms",# Preserve permissions
-   "--times",# Preserive mod times
-   "--omit-dir-times",
-   "--compress", # Compress the data 
transmitted
-   "--force",# Force deletion on non-empty 
dirs
-   "--whole-file",   # Don't do block transfers, 
only entire files
-   "--delete",   # Delete files that aren't in 
the master tree
-   "--stats",# Show final statistics about 
what was transfered
-   "--human-readable",
-   "--timeout="+str(mytimeout), # IO timeout if 
not done in X seconds
-   "--exclude=/distfiles",   # Exclude distfiles 
from consideration
-   "--exclude=/local",   # Exclude local 
from consideration
-   "--exclude=/packages",# Exclude packages  
from consideration
-   ])
-
-   else:
-   # The below validation is not needed when using the 
above hardcoded
-   # defaults.
-
-   portage.writemsg("Using PORTAGE_RSYNC_OPTS instead of 
hardcoded defaults\n", 1)
-   rsync_opts.extend(portage.util.shlex_split(
-   self.settings.get("PORTAGE_RSYNC_OPTS", "")))
-   for opt in ("--recursive", "--times"):
-   if opt not in rsync_opts:
-   portage.writemsg(yellow("WARNING:") + " 
adding required option " + \
-   "%s not included in

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/

2014-10-19 Thread Zac Medico
commit: c82ee8df23255a24cdee28cbecceb053e3f61f24
Author: Brian Dolbec  gentoo  org>
AuthorDate: Wed Sep  3 23:20:06 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c82ee8df

emaint/main.py: Change func to long_action for module action check

Due to the change making it possible for the --action to be different than the 
actual function
beign called.  func no longer was the same as the avalable actions listed.
Reverts the change made in:
Commit: e166eb68e838389505f15426a2f0011dd95be342
Author: Brian Dolbec  gentoo.org> (Wed 12 Mar 2014 08:40:49 PM PDT)
Subject: portage/emaint/main.py: Fix a bug in the options parsing.

---
 pym/portage/emaint/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index f76cee2..6292338 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -113,7 +113,7 @@ class TaskHandler(object):
for task in tasks:
inst = task()
show_progress = self.show_progress_bar and self.isatty
-   # check if the function is capable of progressbar 
+   # check if the function is capable of progressbar
# and possibly override it off
if show_progress and hasattr(inst, 'can_progressbar'):
show_progress = inst.can_progressbar(func)
@@ -206,9 +206,9 @@ def emaint_main(myargv):
tasks = []
for m in module_names[1:]:
#print("DEBUG: module: %s, functions: " % (m, 
str(module_controller.get_functions(m
-   if func in module_controller.get_functions(m):
+   if long_action in module_controller.get_functions(m):
tasks.append(module_controller.get_class(m))
-   elif func in module_controller.get_functions(args[0]):
+   elif long_action in module_controller.get_functions(args[0]):
tasks = [module_controller.get_class(args[0] )]
else:
portage.util.writemsg(



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: d9b53a5f15f773b99491ec42c990b605679828a2
Author: Brian Dolbec  gentoo  org>
AuthorDate: Tue Jun 17 00:42:29 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d9b53a5f

sync/syncbase.py: Fix the self.has_bin logic

---
 pym/portage/sync/syncbase.py | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/pym/portage/sync/syncbase.py b/pym/portage/sync/syncbase.py
index 2b6b8c7..94d4aab 100644
--- a/pym/portage/sync/syncbase.py
+++ b/pym/portage/sync/syncbase.py
@@ -34,16 +34,18 @@ class SyncBase(object):
self.repo = None
self.xterm_titles = None
self.spawn_kwargs = None
-   self.bin_command = portage.process.find_binary(bin_command)
-
-   self.has_bin = True
-   if bin_command and self.bin_command is None:
-   msg = ["Command not found: %s" % bin_command,
-   "Type \"emerge %s\" to enable %s support." % (bin_pkg, 
bin_command)]
-   for l in msg:
-   writemsg_level("!!! %s\n" % l,
-   level=self.logger.ERROR, noiselevel=-1)
-   self.has_bin = False
+   self.bin_command = None
+   self.has_bin = False
+   if bin_command:
+   self.bin_command = 
portage.process.find_binary(bin_command)
+   if self.bin_command is None:
+   msg = ["Command not found: %s" % bin_command,
+   "Type \"emerge %s\" to enable %s support." % 
(bin_pkg, bin_command)]
+   for l in msg:
+   writemsg_level("!!! %s\n" % l,
+   level=self.logger.ERROR, 
noiselevel=-1)
+   else:
+   self.has_bin = True
 
 
def _kwargs(self, kwargs):



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/cvs/, pym/portage/sync/modules/git/, ...

2014-10-19 Thread Zac Medico
commit: 6706990e75777c7a2b307027087bb4307e2f77fa
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Sep 27 02:00:19 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6706990e

Sync: Update __init__.py docstrings to use a variable

Same as for the emaint modules, level 2 python optimization removes docstrings.

---
 pym/portage/emaint/modules/sync/__init__.py  |  9 -
 pym/portage/sync/modules/cvs/__init__.py | 11 +--
 pym/portage/sync/modules/git/__init__.py | 11 +--
 pym/portage/sync/modules/rsync/__init__.py   | 11 +--
 pym/portage/sync/modules/svn/__init__.py | 11 +--
 pym/portage/sync/modules/websync/__init__.py | 11 ++-
 6 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/pym/portage/emaint/modules/sync/__init__.py 
b/pym/portage/emaint/modules/sync/__init__.py
index 4070200..32469b5 100644
--- a/pym/portage/emaint/modules/sync/__init__.py
+++ b/pym/portage/emaint/modules/sync/__init__.py
@@ -1,18 +1,17 @@
 # Copyright 2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-"""Check repos.conf settings and sync repositories.
-"""
-
+doc = """Check repos.conf settings and sync repositories."""
+__doc__ = doc[:]
 
 module_spec = {
'name': 'sync',
-   'description': __doc__,
+   'description': doc,
'provides':{
'sync-module': {
'name': "sync",
'class': "SyncRepos",
-   'description': __doc__,
+   'description': doc,
'functions': ['allrepos', 'auto', 'repo'],
'func_desc': {
'repo': {

diff --git a/pym/portage/sync/modules/cvs/__init__.py 
b/pym/portage/sync/modules/cvs/__init__.py
index fd3b12a..abf547f 100644
--- a/pym/portage/sync/modules/cvs/__init__.py
+++ b/pym/portage/sync/modules/cvs/__init__.py
@@ -1,10 +1,9 @@
 # Copyright 2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-"""CVS plug-in module for portage.
-Performs a cvs up on repositories
-"""
-
+doc = """CVS plug-in module for portage.
+Performs a cvs up on repositories."""
+__doc__ = doc[:]
 
 from portage.localization import _
 from portage.sync.config_checks import CheckSyncConfig
@@ -27,12 +26,12 @@ class CheckCVSConfig(CheckSyncConfig):
 
 module_spec = {
'name': 'cvs',
-   'description': __doc__,
+   'description': doc,
'provides':{
'cvs-module': {
'name': "cvs",
'class': "CVSSync",
-   'description': __doc__,
+   'description': doc,
'functions': ['sync', 'new', 'exists'],
'func_desc': {
'sync': 'Performs a cvs up on the repository',

diff --git a/pym/portage/sync/modules/git/__init__.py 
b/pym/portage/sync/modules/git/__init__.py
index 304142e..833b389 100644
--- a/pym/portage/sync/modules/git/__init__.py
+++ b/pym/portage/sync/modules/git/__init__.py
@@ -1,22 +1,21 @@
 # Copyright 2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-"""Git plug-in module for portage.
-Performs a git pull on repositories
-"""
-
+doc = """Git plug-in module for portage.
+Performs a git pull on repositories."""
+__doc__ = doc[:]
 
 from portage.sync.config_checks import CheckSyncConfig
 
 
 module_spec = {
'name': 'git',
-   'description': __doc__,
+   'description': doc,
'provides':{
'git-module': {
'name': "git",
'class': "GitSync",
-   'description': __doc__,
+   'description': doc,
'functions': ['sync', 'new', 'exists'],
'func_desc': {
'sync': 'Performs a git pull on the repository',

diff --git a/pym/portage/sync/modules/rsync/__init__.py 
b/pym/portage/sync/modules/rsync/__init__.

[gentoo-commits] proj/portage:plugin-sync commit in: pym/_emerge/

2014-10-19 Thread Zac Medico
commit: 6c4362b52e545f3ffa1fad9a5ae9f89688aabb6c
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sun May 11 17:05:17 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6c4362b5

_emerge/main.py: Set portage._sync_mode for --sync

This allows repos with non-existent directories to be available.
If the new repo is set for auto-sync, then it can be created with the sync 
module's new().

---
 pym/_emerge/main.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index a986cfe..b74005d 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1046,6 +1046,10 @@ def emerge_main(args=None):
elif myaction == "moo":
print(COWSAY_MOO % platform.system())
return os.EX_OK
+   elif myaction == "sync":
+   # need to set this to True now in order for the repository 
config
+   # loading to allow new repos with non-existent directories
+   portage._sync_mode = True
 
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/

2014-10-19 Thread Zac Medico
commit: 472ff464965372155d07540d96935c5f5efc67af
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Sep  5 04:28:16 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=472ff464

emaint sync: Migrate print statements to emaint style messages

Comment out some debug prints.

---
 pym/portage/emaint/modules/sync/sync.py | 62 +++--
 1 file changed, 36 insertions(+), 26 deletions(-)

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
index ab7591d..b657133 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -70,20 +70,22 @@ class SyncRepos(object):
'''Sync auto-sync enabled repos'''
options = kwargs.get('options', None)
selected = self._get_repos(True)
-   if options.get('return-messages', False):
-   return self.rmessage(self._sync(selected), 'sync')
-   return self._sync(selected)
+   if options:
+   return_messages = options.get('return-messages', False)
+   else:
+   return_messages = False
+   return self._sync(selected, return_messages)
 
 
def all_repos(self, **kwargs):
'''Sync all repos defined in repos.conf'''
selected = self._get_repos(auto_sync_only=False)
options = kwargs.get('options', None)
-   if options.get('return-messages', False):
-   return self.rmessage(
-   self._sync(selected),
-   'sync')
-   return self._sync(selected)
+   if options:
+   return_messages = options.get('return-messages', False)
+   else:
+   return_messages = False
+   return self._sync(selected, return_messages)
 
 
def repo(self, **kwargs):
@@ -98,9 +100,7 @@ class SyncRepos(object):
repos = repos.split()
available = self._get_repos(auto_sync_only=False)
selected = self._match_repos(repos, available)
-   if return_messages:
-   return self.rmessage(self._sync(selected), 'sync')
-   return self._sync(selected)
+   return self._sync(selected, return_messages)
 
 
@staticmethod
@@ -124,7 +124,7 @@ class SyncRepos(object):
missing_sync_type = []
if self.emerge_config.args:
for repo_name in self.emerge_config.args:
-   print("_get_repos(): repo_name =", repo_name)
+   #print("_get_repos(): repo_name =", repo_name)
try:
repo = 
self.emerge_config.target_config.settings.repositories[repo_name]
except KeyError:
@@ -146,7 +146,8 @@ class SyncRepos(object):
level=logging.ERROR, noiselevel=-1)
 
if unknown_repo_names or missing_sync_type:
-   print("missing or unknown repos... returning")
+   writemsg_level("Missing or unknown repos... 
returning",
+   level=logging.INFO, noiselevel=2)
return []
 
else:
@@ -165,17 +166,20 @@ class SyncRepos(object):
return selected
 
 
-   def _sync(self, selected_repos):
+   def _sync(self, selected_repos, return_messages):
+   msgs = []
if not selected_repos:
-   print("_sync(), nothing to sync... returning")
-   return [('None', os.EX_OK)]
+   msgs.append("Emaint sync, nothing to sync... returning")
+   if return_messages:
+   return msgs.append(self.rmessage(('None', 
os.EX_OK), 'sync'))
+   return
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
 
sync_manager = 
get_syncer(self.emerge_config.target_config.settings, emergelog)
retvals = []
for repo in selected_repos:
-   print("syncing repo:", repo.name)
+   #print("syncing repo:", repo.name)
if repo.sync_type is not None:

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/

2014-10-19 Thread Zac Medico
commit: 053661b1c649433b5ef047b4e64a098db3c728e6
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Sep  5 04:37:10 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=053661b1

emaint sync: Fix bug 522032, add a one time only post-sync hook call

After all repos have been synced, the emaint sync module runs another post-sync 
hook call
passing it the 'PORTAGE_SYNC_HOOK_FINAL' value as the url.
This value can be read by the post-sync hook to decide if it needs to run or 
pass.
This allows flexible, precise control over post-sync hooks for multiple 
repositories.

Caveat:  Current app-portage/portage-utils post_sync hook script does not pass 
on the url
to the postsync.d/* scripts that it intiates.

---
 pym/portage/emaint/modules/sync/sync.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
index b657133..9b0d82c 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -192,10 +192,13 @@ class SyncRepos(object):
msgs.extend(self._check_updates())
display_news_notification(self.emerge_config.target_config,
self.emerge_config.opts)
+   rcode = 
sync_manager.perform_post_sync_hook('PORTAGE_SYNC_HOOK_FINAL')
if retvals:
msgs.extend(self.rmessage(retvals, 'sync'))
else:
msgs.append(self.rmessage(('None', os.EX_OK), 'sync'))
+   if rcode:
+   msgs.append(self.rmessage('None', rcode), 'post-sync')
if return_messages:
return msgs
return



[gentoo-commits] proj/portage:plugin-sync commit in: pym/_emerge/

2014-10-19 Thread Zac Medico
commit: a60913589efdd7e933c4a74ed8f8bb179b96e361
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon Apr 21 18:23:36 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a6091358

_emerge/main.py: Remove redundant portage._sync_mode setting

---
 pym/_emerge/main.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index f5f2ec4..a986cfe 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1049,8 +1049,6 @@ def emerge_main(args=None):
 
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
-   if myaction == "sync":
-   portage._sync_mode = True
emerge_config = load_emerge_config(
action=myaction, args=myfiles, opts=myopts)
rval = profile_check(emerge_config.trees, emerge_config.action)



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: 43949f10920b5ca96d02e390a93af6cd59dd83d9
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat Sep 27 05:05:01 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=43949f10

Sync: Implement native postsync.d hook code

As per bug 522032, pass the repo.name and repo.sync_uri to the hooks.
With this information, the hooks can be taylored to operate for only certain 
repos, or only when all repos have been synced.

---
 pym/portage/sync/controller.py | 36 +---
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index 21b57f4..a88d4c5 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -87,6 +87,19 @@ class SyncManager(object):
 
self.module_controller = portage.sync.module_controller
self.module_names = self.module_controller.module_names
+   postsync_dir = os.path.join(self.settings["PORTAGE_CONFIGROOT"],
+   portage.USER_CONFIG_PATH, "postsync.d")
+   hooks = []
+   for root, dirs, names in os.walk(postsync_dir, topdown=True):
+   #print("root:", root, "dirs:", dirs, "names:", names)
+   for name in names:
+   filepath = os.path.join(root, name)
+   if os.access(filepath, os.X_OK):
+   hooks.append((filepath, name))
+   else:
+   writemsg_level(" %s postsync.d hook: 
'%s' is not executable\n"
+   % (warn("*"), name,), 
level=logging.WARN, noiselevel=2)
+   self.hooks = hooks
 
 
def get_module_descriptions(self, mod):
@@ -129,7 +142,7 @@ class SyncManager(object):
taskmaster = TaskHandler(callback=self.do_callback)
taskmaster.run_tasks(tasks, func, status, options=task_opts)
 
-   self.perform_post_sync_hook(repo.sync_uri)
+   self.perform_post_sync_hook(repo.name, repo.sync_uri)
 
return self.exitcode, None
 
@@ -142,17 +155,18 @@ class SyncManager(object):
return
 
 
-   def perform_post_sync_hook(self, dosyncuri):
-   postsync = os.path.join(self.settings["PORTAGE_CONFIGROOT"],
-   portage.USER_CONFIG_PATH, "bin", "post_sync")
-   if os.access(postsync, os.X_OK):
-   retval = portage.process.spawn([postsync, dosyncuri],
-   env=self.settings.environ())
+   def perform_post_sync_hook(self, reponame, dosyncuri='None'):
+   succeeded = os.EX_OK
+   for filepath, hook in self.hooks:
+   writemsg_level("Spawning post_sync hook: %s\n" % 
(hook,),
+   level=logging.ERROR, noiselevel=4)
+   retval = portage.process.spawn([filepath,
+   reponame, dosyncuri], 
env=self.settings.environ())
if retval != os.EX_OK:
-   writemsg_level(" %s spawn failed of %s\n" % 
(bad("*"),
-   postsync,), level=logging.ERROR, 
noiselevel=-1)
-   return retval
-   return os.EX_OK
+   writemsg_level(" %s Spawn failed for: %s, %s\n" 
% (bad("*"),
+   hook, filepath), level=logging.ERROR, 
noiselevel=-1)
+   succeeded = retval
+   return succeeded
 
 
def pre_sync(self, repo):



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/

2014-10-19 Thread Zac Medico
commit: 957160d020ce6a31912932495ff17382442509f4
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon Apr 21 18:30:00 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=957160d0

emaint/modules: New emaint module "sync"

This code is a migration from _emerge.actions.action_sync.
The code has been split up into logical blocks.
Some changes have been made to handle multiple repositories better.
It also adds more flexibility as to what is synced.

---
 pym/portage/emaint/modules/sync/__init__.py |  44 ++
 pym/portage/emaint/modules/sync/sync.py | 237 
 2 files changed, 281 insertions(+)

diff --git a/pym/portage/emaint/modules/sync/__init__.py 
b/pym/portage/emaint/modules/sync/__init__.py
new file mode 100644
index 000..4070200
--- /dev/null
+++ b/pym/portage/emaint/modules/sync/__init__.py
@@ -0,0 +1,44 @@
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+"""Check repos.conf settings and sync repositories.
+"""
+
+
+module_spec = {
+   'name': 'sync',
+   'description': __doc__,
+   'provides':{
+   'sync-module': {
+   'name': "sync",
+   'class': "SyncRepos",
+   'description': __doc__,
+   'functions': ['allrepos', 'auto', 'repo'],
+   'func_desc': {
+   'repo': {
+   "short": "-r", "long": "--repo",
+   "help": "(sync module only): -r, --repo 
 Sync the specified repo",
+   'status': "Syncing %s",
+   'action': 'store',
+   'func': 'repo',
+   },
+   'allrepos': {
+   "short": "-A", "long": "--allrepos",
+   "help": "(sync module only): -A, 
--allrepos  Sync all repos that have a sync-url defined",
+   'status': "Syncing %s",
+   'action': 'store_true',
+   'dest': 'allrepos',
+   'func': 'all_repos',
+   },
+   'auto': {
+   "short": "-a", "long": "--auto",
+   "help": "(sync module only): -a, --auto 
 Sync auto-sync enabled repos only",
+   'status': "Syncing %s",
+   'action': 'store_true',
+   'dest': 'auto',
+   'func': 'auto_sync',
+   },
+   }
+   }
+   }
+   }

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
new file mode 100644
index 000..3aa318a
--- /dev/null
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -0,0 +1,237 @@
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+import logging
+import os
+import sys
+
+import portage
+from portage.localization import _
+from portage.output import bold, create_color_func
+from portage.sync import get_syncer
+from portage._global_updates import _global_updates
+from portage.util import writemsg_level
+
+import _emerge
+from _emerge.emergelog import emergelog
+
+
+portage.proxy.lazyimport.lazyimport(globals(),
+   '_emerge.actions:adjust_configs,load_emerge_config',
+   '_emerge.chk_updated_cfg_files:chk_updated_cfg_files',
+   '_emerge.main:parse_opts',
+   '_emerge.post_emerge:display_news_notification',
+)
+
+warn = create_color_func("WARN")
+
+if sys.hexversion >= 0x300:
+   _basestring = str
+else:
+   _basestring = basestring
+
+
+class SyncRepos(object):
+
+   short_desc = "Check repos.conf settings and/or sync repo

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/svn/

2014-10-19 Thread Zac Medico
commit: 3e03d6b00b90d45a570cca06289e74603d76ca3d
Author: David Heidelberger  ixit  cz>
AuthorDate: Mon Jun 16 16:04:06 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3e03d6b0

portage/sync/modules: Add svn sync module

Module submitted by: David Heidelberger
edits by Brian Dolbec :
Remove CheckSVNConfig class.
Use the default CheckSyncConfig class instead.
Copying the sync-cvs-repo option from the cvs module was incorrect and not 
needed.
Fixed the new()'s spawn_bash(...) call.

---
 pym/portage/sync/modules/svn/__init__.py | 32 +
 pym/portage/sync/modules/svn/svn.py  | 81 
 2 files changed, 113 insertions(+)

diff --git a/pym/portage/sync/modules/svn/__init__.py 
b/pym/portage/sync/modules/svn/__init__.py
new file mode 100644
index 000..1fda55a
--- /dev/null
+++ b/pym/portage/sync/modules/svn/__init__.py
@@ -0,0 +1,32 @@
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+"""SVN plug-in module for portage.
+Performs a svn up on repositories
+"""
+
+
+from portage.localization import _
+from portage.sync.config_checks import CheckSyncConfig
+from portage.util import writemsg_level
+
+
+module_spec = {
+   'name': 'svn',
+   'description': __doc__,
+   'provides':{
+   'svn-module': {
+   'name': "svn",
+   'class': "SVNSync",
+   'description': __doc__,
+   'functions': ['sync', 'new', 'exists'],
+   'func_desc': {
+   'sync': 'Performs a svn up on the repository',
+   'new': 'Creates the new repository at the 
specified location',
+   'exists': 'Returns a boolean of whether the 
specified dir ' +
+   'exists and is a valid SVN repository',
+   },
+   'validate_config': CheckSyncConfig,
+   }
+   }
+}

diff --git a/pym/portage/sync/modules/svn/svn.py 
b/pym/portage/sync/modules/svn/svn.py
new file mode 100644
index 000..182a7ac
--- /dev/null
+++ b/pym/portage/sync/modules/svn/svn.py
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+import logging
+import errno
+
+import portage
+from portage import os
+from portage.util import writemsg_level
+from portage.sync.syncbase import SyncBase
+
+
+class SVNSync(SyncBase):
+   '''SVN sync module'''
+
+   short_desc = "Perform sync operations on SVN repositories"
+
+   @staticmethod
+   def name():
+   return "SVNSync"
+
+
+   def __init__(self):
+   SyncBase.__init__(self, "svn", "dev-vcs/subversion")
+
+
+   def new(self, **kwargs):
+   if kwargs:
+   self._kwargs(kwargs)
+   #initial checkout
+   msg = ">>> Starting initial svn checkout with %s..." % 
self.repo.sync_uri
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n")
+   try:
+   os.rmdir(self.repo.location)
+   except OSError as e:
+   if e.errno != errno.ENOENT:
+   msg = "!!! existing '%s' directory; exiting." % 
self.repo.location
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n", noiselevel=-1, 
level=logging.ERROR)
+   return (1, False)
+   del e
+   svn_root = self.repo.sync_uri
+   exitcode =  portage.process.spawn_bash(
+   "cd %s; exec svn %s" %
+   
(portage._shell_quote(os.path.dirname(self.repo.location)),
+   portage._shell_quote(svn_root)),
+   **portage._native_kwargs(self.spawn_kwargs))
+   if exitcode != os.EX_OK:
+   msg = "!!! svn checkout error; exiting."
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n", noiselevel=-1, 
level=logging.ERROR)
+   return (exitcode, False)
+
+
+   def _sync(self):
+   """
+   Internal function to sync an exis

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/repository/

2014-10-19 Thread Zac Medico
commit: 9ac9a76ecb650c19ae12163bc0695014adcf7394
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sat May 10 18:53:37 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ac9a76e

repository/config.py: Add auto_sync to the override-able  variables

---
 pym/portage/repository/config.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index bb54b57..10bd477 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -462,8 +462,10 @@ class RepoConfigLoader(object):
if repos_conf_opts is not None:
# Selectively copy only the 
attributes which
# repos.conf is allowed to 
override.
-   for k in ('aliases', 
'eclass_overrides', 'force', 'masters',
-   'priority', 
'sync_cvs_repo', 'sync_type', 'sync_uri'):
+   for k in ('aliases', 
'auto_sync', 'eclass_overrides',
+   'force', 'masters', 
'priority', 'sync_cvs_repo',
+   'sync_type', 'sync_uri',
+   ):
v = 
getattr(repos_conf_opts, k, None)
if v is not None:
setattr(repo, 
k, v)



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/, pym/portage/, pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: 739f11321732d06a2f5809ff584e2d63424274ff
Author: Brian Dolbec  gentoo  org>
AuthorDate: Thu Sep  4 00:13:03 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=739f1132

Move module.py and progress.py from emaint to portage namespace

This makes it more centrally available as it is used by more than just the 
emaint module.
moule.py: make path and namepace params mandatory.
They are not as easily predictable.
Clean dead code.

---
 pym/portage/emaint/main.py   | 12 +---
 pym/portage/{emaint => }/module.py   | 23 +--
 pym/portage/{emaint => }/progress.py |  0
 pym/portage/sync/__init__.py |  2 +-
 pym/portage/sync/controller.py   |  2 +-
 5 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 6292338..fea4832 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -9,8 +9,8 @@ import textwrap
 
 import portage
 from portage import os
-from portage.emaint.module import Modules
-from portage.emaint.progress import ProgressBar
+from portage.module import Modules
+from portage.progress import ProgressBar
 from portage.emaint.defaults import DEFAULT_OPTIONS
 from portage.util._argparse import ArgumentParser
 
@@ -153,7 +153,13 @@ def emaint_main(myargv):
# files (such as the world file) have sane permissions.
os.umask(0o22)
 
-   module_controller = Modules(namepath="portage.emaint.modules")
+   module_path = os.path.join(
+   (os.path.dirname(
+   os.path.realpath(__file__))), "modules"
+   )
+   module_controller = Modules(
+   path=module_path,
+   namepath="portage.emaint.modules")
module_names = module_controller.module_names[:]
module_names.insert(0, "all")
 

diff --git a/pym/portage/emaint/module.py b/pym/portage/module.py
similarity index 87%
rename from pym/portage/emaint/module.py
rename to pym/portage/module.py
index 07a0cb7..a78bb2e 100644
--- a/pym/portage/emaint/module.py
+++ b/pym/portage/module.py
@@ -74,29 +74,16 @@ class Modules(object):
"""Dynamic modules system for loading and retrieving any of the
installed emaint modules and/or provided class's
 
-   @param path: Optional path to the "modules" directory or
-   defaults to the directory of this file + '/modules'
-   @param namepath: Optional python import path to the "modules" directory 
or
-   defaults to the directory name of this file + '.modules'
+   @param path: Path to the "modules" directory
+   @param namepath: Python import path to the "modules" directory
"""
 
-   def __init__(self, path=None, namepath=None):
-   if path:
-   self._module_path = path
-   else:
-   self._module_path = os.path.join((
-   os.path.dirname(os.path.realpath(__file__))), 
"modules")
-   if namepath:
-   self._namepath = namepath
-   else:
-   self._namepath = '.'.join(os.path.dirname(
-   os.path.realpath(__file__)), "modules")
+   def __init__(self, path, namepath):
+   self._module_path = path
+   self._namepath = namepath
self._modules = self._get_all_modules()
self.modules = ProtectedDict(self._modules)
self.module_names = sorted(self._modules)
-   #self.modules = {}
-   #for mod in self.module_names:
-   #self.module[mod] = LazyLoad(
 
def _get_all_modules(self):
"""scans the emaint modules dir for loadable modules

diff --git a/pym/portage/emaint/progress.py b/pym/portage/progress.py
similarity index 100%
rename from pym/portage/emaint/progress.py
rename to pym/portage/progress.py

diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index b74c89e..58a1298 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -3,7 +3,7 @@
 
 import os
 
-from portage.emaint.module import Modules
+from portage.module import Modules
 from portage.sync.controller import SyncManager
 from portage.sync.config_checks import check_type
 

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index f0d1c05..2b3dbad 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -10,7 +10,7 @@ import pwd
 
 import portage
 from portage import os
-from portage.emaint.progress import ProgressBar
+from portage.progress import ProgressBar
 #from portage.emaint.defaults import DEFAULT_OPTIONS
 #from portage.util._argparse import ArgumentParser
 from portage.util import writemsg_level



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: 76d4733300675dc601dccb303e938c142a3ac85d
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Sep  5 20:14:57 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=76d47333

portage/sync/controller.py: Remove list copy, module_names list is not modified

---
 pym/portage/sync/controller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index e8fe291..a5c93dc 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -85,7 +85,7 @@ class SyncManager(object):
os.umask(0o22)
 
self.module_controller = portage.sync.module_controller
-   self.module_names = self.module_controller.module_names[:]
+   self.module_names = self.module_controller.module_names
 
 
def get_module_descriptions(self, mod):



[gentoo-commits] proj/portage:plugin-sync commit in: pym/_emerge/

2014-10-19 Thread Zac Medico
commit: a7ffeed1ec206953fb41c274264f79eb61d90dbd
Author: Brian Dolbec  gentoo  org>
AuthorDate: Tue Apr 22 02:18:07 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7ffeed1

_emerge/actions: Migrate action_sync to the new emaint sync module

---
 pym/_emerge/actions.py | 83 +++---
 1 file changed, 5 insertions(+), 78 deletions(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index a0e53fe..7dc58aa 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -27,13 +27,13 @@ portage.proxy.lazyimport.lazyimport(globals(),
'portage.debug',
'portage.news:count_unread_news,display_news_notifications',
'portage.util._get_vm_info:get_vm_info',
+   'portage.emaint.modules.sync.sync:SyncRepos',
'_emerge.chk_updated_cfg_files:chk_updated_cfg_files',
'_emerge.help:help@emerge_help',
'_emerge.post_emerge:display_news_notification,post_emerge',
'_emerge.stdout_spinner:stdout_spinner',
 )
 
-from portage.localization import _
 from portage import os
 from portage import shutil
 from portage import eapi_is_supported, _encodings, _unicode_decode
@@ -45,7 +45,7 @@ from portage.dbapi._expand_new_virt import expand_new_virt
 from portage.dep import Atom
 from portage.eclass_cache import hashed_path
 from portage.exception import InvalidAtom, InvalidData, ParseError
-from portage.output import blue, bold, colorize, create_color_func, darkgreen, 
\
+from portage.output import blue, colorize, create_color_func, darkgreen, \
red, xtermTitle, xtermTitleReset, yellow
 good = create_color_func("GOOD")
 bad = create_color_func("BAD")
@@ -62,8 +62,6 @@ from portage.util._async.run_main_scheduler import 
run_main_scheduler
 from portage.util._async.SchedulerInterface import SchedulerInterface
 from portage.util._eventloop.global_event_loop import global_event_loop
 from portage._global_updates import _global_updates
-from portage.sync import get_syncer
-from portage.sync.getaddrinfo_validate import getaddrinfo_validate
 from portage.sync.old_tree_timestamp import old_tree_timestamp_warn
 from portage.metadata import action_metadata
 
@@ -1843,84 +1841,13 @@ def action_sync(emerge_config, trees=DeprecationWarning,
emerge_config = load_emerge_config(
action=action, args=[], trees=trees, opts=opts)
 
-   xterm_titles = "notitles" not in \
-   emerge_config.target_config.settings.features
-   emergelog(xterm_titles, " === sync")
-
-   selected_repos = []
-   unknown_repo_names = []
-   missing_sync_type = []
-   if emerge_config.args:
-   for repo_name in emerge_config.args:
-   try:
-   repo = 
emerge_config.target_config.settings.repositories[repo_name]
-   except KeyError:
-   unknown_repo_names.append(repo_name)
-   else:
-   selected_repos.append(repo)
-   if repo.sync_type is None:
-   missing_sync_type.append(repo)
-
-   if unknown_repo_names:
-   writemsg_level("!!! %s\n" % _("Unknown repo(s): %s") %
-   " ".join(unknown_repo_names),
-   level=logging.ERROR, noiselevel=-1)
+   syncer = SyncRepos(emerge_config)
 
-   if missing_sync_type:
-   writemsg_level("!!! %s\n" %
-   _("Missing sync-type for repo(s): %s") %
-   " ".join(repo.name for repo in 
missing_sync_type),
-   level=logging.ERROR, noiselevel=-1)
-
-   if unknown_repo_names or missing_sync_type:
-   return 1
-
-   else:
-   
selected_repos.extend(emerge_config.target_config.settings.repositories)
-
-   sync_manager = get_syncer(emerge_config.target_config.settings, 
emergelog)
-   retvals = []
-   for repo in selected_repos:
-   if repo.sync_type is not None:
-   returncode = sync_manager.sync(emerge_config, repo)
-   if returncode != os.EX_OK:
-   retvals.append(returncode)
-
-   # Reload the whole config from scratch.
-   portage._sync_mode = False
-   load_emerge_config(emerge_config=emerge_config)
-   adjust_configs(emerge_config.opts, emerge_config.trees)
 
-   if emerge_config.opts.get('--package-moves') != 'n' and \
-   _global_upd

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/

2014-10-19 Thread Zac Medico
commit: d69cc5ad53945418b426fca073074263d5a20932
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon Apr 21 18:27:28 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d69cc5ad

portage/emaint/main.py: Add 'return-messages' boolean to options passed in

---
 pym/portage/emaint/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index 646883d..f76cee2 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -221,5 +221,6 @@ def emaint_main(myargv):
# need to pass the parser options dict to the modules
# so they are available if needed.
task_opts = options.__dict__
+   task_opts['return-messages'] = True
taskmaster = TaskHandler(callback=print_results, 
module_output=sys.stdout)
taskmaster.run_tasks(tasks, func, status, options=task_opts)



[gentoo-commits] proj/portage:plugin-sync commit in: man/

2014-10-19 Thread Zac Medico
commit: 212dfbdb8e0a6e9b21eb1add1744e5c6d1990b9f
Author: Brian Dolbec  gentoo  org>
AuthorDate: Wed Apr 30 15:47:23 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=212dfbdb

man:  Update man pages with new sync info

man/portage.5:  Add the new auto-sync variable.
man/emaint.1: Add the new sync module.
man/emerge.1: Update  the --sync action.

---
 man/emaint.1  | 15 ++-
 man/emerge.1  |  8 +++-
 man/portage.5 | 10 ++
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/man/emaint.1 b/man/emaint.1
index 8356299..f02bc68 100644
--- a/man/emaint.1
+++ b/man/emaint.1
@@ -37,6 +37,9 @@ Perform package move updates for binary packages located in 
\fBPKGDIR\fR.
 .BR moveinst
 Perform package move updates for installed packages.
 .TP
+.BR sync
+Perform sync actions on specified repositories.
+.TP
 .BR world
 Fix problems in the \fIworld\fR file.
 .SH DEFAULT OPTIONS
@@ -46,7 +49,7 @@ Check for any problems that may exist.  (all commands)
 .TP
 .B \-f, \-\-fix
 Fix any problems that may exist.  (not all commands)
-.SH OPTIONS
+.SH OPTIONS logs command
 .TP
 .B \-C, \-\-clean
 Cleans the logs from \fBPORT_LOGDIR\fR (logs command only)
@@ -58,6 +61,16 @@ OPTION (logs command only)
 .B \-t NUM, \-\-time NUM
 Changes the minimum age \fBNUM\fR (in days) of the logs to be listed or
 deleted. (logs command only)
+.SH OPTIONS sync command
+.TP
+.B \-a, \-\-auto
+Sync repositories which have its auto\-sync setting set yes, true. (sync 
command only)
+.TP
+.B \-A, \-\-allrepos
+Sync all repositories which have a sync\-uri specified. (sync command only)
+.TP
+.B \-r, \-\-repo REPO
+Sync the repository specified. (sync command only)
 .SH "REPORTING BUGS"
 Please report bugs via http://bugs.gentoo.org/
 .SH AUTHORS

diff --git a/man/emerge.1 b/man/emerge.1
index 9873ba9..438798b 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -240,7 +240,7 @@ the package name.  \fBTake caution\fR as the descriptions 
are also
 matched as regular expressions.
 .TP
 .BR \-\-sync
-Updates repositories, for which sync\-type and sync\-uri attributes are
+Updates repositories, for which auto\-sync, sync\-type and sync\-uri 
attributes are
 set in repos.conf. See \fBportage\fR(5) for more information.
 The \fBPORTAGE_SYNC_STALE\fR variable configures
 warnings that are shown when emerge \-\-sync has not
@@ -251,6 +251,12 @@ The emerge \-\-sync action will revert local changes (e.g. 
modifications or
 additions of files) inside repositories synchronized using rsync.
 
 \fBNOTE:\fR
+The emerge \-\-sync command is a compatibility command.  Sync operations are
+now performed using the the new emaint sync module. This new emaint sync module
+has greater functionality and flexibility.  Please refer to \fBemaint(1)\fR for
+more information about sync operations.
+
+\fBNOTE:\fR
 The \fBemerge\-webrsync\fR program will download the entire
 portage tree as a tarball, which is much faster than emerge
 \-\-sync for first time syncs.

diff --git a/man/portage.5 b/man/portage.5
index e399f0f..efafc27 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -818,6 +818,16 @@ When 'force = aliases' attribute is not set, 
\fBegencache\fR(1),
 since operations performed by these tools are inherently
 \fBnot\fR \fIsite\-specific\fR.
 .TP
+.B auto\-sync
+This setting determines if the repo will be synced during "\fBemerge 
\-\-sync\fR" or
+"\fBemaint sync \-\-auto\fR" runs.  This allows for repositories to be synced 
only when
+desired via "\fBemaint sync \-\-repo foo\fR".
+.br
+Valid values: yes, no, true, false.
+.br
+If unset, the repo will be treated as set
+no, false.
+.TP
 .B eclass\-overrides
 Makes given repository inherit eclasses from specified repositories.
 .br



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/, pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: 949363fee5a7b98bc118b27e27af3fb46651bf4e
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Sep  5 20:08:36 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=949363fe

portage/sync/controller.sync(): Migrate writemsg() call to return the error 
message to caller

Highlight the "ERROR" string portion usig bad(), remove 1 linefeed.
This puts the error in the emaint sync message list.

---
 pym/portage/emaint/modules/sync/sync.py |  6 +++---
 pym/portage/sync/controller.py  | 13 ++---
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
index 9b0d82c..4369a2a 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -179,11 +179,11 @@ class SyncRepos(object):
sync_manager = 
get_syncer(self.emerge_config.target_config.settings, emergelog)
retvals = []
for repo in selected_repos:
-   #print("syncing repo:", repo.name)
if repo.sync_type is not None:
-   returncode = 
sync_manager.sync(self.emerge_config, repo)
-   #if returncode != os.EX_OK:
+   returncode, message = 
sync_manager.sync(self.emerge_config, repo)
retvals.append((repo.name, returncode))
+   if message:
+   msgs.append(message)
 
# Reload the whole config.
portage._sync_mode = False

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index 2b3dbad..e8fe291 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -103,14 +103,13 @@ class SyncManager(object):
if repo.sync_type in self.module_names[1:]:
tasks = 
[self.module_controller.get_class(repo.sync_type)]
else:
-   portage.util.writemsg(
-   "\nERROR: Sync module '%s' is not an 
installed/known type'\n\n"
-   % (repo.sync_type), noiselevel=-1)
-   return self.exitcode
+   msg = "\n%s: Sync module '%s' is not an installed/known 
type'\n" \
+   % (bad("ERROR"), repo.sync_type)
+   return self.exitcode, msg
 
rval = self.pre_sync(repo)
if rval != os.EX_OK:
-   return rval
+   return rval, None
 
# need to pass the kwargs dict to the modules
# so they are available if needed.
@@ -131,7 +130,7 @@ class SyncManager(object):
 
self.perform_post_sync_hook(repo.sync_uri)
 
-   return self.exitcode
+   return self.exitcode, None
 
 
def do_callback(self, result):
@@ -167,7 +166,7 @@ class SyncManager(object):
except OSError:
st = None
if st is None:
-   print(">>> '%s' not found, creating it." % 
repo.location)
+   writemsg_level(">>> '%s' not found, creating it." % 
repo.location)
portage.util.ensure_dirs(repo.location, mode=0o755)
st = os.stat(repo.location)
 



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/websync/

2014-10-19 Thread Zac Medico
commit: fa3fa9a9e5463ea22f90c617664963ce17298f33
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri May  2 22:59:23 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fa3fa9a9

sync/modules/websync: Make the bash version operational

---
 pym/portage/sync/modules/websync/websync.py | 54 ++---
 1 file changed, 34 insertions(+), 20 deletions(-)

diff --git a/pym/portage/sync/modules/websync/websync.py 
b/pym/portage/sync/modules/websync/websync.py
index 7c31567..f08ae77 100644
--- a/pym/portage/sync/modules/websync/websync.py
+++ b/pym/portage/sync/modules/websync/websync.py
@@ -1,16 +1,26 @@
 
 '''WebRsync module for portage'''
 
+import logging
+
+import portage
+from portage import os
+from portage.util import writemsg_level
+from portage.output import create_color_func
+good = create_color_func("GOOD")
+bad = create_color_func("BAD")
+warn = create_color_func("WARN")
 from portage.sync.syncbase import SyncBase
 
+
 class WebRsync(SyncBase):
'''WebRSync sync class'''
 
short_desc = "Perform sync operations on webrsync based repositories"
 
+   @staticmethod
def name():
return "WebRSync"
-   name = staticmethod(name)
 
 
def __init__(self):
@@ -19,20 +29,31 @@ class WebRsync(SyncBase):
 
def new(self, **kwargs):
'''Do the initial download and install of the repository'''
-   pass
+   return self._sync()
+
 
def _sync(self):
''' Update existing repository
'''
-   pass
-
-   def post_sync(self, portdb, location, emerge_config):
-   '''repo.sync_type == "websync":
-   # NOTE: Do this after reloading the config, in case
-   # it did not exist prior to sync, so that the config
-   # and portdb properly account for its existence.
-   '''
-   pass
+   emerge_config = self.options.get('emerge_config', None)
+   portdb = self.options.get('portdb', None)
+
+   msg = ">>> Starting emerge-webrsync for %s..." % 
self.repo.location
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n")
+   exitcode = portage.process.spawn_bash("%s" % \
+   (self.bin_command),
+   **portage._native_kwargs(self.spawn_kwargs))
+   if exitcode != os.EX_OK:
+   msg = "!!! emerge-webrsync error in %s" % 
self.repo.location
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n", level=logging.ERROR, 
noiselevel=-1)
+   return (exitcode, False)
+   msg = ">>> Emerge-webrsync successful: %s" % self.repo.location
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n")
+   #return self.post_sync(portdb, self.repo.location, 
emerge_config)
+   return (exitcode, True)
 
 
 class PyWebRsync(SyncBase):
@@ -40,9 +61,9 @@ class PyWebRsync(SyncBase):
 
short_desc = "Perform sync operations on webrsync based repositories"
 
+   @staticmethod
def name():
return "WebRSync"
-   name = staticmethod(name)
 
 
def __init__(self):
@@ -53,15 +74,8 @@ class PyWebRsync(SyncBase):
'''Do the initial download and install of the repository'''
pass
 
+
def _sync(self):
''' Update existing repository
'''
pass
-
-   def post_sync(self, portdb, location, emerge_config):
-   '''repo.sync_type == "websync":
-   # NOTE: Do this after reloading the config, in case
-   # it did not exist prior to sync, so that the config
-   # and portdb properly account for its existence.
-   '''
-   pass



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/websync/, pym/portage/sync/modules/cvs/, ...

2014-10-19 Thread Zac Medico
commit: 47cc16a9ab7819043f657fe55ac9d0ecbe084b61
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon Apr 21 18:25:55 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:33 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=47cc16a9

sync/modules/*: Remove unused func_parameters in module_spec

---
 pym/portage/sync/modules/cvs/__init__.py | 10 --
 pym/portage/sync/modules/git/__init__.py | 10 --
 pym/portage/sync/modules/rsync/__init__.py   | 10 --
 pym/portage/sync/modules/websync/__init__.py | 10 --
 4 files changed, 40 deletions(-)

diff --git a/pym/portage/sync/modules/cvs/__init__.py 
b/pym/portage/sync/modules/cvs/__init__.py
index e1e0920..fd3b12a 100644
--- a/pym/portage/sync/modules/cvs/__init__.py
+++ b/pym/portage/sync/modules/cvs/__init__.py
@@ -40,16 +40,6 @@ module_spec = {
'exists': 'Returns a boolean of whether the 
specified dir ' +
'exists and is a valid CVS repository',
},
-   'func_parameters': {
-   'kwargs': {
-   'type': dict,
-   'description': 'Standard python 
**kwargs parameter format' +
-   'Please refer to the sync 
modules specs at ' +
-   
'"https://wiki.gentoo.org:Project:Portage"; for details',
-   'required-keys': ['options', 
'settings', 'logger', 'repo',
-   'xterm_titles', 'spawn_kwargs'],
-   },
-   },
'validate_config': CheckCVSConfig,
}
}

diff --git a/pym/portage/sync/modules/git/__init__.py 
b/pym/portage/sync/modules/git/__init__.py
index 593e95d..304142e 100644
--- a/pym/portage/sync/modules/git/__init__.py
+++ b/pym/portage/sync/modules/git/__init__.py
@@ -24,16 +24,6 @@ module_spec = {
'exists': 'Returns a boolean of whether the 
specified dir ' +
'exists and is a valid Git repository',
},
-   'func_parameters': {
-   'kwargs': {
-   'type': dict,
-   'description': 'Standard python 
**kwargs parameter format' +
-   'Please refer to the sync 
modules specs at ' +
-   
'"https://wiki.gentoo.org:Project:Portage"; for details',
-   'required-keys': ['options', 
'settings', 'logger', 'repo',
-   'xterm_titles', 'spawn_kwargs'],
-   },
-   },
'validate_config': CheckSyncConfig,
}
}

diff --git a/pym/portage/sync/modules/rsync/__init__.py 
b/pym/portage/sync/modules/rsync/__init__.py
index ce1daa1..9e19d85 100644
--- a/pym/portage/sync/modules/rsync/__init__.py
+++ b/pym/portage/sync/modules/rsync/__init__.py
@@ -23,16 +23,6 @@ module_spec = {
'new': 'Creates the new repository at the 
specified location',
'exists': 'Returns a boolean if the specified 
directory exists',
},
-   'func_parameters': {
-   'kwargs': {
-   'type': dict,
-   'description': 'Standard python 
**kwargs parameter format' +
-   'Please refer to the sync 
modules specs at ' +
-   
'"https://wiki.gentoo.org:Project:Portage"; for details',
-   'required-keys': ['options', 
'settings', 'logger', 'repo',
-   'xterm_titles', 'spawn_kwargs'],
-   },
-   },
'validate_config': CheckSyncConfig,
  

[gentoo-commits] proj/portage:plugin-sync commit in: bin/

2014-10-19 Thread Zac Medico
commit: 959d49d375a3973c9682bd228402a9bcd265edc6
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri May  2 22:57:31 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=959d49d3

emerge-webrsync: Add websync repo type as valid

if conditional corrected by: Michal Gorny

---
 bin/emerge-webrsync | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2443c2d..e2b4e00 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -501,8 +501,8 @@ main() {
 
# This is a sanity check to help prevent people like funtoo users
# from accidentally wiping out their git tree.
-   if [[ -n ${repo_sync_type} && ${repo_sync_type} != rsync ]] ; then
-   echo "The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync':" >&2
+   if [[ -n ${repo_sync_type} && ( ${repo_sync_type} != rsync || 
${repo_sync_type} != websync ) ]] ; then
+   echo "The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync' or 'websync':" >&2
echo >&2
echo "  sync-type=${repo_sync_type}" >&2
echo >&2



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: 4daeac0d831593646cf85112739bc2eec3a5b60f
Author: Brian Dolbec  gentoo  org>
AuthorDate: Tue Jun 17 18:44:43 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4daeac0d

portage/sync: Add additional output info for unsupported sync-types

Comment out some debug print()'s

---
 pym/portage/sync/__init__.py  | 5 +++--
 pym/portage/sync/config_checks.py | 4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pym/portage/sync/__init__.py b/pym/portage/sync/__init__.py
index 6d2a732..b74c89e 100644
--- a/pym/portage/sync/__init__.py
+++ b/pym/portage/sync/__init__.py
@@ -11,12 +11,12 @@ sync_manager = None
 
 path = os.path.join(os.path.dirname(__file__), "modules")
 # initial development debug info
-print("module path:", path)
+#print("module path:", path)
 
 module_controller = Modules(path=path, namepath="portage.sync.modules")
 
 # initial development debug info
-print(module_controller.module_names)
+#print(module_controller.module_names)
 module_names = module_controller.module_names[:]
 
 
@@ -43,6 +43,7 @@ def get_syncer(settings=None, logger=None):
 
 def validate_config(repo, logger):
'''Validate the repos.conf settings for the repo'''
+   global module_names, module_controller
if not check_type(repo, logger, module_names):
return False
 

diff --git a/pym/portage/sync/config_checks.py 
b/pym/portage/sync/config_checks.py
index 8ef1974..db316aa 100644
--- a/pym/portage/sync/config_checks.py
+++ b/pym/portage/sync/config_checks.py
@@ -26,6 +26,10 @@ def check_type(repo, logger, module_names):
_("Repository '%s' has sync-type attribute set to 
unsupported value: '%s'")
% (repo.name, repo.sync_type),
level=logger.ERROR, noiselevel=-1)
+   writemsg_level("!!! %s\n" %
+   _("Installed sync-types are: '%s'")
+   % (str(module_names)),
+   level=logger.ERROR, noiselevel=-1)
return False
return True
 



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-19 Thread Zac Medico
commit: c41be414d849554b4fc985e2537eb82208e308d2
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sun Sep  7 01:40:25 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c41be414

sync/controller.py: Use assert() on tasks, func

---
 pym/portage/sync/controller.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index a5c93dc..21b57f4 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -36,8 +36,9 @@ class TaskHandler(object):
 
def run_tasks(self, tasks, func, status=None, verbose=True, 
options=None):
"""Runs the module tasks"""
-   if tasks is None or func is None:
-   return
+   # Ensure we have a task and function
+   assert(tasks)
+   assert(func)
for task in tasks:
inst = task()
show_progress = self.show_progress_bar and self.isatty



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/emaint/modules/sync/

2014-10-19 Thread Zac Medico
commit: 5f8d42361964d3e9654a33941f6056f2c75a69ec
Author: Brian Dolbec  gentoo  org>
AuthorDate: Sun May 11 16:46:09 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f8d4236

emaint/modules/sync/sync.py: Set portage _sync_mode immediately

This way it will not discard non-existent repos if thier directory does not 
exist.

---
 pym/portage/emaint/modules/sync/sync.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/emaint/modules/sync/sync.py 
b/pym/portage/emaint/modules/sync/sync.py
index 3aa318a..ab7591d 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -6,6 +6,8 @@ import os
 import sys
 
 import portage
+portage._internal_caller = True
+portage._sync_mode = True
 from portage.localization import _
 from portage.output import bold, create_color_func
 from portage.sync import get_syncer
@@ -169,7 +171,6 @@ class SyncRepos(object):
return [('None', os.EX_OK)]
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
-   portage._sync_mode = True
 
sync_manager = 
get_syncer(self.emerge_config.target_config.settings, emergelog)
retvals = []



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/svn/

2014-10-19 Thread Zac Medico
commit: 9132fdaedfcb8aac0cebdc4154120fbf45b04a42
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon Jun 16 17:58:09 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 03:48:34 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9132fdae

sync/modules/svn: Add snv upgrade to sync operation

This prevents errors when a newer svn has been installed that requires a db 
upgrade.

---
 pym/portage/sync/modules/svn/svn.py | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/pym/portage/sync/modules/svn/svn.py 
b/pym/portage/sync/modules/svn/svn.py
index 182a7ac..0365e90 100644
--- a/pym/portage/sync/modules/svn/svn.py
+++ b/pym/portage/sync/modules/svn/svn.py
@@ -62,6 +62,10 @@ class SVNSync(SyncBase):
@rtype: (int, bool)
"""
 
+   exitcode, d = self._svn_upgrade()
+   if exitcode != os.EX_OK:
+   return (exitcode, False)
+
svn_root = self.repo.sync_uri
 
if svn_root.startswith("svn://"):
@@ -79,3 +83,22 @@ class SVNSync(SyncBase):
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n", noiselevel=-1, 
level=logging.ERROR)
return (exitcode, False)
+
+
+   def _svn_upgrade(self):
+   """
+   Internal function which performs an svn upgrade on the repo
+
+   @return: tuple of return code (0=success), whether the cache
+   needs to be updated
+   @rtype: (int, bool)
+   """
+   exitcode = portage.process.spawn_bash(
+   "cd %s; exec svn upgrade" %
+   (portage._shell_quote(self.repo.location),),
+   **portage._native_kwargs(self.spawn_kwargs))
+   if exitcode != os.EX_OK:
+   msg = "!!! svn upgrade error; exiting."
+   self.logger(self.xterm_titles, msg)
+   writemsg_level(msg + "\n", noiselevel=-1, 
level=logging.ERROR)
+   return (exitcode, False)



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/

2014-10-20 Thread Zac Medico
commit: d74cf2881d8c005ce99169460c938c142898f846
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Oct 20 20:44:41 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Mon Oct 20 20:44:41 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d74cf288

_sync_callback: check for md5-cache, not cache

This fixes FEATURES=metadata-transfer to work again now that the
metadata/cache directory has been replaced with metadata/md5-cache.

---
 pym/portage/sync/controller.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index a88d4c5..0b308e8 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -226,7 +226,8 @@ class SyncManager(object):
updatecache_flg = False
 
if updatecache_flg and \
-   os.path.exists(os.path.join(self.repo.location, 
'metadata', 'cache')):
+   os.path.exists(os.path.join(
+   self.repo.location, 'metadata', 'md5-cache')):
 
# Only update cache for repo.location since that's
# the only one that's been synced here.



[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/git/

2014-10-20 Thread Zac Medico
commit: af729048d35d3c7bde879c9d04d96cbd786798e2
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Oct 21 01:13:45 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Oct 21 01:13:45 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=af729048

Remove obsolete git_sync_timestamps function.

This function is no longer needed since we switched to the md5-cache
format which does not use timestamps.

---
 pym/portage/sync/modules/git/git.py|   8 +-
 pym/portage/sync/modules/git/timestamps.py | 154 -
 2 files changed, 1 insertion(+), 161 deletions(-)

diff --git a/pym/portage/sync/modules/git/git.py 
b/pym/portage/sync/modules/git/git.py
index 5e0e5df..d8c5a32 100644
--- a/pym/portage/sync/modules/git/git.py
+++ b/pym/portage/sync/modules/git/git.py
@@ -10,7 +10,6 @@ from portage.output import create_color_func
 good = create_color_func("GOOD")
 bad = create_color_func("BAD")
 warn = create_color_func("WARN")
-from .timestamps import git_sync_timestamps
 from portage.sync.syncbase import SyncBase
 
 
@@ -116,9 +115,4 @@ class GitSync(SyncBase):
# Reload the whole config from scratch.
settings, trees, mtimedb = 
load_emerge_config(emerge_config=emerge_config)
adjust_configs(emerge_config.opts, emerge_config.trees)
-   portdb = trees[settings['EROOT']]['porttree'].dbapi
-   updatecache_flg = False
-   exitcode = git_sync_timestamps(portdb, location)
-   if exitcode == os.EX_OK:
-   updatecache_flg = True
-   return (exitcode, updatecache_flg)
+   return (os.EX_OK, True)

diff --git a/pym/portage/sync/modules/git/timestamps.py 
b/pym/portage/sync/modules/git/timestamps.py
deleted file mode 100644
index 5e44845..000
--- a/pym/portage/sync/modules/git/timestamps.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-import logging
-import stat
-import subprocess
-
-
-import portage
-from portage import os
-from portage import _unicode_decode
-from portage.util import writemsg_level
-from portage.cache.cache_errors import CacheError
-
-
-def git_sync_timestamps(portdb, portdir):
-   """
-   Since git doesn't preserve timestamps, synchronize timestamps between
-   entries and ebuilds/eclasses. Assume the cache has the correct timestamp
-   for a given file as long as the file in the working tree is not modified
-   (relative to HEAD).
-   """
-
-   cache_db = portdb._pregen_auxdb.get(portdir)
-
-   try:
-   if cache_db is None:
-   # portdbapi does not populate _pregen_auxdb
-   # when FEATURES=metadata-transfer is enabled
-   cache_db = portdb._create_pregen_cache(portdir)
-   except CacheError as e:
-   writemsg_level("!!! Unable to instantiate cache: %s\n" % (e,),
-   level=logging.ERROR, noiselevel=-1)
-   return 1
-
-   if cache_db is None:
-   return os.EX_OK
-
-   if cache_db.validation_chf != 'mtime':
-   # newer formats like md5-dict do not require mtime sync
-   return os.EX_OK
-
-   writemsg_level(">>> Synchronizing timestamps...\n")
-
-   ec_dir = os.path.join(portdir, "eclass")
-   try:
-   ec_names = set(f[:-7] for f in os.listdir(ec_dir) \
-   if f.endswith(".eclass"))
-   except OSError as e:
-   writemsg_level("!!! Unable to list eclasses: %s\n" % (e,),
-   level=logging.ERROR, noiselevel=-1)
-   return 1
-
-   args = [portage.const.BASH_BINARY, "-c",
-   "cd %s && git diff-index --name-only --diff-filter=M HEAD" % \
-   portage._shell_quote(portdir)]
-   proc = subprocess.Popen(args, stdout=subprocess.PIPE)
-   modified_files = set(_unicode_decode(l).rstrip("\n") for l in 
proc.stdout)
-   rval = proc.wait()
-   proc.stdout.close()
-   if rval != os.EX_OK:
-   return rval
-
-   modified_eclasses = set(ec for ec in ec_names \
-   if os.path.join("eclass", ec + ".eclass") in modified_files)
-
-   updated_ec_mtimes = {}
-
-   for cpv in cache_db:
-   cpv_split = portage.catpkgsplit(cpv)
-   if cpv_split is None:
-   writemsg_level("!!! Invalid cache entry: %s\n" % (cpv,),
-   level=logging.ERROR, noiselevel=-1)
-   continue
-
-   cat, pn, ver, rev = cpv_split
- 

[gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/git/

2014-10-20 Thread Zac Medico
commit: 6bb883c7ef60f2ff6c036becd796dd86dc025b72
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Oct 21 01:49:35 2014 +
Commit:     Zac Medico  gentoo  org>
CommitDate: Tue Oct 21 01:49:35 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6bb883c7

git sync: remove unneeded post_sync

None of the remaining post_sync code is really needed. Also, fix
indent of return near the end of the _sync method.

---
 pym/portage/sync/modules/git/git.py | 18 ++
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/pym/portage/sync/modules/git/git.py 
b/pym/portage/sync/modules/git/git.py
index d8c5a32..7c28139 100644
--- a/pym/portage/sync/modules/git/git.py
+++ b/pym/portage/sync/modules/git/git.py
@@ -69,11 +69,11 @@ class GitSync(SyncBase):
msg = "!!! git clone error in %s" % self.repo.location
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n", level=logging.ERROR, 
noiselevel=-1)
-   return (exitcode, False)
+   return (exitcode, False)
msg = ">>> Git clone successful"
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
-   return self.post_sync(portdb, self.repo.location, emerge_config)
+   return (os.EX_OK, True)
 
 
def _sync(self):
@@ -101,18 +101,4 @@ class GitSync(SyncBase):
msg = ">>> Git pull successful: %s" % self.repo.location
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
-   return self.post_sync(portdb, self.repo.location, emerge_config)
-
-
-   def post_sync(self, portdb, location, emerge_config):
-   '''repo.sync_type == "git":
-   # NOTE: Do this after reloading the config, in case
-   # it did not exist prior to sync, so that the config
-   # and portdb properly account for its existence.
-   '''
-   # avoid circular import for now
-   from _emerge.actions import load_emerge_config, adjust_configs
-   # Reload the whole config from scratch.
-   settings, trees, mtimedb = 
load_emerge_config(emerge_config=emerge_config)
-   adjust_configs(emerge_config.opts, emerge_config.trees)
return (os.EX_OK, True)



  1   2   3   4   5   6   7   8   9   10   >