Skip to content

Commit feb012f

Browse files
committed
Allow override of default platform package mapping
With default platform to package mappings defined, we need to allow a product to override it if needed.
1 parent 10dc620 commit feb012f

File tree

8 files changed

+31
-1
lines changed

8 files changed

+31
-1
lines changed

rhcos4/product.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ profiles_root: "./profiles"
99
pkg_system: "rpm"
1010

1111
init_system: "systemd"
12+
13+
# Mapping of CPE platform to package
14+
platform_package_overrides:
15+
login_defs: "shadow-utils"

rhel6/product.yml

+4
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ aux_pkg_version: "2fa658e0"
2020

2121
release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
2222
auxiliary_key_fingerprint: "43A6E49C4A38F4BE9ABF2A5345689C882FA658E0"
23+
24+
# Mapping of CPE platform to package
25+
platform_package_overrides:
26+
login_defs: "shadow-utils"

rhel7/product.yml

+4
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ aux_pkg_version: "2fa658e0"
1818

1919
release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
2020
auxiliary_key_fingerprint: "43A6E49C4A38F4BE9ABF2A5345689C882FA658E0"
21+
22+
# Mapping of CPE platform to package
23+
platform_package_overrides:
24+
login_defs: "shadow-utils"

rhel8/product.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ aux_pkg_version: "d4082792"
1919
release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
2020
auxiliary_key_fingerprint: "6A6AA7C97C8890AEC6AEBFE2F76F66C3D4082792"
2121

22+
# Mapping of CPE platform to package
23+
platform_package_overrides:
24+
login_defs: "shadow-utils"

rhosp10/product.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ pkg_manager: "yum"
1010

1111
init_system: "systemd"
1212

13+
# Mapping of CPE platform to package
14+
platform_package_overrides:
15+
login_defs: "shadow-utils"

rhosp13/product.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ profiles_root: "./profiles"
99
pkg_manager: "yum"
1010

1111
init_system: "systemd"
12+
13+
# Mapping of CPE platform to package
14+
platform_package_overrides:
15+
login_defs: "shadow-utils"

rhv4/product.yml

+4
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ aux_pkg_version: "d4082792"
1818

1919
release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
2020
auxiliary_key_fingerprint: "6A6AA7C97C8890AEC6AEBFE2F76F66C3D4082792"
21+
22+
# Mapping of CPE platform to package
23+
platform_package_overrides:
24+
login_defs: "shadow-utils"

ssg/yaml.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
from .jinja import load_macros, process_file
1212
from .constants import (PKG_MANAGER_TO_SYSTEM,
13-
PKG_MANAGER_TO_CONFIG_FILE)
13+
PKG_MANAGER_TO_CONFIG_FILE,
14+
XCCDF_PLATFORM_TO_PACKAGE)
1415
from .constants import DEFAULT_UID_MIN
1516

1617
try:
@@ -138,6 +139,9 @@ def open_raw(yaml_file):
138139

139140
def open_environment(build_config_yaml, product_yaml):
140141
contents = open_raw(build_config_yaml)
142+
# Load common platform package mappings,
143+
# any specific mapping in product_yaml will override the default
144+
contents["platform_package_overrides"] = XCCDF_PLATFORM_TO_PACKAGE
141145
contents.update(open_raw(product_yaml))
142146
contents.update(_get_implied_properties(contents))
143147
return contents

0 commit comments

Comments
 (0)