Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-securesystemslib for 
openSUSE:Factory checked in at 2023-03-28 17:50:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-securesystemslib (Old)
 and      /work/SRC/openSUSE:Factory/.python-securesystemslib.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-securesystemslib"

Tue Mar 28 17:50:41 2023 rev:2 rq:1074829 version:0.21.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-securesystemslib/python-securesystemslib.changes
  2022-01-04 19:38:34.798015648 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-securesystemslib.new.31432/python-securesystemslib.changes
       2023-03-28 17:50:41.651359557 +0200
@@ -1,0 +2,9 @@
+Mon Mar 27 05:47:20 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch use_python3_interpreter_in_tests.diff:
+  * Call python3, not python.
+- Actually run the testsuite. 
+- Fix the Summary, and run fdupes to fix the most egregious rpmlint issues.
+- Stop using %{python_sitelib}/*.
+
+-------------------------------------------------------------------

New:
----
  use_python3_interpreter_in_tests.diff

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

Other differences:
------------------
++++++ python-securesystemslib.spec ++++++
--- /var/tmp/diff_new_pack.yb6NGw/_old  2023-03-28 17:50:42.143361931 +0200
+++ /var/tmp/diff_new_pack.yb6NGw/_new  2023-03-28 17:50:42.151361969 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package python-wakeonlan
+# spec file for package python-securesystemslib
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,27 +12,33 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define         skip_python2 1
 Name:           python-securesystemslib
 Version:        0.21.0
 Release:        0
 License:        MIT
-Summary:        Cryptographic and general-purpose routines for Secure Systems 
Lab projects at NYU
-Group:          Development/Languages/Python
-Url:            https://github.com/secure-systems-lab/securesystemslib
+Summary:        Cryptographic and general routines for Secure Systems Lab
+URL:            https://github.com/secure-systems-lab/securesystemslib
 Source:         securesystemslib-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM Contained in debian/patches directory
+Patch0:         use_python3_interpreter_in_tests.diff
+BuildRequires:  %{python_module PyNaCl}
+BuildRequires:  %{python_module asn1crypto}
+BuildRequires:  %{python_module cryptography >= 3.3.2}
+BuildRequires:  %{python_module ed25519}
+BuildRequires:  %{python_module hatchling}
 BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-
-Requires: python-cryptography >= 3.3.2
 Requires: python-PyNaCl
+Requires:       python-asn1crypto
 Requires: python-colorama
+Requires:       python-cryptography >= 3.3.2
 
 BuildArch:      noarch
 %python_subpackages
@@ -41,16 +47,20 @@
 Cryptographic and general-purpose routines for Secure Systems Lab projects at 
NYU
 
 %prep
-%setup -q -n securesystemslib-%version
+%autosetup -p1 -n securesystemslib-%version
 
 %build
-export CFLAGS="%{optflags}"
 %python_build
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%files %{python_files}
-%{python_sitelib}/*
+%check
+%pytest -k 'not (test_ed25519_kat or test_checkparams)'
 
+%files %{python_files}
+%{python_sitelib}/securesystemslib
+%{python_sitelib}/securesystemslib-%{version}*info
 
+%changelog

++++++ use_python3_interpreter_in_tests.diff ++++++
Description: Use python3 in tests
 Some upstream tests for the custom `process` module call the python interpreter
 in a subprocess. In Debian, where we only build for python3, "python" is not
 available during build and thus makes those tests fail. This patch replaces
 "python" with "python3" where applicable.
Author: Lukas Puehringer <lukas.puehrin...@nyu.edu>
Forwarded: not-needed

--- python-securesystemslib-0.16.0.orig/tests/test_process.py
+++ python-securesystemslib-0.16.0/tests/test_process.py
@@ -38,7 +38,7 @@ class Test_Process(unittest.TestCase):
 
     stdin_file = open(path)
     cmd = \
-        "python -c \"import sys; assert(sys.stdin.read() == '{}')\""
+        "python3 -c \"import sys; assert(sys.stdin.read() == '{}')\""
 
     # input is used in favor of stdin
     securesystemslib.process.run(cmd.format("use input kwarg"),
@@ -57,7 +57,7 @@ class Test_Process(unittest.TestCase):
   def test_run_duplicate_streams(self):
     """Test output as streams and as returned.  """
     # Command that prints 'foo' to stdout and 'bar' to stderr.
-    cmd = ("python -c \""
+    cmd = ("python3 -c \""
         "import sys;"
         "sys.stdout.write('foo');"
         "sys.stderr.write('bar');\"")
@@ -101,7 +101,7 @@ class Test_Process(unittest.TestCase):
 
   def test_run_cmd_arg_return_code(self):
     """Test command arg as string and list using return code. """
-    cmd_str = ("python -c \""
+    cmd_str = ("python3 -c \""
         "import sys;"
         "sys.exit(100)\"")
     cmd_list = shlex.split(cmd_str)
@@ -117,7 +117,7 @@ class Test_Process(unittest.TestCase):
   def test_run_duplicate_streams_timeout(self):
     """Test raise TimeoutExpired. """
     with self.assertRaises(securesystemslib.process.subprocess.TimeoutExpired):
-      securesystemslib.process.run_duplicate_streams("python --version",
+      securesystemslib.process.run_duplicate_streams("python3 --version",
           timeout=-1)
 
 

Reply via email to