Skip to content

Commit 281c72a

Browse files
yockgenadimoftsamueltaripin
authored
Redhat Compatible Distro CentOS Stream 10 enabling (#379)
* Adding RHEL provider Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Fixing RHEL GPG key error Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Renaming RHEL into RedHat-Compatible-Linux Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Adding unit test for RedHat-Compatible-Linux provider Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Making RCD compatible with ARM support Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Adding rpm OSes metadata saving and rpm package resolver to handle conditional statement Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Fixing verification error and disabled rpm optional package hard error Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Fixing chroot gpg key error issue for RCD Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Enabling dnf in chroot env for rpm OSes Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * changing RCD to use grub by default Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Using Intel Kernel 6.12 for RCD for workaround of default kernel not installable Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Moving intel kernel to default template Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Patched multi repos merging capability Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Fixing default kernel not installable issue Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Code cleanup for RCD Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * Fixing unit test failed for config_test Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> * change naming of whitelist * update rc2 for ubuntu ptl * rename emt ptl * ptl update * Updated RCD dlstreamer template to allow white list Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> --------- Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com> Co-authored-by: Alexandru Dimofte <alexandru.dimofte@intel.com> Co-authored-by: samueltaripin <samuel.taripin@intel.com>
1 parent 4f8ee1a commit 281c72a

33 files changed

+2852
-61
lines changed

cmd/os-image-composer/build.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/open-edge-platform/os-image-composer/internal/provider/azl"
1111
"github.com/open-edge-platform/os-image-composer/internal/provider/elxr"
1212
"github.com/open-edge-platform/os-image-composer/internal/provider/emt"
13+
"github.com/open-edge-platform/os-image-composer/internal/provider/rcd"
1314
"github.com/open-edge-platform/os-image-composer/internal/provider/ubuntu"
1415
"github.com/open-edge-platform/os-image-composer/internal/utils/logger"
1516
"github.com/open-edge-platform/os-image-composer/internal/utils/system"
@@ -153,6 +154,10 @@ func InitProvider(os, dist, arch string) (provider.Provider, error) {
153154
if err := ubuntu.Register(os, dist, arch); err != nil {
154155
return nil, fmt.Errorf("registering ubuntu provider failed: %v", err)
155156
}
157+
case rcd.OsName:
158+
if err := rcd.Register(os, dist, arch); err != nil {
159+
return nil, fmt.Errorf("registering rcd provider failed: %v", err)
160+
}
156161
default:
157162
return nil, fmt.Errorf("unsupported provider: %s", os)
158163
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
packages:
2+
- createrepo_c
3+
- centos-gpg-keys # Provides GPG keys for package verification
4+
- centos-stream-release # Provides repo files and release info
5+
- bash # The shell
6+
- coreutils-single # Minimal version of basic tools (ls, cp, mv)
7+
- glibc-minimal-langpack # Core libraries without extra languages
8+
- dnf # Package manager (or 'microdnf' for even smaller)
9+
- rpm # Package database tools
10+
- findutils # Basic search tools (often needed by scripts)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
packages:
2+
- createrepo_c
3+
- centos-gpg-keys # Provides GPG keys for package verification
4+
- centos-stream-release # Provides repo files and release info
5+
- bash # The shell
6+
- coreutils-single # Minimal version of basic tools (ls, cp, mv)
7+
- glibc-minimal-langpack # Core libraries without extra languages
8+
- dnf # Package manager (or 'microdnf' for even smaller)
9+
- rpm # Package database tools
10+
- findutils # Basic search tools (often needed by scripts)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[cache-repo]
2+
name=Local Cache Repo
3+
baseurl=file:///cdrom/cache-repo
4+
enabled=1
5+
gpgcheck=0
6+
skip_if_unavailable=1
7+
sslverify=0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# RHEL 10 OS Configuration
2+
# This file defines architecture-specific build configurations
3+
4+
x86_64:
5+
dist: rcd10 # Distribution identifier
6+
arch: x86_64 # Target architecture
7+
pkgType: rpm # Package management system
8+
chrootenvConfigFile: chrootenvconfigs/chrootenv_x86_64.yml # Path to chrootenv config
9+
releaseVersion: "10.0" # Distribution release version
10+
11+
aarch64:
12+
dist: rcd10 # Distribution identifier
13+
arch: aarch64 # Target architecture
14+
pkgType: rpm # Package management system
15+
chrootenvConfigFile: chrootenvconfigs/chrootenv_aarch64.yml # Path to chrootenv config
16+
releaseVersion: "10.0" # Distribution release version
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Match]
2+
Name=e*
3+
4+
[Network]
5+
DHCP=yes
6+
IPv6AcceptRA=no
7+
8+
[DHCPv4]
9+
SendRelease=false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Service]
2+
ExecStart=
3+
ExecStart=-/sbin/agetty --noclear --autologin root --keep-baud %I $TERM
4+
5+
# Default to tty1 but allow other choices
6+
[Install]
7+
Alias=getty.target.wants/getty@tty1.service
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Service]
2+
ExecStart=
3+
ExecStart=-/sbin/agetty --noclear --autologin root --keep-baud %I $TERM
4+
5+
# Default to ttyS0 but allow other choices
6+
[Install]
7+
Alias=getty.target.wants/serial-getty@ttyS0.service
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
image:
2+
name: rcd10-default-x86_64
3+
version: "1.0.0"
4+
5+
target:
6+
os: redhat-compatible-distro # Target OS name
7+
dist: el10 # Target OS distribution
8+
arch: x86_64 # Target OS architecture
9+
imageType: img # Image type, valid value: [raw, iso, img].
10+
11+
systemConfig:
12+
name: Default_Initrd
13+
description: Default yml configuration for initrd image
14+
15+
bootloader:
16+
bootType: efi # (efi or legacy)
17+
provider: grub # (grub for efi and legacy mode, or systemd-boot for efi mode)
18+
19+
packages:
20+
- core-packages-base-image
21+
- dosfstools
22+
- efibootmgr
23+
- grub2-efi
24+
- grub2-efi-binary
25+
- grub2-pc
26+
- ca-certificates
27+
- cronie-anacron
28+
- logrotate
29+
- shadow-utils
30+
- util-linux
31+
32+
additionalFiles:
33+
- local: ../additionalfiles/99-dhcp-en.network
34+
final: /etc/systemd/network/99-dhcp-en.network
35+
- local: ../additionalfiles/getty@.service
36+
final: /usr/lib/systemd/system/getty@.service
37+
- local: ../additionalfiles/serial-getty@.service
38+
final: /usr/lib/systemd/system/serial-getty@.service
39+
- local: ../../../../../general/isolinux/attendedinstaller
40+
final: /root/attendedinstaller
41+
- local: ../../../../../../build/live-installer
42+
final: /usr/bin/live-installer
43+
44+
users:
45+
- name: root
46+
startupScript: "/root/attendedinstaller"
47+
48+
kernel:
49+
name: kernel
50+
cmdline: "console=ttyS0,115200 console=tty0 loglevel=7"
51+
packages:
52+
- kernel
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
image:
2+
name: rcd10-default-x86_64
3+
version: "1.0.0"
4+
5+
target:
6+
os: redhat-compatible-distro # Target OS name
7+
dist: el10 # Target OS distribution
8+
arch: x86_64 # Target OS architecture
9+
imageType: iso # Image type, valid value: [raw, iso].
10+
11+
disk:
12+
name: Default_ISO
13+
partitionTableType: gpt # Partition table type, valid value: [gpt, mbr]
14+
partitions: # Required for raw, optional for ISO, not needed for rootfs.
15+
- id: boot
16+
type: esp
17+
flags:
18+
- esp
19+
- boot
20+
start: 1MiB
21+
end: 513MiB
22+
fsType: fat32
23+
mountPoint: /boot/efi
24+
25+
- id: rootfs
26+
type: linux-root-amd64
27+
start: 513MiB
28+
end: "0" # 0 means use the rest of the disk space
29+
fsType: ext4
30+
mountPoint: /
31+
32+
systemConfig: # Required
33+
name: Default_ISO
34+
description: Default yml configuration for iso image
35+
36+
initramfs:
37+
template: default-initrd-x86_64.yml
38+
39+
bootloader:
40+
bootType: efi # (efi or legacy)
41+
provider: grub # (grub for efi and legacy mode, or systemd-boot for efi mode)
42+
43+
packages:
44+
# grub2-mkconfig
45+
- grub2
46+
47+
# developer-packages
48+
- build-essential
49+
- cmake
50+
- createrepo_c
51+
- curl-devel
52+
- device-mapper
53+
- flex
54+
- fuse-devel
55+
- git
56+
- golang
57+
- iputils
58+
- less
59+
- linux-firmware
60+
- net-tools
61+
- ninja-build
62+
- parted
63+
- pciutils
64+
- python3-pip
65+
- tar
66+
- texinfo
67+
- usbutils
68+
69+
# virtualization-host-packages
70+
- qemu-kvm
71+
- qemu-img
72+
73+
# core-packages-image
74+
- shim
75+
- grub2-efi-binary
76+
- ca-certificates
77+
- cronie-anacron
78+
- logrotate
79+
- core-packages-base-image
80+
- dracut-hostonly
81+
- dracut-vrf
82+
- initramfs
83+
- shadow-utils
84+
85+
# core-tools-packages
86+
- dnf
87+
- vim
88+
- wget
89+
90+
# hyperv packages
91+
- dracut-hyperv
92+
- hyperv-daemons
93+
94+
# ssh-server
95+
- openssh-server
96+
97+
# selinux-full
98+
- selinux-policy
99+
- selinux-policy-devel
100+
- policycoreutils-python-utils
101+
- checkpolicy
102+
- secilc
103+
- setools-console
104+
105+
# drtm
106+
- tboot
107+
- tpm2-tools
108+
- tpm2-tss
109+
110+
# virt-guest-packages
111+
- dracut-virtio
112+
- dracut-xen
113+
114+
additionalFiles:
115+
- local: ../additionalfiles/99-dhcp-en.network
116+
final: /etc/systemd/network/99-dhcp-en.network
117+
118+
kernel:
119+
name: kernel
120+
cmdline: "console=ttyS0,115200 console=tty0 loglevel=7"
121+
packages:
122+
- kernel

0 commit comments

Comments
 (0)