diff --git a/exclude-tests-on-obs.patch b/exclude-tests-on-obs.patch new file mode 100644 index 0000000..87c6b58 --- /dev/null +++ b/exclude-tests-on-obs.patch @@ -0,0 +1,22 @@ +diff -ur python-systemd-234-orig/systemd/test/test_journal.py python-systemd-234/systemd/test/test_journal.py +--- python-systemd-234-orig/systemd/test/test_journal.py 2017-03-26 03:33:59.000000000 +0200 ++++ python-systemd-234/systemd/test/test_journal.py 2017-06-26 11:15:19.961627278 +0200 +@@ -215,12 +215,12 @@ + j.this_boot(TEST_MID) + j.this_boot(TEST_MID.hex) + +-def test_reader_this_machine(tmpdir): +- j = journal.Reader(path=tmpdir.strpath) +- with j: +- j.this_machine() +- j.this_machine(TEST_MID) +- j.this_machine(TEST_MID.hex) ++#def test_reader_this_machine(tmpdir): ++# j = journal.Reader(path=tmpdir.strpath) ++# with j: ++# j.this_machine() ++# j.this_machine(TEST_MID) ++# j.this_machine(TEST_MID.hex) + + def test_reader_query_unique(tmpdir): + j = journal.Reader(path=tmpdir.strpath) diff --git a/python-systemd-233.tar.gz b/python-systemd-233.tar.gz deleted file mode 100644 index 49edc83..0000000 --- a/python-systemd-233.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:efb5c440d7ca05ce1fce48c14508177c0002663ea933e16eaf88105f1ad8dfe7 -size 49680 diff --git a/python-systemd-234.tar.gz b/python-systemd-234.tar.gz new file mode 100644 index 0000000..86574d3 --- /dev/null +++ b/python-systemd-234.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1037e6a92762be500a40e97bade0e2f2306e00a31a39361c5dbe99ab50eb3b93 +size 53900 diff --git a/python-systemd.changes b/python-systemd.changes index 2a6601e..cd65e9f 100644 --- a/python-systemd.changes +++ b/python-systemd.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Mon Jun 26 09:17:01 UTC 2017 - jweberhofer@weberhofer.at + +- exclude-tests-on-obs.patch: Exclude test which fail because of + a bug in the OBS: https://github.com/openSUSE/obs-build/pull/351 + +- Upgrade to release 234 + * _daemon,_reader: return ENOSYS instead of NotImplemented + * _daemon: allow specifying flowinfo + * Added section for installation on openSUSE & SLE + * Adjust import order, spacing, operators as recommended by pylint + * build-sys: add sign and upload targets + * daemon: add basic support for sd_is_socket_sockaddr + * daemon: add wrapper for sd_is_socket_sockaddr and tests + * daemon: properly skip sd_is_socket_sockaddr calls if not available + * Fix handling of addresses without port and add tests + * Fix styling to match PEP8 in most places + * Improve test skipping on old systems + * Include all fields from record + * journal: do not convert extra args to string in JournalHandler + * journal: fix repr of JournalHandler to match python3.6 + * journal: improve docstring formatting a bit + * journal: rename SENDER_FUNCTION to sender_function + * Makefile: add "doc" target for convenience + * Makefile: add convenience "shell" target to start python shell + * Makefile: remove unneeded -I/usr/include from flags + * Makefile: use $(INCLUDE_DIR) also for compilation + * Prevent non-str values from being concatenated with + + * Python 3.6 invalid escape sequence deprecation fixes + * Remove mid from JournalHandler + * replace dict.iteritems() with dict.items() to support py3 + * setup.py: allow LIBSYSTEMD_VERSION to be overridden + * test_daemon: xfail test_notify_with_socket if bind() fails + * test_journal: add tests for MESSAGE_ID passing + * tests: move login tests from doctest to separate file + * tests: skip journal.stream tests on ENOENT error + * Update to constants from systemd-233 + * util: add compatibility for old glibc + ------------------------------------------------------------------- Mon Jun 12 05:34:47 UTC 2017 - fbui@suse.com diff --git a/python-systemd.spec b/python-systemd.spec index 472cbaf..3b5b6ca 100644 --- a/python-systemd.spec +++ b/python-systemd.spec @@ -17,13 +17,15 @@ Name: python-systemd -Version: 233 +Version: 234 Release: 0 Summary: Python wrappers for systemd functionality License: LGPL-2.1+ Group: Development/Languages/Python Url: https://github.com/systemd/python-systemd Source: https://github.com/systemd/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-OPENSUSE exclude-tests-on-obs.patch removes a test when running tests at OBS. Should be removed as soon as OBS is fixed +Patch100: exclude-tests-on-obs.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -35,9 +37,10 @@ BuildRequires: systemd-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %package doc -Summary: Documentation for %name +Summary: Documentation for python-systemd +# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines" Group: Documentation -Requires: %name = %version +Requires: %{name} = %{version} %description Python module for native access to the systemd facilities. Functionality is seperated into a number of modules: @@ -47,24 +50,23 @@ Python module for native access to the systemd facilities. Functionality is sepe * systemd.login wraps parts of libsystemd used to query logged in users and available seats and machines. %description doc -Documentation and help files for %name +Documentation and help files for python-systemd. %prep %setup -q +%patch100 -p1 %build make %{?_smp_mflags} build -make sphinx-html -%{__rm} -r build/html/.buildinfo build/html/.doctrees build/html/_sources +make %{?_smp_mflags} sphinx-html +rm -r build/html/.buildinfo build/html/.doctrees build/html/_sources %install %make_install %fdupes %{buildroot}/%{python_sitearch} %check -# run doc-tests only when socket is available -test -f /run/systemd/journal/stdout || sed -i 's/--doctest[^ ]*//g' pytest.ini -make %{?_smp_mflags} check || : +make %{?_smp_mflags} check %files %defattr(-,root,root,-) @@ -72,6 +74,7 @@ make %{?_smp_mflags} check || : %{python_sitearch}/* %files doc +%defattr(-,root,root) %doc build/html %changelog