Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions alws/build_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,21 +525,21 @@ async def _add_single_module(
else:
mock_options = {'definitions': {}}
for platform in self._platforms:
modularity_version = platform.modularity['versions'][-1]
modularity_version = platform.data['versions'][-1]
for flavour in self._platform_flavors:
if flavour.modularity and flavour.modularity.get('versions'):
modularity_version = flavour.modularity['versions'][-1]
if flavour.data and flavour.data.get('versions'):
modularity_version = flavour.data['versions'][-1]
if task.module_platform_version:
flavour_versions = [
flavour.modularity['versions']
flavour.data['versions']
for flavour in self._platform_flavors
if flavour.modularity
and flavour.modularity.get('versions')
if flavour.data
and flavour.data.get('versions')
]
modularity_version = next(
item
for item in itertools.chain(
platform.modularity['versions'], *flavour_versions
platform.data['versions'], *flavour_versions
)
if item['name'] == task.module_platform_version
)
Expand Down
2 changes: 1 addition & 1 deletion alws/crud/errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ async def release_errata_packages(
return
repo_stage = repo["name"].split("-")[-2]
arch = repo["name"].split("-")[-1]
platform_version = platform.modularity["versions"][-1]
platform_version = platform.data["versions"][-1]
platform_version = platform_version["name"].replace(".", "_")
rpm_module = None
reboot_suggested = False
Expand Down
12 changes: 6 additions & 6 deletions reference_data/centos_stream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
distr_version: '8'
priority: 2
test_dist_name: CentOSStream8
modularity:
modularity: {}
data:
versions:
data: {}
is_reference: true
type: rpm
arch_list:
Expand All @@ -19,9 +19,9 @@
distr_version: '9'
priority: 2
test_dist_name: CentOSStream9
modularity:
modularity: {}
data:
versions:
data: {}
is_reference: true
type: rpm
arch_list:
Expand All @@ -35,9 +35,9 @@
distr_version: '10'
priority: 2
test_dist_name: CentOSStream10
modularity:
modularity: {}
data:
versions:
data: {}
is_reference: true
type: rpm
arch_list:
Expand Down
20 changes: 10 additions & 10 deletions reference_data/platform_flavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
git_tag_prefix:
modified: a8
non_modified: c8
data:
mock:
secure_boot_macros:
"%pe_signing_cert": "'05'"
"%pe_signing_token": "'AlmaLinux OS Foundation'"
versions:
- name: '8.10'
version_prefix: '81000'
dist_prefix: 'el8.10.0'
data:
mock:
secure_boot_macros:
"%pe_signing_cert": "'05'"
"%pe_signing_token": "'AlmaLinux OS Foundation'"
repositories:
- name: almalinux-8-beta
arch: i686
Expand Down Expand Up @@ -96,15 +96,15 @@
git_tag_prefix:
modified: a9
non_modified: c9
data:
mock:
secure_boot_macros:
"%pe_signing_cert": '06'
"%pe_signing_token": 'AlmaLinux OS Foundation'
versions:
- name: '9.6'
version_prefix: '90600'
dist_prefix: 'el9.6.0'
data:
mock:
secure_boot_macros:
"%pe_signing_cert": '06'
"%pe_signing_token": 'AlmaLinux OS Foundation'
repositories:
- name: almalinux-9-beta
arch: i686
Expand Down
90 changes: 46 additions & 44 deletions reference_data/platforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@
git_tag_prefix:
modified: a8
non_modified: c8
versions:
- name: '8.4'
version_prefix: '80400'
dist_prefix: 'el8.4.0'
- name: '8.5'
version_prefix: '80500'
dist_prefix: 'el8.5.0'
- name: '8.6'
version_prefix: '80600'
dist_prefix: 'el8.6.0'
- name: '8.7'
version_prefix: '80700'
dist_prefix: 'el8.7.0'
- name: '8.8'
version_prefix: '80800'
dist_prefix: 'el8.8.0'
- name: '8.9'
version_prefix: '80900'
dist_prefix: 'el8.9.0'
- name: '8.10'
version_prefix: '81000'
dist_prefix: 'el8.10.0'
type: rpm
arch_list:
- i686
Expand Down Expand Up @@ -86,6 +64,28 @@
"%modsign_os": "almalinux8"
mock_dist: el8
timeout: 43200
versions:
- name: '8.4'
version_prefix: '80400'
dist_prefix: 'el8.4.0'
- name: '8.5'
version_prefix: '80500'
dist_prefix: 'el8.5.0'
- name: '8.6'
version_prefix: '80600'
dist_prefix: 'el8.6.0'
- name: '8.7'
version_prefix: '80700'
dist_prefix: 'el8.7.0'
- name: '8.8'
version_prefix: '80800'
dist_prefix: 'el8.8.0'
- name: '8.9'
version_prefix: '80900'
dist_prefix: 'el8.9.0'
- name: '8.10'
version_prefix: '81000'
dist_prefix: 'el8.10.0'
yum:
best: false
module_platform_id: platform:el8
Expand Down Expand Up @@ -1724,28 +1724,6 @@
git_tag_prefix:
modified: a9
non_modified: c9
versions:
- name: '9'
version_prefix: '90000'
dist_prefix: 'el9.0.0'
- name: '9.1'
version_prefix: '90100'
dist_prefix: 'el9.1.0'
- name: '9.2'
version_prefix: '90200'
dist_prefix: 'el9.2.0'
- name: '9.3'
version_prefix: '90300'
dist_prefix: 'el9.3.0'
- name: '9.4'
version_prefix: '90400'
dist_prefix: 'el9.4.0'
- name: '9.5'
version_prefix: '90500'
dist_prefix: 'el9.5.0'
- name: '9.6'
version_prefix: '90600'
dist_prefix: 'el9.6.0'
type: rpm
arch_list:
- i686
Expand Down Expand Up @@ -1789,6 +1767,28 @@
"%modsign_os": "almalinux9"
mock_dist: el9
timeout: 43200
versions:
- name: '9'
version_prefix: '90000'
dist_prefix: 'el9.0.0'
- name: '9.1'
version_prefix: '90100'
dist_prefix: 'el9.1.0'
- name: '9.2'
version_prefix: '90200'
dist_prefix: 'el9.2.0'
- name: '9.3'
version_prefix: '90300'
dist_prefix: 'el9.3.0'
- name: '9.4'
version_prefix: '90400'
dist_prefix: 'el9.4.0'
- name: '9.5'
version_prefix: '90500'
dist_prefix: 'el9.5.0'
- name: '9.6'
version_prefix: '90600'
dist_prefix: 'el9.6.0'
yum:
best: true
module_platform_id: platform:el9
Expand Down Expand Up @@ -3435,6 +3435,8 @@
"%modsign_os": "almalinux10"
mock_dist: el10
timeout: 43200
versions:
- name: '10.0'
yum:
best: true
module_platform_id: platform:el10
Expand Down
13 changes: 7 additions & 6 deletions scripts/exporters/packages_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def process_osv_data(
osv_distr_mapping = {
"AlmaLinux-8": "AlmaLinux:8",
"AlmaLinux-9": "AlmaLinux:9",
"AlmaLinux-10": "AlmaLinux:10",
}
self.logger.debug("Generating OSV data")
osv_target_dir = os.path.join(
Expand Down Expand Up @@ -575,7 +576,6 @@ def export_errata_and_oval(
def extract_errata_from_exported_paths(
exporter: PackagesExporter,
exported_paths: List[str],
platform_regex: re.Pattern,
) -> dict:
platform_errata_cache = {}
with ThreadPoolExecutor(max_workers=4) as executor:
Expand All @@ -593,9 +593,12 @@ def extract_errata_from_exported_paths(
"Extracted errata records from %s",
repo_path,
)
platform = "AlmaLinux-8"
if platform_regex.search(repo_path):
platform = "AlmaLinux-9"
repo_match = re.search(r"/(almalinux|vault)/(\d+)/", repo_path)
if repo_match:
version = repo_match.group(2)
platform = f"AlmaLinux-{version}"
else:
platform = "AlmaLinux-8"
if platform not in platform_errata_cache:
platform_errata_cache[platform] = {
"cache": [],
Expand Down Expand Up @@ -678,11 +681,9 @@ def main():
repo_path,
)

platform_regex = re.compile(r"\/(almalinux|vault)\/9\/")
platform_errata_cache = extract_errata_from_exported_paths(
exporter=exporter,
exported_paths=exported_paths,
platform_regex=platform_regex,
)

sync(
Expand Down
Loading