Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package obs-service-go_modules for 
openSUSE:Factory checked in at 2023-03-27 18:17:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-go_modules (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-go_modules.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-go_modules"

Mon Mar 27 18:17:27 2023 rev:7 rq:1074630 version:0.6.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/obs-service-go_modules/obs-service-go_modules.changes
    2023-03-02 23:04:39.660200871 +0100
+++ 
/work/SRC/openSUSE:Factory/.obs-service-go_modules.new.31432/obs-service-go_modules.changes
 2023-03-27 18:17:27.807481213 +0200
@@ -1,0 +2,8 @@
+Mon Mar 27 09:39:15 UTC 2023 - [email protected]
+
+- Update to version 0.6.2:
+  * Better skipping of non-compressed archive extensions (like .tar.gz.asc)
+  * Adjust flake8 settings to match what black is doing
+  * fix flake8 errors and add flake8 Github Action (#28)
+
+-------------------------------------------------------------------

Old:
----
  obs-service-go_modules-0.6.1.tar.gz

New:
----
  obs-service-go_modules-0.6.2.tar.gz

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

Other differences:
------------------
++++++ obs-service-go_modules.spec ++++++
--- /var/tmp/diff_new_pack.GpB9d5/_old  2023-03-27 18:17:28.251483556 +0200
+++ /var/tmp/diff_new_pack.GpB9d5/_new  2023-03-27 18:17:28.255483578 +0200
@@ -37,7 +37,7 @@
 %define use_test   test
 %endif
 Name:           obs-service-%{service}
-Version:        0.6.1
+Version:        0.6.2
 Release:        0
 Summary:        An OBS source service: Download, verify and vendor Go module 
dependencies
 License:        GPL-2.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.GpB9d5/_old  2023-03-27 18:17:28.299483810 +0200
+++ /var/tmp/diff_new_pack.GpB9d5/_new  2023-03-27 18:17:28.299483810 +0200
@@ -3,7 +3,7 @@
     <param 
name="url">https://github.com/openSUSE/obs-service-go_modules</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v0.6.1</param>
+    <param name="revision">v0.6.2</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">enable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.GpB9d5/_old  2023-03-27 18:17:28.319483915 +0200
+++ /var/tmp/diff_new_pack.GpB9d5/_new  2023-03-27 18:17:28.323483936 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/openSUSE/obs-service-go_modules</param>
-              <param 
name="changesrevision">2ed7720102f866a1e18691ff64f7ff8c7f81afa9</param></service></servicedata>
+              <param 
name="changesrevision">e8e245c20b318ee4f950a65db4bbf3be7f64c3d0</param></service></servicedata>
 (No newline at EOF)
 

++++++ obs-service-go_modules-0.6.1.tar.gz -> 
obs-service-go_modules-0.6.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-go_modules-0.6.1/.flake8 
new/obs-service-go_modules-0.6.2/.flake8
--- old/obs-service-go_modules-0.6.1/.flake8    1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-service-go_modules-0.6.2/.flake8    2023-03-27 11:36:21.000000000 
+0200
@@ -0,0 +1,3 @@
+[flake8]
+max-line-length = 88
+extend-ignore = E203
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-go_modules-0.6.1/.github/workflows/flake8.yml 
new/obs-service-go_modules-0.6.2/.github/workflows/flake8.yml
--- old/obs-service-go_modules-0.6.1/.github/workflows/flake8.yml       
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-service-go_modules-0.6.2/.github/workflows/flake8.yml       
2023-03-27 11:36:21.000000000 +0200
@@ -0,0 +1,20 @@
+name: flake8 Lint
+
+on: [push, pull_request]
+
+jobs:
+  flake8-lint:
+    runs-on: ubuntu-latest
+    name: Lint
+    steps:
+      - name: Check out source repository
+        uses: actions/checkout@v3
+      - name: Set up Python environment
+        uses: actions/setup-python@v4
+        with:
+          python-version: "3.11"
+      - name: flake8 Lint
+        uses: py-actions/flake8@v2
+        with:
+          path: "go_modules"
+        plugins: "flake8-bugbear flake8-blind-except flake8-builtins 
flake8-comprehensions"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-go_modules-0.6.1/go_modules 
new/obs-service-go_modules-0.6.2/go_modules
--- old/obs-service-go_modules-0.6.1/go_modules 2023-03-02 10:42:12.000000000 
+0100
+++ new/obs-service-go_modules-0.6.2/go_modules 2023-03-27 11:36:21.000000000 
+0200
@@ -32,7 +32,6 @@
 import re
 import libarchive
 import os
-import shutil
 import sys
 import tempfile
 
@@ -72,7 +71,8 @@
 
         if compression_format not in libarchive.ffi.READ_FILTERS:
             log.error(
-                f'The specified compression mode is not supported: 
"{args.compression}"'
+                "The specified compression mode is not supported:"
+                + f'"{args.compression}"'
             )
             exit(1)
 
@@ -85,7 +85,7 @@
 
 def basename_from_archive_name(archive_name):
     basename = re.sub(
-        
"^(?P<service_prefix>_service:[^:]+:)?(?P<basename>.*)\.(?P<extension>obscpio|tar\.[^\.]+)$",
+        
r"^(?P<service_prefix>_service:[^:]+:)?(?P<basename>.*)\.(?P<extension>obscpio|tar\.[^\.]+)$",
  # noqa: E501
         r"\g<basename>",
         archive_name,
     )
@@ -110,14 +110,17 @@
 
 def archive_autodetect():
     """Find the most likely candidate file that contains go.mod and go.sum.
-    For most Go applications this will be app-x.y.z.tar.gz or other supported 
compression.
+    For most Go applications this will be app-x.y.z.tar.gz or other supported
+    compression.
     Use the name of the .spec file as the stem for the archive to detect.
     Archive formats supported:
+    - .tar.bz2
     - .tar.gz
+    - .tar.lz
     - .tar.xz
     - .tar.zstd
     """
-    log.info(f"Autodetecting archive since no archive param provided in 
_service")
+    log.info("Autodetecting archive since no archive param provided in 
_service")
     cwd = Path.cwd()
     # first .spec under cwd or None
     spec = next(reversed(sorted(Path(cwd).glob("*.spec"))), None)
@@ -127,14 +130,14 @@
     else:
         archive = None
         spec_dir = spec.parent  # typically the same as cwd
-        spec_stem = spec.stem  # stem is app in app.spec
         # highest sorted archive under spec_dir
-        patterns = [
-            f"{spec.stem}*.tar.*",
-            f"{spec.stem}*.obscpio",
-            f"_service:*:{spec.stem}*tar.*",
-            f"_service:*:{spec.stem}*obscpio",
-        ]
+        c_exts = ("gz", "xz", "zstd", "lz", "bz2")
+        patterns = (
+            [f"{spec.stem}*.tar.{c_ext}" for c_ext in c_exts]
+            + [f"{spec.stem}*.obscpio"]
+            + [f"_service:*:{spec.stem}*tar.{c_ext}" for c_ext in c_exts]
+            + [f"_service:*:{spec.stem}*obscpio"]
+        )
         for pattern in patterns:
             log.debug(f"Trying to find archive name with pattern {pattern}")
             archive = next(reversed(sorted(Path(spec_dir).glob(pattern))), 
None)
@@ -143,7 +146,7 @@
                 break
 
     if not archive:
-        log.error(f"Archive autodetection found no matching archive")
+        log.error("Archive autodetection found no matching archive")
         exit(1)
 
     log.info(f"Archive autodetected at {archive}")
@@ -161,7 +164,8 @@
         else:
             if not (version in archive.name):
                 log.warning(
-                    f"Version {version} in {spec.name} does not match 
{archive.name}"
+                    f"Version {version} in {spec.name} "
+                    + f"does not match {archive.name}"
                 )
     return str(archive.name)  # return string not PosixPath
 
@@ -171,7 +175,8 @@
 
     cwd = os.getcwd()
 
-    # make path absolute so we can switch away from the current working 
directory
+    # make path absolute so we can switch away from the
+    # current working directory
     filename = os.path.join(cwd, filename)
 
     log.info(f"Switching to {outdir}")
@@ -253,15 +258,19 @@
             go_mod_dir = os.path.dirname(go_mod_path)
             log.info(f"Using go.mod found at {go_mod_path}")
         else:
-            log.error(f"File go.mod not found under {os.path.join(tempdir, 
basename)}")
+            log.error(
+                "File go.mod not found under " + f"{os.path.join(tempdir, 
basename)}"
+            )
             exit(1)
 
         if args.strategy == "vendor":
             # go subcommand sequence:
             # - go mod download
-            #   (is sensitive to invalid module versions, try and log warn if 
fails)
+            #   (is sensitive to invalid module versions,
+            #   try and log warn if fails)
             # - go mod vendor
-            #   (also downloads but use separate steps for visibility in OBS 
environment)
+            #   (also downloads but use separate steps for visibility in
+            #   OBS environment)
             # - go mod verify
             #   (validates checksums)
 
@@ -270,10 +279,12 @@
             if cp.returncode:
                 if "invalid version" in cp.stderr:
                     log.warning(
-                        f"go mod download is more sensitive to invalid module 
versions than go mod vendor"
+                        "go mod download is more sensitive to invalid "
+                        + "module versions than go mod vendor"
                     )
                     log.warning(
-                        f"if go mod vendor and go mod verify complete, 
vendoring is successful"
+                        "if go mod vendor and go mod verify complete, "
+                        + "vendoring is successful"
                     )
                 else:
                     log.error("go mod download failed")

Reply via email to