From cf13cc050d8bccb4979d9c4a192fd4be4bb97b50fb838c92dc801af32d6ec7fc Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 14 Jul 2021 14:55:54 +0000 Subject: [PATCH] Accepting request 906240 from home:Marcus_H Hi, I would like to maintain the python-keyring-keyutils [1] package in factory. For this, I need a devel project. I think the devel:languages:python project is a suitable choice:) Very brief summary of the package (high-level POV): - a python-keyring backend for the kernel keyring - a special python-keyring backend that can be used by osc (so that osc stores the user's credentials in the kernel keyring) [1] https://github.com/marcus-h/python-keyring-keyutils OBS-URL: https://build.opensuse.org/request/show/906240 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-keyring-keyutils?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + keyring-keyutils-0.1.1.tar.gz | 3 ++ python-keyring-keyutils.changes | 4 ++ python-keyring-keyutils.spec | 82 +++++++++++++++++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 keyring-keyutils-0.1.1.tar.gz create mode 100644 python-keyring-keyutils.changes create mode 100644 python-keyring-keyutils.spec 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/keyring-keyutils-0.1.1.tar.gz b/keyring-keyutils-0.1.1.tar.gz new file mode 100644 index 0000000..2108c0d --- /dev/null +++ b/keyring-keyutils-0.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55add9e3d8fae677cef62b3e3f951991fb87ae9c20d78a2f51003d444b07e2c5 +size 15192 diff --git a/python-keyring-keyutils.changes b/python-keyring-keyutils.changes new file mode 100644 index 0000000..394a37f --- /dev/null +++ b/python-keyring-keyutils.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Jul 13 22:33:07 UTC 2021 - Marcus Hüwe + +- initial version 0.1.1 diff --git a/python-keyring-keyutils.spec b/python-keyring-keyutils.spec new file mode 100644 index 0000000..fd6fad1 --- /dev/null +++ b/python-keyring-keyutils.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-keyring-keyutils +# +# Copyright (c) 2021 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/ +# + + +# python2 is not supported +%define skip_python2 1 + +Name: python-keyring-keyutils +Version: 0.1.1 +Release: 0 +Summary: A python-keyring backend for the kernel keyring +License: MIT +URL: https://github.com/marcus-h/python-keyring-keyutils +Source: keyring-keyutils-%{version}.tar.gz + +BuildRequires: %{python_module devel} +BuildRequires: %{python_module keyring} +BuildRequires: %{python_module pytest} +BuildRequires: fdupes +BuildRequires: keyutils-devel +BuildRequires: python-rpm-macros + +%python_subpackages + +%description +A python-keyring [1] backend that can be used to access the kernel +keyring. In particular, this package ships + +- a python-keyring [1] backend for the kernel keyring +- a special python-keyring backend that can be used by osc +- a high-level interface to the kernel keyring +- a low-level module that wraps around the C keyutils library [2] + +[1] https://github.com/jaraco/keyring +[2] https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git + +%prep +%setup -q -n keyring-keyutils-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +# The test_key_too_large_serial testcase only makes sense if int32_t and long +# have different ranges of values +cat > skip_test_key_too_large_serial.c <<'EOF' +#include + +int main(void) { + return sizeof(int32_t) != sizeof(long); +} +EOF +gcc -Wall -o skip_test_key_too_large_serial skip_test_key_too_large_serial.c + +./skip_test_key_too_large_serial && SKIP=(-k 'not test_key_too_large_serial') +%pytest_arch "${SKIP[@]}" tests + +%files %{python_files} +%doc README.md README_osc.md +%license LICENSE +%{python_sitearch}/keyutils +%{python_sitearch}/keyring_keyutils-%{version}-py*.egg-info + +%changelog