Skip to content

Distribution | Add Alibaba Cloud Linux 3 Support - #4439

Draft
Xynnn007 wants to merge 6 commits into
systemd:mainfrom
Xynnn007:feat/add-alinux3
Draft

Distribution | Add Alibaba Cloud Linux 3 Support#4439
Xynnn007 wants to merge 6 commits into
systemd:mainfrom
Xynnn007:feat/add-alinux3

Conversation

@Xynnn007

@Xynnn007 Xynnn007 commented Sep 3, 2026

Copy link
Copy Markdown

Alibaba Cloud Linux 3 (alinux) is Alibaba Cloud's enterprise Linux distribution. Release 3 is built on Anolis OS 8 and is compatible with the CentOS 8 / RHEL 8 package ecosystems. This PR adds Distribution=alinux support to mkosi for Alibaba Cloud Linux 3, implemented as a CentOS-family variant, plus a few compatibility fixes needed for older tooling commonly found on that stack (GRUB 2.02, systemd 239, older modinfo).

Concretely:

  • Add an alinux installer
  • Wire alinux into the shared CentOS-family Match groups
  • Fix related bootstrapping issues

cc @jiazhang0

Built-in modules are listed in modules.builtin and are not .ko files, so
modinfo has nothing useful to return for them. Older modinfo (e.g. on
Alibaba Cloud Linux 3) even exits non-zero when asked about builtins,
which aborts dependency resolution. Only query names that map to loadable
module files; keep modules.builtin for dependency warnings.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
--force was added in systemd 246. When the tools tree provides an older
systemd-firstboot (for example Alibaba Cloud Linux 3's systemd 239),
passing --force makes the firstboot step fail. Gate the flag on the
tools binary version.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
--disable-shim-lock was added in GRUB 2.06. Older grub-mkimage (for
example Alibaba Cloud Linux 3's GRUB 2.02) rejects the unknown option and
fails image generation. Probe --help and only pass the flag when
supported.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
RHEL-family grub2-efi packages ship /boot/grub2/grubenv as a symlink to a
%ghost file under /boot/efi/EFI/<vendor>/grubenv. When that target is
absent, systemd-repart CopyFiles=/boot:/ fails while populating the ESP.
Create a minimal grubenv at the symlink target before installing grub.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Add alinux as a CentOS-variant installer for release 3, with Aliyun
mirrors, EPEL 8 sibling layout, SHA1 rpm-sequoia policy for the vendor
key, and a grubby stub around kernel package installation so dnf5 does
not abort on failing %posttrans scriptlets. Document the distribution
and cover repository/GPG helpers with unit tests.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: qianyue.zj <qianyue.zj@alibaba-inc.com>
Include alinux in the shared CentOS-family Match groups, and split out
packages missing on Alibaba Cloud Linux 3 / EPEL 8 (btrfs-progs, gh,
virtiofsd, systemd-ukify, systemd-resolved, systemd-boot, wireless-regdb)
so other distributions keep the same package sets.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
@behrmann

behrmann commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for the contribution. I will have a look at this in the coming days, currently busy with other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants