support for sparc builds (patch by Dennis Gilmore)

This commit is contained in:
Mike Bonnet 2007-03-29 11:35:31 -04:00
parent 0fff1dfac3
commit 6ae04b1a32
4 changed files with 15 additions and 6 deletions

View file

@ -338,10 +338,15 @@ class BuildRoot(object):
def mock(self, args, skip_setarch=False):
"""Run mock"""
global options
mockpath = getattr(options,"mockpath","mock")
mockpath = getattr(options,"mockpath","/usr/bin/mock")
cmd = [mockpath, "-r", self.mockcfg]
if not skip_setarch:
cmd[:0] = ['setarch', self.br_arch]
if self.br_arch.startswith('sparc64'):
cmd[:0] = ['sparc64']
elif self.br_arch.startswith('sparc'):
cmd[:0] = ['sparc32']
else:
cmd[:0] = ['setarch', self.br_arch]
if options.debug_mock:
cmd.append('--debug')
cmd.extend(args)

View file

@ -409,7 +409,7 @@ def make_task(method,arglist,**opts):
if method == 'buildArch' and opts['arch'] == 'noarch':
#not all arches can generate a proper buildroot for all tags
tag = get_tag(arglist[1])
fullarches = ('i386', 'ia64', 'ppc', 'ppc64', 's390', 's390x', 'x86_64')
fullarches = ('i386', 'ia64', 'ppc', 'ppc64', 's390', 's390x', 'sparc', 'sparc64', 'x86_64')
if not tag['arches']:
raise koji.BuildError, 'no arches defined for tag %s' % tag['name']
tagarches = tag['arches'].split()
@ -4178,7 +4178,7 @@ class RootExports(object):
c = context.cnx.cursor()
q = """
INSERT INTO tag_config(tag_id,arches,perm_id,locked)
SELECT id,'i386 ia64 ppc ppc64 s390 s390x x86_64',NULL,False
SELECT id,'i386 ia64 ppc ppc64 s390 s390x sparc sparc64 x86_64',NULL,False
FROM tag LEFT OUTER JOIN tag_config ON tag.id = tag_config.tag_id
WHERE revoke_event IS NULL AND active IS NULL;
"""

View file

@ -703,6 +703,10 @@ def canonArch(arch):
return 'i386'
elif fnmatch(arch,'ppc64*'):
return 'ppc64'
elif fnmatch(arch,'sparc64*'):
return 'sparc64'
elif fnmatch(arch,'sparc*'):
return 'sparc'
elif arch == 'ia32e':
return 'x86_64'
else:

View file

@ -1288,7 +1288,7 @@ def rpmsbyhost(req, start=None, order=None, hostArch=None, rpmArch=None):
maxRPMs = numRPMs
values['hostArch'] = hostArch
hostArchList = ['ix86', 'x86_64', 'ia64', 'ppc', 'ppc64', 's390', 's390x']
hostArchList = ['ix86', 'x86_64', 'ia64', 'ppc', 'ppc64', 's390', 's390x', 'sparc', 'sparc64']
values['hostArchList'] = hostArchList
values['rpmArch'] = rpmArch
values['rpmArchList'] = hostArchList + ['noarch', 'src']
@ -1357,7 +1357,7 @@ def tasksbyhost(req, start=None, order='-tasks', hostArch=None):
maxTasks = numTasks
values['hostArch'] = hostArch
hostArchList = ['ix86', 'x86_64', 'ia64', 'ppc', 'ppc64', 's390', 's390x']
hostArchList = ['ix86', 'x86_64', 'ia64', 'ppc', 'ppc64', 's390', 's390x', 'sparc', 'sparc64']
values['hostArchList'] = hostArchList
values['order'] = order