Skip to content

Commit a54926d

Browse files
scaronniConan-Kudo
authored andcommitted
Add Azure Linux 2 configuration
1 parent a6629d2 commit a54926d

File tree

5 files changed

+78
-0
lines changed

5 files changed

+78
-0
lines changed

docs/Mock-Core-Configs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ distribution.
4545
| [Amazon Linux 2](https://aws.amazon.com/amazon-linux-2/) | `amazonlinux-2-*` | [@stewartsmith](https://github.com/stewartsmith) | NA |
4646
| [Amazon Linux](https://aws.amazon.com/linux/amazon-linux-2023/) | `amazonlinux-*` | [@amazonlinux](https://github.com/amazonlinux) | [Issues](https://github.com/amazonlinux/amazon-linux-2023/issues) |
4747
| [Anolis](https://openanolis.cn/) | `anolis-*` | NA | [Issues](https://bugzilla.openanolis.cn/) |
48+
| [Azure Linux](https://github.com/microsoft/azurelinux) | `azure-linux-*` | [@scaronni](https://github.com/scaronni) | [Issues](https://github.com/microsoft/azurelinux/issues) |
4849
| [CentOS Stream](https://www.centos.org/centos-stream/) | `centos-stream*` | [@rpm-software-management](https://github.com/rpm-software-management)| [Issues](https://issues.redhat.com/projects/CS) |
4950
| [CentOS Linux](https://www.centos.org/centos-linux/) | `centos*` | [@rpm-software-management](https://github.com/rpm-software-management)| NA |
5051
| [Circle Linux](https://cclinux.org/) | `circlelinux-*` | [@bella485](https://github.com/bella485) | [Issues](https://bugzilla.cclinux.org/) |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include('templates/azure-linux-2.tpl')
2+
3+
config_opts['root'] = 'azure-linux-2-x86_64'
4+
config_opts['description'] = 'Azure Linux 2.0'
5+
config_opts['target_arch'] = 'x86_64'
6+
config_opts['legal_host_arches'] = ('x86_64',)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include('templates/azure-linux-2.tpl')
2+
3+
config_opts['root'] = 'azure-linux-2-x86_64'
4+
config_opts['description'] = 'Azure Linux 2.0'
5+
config_opts['target_arch'] = 'x86_64'
6+
config_opts['legal_host_arches'] = ('x86_64',)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
config_opts['chroot_setup_cmd'] = 'install bash binutils bzip2 coreutils cpio diffutils dnf findutils gawk glibc-devel grep gzip kernel-headers patch redhat-rpm-config rpm-build sed tar unzip util-linux which xz'
2+
config_opts['dist'] = 'cm2'
3+
config_opts['releasever'] = '2.0'
4+
config_opts['package_manager'] = 'dnf'
5+
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
6+
7+
# https://mcr.microsoft.com/en-us/product/cbl-mariner/base/core/tags:
8+
# config_opts['bootstrap_image'] = 'mcr.microsoft.com/cbl-mariner/base/core:2.0'
9+
# Container image contains tdnf (https://github.com/vmware/tdnf) as the base package manager so it can't be used:
10+
config_opts['use_bootstrap'] = False
11+
12+
config_opts['dnf.conf'] = """
13+
[main]
14+
keepcache=1
15+
debuglevel=2
16+
reposdir=/dev/null
17+
logfile=/var/log/yum.log
18+
retries=20
19+
obsoletes=1
20+
gpgcheck=0
21+
assumeyes=1
22+
syslog_ident=mock
23+
syslog_device=
24+
metadata_expire=0
25+
mdpolicy=group:primary
26+
best=1
27+
install_weak_deps=0
28+
protected_packages=
29+
module_platform_id=platform:2.9
30+
user_agent={{ user_agent }}
31+
32+
[mariner-official-base]
33+
name=CBL-Mariner Official Base $releasever $basearch
34+
baseurl=https://packages.microsoft.com/cbl-mariner/$releasever/prod/base/$basearch
35+
gpgkey=file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-RPM-GPG-KEY file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-METADATA-GPG-KEY
36+
gpgcheck=1
37+
repo_gpgcheck=1
38+
enabled=1
39+
40+
[mariner-official-extras]
41+
name=CBL-Mariner Official Extras $releasever $basearch
42+
baseurl=https://packages.microsoft.com/cbl-mariner/$releasever/prod/extras/$basearch
43+
gpgkey=file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-RPM-GPG-KEY file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-METADATA-GPG-KEY
44+
gpgcheck=1
45+
repo_gpgcheck=1
46+
enabled=1
47+
48+
[mariner-official-extended]
49+
name=CBL-Mariner Official Extended $releasever $basearch
50+
baseurl=https://packages.microsoft.com/cbl-mariner/$releasever/prod/extended/$basearch
51+
gpgkey=file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-RPM-GPG-KEY file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-METADATA-GPG-KEY
52+
gpgcheck=1
53+
repo_gpgcheck=1
54+
enabled=1
55+
56+
[mariner-official-microsoft]
57+
name=CBL-Mariner Official Microsoft $releasever $basearch
58+
baseurl=https://packages.microsoft.com/cbl-mariner/$releasever/prod/Microsoft/$basearch
59+
gpgkey=file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-RPM-GPG-KEY file:///usr/share/distribution-gpg-keys/azure-linux/MICROSOFT-METADATA-GPG-KEY
60+
gpgcheck=1
61+
repo_gpgcheck=1
62+
enabled=1
63+
64+
"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add Azure Linux 2.0 configuration (x68_64, aarch64). The distribution changed name mid lifecycle, it was originally called "CBL Mariner 2.0", replacing "Common Base Linux 1.0". That's why the distribution tag is still "cm2" and has "mariner" references in the repository.

0 commit comments

Comments
 (0)