commit withlock for openSUSE:Factory

2020-09-01 Thread root
Hello community,

here is the log from the commit of package withlock for openSUSE:Factory 
checked in at 2020-09-01 20:08:51

Comparing /work/SRC/openSUSE:Factory/withlock (Old)
 and  /work/SRC/openSUSE:Factory/.withlock.new.3399 (New)


Package is "withlock"

Tue Sep  1 20:08:51 2020 rev:9 rq:830850 version:0.5

Changes:

--- /work/SRC/openSUSE:Factory/withlock/withlock.changes2015-06-15 
17:50:59.0 +0200
+++ /work/SRC/openSUSE:Factory/.withlock.new.3399/withlock.changes  
2020-09-01 20:09:37.388655686 +0200
@@ -1,0 +2,9 @@
+Thu Oct  3 08:54:21 UTC 2019 - mun...@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/)
+  Added: fix-use-python3.patch
+
+---

Old:

  withlock-0.4.tar.gz

New:

  fix-use-python3.patch
  withlock-0.5.tar.gz



Other differences:
--
++ withlock.spec ++
--- /var/tmp/diff_new_pack.rOWR3h/_old  2020-09-01 20:09:38.560656235 +0200
+++ /var/tmp/diff_new_pack.rOWR3h/_new  2020-09-01 20:09:38.564656237 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package withlock
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# 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
@@ -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:%{name}-%{version}.tar.gz
+Patch0: fix-use-python3.patch
+Requires:   python3
 BuildArch:  noarch
 
 %description
@@ -38,20 +38,19 @@
 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

++ fix-use-python3.patch ++
--- a/withlock
+++ b/withlock
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 # Copyright 2009-2016 Peter Poeml
 # 
++ withlock-0.4.tar.gz -> withlock-0.5.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withlock-0.4/README.md new/withlock-0.5/README.md
--- old/withlock-0.4/README.md  2015-06-15 02:24:25.0 +0200
+++ new/withlock-0.5/README.md  2016-03-02 11:28:46.0 +0100
@@ -134,6 +134,12 @@
 ## Revision history
 
 
+0.5, 2016:
+
+- 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/)
+
 0.4, 2015:
 
 - fix lockfile cleanup (Thanks Martin Caj and Martin Vidner. Good Catch!)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withlock-0.4/attic/python-2.4,2.5/withlock 
new/withlock-0.5/attic/python-2.4,2.5/withlock
--- old/withlock-0.4/attic/python-2.4,2.5/withlock  1970-01-01 
01:00:00.0 +0100
+++ new/withlock-0.5/attic/python-2.4,2.5/withlock  2016-03-02 
11:28:46.0 +0100
@@ -0,0 +1,206 @@
+#!/usr/bin/env python
+
+# Copyright 2009-2015 Peter Poeml
+# 
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+# 
+#http://www.apache.org/licenses/LICENSE-2.0
+# 
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific 

commit withlock for openSUSE:Factory

2015-06-15 Thread h_root
Hello community,

here is the log from the commit of package withlock for openSUSE:Factory 
checked in at 2015-06-15 17:50:57

Comparing /work/SRC/openSUSE:Factory/withlock (Old)
 and  /work/SRC/openSUSE:Factory/.withlock.new (New)


Package is withlock

Changes:

