Make the Apple/HFS compatibility configurable
The default is the original behaviour. On F30+ a new option should be added to config to make it work. Over time as users move to this option (which requires a new enough version of lorax), the default should be switched and then the option removed. Resolves: https://pagure.io/pungi/issue/1126 Merges: https://pagure.io/pungi/pull-request/1128 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
071d11a883
commit
f33973ee65
|
@ -1036,6 +1036,11 @@ Options
|
||||||
(*int|str*) -- how much free space should be left on each disk. The format
|
(*int|str*) -- how much free space should be left on each disk. The format
|
||||||
is the same as for ``iso_size`` option.
|
is the same as for ``iso_size`` option.
|
||||||
|
|
||||||
|
**iso_hfs_ppc64le_compatible** = True
|
||||||
|
(*bool*) -- when set to False, the Apple/HFS compatibility is turned off
|
||||||
|
for ppc64le ISOs. This option only makes sense for bootable products, and
|
||||||
|
affects images produced in *createiso* and *extra_isos* phases.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Source architecture needs to be listed explicitly.
|
Source architecture needs to be listed explicitly.
|
||||||
|
|
|
@ -735,6 +735,7 @@ def make_schema():
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": False,
|
"default": False,
|
||||||
},
|
},
|
||||||
|
"iso_hfs_ppc64le_compatible": {"type": "boolean", "default": True},
|
||||||
"multilib": _variant_arch_mapping({
|
"multilib": _variant_arch_mapping({
|
||||||
"$ref": "#/definitions/list_of_strings"
|
"$ref": "#/definitions/list_of_strings"
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -13,7 +13,8 @@ from .wrappers.jigdo import JigdoWrapper
|
||||||
|
|
||||||
CreateIsoOpts = namedtuple('CreateIsoOpts',
|
CreateIsoOpts = namedtuple('CreateIsoOpts',
|
||||||
['buildinstall_method', 'arch', 'output_dir', 'jigdo_dir',
|
['buildinstall_method', 'arch', 'output_dir', 'jigdo_dir',
|
||||||
'iso_name', 'volid', 'graft_points', 'supported', 'os_tree'])
|
'iso_name', 'volid', 'graft_points', 'supported', 'os_tree',
|
||||||
|
"hfs_compat"])
|
||||||
CreateIsoOpts.__new__.__defaults__ = (None,) * len(CreateIsoOpts._fields)
|
CreateIsoOpts.__new__.__defaults__ = (None,) * len(CreateIsoOpts._fields)
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +49,10 @@ def make_image(f, opts):
|
||||||
if opts.buildinstall_method == 'lorax':
|
if opts.buildinstall_method == 'lorax':
|
||||||
emit(f, FIND_TEMPLATE_SNIPPET)
|
emit(f, FIND_TEMPLATE_SNIPPET)
|
||||||
mkisofs_kwargs["boot_args"] = iso.get_boot_options(
|
mkisofs_kwargs["boot_args"] = iso.get_boot_options(
|
||||||
opts.arch, os.path.join('$TEMPLATE', 'config_files/ppc'))
|
opts.arch,
|
||||||
|
os.path.join("$TEMPLATE", "config_files/ppc"),
|
||||||
|
hfs_compat=opts.hfs_compat,
|
||||||
|
)
|
||||||
elif opts.buildinstall_method == 'buildinstall':
|
elif opts.buildinstall_method == 'buildinstall':
|
||||||
mkisofs_kwargs["boot_args"] = iso.get_boot_options(
|
mkisofs_kwargs["boot_args"] = iso.get_boot_options(
|
||||||
opts.arch, "/usr/lib/anaconda-runtime/boot")
|
opts.arch, "/usr/lib/anaconda-runtime/boot")
|
||||||
|
|
|
@ -140,6 +140,7 @@ class CreateisoPhase(PhaseLoggerMixin, PhaseBase):
|
||||||
graft_points=graft_points,
|
graft_points=graft_points,
|
||||||
arch=arch,
|
arch=arch,
|
||||||
supported=self.compose.supported,
|
supported=self.compose.supported,
|
||||||
|
hfs_compat=self.compose.conf["iso_hfs_ppc64le_compatible"],
|
||||||
)
|
)
|
||||||
|
|
||||||
if bootable:
|
if bootable:
|
||||||
|
|
|
@ -105,6 +105,7 @@ class ExtraIsosThread(WorkerThread):
|
||||||
graft_points=graft_points,
|
graft_points=graft_points,
|
||||||
arch=arch,
|
arch=arch,
|
||||||
supported=compose.supported,
|
supported=compose.supported,
|
||||||
|
hfs_compat=compose.conf["iso_hfs_ppc64le_compatible"],
|
||||||
)
|
)
|
||||||
if compose.conf['create_jigdo']:
|
if compose.conf['create_jigdo']:
|
||||||
jigdo_dir = compose.paths.compose.jigdo_dir(arch, variant)
|
jigdo_dir = compose.paths.compose.jigdo_dir(arch, variant)
|
||||||
|
|
|
@ -23,7 +23,7 @@ from kobo.shortcuts import force_list, relative_path, run
|
||||||
from pungi import util
|
from pungi import util
|
||||||
|
|
||||||
|
|
||||||
def get_boot_options(arch, createfrom, efi=True):
|
def get_boot_options(arch, createfrom, efi=True, hfs_compat=True):
|
||||||
"""Checks to see what we need as the -b option for mkisofs"""
|
"""Checks to see what we need as the -b option for mkisofs"""
|
||||||
|
|
||||||
if arch in ("arm", "armhfp"):
|
if arch in ("arm", "armhfp"):
|
||||||
|
@ -63,7 +63,7 @@ def get_boot_options(arch, createfrom, efi=True):
|
||||||
]
|
]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if arch in ("ppc", "ppc64"):
|
if arch in ("ppc", "ppc64") or (arch == "ppc64le" and hfs_compat):
|
||||||
result = [
|
result = [
|
||||||
'-part',
|
'-part',
|
||||||
'-hfs',
|
'-hfs',
|
||||||
|
@ -78,7 +78,7 @@ def get_boot_options(arch, createfrom, efi=True):
|
||||||
]
|
]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if arch == "ppc64le":
|
if arch == "ppc64le" and not hfs_compat:
|
||||||
result = [
|
result = [
|
||||||
'-r',
|
'-r',
|
||||||
'-l',
|
'-l',
|
||||||
|
|
|
@ -109,7 +109,9 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
arch='x86_64',
|
arch='x86_64',
|
||||||
supported=True,
|
supported=True,
|
||||||
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
||||||
os_tree='%s/compose/Server/x86_64/os' % self.topdir)])
|
os_tree='%s/compose/Server/x86_64/os' % self.topdir,
|
||||||
|
hfs_compat=True,
|
||||||
|
)])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
pool.queue_put.call_args_list,
|
pool.queue_put.call_args_list,
|
||||||
[mock.call((
|
[mock.call((
|
||||||
|
@ -178,7 +180,8 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
buildinstall_method='lorax',
|
buildinstall_method='lorax',
|
||||||
supported=True,
|
supported=True,
|
||||||
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
||||||
os_tree='%s/compose/Server/x86_64/os' % self.topdir),
|
os_tree='%s/compose/Server/x86_64/os' % self.topdir,
|
||||||
|
hfs_compat=True),
|
||||||
CreateIsoOpts(output_dir='%s/compose/Server/source/iso' % self.topdir,
|
CreateIsoOpts(output_dir='%s/compose/Server/source/iso' % self.topdir,
|
||||||
iso_name='image-name',
|
iso_name='image-name',
|
||||||
volid='test-1.0 Server.src',
|
volid='test-1.0 Server.src',
|
||||||
|
@ -186,7 +189,8 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
arch='src',
|
arch='src',
|
||||||
supported=True,
|
supported=True,
|
||||||
jigdo_dir='%s/compose/Server/source/jigdo' % self.topdir,
|
jigdo_dir='%s/compose/Server/source/jigdo' % self.topdir,
|
||||||
os_tree='%s/compose/Server/source/tree' % self.topdir)])
|
os_tree='%s/compose/Server/source/tree' % self.topdir,
|
||||||
|
hfs_compat=True)])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
pool.queue_put.call_args_list,
|
pool.queue_put.call_args_list,
|
||||||
[mock.call((compose,
|
[mock.call((compose,
|
||||||
|
@ -258,7 +262,8 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
arch='src',
|
arch='src',
|
||||||
supported=True,
|
supported=True,
|
||||||
jigdo_dir='%s/compose/Server/source/jigdo' % self.topdir,
|
jigdo_dir='%s/compose/Server/source/jigdo' % self.topdir,
|
||||||
os_tree='%s/compose/Server/source/tree' % self.topdir)])
|
os_tree='%s/compose/Server/source/tree' % self.topdir,
|
||||||
|
hfs_compat=True)])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
pool.queue_put.call_args_list,
|
pool.queue_put.call_args_list,
|
||||||
[mock.call((compose,
|
[mock.call((compose,
|
||||||
|
@ -287,6 +292,7 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
'bootable': True,
|
'bootable': True,
|
||||||
'createiso_skip': [],
|
'createiso_skip': [],
|
||||||
'buildinstall_skip': [('Server', {'*': True})],
|
'buildinstall_skip': [('Server', {'*': True})],
|
||||||
|
"iso_hfs_ppc64le_compatible": False,
|
||||||
})
|
})
|
||||||
helpers.touch(os.path.join(
|
helpers.touch(os.path.join(
|
||||||
compose.paths.compose.os_tree('x86_64', compose.variants['Server']),
|
compose.paths.compose.os_tree('x86_64', compose.variants['Server']),
|
||||||
|
@ -321,7 +327,8 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
||||||
arch='x86_64',
|
arch='x86_64',
|
||||||
supported=True,
|
supported=True,
|
||||||
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
jigdo_dir='%s/compose/Server/x86_64/jigdo' % self.topdir,
|
||||||
os_tree='%s/compose/Server/x86_64/os' % self.topdir)])
|
os_tree='%s/compose/Server/x86_64/os' % self.topdir,
|
||||||
|
hfs_compat=False)])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
pool.queue_put.call_args_list,
|
pool.queue_put.call_args_list,
|
||||||
[mock.call((compose,
|
[mock.call((compose,
|
||||||
|
|
Loading…
Reference in New Issue