From 10e1b2e2c0c4df0e13b63325ca118ac3e4293bf082a47aea9ced8c679307ce78 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 16 Sep 2024 14:19:04 +0000 Subject: [PATCH] - Revert to 3.0.1. Version 3.0.2 was yanked from pypi because it breaks setuptools (https://pagure.io/python-daemon/issue/94, https://pypi.org/project/python-daemon/3.0.2/) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-daemon?expand=0&rev=46 --- .gitattributes | 23 ++ .gitignore | 1 + explicit-packaging.patch | 76 +++++++ python-daemon-3.0.1.tar.gz | 3 + python-python-daemon.changes | 400 +++++++++++++++++++++++++++++++++++ python-python-daemon.spec | 77 +++++++ python_daemon-3.0.2.tar.gz | 3 + 7 files changed, 583 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 explicit-packaging.patch create mode 100644 python-daemon-3.0.1.tar.gz create mode 100644 python-python-daemon.changes create mode 100644 python-python-daemon.spec create mode 100644 python_daemon-3.0.2.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/explicit-packaging.patch b/explicit-packaging.patch new file mode 100644 index 0000000..c5a9a9d --- /dev/null +++ b/explicit-packaging.patch @@ -0,0 +1,76 @@ +Index: python-daemon-3.0.1/pyproject.toml +=================================================================== +--- python-daemon-3.0.1.orig/pyproject.toml ++++ python-daemon-3.0.1/pyproject.toml +@@ -10,7 +10,9 @@ + # Minimum requirements for the build system. + requires = [ + "setuptools >=62.4.0", +- "docutils"] ++ "packaging", ++ "docutils", ++ ] + + # Path to the Python object to perform the build. + build-backend = "setuptools.build_meta" +Index: python-daemon-3.0.1/setup.py +=================================================================== +--- python-daemon-3.0.1.orig/setup.py ++++ python-daemon-3.0.1/setup.py +@@ -60,10 +60,13 @@ setup_kwargs = dict( + zip_safe=False, + setup_requires=[ + "docutils", ++ "setuptools", ++ "packaging", + ], + install_requires=[ + "setuptools >=62.4.0", + "lockfile >=0.10", ++ "packaging", + ], + python_requires=">=3", + extras_require={ +Index: python-daemon-3.0.1/test_version.py +=================================================================== +--- python-daemon-3.0.1.orig/test_version.py ++++ python-daemon-3.0.1/test_version.py +@@ -20,10 +20,10 @@ import unittest.mock + import docutils + import docutils.nodes + import docutils.writers ++from packaging.version import InvalidVersion + import setuptools + import setuptools.command + import setuptools.dist +-from setuptools.extern.packaging.version import InvalidVersion + import testscenarios + import testtools + +Index: python-daemon-3.0.1/version.py +=================================================================== +--- python-daemon-3.0.1.orig/version.py ++++ python-daemon-3.0.1/version.py +@@ -31,12 +31,12 @@ import re + import sys + import textwrap + ++import packaging.version + import setuptools + import setuptools.command.build + import setuptools.command.build_py + import setuptools.command.egg_info + import setuptools.dist +-import setuptools.extern.packaging.version + + + def ensure_class_bases_begin_with(namespace, class_name, base_class): +@@ -186,7 +186,7 @@ class ChangeLogEntry: + # A valid non-version value. + return None + +- valid_version = setuptools.extern.packaging.version.Version(value) ++ valid_version = packaging.version.Version(value) + + @classmethod + def validate_maintainer(cls, value): diff --git a/python-daemon-3.0.1.tar.gz b/python-daemon-3.0.1.tar.gz new file mode 100644 index 0000000..2a7a672 --- /dev/null +++ b/python-daemon-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c57452372f7eaff40934a1c03ad1826bf5e793558e87fef49131e6464b4dae5 +size 81337 diff --git a/python-python-daemon.changes b/python-python-daemon.changes new file mode 100644 index 0000000..df01592 --- /dev/null +++ b/python-python-daemon.changes @@ -0,0 +1,400 @@ +------------------------------------------------------------------- +Mon Sep 16 14:17:18 UTC 2024 - Daniel Garcia + +- Revert to 3.0.1. Version 3.0.2 was yanked from pypi because it + breaks setuptools + (https://pagure.io/python-daemon/issue/94, https://pypi.org/project/python-daemon/3.0.2/) + +------------------------------------------------------------------- +Fri Aug 30 04:49:41 UTC 2024 - Steve Kowalik + +- Upate to 3.0.2: + * Migrate to use the explicitly-maintained ‘packaging’ library. + * Clarify copyright and grants of license. + * Migrate to PEP 517 simple build system for Python distribution. + * Remove dynamically-constructed non-standard metadata attributes. +- Switch to pagure source URL. + +------------------------------------------------------------------- +Fri Dec 15 21:27:04 UTC 2023 - Dirk Müller + +- update to 3.0.1: + * Declare dependency on Setuptools >= 62.4.0. + * Refactor calculation of file descriptor ranges to close. + * When the range of candidate file descriptors is very large, + the code that computes file descriptors to close when the + daemon starts attempted to allocate a large amount of memory + and took a long time to compute. + * Document a `ServiceRunner` class as an example of using + `DaemonContext`. + * Raise a TypeError if any `exclude` values are not valid file + descriptors. + * Remove the obsolete `runner` module. + This module was deprecated starting in `python-daemon` + version 2.1.2, and is now removed as unmaintained. + +------------------------------------------------------------------- +Fri May 5 11:05:56 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Fri Oct 28 20:27:24 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 2.3.2 + Bugs Fixed: + * Declare Twine as a development dependency (not a build dependency). + Closes: Pagure #55. Thanks to Jason Andryuk for the report. + Thanks to James Hilliard for the implementation. + * Specify to build a wheel distribution for only Python 3 or later. + * Specify the built package requires Python 3 or later. + Closes: Pagure #66. Thanks to Nick M. for the report and implementation. + Removed: + * The earlier version 2.3.1 is now “yanked” from PyPI (unlisted and not an + installation candidate), because that version incorrectly permitted + installation on Python 2. Thanks to Nick M. for the report. + +------------------------------------------------------------------- +Sat Oct 1 17:17:04 UTC 2022 - Dirk Müller + +- update to 2.3.1: + * Avoid operations on a closed stream file when detecting a socket. + * Correct use of names to allow `from daemon import *`. + Changed: + * Speed daemon start time by computing candidate file descriptors once. + * Remove incorrect double-patch of objects in test cases. + * Deprecate helper function `is_socket`. + * Drop backward-compatible helpers that provided Python 2 support. + * declaration of source encoding ‘utf-8’ + * absolute_import + * unicode_literals + * module-level metaclass `type` + * unification of str with unicode type + * renamed standard library exceptions and modules + * raise exception from context exception + All these are default behaviour in Python 3 and need no special + handling. +- drop remove_safe_hasattr.patch, remove_double_patch.patch (upstream) + +------------------------------------------------------------------- +Sat Mar 19 08:26:41 UTC 2022 - ecsos + +- Add missing BuildRequires python-importlib_resources + to fix build error in leap. + +------------------------------------------------------------------- +Thu Jan 13 12:30:48 UTC 2022 - Matej Cepl + +- Add remove_double_patch.patch and remove_safe_hasattr.patch to + fix https://pagure.io/python-daemon/issue/53 +- Remove pytest as the test runner (apparently, the package + requires python3 -munittest discovery). + +------------------------------------------------------------------- +Thu Apr 22 19:48:54 UTC 2021 - Dirk Müller + +- update to 2.3.0: + * Remove support for Python versions older than Python 3. + Python 2 has been unsupported by the Python project since 2020. + * Remove dependency on back-ported `unittest2` and `mock`. + Depend instead on standard library `unittest` and `unittest.mock`. + +------------------------------------------------------------------- +Thu Feb 4 16:56:17 UTC 2021 - Matej Cepl + +- Switch off running of the test suite + (https://pagure.io/python-daemon/issue/53). + +------------------------------------------------------------------- +Fri Feb 28 21:41:00 UTC 2020 - Dirk Mueller + +- update to 2.2.4: + * Run the Setuptools `egg-info` command as part of the `build` + command. + * Create the socket and catch “non-socket” errors. + * Only deal with a range of file descriptors if the range is not empty. + * Declare Twine as a build dependency. + * Reformat the change log entries with keepachangelog.com sub-sections. + +------------------------------------------------------------------- +Tue May 14 20:34:45 UTC 2019 - Jonathan + +- Skip broken test + +------------------------------------------------------------------- +Wed Apr 24 11:01:35 CEST 2019 - Matej Cepl + +- Rebuild for jsc#SLE-5706 to be sent to SUSE:SLE-12-SP5:GA. + +------------------------------------------------------------------- +Thu Mar 21 18:40:39 UTC 2019 - John Vandenberg + +- Add missing GPL license file +- Add README to %doc +- Drop extra 'doc' subdirectory under %doc +- Remove docutils from installed egg-info + +------------------------------------------------------------------- +Thu Mar 21 14:39:49 UTC 2019 - John Vandenberg + +- Remove unnecessary dependency on python-devel +- Remove unnecessary runtime dependency on docutils +- Update URL to https://pagure.io/python-daemon/ +- Update to v2.2.3 + * Use custom fake file type for testing `fileno` behaviour. + This works around an incompatibility in Python 2.7 `file` type that + caused test cases to fail. + * Promote the warning for `runner` module to a `DeprecationWarning`. + This has been an unofficial example module from the beginning, and + it will be removed in a future version. +- from v2.2.2 + * Remove from the build system specification a white space character + not permitted in TOML format. + * Implement test suite automation in virtualenvs, using Tox. +- from v2.2.1 + * Add a :PEP:`518` conformant build system specification (the + ``pyproject.toml`` file). +- from v2.2.0 + * Correct the description of the return value for + `daemon.is_detach_process_context_required`. + * Set a sensible default for `Distribution.script_name`. + This works around a bug in Setuptools which calls commands before + the `Distribution` is initialised. + * The test suite now relies on the test discovery feature in + ‘unittest’. This feature is in Python version 2.7 and later. + * Improve performance of `daemon.close_all_open_files`. + +------------------------------------------------------------------- +Mon Aug 13 13:30:40 UTC 2018 - mcepl@suse.com + +- Remove dependency on unittest2 + +------------------------------------------------------------------- +Tue Oct 10 13:18:27 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion +- update requirements +- use pytest as test runner +- update to 2.1.2 + * Ensure custom types are part of the Python type hierarchy. + * Raise a warning that the ‘runner’ module is pending deprecation. + This has been an unofficial example module from the beginning, and + it will be removed in a future version. + +------------------------------------------------------------------- +Mon Feb 1 10:41:01 UTC 2016 - michael@stroeder.com + +- update to 2.1.1 + * Default ‘initgroups’ option to False. Using ‘os.initgroups’ requires + permission to set process GID, so this now needs to be explicitly + requested. + +------------------------------------------------------------------- +Mon Dec 7 22:37:30 UTC 2015 - tbechtold@suse.com + +- update to 2.1.0: + * Add a DaemonContext option, ‘initgroups’, which specifies whether to + set the daemon process's supplementary groups. + * Set the process groups using ‘os.initgroups’. + Thanks to Malcolm Purvis for contributing an implementation of this + feature. + +------------------------------------------------------------------- +Thu Sep 3 14:17:06 UTC 2015 - toddrme2178@gmail.com + +- Update to 2.0.6 + * Lower dependency for unittest2, we can work with an earlier version. + * Specify development status Production/Stable in Trove classifiers. + * Migrate to mock version 1.3 with corresponding API changes. + * Use current Python concept of basestring to test for an attribute name. + +------------------------------------------------------------------- +Tue May 26 12:22:44 UTC 2015 - jkeil@suse.com + +- Fix License issue + +------------------------------------------------------------------- +Tue May 12 11:38:14 UTC 2015 - benoit.monin@gmx.fr + +- update to version 2.0.5: + * Refine compatibility of exceptions for file operations. + * Specify the text encoding when opening the changelog file. +- additional changes from version 2.0.4 + * Record version info via Setuptools commands. + * Remove the custom Setuptools entry points. This closes Alioth + bug#314948. +- additional changes from version 2.0.3 + * Break circular import dependency for ‘setup.py’. + * Refactor all initial metadata functionality to + ‘daemon._metadata’. + * Distribute ‘version’ (and its tests) only in source, not + install. + * Build a “universal” (Python 2 and Python 3) wheel. +- additional changes from version 2.0.2 + * Declare test-time dependency on recent ‘unittest2’. + * Declare packaging-time dependency on ‘docutils’ library. + * Include unit tests for ‘version’ module with source + distribution. + * Record version info consistent with distribution metadata. +- additional changes from version 2.0.1 + * Include the ‘version’ module with source distribution. +- additional changes from version 2.0 + * Support both Python 3 (version 3.2 or later) and Python 2 + (version 2.7 or later). + * Document the API of all functions comprehensively in docstrings. + * Add a hacking guide for developers. + * Add explicit credit for contributors. + * Document the security impact of the default umask. + * Specify explicit text or binary mode when opening files. + * Preserve exception context in custom exceptions. + * Declare compatibility with current Python versions. + * Depend on Python 3 compatible libraries. + * Update package homepage to Alioth hosted project page. + * Use ‘pydoc.splitdoc’ to get package description text. + * Remove ASCII translation of package description, not needed now + the docstring is a proper Unicode text value. + * Include test suite with source distribution. + * Move package metadata to ‘daemon/_metadata.py’. + * Migrate to JSON (instead of Python) for serialised version info. + * Add unit tests for metadata. + * Store and retrieve version info in Setuptools metadata. + * Migrate to ‘str.format’ for interpolation of values into text. + * Migrate to ‘mock’ library for mock objects in tests. + * Migrate to ‘testscenarios’ library for unit test scenarios. + * Migrate to ‘unittest2’ library for back-ported improvements. + Remove custom test suite creation. + * Discriminate Python 2-and-3 compatible usage of dict methods. + * Discriminate Python 2-and-3 compatible bytes versus text. + * Declare explicit absolute and relative imports. + * Discriminate between different ‘fileno’ method behaviours. In + Python 3, ‘StringIO.fileno’ is callable but raises an exception. + * Migrate to built-in ‘next’ function. + * Wrap the ‘fromlist’ parameter of ‘__import__’ for Python 3 + compatibility. + * Wrap function introspection for Python 3 compatibility. + * Wrap standard library imports where names changed in Python 3. +- additional changes from version 1.6.1 + * Use unambiguous “except FooType as foo” syntax. This is to ease + the port to Python 3, where the ambiguous comma usage is an + error. + * Ensure a ‘basestring’ name bound to the base type for strings. + This is to allow checks to work on Python 2 and 3. + * Specify versions of Python supported, as trove classifiers. + * Update copyright notices. + * Add editor hints for most files. + * Distinguish continuation-line indentation versus block + indentation. + * Use unicode literals by default, specifying bytes where + necessary. This is to ease the port to Python 3, where the + default string type is unicode. + * Update copyright notices. + * Update the GPL license file to version 3, as declared in our + copyright notices. + * Change license of library code to Apache License 2.0. +- additional changes from version 1.6 + * Use absolute imports to disambiguate provenance of names. + * setup.py: Require ‘lockfile >=0.9’. + * daemon/pidfile.py: Renamed from ‘daemon/pidlockfile.py’. Change + references elsewhere to use this new name. + * test/test_pidfile.py: Renamed from ‘test/test_pidlockfile.py’. + Change references elsewhere to use this new name. + * daemon/pidfile.py: Remove functionality now migrated to + ‘lockfile’ library. + * FAQ: Add some entries and re-structure the document. + * Use ‘unicode’ data type for all text values. + * Prepare for Python 3 upgrade by tweaking some names and imports. + * MANIFEST.in: Include the documentation in the distribution. +- update package license: changed upstream to apache-2.0 +- point the source URL to pypi +- set a minimum version for python-devel +- remove python-MiniMock from build dependencies +- add python-docutils, python-mock, python-testscenarios, + python-testtools, python-unittest2 as test dependencies +- set a minimum version for python-lockfile +- remove sed call to fix non-executable script: fixed upstream +- run the test during build +- add LICENSE.ASF-2 and doc to package documentation + +------------------------------------------------------------------- +Thu Oct 24 11:12:38 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Fri Nov 23 14:03:24 UTC 2012 - saschpe@suse.de + +- Correctly provide/obsolete python-daemon +- Spec file cleanup + +------------------------------------------------------------------- +Wed Apr 18 09:00:59 UTC 2012 - bwiedemann@suse.com + +- BuildRequire lowercase python-minimock +- to also work with the existing 11.4 package + +------------------------------------------------------------------- +Thu Jan 5 13:25:37 UTC 2012 - jmatejek@suse.com + +- reverted to 1.5.5 (per bnc#731071 and Debian bug #585404, + upstream has retracted version 1.6 due to brokenness) +- updated license header + +------------------------------------------------------------------- +Thu Nov 24 13:21:10 UTC 2011 - idoenmez@suse.de + +- Add Provides for the old python-daemon name + +------------------------------------------------------------------- +Tue Sep 20 14:54:32 UTC 2011 - saschpe@suse.de + +- Changed BuildRequires python-minimock to python-MiniMock +- Removed %clean section and some other useless stuff + +------------------------------------------------------------------- +Mon May 30 15:34:01 UTC 2011 - alexandre@exatati.com.br + +- Copypac from python-daemon to python-python-daemon. + +------------------------------------------------------------------- +Fri Apr 15 23:49:04 UTC 2011 - alexandre@exatati.com.br + +- Regenerate spec filw with py2pack; +- Bzip2 source file; +- Add ChangeLog file as documentation. + +------------------------------------------------------------------- +Tue May 11 00:37:27 UTC 2010 - alexandre@exatati.com.br + +- Update to 1.6; +- Spec file cleaned with spec-cleaner. + +------------------------------------------------------------------- +Tue Mar 2 16:56:49 UTC 2010 - alexandre@exatati.com.br + +- Update to 1.5.5. + +------------------------------------------------------------------- +Sat Feb 27 20:45:03 UTC 2010 - alexandre@exatati.com.br + +- Update to 1.5.4. + +------------------------------------------------------------------- +Mon Oct 26 09:58:12 UTC 2009 - alexandre@exatati.com.br + +- Update to 1.5.2. + +------------------------------------------------------------------- +Sat Sep 26 17:54:11 UTC 2009 - alexandre@exatati.com.br + +- Update to 1.5.1. + +------------------------------------------------------------------- +Thu Sep 24 14:35:04 UTC 2009 - alexandre@exatati.com.br + +- Moved to the correct python-daemon module. + +------------------------------------------------------------------- +Tue Sep 22 14:19:09 UTC 2009 - alexandre@exatati.com.br + +- Initial package (1.0.1) for openSUSE. + diff --git a/python-python-daemon.spec b/python-python-daemon.spec new file mode 100644 index 0000000..699185c --- /dev/null +++ b/python-python-daemon.spec @@ -0,0 +1,77 @@ +# +# spec file for package python-python-daemon +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-python-daemon +Version: 3.0.1 +Release: 0 +Summary: Library to implement a well-behaved Unix daemon process +License: Apache-2.0 AND GPL-3.0-only +URL: https://pagure.io/python-daemon/ +Source: https://files.pythonhosted.org/packages/source/p/python-daemon/python-daemon-%{version}.tar.gz +# Available since 3.0.2, that was yanked because of https://pagure.io/python-daemon/issue/94 +# Source: https://releases.pagure.org/python-daemon/python_daemon-%{version}.tar.gz +# PATCH-FIX-UPSTREAM explicit-packaging.patch https://pagure.io/python-daemon/c/d7bac6e +Patch0: explicit-packaging.patch +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module lockfile >= 0.10} +BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module testscenarios >= 0.4} +BuildRequires: %{python_module testtools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-lockfile >= 0.10 +Requires: python-packaging +Requires: python-setuptools >= 62.4.0 +BuildArch: noarch +%python_subpackages + +%description +This library implements the well-behaved daemon specification of PEP 3143, +"Standard daemon process library". + +A well-behaved Unix daemon process is tricky to get right, but the required +steps are much the same for every daemon program. A DaemonContext instance +holds the behaviour and configured process environment for the program; use the +instance as a context manager to enter a daemon state. + +%prep +%autosetup -p1 -n python-daemon-%{version} + +sed -i '/docutils/d' setup.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest discover -v + +%files %{python_files} +%license LICENSE.ASF-2 LICENSE.GPL-3 +%doc README ChangeLog doc/* +%{python_sitelib}/daemon +%{python_sitelib}/python_daemon-%{version}*-info + +%changelog diff --git a/python_daemon-3.0.2.tar.gz b/python_daemon-3.0.2.tar.gz new file mode 100644 index 0000000..83565b4 --- /dev/null +++ b/python_daemon-3.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47027e6bf9b3685f31201f7bdd6dc6248713cd666267addf2b2efe0aa66a2b31 +size 70925