Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package obs-scm-bridge for openSUSE:Factory 
checked in at 2024-11-30 13:28:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-scm-bridge (Old)
 and      /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.28523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-scm-bridge"

Sat Nov 30 13:28:05 2024 rev:12 rq:1227319 version:0.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-scm-bridge/obs-scm-bridge.changes    
2024-11-14 16:10:54.752316095 +0100
+++ /work/SRC/openSUSE:Factory/.obs-scm-bridge.new.28523/obs-scm-bridge.changes 
2024-11-30 13:29:00.484609949 +0100
@@ -1,0 +2,6 @@
+Fri Nov 29 12:36:46 UTC 2024 - Adrian Schröter <adr...@suse.de>
+
+- 0.5.3
+  * Switch to ssh url when using the bridge via osc
+
+-------------------------------------------------------------------

Old:
----
  obs-scm-bridge-0.5.2.obscpio

New:
----
  obs-scm-bridge-0.5.3.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-scm-bridge.spec ++++++
--- /var/tmp/diff_new_pack.WcHPl1/_old  2024-11-30 13:29:01.040633108 +0100
+++ /var/tmp/diff_new_pack.WcHPl1/_new  2024-11-30 13:29:01.040633108 +0100
@@ -22,7 +22,7 @@
 %define build_pkg_name build
 %endif
 Name:           obs-scm-bridge
-Version:        0.5.2
+Version:        0.5.3
 Release:        0
 Summary:        A help service to work with git repositories in OBS
 License:        GPL-2.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.WcHPl1/_old  2024-11-30 13:29:01.072634441 +0100
+++ /var/tmp/diff_new_pack.WcHPl1/_new  2024-11-30 13:29:01.076634608 +0100
@@ -2,8 +2,8 @@
   <service name="obs_scm" mode="manual">
     <param name="url">https://github.com/openSUSE/obs-scm-bridge</param>
     <param name="scm">git</param>
-    <param name="revision">0.5.2</param>
-    <param name="version">0.5.2</param>
+    <param name="revision">0.5.3</param>
+    <param name="version">0.5.3</param>
   </service>
   <service mode="manual" name="set_version" />
 

++++++ obs-scm-bridge-0.5.2.obscpio -> obs-scm-bridge-0.5.3.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-scm-bridge-0.5.2/obs_scm_bridge 
new/obs-scm-bridge-0.5.3/obs_scm_bridge
--- old/obs-scm-bridge-0.5.2/obs_scm_bridge     2024-11-13 16:07:33.000000000 
+0100
+++ new/obs-scm-bridge-0.5.3/obs_scm_bridge     2024-11-29 13:17:21.000000000 
+0100
@@ -33,6 +33,7 @@
 get_assets = False
 shallow_clone = True
 create_obsinfo = False
+rewrite_url_to_ssh = False
 
 if os.environ.get('DEBUG_SCM_BRIDGE') == "1":
     logging.getLogger().setLevel(logging.DEBUG)
@@ -44,6 +45,7 @@
     get_assets = True
     shallow_clone = False
     create_obsinfo = False
+    rewrite_url_to_ssh = True
 os.environ['LANG'] = "C"
 
 class ObsGit(object):
@@ -107,6 +109,21 @@
         scmtoolurl = self.url.copy()
         if scmtoolurl[0] and scmtoolurl[0][0:4] == 'git+':
             scmtoolurl[0] = scmtoolurl[0][4:]
+        # we want to switch to ssh as the user is likely providing his
+        # access via ssh pub key already.
+        # Unfortunality there is no generic way to rewrite the url as
+        # it depends on the installation.
+        # For now we hard code our instances, but this needs to become
+        # configurable or we need to detect it by asking the server
+        # somehow.
+        # Expect this to be moved to a config file
+        if rewrite_url_to_ssh and scmtoolurl[0] == 'https':
+            if scmtoolurl[1] == 'src.suse.de':
+                scmtoolurl[1] = 'gi...@src.suse.de'
+                scmtoolurl[0] = 'ssh'
+            elif scmtoolurl[1] == 'src.opensuse.org':
+                scmtoolurl[1] = 'gi...@src.opensuse.org'
+                scmtoolurl[0] = 'ssh'
         self.scmtoolurl = urllib.parse.urlunparse(scmtoolurl)
 
     def add_critical_instance(

++++++ obs-scm-bridge.obsinfo ++++++
--- /var/tmp/diff_new_pack.WcHPl1/_old  2024-11-30 13:29:01.192639440 +0100
+++ /var/tmp/diff_new_pack.WcHPl1/_new  2024-11-30 13:29:01.192639440 +0100
@@ -1,5 +1,5 @@
 name: obs-scm-bridge
-version: 0.5.2
-mtime: 1731510453
-commit: 83d688168497adb0ae38855c6526110d92daa5ee
+version: 0.5.3
+mtime: 1732882641
+commit: 28caef73a8f393c4064cac122890fd5bf8f38dde
 

Reply via email to