mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
Merge branch 'master' of github.com:openSUSE/osc
This commit is contained in:
commit
a8d26db675
3
NEWS
3
NEWS
@ -1,3 +1,6 @@
|
|||||||
|
0.135.1
|
||||||
|
- do not forward requests to packages which do link anyway to original request target
|
||||||
|
|
||||||
0.135
|
0.135
|
||||||
- request accept is offering now to forward submit request if it is a devel area like webui does
|
- 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)
|
- support archlinux builds (requires OBS 2.4)
|
||||||
|
@ -11,9 +11,9 @@ from osc import commandline, babysitter
|
|||||||
# this is a hack to make osc work as expected with utf-8 characters,
|
# this is a hack to make osc work as expected with utf-8 characters,
|
||||||
# no matter how site.py is set...
|
# no matter how site.py is set...
|
||||||
reload(sys)
|
reload(sys)
|
||||||
loc = locale.getdefaultlocale()[1]
|
loc = locale.getpreferredencoding()
|
||||||
if not loc:
|
if not loc:
|
||||||
loc = sys.getdefaultencoding()
|
loc = sys.getpreferredencoding()
|
||||||
sys.setdefaultencoding(loc)
|
sys.setdefaultencoding(loc)
|
||||||
del sys.setdefaultencoding
|
del sys.setdefaultencoding
|
||||||
|
|
||||||
|
11
osc/build.py
11
osc/build.py
@ -257,13 +257,22 @@ def get_built_files(pacdir, pactype):
|
|||||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'),
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'),
|
||||||
'-type', 'f'],
|
'-type', 'f'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
else:
|
elif pactype == 'deb':
|
||||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'),
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'),
|
||||||
'-name', '*.deb'],
|
'-name', '*.deb'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SOURCES.DEB'),
|
s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SOURCES.DEB'),
|
||||||
'-type', 'f'],
|
'-type', 'f'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
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
|
return s_built, b_built
|
||||||
|
|
||||||
def get_repo(path):
|
def get_repo(path):
|
||||||
|
@ -1747,8 +1747,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help='all states. Same as\'-s all\'')
|
help='all states. Same as\'-s all\'')
|
||||||
@cmdln.option('-f', '--force', action='store_true',
|
@cmdln.option('-f', '--force', action='store_true',
|
||||||
help='enforce state change, can be used to ignore open reviews')
|
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]')
|
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',
|
@cmdln.option('-D', '--days', metavar='DAYS',
|
||||||
help='only list requests in state "new" or changed in the last DAYS. [default=%(request_list_days)s]')
|
help='only list requests in state "new" or changed in the last DAYS. [default=%(request_list_days)s]')
|
||||||
@cmdln.option('-U', '--user', metavar='USER',
|
@cmdln.option('-U', '--user', metavar='USER',
|
||||||
@ -1871,7 +1871,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
opts.state = 'all'
|
opts.state = 'all'
|
||||||
|
|
||||||
if opts.state == '':
|
if opts.state == '':
|
||||||
opts.state = 'new,review'
|
opts.state = 'declined,new,review'
|
||||||
|
|
||||||
if args[0] == 'help':
|
if args[0] == 'help':
|
||||||
return self.do_help(['help', 'request'])
|
return self.do_help(['help', 'request'])
|
||||||
@ -2170,14 +2170,34 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
for node in root.findall('package'):
|
for node in root.findall('package'):
|
||||||
project = node.get('project')
|
project = node.get('project')
|
||||||
package = node.get('name')
|
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,
|
print project,
|
||||||
if package != action.tgt_package:
|
if package != action.tgt_package:
|
||||||
print "/", package,
|
print "/", package,
|
||||||
repl = raw_input('\nForward this submit to it? ([y]/n)')
|
repl = raw_input('\nForward this submit to it? ([y]/n)')
|
||||||
if repl.lower() == 'y' or repl == '':
|
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,
|
rid = create_submit_request(apiurl, action.tgt_project, action.tgt_package,
|
||||||
project, package, msg)
|
project, package, cgi.escape(msg))
|
||||||
print "New request #", rid
|
print "New request #", rid
|
||||||
|
|
||||||
# editmeta and its aliases are all depracated
|
# editmeta and its aliases are all depracated
|
||||||
@ -6139,7 +6159,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if project is None:
|
if project is None:
|
||||||
project = node.get('name')
|
project = node.get('name')
|
||||||
else:
|
else:
|
||||||
package = node.get('name')
|
if kind == 'published/binary/id':
|
||||||
|
package = node.get('package')
|
||||||
|
else:
|
||||||
|
package = node.get('name')
|
||||||
|
|
||||||
result.append(project)
|
result.append(project)
|
||||||
if not package is None:
|
if not package is None:
|
||||||
result.append(package)
|
result.append(package)
|
||||||
|
10
osc/core.py
10
osc/core.py
@ -3,7 +3,7 @@
|
|||||||
# and distributed under the terms of the GNU General Public Licence,
|
# and distributed under the terms of the GNU General Public Licence,
|
||||||
# either version 2, or version 3 (at your option).
|
# 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_version__ is to be incremented when the format of the working copy
|
||||||
# "store" changes in an incompatible way. Please add any needed migration
|
# "store" changes in an incompatible way. Please add any needed migration
|
||||||
@ -787,7 +787,7 @@ class Project:
|
|||||||
elif pac in self.pacs_broken:
|
elif pac in self.pacs_broken:
|
||||||
print 'osc: \'%s\' package not found' % pac
|
print 'osc: \'%s\' package not found' % pac
|
||||||
elif state == None:
|
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:
|
finally:
|
||||||
self.write_packages()
|
self.write_packages()
|
||||||
else:
|
else:
|
||||||
@ -856,7 +856,7 @@ class Project:
|
|||||||
delete_package(self.apiurl, self.name, pac)
|
delete_package(self.apiurl, self.name, pac)
|
||||||
self.del_package_node(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"""
|
"""commits a package from an external project"""
|
||||||
if os_path_samefile(os.path.join(self.dir, pac), os.getcwd()):
|
if os_path_samefile(os.path.join(self.dir, pac), os.getcwd()):
|
||||||
pac_path = '.'
|
pac_path = '.'
|
||||||
@ -875,7 +875,7 @@ class Project:
|
|||||||
template_args=({'name': pac, 'user': user}), apiurl=apiurl)
|
template_args=({'name': pac, 'user': user}), apiurl=apiurl)
|
||||||
p = Package(pac_path)
|
p = Package(pac_path)
|
||||||
p.todo = files
|
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):
|
def __str__(self):
|
||||||
r = []
|
r = []
|
||||||
@ -1830,7 +1830,7 @@ rev: %s
|
|||||||
print
|
print
|
||||||
print "The link in this package is currently broken. Checking"
|
print "The link in this package is currently broken. Checking"
|
||||||
print "out the last working version instead; please use 'osc pull'"
|
print "out the last working version instead; please use 'osc pull'"
|
||||||
print "to repair the link."
|
print "to merge the conflicts."
|
||||||
print
|
print
|
||||||
|
|
||||||
def unmark_frozen(self):
|
def unmark_frozen(self):
|
||||||
|
@ -155,7 +155,7 @@ class mySSLContext(SSL.Context):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
SSL.Context.__init__(self, 'sslv23')
|
SSL.Context.__init__(self, 'sslv23')
|
||||||
self.set_options(m2.SSL_OP_NO_SSLv2 | m2.SSL_OP_NO_SSLv3)
|
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.set_session_cache_mode(m2.SSL_SESS_CACHE_CLIENT)
|
||||||
self.verrs = None
|
self.verrs = None
|
||||||
#self.set_info_callback() # debug
|
#self.set_info_callback() # debug
|
||||||
|
Loading…
Reference in New Issue
Block a user