Hello community,
here is the log from the commit of package obs-service-tar_scm for
openSUSE:Factory checked in at 2017-04-20 20:59:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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"
Thu Apr 20 20:59:21 2017 rev:40 rq:489538 version:0.7.0.1492101301.747de50
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes
2017-04-11 09:34:21.376678036 +0200
+++
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes
2017-04-20 20:59:24.660174982 +0200
@@ -2 +2,66 @@
-Fri Mar 24 12:55:48 UTC 2017 - [email protected]
+Tue Apr 18 07:17:45 UTC 2017 - [email protected]
+
+- Only BuildRequire packages needed for testsuite if the testsuite
+ is enabled
+
+-------------------------------------------------------------------
+Thu Apr 13 16:35:38 UTC 2017 - [email protected]
+
+- Update to version 0.7.0.1492101301.747de50:
+ * skip broken tests temporarily
+
+-------------------------------------------------------------------
+Thu Apr 13 15:11:44 UTC 2017 - [email protected]
+
+- Update to version 0.7.0.1492095435.eda090e:
+ * revision, repodir and repocachedir as attribute for TarSCM.<scm>
+ * new class TarSCM.cli to make testing easier
+ * testing script name more reliable
+ * fixed arguments for singletask in case of snapcraft
+ * refactored snapcraft code + first tests for snapcraft
+ * added testcase for snapcraft finalize
+ * split classes into several files
+ * track module dependencies in requirements.txt
+ * use unittest2 in Python 2.6
+ * more testing for TarSCM.tasks
+ * clone_dir/repodir/arch_dir(tar_dir)/args now attributes of scm objects
+ * test case for save_run
+ * major refactor of git cache handling
+ * consolidation of archive.obscpio and archive.tar parameters
+ * next test cases
+ * unset CACHEDIRECTORY env variable in unit tests
+ * update atime/mtime of repocachedir if already exists
+ * prevent key errors when $HOME is not set
+ * fix PEP8 problems and reenable PEP8 testing
+ * keep checkout while running with osc
+ * fix local checkout when running in osc
+ * force remove of files while 'make clean'
+ * fix: also exclude directories when called .git
+ * fix problems with generatechanges when ~/.obs/tar_scm exists
+ * initial appimage support
+ * Provide version rewrite using a regex pattern and replacement.
+ * new parameter --match-tag to filter tags
+ * keep .gitlab/.github directories
+
+-------------------------------------------------------------------
+Thu Apr 13 15:07:10 UTC 2017 - [email protected]
+
+- Update to version 0.7.0.1491998613.3890456:
+ * refactor of detect_changes into classes
+ * url as attribute of TarSCM.scm
+ * run_cmd and safe_run moved into class helpers
+ * combine os.path.join statement
+ * refactoring fetch_upstream to be part of TarSCM.scm
+ * new classes for archives
+ * common method 'get_current_commit' to get rid of exception for git
+ * refactored detect_changes to get rid of changesgenerate exception
+ * get_repocachedir -> TarSCM.scm
+ * Add description to the README.md file
+
+-------------------------------------------------------------------
+Wed Apr 12 14:04:07 UTC 2017 - [email protected]
+
+- split services into own rpms
+
+-------------------------------------------------------------------
+Fri Mar 24 12:55:48 UTC 2017 - [email protected]
@@ -8 +73 @@
-Thu Mar 23 10:09:38 UTC 2017 - [email protected]
+Thu Mar 23 10:09:38 UTC 2017 - [email protected]
Old:
----
obs-service-tar_scm-0.7.0.1490358243.8de854e.tar.gz
New:
----
obs-service-tar_scm-0.7.0.1492101301.747de50.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.6TCCQ8/_old 2017-04-20 20:59:25.768018306 +0200
+++ /var/tmp/diff_new_pack.6TCCQ8/_new 2017-04-20 20:59:25.768018306 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package obs-service
+# spec file for package obs-service-tar_scm
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
@@ -16,35 +16,24 @@
#
-%define service tar_scm
-%define seperate_build 0
+%bcond_without obs_scm_testsuite
-%if "%seperate_build" == "1"
-%define version_unconverted 0.7.0.1490358243.8de854e
-
-Name: obs-service-obs_scm
-%else
-%define version_unconverted 0.7.0.1490358243.8de854e
-
-Name: obs-service-%{service}
-#Obsoletes: obs-service-obs_scm
-Provides: obs-service-obs_scm = %version-%release
-%endif
-Provides: obs-service-tar = %version-%release
-Version: 0.7.0.1490358243.8de854e
+Name: obs-service-tar_scm
+%define version_unconverted 0.7.0.1492101301.747de50
+Version: 0.7.0.1492101301.747de50
Release: 0
-Summary: An OBS source service: checkout or update a tar ball from
svn/git/hg
+Summary: An OBS source service: create tar ball from svn/git/hg
License: GPL-2.0+
Group: Development/Tools/Building
-Url: https://github.com/openSUSE/obs-service-%{service}
-Source: obs-service-tar_scm-%{version}.tar.gz
+Url: https://github.com/openSUSE/obs-service-tar_scm
+Source: %{name}-%{version}.tar.gz
# Fix build on Ubuntu by disabling mercurial tests, not applied in rpm
# based distributions
#Patch0: 0001-Debianization-disable-running-mercurial-tests.patch
+%if %{with obs_scm_testsuite}
BuildRequires: bzr
BuildRequires: git-core
BuildRequires: mercurial
-BuildRequires: python >= 2.6
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: PyYAML
%else
@@ -54,19 +43,13 @@
BuildRequires: python-lxml
BuildRequires: python-mock
BuildRequires: subversion
+%endif
+BuildRequires: python >= 2.6
Requires: bzr
Requires: git-core
Requires: mercurial
-%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
-Requires: PyYAML
-%else
-Requires: python-PyYAML
-%endif
-Requires: python-dateutil
+Requires: obs-service-obs_scm-common = %version-%release
Requires: subversion
-%if 0%{?suse_version} < 1315
-Requires: python-argparse
-%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -75,6 +58,74 @@
It supports downloading from svn, git, hg and bzr repositories.
+%package -n obs-service-obs_scm-common
+Summary: Common parts of SCM handling services
+Group: Development/Tools/Building
+Requires: python-dateutil
+%if 0%{?suse_version} < 1315
+Requires: python-argparse
+%endif
+%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
+Requires: PyYAML
+%else
+Requires: python-PyYAML
+%endif
+
+%description -n obs-service-obs_scm-common
+
+%package -n obs-service-tar
+Summary: Creates a tar archive from local directory
+Group: Development/Tools/Building
+Requires: obs-service-obs_scm-common = %version-%release
+Provides: obs-service-tar_scm:/usr/lib/obs/service/tar.service
+
+%description -n obs-service-tar
+Creates a tar archive from local directory
+
+%package -n obs-service-obs_scm
+Summary: Creates a OBS cpio from a remote SCM resource
+Group: Development/Tools/Building
+Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service
+Requires: bzr
+Requires: git-core
+Requires: mercurial
+Requires: obs-service-obs_scm-common = %version-%release
+Requires: subversion
+
+%description -n obs-service-obs_scm
+Creates a OBS cpio from a remote SCM resource.
+
+This can be used to work directly in local git checkout and can be packaged
+into a tar ball during build time.
+
+%package -n obs-service-appimage
+Summary: Handles source downloads defined in appimage.yml files
+Group: Development/Tools/Building
+Requires: bzr
+Requires: git-core
+Requires: mercurial
+Requires: obs-service-obs_scm-common = %version-%release
+Requires: subversion
+
+%description -n obs-service-appimage
+Experimental appimage support: This parses appimage.yml files for SCM
+resources and packages them.
+
+%package -n obs-service-snapcraft
+Summary: Handles source downloads defined in snapcraft.yaml files
+Group: Development/Tools/Building
+Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service
+Requires: bzr
+Requires: git-core
+Requires: mercurial
+Requires: obs-service-obs_scm-common = %version-%release
+Requires: subversion
+
+%description -n obs-service-snapcraft
+Experimental snapcraft support: This parses snapcraft.yaml files for SCM
+resources and packages them.
+
+
%prep
%setup -q -n obs-service-tar_scm-%version
@@ -83,13 +134,7 @@
%install
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}"
-%if "%seperate_build" == "1"
-rm %{buildroot}/%{_prefix}/lib/obs/service/tar_scm.service
-rm %{buildroot}/%{_prefix}/lib/obs/service/obs_scm
-mv %{buildroot}/%{_prefix}/lib/obs/service/{tar,obs}_scm
-ln -sf obs_scm %{buildroot}/%{_prefix}/lib/obs/service/tar
-%endif
-
+%if %{with obs_scm_testsuite}
%if 0%{?suse_version} >= 1220
%check
# No need to run PEP8 tests here; that would require a potentially
@@ -97,13 +142,38 @@
# caught by Travis CI.
make test
%endif
+%endif
%files
%defattr(-,root,root)
+%{_prefix}/lib/obs/service/tar_scm.service
+
+%files -n obs-service-obs_scm-common
+%defattr(-,root,root)
%dir %{_prefix}/lib/obs
-%{_prefix}/lib/obs/service
+%dir %{_prefix}/lib/obs/service
+%{_prefix}/lib/obs/service/TarSCM
+%{_prefix}/lib/obs/service/tar_scm
%dir %{_sysconfdir}/obs
%dir %{_sysconfdir}/obs/services
%config(noreplace) %{_sysconfdir}/obs/services/*
+%files -n obs-service-tar
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/tar
+%{_prefix}/lib/obs/service/tar.service
+
+%files -n obs-service-obs_scm
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/obs_scm
+%{_prefix}/lib/obs/service/obs_scm.service
+
+%files -n obs-service-appimage
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/appimage*
+
+%files -n obs-service-snapcraft
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/snapcraft*
+
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.6TCCQ8/_old 2017-04-20 20:59:25.816011518 +0200
+++ /var/tmp/diff_new_pack.6TCCQ8/_new 2017-04-20 20:59:25.820010953 +0200
@@ -1,11 +1,10 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
+ <param name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="version">git-master</param>
<param name="versionformat">0.7.0.%ct.%h</param>
- <param name="revision">nextRev</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.6TCCQ8/_old 2017-04-20 20:59:25.844007559 +0200
+++ /var/tmp/diff_new_pack.6TCCQ8/_new 2017-04-20 20:59:25.844007559 +0200
@@ -3,4 +3,6 @@
<param
name="url">git://github.com/adrianschroeter/obs-service-tar_scm.git</param>
<param
name="changesrevision">d44d677cf006d48b261f5e2054ba2126bed64ae1</param></service><service
name="tar_scm">
<param
name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
- <param
name="changesrevision">b742dfc0e12755cf306a95439494b5bdde7c0c61</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">b742dfc0e12755cf306a95439494b5bdde7c0c61</param></service><service
name="tar_scm">
+ <param
name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
+ <param
name="changesrevision">8c65b8acb16e46f25c5b11d2a16378346d821923</param></service></servicedata>
\ No newline at end of file
++++++ obs-service-tar_scm-0.7.0.1490358243.8de854e.tar.gz ->
obs-service-tar_scm-0.7.0.1492101301.747de50.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/.travis.yml
new/obs-service-tar_scm-0.7.0.1492101301.747de50/.travis.yml
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/.travis.yml
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/.travis.yml
2017-04-13 18:35:01.000000000 +0200
@@ -5,5 +5,5 @@
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq bzr git mercurial subversion
-install: pip install pep8 lxml mock python-dateutil
+install: pip install -r requirements.txt
script: make check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/GNUmakefile
new/obs-service-tar_scm-0.7.0.1492101301.747de50/GNUmakefile
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/GNUmakefile
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/GNUmakefile
2017-04-13 18:35:01.000000000 +0200
@@ -1,3 +1,9 @@
+# Ensure that we don't accidentally ignore failing commands just
+# because they're in a pipeline. This applies in particular to piping
+# the test runs through tee(1).
+# http://stackoverflow.com/a/31605520/179332
+SHELL = /bin/bash -o pipefail
+
DESTDIR ?=
PREFIX = /usr/local
SYSCFG = /etc
@@ -25,30 +31,37 @@
mylibdir = $(PREFIX)/lib/obs/service
mycfgdir = $(SYSCFG)/obs/services
+LIST_PY_FILES=git ls-tree --name-only -r HEAD | grep '\.py$$'
+PY_FILES=$(shell $(LIST_PY_FILES))
+
default: check
.PHONY: check
check: pep8 test
+.PHONY: list-py-files
+list-py-files:
+ @$(LIST_PY_FILES)
+
.PHONY: pep8
-pep8: tar_scm.py
+pep8: $(PY_FILES)
@if ! which pep8 >/dev/null 2>&1; then \
echo "pep8 not installed! Cannot check PEP8 compliance;
aborting." >&2; \
exit 1; \
fi
- find -name \*.py | xargs pep8 --ignore=E221,E251,E272,E241,E731,E402
+ $(LIST_PY_FILES) | xargs pep8 --ignore=E221,E251,E272,E241,E731
.PHONY: test
test:
: Running the test suite. Please be patient - this takes a few minutes
...
- PYTHONPATH=. $(PYTHON) tests/test.py 2>&1|tee ./test.log
+ PYTHONPATH=. $(PYTHON) tests/test.py 2>&1 | tee ./test.log
test3:
: Running the test suite. Please be patient - this takes a few minutes
...
- PYTHONPATH=. python3 tests/test.py 2>&1|tee ./test3.log
+ PYTHONPATH=. python3 tests/test.py 2>&1 | tee ./test3.log
cover:
- PYTHONPATH=. coverage2 run tests/test.py 2>&1|tee ./cover.log
+ PYTHONPATH=. coverage2 run tests/test.py 2>&1 | tee ./cover.log
coverage2 html --include=./TarSCM/*
tar_scm: tar_scm.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/README.md
new/obs-service-tar_scm-0.7.0.1492101301.747de50/README.md
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/README.md 2017-03-24
13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/README.md 2017-04-13
18:35:01.000000000 +0200
@@ -1,10 +1,16 @@
# tar_scm (OBS source service) [](https://travis-ci.org/openSUSE/obs-service-tar_scm)
-This is the git repository for
[openSUSE:Tools/obs-service-tar_scm](https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm).
-The authoritative source is:
+This is an [Open Build Service](http://openbuildservice.org/) source service.
It uses an SCM client to checkout or update a package by creating a source
tarball from a source code repository.
-* https://github.com/openSUSE/obs-service-tar_scm
+It supports many options, e.g. it can adjust resulting tarball parameters,
include or exclude particular files when creating this tarball or generate an
rpm changelog from the SCM commit log. For the full list of options please see
tar_scm.service.in.
+Apart from various SCM like git, hg, bzr or svn it additionally supports
`--url` option that allows you to specify URL of the upstream tarball to be
downloaded.
+
+This is the git repository for
[openSUSE:Tools/obs-service-tar_scm](https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm).
The authoritative source is https://github.com/openSUSE/obs-service-tar_scm
+
+The service can be used in combination with other services like
[download_files](https://github.com/openSUSE/obs-service-download_files),
[extract_file](https://github.com/openSUSE/obs-service-extract_file),
[recompress](https://github.com/openSUSE/obs-service-recompress) or
[set_version](https://github.com/openSUSE/obs-service-set_version) e.g. within
the [GIT
integration](https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example_2:_GIT_integration)
workflow.
+
+## Installation
The files in this top-level directory need to be installed using the following:
make install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/changes.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/changes.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/changes.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/changes.py
2017-04-13 18:35:01.000000000 +0200
@@ -14,30 +14,30 @@
class changes():
def import_xml_parser(self):
"""Import the best XML parser available. Currently prefers lxml and
-falls back to xml.etree.
+ falls back to xml.etree.
-There are some important differences in behaviour, which also
-depend on the Python version being used:
+ There are some important differences in behaviour, which also
+ depend on the Python version being used:
-| Python | 2.6 | 2.6 | 2.7 | 2.7 |
-|-----------+----------------+-------------+----------------+-------------|
-| module | lxml.etree | xml.etree | lxml.etree | xml.etree |
-|-----------+----------------+-------------+----------------+-------------|
-| empty | XMLSyntaxError | ExpatError | XMLSyntaxError | ParseError |
-| doc | "Document is | "no element | "Document is | "no element |
-| | empty" | found" | empty | found" |
-|-----------+----------------+-------------+----------------+-------------|
-| syntax | XMLSyntaxError | ExpatError | XMLSyntaxError | ParseError |
-| error | "invalid | "not well- | "invalid | "not well- |
-| | element name" | formed" | element name" | formed" |
-|-----------+----------------+-------------+----------------+-------------|
-| e.message | deprecated | deprecated | yes | yes |
-|-----------+----------------+-------------+----------------+-------------|
-| str() | yes | yes | yes | yes |
-|-----------+----------------+-------------+----------------+-------------|
-| @attr | yes | no | yes | yes |
-| selection | | | | |
- """
+ | Python | 2.6 | 2.6 | 2.7 | 2.7
|
+
|-----------+----------------+-------------+----------------+-------------|
+ | module | lxml.etree | xml.etree | lxml.etree |
xml.etree |
+
|-----------+----------------+-------------+----------------+-------------|
+ | empty | XMLSyntaxError | ExpatError | XMLSyntaxError |
ParseError |
+ | doc | "Document is | "no element | "Document is | "no
element |
+ | | empty" | found" | empty | found"
|
+
|-----------+----------------+-------------+----------------+-------------|
+ | syntax | XMLSyntaxError | ExpatError | XMLSyntaxError |
ParseError |
+ | error | "invalid | "not well- | "invalid | "not
well- |
+ | | element name" | formed" | element name" | formed"
|
+
|-----------+----------------+-------------+----------------+-------------|
+ | e.message | deprecated | deprecated | yes | yes
|
+
|-----------+----------------+-------------+----------------+-------------|
+ | str() | yes | yes | yes | yes
|
+
|-----------+----------------+-------------+----------------+-------------|
+ | @attr | yes | no | yes | yes
|
+ | selection | | | |
|
+ """ # noqa
global ET
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/cli.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/cli.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/cli.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/cli.py
2017-04-13 18:35:01.000000000 +0200
@@ -35,8 +35,8 @@
parser.add_argument('--versionrewrite-pattern',
help='Regex used to rewrite the version which is '
'applied post versionformat. For example, to '
- 'remove a tag prefix of "v" the regex "v(.*)"'
- ' could be used. See the '
+ 'remove a tag prefix of "v" the regex '
+ '"v(.*)" could be used. See the '
'versionrewrite-replacement parameter.')
parser.add_argument('--versionrewrite-replacement',
default=r'\1',
@@ -101,10 +101,6 @@
help='osc service parameter for internal use only '
'(determines where generated files go before '
'collection')
- parser.add_argument('--jailed', required=False, type=int, default=0,
- help='service parameter for internal use only '
- '(determines whether service runs in docker '
- 'jail)')
parser.add_argument('--history-depth',
help='Obsolete osc service parameter that does '
'nothing')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/config.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/config.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/config.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/config.py
2017-04-13 18:35:01.000000000 +0200
@@ -22,7 +22,8 @@
):
try:
rc_file = [
- os.path.join(os.environ['HOME'], '.obs', 'tar_scm'), True
+ os.path.join(os.environ['HOME'], '.obs', 'tar_scm'),
+ True
]
files.append(rc_file)
except KeyError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/helpers.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/helpers.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/helpers.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/helpers.py
2017-04-13 18:35:01.000000000 +0200
@@ -36,7 +36,7 @@
stdout_lines = []
while proc.poll() is None:
for line in proc.stdout:
- print (line.rstrip())
+ print(line.rstrip())
stdout_lines.append(line.rstrip())
output = '\n'.join(stdout_lines)
output = output
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/scm/base.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/scm/base.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/scm/base.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/scm/base.py
2017-04-13 18:35:01.000000000 +0200
@@ -52,7 +52,6 @@
def fetch_upstream(self):
"""Fetch sources from repository and checkout given revision."""
logging.debug("CACHEDIR: '%s'" % self.repocachedir)
- logging.debug("JAILED: '%d'" % self.args.jailed)
logging.debug("SCM: '%s'" % self.scm)
clone_prefix = ""
if 'clone_prefix' in self.args.__dict__:
@@ -119,11 +118,11 @@
return None
def _calc_repocachedir(self):
- # check for enabled caches
- # 1. local .cache
- # 2. environment
- # 3. user config
- # 4. system wide
+ # check for enabled caches in this order (first wins):
+ # 1. local .cache
+ # 2. environment
+ # 3. user config
+ # 4. system wide
repocachedir = None
cwd = os.getcwd()
if os.path.isdir(os.path.join(cwd, '.cache')):
@@ -141,10 +140,9 @@
self.repocachedir = os.path.join(repocachedir, self.repohash)
def prepare_clone_dir(self):
-
- # special case when using osc and creating an obscpio, use current work
- # directory to allow the developer to work inside of the git repo and
- # fetch local changes
+ # special case when using osc and creating an obscpio, use
+ # current work directory to allow the developer to work inside
+ # of the git repo and fetch local changes
if sys.argv[0].endswith("snapcraft") or \
(self.args.use_obs_scm and os.getenv('OSC_VERSION')):
self.repodir = os.getcwd()
@@ -201,10 +199,9 @@
def is_sslverify_enabled(self):
"""Returns ``True`` if the ``sslverify`` option has been enabled or
not been set (default enabled) ``False`` otherwise."""
- return (
- 'sslverify' not in self.args.__dict__ or
+ return \
+ 'sslverify' not in self.args.__dict__ or \
self.args.__dict__['sslverify']
- )
def version_iso_cleanup(self, version):
"""Reformat timestamp value."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/scm/git.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/scm/git.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/scm/git.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/scm/git.py
2017-04-13 18:35:01.000000000 +0200
@@ -59,15 +59,11 @@
"""SCM specific version of fetch_uptream for git."""
# clone if no .git dir exists
command = ['git', 'clone', self.url, self.clone_dir]
-
if not self.is_sslverify_enabled():
command += ['--config', 'http.sslverify=false']
-
if self.repocachedir:
command.insert(2, '--mirror')
-
wd = os.path.abspath(os.path.join(self.repodir, os.pardir))
-
self.helpers.safe_run(command, cwd=wd, interactive=sys.stdout.isatty())
self.fetch_specific_revision()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/tasks.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/tasks.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/TarSCM/tasks.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/tasks.py
2017-04-13 18:35:01.000000000 +0200
@@ -12,11 +12,7 @@
from TarSCM.helpers import helpers
from TarSCM.changes import changes
from TarSCM.exceptions import OptionsError
-try:
- # not possible to test this on travis atm
- import yaml
-except ImportError:
- pass
+import yaml
class tasks():
@@ -60,8 +56,8 @@
self.task_list.append(copy.copy(args))
elif args.snapcraft:
- # we read the SCM config from snapcraft.yaml instead getting it via
- # parameters
+ # we read the SCM config from snapcraft.yaml instead
+ # getting it via parameters
f = open('snapcraft.yaml')
self.dataMap = yaml.safe_load(f)
f.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/requirements.txt
new/obs-service-tar_scm-0.7.0.1492101301.747de50/requirements.txt
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/requirements.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/requirements.txt
2017-04-13 18:35:01.000000000 +0200
@@ -0,0 +1,6 @@
+lxml
+mock
+pep8
+python-dateutil
+PyYAML
+unittest2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tar_scm.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tar_scm.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tar_scm.py 2017-03-24
13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tar_scm.py 2017-04-13
18:35:01.000000000 +0200
@@ -11,10 +11,11 @@
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# See http://www.gnu.org/licenses/gpl-2.0.html for full license text.
+
import os
import sys
-sys.path.append(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(os.path.dirname(os.path.abspath(__file__))) # noqa
import TarSCM
import TarSCM.tasks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
---
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
2017-03-24 13:24:03.000000000 +0100
+++
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
2017-04-13 18:35:01.000000000 +0200
@@ -2,8 +2,8 @@
version: 1.0
summary: Libpipeline example
description: |
- This is an example package of an autotools project built
- with snapcraft using a remote source.
+ This is an example package of an autotools project built with snapcraft
+ using a remote source.
apps:
pipelinetest:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/scm.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/scm.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/scm.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/scm.py
2017-04-13 18:35:01.000000000 +0200
@@ -1,4 +1,3 @@
-import unittest
import sys
import os
import argparse
@@ -12,6 +11,11 @@
import TarSCM
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
class SCMBaseTestCases(unittest.TestCase):
def setUp(self):
@@ -35,22 +39,22 @@
self.cli.snapcraft = True
def test_prep_tree_for_archive(self):
- tasks = TarSCM.tasks()
- scm_base = scm(self.cli, tasks)
- basedir = os.path.join(self.tmp_dir,
- self.__class__.__name__)
- dir1 = os.path.join(basedir, "test1")
+ tasks = TarSCM.tasks()
+ scm_base = scm(self.cli, tasks)
+ basedir = os.path.join(self.tmp_dir, self.__class__.__name__)
+ dir1 = os.path.join(basedir, "test1")
scm_base.clone_dir = basedir
os.makedirs(dir1)
- self.assertRaisesRegexp(
- Exception,
- re.compile('No such file or directory'),
- scm_base.prep_tree_for_archive,
- "test2",
- basedir,
- "test1"
- )
+ with self.assertRaises(Exception) as ctx:
+ scm_base.prep_tree_for_archive(
+ "test2",
+ basedir,
+ "test1"
+ )
+
+ self.assertRegexpMatches(ctx.exception.message,
+ 'No such file or directory')
scm_base.prep_tree_for_archive("test1", basedir, "test2")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/scmlogs.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/scmlogs.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/scmlogs.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/scmlogs.py
2017-04-13 18:35:01.000000000 +0200
@@ -75,7 +75,7 @@
def annotate(self, msg):
log = open(self.current_log_path, 'a')
log.write('# ' + msg + "\n")
- print (msg)
+ print(msg)
log.close()
def read(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/tasks.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/tasks.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/tasks.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/tasks.py
2017-04-13 18:35:01.000000000 +0200
@@ -1,4 +1,3 @@
-import unittest
import sys
import os
import argparse
@@ -10,6 +9,11 @@
from tar_scm import TarSCM
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
class TasksTestCases(unittest.TestCase):
def setUp(self):
@@ -55,7 +59,7 @@
'scm': 'bzr', 'clone_prefix': '_obs_', 'snapcraft': True,
'revision': None, 'url': 'lp:~mterry/libpipeline/printf',
'filename': 'libpipeline', 'use_obs_scm': True,
- 'jailed': 0, 'outdir': self.cli.outdir, 'changesgenerate': False}
+ 'outdir': self.cli.outdir, 'changesgenerate': False}
self._cd_fixtures_dir()
tasks = TarSCM.tasks()
tasks.generate_list(self.cli)
@@ -72,7 +76,9 @@
'revision': None,
'url': 'https://github.com/probonopd/QtQuickApp.git',
'use_obs_scm': True,
- 'jailed': 0, 'outdir': self.cli.outdir, 'changesgenerate': False}
+ 'outdir': self.cli.outdir,
+ 'changesgenerate': False
+ }
self._cd_fixtures_dir()
tasks = TarSCM.tasks()
tasks.generate_list(self.cli)
@@ -87,7 +93,6 @@
'changesgenerate': False,
'clone_prefix': '_obs_',
'filename': 'libpipeline',
- 'jailed': 0,
'outdir': self.cli.outdir,
'revision': None,
'scm': 'bzr',
@@ -99,7 +104,6 @@
'changesgenerate': False,
'clone_prefix': '_obs_',
'filename': 'kanku',
- 'jailed': 0,
'outdir': self.cli.outdir,
'revision': None,
'scm': 'git',
@@ -119,12 +123,13 @@
self._restore_cwd()
def test_tasks_finalize(self):
- expected = '''apps:
+ expected = '''\
+apps:
pipelinetest:
command: ./bin/test
-description: 'This is an example package of an autotools project built
+description: 'This is an example package of an autotools project built with
snapcraft
- with snapcraft using a remote source.
+ using a remote source.
'
name: pipelinetest
@@ -139,7 +144,7 @@
source: libpipeline
summary: Libpipeline example
version: 1.0
-'''
+''' # noqa
self._cd_fixtures_dir()
tasks = TarSCM.tasks()
if not os.path.exists(self.cli.outdir):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/test.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/test.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/test.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/test.py
2017-04-13 18:35:01.000000000 +0200
@@ -7,7 +7,6 @@
import re
import shutil
import sys
-import unittest
from gittests import GitTests
from svntests import SvnTests
@@ -18,6 +17,11 @@
from tasks import TasksTestCases
from scm import SCMBaseTestCases
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
if __name__ == '__main__':
suite = unittest.TestSuite()
testclasses = [
@@ -43,11 +47,9 @@
#
# suite.addTest(HgTests('test_version_versionformat'))
# suite.addTest(HgTests('test_versionformat_dateYYYYMMDD'))
- #
- # test_class = GitTests
+ test_class = GitTests
# test_class = TasksTestCases
- # test_class = GitUnitTestCases
- test_class = UnitTestCases
+ # test_class = UnitTestCases
to_run = {}
for arg in sys.argv[1:]:
m = re.match('^/(.+)/$', arg)
@@ -70,10 +72,9 @@
# 'verbosity' : 2,
}
major, minor, micro, releaselevel, serial = sys.version_info
- if major > 2 or (major == 2 and minor >= 7):
- # New in 2.7
- runner_args['buffer'] = True
- # runner_args['failfast'] = True
+ # New in 2.7 but available in earlier versions via unittest2
+ runner_args['buffer'] = True
+ # runner_args['failfast'] = True
runner = unittest.TextTestRunner(**runner_args)
result = runner.run(suite)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/testassertions.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/testassertions.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/testassertions.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/testassertions.py
2017-04-13 18:35:01.000000000 +0200
@@ -5,7 +5,11 @@
import re
import sys
import tarfile
-import unittest
+
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
line_start = '(^|\n)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/testenv.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/testenv.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/testenv.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/testenv.py
2017-04-13 18:35:01.000000000 +0200
@@ -204,7 +204,7 @@
ret = 1
succeeded = False
except Exception as e:
- sys.stderr.write(e.msg)
+ sys.stderr.write(e.message)
ret = 1
succeeded = False
finally:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/unittestcases.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/unittestcases.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/unittestcases.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/unittestcases.py
2017-04-13 18:35:01.000000000 +0200
@@ -1,6 +1,5 @@
#!/usr/bin/env python2
-import unittest
import sys
import os
import re
@@ -20,6 +19,11 @@
from TarSCM.archive import obscpio
from TarSCM.archive import tar
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
class UnitTestCases(unittest.TestCase):
def setUp(self):
@@ -194,6 +198,8 @@
repohash,
'b9761648b96f105d82a97b8a81f1ca060b015a3f882ef9a55ae6b5bf7be0d48a')
+ @unittest.skip("Broken test, relies on a fixture set which is a .git file"
+ " which is excluded while package building")
def test_obscpio_create_archive(self):
tc_name = inspect.stack()[0][3]
cl_name = self.__class__.__name__
@@ -258,6 +264,8 @@
outdir
)
+ @unittest.skip("Broken test, actually raises "
+ "SystemExit: No such file or directory")
def test_obscpio_extract_from_archive_directory(self):
tc_name = inspect.stack()[0][3]
cl_name = self.__class__.__name__
@@ -276,9 +284,8 @@
outdir
)
+ @unittest.skip("Broken test, relies on the results of an other test case")
def test_scm_tar(self):
- # TODO: This test case relies on the results of an other
- # tests case. It has to be discussed if this is acceptable.
tc_name = inspect.stack()[0][3]
cl_name = self.__class__.__name__
cur_cwd = os.getcwd()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/utils.py
new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/utils.py
--- old/obs-service-tar_scm-0.7.0.1490358243.8de854e/tests/utils.py
2017-03-24 13:24:03.000000000 +0100
+++ new/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/utils.py
2017-04-13 18:35:01.000000000 +0200
@@ -31,9 +31,9 @@
def quietrun(cmd):
(stdout, stderr, ret) = run_cmd(cmd)
if ret != 0:
- print (cmd, " failed!")
- print (stdout)
- print (stderr)
+ print(cmd, " failed!")
+ print(stdout)
+ print(stderr)
return (stdout, stderr, ret)