public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/
@ 2023-04-09  6:52 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-09  6:52 UTC (permalink / raw
  To: gentoo-commits

commit:     7af691adef9a624cde540850f39a6bf1b8d5e2bf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 22:06:56 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  9 06:51:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7af691ad

sync: webrsync: document status quo

Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/sync/modules/webrsync/webrsync.py | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index f98162683..b4a6bb4f8 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -7,11 +7,11 @@ from portage import os
 from portage.util import writemsg_level
 from portage.util.futures import asyncio
 from portage.output import create_color_func
+from portage.sync.syncbase import SyncBase
 
 good = create_color_func("GOOD")
 bad = create_color_func("BAD")
 warn = create_color_func("WARN")
-from portage.sync.syncbase import SyncBase
 
 try:
     from gemato.exceptions import GematoException
@@ -21,7 +21,15 @@ except ImportError:
 
 
 class WebRsync(SyncBase):
-    """WebRSync sync class"""
+    """WebRSync sync class
+
+    This class implements syncing via calls to an external binary, either:
+    - emerge-delta-webrsync (if sync-webrsync-delta is set), or
+    - emerge-webrsync
+
+    It wraps them and performs PGP verification if sync-webrsync-verify-signature
+    is set via gemato.
+    """
 
     short_desc = "Perform sync operations on webrsync based repositories"
 
@@ -133,7 +141,12 @@ class WebRsync(SyncBase):
 
 
 class PyWebRsync(SyncBase):
-    """WebRSync sync class"""
+    """PyWebRsync sync class
+
+    TODO: Implement the sync parts from the emerge-webrsync external
+          binary to avoid split logic for various components, which
+          is how we ended up with bug #597800.
+    """
 
     short_desc = "Perform sync operations on webrsync based repositories"
 


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/
@ 2023-04-09  6:52 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-09  6:52 UTC (permalink / raw
  To: gentoo-commits

commit:     7134b8d9820232ad8ea58860db2e911901a3a2c8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 22:02:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  9 06:51:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7134b8d9

sync: webrsync: fix module name for (stub) Python implementation

- Fix module name for the (stub) Python implementation of the
  webrsync module: PyWebRsync != WebRsync.

- Raise NotImplementedError if someone actually tries to use it.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/sync/modules/webrsync/__init__.py | 4 ++--
 lib/portage/sync/modules/webrsync/webrsync.py | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/portage/sync/modules/webrsync/__init__.py b/lib/portage/sync/modules/webrsync/__init__.py
index bc0cdf43c..534a1d562 100644
--- a/lib/portage/sync/modules/webrsync/__init__.py
+++ b/lib/portage/sync/modules/webrsync/__init__.py
@@ -13,8 +13,8 @@ from portage.sync.config_checks import CheckSyncConfig
 
 
 DEFAULT_CLASS = "WebRsync"
-AVAILABLE_CLASSES = ["WebRsync", "PyWebsync"]
-options = {"1": "WebRsync", "2": "PyWebsync"}
+AVAILABLE_CLASSES = ["WebRsync", "PyWebRsync"]
+options = {"1": "WebRsync", "2": "PyWebRsync"}
 
 
 config_class = DEFAULT_CLASS

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index 18af5cfbb..f98162683 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -146,4 +146,6 @@ class PyWebRsync(SyncBase):
 
     def sync(self, **kwargs):
         """Sync the repository"""
-        pass
+        raise NotImplementedError(
+            "Python impl. of webrsync backend is not yet implemented"
+        )


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/
@ 2023-05-01  7:21 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-05-01  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     865860503c1279a1b5880aa180ecf67206640e45
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 30 05:28:55 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 07:20:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=86586050

sync: webrsync: export PORTAGE_GPG_KEY for emerge-webrsync

Set PORTAGE_GPG_KEY to sync-openpgp-key-path configured by the user
for use by emerge-webrsync to pass to gemato.

Bug: https://bugs.gentoo.org/905358
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/sync/modules/webrsync/webrsync.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index b4a6bb4f8..8de7c08ad 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -109,6 +109,9 @@ class WebRsync(SyncBase):
                     self._refresh_keys(openpgp_env)
                     self.spawn_kwargs["env"]["PORTAGE_GPG_DIR"] = openpgp_env.home
                     self.spawn_kwargs["env"]["PORTAGE_TEMP_GPG_DIR"] = openpgp_env.home
+                    self.spawn_kwargs["env"][
+                        "PORTAGE_GPG_KEY"
+                    ] = self.repo.sync_openpgp_key_path
                 except (GematoException, asyncio.TimeoutError) as e:
                     writemsg_level(
                         f"!!! Verification impossible due to keyring problem:\n{e}\n",


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/
@ 2023-05-01  7:21 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-05-01  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e1f8478c666de6c2310381457e846b4fe8fa8b39
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  1 06:49:30 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 07:20:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e1f8478c

sync: webrsync: export PORTAGE_GPG_KEY_SERVER

Set PORTAGE_GPG_KEY_SERVER to sync-openpgp-keyserver configured by the user
for use by emerge-webrsync to pass to gemato.

Similar to previous commit for PORTAGE_GPG_KEY.

Bug: https://bugs.gentoo.org/905358
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/sync/modules/webrsync/webrsync.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index 8de7c08ad..093efe8b0 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -112,6 +112,9 @@ class WebRsync(SyncBase):
                     self.spawn_kwargs["env"][
                         "PORTAGE_GPG_KEY"
                     ] = self.repo.sync_openpgp_key_path
+                    self.spawn_kwargs["env"][
+                        "PORTAGE_GPG_KEY_SERVER"
+                    ] = self.repo.sync_openpgp_key_server
                 except (GematoException, asyncio.TimeoutError) as e:
                     writemsg_level(
                         f"!!! Verification impossible due to keyring problem:\n{e}\n",


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

* [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/
@ 2023-06-06 10:32 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-06-06 10:32 UTC (permalink / raw
  To: gentoo-commits

commit:     2660f630e18ea5893c3463972516b174c2e8443c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  6 10:18:44 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  6 10:30:55 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2660f630

sync: webrsync: fix passing down PORTAGE_SYNC_WEBRSYNC_GPG

This needs to be a string, not an int, because an int doesn't
mean anything when we're passing it as an argument to an external
process by shelling out.

Bug: https://bugs.gentoo.org/907816
Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1050

 lib/portage/sync/modules/webrsync/webrsync.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index 0e1d1a463..ca0416fa4 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -97,7 +97,7 @@ class WebRsync(SyncBase):
                     )
                     return (1, False)
 
-                self.spawn_kwargs["env"]["PORTAGE_SYNC_WEBRSYNC_GPG"] = True
+                self.spawn_kwargs["env"]["PORTAGE_SYNC_WEBRSYNC_GPG"] = "1"
                 self.spawn_kwargs["env"][
                     "PORTAGE_GPG_KEY"
                 ] = self.repo.sync_openpgp_key_path


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

end of thread, other threads:[~2023-06-06 10:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-01  7:21 [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/webrsync/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-06-06 10:32 Sam James
2023-05-01  7:21 Sam James
2023-04-09  6:52 Sam James
2023-04-09  6:52 Sam James

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