From 2da924d7a5b403af5976a440fcfa759abcfb52e570e91e99a282776f7607faae Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 20 Oct 2019 07:48:05 +0000 Subject: [PATCH] Accepting request 737621 from home:munix9 - update to version 0.5 - modernize for Python 2 and 3 compatibility OBS-URL: https://build.opensuse.org/request/show/737621 OBS-URL: https://build.opensuse.org/package/show/Base:System/withlock?expand=0&rev=11 --- fix-use-python3.patch | 8 ++++++++ withlock-0.4.tar.gz | 3 --- withlock-0.5.tar.gz | 3 +++ withlock.changes | 8 ++++++++ withlock.spec | 31 +++++++++++++++---------------- 5 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 fix-use-python3.patch delete mode 100644 withlock-0.4.tar.gz create mode 100644 withlock-0.5.tar.gz diff --git a/fix-use-python3.patch b/fix-use-python3.patch new file mode 100644 index 0000000..c96e0de --- /dev/null +++ b/fix-use-python3.patch @@ -0,0 +1,8 @@ +--- a/withlock ++++ b/withlock +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # Copyright 2009-2016 Peter Poeml + # diff --git a/withlock-0.4.tar.gz b/withlock-0.4.tar.gz deleted file mode 100644 index 1c5946b..0000000 --- a/withlock-0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f2a83a3646742a1a6d85d829853b3a352d50cf42bf9d54fbb53dac757651655 -size 12314 diff --git a/withlock-0.5.tar.gz b/withlock-0.5.tar.gz new file mode 100644 index 0000000..bbb563d --- /dev/null +++ b/withlock-0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c566f414ec7179801f78aaf4381f550cb66a167ba72c7c7e67e1fc46789662f1 +size 12688 diff --git a/withlock.changes b/withlock.changes index 5aaf4bf..7acce5b 100644 --- a/withlock.changes +++ b/withlock.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 3 08:54:21 UTC 2019 - munix9@googlemail.com + +- update to version 0.5 +- modernize for Python 2 and 3 compatibility + thanks to Patch by Jan Beran jberan|redhat.com + (2.7 or newer; 0.4 for Python 2.4+2.5 is archived in attic/) + ------------------------------------------------------------------- Mon Jun 15 00:27:25 UTC 2015 - poeml@cmdline.net diff --git a/withlock.spec b/withlock.spec index a742e54..7dbb08f 100644 --- a/withlock.spec +++ b/withlock.spec @@ -1,7 +1,7 @@ # # spec file for package withlock # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,20 +12,20 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: withlock -Version: 0.4 +Version: 0.5 Release: 0 Summary: A locking wrapper script License: Apache-2.0 Group: System/Management -Url: https://github.com/poeml/withlock -Requires: python -Source0: http://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: https://github.com/poeml/withlock +Source0: https://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz +Patch0: fix-use-python3.patch +Requires: python3 BuildArch: noarch %description @@ -38,20 +38,19 @@ never require a cleanup, as after a reboot. Thus, the wrapper is safe and easy to use, and much better than implementing half-hearted locking within scripts. %prep -%setup +%autosetup -p1 %build -# -%install -make DESTDIR=%{buildroot} prefix=%{_prefix} install +# nop -%clean -rm -rf %{buildroot} +%install +install -D -m 0755 -t %{buildroot}%{_bindir}/ %{name} +install -D -m 0644 -t %{buildroot}%{_mandir}/man1/ %{name}.1 %files -%defattr(-, root, root) -%doc %{_defaultdocdir}/%{name} +%license LICENSE-2.0.txt +%doc README.md withlock.1.html %{_bindir}/%{name} -%doc %{_mandir}/man1/* +%{_mandir}/man1/%{name}.1%{?ext_man} %changelog