Hello community,

here is the log from the commit of package osc for openSUSE:Factory checked in 
at 2013-11-28 16:51:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
 and      /work/SRC/openSUSE:Factory/.osc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "osc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes  2013-09-17 16:27:43.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.osc.new/osc.changes     2013-11-28 
16:51:57.000000000 +0100
@@ -1,0 +2,9 @@
+Thu Nov 21 09:30:40 UTC 2013 - [email protected]
+
+- 0.142.0
+  - support for OBS 2.5 authentification token support
+  - ppc64p7 build support
+  - request --no-devel to disable request forwarding
+  - crash bug fix for copypac
+
+-------------------------------------------------------------------

Old:
----
  osc-0.141.0.tar.gz

New:
----
  osc-0.142.0.tar.gz

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

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.B0huvK/_old  2013-11-28 16:51:58.000000000 +0100
+++ /var/tmp/diff_new_pack.B0huvK/_new  2013-11-28 16:51:58.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           osc
-Version:        0.141.0
+Version:        0.142.0
 Release:        0
 Summary:        openSUSE Build Service Commander
 License:        GPL-2.0+

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.B0huvK/_old  2013-11-28 16:51:58.000000000 +0100
+++ /var/tmp/diff_new_pack.B0huvK/_new  2013-11-28 16:51:58.000000000 +0100
@@ -1,5 +1,5 @@
 pkgname=osc
-pkgver=0.141.0
+pkgver=0.142.0
 pkgrel=0
 pkgdesc="Open Build Service client"
 arch=('i686' 'x86_64')
@@ -8,7 +8,7 @@
 groups=('base-devel')
 depends=('python')
 source=(osc-${pkgver}.tar.gz)
