Skip to content

Commit

Permalink
Merge branch 'main' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jslobodzian committed May 27, 2024
2 parents 59ce246 + 6b8eb01 commit f2cf82e
Show file tree
Hide file tree
Showing 272 changed files with 9,238 additions and 2,320 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
/toolkit/scripts/toolchain/create_toolchain_in_container.sh @microsoft/cbl-mariner-admins

# Modifications to the trusted CA certificates require admin approval.
/SPECS/*ca-certificates*/*
/SPECS/*ca-certificates*/* @microsoft/cbl-mariner-admins
1 change: 1 addition & 0 deletions .github/workflows/validate-cg-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ignore_multiple_sources=" \

# List of ignored specs due to no source tarball to scan.
ignore_no_source_tarball=" \
azurelinux-sysinfo \
ca-certificates \
check-restart \
core-packages \
Expand Down
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/busybox/busybox.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
busybox
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/api.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-api
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/cloner.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-cloner
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/controller.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-controller
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/importer.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-importer
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/operator.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-operator
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/uploadproxy.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-uploadproxy
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/cdi/uploadserver.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
containerized-data-importer-uploadserver
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/certmanager/acmesolver.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert-manager-acmesolver
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/certmanager/cainjector.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert-manager-cainjector
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/certmanager/cmctl.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert-manager-cmctl
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/certmanager/controller.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert-manager-controller
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/certmanager/webhook.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert-manager-webhook
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/influxdb/influxdb.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
influxdb
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/kubevirt/virt-api.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubevirt-virt-api
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubevirt-virt-controller
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/kubevirt/virt-handler.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubevirt-virt-handler
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/kubevirt/virt-launcher.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubevirt-virt-launcher
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/kubevirt/virt-operator.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubevirt-virt-operator
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/memcached/memcached.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
memcached
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/multus/multus.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
multus
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/nginx/nginx.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nginx
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/nodejs/nodejs.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs18
2 changes: 1 addition & 1 deletion .pipelines/containerSourceData/nodejs/nodejs.pkg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ca-certificates
nodejs
nodejs18
2 changes: 0 additions & 2 deletions .pipelines/containerSourceData/nodejs/nodejs18.pkg

This file was deleted.

1 change: 1 addition & 0 deletions .pipelines/containerSourceData/openmpi/openmpi.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openmpi
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/php/php.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
php
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/postgres/postgres.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
postgresql
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/prometheus/prometheus.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prometheus
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prometheus-adapter
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/python/python.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/pytorch/pytorch.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3-pytorch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rabbitmq-server
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/redis/redis.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
redis
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/ruby/ruby.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/rust/rust.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rust
27 changes: 22 additions & 5 deletions .pipelines/containerSourceData/scripts/BuildBaseContainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ function initialization {

ROOT_FOLDER="$(git rev-parse --show-toplevel)"
EULA_FILE_PATH="$ROOT_FOLDER/.pipelines/container_artifacts/data"
END_OF_LIFE_1_YEAR=$(date -d "+1 year" "+%Y-%m-%dT%H:%M:%SZ")
echo "END_OF_LIFE_1_YEAR -> $END_OF_LIFE_1_YEAR"
}

