Hello community, here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2017-10-21 20:21:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old) and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools" Sat Oct 21 20:21:46 2017 rev:10 rq:535607 version:20171020.7d266d5 Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2017-10-20 14:47:24.235941149 +0200 +++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes 2017-10-21 20:22:16.921578117 +0200 @@ -1,0 +2,35 @@ +Fri Oct 20 23:19:30 UTC 2017 - opensuse-releaset...@opensuse.org + +- Update to version 20171020.7d266d5: + * Another set of low-noise flake8 cleanups + * Parallelize flake8 run + +------------------------------------------------------------------- +Fri Oct 20 03:26:00 UTC 2017 - opensuse-releaset...@opensuse.org + +- Update to version 20171019.24ea059: + * dist/ci/docker-run: utilize throwaway credentials to workaround OBS issue. + * dist/ci/osc-init: print OBS_API and OBS_USER for debugging. + * dist/ci: use hidden directory .docker-tmp instead of HOME and cache on travis. + * dist/ci: fallback to /public OBS API in the event of no OBS_PASS + * dist/ci: provide OBS_API parameter. + * travis: add distribution builds for Leap 42.3 and SLE-12-SP3. + * dist/ci: rework spec.sh as obs-build-target using `osc build`. + * dist/ci: extract common osc setup as osc-init and provide in /usr/bin. + * dist/ci/Dockerfile: include obs-deploy in /usr/bin. + * dist/ci: rename deploy.obs.sh to obs-deploy. + * dist/ci/deploy: only commit if changes available to commit. + * dist/ci/deploy: only add line if missing from _servicedata. + * dist/ci/Dockerfile: switch to base tumbleweed image. + +------------------------------------------------------------------- +Fri Oct 20 02:11:58 UTC 2017 - opensuse-releaset...@opensuse.org + +- Update to version 20171019.6b7fd1b: + * Enable F405,F811 (Unused imports) + * Add Flake8 travis infrastructure + * Import all dependencies + * White space / consistent usage of spaces / indentation of 4 fixes + * Remove outdated script + +------------------------------------------------------------------- Old: ---- openSUSE-release-tools-20171019.be5b3ec.obscpio New: ---- openSUSE-release-tools-20171020.7d266d5.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openSUSE-release-tools.spec ++++++ --- /var/tmp/diff_new_pack.Pyj6Jq/_old 2017-10-21 20:22:17.501550958 +0200 +++ /var/tmp/diff_new_pack.Pyj6Jq/_new 2017-10-21 20:22:17.505550771 +0200 @@ -20,7 +20,7 @@ %define source_dir osc-plugin-factory %define announcer_filename factory-package-news Name: openSUSE-release-tools -Version: 20171019.be5b3ec +Version: 20171020.7d266d5 Release: 0 Summary: Tools to aid in staging and release work for openSUSE/SUSE License: GPL-2.0+ and MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Pyj6Jq/_old 2017-10-21 20:22:17.549548710 +0200 +++ /var/tmp/diff_new_pack.Pyj6Jq/_new 2017-10-21 20:22:17.553548523 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/osc-plugin-factory.git</param> - <param name="changesrevision">be5b3ec12db757532b0b6f0a45336c06c7634847</param> + <param name="changesrevision">d1c48015785527b47ab98da3a312aee1d413d09a</param> </service> </servicedata> ++++++ openSUSE-release-tools-20171019.be5b3ec.obscpio -> openSUSE-release-tools-20171020.7d266d5.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/.flake8 new/openSUSE-release-tools-20171020.7d266d5/.flake8 --- old/openSUSE-release-tools-20171019.be5b3ec/.flake8 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/.flake8 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,4 @@ +[flake8] +exclude = abichecker, openqa, openqa-maintenance.py +max-line-length = 100 +ignore = E501,F401,E302,E228,E128,E251,E201,E202,E203,E305,F841,E265,E261,E266,E712,E401,E126,E502,E222,E241,E711,E226,E125,E123,W293,W391,E731,E101,E227,E713,E225,E124,E221,E127,E701,E714,W503,E129,E303 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/.travis.yml new/openSUSE-release-tools-20171020.7d266d5/.travis.yml --- old/openSUSE-release-tools-20171019.be5b3ec/.travis.yml 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/.travis.yml 2017-10-21 00:37:31.000000000 +0200 @@ -8,7 +8,7 @@ matrix: include: - - env: TEST_SUITE=distribution + - env: TEST_SUITE=distribution TARGET_REPO=openSUSE_Factory sudo: required services: - docker @@ -16,7 +16,31 @@ before_install: - docker build -f dist/ci/Dockerfile -t spec . script: - - docker run -it spec ./dist/ci/spec.sh + - ./dist/ci/docker-run obs-build-target "$TARGET_REPO" + - env: TEST_SUITE=distribution TARGET_REPO=openSUSE_42.3 + sudo: required + services: + - docker + language: bash + before_install: + - docker build -f dist/ci/Dockerfile -t spec . + script: + - ./dist/ci/docker-run obs-build-target "$TARGET_REPO" + - env: TEST_SUITE=distribution TARGET_REPO=SLE_12_SP3 + sudo: required + services: + - docker + language: bash + before_install: + - docker build -f dist/ci/Dockerfile -t spec . + script: + - ./dist/ci/docker-run obs-build-target "$TARGET_REPO" + - env: TEST_SUITE=flake8 + language: python + install: + - pip install flake8 + script: + - flake8 - env: TEST_SUITE=nosetests sudo: required language: python @@ -36,7 +60,11 @@ deploy: provider: script - script: docker run -it -e OBS_PACKAGE="$OBS_PACKAGE" -e OBS_USER="$OBS_USER" -e OBS_PASS="$OBS_PASS" -e OBS_EMAIL="$OBS_EMAIL" spec ./dist/ci/deploy.obs.sh + script: ./dist/ci/docker-run obs-deploy on: branch: master - condition: $TEST_SUITE = distribution + condition: $TEST_SUITE = distribution && $TARGET_REPO = openSUSE_Factory + +cache: + directories: + - .docker-tmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/ReviewBot.py new/openSUSE-release-tools-20171020.7d266d5/ReviewBot.py --- old/openSUSE-release-tools-20171019.be5b3ec/ReviewBot.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/ReviewBot.py 2017-10-21 00:37:31.000000000 +0200 @@ -158,7 +158,7 @@ def _set_review(self, req, state): doit = self.can_accept_review(req.reqid) if doit is None: - self.logger.info("can't change state, %s does not have the reviewer"%(req.reqid)) + self.logger.info("can't change state, %s does not have the reviewer"%(req.reqid)) newstate = state @@ -267,8 +267,8 @@ dst_package = a.src_package # Ignoring patchinfo package for checking if self._is_patchinfo(a.src_package): - self.logger.info("package is patchinfo, ignoring") - return None + self.logger.info("package is patchinfo, ignoring") + return None # dirty obs crap if a.tgt_releaseproject is not None: ugly_suffix = '.'+a.tgt_releaseproject.replace(':', '_') @@ -397,9 +397,9 @@ def set_request_ids_search_review(self): if self.review_user: - review = "@by_user='%s' and @state='new'" % self.review_user + review = "@by_user='%s' and @state='new'" % self.review_user else: - review = "@by_group='%s' and @state='new'" % self.review_group + review = "@by_group='%s' and @state='new'" % self.review_group url = osc.core.makeurl(self.apiurl, ('search', 'request'), { 'match': "state/@name='review' and review[%s]" % review, 'withfullhistory': 1 } ) root = ET.parse(osc.core.http_GET(url)).getroot() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/ToolBase.py new/openSUSE-release-tools-20171020.7d266d5/ToolBase.py --- old/openSUSE-release-tools-20171019.be5b3ec/ToolBase.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/ToolBase.py 2017-10-21 00:37:31.000000000 +0200 @@ -23,8 +23,10 @@ from xml.etree import cElementTree as ET import cmdln +import datetime import itertools import logging +import signal import sys import time import urllib2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/abichecker/abichecker.py new/openSUSE-release-tools-20171020.7d266d5/abichecker/abichecker.py --- old/openSUSE-release-tools-20171019.be5b3ec/abichecker/abichecker.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/abichecker/abichecker.py 2017-10-21 00:37:31.000000000 +0200 @@ -100,34 +100,43 @@ # report for a single library LibResult = namedtuple('LibResult', ('src_repo', 'src_lib', 'dst_repo', 'dst_lib', 'arch', 'htmlreport', 'result')) + class DistUrlMismatch(Exception): def __init__(self, disturl, md5): Exception.__init__(self) self.msg = 'disturl mismatch has: %s wanted ...%s'%(disturl, md5) + def __str__(self): return self.msg + class SourceBroken(Exception): def __init__(self, project, package): Exception.__init__(self) self.msg = '%s/%s has broken sources, needs rebase'%(project, package) + def __str__(self): return self.msg + class NoBuildSuccess(Exception): def __init__(self, project, package, md5): Exception.__init__(self) self.msg = '%s/%s(%s) had no successful build'%(project, package, md5) + def __str__(self): return self.msg + class NotReadyYet(Exception): def __init__(self, project, package, reason): Exception.__init__(self) self.msg = '%s/%s not ready yet: %s'%(project, package, reason) + def __str__(self): return self.msg + class MissingDebugInfo(Exception): def __init__(self, missing_debuginfo): Exception.__init__(self) @@ -137,23 +146,29 @@ self.msg += "%s/%s %s/%s %s %s\n"%i elif len(i) == 5: self.msg += "%s/%s %s/%s %s\n"%i + def __str__(self): return self.msg + class FetchError(Exception): def __init__(self, msg): Exception.__init__(self) self.msg = msg + def __str__(self): return self.msg + class MaintenanceError(Exception): def __init__(self, msg): Exception.__init__(self) self.msg = msg + def __str__(self): return self.msg + class LogToDB(logging.Filter): def __init__(self, session): self.session = session @@ -166,6 +181,7 @@ self.session.commit() return True + class ABIChecker(ReviewBot.ReviewBot): """ check ABI of library packages """ @@ -649,7 +665,7 @@ '-lib', libname, '-old', old, '-new', new, - '-report-path', output + '-report-path', output ] self.logger.debug(cmd) r = subprocess.Popen(cmd, close_fds=True, cwd=CACHEDIR).wait() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/biarchtool.py new/openSUSE-release-tools-20171020.7d266d5/biarchtool.py --- old/openSUSE-release-tools-20171019.be5b3ec/biarchtool.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/biarchtool.py 2017-10-21 00:37:31.000000000 +0200 @@ -119,7 +119,7 @@ if self.rdeps is not None: return self.rdeps = dict() - url = self.makeurl(['build', self.project, 'standard', self.arch, '_builddepinfo' ], {'view':'revpkgnames'}) + url = self.makeurl(['build', self.project, 'standard', self.arch, '_builddepinfo' ], {'view': 'revpkgnames'}) x = ET.fromstring(self.cached_GET(url)) for pnode in x.findall('package'): name = pnode.get('name') @@ -141,11 +141,11 @@ # generator. Yield only packges that got checked in after that # point in time. def _filter_packages_by_time(self, packages): - x = ET.fromstring(self.cached_GET(self.makeurl(['source', self.project, '_product', '_history'], {'limit':'1'}))) + x = ET.fromstring(self.cached_GET(self.makeurl(['source', self.project, '_product', '_history'], {'limit': '1'}))) producttime = int(x.find('./revision/time').text) for pkg in packages: try: - x = ET.fromstring(self.cached_GET(self.makeurl(['source', self.project, pkg, '_history'], {'rev':'1'}))) + x = ET.fromstring(self.cached_GET(self.makeurl(['source', self.project, pkg, '_history'], {'rev': '1'}))) # catch deleted packages except urllib2.HTTPError as e: if e.code == 404: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/build-fail-reminder.py new/openSUSE-release-tools-20171020.7d266d5/build-fail-reminder.py --- old/openSUSE-release-tools-20171019.be5b3ec/build-fail-reminder.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/build-fail-reminder.py 2017-10-21 00:37:31.000000000 +0200 @@ -43,11 +43,12 @@ FACTORY='openSUSE:Factory' class RemindedPackage(object): - def __init__(self,firstfail,reminded,remindCount,bug): + def __init__(self, firstfail, reminded, remindCount, bug): self.firstfail=firstfail self.reminded=reminded self.bug=bug self.remindCount=remindCount + def __str__(self): return '{} {} {} {}'.format(self.firstfail, self.reminded, self.bug, self.remindCount) @@ -135,7 +136,7 @@ for package in data: # Only consider packages that failed for > seconds_to_remember days (7 days) if package["firstfail"] < now - seconds_to_remember: - if not package["name"] in RemindedLoaded.keys(): + if not package["name"] in RemindedLoaded.keys(): # This is the first time we see this package failing for > 7 days reminded = now bug="" @@ -189,7 +190,7 @@ msg['Date'] = email.utils.formatdate() msg['Message-ID'] = email.utils.make_msgid() msg.add_header('Precedence', 'bulk') - msg.add_header('X-Mailer','%s - Failure Notification' % project) + msg.add_header('X-Mailer', '%s - Failure Notification' % project) logger.info("%s: %s", msg['To'], msg['Subject']) if args.dry: logger.debug(msg.as_string()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/compare_pkglist.py new/openSUSE-release-tools-20171020.7d266d5/compare_pkglist.py --- old/openSUSE-release-tools-20171019.be5b3ec/compare_pkglist.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/compare_pkglist.py 2017-10-21 00:37:31.000000000 +0200 @@ -50,14 +50,14 @@ def get_source_packages(self, project): """Return the list of packages in a project.""" query = {'expand': 1} - root = ET.parse(http_GET(makeurl(self.apiurl,['source', project], + root = ET.parse(http_GET(makeurl(self.apiurl, ['source', project], query=query))).getroot() packages = [i.get('name') for i in root.findall('entry')] - + return packages def is_linked_package(self, project, package): - u = makeurl(self.apiurl,['source', project, package]) + u = makeurl(self.apiurl, ['source', project, package]) root = ET.parse(http_GET(u)).getroot() linked = root.find('linkinfo') return linked @@ -68,7 +68,7 @@ 'view': 'xml', 'oproject': old_prj, 'opackage': package} - u = makeurl(self.apiurl,['source', new_prj, package], query=query) + u = makeurl(self.apiurl, ['source', new_prj, package], query=query) root = ET.parse(http_POST(u)).getroot() old_srcmd5 = root.findall('old')[0].get('srcmd5') logging.debug('%s old srcmd5 %s in %s' % (package, old_srcmd5, old_prj)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/copy-to-132.py new/openSUSE-release-tools-20171020.7d266d5/copy-to-132.py --- old/openSUSE-release-tools-20171019.be5b3ec/copy-to-132.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/copy-to-132.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,166 +0,0 @@ -#!/usr/bin/python - -import sys -import os -import osc -import osc.core -import osc.conf -import xml.etree.ElementTree as ET -import re - -os.environ['OSC_CONFIG'] = os.path.expanduser('~/.oscrc-syncer') - -#initialize osc config -osc.conf.get_config() -osc.conf.config['debug'] = True - -srcmd5s = dict() -revs = dict() - -def parse_prj(prj): - url = osc.core.makeurl(osc.conf.config['apiurl'], ['source', prj], { 'view': 'info', 'nofilename': 1 } ) - f = osc.core.http_GET(url) - root = ET.parse(f) - - ret = dict() - - for si in root.findall('./sourceinfo'): - if si.attrib.has_key('lsrcmd5'): - continue # ignore links - package = si.attrib['package'] - md5 = si.attrib['verifymd5'] - srcmd5s[md5] = si.attrib['srcmd5'] - revs[md5] = si.attrib['rev'] - if re.match('_product.*', package): - continue - ret[package] = md5 - - return ret - -# POSIX system. Create and return a getch that manipulates the tty. -import termios, sys, tty -def _getch(): - - fd = sys.stdin.fileno() - old_settings = termios.tcgetattr(fd) - try: - tty.setraw(fd) - ch = sys.stdin.read(1) - finally: - termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) - return ch - -def get_devel_project(package): - url = osc.core.makeurl(osc.conf.config['apiurl'], ['source', 'openSUSE:Factory', package, '_meta']) - f = osc.core.http_GET(url) - root = ET.parse(f) - for dp in root.findall('./devel'): - return dp.attrib['project'] - - raise 'NOW WHAT?' - -def create_submit(project=None, package=None, rev=None, md5=None): - text = "<request type='submit'>\n" - text += " <submit>\n" - text += " <source project='" + project + "' package='" + package + "' rev='" + md5 + "'/>\n" - text += " <target project='openSUSE:13.2' package='" + package + "'/>\n" - text += " </submit>\n" - text += " <description>Submit revision " + rev + " of openSUSE:Factory/" + package + "</description>\n" - text += "</request>" - - url = osc.core.makeurl(osc.conf.config['apiurl'], [ 'request' ], { 'cmd': 'create' }) - #print text - print osc.core.http_POST(url, data=text).read() - -def create_delete(package): - text = "<request>\n" - text += " <action type='delete'>\n" - text += " <target project='openSUSE:13.2' package='" + package + "'/>\n" - text += " </action>\n" - text += " <description>Gone from Factory</description>\n" - text += "</request>" - - url = osc.core.makeurl(osc.conf.config['apiurl'], [ 'request' ], { 'cmd': 'create' }) - #print text - print osc.core.http_POST(url, data=text).read() - -def load_nos(): - ret = set() - with open('nos') as f: - for line in f.readlines(): - ret.add(line.strip()) - return ret - -def save_nos(nos): - with open('nos', 'w') as f: - for key in nos: - f.write(key + "\n") - -def find_request_md5s(package): - url = osc.core.makeurl(osc.conf.config['apiurl'], - ['search', 'request'], - { 'match': "action/target/@project='openSUSE:13.2' and action/target/@package='{}'".format(package) }) - f = osc.core.http_GET(url) - root = ET.parse(f).getroot() - md5s = set() - for rq in root.findall('request'): - for source in rq.findall('.//source'): - md5s.add(source.attrib['rev']) - return md5s - -factory = parse_prj('openSUSE:Factory') -d132 = parse_prj('openSUSE:13.2') - -NOS = load_nos() - -for package in sorted(set(factory) | set(d132)): - prompt = None - - if factory.has_key(package): - - pmd5 = "%s-%s" % ( package, factory[package] ) - if pmd5 in NOS: - continue - - if not d132.has_key(package): - if srcmd5s[factory[package]] in find_request_md5s(package): - continue - elif factory[package] == d132[package]: - continue - elif srcmd5s[factory[package]] in find_request_md5s(package): - print "%s already requested" % pmd5 - continue - else: - url = osc.core.makeurl(osc.conf.config['apiurl'], ['source', 'openSUSE:Factory', package], - { 'unified': 1, 'opackage': package, 'oproject': 'openSUSE:13.2', 'cmd': 'diff', 'expand': 1 } ) - difflines = osc.core.http_POST(url).readlines() - inchanges = False - for line in difflines: - if re.match(r'^Index:.*\.changes', line): - inchanges = True - elif re.match(r'^Index:', line): - inchanges = False - - if inchanges: - print line, - - prompt = "copy diffing package %s ?" % pmd5 - - md5 = srcmd5s[factory[package]] - rev = revs[factory[package]] - devprj = get_devel_project(package) - if devprj == 'openSUSE:Factory': - continue - - print prompt - d = _getch() - if d == 'y': - create_submit(project=devprj, package=package, rev=rev, md5=md5) - elif d == 'n': - NOS.add(pmd5) - save_nos(NOS) - - else: # the 13.2 must have it - print "delete package 13.2/%s-%s" % ( package, d132[package] ) - create_delete(package) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/Dockerfile new/openSUSE-release-tools-20171020.7d266d5/dist/ci/Dockerfile --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/Dockerfile 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/Dockerfile 2017-10-21 00:37:31.000000000 +0200 @@ -1,33 +1,29 @@ # https://docs.docker.com/engine/reference/builder/ # Used for TEST_SUITE=distribution and deployment to OBS. -FROM boombatower/opensuse:tumbleweed +FROM opensuse:tumbleweed MAINTAINER Jimmy Berry <jbe...@suse.com> -RUN zypper -n ref && zypper -n dup && zypper -n in --no-recommends \ - obs-service-download_files \ - obs-service-format_spec_file \ - obs-service-obs_scm \ - obs-service-set_version \ - obs-service-source_validator \ - rpm-build \ - apache-rpm-macros \ - apache2-devel \ - libxml2-tools \ - make \ +# https://github.com/openSUSE/obs-service-set_version/issues/44 python-packaging +# git for extracting remote, but a more generalized approach would be nice +RUN zypper -n ref && zypper -n dup && zypper -n install \ + build \ + git \ + obs-service-* \ osc \ - python-PyYAML \ - python-cmdln \ - python-colorama \ - python-httpretty \ - python-lxml \ - python-mock \ - python-nose \ - python-python-dateutil \ - python-pyxdg \ - rsyslog + python-packaging \ + sudo -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +# `osc build` directories that are effective to cache: +# - /var/tmp/build-root +# - /var/tmp/osbuild-packagecache +VOLUME /var/tmp -COPY . /usr/src/app +WORKDIR /usr/src +RUN mkdir -p /usr/src/target +COPY . /usr/src/target + +# Already included in target, but simulate separate container image. +ADD dist/ci/obs-build-target /usr/bin/ +ADD dist/ci/obs-deploy /usr/bin/ +ADD dist/ci/osc-init /usr/bin/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/deploy.obs.sh new/openSUSE-release-tools-20171020.7d266d5/dist/ci/deploy.obs.sh --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/deploy.obs.sh 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/deploy.obs.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -#!/bin/bash - -cat << eom > ~/.oscrc -[general] -apiurl = https://api.opensuse.org -[https://api.opensuse.org] -user = $OBS_USER -pass = $OBS_PASS -email = $OBS_EMAIL -eom - -osc checkout "$OBS_PACKAGE" -cd "$OBS_PACKAGE" - -rm *.obscpio -osc service disabledrun -echo >> _servicedata -osc addremove -osc commit -m "$(grep -oP 'version: \K.*' *.obsinfo)" - -# Create submit request if none currently exists. -OBS_TARGET_PROJECT="$(osc info | grep -oP "Link info:.*?project \K[^\s,]+")" -OBS_TARGET_PACKAGE="$(osc info | grep -oP "Link info:.*?, package \K[^\s,]+")" -echo "checking for existing requests to $OBS_TARGET_PROJECT/$OBS_TARGET_PACKAGE..." -if osc request list "$OBS_TARGET_PROJECT" "$OBS_TARGET_PACKAGE" | grep 'No results for package' ; then - osc service wait - osc sr --diff | cat - osc sr --yes -m "automatic update" -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/docker-run new/openSUSE-release-tools-20171020.7d266d5/dist/ci/docker-run --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/docker-run 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/docker-run 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then + eval $(./dist/ci/osc-credentials) +else + # openSUSE/open-build-service#3946: would elevate the need, but rejected. + eval $(./dist/ci/osc-credentials-throwaway) +fi + +docker run --privileged --rm -it \ + -v "$(realpath .)/.docker-tmp:/var/tmp" \ + -e OBS_API="${apiurl:-$OBS_API}" \ + -e OBS_USER="${user:-$OBS_USER}" \ + -e OBS_PASS="${pass:-$OBS_PASS}" \ + -e OBS_EMAIL="${email:-$OBS_EMAIL}" \ + -e OBS_PACKAGE="${OBS_PACKAGE:-openSUSE:Tools/openSUSE-release-tools}" \ + spec "${1:-obs-build-target}" "${2:-openSUSE_Factory}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/obs-build-target new/openSUSE-release-tools-20171020.7d266d5/dist/ci/obs-build-target --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/obs-build-target 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/obs-build-target 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,23 @@ +#!/bin/bash +set -x + +SOURCE_DIR="${SOURCE_DIR:-/usr/src/target}" + +repo="${1:-openSUSE_Tumbleweed}" +arch="${2:-x86_64}" + +osc-init + +osc checkout "$OBS_PACKAGE" +cd "$OBS_PACKAGE" + +# point _service file to SOURCE_DIR instead of remote +sed -i "s|$(cd "$SOURCE_DIR" && git remote get-url origin)|$SOURCE_DIR|" _service + +rm *.obscpio +osc service disabledrun + +# skip interactive +osc diff | cat + +osc build --trust-all-projects --no-verify "$repo" "$arch" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/obs-deploy new/openSUSE-release-tools-20171020.7d266d5/dist/ci/obs-deploy --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/obs-deploy 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/obs-deploy 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,28 @@ +#!/bin/bash + +osc-init + +osc checkout "$OBS_PACKAGE" +cd "$OBS_PACKAGE" + +rm *.obscpio +osc service disabledrun + +# ensure _servicedata ends with a newline +tail -n1 _servicedata | read -r _ || echo >> _servicedata + +osc addremove + +if [ "$(osc status | wc -l)" -gt 0 ] ; then + osc commit -m "$(grep -oP 'version: \K.*' *.obsinfo)" +fi + +# Create submit request if none currently exists. +OBS_TARGET_PROJECT="$(osc info | grep -oP "Link info:.*?project \K[^\s,]+")" +OBS_TARGET_PACKAGE="$(osc info | grep -oP "Link info:.*?, package \K[^\s,]+")" +echo "checking for existing requests to $OBS_TARGET_PROJECT/$OBS_TARGET_PACKAGE..." +if osc request list "$OBS_TARGET_PROJECT" "$OBS_TARGET_PACKAGE" | grep 'No results for package' ; then + osc service wait + osc sr --diff | cat + osc sr --yes -m "automatic update" +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-credentials new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-credentials --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-credentials 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-credentials 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,13 @@ +#!/usr/bin/python + +try: + from osc import conf +except: + import sys + sys.exit() + +apiurl = conf.config['apiurl'] +cp = conf.get_configParser() + +for key in ('apiurl', 'user', 'pass', 'email'): + print('{}="{}"'.format(key, cp.get(apiurl, key, raw=True))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-credentials-throwaway new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-credentials-throwaway --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-credentials-throwaway 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-credentials-throwaway 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,4 @@ +#!/bin/bash + +echo 'user="opensuse-releaseteam-travis"' +echo 'pass="G1fggGJLsVGPZMLTq0ht0Bqh7wEIAXkSZWcHkRIP"' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-init new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-init --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/osc-init 1970-01-01 01:00:00.000000000 +0100 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/osc-init 2017-10-21 00:37:31.000000000 +0200 @@ -0,0 +1,18 @@ +#!/bin/bash + +OBS_API="${OBS_API:-https://api.opensuse.org}" +if [ -z ${OBS_PASS+x} ] || [ -z "$OBS_PASS" ] ; then + OBS_API="$OBS_API/public" +fi + +echo "OBS_API=$OBS_API" +echo "OBS_USER=$OBS_USER" + +cat << eom > ~/.oscrc +[general] +apiurl = $OBS_API +[$OBS_API] +user = ${OBS_USER:-example} +pass = ${OBS_PASS:-example} +email = ${OBS_EMAIL:-exam...@example.com} +eom diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/spec.sh new/openSUSE-release-tools-20171020.7d266d5/dist/ci/spec.sh --- old/openSUSE-release-tools-20171019.be5b3ec/dist/ci/spec.sh 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/dist/ci/spec.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -#!/bin/bash -# Adapted from: https://github.com/openSUSE/snapper/blob/master/.travis.tumbleweed.sh. - -set -e -x - -make -make package - -# Validate package. -(cd dist/package && /usr/lib/obs/service/source_validator) - -# Build package (--nocheck as test suite runs separately). -cp dist/package/* /usr/src/packages/SOURCES/ -rpmbuild --nocheck -bb -D "jobs `nproc`" dist/package/*.spec - -# Install to test scripts. -rpm -iv --force --nodeps /usr/src/packages/RPMS/*/*.rpm - -# Ensure the staging plugin starts. -cat << eom > ~/.oscrc -[general] -[https://api.opensuse.org] -user = example -pass = example -eom - -osc staging --version - -# Upgrade and uninstall to test scripts. -rpm -Uv --force --nodeps /usr/src/packages/RPMS/*/*.rpm -# get the plain package names and remove all packages at once -rpm -ev --nodeps `rpm -q --qf '%{NAME} ' -p /usr/src/packages/RPMS/**/*.rpm` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/announcer.py new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/announcer.py --- old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/announcer.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/announcer.py 2017-10-21 00:37:31.000000000 +0200 @@ -44,7 +44,7 @@ 'url' : "http://download.opensuse.org/tumbleweed/iso/", 'iso' : "openSUSE-Tumbleweed-DVD-x86_64-Current.iso", 'name' : 'factory-announcer', - 'subject' :'New Tumbleweed snapshot {version} released!', + 'subject' : 'New Tumbleweed snapshot {version} released!', 'changesfile' : "Changes.{version}.txt", 'bodytemplate' : """ Please note that this mail was generated by a script. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/factory-package-news-web.py new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/factory-package-news-web.py --- old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/factory-package-news-web.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/factory-package-news-web.py 2017-10-21 00:37:31.000000000 +0200 @@ -28,7 +28,6 @@ import sys from urlparse import urlparse -import re digits_re = re.compile('^[0-9]+$') BASE_DIR = '/var/lib' @@ -50,7 +49,7 @@ for i in sorted(os.listdir(_dir), reverse=True): if not digits_re.match(i): continue - ret = ret + '<a href="diff/%s">%s</a>'%(i,i) + ret = ret + '<a href="diff/%s">%s</a>'%(i, i) if i == current: ret = ret + " <--" ret = ret + '<br/>' @@ -68,7 +67,7 @@ return "malformed version", 400 if not os.path.exists(os.path.join(_dir, version)): return "invalid version", 400 - tmpfn = os.path.join(_dir,'.'+version) + tmpfn = os.path.join(_dir, '.'+version) app.logger.debug(tmpfn) if os.path.exists(tmpfn): os.unlink(tmpfn) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/factory-package-news.py new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/factory-package-news.py --- old/openSUSE-release-tools-20171019.be5b3ec/factory-package-news/factory-package-news.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/factory-package-news/factory-package-news.py 2017-10-21 00:37:31.000000000 +0200 @@ -22,7 +22,7 @@ from pprint import pprint -import os, sys, re, io +import os, sys, io import logging from optparse import OptionParser import rpm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/fcc_submitter.py new/openSUSE-release-tools-20171020.7d266d5/fcc_submitter.py --- old/openSUSE-release-tools-20171019.be5b3ec/fcc_submitter.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/fcc_submitter.py 2017-10-21 00:37:31.000000000 +0200 @@ -157,10 +157,10 @@ def get_source_packages(self, project, expand=False): """Return the list of packages in a project.""" query = {'expand': 1} if expand else {} - root = ET.parse(http_GET(makeurl(self.apiurl,['source', project], + root = ET.parse(http_GET(makeurl(self.apiurl, ['source', project], query=query))).getroot() packages = [i.get('name') for i in root.findall('entry')] - + return packages def get_request_list(self, package): @@ -168,7 +168,7 @@ def get_link(self, project, package): try: - link = http_GET(makeurl(self.apiurl,['source', project, package, '_link'])).read() + link = http_GET(makeurl(self.apiurl, ['source', project, package, '_link'])).read() except (urllib2.HTTPError, urllib2.URLError): return None return ET.fromstring(link) @@ -263,7 +263,7 @@ print 'Build succeeded packages:' print '-------------------------------------' for pkg in succeeded_packages: - print pkg + print pkg print '-------------------------------------' print "Found {} build succeded packages".format(len(succeeded_packages)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/leaper.py new/openSUSE-release-tools-20171020.7d266d5/leaper.py --- old/openSUSE-release-tools-20171019.be5b3ec/leaper.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/leaper.py 2017-10-21 00:37:31.000000000 +0200 @@ -90,7 +90,7 @@ """Return the list of packages in a project.""" query = {'expand': 1} if expand else {} try: - root = ET.parse(osc.core.http_GET(osc.core.makeurl(self.apiurl,['source', project], + root = ET.parse(osc.core.http_GET(osc.core.makeurl(self.apiurl, ['source', project], query=query))).getroot() packages = [i.get('name') for i in root.findall('entry')] except urllib2.HTTPError as e: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/manager_42.py new/openSUSE-release-tools-20171020.7d266d5/manager_42.py --- old/openSUSE-release-tools-20171019.be5b3ec/manager_42.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/manager_42.py 2017-10-21 00:37:31.000000000 +0200 @@ -29,7 +29,6 @@ import osc.conf import osc.core import urllib2 -import sys import time import yaml from collections import namedtuple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/metrics.py new/openSUSE-release-tools-20171020.7d266d5/metrics.py --- old/openSUSE-release-tools-20171019.be5b3ec/metrics.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/metrics.py 2017-10-21 00:37:31.000000000 +0200 @@ -19,8 +19,9 @@ from osclib.stagingapi import StagingAPI # Duplicate Leap config to handle 13.2 without issue. -osclib.conf.DEFAULT[r'openSUSE:(?P<project>[\d.]+)'] = \ -osclib.conf.DEFAULT[r'openSUSE:(?P<project>Leap:[\d.]+)'] +osclib.conf.DEFAULT[ + r'openSUSE:(?P<project>[\d.]+)'] = osclib.conf.DEFAULT[ + r'openSUSE:(?P<project>Leap:[\d.]+)'] # Provide osc.core.get_request_list() that swaps out search() implementation and # uses lxml ET to avoid having to reparse to peform complex xpaths. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osc-check_dups.py new/openSUSE-release-tools-20171020.7d266d5/osc-check_dups.py --- old/openSUSE-release-tools-20171019.be5b3ec/osc-check_dups.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osc-check_dups.py 2017-10-21 00:37:31.000000000 +0200 @@ -5,6 +5,12 @@ # Copy this script to ~/.osc-plugins/ or /var/lib/osc-plugins . # Then try to run 'osc checker --help' to see the usage. +from xml.etree import cElementTree as ET +from osc.core import change_request_state +from osc.core import get_dependson +from osc.core import http_GET +from osc.core import makeurl + def _checker_check_dups(self, project, opts): url = makeurl(opts.apiurl, ['request'], "states=new,review&project=%s&view=collection" % project) f = http_GET(url) @@ -17,15 +23,17 @@ target = a.find('target') type = a.attrib['type'] assert target != None - if target.attrib['project'] != project: continue - #print(id) - #ET.dump(target) - if not target.attrib.has_key('package'): continue + if target.attrib['project'] != project: + continue + # print(id) + # ET.dump(target) + if 'package' not in target.attrib: + continue package = target.attrib['package'] - if rqs.has_key(type + package): + if type + package in rqs: [oldid, oldsource] = rqs[type + package] - if oldid > id: - s = oldid + if oldid > id: + s = oldid oldid = id id = s assert oldid < id @@ -52,7 +60,7 @@ opts.apiurl = self.get_api_url() for p in args[:]: - self._checker_check_dups(p, opts) + self._checker_check_dups(p, opts) #Local Variables: #mode: python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osc-cycle.py new/openSUSE-release-tools-20171020.7d266d5/osc-cycle.py --- old/openSUSE-release-tools-20171019.be5b3ec/osc-cycle.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osc-cycle.py 2017-10-21 00:37:31.000000000 +0200 @@ -15,6 +15,8 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import osc.core +from osc.core import get_dependson +from xml.etree import cElementTree as ET def do_cycle(self, subcmd, opts, *args): """${cmd_name}: Try to visualize build dependencies between the package list specified diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osc-staging.py new/openSUSE-release-tools-20171020.7d266d5/osc-staging.py --- old/openSUSE-release-tools-20171019.be5b3ec/osc-staging.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osc-staging.py 2017-10-21 00:37:31.000000000 +0200 @@ -18,6 +18,7 @@ import os import os.path +import subprocess import sys import tempfile import warnings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osclib/adi_command.py new/openSUSE-release-tools-20171020.7d266d5/osclib/adi_command.py --- old/openSUSE-release-tools-20171019.be5b3ec/osclib/adi_command.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osclib/adi_command.py 2017-10-21 00:37:31.000000000 +0200 @@ -44,6 +44,7 @@ Fore.CYAN + review['package'] + Fore.RESET, review['request']) return + if self.api.is_user_member_of(self.api.user, self.api.cstaging_group): print query_project, Fore.GREEN + 'ready' packages = [] @@ -138,6 +139,6 @@ requests.add(request) self.create_new_adi(requests, split=split) else: - self.check_adi_projects() + self.check_adi_projects() if self.api.is_user_member_of(self.api.user, self.api.cstaging_group): self.create_new_adi((), by_dp=by_dp, split=split) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osclib/cache.py new/openSUSE-release-tools-20171020.7d266d5/osclib/cache.py --- old/openSUSE-release-tools-20171019.be5b3ec/osclib/cache.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osclib/cache.py 2017-10-21 00:37:31.000000000 +0200 @@ -176,7 +176,7 @@ data = StringIO(text) if conf.config['debug']: print('CACHE_PUT', url, project, file=sys.stderr) - f = open(path,'w') + f = open(path, 'w') f.write(text) f.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osclib/cpio.py new/openSUSE-release-tools-20171020.7d266d5/osclib/cpio.py --- old/openSUSE-release-tools-20171019.be5b3ec/osclib/cpio.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osclib/cpio.py 2017-10-21 00:37:31.000000000 +0200 @@ -40,7 +40,7 @@ def __init__(self, off, buf): self.off = off self.buf = buf - + if off&3: raise Exception("invalid offset %d"% off) @@ -49,8 +49,8 @@ fields = struct.unpack(fmt, buf[self.off:off]) - if fields[0] != "070701": - raise Exception("invalid cpio header %s"%self.c_magic) + if fields[0] != "070701": + raise Exception("invalid cpio header %s"%self.c_magic) names = ("c_ino", "c_mode", "c_uid", "c_gid", "c_nlink", "c_mtime", "c_filesize", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osclib/repair_command.py new/openSUSE-release-tools-20171020.7d266d5/osclib/repair_command.py --- old/openSUSE-release-tools-20171019.be5b3ec/osclib/repair_command.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osclib/repair_command.py 2017-10-21 00:37:31.000000000 +0200 @@ -19,7 +19,7 @@ reqid = str(request) req = get_request(self.api.apiurl, reqid) - if not req: + if not req: raise oscerr.WrongArgs('Request {} not found'.format(reqid)) if req.state.name != 'review': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/osclib/stagingapi.py new/openSUSE-release-tools-20171020.7d266d5/osclib/stagingapi.py --- old/openSUSE-release-tools-20171019.be5b3ec/osclib/stagingapi.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/osclib/stagingapi.py 2017-10-21 00:37:31.000000000 +0200 @@ -30,6 +30,7 @@ from osc import conf from osc import oscerr from osc.core import show_package_meta +from osc.core import buildlog_strip_time from osc.core import change_review_state from osc.core import delete_package from osc.core import get_commitlog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/pkglistgen.py new/openSUSE-release-tools-20171020.7d266d5/pkglistgen.py --- old/openSUSE-release-tools-20171019.be5b3ec/pkglistgen.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/pkglistgen.py 2017-10-21 00:37:31.000000000 +0200 @@ -470,8 +470,8 @@ if not r: raise Exception("failed to add repo {}/{}/{}. Need to run update first?".format(project, reponame, arch)) for solvable in repo.solvables_iter(): - if solvable.name in solvables: - self.lockjobs[arch].append(pool.Job(solv.Job.SOLVER_SOLVABLE|solv.Job.SOLVER_LOCK, solvable.id)) + if solvable.name in solvables: + self.lockjobs[arch].append(pool.Job(solv.Job.SOLVER_SOLVABLE|solv.Job.SOLVER_LOCK, solvable.id)) solvables.add(solvable.name) pool.addfileprovides() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/repo_checker.py new/openSUSE-release-tools-20171020.7d266d5/repo_checker.py --- old/openSUSE-release-tools-20171019.be5b3ec/repo_checker.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/repo_checker.py 2017-10-21 00:37:31.000000000 +0200 @@ -225,7 +225,7 @@ self.logger.info('mirroring {}'.format(path)) if os.system(' '.join(parts)): - raise Exception('failed to mirror {}'.format(path)) + raise Exception('failed to mirror {}'.format(path)) self.mirrored.add((project, arch)) return directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/suppkg_rebuild.py new/openSUSE-release-tools-20171020.7d266d5/suppkg_rebuild.py --- old/openSUSE-release-tools-20171019.be5b3ec/suppkg_rebuild.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/suppkg_rebuild.py 2017-10-21 00:37:31.000000000 +0200 @@ -67,7 +67,7 @@ def get_project_binarylist(self, project, repository, arch): query = {'view': 'binarylist', 'repository': repository, 'arch': arch} - root = ET.parse(http_GET(makeurl(self.apiurl,['build', project, '_result'], + root = ET.parse(http_GET(makeurl(self.apiurl, ['build', project, '_result'], query=query))).getroot() return root diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/sync-rebuild.py new/openSUSE-release-tools-20171020.7d266d5/sync-rebuild.py --- old/openSUSE-release-tools-20171019.be5b3ec/sync-rebuild.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/sync-rebuild.py 2017-10-21 00:37:31.000000000 +0200 @@ -11,9 +11,9 @@ results = [] repo = "" -architectures = ["x86_64","i586"] +architectures = ["x86_64", "i586"] pkg = "" -projects = ['openSUSE:Factory','openSUSE:Factory:Rebuild'] +projects = ['openSUSE:Factory', 'openSUSE:Factory:Rebuild'] #initialize osc config osc.conf.get_config() @@ -21,27 +21,27 @@ def get_prj_results(prj, arch): url = osc.core.makeurl(osc.conf.config['apiurl'], ['build', prj, 'standard', arch, "_jobhistory?code=lastfailures"]) f = osc.core.http_GET(url) - xml = f.read() + xml = f.read() results = [] - root = ET.fromstring(xml) + root = ET.fromstring(xml) xmllines = root.findall("./jobhist") for pkg in xmllines: - if pkg.attrib['code'] == 'failed': + if pkg.attrib['code'] == 'failed': results.append(pkg.attrib['package']) - + return results def compare_results(factory, rebuild, testmode): com_res = set(rebuild).symmetric_difference(set(factory)) - + if testmode != False: print com_res - - return com_res + + return com_res def check_pkgs(rebuild_list): url = osc.core.makeurl(osc.conf.config['apiurl'], ['source', 'openSUSE:Factory']) @@ -52,14 +52,14 @@ root = ET.fromstring(xml) xmllines = root.findall("./entry") - + for pkg in xmllines: if pkg.attrib['name'] in rebuild_list: - pkglist.append(pkg.attrib['name']) + pkglist.append(pkg.attrib['name']) return pkglist -def rebuild_pkg_in_factory(package, prj, arch, testmode, code=None): +def rebuild_pkg_in_factory(package, prj, arch, testmode, code=None): query = { 'cmd': 'rebuild', 'arch': arch } #prj = "home:jzwickl" if package: @@ -67,11 +67,10 @@ pkg = query['package'] u = osc.core.makeurl(osc.conf.config['apiurl'], ['build', prj], query=query) - # print u if testmode != False: print "Trigger rebuild for this package: " + u - + else: try: print 'tried to trigger rebuild for project \'%s\' package \'%s\'' % (prj, pkg) @@ -79,29 +78,29 @@ except: print 'could not trigger rebuild for project \'%s\' package \'%s\'' % (prj, pkg) - + testmode = False try: if sys.argv[1] != None: if sys.argv[1] == '-test': testmode = True - print "testmode: "+str(testmode) + print "testmode: "+str(testmode) else: testmode = False except: pass for arch in architectures: - fact_result = get_prj_results('openSUSE:Factory', arch) - rebuild_result = get_prj_results('openSUSE:Factory:Rebuild', arch) - rebuild_result = check_pkgs(rebuild_result) - fact_result = check_pkgs(fact_result) - result = compare_results(fact_result, rebuild_result, testmode) - - print sorted(result) - - for package in result: - rebuild_pkg_in_factory(package, 'openSUSE:Factory', arch, testmode, None) - rebuild_pkg_in_factory(package, 'openSUSE:Factory:Rebuild', arch, testmode, None) + fact_result = get_prj_results('openSUSE:Factory', arch) + rebuild_result = get_prj_results('openSUSE:Factory:Rebuild', arch) + rebuild_result = check_pkgs(rebuild_result) + fact_result = check_pkgs(fact_result) + result = compare_results(fact_result, rebuild_result, testmode) + + print sorted(result) + + for package in result: + rebuild_pkg_in_factory(package, 'openSUSE:Factory', arch, testmode, None) + rebuild_pkg_in_factory(package, 'openSUSE:Factory:Rebuild', arch, testmode, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/tests/checktags_tests.py new/openSUSE-release-tools-20171020.7d266d5/tests/checktags_tests.py --- old/openSUSE-release-tools-20171019.be5b3ec/tests/checktags_tests.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/tests/checktags_tests.py 2017-10-21 00:37:31.000000000 +0200 @@ -28,10 +28,10 @@ import sys import re from osclib.cache import Cache -sys.path.append(".") - from check_tags_in_requests import TagChecker +sys.path.append(".") + APIURL = 'https://maintenancetest.example.com' FIXTURES = os.path.join(os.getcwd(), 'tests/fixtures') @@ -208,7 +208,7 @@ body=self._request_withhistory) httpretty.register_uri(httpretty.GET, - re.compile (re.escape(APIURL + "/search/request?")), + re.compile(re.escape(APIURL + "/search/request?")), match_querystring=True, body='<collection matches="0"></collection>') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20171019.be5b3ec/update_crawler.py new/openSUSE-release-tools-20171020.7d266d5/update_crawler.py --- old/openSUSE-release-tools-20171019.be5b3ec/update_crawler.py 2017-10-19 21:57:59.000000000 +0200 +++ new/openSUSE-release-tools-20171020.7d266d5/update_crawler.py 2017-10-21 00:37:31.000000000 +0200 @@ -172,7 +172,7 @@ srcrev = a.src_rev # sometimes requests only contain the decimal revision if re.match(r'^\d+$', srcrev) is not None: - xml = ET.fromstring(self._get_source_package(src_project,src_package, srcrev)) + xml = ET.fromstring(self._get_source_package(src_project, src_package, srcrev)) srcrev = xml.get('verifymd5') logging.debug('rev {}'.format(srcrev)) if srcrev == rev: @@ -351,7 +351,6 @@ logging.debug("skipped packages: %s", pformat(uc.skipped)) - if __name__ == '__main__': description = 'Create update SRs for Leap.' parser = argparse.ArgumentParser(description=description) ++++++ openSUSE-release-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.Pyj6Jq/_old 2017-10-21 20:22:18.441506942 +0200 +++ /var/tmp/diff_new_pack.Pyj6Jq/_new 2017-10-21 20:22:18.441506942 +0200 @@ -1,5 +1,5 @@ name: openSUSE-release-tools -version: 20171019.be5b3ec -mtime: 1508442631 -commit: be5b3ec12db757532b0b6f0a45336c06c7634847 +version: 20171020.7d266d5 +mtime: 1508539051 +commit: 7d266d5d0aa854d83814c0483ac4f339f81a9aef