-md5sums=('0691859fd496aa1f76ccb145711eed8a')
+md5sums=('4f60a6cafbc38c1ca9a48fb4705d01c0')
 
 package() {
   msg "Installing osc ..."

++++++ _service ++++++
--- /var/tmp/diff_new_pack.B0huvK/_old  2013-11-28 16:51:58.000000000 +0100
+++ /var/tmp/diff_new_pack.B0huvK/_new  2013-11-28 16:51:58.000000000 +0100
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">0.141.0</param>
-    <param name="revision">0.141.0</param>
+    <param name="version">0.142.0</param>
+    <param name="revision">0.142.0</param>
     <param name="url">git://github.com/openSUSE/osc.git</param>
     <param name="scm">git</param>
   </service>

++++++ osc-0.141.0.tar.gz -> osc-0.142.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.141.0/NEWS new/osc-0.142.0/NEWS
--- old/osc-0.141.0/NEWS        2013-09-17 13:51:37.000000000 +0200
+++ new/osc-0.142.0/NEWS        2013-11-21 10:30:25.000000000 +0100
@@ -1,3 +1,11 @@
+0.142
+  - ppc64p7 build support
+  - request --no-devel to disable request forwarding
+#
+# Features which requires OBS 2.5
+#
+  - authentification token support
+
 0.141
   - crash fixes
   - support for kiwi appliance builds using obsrepositories:/ directive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.141.0/osc/build.py new/osc-0.142.0/osc/build.py
--- old/osc-0.141.0/osc/build.py        2013-09-17 13:51:37.000000000 +0200
+++ new/osc-0.142.0/osc/build.py        2013-11-21 10:30:25.000000000 +0100
@@ -64,7 +64,8 @@
              'armv8l' :[                                         'armv4l', 
'armv5el', 'armv6el', 'armv7el', 'armv8el' ], # not existing arch, just for 
compatibility
              'armv5tel':[                                        'armv4l', 
'armv5el',                                 'armv5tel' ], 
              's390x':  ['s390' ],
-             'ppc64':  [                        'ppc', 'ppc64' ],
+             'ppc64':  [                        'ppc', 'ppc64', 'ppc64p7' ],
+             'ppc64le':[ 'ppc64le' ],
              'i586':   [                'i386' ],
              'i686':   [        'i586', 'i386' ],
              'x86_64': ['i686', 'i586', 'i386' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.141.0/osc/commandline.py 
new/osc-0.142.0/osc/commandline.py
--- old/osc-0.141.0/osc/commandline.py  2013-09-17 13:51:37.000000000 +0200
+++ new/osc-0.142.0/osc/commandline.py  2013-11-21 10:30:25.000000000 +0100
@@ -522,10 +522,10 @@
         run_editor(filename)
 
     @cmdln.alias('bsdevelproject')
-    @cmdln.option('-r', '--raw', action='store_true',
-                        help='print raw xml snippet')
+    @cmdln.alias('dp')
+    @cmdln.option('-r', '--raw', action='store_true', help='deprecated option')
     def do_develproject(self, subcmd, opts, *args):
-        """${cmd_name}: print the bsdevelproject of a package
+        """${cmd_name}: print the devel project / package of a package
 
         Examples:
             osc develproject PRJ PKG
@@ -544,13 +544,103 @@
         else:
             raise oscerr.WrongArgs('need Project and Package')
 
-        devel = show_develproject(apiurl, project, package, opts.raw)
-        if devel is None:
-            print('\'%s/%s\' has no devel project' % (project, package))
-        elif opts.raw:
-            ET.dump(devel)
+        devprj, devpkg = show_devel_project(apiurl, project, package)
+        if devprj is None:
+            print('%s / %s has no devel project' % (project, package))
+        elif devpkg and devpkg != package:
+            print("%s %s" % (devprj, devpkg))
         else:
-            print(devel)
+            print(devprj)
+
+    @cmdln.alias('sdp')
+    @cmdln.option('-u', '--unset', action='store_true',
+                  help='remove devel project')
+    def do_setdevelproject(self, subcmd, opts, *args):
+        """${cmd_name}: Set the devel project / package of a package
+
+        Examples:
+            osc setdevelproject [PRJ PKG] DEVPRJ [DEVPKG]
+        ${cmd_option_list}
+        """
+        args = slash_split(args)
+        apiurl = self.get_api_url()
+
+        devprj, devpkg = None, None
+        if len(args) == 3 or len(args) == 4:
+            project, package = args[0], args[1]
+            devprj = args[2]
+            if len(args) == 4:
+                devpkg = args[3]
+        elif len(args) >= 1 and len(args) <= 2:
+            project, package = store_read_project(os.curdir), 
store_read_package(os.curdir)
+            devprj = args[0]
+            if len(args) == 2:
+                devpkg = args[1]
+        else:
+            if opts.unset:
+                project, package = store_read_project(os.curdir), 
store_read_package(os.curdir)
+            else:
+                raise oscerr.WrongArgs('need at least DEVPRJ (and possibly 
DEVPKG)')
+
+        set_devel_project(apiurl, project, package, devprj, devpkg)
+
+
+    @cmdln.option('-c', '--create', action='store_true',
+                        help='Create a new token')
+    @cmdln.option('-d', '--delete', metavar='TOKENID',
+                        help='Create a new token')
+    @cmdln.option('-t', '--trigger', metavar='TOKENID',
+                        help='Trigger the action of a token')
+    def do_token(self, subcmd, opts, *args):
+        """${cmd_name}: Show and manage authentification token
+
+        Authentification token can be used to run specific commands without
+        sending credentials.
+
+        Usage:
+            osc token
+            osc token --create [<PROJECT> <PACKAGE>]
+            osc token --delete <TOKENID>
+            osc token --trigger <TOKENID>
+        ${cmd_option_list}
+        """
+
+        args = slash_split(args)
+
+        apiurl = self.get_api_url()
+        url = apiurl + "/person/" + conf.get_apiurl_usr(apiurl) + "/token"
+
+        if opts.create:
+            print("Create a new token")
+            url += "?cmd=create"
+            if len(args) > 1:
+                url += "&project=" + args[0]
+                url += "&package=" + args[1]
+
+            f = http_POST(url)
+            while True:
+                buf = f.read(16384)
+                if not buf:
+                    break
+                sys.stdout.write(buf)
+
+        elif opts.delete:
+            print("Delete token")
+            url += "/" + opts.delete
+            http_DELETE(url)
+        elif opts.trigger:
+            print("Trigger token")
+            url = apiurl + "/trigger/runservice"
+            req = URLRequest(url)
+            req.get_method = lambda: "POST"
+            req.add_header('Content-Type', 'application/octet-stream')
+            req.add_header('Authorization', "Token "+opts.trigger)
+            fd = urlopen(req, data=None)
+            print(fd.read())
+        else:
+            # just list token
+            for data in streamfile(url, http_GET):
+                sys.stdout.write(data)
 
 
     @cmdln.option('-a', '--attribute', metavar='ATTRIBUTE',
@@ -1006,7 +1096,7 @@
             f = http_GET(u)
             root = ET.parse(f).getroot()
             value = root.findtext('attribute/value')
-            if value:
+            if value and not opts.yes:
                 repl = ''
                 print('\n\nThere are already following submit request: %s.' % \
                       ', '.join([str(i) for i in myreqs ]))
@@ -1076,7 +1166,7 @@
         if not opts.nodevelproject:
             devloc = None
             try:
-                devloc = show_develproject(apiurl, dst_project, dst_package)
+                devloc, _ = show_devel_project(apiurl, dst_project, 
dst_package)
             except HTTPError:
                 print("""\
 Warning: failed to fetch meta data for '%s' package '%s' (new package?) """ \
@@ -1287,7 +1377,7 @@
         if not opts.nodevelproject:
             devloc = None
             try:
-                devloc = show_develproject(apiurl, dst_project, dst_package)
+                devloc, _ = show_devel_project(apiurl, dst_project, 
dst_package)
             except HTTPError:
                 print("""\
 Warning: failed to fetch meta data for '%s' package '%s' (new package?) """ \
@@ -1319,8 +1409,8 @@
             reqs = get_request_list(apiurl, dst_project, dst_package, 
req_type='submit', req_state=['new','review'])
             user = conf.get_apiurl_usr(apiurl)
             myreqs = [ i for i in reqs if i.state.who == user ]
-            repl = ''
-            if len(myreqs) > 0:
+            repl = 'y'
+            if len(myreqs) > 0 and not opts.yes:
                 print('You already created the following submit request: %s.' 
% \
                       ', '.join([i.reqid for i in myreqs ]))
                 repl = raw_input('Supersede the old requests? (y/n/c) ')
@@ -1759,6 +1849,8 @@
                   help='generate a diff')
     @cmdln.option('-u', '--unified', action='store_true',
                   help='output the diff in the unified diff format')
+    @cmdln.option('--no-devel', action='store_true',
+                  help='Do not attempt to forward to devel project')
     @cmdln.option('-m', '--message', metavar='TEXT',
                   help='specify message TEXT')
     @cmdln.option('-t', '--type', metavar='TYPE',
@@ -2207,8 +2299,7 @@
                               })
                         f = http_GET(u)
                         root = ET.parse(f).getroot()
-                        if root.findall('package'):
-                            print("This package instance is defined as devel 
are in ", end=' ')
+                        if root.findall('package') and not opts.no_devel:
                             for node in root.findall('package'):
                                 project = node.get('project')
                                 package = node.get('name')
@@ -2621,7 +2712,7 @@
                      revision=rev,
                      comment=comment,
                      keep_link=opts.keep_link)
-        print(r.read())
+        print(r)
 
 
     @cmdln.option('-r', '--repo', metavar='REPO',
@@ -2928,7 +3019,12 @@
                 print("%s/%s"%(r.get('project'), r.get('package')))
             return
         
-        print("Project " + result + " created.")
+        apiopt = ''
+        if conf.get_configParser().get('general', 'apiurl') != apiurl:
+            apiopt = '-A %s ' % apiurl
+        print('A working copy of the maintenance branch can be checked out 
with:\n\n' \
+              'osc %sco %s' \
+                    % (apiopt, result))
 
         if opts.checkout:
             Project.init_project(apiurl, result, result, 
conf.config['do_package_tracking'])
@@ -5994,16 +6090,17 @@
 
 
     @cmdln.option('-a', '--arch', metavar='ARCH',
-                        help='Abort builds for a specific architecture')
+                        help='Restart builds for a specific architecture')
     @cmdln.option('-r', '--repo', metavar='REPO',
-                        help='Abort builds for a specific repository')
+                        help='Restart builds for a specific repository')
     @cmdln.option('--all', action='store_true',
-                        help='Abort all running builds of entire project')
-    def do_abortbuild(self, subcmd, opts, *args):
-        """${cmd_name}: Aborts the build of a certain project or package
+                        help='Restart all running builds of entire project')
+    @cmdln.alias('abortbuild')
+    def do_restartbuild(self, subcmd, opts, *args):
+        """${cmd_name}: Restart the build of a certain project or package
 
         usage:
-            osc abortbuild [PROJECT [PACKAGE [REPOSITORY [ARCH]]]]
+            osc restartbuild [PROJECT [PACKAGE [REPOSITORY [ARCH]]]]
         ${cmd_option_list}
         """
         args = slash_split(args)
@@ -6038,9 +6135,9 @@
             arch = args[3]
 
         if not (opts.all or package or repo or arch):
-            raise oscerr.WrongOptions('No option has been provided. If you 
want to abort all packages of the entire project, use --all option.')
+            raise oscerr.WrongOptions('No option has been provided. If you 
want to restart all packages of the entire project, use --all option.')
 
-        print(abortbuild(apiurl, project, package, opts.arch, opts.repo))
+        print(cmdbuild(apiurl, subcmd, project, package, opts.arch, opts.repo))
 
 
     @cmdln.option('-a', '--arch', metavar='ARCH',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.141.0/osc/core.py new/osc-0.142.0/osc/core.py
--- old/osc-0.141.0/osc/core.py 2013-09-17 13:51:37.000000000 +0200
+++ new/osc-0.142.0/osc/core.py 2013-11-21 10:30:25.000000000 +0100
@@ -5,7 +5,7 @@
 
 from __future__ import print_function
 
-__version__ = '0.141'
+__version__ = '0.142'
 
 # __store_version__ is to be incremented when the format of the working copy
 # "store" changes in an incompatible way. Please add any needed migration
@@ -1456,6 +1456,8 @@
                 revision=revision, progress_obj=self.progress_obj, 
mtime=mtime, meta=self.meta)
 
         shutil.copyfile(storefilename, filename)
+        if mtime:
+            os.utime(filename, (-1, mtime))
         if not origfile is None:
             os.unlink(origfile)
 
@@ -2899,7 +2901,7 @@
     return urlunsplit((scheme, netloc, '/'.join(l), query, ''))
 
 
-def http_request(method, url, headers={}, data=None, file=None, timeout=100):
+def http_request(method, url, headers={}, data=None, file=None, timeout=0):
     """wrapper around urllib2.urlopen for error handling,
     and to support additional (PUT, DELETE) methods"""
     def create_memoryview(obj):
@@ -3144,14 +3146,36 @@
         raise
 
 
-def show_develproject(apiurl, prj, pac, xml_node=False):
+def show_devel_project(apiurl, prj, pac):
     m = show_package_meta(apiurl, prj, pac)
     node = ET.fromstring(''.join(m)).find('devel')
-    if not node is None:
-        if xml_node:
-            return node
-        return node.get('project')
-    return None
+    if node is None:
+        return None, None
+    else:
+        return node.get('project'), node.get('package', None)
+
+
+def set_devel_project(apiurl, prj, pac, devprj=None, devpac=None):
+    meta = show_package_meta(apiurl, prj, pac)
+    root = ET.fromstring(''.join(meta))
+    node = root.find('devel')
+    if node is None:
+        if devprj is None:
+            return
+        node = ET.Element('devel')
+        root.append(node)
+    else:
+        if devprj is None:
+            root.remove(node)
+        else:
+            node.clear()
+    if devprj:
+        node.set('project', devprj)
+        if devpac:
+            node.set('package', devpac)
+    url = makeurl(apiurl, ['source', prj, pac, '_meta'])
+    mf = metafile(url, ET.tostring(root, encoding=ET_ENCODING))
+    mf.sync()
 
 
 def show_package_disabled_repos(apiurl, prj, pac):
@@ -3371,8 +3395,9 @@
     et = ET.fromstring(''.join(m))
     if include_service_files:
         try:
-            if et.find('serviceinfo') and 
et.find('serviceinfo').get('xsrcmd5'):
-                return et.find('serviceinfo').get('xsrcmd5')
+            sinfo = et.find('serviceinfo')
+            if sinfo and sinfo.get('xsrcmd5') and not sinfo.get('error'):
+                return sinfo.get('xsrcmd5')
         except:
             pass
     return et.get('srcmd5')
@@ -3407,7 +3432,9 @@
     et = ET.fromstring(''.join(m))
     if include_service_files:
         try:
-            return et.find('serviceinfo').get('xsrcmd5')
+            sinfo = et.find('serviceinfo')
+            if sinfo and sinfo.get('xsrcmd5') and not sinfo.get('error'):
+                return sinfo.get('xsrcmd5')
         except:
             pass
     return et.get('rev')
@@ -4174,6 +4201,7 @@
         query['meta'] = 1
     if full:
         query['filelimit'] = 0
+        query['tarlimit'] = 0
 
     u = makeurl(apiurl, ['source', new_project, new_package], query=query)
 
@@ -4996,10 +5024,10 @@
             results = get_package_results(apiurl, prj, package, lastbuild, 
repository, arch, oldstate)
         except HTTPError as e:
             # check for simple timeout error and fetch again
-            if e.code != 502:
-                raise
-            # re-try result request
-            continue
+            if e.code == 502 or e.code == 504:
+                # re-try result request
+                continue
+            raise
 
         for res in results:
             if '_oldstate' in res:
@@ -5644,32 +5672,17 @@
 
 
 def abortbuild(apiurl, project, package=None, arch=None, repo=None):
-    query = { 'cmd': 'abortbuild' }
-    if package:
-        query['package'] = package
-    if arch:
-        query['arch'] = arch
-    if repo:
-        query['repository'] = repo
-    u = makeurl(apiurl, ['build', project], query)
-    try:
-        f = http_POST(u)
-    except HTTPError as e:
-        e.osc_msg = 'abortion failed for project %s' % project
-        if package:
-            e.osc_msg += ' package %s' % package
-        if arch:
-            e.osc_msg += ' arch %s' % arch
-        if repo:
-            e.osc_msg += ' repo %s' % repo
-        raise
+    return cmdbuild(apiurl, 'abortbuild', project, package, arch, repo)
 
-    root = ET.parse(f).getroot()
-    return root.get('code')
+def restartbuild(apiurl, project, package=None, arch=None, repo=None):
+    return cmdbuild(apiurl, 'restartbuild', project, package, arch, repo)
+
+def wipebinaries(apiurl, project, package=None, arch=None, repo=None):
+    return cmdbuild(apiurl, 'wipebinaries', project, package, arch, repo)
 
 
-def wipebinaries(apiurl, project, package=None, arch=None, repo=None, 
code=None):
-    query = { 'cmd': 'wipe' }
+def cmdbuild(apiurl, cmd, project, package=None, arch=None, repo=None, 
code=None):
+    query = { 'cmd': cmd }
     if package:
         query['package'] = package
     if arch:
@@ -6298,7 +6311,7 @@
         if pac.status(filename) == 'M':
             diff += get_source_file_diff(pac.absdir, filename, pac.rev)
         elif pac.status(filename) == 'A':
-            f = open(filename, 'r')
+            f = open(os.path.join(pac.absdir, filename), 'r')
             for line in f:
                 diff += '+' + line
             f.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.141.0/tests/test_prdiff.py 
new/osc-0.142.0/tests/test_prdiff.py
--- old/osc-0.141.0/tests/test_prdiff.py        2013-09-17 13:51:37.000000000 
+0200
+++ new/osc-0.142.0/tests/test_prdiff.py        2013-11-21 10:30:26.000000000 
+0100
@@ -13,7 +13,7 @@
 BRANCH   = 'home:user:branches:' + UPSTREAM
 
 def rdiff_url(pkg, oldprj, newprj):
-    return API_URL + 
'source/%s/%s?unified=1&opackage=%s&oproject=%s&cmd=diff&expand=1&filelimit=0' 
% \
+    return API_URL + 
'source/%s/%s?unified=1&opackage=%s&oproject=%s&cmd=diff&expand=1&tarlimit=0&filelimit=0'
 % \
         (newprj, pkg, pkg, oldprj.replace(':', '%3A'))
 
 def request_url(prj):

++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.B0huvK/_old  2013-11-28 16:51:59.000000000 +0100
+++ /var/tmp/diff_new_pack.B0huvK/_new  2013-11-28 16:51:59.000000000 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: osc
-Version: 0.141.0
+Version: 0.142.0
 Binary: osc
 Maintainer: Adrian Schroeter <[email protected]>
 Architecture: any

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to