Hello community, here is the log from the commit of package obs-service-tar_scm for openSUSE:Factory checked in at 2018-07-07 21:53:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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" Sat Jul 7 21:53:08 2018 rev:48 rq:620565 version:0.9.1.1530616709.1329314 Changes: -------- --- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes 2018-04-27 15:59:57.318911063 +0200 +++ /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 2018-07-07 21:53:15.907708890 +0200 @@ -1,0 +2,14 @@ +Tue Jul 03 19:31:48 UTC 2018 - opensuse-packag...@opensuse.org + +- Update to version 0.9.1.1530616709.1329314: + * improve handling of corrupt git cache directories + * only do git stash save/pop if we have a non-empty working tree (#228) + * sort imports + * don't allow DEBUG_TAR_SCM to change behaviour (#240) + * add stub user docs in lieu of something proper (#238) + * [dist] fix build for distros not yet supporting Recommends tag + * Remove clone_dir if clone fails + * python-unittest2 is only required for the optional make check + * move python-unittest2 dep to test suite only part (submission by olh) + +------------------------------------------------------------------- Old: ---- obs-service-tar_scm-0.9.0.1523267117.de861d8.tar.gz New: ---- obs-service-tar_scm-0.9.1.1530616709.1329314.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ obs-service-tar_scm.spec ++++++ --- /var/tmp/diff_new_pack.A5JTEk/_old 2018-07-07 21:53:16.355708320 +0200 +++ /var/tmp/diff_new_pack.A5JTEk/_new 2018-07-07 21:53:16.355708320 +0200 @@ -19,8 +19,8 @@ %bcond_without obs_scm_testsuite Name: obs-service-tar_scm -%define version_unconverted 0.9.0.1523267117.de861d8 -Version: 0.9.0.1523267117.de861d8 +%define version_unconverted 0.9.1.1530616709.1329314 +Version: 0.9.1.1530616709.1329314 Release: 0 Summary: An OBS source service: create tar ball from svn/git/hg License: GPL-2.0-or-later @@ -51,13 +51,15 @@ BuildRequires: python-dateutil BuildRequires: python-lxml BuildRequires: python-mock +BuildRequires: python-unittest2 %endif BuildRequires: python >= 2.6 -BuildRequires: python-unittest2 Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -100,9 +102,11 @@ Group: Development/Tools/Building Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-obs_scm @@ -115,9 +119,11 @@ Summary: Handles source downloads defined in appimage.yml files Group: Development/Tools/Building Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-appimage @@ -129,9 +135,11 @@ Group: Development/Tools/Building Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-snapcraft ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.A5JTEk/_old 2018-07-07 21:53:16.383708285 +0200 +++ /var/tmp/diff_new_pack.A5JTEk/_new 2018-07-07 21:53:16.383708285 +0200 @@ -1,5 +1,5 @@ pkgname=obs-service-tar_scm -pkgver=0.8.0.1507129410.0cb2d44 +pkgver=0.9.0.1523267117.de861d8 pkgrel=0 pkgdesc="Source Service for the OpenSUSE Build Service (OBS)" arch=('any') @@ -8,7 +8,7 @@ groups=('base-devel') makedepends=('python2' 'python2-yaml' 'python2-dateutil' 'python2-lxml' 'python2-mock' 'python2-unittest2' 'bzr' 'git' 'mercurial' 'subversion' ) depends=('python2' 'python2-yaml' 'python2-dateutil' 'python2-argparse' 'cpio' 'git' 'bzr' 'mercurial' 'subversion' ) -source=("obs-service-tar_scm-${pkgver}.tar.gz::https://github.com/openSUSE/obs-service-tar_scm/archive/v${pkgver}.tar.gz") +source=("obs-service-tar_scm-${pkgver}.tar.gz") provides=('obs-service-tar') sha256sums=('SKIP') ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.A5JTEk/_old 2018-07-07 21:53:16.411708249 +0200 +++ /var/tmp/diff_new_pack.A5JTEk/_new 2018-07-07 21:53:16.411708249 +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">092ed79e144abbfee97fef9aebf1e93bc40ab3fa</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">e6cc8b8ac6fdba7cf6fb9671d3ccc4bffb10bb0e</param></service></servicedata> \ No newline at end of file ++++++ obs-service-tar_scm-0.9.0.1523267117.de861d8.tar.gz -> obs-service-tar_scm-0.9.1.1530616709.1329314.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/README.md new/obs-service-tar_scm-0.9.1.1530616709.1329314/README.md --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/README.md 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/README.md 2018-07-03 13:18:29.000000000 +0200 @@ -158,6 +158,23 @@ make install +## User documentation + +There isn't yet any comprehensive user documentation (see [issue +#238](https://github.com/openSUSE/obs-service-tar_scm/issues/238)), +but in the meantime, in addition to the information in this README, +the following resources may be helpful: + +- The XML `.service` files which document the parameters for + each source service: + - the [`tar_scm.service.in` template](https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar_scm.service.in) + which is used to generate `tar_scm.service` and `obs_scm.service` + - [`appimage.service`](https://github.com/openSUSE/obs-service-tar_scm/blob/master/appimage.service) + - [`snapcraft.service`](https://github.com/openSUSE/obs-service-tar_scm/blob/master/snapcraft.service) + - [`tar.service`](https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar.service) +- The ["Using Source Services" chapter](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_service.html) + of [the OBS User Guide](https://openbuildservice.org/help/manuals/obs-user-guide/) + ## Test suite See the [TESTING.md](TESTING.md) file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/cli.py new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/cli.py --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/cli.py 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/cli.py 2018-07-03 13:18:29.000000000 +0200 @@ -140,7 +140,8 @@ args.sslverify = bool(args.sslverify != 'disable') args.use_obs_scm = bool(args.use_obs_scm) - # force verbose mode in test-mode + # Allow forcing verbose mode from the environment; this + # allows debugging when running "osc service disabledrun" etc. args.verbose = bool(os.getenv('DEBUG_TAR_SCM')) for attr in args.__dict__.keys(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/config.py new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/config.py --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/config.py 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/config.py 2018-07-03 13:18:29.000000000 +0200 @@ -34,7 +34,7 @@ self.default_section = 'tar_scm' # We're in test-mode, so don't let any local site-wide # or per-user config impact the test suite. - if os.getenv('DEBUG_TAR_SCM'): + if os.getenv('TAR_SCM_CLEAN_ENV'): logging.info("Ignoring config files: test-mode detected") # fake a section header for configuration files @@ -80,7 +80,7 @@ value = None # We're in test-mode, so don't let any local site-wide # or per-user config impact the test suite. - if os.getenv('DEBUG_TAR_SCM'): + if os.getenv('TAR_SCM_CLEAN_ENV'): return value if section is None and self.fakeheader: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/scm/git.py new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/scm/git.py --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/TarSCM/scm/git.py 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/TarSCM/scm/git.py 2018-07-03 13:18:29.000000000 +0200 @@ -1,7 +1,8 @@ -import sys -import os import logging +import os import re +import sys + from TarSCM.scm.base import Scm @@ -16,11 +17,11 @@ # is needed here scmcmd = ['git'] if self.httpproxy: - scmcmd += ['-c', 'http.proxy=' + - self.httpproxy] + scmcmd += ['-c', 'http.proxy=' + + self.httpproxy] if self.httpsproxy: - scmcmd += ['-c', 'https.proxy=' + - self.httpsproxy] + scmcmd += ['-c', 'https.proxy=' + + self.httpsproxy] return scmcmd def switch_revision(self): @@ -43,7 +44,8 @@ for rev in revs: if self._ref_exists(rev): found_revision = True - if os.getenv('OSC_VERSION'): + if os.getenv('OSC_VERSION') and \ + len(os.listdir(self.clone_dir)) > 1: stash_text = self.helpers.safe_run( self._get_scm_cmd() + ['stash'], @@ -85,8 +87,12 @@ if self.repocachedir: command.insert(2, '--mirror') wdir = os.path.abspath(os.path.join(self.repodir, os.pardir)) - self.helpers.safe_run( - command, cwd=wdir, interactive=sys.stdout.isatty()) + try: + self.helpers.safe_run( + command, cwd=wdir, interactive=sys.stdout.isatty()) + except SystemExit as exc: + os.removedirs(os.path.join(wdir, self.clone_dir)) + raise exc self.fetch_specific_revision() @@ -123,24 +129,37 @@ def update_cache(self): """Update sources via git.""" # Force origin to the wanted URL in case it switched - self.helpers.safe_run( - self._get_scm_cmd() + ['config', 'remote.origin.url', self.url], - cwd=self.clone_dir, - interactive=sys.stdout.isatty() - ) - - self.helpers.safe_run( - self._get_scm_cmd() + ['fetch', '--tags'], - cwd=self.clone_dir, - interactive=sys.stdout.isatty() - ) - self.helpers.safe_run( - self._get_scm_cmd() + ['fetch'], - cwd=self.clone_dir, - interactive=sys.stdout.isatty() - ) + try: + self.helpers.safe_run( + self._get_scm_cmd() + ['config', 'remote.origin.url', + self.url], + cwd=self.clone_dir, + interactive=sys.stdout.isatty() + ) - self.fetch_specific_revision() + self.helpers.safe_run( + self._get_scm_cmd() + ['fetch', '--tags'], + cwd=self.clone_dir, + interactive=sys.stdout.isatty() + ) + self.helpers.safe_run( + self._get_scm_cmd() + ['fetch'], + cwd=self.clone_dir, + interactive=sys.stdout.isatty() + ) + + self.fetch_specific_revision() + except SystemExit as exc: + logging.error("Corrupt clone_dir '%s' detected.", self.clone_dir) + obs_service_daemon = os.getenv('OBS_SERVICE_DAEMON') + osc_version = os.getenv('OSC_VERSION') + if (obs_service_daemon and not osc_version): + logging.info("Removing corrupt cache!") + os.removedirs(self.clone_dir) + self.fetch_upstream_scm() + else: + logging.info("Please fix corrupt cache directory!") + raise exc def detect_version(self, args): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/dist/obs-service-tar_scm.spec new/obs-service-tar_scm-0.9.1.1530616709.1329314/dist/obs-service-tar_scm.spec --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/dist/obs-service-tar_scm.spec 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/dist/obs-service-tar_scm.spec 2018-07-03 13:18:29.000000000 +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.1498846582.8799787 -Version: 0.8.0.1498846582.8799787 +%define version_unconverted 0.9.0.1523267117.de861d8 +Version: 0.9.0.1523267117.de861d8 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 @@ -31,8 +31,8 @@ # based distributions #Patch0: 0001-Debianization-disable-running-mercurial-tests.patch %if %{with obs_scm_testsuite} -BuildRequires: git-core BuildRequires: bzr +BuildRequires: git-core BuildRequires: mercurial BuildRequires: subversion %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} @@ -51,13 +51,15 @@ BuildRequires: python-dateutil BuildRequires: python-lxml BuildRequires: python-mock +BuildRequires: python-unittest2 %endif BuildRequires: python >= 2.6 -BuildRequires: python-unittest2 Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -100,9 +102,11 @@ Group: Development/Tools/Building Provides: obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-obs_scm @@ -115,9 +119,11 @@ Summary: Handles source downloads defined in appimage.yml files Group: Development/Tools/Building Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-appimage @@ -129,9 +135,11 @@ Group: Development/Tools/Building Provides: obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service Requires: git-core +%if 0%{?suse_version} >= 1315 Recommends: bzr Recommends: mercurial Recommends: subversion +%endif Requires: obs-service-obs_scm-common = %version-%release %description -n obs-service-snapcraft diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/tests/testenv.py new/obs-service-tar_scm-0.9.1.1530616709.1329314/tests/testenv.py --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/tests/testenv.py 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/tests/testenv.py 2018-07-03 13:18:29.000000000 +0200 @@ -44,8 +44,8 @@ return print("--v-v-- begin setupClass for %s --v-v--" % cls.__name__) ScmInvocationLogs.setup_bin_wrapper(cls.scm, cls.tmp_dir) - os.putenv('DEBUG_TAR_SCM', 'yes') - os.environ['DEBUG_TAR_SCM'] = 'yes' + os.putenv('TAR_SCM_CLEAN_ENV', 'yes') + os.environ['TAR_SCM_CLEAN_ENV'] = 'yes' cls.is_setup = True print("--^-^-- end setupClass for %s --^-^--" % cls.__name__) print diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-service-tar_scm-0.9.0.1523267117.de861d8/tests/unittestcases.py new/obs-service-tar_scm-0.9.1.1530616709.1329314/tests/unittestcases.py --- old/obs-service-tar_scm-0.9.0.1523267117.de861d8/tests/unittestcases.py 2018-04-09 11:45:17.000000000 +0200 +++ new/obs-service-tar_scm-0.9.1.1530616709.1329314/tests/unittestcases.py 2018-07-03 13:18:29.000000000 +0200 @@ -109,21 +109,21 @@ tc_name = inspect.stack()[0][3] try: - tmp = os.environ['DEBUG_TAR_SCM'] + tmp = os.environ['TAR_SCM_CLEAN_ENV'] except KeyError: tmp = None - os.environ['DEBUG_TAR_SCM'] = "1" + os.environ['TAR_SCM_CLEAN_ENV'] = "1" files = [[os.path.join(self.fixtures_dir, tc_name, 'test.rc'), True]] var = Config(files).get(None, 'var') self.assertEqual(var, None) if tmp: - os.environ['DEBUG_TAR_SCM'] = tmp + os.environ['TAR_SCM_CLEAN_ENV'] = tmp else: - os.environ['DEBUG_TAR_SCM'] = '' - os.unsetenv('DEBUG_TAR_SCM') + os.environ['TAR_SCM_CLEAN_ENV'] = '' + os.unsetenv('TAR_SCM_CLEAN_ENV') def test_changes_get_chga_args(self): '''Test if getting changesauthor from cli args works'''