Hello community,

here is the log from the commit of package obs-service-tar_scm for 
openSUSE:Factory checked in at 2018-04-22 14:30:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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"

Sun Apr 22 14:30:47 2018 rev:46 rq:596964 version:0.8.0.1520581079.e26b0ae

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes  
2017-10-18 12:49:45.061273674 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 
    2018-04-22 14:30:58.539780282 +0200
@@ -1,0 +2,26 @@
+Fri Apr 13 08:49:56 UTC 2018 - [email protected]
+
+- python-unittest2 is only required for the optional make check
+
+-------------------------------------------------------------------
+Fri Mar 09 07:39:08 UTC 2018 - [email protected]
+
+- Update to version 0.8.0.1520581079.e26b0ae:
+  * make installation of scm's optional
+  * add a lot more detail to README
+  * Git clone with --no-checkout in prepare_working_copy
+  * Refactor and simplify git prepare_working_copy
+  * Cleanup flake8 checks
+  * Only use current dir if it actually looks like git (Fixes #202)
+  * reactivate test_obscpio_extract_d
+  * fix broken test create_archive
+  * fix broken tests for broken-links
+  * changed PREFIX in Gnumakefile to /usr
+  * new cli option --skip-cleanup
+  * fix for broken links
+  * fix reference to snapcraft YAML file
+  * fix docstring typo in TarSCM.scm.tar.fetch_upstream
+  * acknowledge deficiencies in dev docs
+  * wrap long lines in README
+
+-------------------------------------------------------------------

Old:
----
  obs-service-tar_scm-0.8.0.1507129410.0cb2d44.tar.gz

New:
----
  obs-service-tar_scm-0.8.0.1520581079.e26b0ae.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.5kw76W/_old  2018-04-22 14:30:59.135758712 +0200
+++ /var/tmp/diff_new_pack.5kw76W/_new  2018-04-22 14:30:59.139758567 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package obs-service-tar_scm
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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
@@ -19,11 +19,11 @@
 %bcond_without obs_scm_testsuite
 
 Name:           obs-service-tar_scm
-%define version_unconverted 0.8.0.1507129410.0cb2d44
-Version:        0.8.0.1507129410.0cb2d44
+%define version_unconverted 0.8.0.1520581079.e26b0ae
+Version:        0.8.0.1520581079.e26b0ae
 Release:        0
 Summary:        An OBS source service: create tar ball from svn/git/hg
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Development/Tools/Building
 Url:            https://github.com/openSUSE/obs-service-tar_scm
 Source:         %{name}-%{version}.tar.gz
@@ -34,6 +34,7 @@
 BuildRequires:  bzr
 BuildRequires:  git-core
 BuildRequires:  mercurial
+BuildRequires:  subversion
 %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
 %define py_compile(O)  \
 find %1 -name '*.pyc' -exec rm -f {} \\; \
@@ -50,15 +51,14 @@
 BuildRequires:  python-dateutil
 BuildRequires:  python-lxml
 BuildRequires:  python-mock
-BuildRequires:  subversion
+BuildRequires:  python-unittest2
 %endif
 BuildRequires:  python >= 2.6
-BuildRequires:  python-unittest2
-Requires:       bzr
 Requires:       git-core
-Requires:       mercurial
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 Requires:       obs-service-obs_scm-common = %version-%release
-Requires:       subversion
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
@@ -99,11 +99,11 @@
 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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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.
@@ -114,11 +114,11 @@
 %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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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
@@ -128,11 +128,11 @@
 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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.5kw76W/_old  2018-04-22 14:30:59.207756106 +0200
+++ /var/tmp/diff_new_pack.5kw76W/_new  2018-04-22 14:30:59.207756106 +0200
@@ -5,4 +5,4 @@
             <param 
name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
           <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">750affe3712d0fccfbc7b9cab03d278de28f5543</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">1d2c3354f318bec26ba21df0c6b2218776a9dc05</param></service></servicedata>
\ No newline at end of file

++++++ obs-service-tar_scm-0.8.0.1507129410.0cb2d44.tar.gz -> 
obs-service-tar_scm-0.8.0.1520581079.e26b0ae.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/.flake8 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/.flake8
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/.flake8    1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/.flake8    2018-03-09 
08:37:59.000000000 +0100
@@ -0,0 +1,3 @@
+[flake8]
+exclude = tests
+ignore=E221,E251,E272,E241,E731,F401,E722
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/.travis.yml 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/.travis.yml
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/.travis.yml        
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/.travis.yml        
2018-03-09 08:37:59.000000000 +0100
@@ -4,7 +4,7 @@
   - "2.7"
 before_install:
   - sudo apt-get update -qq
-  - sudo apt-get install -qq bzr git mercurial subversion
+  - sudo apt-get install -qq bzr git mercurial subversion tar
 install:
   - pip install -r requirements.txt
   - if [[ ${TRAVIS_PYTHON_VERSION:0:3} == 2.7 ]]; then pip install flake8 
pylint; fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/CONTRIBUTING.md 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/CONTRIBUTING.md
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/CONTRIBUTING.md    
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/CONTRIBUTING.md    
2018-03-09 08:37:59.000000000 +0100
@@ -2,6 +2,10 @@
 
 If you notice an issue, please first check [the list of known 
issues](https://github.com/openSUSE/obs-service-tar_scm/issues?state=open).
 
+It is a known issue that currently [we need better developer
+documentation](https://github.com/openSUSE/obs-service-tar_scm/issues/195),
+and help fixing this is extremely welcome.
+
 ## Pull requests
 
 [Pull requests](https://help.github.com/articles/using-pull-requests)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/GNUmakefile 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/GNUmakefile
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/GNUmakefile        
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/GNUmakefile        
2018-03-09 08:37:59.000000000 +0100
@@ -5,7 +5,7 @@
 SHELL    = /bin/bash -o pipefail
 
 DESTDIR ?=
-PREFIX   = /usr/local
+PREFIX   = /usr
 SYSCFG   = /etc
 
 CLEAN_PYFILES = \
@@ -21,7 +21,6 @@
   ./tests/unittestcases.py \
   ./tests/archiveobscpiotestcases.py \
 
-
 PYLINT_READY_TEST_MODULES = \
   $(CLEAN_TEST_PYFILES) \
   ./tests/test.py \
@@ -37,75 +36,6 @@
   ./TarSCM/cli.py  \
   ./TarSCM/tasks.py  \
 
-PYLINT_NOT_READY_MODULES = \
-./tests/tasks.py \
-./tests/scm.py \
-./tests/svnfixtures.py \
-./tests/commontests.py \
-./tests/hgfixtures.py \
-./tests/testassertions.py \
-./tests/bzrfixtures.py \
-./tests/gitfixtures.py \
-./tests/githgtests.py \
-./tests/gitsvntests.py \
-./tests/gittests.py \
-./tests/svntests.py \
-./tests/testenv.py \
-./tests/bzrtests.py \
-./tests/fixtures.py \
-./tests/hgtests.py \
-./TarSCM/scm/base.py \
-./TarSCM/scm/tar.py \
-./TarSCM/changes.py \
-./TarSCM/config.py \
-./TarSCM/archive.py \
-./TarSCM/helpers.py \
-
-FLAKE8_READY_FILES = \
-$(CLEAN_PYFILES) \
-  ./TarSCM/scm/bzr.py \
-  ./TarSCM/scm/svn.py \
-  ./TarSCM/scm/tar.py \
-  ./TarSCM/exceptions.py \
-
-
-FLAKE8_NOT_READY_FILES = \
-  ./tests/hgfixtures.py \
-  ./tests/tasks.py \
-  ./tests/scm.py \
-  ./tests/test.py \
-  ./tests/svnfixtures.py \
-  ./tests/commontests.py \
-  ./tests/testassertions.py \
-  ./tests/bzrfixtures.py \
-  ./tests/gitfixtures.py \
-  ./tests/githgtests.py \
-  ./tests/gitsvntests.py \
-  ./tests/scmlogs.py \
-  ./tests/gittests.py \
-  ./tests/svntests.py \
-  ./tests/testenv.py \
-  ./tests/tartests.py \
-  ./tests/unittestcases.py \
-  ./tests/bzrtests.py \
-  ./tests/fixtures.py \
-  ./tests/hgtests.py \
-  ./tar_scm.py \
-  ./TarSCM/scm/base.py \
-  ./TarSCM/scm/git.py \
-  ./TarSCM/scm/hg.py \
-  ./TarSCM/scm/__init__.py \
-  ./TarSCM/__init__.py \
-  ./TarSCM/cli.py \
-  ./TarSCM/changes.py \
-  ./TarSCM/config.py \
-  ./TarSCM/archive.py \
-  ./TarSCM/helpers.py \
-  ./TarSCM/tasks.py \
-
-
-ALL_PY_MODULES = $(PYLINT_READY_MODULES) $(PYLINT_READY_MODULES)
-
 define first_in_path
 $(or \
     $(firstword $(wildcard \
@@ -151,31 +81,19 @@
 default: check
 
 .PHONY: check check_all
-check: pep8 flake8 pylint test # test3
+check: flake8 pylint test # test3
 
 .PHONY: list-py-files
 list-py-files:
        @$(LIST_PY_FILES)
 
-.PHONY: pep8
-pep8: $(PY_FILES)
-       # flake8 obsoletes pep8 in openSUSE TW 20170626, so we make this test 
optional
-       @if ! which pep8 >/dev/null 2>&1; then \
-               echo "pep8 not installed!  Cannot check PEP8 compliance. 
Skipping tests." >&2; \
-       else \
-               echo "Running pep8";\
-               $(LIST_PY_FILES) | xargs pep8 
--ignore=E221,E251,E272,E241,E731;\
-       fi
-
 .PHONY: flake8
 flake8:
-       # Tests might run under python 2.6 and we only want to run linting 
under one python 
-       # version
        @if ! which flake8 >/dev/null 2>&1; then \
                echo "flake8 not installed!  Cannot check PEP8 compliance with 
flake8. Skipping tests." >&2; \
        else \
                echo "Running flake8";\
-               flake8 --ignore=E221,E251,E272,E241,E731 $(FLAKE8_READY_FILES);\
+               flake8;\
        fi
 
 .PHONY: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/README.md 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/README.md
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/README.md  2017-10-04 
17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/README.md  2018-03-09 
08:37:59.000000000 +0100
@@ -1,49 +1,160 @@
 # tar_scm (OBS source service) [![Build 
Status](https://travis-ci.org/openSUSE/obs-service-tar_scm.png?branch=master)](https://travis-ci.org/openSUSE/obs-service-tar_scm)
 
-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.
+This is the git repository for
+[openSUSE:Tools/obs-service-tar_scm](https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm),
+which provides several [source
+services](http://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_service.html)
+for the [Open Build Service](http://openbuildservice.org/) which all
+assist with packaging source code from SCM (source code management)
+repositories into tarballs.  The authoritative source is
+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.
+## Services
 
-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.
+### tar_scm *(deprecated)*
 
-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
+`tar_scm` is the legacy source service used to create a source tarball
+from one of the supported SCM (source code management) tools: `git`,
+`hg`, `svn`, and `bzr`.
+
+`tar_scm` supports many options, e.g. it can adjust resulting tarball
+parameters, include or exclude particular files when creating the
+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.
+
+`tar_scm` can be used in combination with other services like
+[download_files](https://github.com/openSUSE/obs-service-download_files),
+[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.
 
-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.
+**`tar_scm` is deprecated in favour of `obs_scm`.**
 
-## Archive Formats
+### obs_scm
 
-### obscpio
-The `obscpio` archive format is the new OBS specific archive format based on 
`cpio` which can be consumed and generated by the [OBS Delta 
Store](http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.architecture.html#delta_store)
 to store changes in an incremental way independently from your chosen SCM.
-The `obs_scm` service generates archives in this format, which is basically 
the `cpio` `newc` format.
+`obs_scm` is similar in concept to `tar_scm`, but instead of directly
+generating tarballs, it instead uses the new `obscpio` archive format
+(see below) as an intermediate space-efficient format in which to
+store the sources.
+
+**It is recommended to use `obs_scm` in favour to `tar_scm`**, because
+it provides the following advantages:
+
+1. When you `osc checkout`, you'll also get a local checkout directory
+   within the project directory, inside which you can develop as usual
+   and test your changes with local builds, even without having to
+   commit or push your changes anywhere.
+
+2. It helps to save a *lot* of disk space on the server side,
+   especially when used in continuous integration (e.g. nightly builds
+   and builds of pull requests).
+
+The usual source tarballs can be regenerated from this at build-time
+using the `tar` and `recompress` source services, so no changes to
+`.spec` files are required when switching to `obs_scm` and `obscpio`.
+
+Having said that, it may be more efficient to drop the build-time
+usage of `recompress`, since at build-time `rpmbuild` would decompress
+the same file soon after compressing it.  In this case, only the `tar`
+source service would be used to reconstruct an uncompressed tarball to
+be consumed by the `.spec` file.  However this has the side-effect
+that the resulting `.src.rpm` will contain an uncompressed tarball
+too.  This is not necessarily a problem because `.src.rpm` files are
+compressed anyway, and in fact it may even be *more* efficient to
+avoid double compression (i.e. the sources within the `.src.rpm`, and
+the `.src.rpm` itself both being compressed).  But this depends very
+much on the combination of compression formats used for compression of
+the sources, and for compression of the `.src.rpm`.  Therefore the
+decision whether to use `recompress` will depend on what format is
+desired within the resulting `.src.rpm`, and on the types of
+compression being used for both the tarball and by `rpmbuild` for
+constructing the source rpms.
+
+`obs_scm` additionally generates a file named `<package>.obsinfo`
+which includes useful information from your SCM system, such as the
+name, version number, mtime, and commit SHA1.  This data is then used
+by the `tar` service (see below) to reconstruct a tarball for use by
+`rpmbuild` at build-time, and also by the
+[`set_version`](https://github.com/openSUSE/obs-service-set_version)
+source service in order to set the version in build description files
+such as `.spec` or `.dsc` files.
 
 ### tar
-The standard `tar` archive format is used as output format by the `tar` and 
`tar_scm` source services.
 
-## Services
+The `tar` source service creates a tarball out of a `.obscpio` archive
+and a corresponding `.obsinfo` file which contains metadata about it.
+Typically this service is run at build-time, e.g.
+
+    <service name="tar" mode="buildtime"/>
+
+since storing the `.tar` file in OBS would duplicate the source data
+in the `.obscpio` and defeat the point of using `.obscpio` in the
+first place, which is to save space on the OBS server.
 
-### tar_scm
-`tar_scm` is the legacy source service used to create a source tarball from a 
source code management tool.
+See http://openbuildservice.org/2016/04/08/new_git_in_27/ for an example
+combining usage of the `obs_scm` and `tar` source services.
 
-### obs_scm
-`obs_scm` uses the new `obscpio` archive format to store the sources.
-It is recommended to use `obs_scm` in favour to `tar_scm`, because it helps to 
save a lot of disk space on the server side, especially when used in continuous 
integration (e.g. nightly builds etc.).
-The usual source tarballs can be regenerated from this at build-time using the 
`tar` and `recompress` source services, so no changes to `.spec` files are 
required when switching to `obs_scm` and `obscpio`.
+### snapcraft
+
+The `snapcraft` source service can be used to fetch sources before
+building a [`snappy` app (a.k.a. *snap*)](https://snapcraft.io/).
 
-`obs_scm` additionally generates a file named `<package>.obsinfo` which 
includes useful information from your SCM system, so this data can be accessed 
at build-time.
+It parses [a `snapcraft.yaml`
+file](https://docs.snapcraft.io/build-snaps/syntax), looking for any
+[parts in the `parts`
+section](https://docs.snapcraft.io/build-snaps/parts) which have
+[`source-type`](https://docs.snapcraft.io/reference/plugins/source)
+set to one of the supported SCMs.  For each one it will fetch the
+sources via the SCM from the upstream repository, and build a tarball
+from it.
+
+Finally it will write a new version of `snapcraft.yaml` which has the
+`source` value rewritten from the original URL, to the name of the
+part, which is also the name of the newly created local file.  This
+allows the snap to be built purely from local files.
+
+### appimage
+
+The `appimage` source service can be used to fetch sources before
+building an [AppImage](http://appimage.org/).  It parses [an
+`appimage.yml`
+file](https://github.com/AppImage/AppImages/blob/master/YML.md), looks
+for an optional `build` section at the top-level, and for any sub-key
+named after a supported SCM, it will treat the corresponding value as
+a URL, fetch the sources via the SCM from the upstream repository, and
+build a tarball from it.  You can find example `appimage.yml` files
+under the `tests/fixtures/` subdirectory.
+
+## Archive Formats
 
 ### tar
-The `tar` source service creates a tarball out of `obscpio` archives.
 
-### snapcraft
-The `snapcraft` source service can be used to fetch sources before building a 
[`snappy` app (a.k.a. *snap*)](https://snapcraft.io/).
-It parses a `snapcraft.yml` file, for the SCM related parts and executes the 
corresponding services.
+The standard `tar` archive format is used as output format by the
+`tar` and `tar_scm` source services.
 
-### appimage
-The `appimage` source service can be used to fetch sources before building an 
[AppImage app](http://appimage.org/).
-It parses an `appimage.yml` file for the SCM related parts and executes the 
corresponding services.
+### obscpio
+
+`obscpio` archives are
+[`cpio`](https://www.gnu.org/software/cpio/manual/cpio.html) archives
+in `newc` format.  Using these allows the [OBS Delta
+Store](http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.architecture.html#delta_store)
+to store changes server-side in a space-efficient incremental way,
+independently of your chosen SCM.  Then at build-time, the `tar`
+source service converts a file from this format into a regular `.tar`
+for use by `rpmbuild`.  This is described in more detail in this blog
+post:
+
+- http://openbuildservice.org/2016/04/08/new_git_in_27/
 
 ## Installation
-The files in this top-level directory need to be installed using the following:
+
+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.8.0.1507129410.0cb2d44/TarSCM/archive.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/archive.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/archive.py  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/archive.py  
2018-03-09 08:37:59.000000000 +0100
@@ -90,7 +90,10 @@
 
         tstamp = self.helpers.get_timestamp(scm_object, args, topdir)
         for name in sorted(cpiolist):
-            os.utime(name, (tstamp, tstamp))
+            try:
+                os.utime(name, (tstamp, tstamp))
+            except OSError:
+                pass
             proc.stdin.write(name)
             proc.stdin.write("\n")
         proc.stdin.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/changes.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/changes.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/changes.py  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/changes.py  
2018-03-09 08:37:59.000000000 +0100
@@ -69,7 +69,7 @@
 
         try:
             return ET.parse(servicedata_file, parser=xml_parser)
-        except StandardError as exc:
+        except Exception as exc:
             # Tolerate an empty file, but any other parse error should be
             # made visible.
             if str(exc).startswith("Document is empty") or \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/cli.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/cli.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/cli.py      
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/cli.py      
2018-03-09 08:37:59.000000000 +0100
@@ -111,6 +111,11 @@
         # obs_scm instead
         parser.add_argument('--use-obs-scm', default = False,
                             help='use obs scm (obscpio) ')
+
+        parser.add_argument('--skip-cleanup', default = False,
+                            action='store_true',
+                            help='do not cleanup directories before exiting '
+                                 '(Only for debugging')
         args = parser.parse_args(options)
 
         # basic argument validation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/base.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/base.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/base.py 
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/base.py 
2018-03-09 08:37:59.000000000 +0100
@@ -7,6 +7,7 @@
 import shutil
 import fcntl
 import time
+import subprocess
 
 from TarSCM.helpers import Helpers
 from TarSCM.changes import Changes
@@ -46,6 +47,13 @@
         self._calc_repocachedir()
         self._final_rename_needed = False
 
+    def check_scm(self):
+        '''check version of scm to proof, it is installed and executable'''
+        subprocess.Popen(
+            [self.scm, '--version'],
+            stdout=subprocess.PIPE
+        ).communicate()
+
     def switch_revision(self):
         '''Switch sources to revision. Dummy implementation for version control
         systems that change revision during fetch/update.
@@ -147,7 +155,9 @@
         # 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.args.use_obs_scm and
+                os.getenv('OSC_VERSION') and
+                os.path.isdir('.git')):
             self.repodir = os.getcwd()
 
         # construct repodir (the parent directory of the checkout)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/git.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/git.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/git.py  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/git.py  
2018-03-09 08:37:59.000000000 +0100
@@ -232,7 +232,7 @@
 
         if last_rev == current_rev:
             logging.debug("No new commits, skipping changes file generation")
-            return
+            return None
 
         dbg_msg = "Generating changes between %s and %s" % (last_rev,
                                                             current_rev)
@@ -258,7 +258,7 @@
         # between multiple services
         org_clone_dir  = self.clone_dir
         self.clone_dir = self.repodir
-        command = ['git', 'clone', self.repocachedir, self.url, self.clone_dir]
+        command = ['git', 'clone', '--no-checkout']
         use_reference = True
         try:
             if self.args.package_meta:
@@ -268,10 +268,10 @@
             pass
 
         if use_reference:
-            command = ['git', 'clone', '--reference', org_clone_dir, self.url,
-                       self.clone_dir]
+            command.extend(['--reference', org_clone_dir, self.url])
         else:
-            command = ['git', 'clone', org_clone_dir, self.clone_dir]
+            command.append(org_clone_dir)
+        command.append(self.clone_dir)
         wdir = os.path.abspath(os.path.join(self.clone_dir, os.pardir))
         self.helpers.safe_run(
             command, cwd=wdir, interactive=sys.stdout.isatty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/svn.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/svn.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/svn.py  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/svn.py  
2018-03-09 08:37:59.000000000 +0100
@@ -80,7 +80,7 @@
 
         if last_rev == current_rev:
             logging.debug("No new commits, skipping changes file generation")
-            return
+            return None
 
         if not first_run:
             # Increase last_rev by 1 so we dont get duplication of log messages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/tar.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/tar.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/scm/tar.py  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/scm/tar.py  
2018-03-09 08:37:59.000000000 +0100
@@ -7,7 +7,7 @@
     scm = 'tar'
 
     def fetch_upstream(self):
-        """SCM specific version of fetch_uptream for tar."""
+        """SCM specific version of fetch_upstream for tar."""
         if self.args.obsinfo is None:
             files = glob.glob('*.obsinfo')
             if files:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/tasks.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/tasks.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/TarSCM/tasks.py    
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/TarSCM/tasks.py    
2018-03-09 08:37:59.000000000 +0100
@@ -1,6 +1,7 @@
 '''
 This module contains the class tasks
 '''
+from __future__ import print_function
 
 import glob
 import copy
@@ -10,13 +11,13 @@
 import shutil
 import sys
 import re
+import yaml
 
 import TarSCM.scm
 import TarSCM.archive
 from TarSCM.helpers import Helpers
 from TarSCM.changes import Changes
 from TarSCM.exceptions import OptionsError
-import yaml
 
 
 class Tasks():
@@ -35,6 +36,10 @@
 
     def cleanup(self):
         """Cleaning temporary directories."""
+        if self.args.skip_cleanup:
+            logging.debug("Skipping cleanup")
+            return
+
         logging.debug("Cleaning: %s", ' '.join(self.cleanup_dirs))
 
         for dirname in self.cleanup_dirs:
@@ -49,7 +54,7 @@
 
     def generate_list(self):
         '''
-        Generate list of scm jobs from appimage.yml, snapcraft.yml or a single
+        Generate list of scm jobs from appimage.yml, snapcraft.yaml or a single
         job from cli arguments.
         '''
         args = self.args
@@ -154,6 +159,12 @@
         # if exception occurs
         self.scm_object = scm_object   = scm_class(args, self)
 
+        try:
+            scm_object.check_scm()
+        except OSError:
+            print("Please install '%s'" % scm_object.scm)
+            sys.exit(1)
+
         scm_object.fetch_upstream()
 
         if args.filename:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/dist/obs-service-tar_scm.spec 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/dist/obs-service-tar_scm.spec
--- 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/dist/obs-service-tar_scm.spec  
    2017-10-04 17:03:30.000000000 +0200
+++ 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/dist/obs-service-tar_scm.spec  
    2018-03-09 08:37:59.000000000 +0100
@@ -31,9 +31,10 @@
 # based distributions
 #Patch0:         0001-Debianization-disable-running-mercurial-tests.patch
 %if %{with obs_scm_testsuite}
-BuildRequires:  bzr
 BuildRequires:  git-core
+BuildRequires:  bzr
 BuildRequires:  mercurial
+BuildRequires:  subversion
 %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
 %define py_compile(O)  \
 find %1 -name '*.pyc' -exec rm -f {} \\; \
@@ -50,15 +51,14 @@
 BuildRequires:  python-dateutil
 BuildRequires:  python-lxml
 BuildRequires:  python-mock
-BuildRequires:  subversion
 %endif
 BuildRequires:  python >= 2.6
 BuildRequires:  python-unittest2
-Requires:       bzr
 Requires:       git-core
-Requires:       mercurial
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 Requires:       obs-service-obs_scm-common = %version-%release
-Requires:       subversion
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
@@ -99,11 +99,11 @@
 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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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.
@@ -114,11 +114,11 @@
 %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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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
@@ -128,11 +128,11 @@
 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
+Recommends:     bzr
+Recommends:     mercurial
+Recommends:     subversion
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/archiveobscpiotestcases.py
 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/archiveobscpiotestcases.py
--- 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/archiveobscpiotestcases.py
   2017-10-04 17:03:30.000000000 +0200
+++ 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/archiveobscpiotestcases.py
   2018-03-09 08:37:59.000000000 +0100
@@ -5,12 +5,17 @@
 import os
 import re
 import inspect
+import shutil
 
 import TarSCM
 
 from TarSCM.scm.git import Git
 from TarSCM.archive import ObsCpio
 
+from tests.gitfixtures import GitFixtures
+from tests.scmlogs import ScmInvocationLogs
+
+
 if sys.version_info < (2, 7):
     # pylint: disable=import-error
     import unittest2 as unittest
@@ -30,16 +35,22 @@
         self.cli.parse_args(['--outdir', '.'])
         os.environ['CACHEDIRECTORY'] = ''
 
-    @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__
+        c_dir                = os.path.join(self.tmp_dir, tc_name)
+        f_dir                = os.path.join(self.fixtures_dir, tc_name, 'repo')
+        shutil.copytree(f_dir, c_dir)
+        scmlogs              = ScmInvocationLogs('git', c_dir)
+        scmlogs.next('start-test')
+        fixture              = GitFixtures(c_dir, scmlogs)
+        fixture.init()
         scm_object           = Git(self.cli, self.tasks)
-        scm_object.clone_dir = os.path.join(self.fixtures_dir, tc_name, 'repo')
-        scm_object.arch_dir  = os.path.join(self.fixtures_dir, tc_name, 'repo')
+        scm_object.clone_dir = fixture.repo_path
+        scm_object.arch_dir  = fixture.repo_path
         outdir               = os.path.join(self.tmp_dir, cl_name, tc_name,
                                             'out')
+
         self.cli.outdir      = outdir
         arch                 = ObsCpio()
         os.makedirs(outdir)
@@ -106,8 +117,6 @@
             outdir
         )
 
-    @unittest.skip("Broken test, actually raises "
-                   "SystemExit: No such file or directory")
     def test_obscpio_extract_d(self):
         '''
         Test obscpio to extract directory from archive
@@ -128,3 +137,35 @@
             files,
             outdir
         )
+
+    def test_obscpio_broken_link(self):
+        tc_name              = inspect.stack()[0][3]
+        cl_name              = self.__class__.__name__
+        c_dir                = os.path.join(self.tmp_dir, tc_name)
+        scmlogs              = ScmInvocationLogs('git', c_dir)
+        scmlogs.next('start-test')
+        fixture              = GitFixtures(c_dir, scmlogs)
+        fixture.init()
+        scm_object           = Git(self.cli, self.tasks)
+        scm_object.clone_dir = fixture.repo_path
+        scm_object.arch_dir  = fixture.repo_path
+        outdir               = os.path.join(self.tmp_dir, cl_name, tc_name,
+                                            'out')
+        cwd = os.getcwd()
+        print("cwd = %s" % cwd)
+        os.chdir(fixture.repo_path)
+        os.symlink('non-existant-file', 'broken-link')
+        fixture.run('add broken-link')
+        fixture.run("commit -m 'added broken-link'")
+        os.chdir(cwd)
+
+        self.cli.outdir      = outdir
+        arch                 = ObsCpio()
+        os.makedirs(outdir)
+        arch.create_archive(
+            scm_object,
+            cli      = self.cli,
+            basename = 'test',
+            dstname  = 'test',
+            version  = '0.1.1'
+        )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/fixtures/ArchiveOBSCpioTestCases/test_obscpio_broken_link/repo/broken_link
 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/fixtures/ArchiveOBSCpioTestCases/test_obscpio_broken_link/repo/broken_link
--- 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/fixtures/ArchiveOBSCpioTestCases/test_obscpio_broken_link/repo/broken_link
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/fixtures/ArchiveOBSCpioTestCases/test_obscpio_broken_link/repo/broken_link
   2018-04-22 14:30:59.387749591 +0200
@@ -0,0 +1 @@
+symbolic link to non-existant-file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/gitsvntests.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/gitsvntests.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/gitsvntests.py       
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/gitsvntests.py       
2018-03-09 08:37:59.000000000 +0100
@@ -71,7 +71,7 @@
 
     def test_changesgenerate_no_change_same_changes_file(self):
         self._write_servicedata(2)
-        orig_changes = self._write_changes_file()
+        self._write_changes_file()
         self.tar_scm_std('--changesgenerate', 'enable')
         self._check_servicedata()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/scm-wrapper 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/scm-wrapper
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/scm-wrapper  
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/scm-wrapper  
2018-03-09 08:37:59.000000000 +0100
@@ -23,4 +23,8 @@
 
 echo "$me $*" >> "$SCM_INVOCATION_LOG"
 
-/usr/bin/$me "$@"
+if [ -x /usr/bin/$me ];then
+  /usr/bin/$me "$@"
+else
+  /bin/$me "$@"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/test.py 
new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/test.py
--- old/obs-service-tar_scm-0.8.0.1507129410.0cb2d44/tests/test.py      
2017-10-04 17:03:30.000000000 +0200
+++ new/obs-service-tar_scm-0.8.0.1520581079.e26b0ae/tests/test.py      
2018-03-09 08:37:59.000000000 +0100
@@ -114,5 +114,6 @@
         print("You should remove these prior to the next test run.")
         sys.exit(1)
 
+
 if __name__ == '__main__':
     main()


Reply via email to