From 4d83996da25b948122582ebe97aac676a7454af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 28 Jun 2012 11:21:26 +0200 Subject: [PATCH 01/12] - set version 0.135 --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index d5be869b..ea4dedcb 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3,7 +3,7 @@ # and distributed under the terms of the GNU General Public Licence, # either version 2, or version 3 (at your option). -__version__ = '0.134git' +__version__ = '0.135' # __store_version__ is to be incremented when the format of the working copy # "store" changes in an incompatible way. Please add any needed migration From 68b59f29a1b861696b516e37fa921f5227ed3137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 29 Jun 2012 10:57:29 +0200 Subject: [PATCH 02/12] - do not forward submit requests which do link to original request target anyway --- NEWS | 3 +++ osc/commandline.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/NEWS b/NEWS index b4941ef5..1399e12e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +0.135.1 + - do not forward requests to packages which do link anyway to original request target + 0.135 - request accept is offering now to forward submit request if it is a devel area like webui does - support archlinux builds (requires OBS 2.4) diff --git a/osc/commandline.py b/osc/commandline.py index e251d6cf..eda4b5ff 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2170,6 +2170,25 @@ Please submit there instead, or use --nodevelproject to force direct submission. for node in root.findall('package'): project = node.get('project') package = node.get('name') + # skip it when this is anyway a link to me + link_url = makeurl(apiurl, ['source', project, package]) + links_to_project = links_to_package = None + try: + file = http_GET(link_url) + root = ET.parse(file).getroot() + link_node = root.find('linkinfo') + if link_node != None: + links_to_project = link_node.get('project') or project + links_to_package = link_node.get('package') or package + except urllib2.HTTPError, e: + if e.code != 404: + print >>sys.stderr, 'Cannot get list of files for %s/%s: %s' % (project, package, e) + except SyntaxError, e: + print >>sys.stderr, 'Cannot parse list of files for %s/%s: %s' % (project, package, e) + if links_to_project==action.tgt_project and links_to_package==action.tgt_package: + # links to my request target anyway, no need to forward submit + continue + print project, if package != action.tgt_package: print "/", package, From 559409a880f91b7d641092c3f8226f893a487a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 29 Jun 2012 11:38:11 +0200 Subject: [PATCH 03/12] - language change from OBS special to standard SCM terminilogy --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index ea4dedcb..22c9f394 100644 --- a/osc/core.py +++ b/osc/core.py @@ -1830,7 +1830,7 @@ rev: %s print print "The link in this package is currently broken. Checking" print "out the last working version instead; please use 'osc pull'" - print "to repair the link." + print "to merge the conflicts." print def unmark_frozen(self): From 52014ba11e549f7e83b59c48a73a6d0510212540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sat, 30 Jun 2012 11:20:12 +0200 Subject: [PATCH 04/12] - fix creator name in forwarded requests --- osc/commandline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index eda4b5ff..9b598ffe 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2194,7 +2194,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. print "/", package, repl = raw_input('\nForward this submit to it? ([y]/n)') if repl.lower() == 'y' or repl == '': - msg = cgi.escape("%s (forwarded request %s from %s)" % ( rq.description, reqid, rq.get_creator)) + msg = "%s (forwarded request %s from %s)" % ( rq.description, reqid, rq.get_creator()) + print msg rid = create_submit_request(apiurl, action.tgt_project, action.tgt_package, project, package, msg) print "New request #", rid From bd9d628cccdde0c2cea4b94dc54bf3be36d86238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sat, 30 Jun 2012 11:23:43 +0200 Subject: [PATCH 05/12] - and escape correctly --- osc/commandline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 9b598ffe..4d8f1c9b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2197,7 +2197,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. msg = "%s (forwarded request %s from %s)" % ( rq.description, reqid, rq.get_creator()) print msg rid = create_submit_request(apiurl, action.tgt_project, action.tgt_package, - project, package, msg) + project, package, cgi.escape(msg)) print "New request #", rid # editmeta and its aliases are all depracated From a0cad9f88d84f1e1eddda4dfa446be36f6226294 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Tue, 3 Jul 2012 14:16:15 +0200 Subject: [PATCH 06/12] display source packgae name when searching for binaries --- osc/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 4d8f1c9b..43edf409 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6159,7 +6159,11 @@ Please submit there instead, or use --nodevelproject to force direct submission. if project is None: project = node.get('name') else: - package = node.get('name') + if kind == 'published/binary/id': + package = node.get('package') + else: + package = node.get('name') + result.append(project) if not package is None: result.append(package) From 077047059629cb1a18e74d2425bf2d72f9c8d29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sun, 15 Jul 2012 23:20:19 -0400 Subject: [PATCH 07/12] watchout the BEAST... This patch workarounds the BEAST attack in the client side making OSC to prefer TLS v1.1 or v1.2 ciphers/key exchanges when available. Now, as long as openSUSE API webservers do not support these protocols it will prefer the RC4-SHA1 combination to be in the safe side. --- osc/oscssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/oscssl.py b/osc/oscssl.py index a0b305be..127c0cdd 100644 --- a/osc/oscssl.py +++ b/osc/oscssl.py @@ -155,7 +155,7 @@ class mySSLContext(SSL.Context): def __init__(self): SSL.Context.__init__(self, 'sslv23') self.set_options(m2.SSL_OP_NO_SSLv2 | m2.SSL_OP_NO_SSLv3) - self.set_cipher_list("ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!MD5:@STRENGTH") + self.set_cipher_list("ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH") self.set_session_cache_mode(m2.SSL_SESS_CACHE_CLIENT) self.verrs = None #self.set_info_callback() # debug From 9f358532161131fe4a6d31c917b1dd522c14c73e Mon Sep 17 00:00:00 2001 From: Jordi Mallach Date: Mon, 6 Aug 2012 09:29:59 +0200 Subject: [PATCH 08/12] Fix locale encoding extraction Using locale.getdefaultlocale() for encoding detection breaks with locales that use modifiers, such as de_DE@euro, or ca_ES@valencia. Use locale.getpreferredencoding() instead, which should do the right thing. --- osc-wrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osc-wrapper.py b/osc-wrapper.py index 416dbe6d..0a292dc4 100755 --- a/osc-wrapper.py +++ b/osc-wrapper.py @@ -11,9 +11,9 @@ from osc import commandline, babysitter # this is a hack to make osc work as expected with utf-8 characters, # no matter how site.py is set... reload(sys) -loc = locale.getdefaultlocale()[1] +loc = locale.getpreferredencoding() if not loc: - loc = sys.getdefaultencoding() + loc = sys.getpreferredencoding() sys.setdefaultencoding(loc) del sys.setdefaultencoding From ab28b8f4929002ae67fe4e4f5aae3374f79ff216 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 13 Aug 2012 12:54:38 +0200 Subject: [PATCH 09/12] - fix build result listing for arch --- osc/build.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osc/build.py b/osc/build.py index 9f970639..9724407f 100644 --- a/osc/build.py +++ b/osc/build.py @@ -257,13 +257,22 @@ def get_built_files(pacdir, pactype): b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'), '-type', 'f'], stdout=subprocess.PIPE).stdout.read().strip() - else: + elif pactype == 'deb': b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'), '-name', '*.deb'], stdout=subprocess.PIPE).stdout.read().strip() s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SOURCES.DEB'), '-type', 'f'], stdout=subprocess.PIPE).stdout.read().strip() + elif pactype == 'arch': + b_built = subprocess.Popen(['find', os.path.join(pacdir, 'ARCHPKGS'), + '-name', '*.pkg.tar*'], + stdout=subprocess.PIPE).stdout.read().strip() + s_built = [] + else: + print >>sys.stderr, 'WARNING: Unknown package type \'%s\'.' % (pactype) + b_built = [] + s_built = [] return s_built, b_built def get_repo(path): From 4b44e7470b9504d69ecfd25adbb6d880c0bfbb40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Mon, 10 Sep 2012 10:43:28 +0200 Subject: [PATCH 10/12] update default list of request states Hi, "declined" was some time ago changed to be considered an "open" request state. the default behavior of "osc rq list" is IMHO to show open requests (requests in state new or review), so I'm attaching a patch that adds "declined" as well. Tia, Dirk From 73fd10a2203be8e9dc215106648b2d9686d8fdc5 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Sep 2012 10:40:48 +0200 Subject: [PATCH] add 'declined' to list of default states for rq list osc rq list should show all currently "open" requests. "declined" is an open request state, so it should be included by default. --- osc/commandline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 43edf409..a3723c5c 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1747,7 +1747,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='all states. Same as\'-s all\'') @cmdln.option('-f', '--force', action='store_true', help='enforce state change, can be used to ignore open reviews') - @cmdln.option('-s', '--state', default='', # default is 'all' if no args given, 'new,review' otherwise + @cmdln.option('-s', '--state', default='', # default is 'all' if no args given, 'declined,new,review' otherwise help='only list requests in one of the comma separated given states (new/review/accepted/revoked/declined) or "all" [default="new,review", or "all", if no args given]') @cmdln.option('-D', '--days', metavar='DAYS', help='only list requests in state "new" or changed in the last DAYS. [default=%(request_list_days)s]') @@ -1871,7 +1871,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. opts.state = 'all' if opts.state == '': - opts.state = 'new,review' + opts.state = 'declined,new,review' if args[0] == 'help': return self.do_help(['help', 'request']) From eef243f6be92b39194ddcd2da98425cede05a61d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Sep 2012 13:49:21 +0200 Subject: [PATCH 11/12] Update help text --- osc/commandline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index a3723c5c..b28e2085 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1748,7 +1748,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.option('-f', '--force', action='store_true', help='enforce state change, can be used to ignore open reviews') @cmdln.option('-s', '--state', default='', # default is 'all' if no args given, 'declined,new,review' otherwise - help='only list requests in one of the comma separated given states (new/review/accepted/revoked/declined) or "all" [default="new,review", or "all", if no args given]') + help='only list requests in one of the comma separated given states (new/review/accepted/revoked/declined) or "all" [default="declined,new,review", or "all", if no args given]') @cmdln.option('-D', '--days', metavar='DAYS', help='only list requests in state "new" or changed in the last DAYS. [default=%(request_list_days)s]') @cmdln.option('-U', '--user', metavar='USER', From 4ab6f905b341d7ede8f390cd650dc5af7c32a2e6 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Mon, 17 Sep 2012 13:12:50 +0200 Subject: [PATCH 12/12] make commit --noservice work for commitExtPackage --- osc/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osc/core.py b/osc/core.py index 22c9f394..bb15b588 100644 --- a/osc/core.py +++ b/osc/core.py @@ -787,7 +787,7 @@ class Project: elif pac in self.pacs_broken: print 'osc: \'%s\' package not found' % pac elif state == None: - self.commitExtPackage(pac, msg, todo, verbose=verbose) + self.commitExtPackage(pac, msg, todo, verbose=verbose, skip_local_service_run=skip_local_service_run) finally: self.write_packages() else: @@ -856,7 +856,7 @@ class Project: delete_package(self.apiurl, self.name, pac) self.del_package_node(pac) - def commitExtPackage(self, pac, msg, files = [], verbose=False): + def commitExtPackage(self, pac, msg, files = [], verbose=False, skip_local_service_run=False): """commits a package from an external project""" if os_path_samefile(os.path.join(self.dir, pac), os.getcwd()): pac_path = '.' @@ -875,7 +875,7 @@ class Project: template_args=({'name': pac, 'user': user}), apiurl=apiurl) p = Package(pac_path) p.todo = files - p.commit(msg=msg, verbose=verbose) + p.commit(msg=msg, verbose=verbose, skip_local_service_run=skip_local_service_run) def __str__(self): r = []