forked from sig_core/toolkit
scripts now generate
This commit is contained in:
parent
2e5c4778f4
commit
b75fe62899
8 changed files with 88 additions and 19 deletions
|
@ -69,6 +69,8 @@
|
|||
packages: 'os/Packages'
|
||||
repodata: 'os/repodata'
|
||||
iso_map:
|
||||
xorrisofs: False
|
||||
iso_level: False
|
||||
hosts:
|
||||
x86_64: ''
|
||||
aarch64: ''
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
packages: 'os/Packages'
|
||||
repodata: 'os/repodata'
|
||||
iso_map:
|
||||
xorrisofs: False
|
||||
iso_level: False
|
||||
hosts:
|
||||
x86_64: ''
|
||||
aarch64: ''
|
||||
|
@ -58,6 +60,7 @@
|
|||
s390x: ''
|
||||
images:
|
||||
dvd:
|
||||
discnum: '1'
|
||||
repos:
|
||||
- 'BaseOS'
|
||||
- 'AppStream'
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
packages: 'os/Packages'
|
||||
repodata: 'os/repodata'
|
||||
iso_map:
|
||||
xorrisofs: False
|
||||
iso_level: False
|
||||
hosts:
|
||||
x86_64: ''
|
||||
aarch64: ''
|
||||
|
@ -58,6 +60,7 @@
|
|||
s390x: ''
|
||||
images:
|
||||
dvd:
|
||||
discnum: '1'
|
||||
repos:
|
||||
- 'BaseOS'
|
||||
- 'AppStream'
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
packages: 'os/Packages'
|
||||
repodata: 'os/repodata'
|
||||
iso_map:
|
||||
xorrisofs: False
|
||||
iso_level: False
|
||||
hosts:
|
||||
x86_64: ''
|
||||
aarch64: ''
|
||||
|
@ -58,6 +60,7 @@
|
|||
s390x: ''
|
||||
images:
|
||||
dvd:
|
||||
discnum: '1'
|
||||
repos:
|
||||
- 'BaseOS'
|
||||
- 'AppStream'
|
||||
|
|
|
@ -15,7 +15,7 @@ parser.add_argument('--isolation', type=str, help="Mock Isolation")
|
|||
parser.add_argument('--local-compose', action='store_true', help="Compose Directory is Here")
|
||||
parser.add_argument('--logger', type=str)
|
||||
parser.add_argument('--extra-iso', type=str, help="Granular choice in which iso is built")
|
||||
parser.add_argument('--extra-iso-mode', type=str)
|
||||
parser.add_argument('--extra-iso-mode', type=str, default='local')
|
||||
results = parser.parse_args()
|
||||
rlvars = rldict[results.release]
|
||||
major = rlvars['major']
|
||||
|
|
|
@ -23,4 +23,5 @@ fi
|
|||
mkdir -p {{ compose_work_iso_dir }}/{{ arch }}
|
||||
cp /builddir/*.iso {{ compose_work_iso_dir }}/{{ arch }}
|
||||
cp /builddir/*.iso.manifest {{ compose_work_iso_dir }}/{{ arch }}
|
||||
cp /builddir/*.log {{ compose_work_iso_dir }}/{{ arch }}
|
||||
{% endif %}
|
||||
|
|
|
@ -10,7 +10,7 @@ MOCK_RESL="${MOCK_ROOT}/result"
|
|||
MOCK_CHRO="${MOCK_ROOT}/root"
|
||||
MOCK_LOG="${MOCK_RESL}/mock-output.log"
|
||||
IMAGE_SCR="/var/tmp/buildExtraImage.sh"
|
||||
IMAGE_ISO="{{ shortname }}-{{ major }}.{{ minor }}{{ rc }}-{{ arch }}-dvd{{ discnum|default('1') }}.iso"
|
||||
IMAGE_ISO="{{ isoname }}"
|
||||
ISOLATION="{{ isolation }}"
|
||||
BUILDDIR="{{ builddir }}"
|
||||
|
||||
|
|
|
@ -140,11 +140,10 @@ class IsoBuild:
|
|||
"work/logs"
|
||||
)
|
||||
|
||||
#self.iso_work_dir = os.path.join(
|
||||
# self.compose_latest_dir,
|
||||
# "work/iso",
|
||||
# config['arch']
|
||||
#)
|
||||
self.iso_work_dir = os.path.join(
|
||||
self.compose_latest_dir,
|
||||
"work/iso"
|
||||
)
|
||||
|
||||
self.lorax_work_dir = os.path.join(
|
||||
self.compose_latest_dir,
|
||||
|
@ -708,7 +707,7 @@ class IsoBuild:
|
|||
|
||||
if self.extra_iso_mode == 'local':
|
||||
self._extra_iso_local_config(a, y, grafts)
|
||||
self._extra_iso_local_run()
|
||||
#self._extra_iso_local_run()
|
||||
elif self.extra_iso_mode == 'podman':
|
||||
continue
|
||||
else:
|
||||
|
@ -738,6 +737,27 @@ class IsoBuild:
|
|||
if self.release_candidate:
|
||||
rclevel = '-' + self.rclvl
|
||||
|
||||
discnum = ''
|
||||
if self.iso_map['images'][image]['discnum']:
|
||||
discnum = self.iso_map['images'][image]['discnum']
|
||||
|
||||
volid = '{}-{}-{}-{}-{}'.format(
|
||||
self.shortname,
|
||||
self.major_version,
|
||||
self.minor_version,
|
||||
arch,
|
||||
image
|
||||
)
|
||||
|
||||
isoname = '{}-{}.{}-{}-{}{}.iso'.format(
|
||||
self.shortname,
|
||||
self.major_version,
|
||||
self.minor_version,
|
||||
arch,
|
||||
image,
|
||||
discnum
|
||||
)
|
||||
|
||||
mock_iso_template_output = mock_iso_template.render(
|
||||
arch=self.current_arch,
|
||||
major=self.major_version,
|
||||
|
@ -755,8 +775,48 @@ class IsoBuild:
|
|||
isolation=self.mock_isolation,
|
||||
builddir=self.mock_work_root,
|
||||
shortname=self.shortname,
|
||||
isoname=isoname,
|
||||
)
|
||||
|
||||
opts = {
|
||||
'arch': arch,
|
||||
'iso_name': isoname,
|
||||
'volid': volid,
|
||||
'graft_points': grafts,
|
||||
'use_xorrisofs': self.iso_map['xorrisofs'],
|
||||
'iso_level': self.iso_map['iso_level'],
|
||||
}
|
||||
|
||||
make_image = self._get_make_image_cmd(opts)
|
||||
isohybrid = self._get_isohybrid_cmd(opts)
|
||||
implantmd5 = self._get_implantisomd5_cmd(opts)
|
||||
make_manifest = self._get_manifest_cmd(opts)
|
||||
|
||||
iso_template_output = iso_template.render(
|
||||
inside_podman=False,
|
||||
arch=arch,
|
||||
compose_work_iso_dir=self.iso_work_dir,
|
||||
make_image=make_image,
|
||||
isohybrid=isohybrid,
|
||||
implantmd5=implantmd5,
|
||||
make_manifest=make_manifest,
|
||||
)
|
||||
|
||||
mock_iso_entry = open(mock_iso_path, "w+")
|
||||
mock_iso_entry.write(mock_iso_template_output)
|
||||
mock_iso_entry.close()
|
||||
|
||||
mock_sh_entry = open(mock_sh_path, "w+")
|
||||
mock_sh_entry.write(mock_sh_template_output)
|
||||
mock_sh_entry.close()
|
||||
|
||||
iso_template_entry = open(iso_template_path, "w+")
|
||||
iso_template_entry.write(iso_template_output)
|
||||
iso_template_entry.close()
|
||||
|
||||
os.chmod(mock_sh_path, 0o755)
|
||||
os.chmod(iso_template_path, 0o755)
|
||||
|
||||
|
||||
def _extra_iso_local_run(self):
|
||||
"""
|
||||
|
@ -1072,7 +1132,6 @@ class IsoBuild:
|
|||
def _get_mkisofs_cmd(
|
||||
self,
|
||||
iso,
|
||||
paths,
|
||||
appid=None,
|
||||
volid=None,
|
||||
volset=None,
|
||||
|
@ -1147,8 +1206,9 @@ class IsoBuild:
|
|||
"""
|
||||
Implants md5 into iso
|
||||
"""
|
||||
cmd = ["/usr/bin/implantisomd5", "--supported-iso", opts['iso_path']]
|
||||
return cmd
|
||||
cmd = ["/usr/bin/implantisomd5", "--supported-iso", opts['iso_name']]
|
||||
returned_cmd = ' '.join(cmd)
|
||||
return returned_cmd
|
||||
|
||||
def _get_manifest_cmd(self, opts):
|
||||
"""
|
||||
|
@ -1164,8 +1224,9 @@ class IsoBuild:
|
|||
if opts['arch'] == "x86_64":
|
||||
cmd = ["/usr/bin/isohybrid"]
|
||||
cmd.append("--uefi")
|
||||
cmd.append(opts['iso_path'])
|
||||
return cmd
|
||||
cmd.append(opts['iso_name'])
|
||||
returned_cmd = ' '.join(cmd)
|
||||
return returned_cmd
|
||||
|
||||
def _get_make_image_cmd(self, opts):
|
||||
"""
|
||||
|
@ -1190,14 +1251,10 @@ class IsoBuild:
|
|||
iso_level=opts['iso_level'],
|
||||
**isokwargs
|
||||
)
|
||||
return cmd
|
||||
returned_cmd = ' '.join(cmd)
|
||||
return returned_cmd
|
||||
|
||||
|
||||
def _write_script(self, opts):
|
||||
"""
|
||||
Writes out the script to make the DVD
|
||||
"""
|
||||
|
||||
class LiveBuild:
|
||||
"""
|
||||
This helps us build the live images for Rocky Linux.
|
||||
|
|
Loading…
Reference in a new issue