Hello community,
here is the log from the commit of package obs-service-tar_scm for
openSUSE:Factory checked in at 2015-06-06 09:54:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
and /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-tar_scm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes
2015-03-25 21:33:19.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes
2015-06-06 09:54:38.000000000 +0200
@@ -1,0 +2,29 @@
+Mon Jun 01 11:34:28 UTC 2015 - [email protected]
+
+- Update to version 0.5.3.1433158390.b0e72e1:
+ + use the same Python interpreter for testing tar_scm
+ + Split up the steps of git cloning and submodule initialization
+ + fix Makefile test runner for Debian
+
+-------------------------------------------------------------------
+Wed May 27 09:35:08 UTC 2015 - [email protected]
+
+- Update to version 0.5.2.1432717816.cff60cf:
+ + be explicit about python2, python may be python3
+ + Fix newline at the end of @PARENT_TAG@
+ + Fix Mercurial version format strings in unittest
+ + Refactoring of package metadata regex matching
+ + Refactor resetting of uid/gid so that it is reusable
+ + Fix handling of --include option
+ + Fix handling of --exclude option
+ + Refactor subdir handling of tarchecker's to prevent code duplication
+ + ignore PEP8's E731 check for lambdas
+ + PEP8 E402 fix: set PYTHONPATH outside code
+ + add @TAG_OFFSET@ support in versionformat for git
+ + fix inconsistencies in tar_scm.service
+ + - fix .service file syntax (OBS 2.6.1 is checking now)
+ + mention need to set PYTHONPATH when running tests
+ + keep STDERR separate
+ + don't allow --subdir to wander outside repo (bsc#927120, #71)
+
+-------------------------------------------------------------------
Old:
----
obs-service-tar_scm-0.5.1.1426664483.de67b88.tar.gz
New:
----
obs-service-tar_scm-0.5.3.1433158390.b0e72e1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.ZIZy49/_old 2015-06-06 09:54:38.000000000 +0200
+++ /var/tmp/diff_new_pack.ZIZy49/_new 2015-06-06 09:54:38.000000000 +0200
@@ -19,7 +19,7 @@
%define service tar_scm
Name: obs-service-%{service}
-Version: 0.5.1.1426664483.de67b88
+Version: 0.5.3.1433158390.b0e72e1
Release: 0
Summary: An OBS source service: checkout or update a tar ball from
svn/git/hg
License: GPL-2.0+
++++++ _service ++++++
--- /var/tmp/diff_new_pack.ZIZy49/_old 2015-06-06 09:54:38.000000000 +0200
+++ /var/tmp/diff_new_pack.ZIZy49/_new 2015-06-06 09:54:38.000000000 +0200
@@ -4,7 +4,7 @@
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="version">git-master</param>
- <param name="versionformat">0.5.1.%ct.%h</param>
+ <param name="versionformat">0.5.3.%ct.%h</param>
<param name="revision">master</param>
<param name="changesgenerate">enable</param>
</service>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.ZIZy49/_old 2015-06-06 09:54:38.000000000 +0200
+++ /var/tmp/diff_new_pack.ZIZy49/_new 2015-06-06 09:54:38.000000000 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
- <param
name="changesrevision">de67b88320ca42dbd145c7f14ca062739917dc61</param>
+ <param
name="changesrevision">b0e72e1b153c6eef6ea16aa9d120cc1d5bcdd962</param>
</service>
</servicedata>
\ No newline at end of file
++++++ obs-service-tar_scm-0.5.1.1426664483.de67b88.tar.gz ->
obs-service-tar_scm-0.5.3.1433158390.b0e72e1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/GNUmakefile
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/GNUmakefile
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/GNUmakefile
2015-03-18 08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/GNUmakefile
2015-06-01 13:34:28.000000000 +0200
@@ -2,6 +2,21 @@
PREFIX = /usr/local
SYSCFG = /etc
+define first_in_path
+$(or \
+ $(firstword $(wildcard \
+ $(foreach p,$(1),$(addsuffix /$(p),$(subst :, ,$(PATH)))) \
+ )), \
+ $(error Need one of: $(1)) \
+)
+endef
+
+# On ArchLinux, /usr/bin/python is Python 3, and other distros
+# will switch to the same at various points. So until we support
+# Python 3, we need to do our best to ensure we have Python 2.
+PYTHONS = python2.7 python-2.7 python2.6 python-2.6 python
+PYTHON = $(call first_in_path,$(PYTHONS))
+
mylibdir = $(PREFIX)/lib/obs/service
mycfgdir = $(SYSCFG)/obs/services
@@ -21,12 +36,19 @@
.PHONY: test
test:
: Running the test suite. Please be patient - this takes a few minutes
...
- PYTHONPATH=. python2 tests/test.py
+ PYTHONPATH=. $(PYTHON) tests/test.py
+
+tar_scm: tar_scm.py
+ @echo "Creating $@ which uses $(PYTHON) ..."
+ sed 's,^\#!/usr/bin/.*,#!$(PYTHON),' $< > $@
.PHONY: install
-install:
+install: tar_scm
mkdir -p $(DESTDIR)$(mylibdir)
mkdir -p $(DESTDIR)$(mycfgdir)
- install -m 0755 tar_scm.py $(DESTDIR)$(mylibdir)/tar_scm
+ install -m 0755 tar_scm $(DESTDIR)$(mylibdir)/tar_scm
install -m 0644 tar_scm.service $(DESTDIR)$(mylibdir)
install -m 0644 tar_scm.rc $(DESTDIR)$(mycfgdir)/tar_scm
+
+show-python:
+ @echo "$(PYTHON)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/TESTING.md
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/TESTING.md
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/TESTING.md 2015-03-18
08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/TESTING.md 2015-06-01
13:34:28.000000000 +0200
@@ -4,8 +4,12 @@
Run the unit test suite via:
+ export PYTHONPATH=. # or absolute path to repo
python2 tests/test.py
+(If your distribution does not have `python2` in your `$PATH` then
+adjust the executable name accordingly.)
+
The output may become easier to understand if you uncomment the
'failfast' option in `test.py`. This requires Python 2.7, however.
You may also find that the buffered `STDOUT` from test failures gets
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.py
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tar_scm.py
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.py 2015-03-18
08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tar_scm.py 2015-06-01
13:34:28.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
#
# A simple script to checkout or update a svn or git repo as source service
#
@@ -72,9 +72,13 @@
"""Fetch sources via git."""
safe_run(['git', 'clone', url, clone_dir], cwd=cwd,
interactive=sys.stdout.isatty())
+
+
+def fetch_upstream_git_submodules(clone_dir, kwargs):
+ """Recursively initialize git submodules."""
if 'submodules' in kwargs and kwargs['submodules']:
safe_run(['git', 'submodule', 'update', '--init', '--recursive'],
- clone_dir)
+ cwd=clone_dir)
def fetch_upstream_svn(url, clone_dir, revision, cwd, kwargs):
@@ -247,6 +251,12 @@
# switch_to_revision
SWITCH_REVISION_COMMANDS[scm](clone_dir, revision)
+ # git specific: after switching to desired revision its necessary to update
+ # submodules since they depend on the actual version of the selected
+ # revision
+ if scm == 'git':
+ fetch_upstream_git_submodules(clone_dir, kwargs)
+
return clone_dir
@@ -849,6 +859,14 @@
if not os.path.isdir(args.outdir):
sys.exit("%s: No such directory" % args.outdir)
+ orig_subdir = args.subdir
+ args.subdir = os.path.normpath(orig_subdir)
+ if args.subdir.startswith('/'):
+ sys.exit("Absolute path '%s' is not allowed for --subdir" %
+ orig_subdir)
+ if args.subdir == '..' or args.subdir.startswith('../'):
+ sys.exit("--subdir path '%s' must stay within repo" % orig_subdir)
+
if args.history_depth:
print "history-depth parameter is obsolete and will be ignored"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/commontests.py
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/commontests.py
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/commontests.py
2015-03-18 08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/commontests.py
2015-06-01 13:34:28.000000000 +0200
@@ -60,6 +60,19 @@
self.assertTarOnly(self.basename(),
tarchecker=self.assertIncludeSubdirTar)
+ def test_absolute_subdir(self):
+ (stdout, stderr, ret) = \
+ self.tar_scm_std_fail('--subdir', '/')
+ self.assertRegexpMatches(
+ stderr, "Absolute path '/' is not allowed for --subdir")
+
+ def test_subdir_parent(self):
+ for path in ('..', '../', '../foo', 'foo/../../bar'):
+ (stdout, stderr, ret) = \
+ self.tar_scm_std_fail('--subdir', path)
+ self.assertRegexpMatches(
+ stderr, "--subdir path '%s' must stay within repo" % path)
+
def test_subdir(self):
self.tar_scm_std('--subdir', self.fixtures.subdir)
self.assertTarOnly(self.basename(), tarchecker=self.assertSubdirTar)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gittests.py
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/gittests.py
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gittests.py
2015-03-18 08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/gittests.py
2015-06-01 13:34:28.000000000 +0200
@@ -98,6 +98,14 @@
fix.do_commit(repo_path, new_rev, ['.gitmodules', submod_name])
fix.record_rev(repo_path, new_rev)
+ def _submodule_fixture_prepare_branch(self, branch):
+ fix = self.fixtures
+ repo_path = fix.repo_path
+ self.scmlogs.next('prepare-branch')
+ os.chdir(repo_path)
+ fix.safe_run('checkout -b %s' % branch)
+ fix.create_commits(3)
+
def test_submodule_update(self):
submod_name = 'submod1'
@@ -126,6 +134,23 @@
self.assertRaises(KeyError, th.getmember, os.path.join(
self.basename(version='tag3'), submod_name, 'a'))
+ def test_submodule_in_different_branch(self):
+ submod_name = 'submod1'
+
+ rev = 'build'
+ self._submodule_fixture_prepare_branch(rev)
+ self._submodule_fixture(submod_name)
+
+ self.tar_scm_std('--submodules', 'enable',
+ '--revision', rev,
+ '--version', rev)
+ tar_path = os.path.join(self.outdir,
+ self.basename(version=rev) + '.tar')
+ th = tarfile.open(tar_path)
+ submod_path = os.path.join(self.basename(version=rev),
+ submod_name, 'a')
+ self.assertTarMemberContains(th, submod_path, '3')
+
def _check_servicedata(self, expected_dirents=2, revision=2):
expected_sha1 = self.sha1s('tag%d' % revision)
dirents = self.assertNumDirents(self.outdir, expected_dirents)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testenv.py
new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/testenv.py
--- old/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testenv.py
2015-03-18 08:44:40.000000000 +0100
+++ new/obs-service-tar_scm-0.5.3.1433158390.b0e72e1/tests/testenv.py
2015-06-01 13:34:28.000000000 +0200
@@ -3,6 +3,7 @@
import datetime
import os
import shutil
+import sys
from utils import mkfreshdir, run_cmd
from scmlogs import ScmInvocationLogs
@@ -165,8 +166,7 @@
cmdargs = args + ['--outdir', self.outdir]
quotedargs = ["'%s'" % arg for arg in cmdargs]
- cmdstr = 'python2 %s %s 2>&1' % \
- (self.tar_scm_bin(), " ".join(quotedargs))
+ cmdstr = " ".join([sys.executable, self.tar_scm_bin()] + quotedargs)
print
print ">>>>>>>>>>>"
print "Running", cmdstr