add more color for next sync

This commit is contained in:
Louis Abel 2022-06-13 07:37:50 -07:00
parent 45848bf530
commit 602553e878
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36
8 changed files with 123 additions and 1 deletions

View File

@ -25,6 +25,7 @@ rldict = {}
sigdict = {} sigdict = {}
config = { config = {
"rlmacro": rpm.expandMacro('%rhel'), "rlmacro": rpm.expandMacro('%rhel'),
"dist": 'el' + rpm.expandMacro('%rhel'),
"arch": platform.machine(), "arch": platform.machine(),
"date_stamp": time.strftime("%Y%m%d.%H%M%S", time.localtime()), "date_stamp": time.strftime("%Y%m%d.%H%M%S", time.localtime()),
"compose_root": "/mnt/compose", "compose_root": "/mnt/compose",

View File

@ -1,5 +1,6 @@
--- ---
'8': '8':
fullname: 'Rocky Linux 8'
revision: '8.6' revision: '8.6'
rclvl: 'RC2' rclvl: 'RC2'
allowed_arches: allowed_arches:

View File

@ -1,5 +1,6 @@
--- ---
'9': '9':
fullname: 'Rocky Linux 9'
revision: '9.0' revision: '9.0'
rclvl: 'RC1' rclvl: 'RC1'
allowed_arches: allowed_arches:
@ -60,6 +61,7 @@
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'
variant: 'BaseOS'
repoclosure_map: repoclosure_map:
arches: arches:
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch' x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'

View File

@ -0,0 +1,15 @@
#!/bin/bash
# This is a template that is used to build ISO's for Rocky Linux. Only under
# extreme circumstances should you be filling this out and running manually.
# Init the container
mock \
-r /mnt/compose/9/latest-Rocky-9/work/entries/lorax-{{ major }}-{{ arch }}.cfg \
--init
mock \
-r /mnt/compose/9/latest-Rocky-9/work/entries/lorax-{{ major }}-{{ arch }}.cfg \
--shell \
--enable-network -- /bin/bash /mnt/compose/9/latest-Rocky-9/work/entries/runLorax-{{ arch }}.sh
# Clean up?

View File

@ -0,0 +1,2 @@
#!/bin/bash
# You should not be running this manually.

View File

@ -0,0 +1,47 @@
config_opts['root'] = 'rocky-{{ major }}-{{ arch }}'
config_opts['description'] = '{{ fullname }}'
config_opts['target_arch'] = '{{ arch }}'
config_opts['legal_host_arches'] = ('{{ arch }}',)
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils redhat-release findutils gawk glibc-minimal-langpack grep gzip info patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz genisoimage isomd5sum lorax lorax-templates-rhel lorax-templates-generic'
config_opts['dist'] = '{{ dist }}' # only useful for --resultdir variable subst
config_opts['releasever'] = '{{ major }}'
config_opts['package_manager'] = 'dnf'
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
# config_opts['bootstrap_image'] = 'quay.io/rockylinux/rockylinux:{{ major }}'
config_opts['plugin_conf']['bind_mount_enable'] = True
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/mnt/compose', '/mnt/compose'))
config_opts['dnf.conf'] = """
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
metadata_expire=0
mdpolicy=group:primary
best=1
install_weak_deps=0
protected_packages=
module_platform_id=platform:{{ dist }}
user_agent={{ user_agent }}
{% for repo in repos %}
[{{ repo }}]
name={{ repo }}
baseurl=file:///mnt/compose/{{ major }}/latest-Rocky-{{ major }}/compose/{{ repo }}/{{ arch }}/os
enabled=1
gpgcheck=0
{% endfor %}
"""

View File

@ -505,6 +505,11 @@ class RepoSync:
) )
for issue in bad_exit_list: for issue in bad_exit_list:
self.log.error(issue) self.log.error(issue)
else:
self.log.info(
'[' + Color.BOLD + Color.GREEN + ' OK ' + Color.END + '] '
'No issues detected.'
)
def generate_compose_dirs(self) -> str: def generate_compose_dirs(self) -> str:
""" """

View File

@ -12,6 +12,7 @@ import subprocess
import shlex import shlex
import time import time
import re import re
from productmd.common import SortedConfigParser
from common import Color from common import Color
class IsoBuild: class IsoBuild:
@ -34,12 +35,15 @@ class IsoBuild:
self.arch = arch self.arch = arch
self.image = image self.image = image
self.host = host self.host = host
self.fullname = rlvars['fullname']
# Relevant config items # Relevant config items
self.major_version = major self.major_version = major
self.disttag = config['dist']
self.date_stamp = config['date_stamp'] self.date_stamp = config['date_stamp']
self.timestamp = time.time()
self.compose_root = config['compose_root'] self.compose_root = config['compose_root']
self.compose_base = config['compose_root'] + "/" + major self.compose_base = config['compose_root'] + "/" + major
self.iso_base = config['compose_root'] + "/" + major + "/isos" self.iso_drop = config['compose_root'] + "/" + major + "/isos"
self.current_arch = config['arch'] self.current_arch = config['arch']
self.extra_files = rlvars['extra_files'] self.extra_files = rlvars['extra_files']
@ -145,6 +149,51 @@ class IsoBuild:
""" """
print() print()
def generate_iso_scripts(self):
"""
Generates the scripts needed to be ran in the mock roots
"""
print()
def treeinfo_write(self):
"""
Ensure treeinfo is written correctly
"""
print()
def discinfo_write(self):
"""
Ensure discinfo is written correctly
"""
#with open(file_path, "w") as f:
# f.write("%s\n" % self.timestamp)
# f.write("%s\n" % self.fullname)
# f.write("%s\n" % self.arch)
# if disc_numbers:
# f.write("%s\n" % ",".join([str(i) for i in disc_numbers]))
print()
def write_media_repo(self):
"""
Ensure media.repo exists
"""
data = [
"[InstallMedia]",
"name=%s" % self.fullname,
"mediaid=%s" % self.timestamp,
"metadata_expire=-1",
"gpgcheck=0",
"cost=500",
"",
]
def generate_graft_points(self):
"""
Get a list of packages for an ISO
"""
print()
class LiveBuild: class LiveBuild:
""" """