--- /work/SRC/openSUSE:Factory/withlock/withlock.changes2014-08-18 
11:23:53.0 +0200
+++ /work/SRC/openSUSE:Factory/.withlock.new/withlock.changes   2015-06-15 
17:50:59.0 +0200
@@ -1,0 +2,11 @@
+Mon Jun 15 00:27:25 UTC 2015 - po...@cmdline.net
+
+- update to 0.4
+- lockfile cleanup fix upstream (Thanks Martin Caj and Martin Vidner. Good
+  Catch!) (cosmetical bug which didn't affect the locking strategy)
+- man page added
+- license file added
+- use the now provided Makefile
+- moved to github.com
+
+---

Old:

  got-lock.patch
  withlock-0.3.tar.gz
  withlock-README.SuSE

New:

  withlock-0.4.tar.gz



Other differences:
--
++ withlock.spec ++
--- /var/tmp/diff_new_pack.uBTITZ/_old  2015-06-15 17:51:00.0 +0200
+++ /var/tmp/diff_new_pack.uBTITZ/_new  2015-06-15 17:51:00.0 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package withlock
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,17 +17,14 @@
 
 
 Name:   withlock
-Version:0.3
+Version:0.4
 Release:0
 Summary:A locking wrapper script
 License:Apache-2.0
 Group:  System/Management
-Url:http://code.google.com/p/withlock/
+Url:https://github.com/poeml/withlock
 Requires:   python
 Source0:http://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz
-Source1:%name-README.SuSE
-# fixed trouble with not removed lock file bacuse got-lock was not global 
variable.
-Patch0: got-lock.patch
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 BuildArch:  noarch
 
@@ -43,14 +40,10 @@
 %prep
 %setup
 
-%patch0 -p1
-
 %build
 #
 %install
-install -Dm755 withlock %{buildroot}%{_bindir}/%{name}
-install -Dm644 %{SOURCE1} %{buildroot}%{_defaultdocdir}/%{name}/README.SuSE
-sed -i s|/usr/bin/env python|%{_bindir}/python|g 
%{buildroot}%{_bindir}/%{name}
+make DESTDIR=%{buildroot} prefix=%{_prefix} install 
 
 %clean
 rm -rf %{buildroot}
@@ -59,5 +52,6 @@
 %defattr(-, root, root)
 %doc %{_defaultdocdir}/%{name}
 %{_bindir}/%{name}
+%doc %{_mandir}/man1/*
 
 %changelog

++ withlock-0.3.tar.gz - withlock-0.4.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withlock-0.3/LICENSE-2.0.txt 
new/withlock-0.4/LICENSE-2.0.txt
--- old/withlock-0.3/LICENSE-2.0.txt1970-01-01 01:00:00.0 +0100
+++ new/withlock-0.4/LICENSE-2.0.txt2015-06-15 02:24:25.0 +0200
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, 

commit withlock for openSUSE:Factory

2014-08-18 Thread h_root
Hello community,

here is the log from the commit of package withlock for openSUSE:Factory 
checked in at 2014-08-18 11:23:51

Comparing /work/SRC/openSUSE:Factory/withlock (Old)
 and  /work/SRC/openSUSE:Factory/.withlock.new (New)


Package is withlock

Changes:

--- /work/SRC/openSUSE:Factory/withlock/withlock.changes2014-03-26 
16:42:15.0 +0100
+++ /work/SRC/openSUSE:Factory/.withlock.new/withlock.changes   2014-08-18 
11:23:53.0 +0200
@@ -1,0 +2,10 @@
+Thu Aug 14 13:23:11 UTC 2014 - m...@suse.com
+
+- I wrote a patch got-lock.patch to fix the trouble with the got-lock variable.
+  I was testing the withlock and still had there the lock file after a
+  program already end with exit code 0. I have look on the code together
+  with our Python expert mvid...@suse.cz and we found the got-lock variable
+  isn't marked ad global variable.I`ll send this to po...@cmdline.net
+  after we test it on our servers.
+
+---

New:

  got-lock.patch



Other differences:
--
++ withlock.spec ++
--- /var/tmp/diff_new_pack.5sESkQ/_old  2014-08-18 11:23:53.0 +0200
+++ /var/tmp/diff_new_pack.5sESkQ/_new  2014-08-18 11:23:53.0 +0200
@@ -26,6 +26,8 @@
 Requires:   python
 Source0:http://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz
 Source1:%name-README.SuSE
+# fixed trouble with not removed lock file bacuse got-lock was not global 
variable.
+Patch0: got-lock.patch
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 BuildArch:  noarch
 
@@ -40,7 +42,9 @@
 
 %prep
 %setup
-#
+
+%patch0 -p1
+
 %build
 #
 %install

++ got-lock.patch ++
Index: withlock-0.3/withlock
===
--- withlock-0.3.orig/withlock
+++ withlock-0.3/withlock
@@ -64,12 +64,21 @@ for name in 'SIGBREAK', 'SIGHUP', 'SIGTE
 if num: signal.signal(num, catchterm)
 
 
-def cleanup(lockfile):
+def cleanup(lockfile, verbose):
+global got_lock
+if verbose:
+sys.stderr.write('got_lock is set to: %r\n' % got_lock)
+
+if verbose:
+sys.stderr.write('removing lockfile: %r\n' % lockfile)
+
 if got_lock:
 try:
 os.unlink(lockfile)
 except:
 pass
+else:
+sys.stderr.write('the lockfile was not removed !\n')
 
 
 def main():
@@ -132,6 +141,7 @@ def main():
 
 lock = open(lockfile, 'w')
 
+global got_lock
 while 1 + 1 == 2:
 
 try:
@@ -174,7 +184,7 @@ def main():
 % lockfile)
 
 
-atexit.register(cleanup, lockfile)
+atexit.register(cleanup, lockfile, options.verbose)
 os.umask(prev_umask)
 
 import subprocess
@@ -184,10 +194,7 @@ def main():
 
 if options.verbose:
 sys.stderr.write('command terminated with exit code %s\n' % rc)
-
-if options.verbose:
-sys.stderr.write('removing lockfile\n')
-
+
 sys.exit(rc)
 
 
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org



commit withlock for openSUSE:Factory

2014-03-26 Thread h_root
Hello community,

here is the log from the commit of package withlock for openSUSE:Factory 
checked in at 2014-03-26 16:42:14

Comparing /work/SRC/openSUSE:Factory/withlock (Old)
 and  /work/SRC/openSUSE:Factory/.withlock.new (New)


Package is withlock

Changes:

--- /work/SRC/openSUSE:Factory/withlock/withlock.changes2014-02-11 
11:46:46.0 +0100
+++ /work/SRC/openSUSE:Factory/.withlock.new/withlock.changes   2014-03-26 
16:42:15.0 +0100
@@ -1,0 +2,10 @@
+Tue Mar 25 21:07:09 UTC 2014 - po...@cmdline.net
+
+- update to 0.3
+  * At exit, unlink the lock file only if a lock was actually obtained.
+When waiting for a lock (using -w option) and timing out, the file
+was removed nevertheless. Thanks Bernhard Wiedemann for finding this
+bug and providing such a good test case, so the fix was easy.
+See https://bugzilla.novell.com/show_bug.cgi?id=864785
+
+---

Old:

  withlock-0.2.tar.gz

New:

  withlock-0.3.tar.gz



Other differences:
--
++ withlock.spec ++
--- /var/tmp/diff_new_pack.XX72ob/_old  2014-03-26 16:42:16.0 +0100
+++ /var/tmp/diff_new_pack.XX72ob/_new  2014-03-26 16:42:16.0 +0100
@@ -17,7 +17,7 @@
 
 
 Name:   withlock
-Version:0.2
+Version:0.3
 Release:0
 Summary:A locking wrapper script
 License:Apache-2.0

++ withlock-0.2.tar.gz - withlock-0.3.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withlock-0.2/withlock new/withlock-0.3/withlock
--- old/withlock-0.2/withlock   2014-02-10 22:31:01.0 +0100
+++ new/withlock-0.3/withlock   2014-03-20 22:17:53.0 +0100
@@ -36,7 +36,7 @@
 # See --help output for more options.
 
 
-__version__ = '0.2'
+__version__ = '0.3'
 
 import os
 import os.path
@@ -49,6 +49,7 @@
 import atexit
 from optparse import OptionParser
 
+got_lock = False
 
 class SignalInterrupt(Exception):
 Exception raised on SIGTERM and SIGHUP.
@@ -64,10 +65,11 @@
 
 
 def cleanup(lockfile):
-try:
-os.unlink(lockfile)
-except:
-pass
+if got_lock:
+try:
+os.unlink(lockfile)
+except:
+pass
 
 
 def main():
@@ -134,6 +136,7 @@
 
 try:
 fcntl.lockf(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
+got_lock = True
 break
 except IOError, e:
 if e.errno in [ errno.EAGAIN, 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org



commit withlock for openSUSE:Factory

2014-02-11 Thread h_root
Hello community,

here is the log from the commit of package withlock for openSUSE:Factory 
checked in at 2014-02-11 11:46:45

Comparing /work/SRC/openSUSE:Factory/withlock (Old)
 and  /work/SRC/openSUSE:Factory/.withlock.new (New)


Package is withlock

Changes:

--- /work/SRC/openSUSE:Factory/withlock/withlock.changes2012-08-27 
17:48:11.0 +0200
+++ /work/SRC/openSUSE:Factory/.withlock.new/withlock.changes   2014-02-11 
11:46:46.0 +0100
@@ -1,0 +2,7 @@
+Mon Feb 10 21:49:18 UTC 2014 - po...@cmdline.net
+
+- withlock is now distributed as a tarball, which is generally 
+  easier for packaging on some platforms (at least Solaris). The 
+  only other change: updated copyright year.
+
+---

Old:

  withlock

New:

  withlock-0.2.tar.gz



Other differences:
--
++ withlock.spec ++
--- /var/tmp/diff_new_pack.S6NzmT/_old  2014-02-11 11:46:47.0 +0100
+++ /var/tmp/diff_new_pack.S6NzmT/_new  2014-02-11 11:46:47.0 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package withlock
 #
-# Copyright (c) 2009-2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,15 +15,16 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:   withlock
 Version:0.2
-Release:1
-License:Apache-2.0
+Release:0
 Summary:A locking wrapper script
-Url:http://code.google.com/p/withlock/
+License:Apache-2.0
 Group:  System/Management
+Url:http://code.google.com/p/withlock/
 Requires:   python
-Source0:%{name}
+Source0:http://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz
 Source1:%name-README.SuSE
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 BuildArch:  noarch
@@ -38,11 +39,12 @@
 to use, and much better than implementing half-hearted locking within scripts.
 
 %prep
+%setup
 #
 %build
 #
 %install
-install -Dm755 %{SOURCE0} %{buildroot}%{_bindir}/%{name}
+install -Dm755 withlock %{buildroot}%{_bindir}/%{name}
 install -Dm644 %{SOURCE1} %{buildroot}%{_defaultdocdir}/%{name}/README.SuSE
 sed -i s|/usr/bin/env python|%{_bindir}/python|g 
%{buildroot}%{_bindir}/%{name}
 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org