function build_builder_image {
Expand Down Expand Up @@ -234,7 +236,7 @@ function docker_build {
pushd "$build_dir" > /dev/null

echo "+++ Build image: $image_full_name"
docker build . \
docker buildx build . \
--build-arg EULA="$EULA_FILE_NAME" \
--build-arg BASE_IMAGE="$temp_image" \
-t "$image_full_name" \
Expand All @@ -259,7 +261,7 @@ function docker_build_custom {
pushd "$WORK_DIR" > /dev/null

echo "+++ Build image: $image_full_name"
docker build . \
docker buildx build . \
--build-arg BASE_IMAGE="$BASE_IMAGE_NAME" \
--build-arg FINAL_IMAGE="$final_image_to_use" \
--build-arg AZL_VERSION="$AZL_VERSION" \
Expand Down Expand Up @@ -290,7 +292,7 @@ function docker_build_marinara {

sed -E "s|^FROM mcr\..*installer$|FROM $BASE_BUILDER as installer|g" -i "dockerfile-$MARINARA"

docker build . \
docker buildx build . \
-t "$MARINARA_IMAGE_NAME" \
-f dockerfile-$MARINARA \
--build-arg AZL_VERSION="$AZL_VERSION" \
Expand All @@ -306,16 +308,31 @@ function docker_build_marinara {
save_container_image "$MARINARA" "$MARINARA_IMAGE_NAME"
}

function oras_attach {
local image_name=$1
oras attach \
--artifact-type "application/vnd.microsoft.artifact.lifecycle" \
--annotation "vnd.microsoft.artifact.lifecycle.end-of-life.date=$END_OF_LIFE_1_YEAR" \
"$image_name"
}

function publish_to_acr {
local image=$1
if [[ ! "$PUBLISH_TO_ACR" =~ [Tt]rue ]]; then
echo "+++ Skip publishing to ACR"
return
fi

echo "+++ az login into Azure ACR $ACR"
local oras_access_token
oras_access_token=$(az acr login --name "$ACR" --expose-token --output tsv --query accessToken)
oras login "$ACR.azurecr.io" \
--username "00000000-0000-0000-0000-000000000000" \
--password "$oras_access_token"

echo "+++ Publish container $image"
echo "login into ACR: $ACR"
az acr login --name "$ACR"
docker image push "$image"
oras_attach "$image"
}

function save_container_image {
Expand Down
37 changes: 23 additions & 14 deletions .pipelines/containerSourceData/scripts/BuildGoldenContainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e
# - b) ACR name (e.g. azurelinepreview, acrafoimages, etc.)
# - c) Container repository name (e.g. base/nodejs, base/postgres, base/kubevirt/cdi-apiserver, etc.)
# - d) Image name (e.g. nodejs, postgres, cdi, etc.)
# - e) Component name (e.g. nodejs18, postgresql, containerized-data-importer-api, etc.)
# - e) Component file name (e.g. nodejs.name, postgres.name, api.name, etc.)
# - f) Package file name (e.g. nodejs18.pkg, postgres.pkg, api.pkg, etc.)
# - g) Dockerfile name (e.g. Dockerfile-nodejs, Dockerfile-Postgres, Dockerfile-cdi-apiserver, etc.)
# - h) Docker build arguments (e.g. '--build-arg BINARY_NAME="cdi-apiserver" --build-arg USER=1001')
Expand Down Expand Up @@ -38,10 +38,11 @@ set -e
# ~/CBL-Mariner/.pipelines/containerSourceData
# ├── nodejs
# │ ├── distroless
# │ │ ├── holdback-nodejs18.pkg
# │ │ ├── nodejs18.pkg
# │ │ ├── holdback-nodejs.pkg
# │ │ ├── nodejs.pkg
# │ ├── Dockerfile-Nodejs
# │ ├── nodejs18.pkg
# │ ├── nodejs.pkg
# | |── nodejs.name
# ├── configuration
# │ ├── acrRepoV2.json
# ├── scripts
Expand All @@ -62,7 +63,7 @@ while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:" OPTIONS; do
b ) ACR=$OPTARG;;
c ) REPOSITORY=$OPTARG;;
d ) IMAGE=$OPTARG;;
e ) COMPONENT=$OPTARG;;
e ) COMPONENT_FILE=$OPTARG;;
f ) PACKAGE_FILE=$OPTARG;;
g ) DOCKERFILE=$OPTARG;;
h ) DOCKER_BUILD_ARGS=$OPTARG;;
Expand Down Expand Up @@ -105,7 +106,7 @@ function print_inputs {
echo "ACR -> $ACR"
echo "REPOSITORY -> $REPOSITORY"
echo "IMAGE -> $IMAGE"
echo "COMPONENT -> $COMPONENT"
echo "COMPONENT_FILE -> $COMPONENT_FILE"
echo "PACKAGE_FILE -> $PACKAGE_FILE"
echo "DOCKERFILE -> $DOCKERFILE"
echo "DOCKER_BUILD_ARGS -> $DOCKER_BUILD_ARGS"
Expand Down Expand Up @@ -214,6 +215,20 @@ function initialization {
echo "End of Life -> $END_OF_LIFE_1_YEAR"
}

function get_packages_to_install {
echo "+++ Get packages to install"
packagesFilePath="$CONTAINER_SRC_DIR/$IMAGE/$PACKAGE_FILE"
PACKAGES_TO_INSTALL=$(paste -s -d' ' < "$packagesFilePath")
echo "Packages to install -> $PACKAGES_TO_INSTALL"
}

function get_component_name {
echo "+++ Get Component name"
componentFilePath="$CONTAINER_SRC_DIR/$IMAGE/$COMPONENT_FILE"
COMPONENT=$(cat "$componentFilePath")
echo "Component name -> $COMPONENT"
}

function prepare_dockerfile {
echo "+++ Prepare dockerfile"
# Copy original dockerfile from CBL-Mariner repo.
Expand All @@ -234,13 +249,6 @@ function prepare_dockerfile {
echo ""
}

function get_packages_to_install {
echo "+++ Get packages to install"
packagesFilePath="$CONTAINER_SRC_DIR/$IMAGE/$PACKAGE_FILE"
PACKAGES_TO_INSTALL=$(paste -s -d' ' < "$packagesFilePath")
echo "Packages to install -> $PACKAGES_TO_INSTALL"
}

function prepare_docker_directory {
echo "+++ Prepare docker directory"
# Get additional required files for the container build from CBL-Mariner repo.
Expand Down Expand Up @@ -393,8 +401,9 @@ function distroless_container {
print_inputs
validate_inputs
initialization
prepare_dockerfile
get_packages_to_install
get_component_name
prepare_dockerfile
prepare_docker_directory
docker_build
set_image_tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ function DockerBuild {

# Create container
echo "+++ Create container $containerName"

# DOCKER_BUILDKIT=0 is set to avoid the unknown timeout error in the Azure DevOps pipeline.
# The error is likely caused by some BuildKit feature in version 24.0.9 of moby-engine.
# The error is not seen in the local environment.
# Setting DOCKER_BUILDKIT=0 disables BuildKit and uses the legacy builder.
# TODO: Remove this line once the issue is resolved.
export DOCKER_BUILDKIT=0
docker build . \
-t "$containerName" \
-f "$marinaraSrcDir/dockerfiles/dockerfile-new-image" \
Expand All @@ -33,8 +40,7 @@ function DockerBuild {
--build-arg USER_UID=$userUid \
--build-arg RPMS="$rpmsDir" \
--build-arg LOCAL_REPO_FILE="$marinaraSrcDir/local.repo" \
--no-cache \
--progress=plain
--no-cache
}

function create_distroless_container {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sriov-network-device-plugin
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/telegraf/telegraf.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
telegraf
1 change: 1 addition & 0 deletions .pipelines/containerSourceData/tensorflow/tensorflow.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3-tensorflow
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ When creating your PR, please ensure the following:

* Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files. When running the check section, results will not fail a build. Check the logs for the results of this section.

* All package sources are available. The sources are either in the source server or local `SPECS` folder (`SPECS/<package>/SOURCES` or `SPECS/<package>`). While it is possible to build packages with all sources inside the repo, our policy is generally to have the source compressed and placed on the source server. Uploading to the source server can only be accomplished by a CBL-Mariner developer. Please request help in your PR for uploading your sources to the source server. To check the source server see [https://cblmarinerstorage.blob.core.windows.net/sources/core/< source tar >].
* All package sources are available. The sources are either in the source server or local `SPECS` folder (`SPECS/<package>/SOURCES` or `SPECS/<package>`). While it is possible to build packages with all sources inside the repo, our policy is generally to have the source compressed and placed on the source server. Uploading to the source server can only be accomplished by a CBL-Mariner developer. Please request help in your PR for uploading your sources to the source server. To check the source server see [https://azurelinuxsrcstorage.blob.core.windows.net/sources/core/< source tar >].

* cgmanifest files are up-to-date and alphabetically sorted. The cgmanifest files are used to record all package sources. They include the following files:

Expand Down
7 changes: 5 additions & 2 deletions SPECS-EXTENDED/buildah/buildah.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Summary: A command line tool used for creating OCI Images
Name: buildah
Version: 1.18.0
Release: 22%{?dist}
Release: 23%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
Expand All @@ -32,7 +32,7 @@ BuildRequires: btrfs-progs-devel
BuildRequires: device-mapper-devel
BuildRequires: git
BuildRequires: glib2-devel
BuildRequires: glibc-static >= 2.35-6%{?dist}
BuildRequires: glibc-static >= 2.35-7%{?dist}
BuildRequires: go-md2man
BuildRequires: go-rpm-macros
BuildRequires: golang
Expand Down Expand Up @@ -123,6 +123,9 @@ cp imgtype %{buildroot}/%{_bindir}/%{name}-imgtype
%{_datadir}/%{name}/test

%changelog
* Mon May 06 2024 Rachel Menge <[email protected]> - 1.18.0-23
- Bump release to rebuild against glibc 2.35-7

* Fri Feb 02 2024 CBL-Mariner Servicing Account <[email protected]> - 1.18.0-22
- Bump release to rebuild with go 1.21.6

Expand Down
7 changes: 5 additions & 2 deletions SPECS-EXTENDED/catatonit/catatonit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Distribution: Mariner

Name: catatonit
Version: 0.1.7
Release: 9%{?dist}
Release: 10%{?dist}
Summary: A signal-forwarding process manager for containers
License: GPLv3+
URL: https://github.com/openSUSE/catatonit
Expand All @@ -13,7 +13,7 @@ BuildRequires: automake
BuildRequires: file
BuildRequires: gcc
BuildRequires: git
BuildRequires: glibc-static >= 2.35-6%{?dist}
BuildRequires: glibc-static >= 2.35-7%{?dist}
BuildRequires: libtool
BuildRequires: make

Expand Down Expand Up @@ -61,6 +61,9 @@ ln -s %{_libexecdir}/%{name}/%{name} %{buildroot}%{_libexecdir}/podman/%{name}
%{_libexecdir}/podman/%{name}

%changelog
* Mon May 06 2024 Rachel Menge <[email protected]> - 0.1.7-10
- Bump release to rebuild against glibc 2.35-7

* Wed Oct 04 2023 Minghe Ren <[email protected]> - 0.1.7-9
- Bump release to rebuild against glibc 2.35-6

Expand Down
7 changes: 5 additions & 2 deletions SPECS-EXTENDED/dyninst/dyninst.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
Release: 11%{?dist}
Release: 12%{?dist}
Vendor: Microsoft Corporation
Distribution: Mariner
URL: http://www.dyninst.org
Expand Down Expand Up @@ -31,7 +31,7 @@ BuildRequires: tbb tbb-devel

# Extra requires just for the testsuite
BuildRequires: gcc-gfortran libstdc++-static libxml2-devel
BuildRequires: glibc-static >= 2.35-6%{?dist}
BuildRequires: glibc-static >= 2.35-7%{?dist}

# Testsuite files should not provide/require anything
%{?filter_setup:
Expand Down Expand Up @@ -194,6 +194,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a

%changelog
* Mon May 06 2024 Rachel Menge <[email protected]> - 10.1.0-12
- Bump release to rebuild against glibc 2.35-7

* Wed Oct 04 2023 Minghe Ren <[email protected]> - 10.1.0-11
- Bump release to rebuild against glibc 2.35-6

Expand Down
4 changes: 2 additions & 2 deletions SPECS-EXTENDED/facter/facter.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"facter-4.2.5.gem": "e88e3fa874c1c735779704d1a4dd69b255ad5e34c8912857864469a852cb3f8d"
"facter-4.2.13.gem": "a4f293b585176b080c8f10e9adb7a4d1cfd484268dfef518b162a0422450264c"
}
}
}
7 changes: 5 additions & 2 deletions SPECS-EXTENDED/facter/facter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
%global debug_package %{nil}

Name: facter
Version: 4.2.5
Release: 2%{?dist}
Version: 4.2.13
Release: 1%{?dist}
Summary: Command and ruby library for gathering system information
Vendor: Microsoft Corporation
Distribution: Mariner
Expand Down Expand Up @@ -100,6 +100,9 @@ GEM_HOME="%{buildroot}%{gem_dir}" %{buildroot}%{_bindir}/facter
%doc %{gem_docdir}

%changelog
* Tue May 07 2024 Andy Zaugg <[email protected]> 4.2.13-1
- Bumped version to facter version which has Mariner Linux Support

* Thu Dec 30 2021 Suresh Babu Chalamalasetty <[email protected]> 4.2.5-2
- Initial CBL-Mariner import from Fedora 35 (license: MIT)
- License verified
Expand Down
Loading

0 comments on commit f2cf82e

Please sign in to comment.