From e0c6e12fa50713ba19543083cab3b39c0233ea6f Mon Sep 17 00:00:00 2001 From: SUSE Update Bot Date: Thu, 25 Jul 2024 10:09:05 +0000 Subject: [PATCH] Test build for #1454 --- .obs/workflows.yml | 7 +++ sles15-image/LICENSE | 17 ++++++ sles15-image/README.md | 40 +++++++++++++ sles15-image/_service | 4 ++ sles15-image/config.sh | 85 +++++++++++++++++++++++++++ sles15-image/sles15-image.changes | 4 ++ sles15-image/sles15-image.kiwi | 96 +++++++++++++++++++++++++++++++ 7 files changed, 253 insertions(+) create mode 100644 sles15-image/LICENSE create mode 100644 sles15-image/README.md create mode 100644 sles15-image/_service create mode 100644 sles15-image/config.sh create mode 100644 sles15-image/sles15-image.changes create mode 100644 sles15-image/sles15-image.kiwi diff --git a/.obs/workflows.yml b/.obs/workflows.yml index beaa47886..7e7f6ea44 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -13,6 +13,10 @@ staging_build: source_project: home:defolos:BCI:CR:SLE-15-SP6 source_package: sac-apache-tomcat-10-java21-image target_project: home:defolos:BCI:CR:SLE-15-SP6:Staging + - branch_package: + source_project: home:defolos:BCI:CR:SLE-15-SP6 + source_package: sles15-image + target_project: home:defolos:BCI:CR:SLE-15-SP6:Staging - branch_package: source_project: home:defolos:BCI:CR:SLE-15-SP6 source_package: base-fips-image @@ -219,6 +223,9 @@ refresh_devel_BCI: - trigger_services: project: devel:BCI:SLE-15-SP6 package: sac-apache-tomcat-10-java21-image + - trigger_services: + project: devel:BCI:SLE-15-SP6 + package: sles15-image - trigger_services: project: devel:BCI:SLE-15-SP6 package: base-fips-image diff --git a/sles15-image/LICENSE b/sles15-image/LICENSE new file mode 100644 index 000000000..8a8ff9bea --- /dev/null +++ b/sles15-image/LICENSE @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sles15-image/README.md b/sles15-image/README.md new file mode 100644 index 000000000..006d82b1d --- /dev/null +++ b/sles15-image/README.md @@ -0,0 +1,40 @@ +# SLE BCI 15 SP6 Base Container Image +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) +[![SLSA](https://img.shields.io/badge/SLSA_(v0.1)-Level_4-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/) +[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify) + +## Description + +SUSE Linux Enterprise Base Container Images (SLE BCI) provide truly open, +flexible, and secure container images and application development tools. The +images consist of container environments based on SUSE Linux Enterprise and +designed to be a secure base for any containerized workload. + +SLE BCI is freely available, re-distributable, and supported across many +different environments. These templates and tools address modern, containerized +application development and CI/CD application containerization. They can be +used immediately by developers and integrators without the “lock-in” imposed by +other offerings. + +SLE BCI inherits industry-leading security and compliance from SUSE Linux +within your container build process. The container images are designed to be a +secure base for any application workload. SUSE ensures that compliance +standards are applied consistently and continuously improves security-related +capabilities. + +SLE BCI is lightweight and easy to adopt, with the ability to run with any +Linux OS. Avoid lock-in imposed by other vendors and get exactly what you need, +fast. SLE BCI delivers a flexible developer experience that accounts for, +integrates with, and supports language-native tools and workflows. + +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [SLE BCI](https://opensource.suse.com/bci/), a stable and redistributable foundation for software innovation. SLE BCI is enterprise-ready, and it comes with an option for support. + +See the [SLE BCI EULA](https://www.suse.com/licensing/eula/#bci) for further information. diff --git a/sles15-image/_service b/sles15-image/_service new file mode 100644 index 000000000..bd1abb02d --- /dev/null +++ b/sles15-image/_service @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/sles15-image/config.sh b/sles15-image/config.sh new file mode 100644 index 000000000..69c84deb4 --- /dev/null +++ b/sles15-image/config.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: (c) 2022-2024 SUSE LLC + +set -euo pipefail + +test -f /.kconfig && . /.kconfig +test -f /.profile && . /.profile + +echo "Configure image: [$kiwi_iname]..." + +#============================================ +# Import repositories' keys if rpm is present +#-------------------------------------------- +if command -v rpm > /dev/null; then + suseImportBuildKey +fi + + +echo "Configure image: [$kiwi_iname]..." + +#====================================== +# Setup baseproduct link +#-------------------------------------- +suseSetupProduct + + +# don't have duplicate licenses of the same type +jdupes -1 -L -r /usr/share/licenses + +zypper --non-interactive rm -u jdupes + + +# Not needed, but neither rpm nor libzypp handle rpmlib(X-CheckUnifiedSystemdir) yet +# which would avoid it being installed by filesystem package +rpm -q compat-usrmerge-tools && rpm -e compat-usrmerge-tools + +#====================================== +# Disable recommends +#-------------------------------------- +sed -i 's/.*solver.onlyRequires.*/solver.onlyRequires = true/g' /etc/zypp/zypp.conf + +#====================================== +# Exclude docs installation +#-------------------------------------- +sed -i 's/.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/g' /etc/zypp/zypp.conf + +#====================================== +# Configure SLE BCI repositories +#-------------------------------------- +zypper -n ar --refresh --gpgcheck --priority 100 --enable 'https://updates.suse.com/SUSE/Products/SLE-BCI/$releasever_major-SP$releasever_minor/$basearch/product/' SLE_BCI +zypper -n ar --refresh --gpgcheck --priority 100 --disable 'https://updates.suse.com/SUSE/Products/SLE-BCI/$releasever_major-SP$releasever_minor/$basearch/product_debug/' SLE_BCI_debug +zypper -n ar --refresh --gpgcheck --priority 100 --disable 'https://updates.suse.com/SUSE/Products/SLE-BCI/$releasever_major-SP$releasever_minor/$basearch/product_source/' SLE_BCI_source + +#====================================== +# Remove zypp uuid (bsc#1098535) +#-------------------------------------- +rm -f /var/lib/zypp/AnonymousUniqueId + +# Remove the entire zypper cache content (not the dir itself, owned by libzypp) +rm -rf /var/cache/zypp/* + +#========================================== +# Hack! The go container management tools can't handle sparse files: +# https://github.com/golang/go/issues/13548 +# If lastlog doesn't exist, useradd doesn't attempt to reserve space, +# also in derived containers. +#------------------------------------------ +rm -f /var/log/lastlog + +#====================================== +# Remove locale files +#-------------------------------------- +(shopt -s globstar; rm -f /usr/share/locale/**/*.mo) + +#======================================= +# Clean up after zypper if it is present +#--------------------------------------- +if command -v zypper > /dev/null; then + zypper -n clean +fi + +rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} + +exit 0 diff --git a/sles15-image/sles15-image.changes b/sles15-image/sles15-image.changes new file mode 100644 index 000000000..351607c03 --- /dev/null +++ b/sles15-image/sles15-image.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Jul 25 10:09:04 UTC 2024 - SUSE Update Bot + +- First version of the Base BCI diff --git a/sles15-image/sles15-image.kiwi b/sles15-image/sles15-image.kiwi new file mode 100644 index 000000000..e2bb73a53 --- /dev/null +++ b/sles15-image/sles15-image.kiwi @@ -0,0 +1,96 @@ + + + + + + + + + + + SUSE LLC + https://www.suse.com/ + SLE BCI %OS_VERSION_NO_DASH% Base Container Image + + + + + + + + + + + 15.6.0 + zypper + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file