Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-systemd for openSUSE:Factory 
checked in at 2022-08-24 15:11:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-systemd (Old)
 and      /work/SRC/openSUSE:Factory/.python-systemd.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-systemd"

Wed Aug 24 15:11:42 2022 rev:12 rq:998995 version:235

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-systemd/python-systemd.changes    
2022-08-17 18:26:15.151598744 +0200
+++ /work/SRC/openSUSE:Factory/.python-systemd.new.2083/python-systemd.changes  
2022-08-24 15:12:05.384558164 +0200
@@ -1,0 +2,6 @@
+Wed Aug 17 09:03:29 UTC 2022 - Matej Cepl <[email protected]>
+
+- Add OBS_missing_etc_machine_id.patch to partially fix
+  gh#systemd/python-systemd#118.
+
+-------------------------------------------------------------------

New:
----
  OBS_missing_etc_machine_id.patch

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

Other differences:
------------------
++++++ python-systemd.spec ++++++
--- /var/tmp/diff_new_pack.ni9l04/_old  2022-08-24 15:12:05.764558531 +0200
+++ /var/tmp/diff_new_pack.ni9l04/_new  2022-08-24 15:12:05.768558534 +0200
@@ -27,8 +27,13 @@
 Source:         
https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 # PATCH-FIX-OPENSUSE iso-c-90.patch makes the building iso-c-90 compatible to 
allow building on SLE12 SP3
 Patch1:         iso-c-90.patch
+# PATCH-FIX-OPENSUSE OBS_missing_etc_machine_id.patch 
gh#systemd/python-systemd#118 [email protected]
+# build environment doesn't have /etc/machine-id
+Patch2:         OBS_missing_etc_machine_id.patch
 BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
@@ -51,16 +56,15 @@
 %autosetup -p1
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitearch}
 
 %check
 # Not sure about the first exclusion,
-# the following ones are gh#systemd/python-systemd#118
-export PYTEST_ADDOPTS="-k 'not (test_reader_this_machine or test_get_machine 
or test_get_machine_app_specific)'"
+export PYTEST_ADDOPTS="-k 'not (test_reader_this_machine or test_get_machine)'"
 %python_expand make PYTHON=python%{$python_version} check
 
 %files %{python_files}

++++++ OBS_missing_etc_machine_id.patch ++++++
>From 50d1ec8ab8d3333ef1b7cac982155b94c7534c4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
Date: Wed, 17 Aug 2022 09:53:25 +0200
Subject: [PATCH] tests: check for errnos that sd_id128_get_machine actually
 returns

Fixes #118.
---
 systemd/test/test_id128.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/systemd/test/test_id128.py b/systemd/test/test_id128.py
index 146ec73..f5fc65f 100644
--- a/systemd/test/test_id128.py
+++ b/systemd/test/test_id128.py
@@ -6,11 +6,11 @@
 from systemd import id128
 
 @contextlib.contextmanager
-def skip_oserror(code):
+def skip_oserror(*errnos):
     try:
         yield
     except (OSError, IOError) as e:
-        if e.errno == code:
+        if e.errno in errnos:
             pytest.skip()
         raise
 
@@ -29,7 +29,8 @@ def test_get_machine_app_specific():
     a1 = uuid.uuid1()
     a2 = uuid.uuid1()
 
-    with skip_oserror(errno.ENOSYS):
+    # yikes, python2 doesn't know ENOMEDIUM
+    with skip_oserror(errno.ENOENT, 123):
         u1 = id128.get_machine_app_specific(a1)
 
     u2 = id128.get_machine_app_specific(a2)

Reply via email to