tianocore/containers

Enable Fedora39 to build and test

kilaterlee opened this issue · 13 comments

Required add the Fedora39 container.
Feature Request / Enhancemen:
The Fedora39 has been published, can we create a Fedora39 CI ENV? Since Fedora39 supports the LoongArch64 cross compile and C library by default, there is not need to download the LoongArch-special cross complier when using this container. You just need to install the LoongArch cross-compiler like other architectures.

Excellent idea.

I can try to find some time this week.

Meanwhile, PRs are also always welcome :-)

OK, let me try, I have never submitted PR in this repo, and don't even know how to test the CI itself...

A simple test (building OVMF) is run as part of the PR when you open it.
If this looks good, I can test it in the main EDK2 CI.

Maybe also test the image locally before opening the PR, especially if changing the LoongArch compiler.

You can also use Qemu from the Fedora package repos, no need to build it from scratch anymore. Fedora is now shipping Qemu 8.

Feel free to ping me if you have questions.

Yes, I know how to build the OVMF, but I don't know how to test the container file.

For example: There are three files in the Fedora37 directory. I can also submit the PR like Fedora37 and put the similar files under Fedora39. Then, how to test wether the CI is working properly?

Ah, ok.

Yes, create a Fedora39 directory, copy the files from Fedora37 and change them as needed.
Open a PR here. Then github will run a simple test and build ovmf with that image.

OK, I have worked done which your are said and tomorrow, I will create a PR, I guess it will running a sample tests automatically, right?

Sounds good!
yes, It should run some checks automatically.

OK, let's me try, thank you:)

Hi, I have opened the PR here, but I can't see any tests running...

Hi, I have opened the PR here, but I can't see any tests running...

I also tried testing the Dockerfile locally(I'm new to docker). when I use the command:

sodu docker build -t edk2_ci_test:v1 . --network host

It out put below:

Sending build context to Docker daemon  10.75kB
Step 1/30 : FROM registry.fedoraproject.org/fedora:39 AS build
 ---> 368a084ba17d
Step 2/30 : ARG GCC_VERSION=13.2.1-4.fc39
 ---> Using cache
 ---> d41e1c484e74
Step 3/30 : ARG GCC_VERSION_CROSS=13.2.1-1.fc39
 ---> Using cache
 ---> d4fdd2f3ce08
Step 4/30 : ARG NASM_VERSION=2.16.01-4.fc39
 ---> Using cache
 ---> 4f90b9770041
Step 5/30 : ARG PYTHON_VERSION=3.12
 ---> Using cache
 ---> e302cde18c0d
Step 6/30 : ARG CSPELL_VERSION=8.0.0
 ---> Using cache
 ---> 4308006d6b0f
Step 7/30 : ARG MARKDOWNLINT_VERSION=0.37.0
 ---> Using cache
 ---> 68fc0a675305
Step 8/30 : ARG POWERSHELL_VERSION=7.4.0
 ---> Using cache
 ---> e08024cfb993
Step 9/30 : ARG DOTNET_VERSION=6.0
 ---> Using cache
 ---> 8acfbfdb15ee
Step 10/30 : RUN dnf       --assumeyes       --nodocs       --setopt=install_weak_deps=0       install         acpica-tools         dotnet-runtime-${DOTNET_VERSION}         curl         gcc-c++-${GCC_VERSION}         gcc-${GCC_VERSION}         gcc-aarch64-linux-gnu-${GCC_VERSION_CROSS}         gcc-arm-linux-gnu-${GCC_VERSION_CROSS}         gcc-riscv64-linux-gnu-${GCC_VERSION_CROSS}         gcc-loongarch64-linux-gnu-${GCC_VERSION_CROSS}         git         lcov         libX11-devel         libXext-devel         libuuid-devel         make         nuget         nasm-${NASM_VERSION}         https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-1.rh.x86_64.rpm         python${PYTHON_VERSION}         python3-distutils-extra         python3-pip         python3-setuptools         nodejs 
       npm         tar         sudo
 ---> Running in 0d6e3cc312c8
Fedora 39 - x86_64                              0.0  B/s |   0  B     00:00
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=x86_64 [getaddrinfo() thread failed to start]

I'm guessing the network isn't working when building the image, I tried to find a solution on Google and they just saied add the parameter "--network host", but it doesn't look like it's working.

Ah, I was missing a file located in the .github/workflows/, I just added it and it looks like it's running the tests. :)

Hi, the tests tell me below:

ERROR: Cannot uninstall setuptools 67.7.2, RECORD file not found. Hint: The package was installed by rpm.

Is the version of setuptools is too high? I tried removing the setuptools installation in the Dockerfile but it didn't work.

Hi, the tests tell me below:

ERROR: Cannot uninstall setuptools 67.7.2, RECORD file not found. Hint: The package was installed by rpm.

Is the version of setuptools is too high? I tried removing the setuptools installation in the Dockerfile but it didn't work.

I solved this problem and the test passed.
Reason: The setuptools is installed via package manager, the version is 67.x, we should update setuptools though pip, because edk2 requires at least 68.