commit 44aa33e158172afb4bbde90679110d1e7a9e55b07ddb24203d78f2a129fe0708 Author: Tomáš Chvátal Date: Tue Aug 11 07:52:25 2020 +0000 - Add patch to disable test failing in sandbox: https://github.com/seveas/python-prctl/issues/17 * disable-sandboxed-test.patch - Initial commit jsc#SLE-13272 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-prctl?expand=0&rev=1 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/COPYING b/COPYING new file mode 100644 index 0000000..8509827 --- /dev/null +++ b/COPYING @@ -0,0 +1,41 @@ +python-prctl - A python(ic) interface to the prctl syscall +Copyright (C) 2010-2018 Dennis Kaarsemaker + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +--------------------------------------------------------------------- + +The documentation is heavily based on the linux manpages prctl and +capabilities, which is covered by the following license: + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one + +Since the Linux kernel and libraries are constantly changing, this +manual page may be incorrect or out-of-date. The author(s) assume no +responsibility for errors or omissions, or for damages resulting from +the use of the information contained herein. The author(s) may not +have taken the same level of care in the production of this manual, +which is licensed free of charge, as they might when working +professionally. + +Formatted or processed versions of this manual, if unaccompanied by +the source, must acknowledge the copyright and authors of this work. +License. diff --git a/disable-sandboxed-test.patch b/disable-sandboxed-test.patch new file mode 100644 index 0000000..e274f6b --- /dev/null +++ b/disable-sandboxed-test.patch @@ -0,0 +1,12 @@ +Index: python-prctl-1.7/test_prctl.py +=================================================================== +--- python-prctl-1.7.orig/test_prctl.py ++++ python-prctl-1.7/test_prctl.py +@@ -189,6 +189,7 @@ class PrctlTest(unittest.TestCase): + self.assertNotEqual(sp.returncode, 0) + os._exit(0) + ++ @unittest.skip('borked in sandbox') + def test_proctitle(self): + """Test setting the process title, including too long titles""" + title = "This is a test!" diff --git a/python-prctl-1.7.tar.gz b/python-prctl-1.7.tar.gz new file mode 100644 index 0000000..7d9693c --- /dev/null +++ b/python-prctl-1.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57ebd556616d6ffe1f794f514680e84a03737cb070de37722198d7ad6c8f4fda +size 24716 diff --git a/python-python-prctl.changes b/python-python-prctl.changes new file mode 100644 index 0000000..44c205c --- /dev/null +++ b/python-python-prctl.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 11 07:51:14 UTC 2020 - Tomáš Chvátal + +- Add patch to disable test failing in sandbox: + https://github.com/seveas/python-prctl/issues/17 + * disable-sandboxed-test.patch + +------------------------------------------------------------------- +Tue Aug 11 07:37:51 UTC 2020 - Tomáš Chvátal + +- Initial commit jsc#SLE-13272 diff --git a/python-python-prctl.spec b/python-python-prctl.spec new file mode 100644 index 0000000..e31e380 --- /dev/null +++ b/python-python-prctl.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-python-prctl +# +# Copyright (c) 2020 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-python-prctl +Version: 1.7 +Release: 0 +Summary: Python(ic) interface to the linux prctl syscall +License: GPL-3.0-or-later +URL: https://github.com/seveas/python-prctl +Source: https://files.pythonhosted.org/packages/source/p/python-prctl/python-prctl-%{version}.tar.gz +Source99: https://raw.githubusercontent.com/seveas/python-prctl/master/COPYING +Patch0: disable-sandboxed-test.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: iputils +BuildRequires: pkgconfig +BuildRequires: procps +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(libcap) +%python_subpackages + +%description +The linux prctl function allows you to control specific characteristics of a +process' behaviour. Usage of the function is fairly messy though, due to +limitations in C and linux. This module provides a nice non-messy python(ic) +interface. + +Besides prctl, this library also wraps libcap for complete capability handling +and allows you to set the process name as seen in ps and top. + +%prep +%setup -q -n python-prctl-%{version} +%patch0 -p1 +cp %{SOURCE99} . + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m unittest discover -v + +%files %{python_files} +%license COPYING +%doc README +%{python_sitearch}/* + +%changelog