Skip to content

Commit 652c70a

Browse files
dirkmuellerSUSE Update Bot
authored andcommitted
Test build for #1220
1 parent c54ba00 commit 652c70a

6 files changed

Lines changed: 261 additions & 0 deletions

File tree

.obs/workflows.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ staging_build:
99
source_project: home:defolos:BCI:CR:SLE-15-SP5
1010
source_package: alertmanager-image
1111
target_project: home:defolos:BCI:CR:SLE-15-SP5:Staging
12+
- branch_package:
13+
source_project: home:defolos:BCI:CR:SLE-15-SP5
14+
source_package: sles15-image
15+
target_project: home:defolos:BCI:CR:SLE-15-SP5:Staging
1216
- branch_package:
1317
source_project: home:defolos:BCI:CR:SLE-15-SP5
1418
source_package: blackbox_exporter-image
@@ -220,6 +224,9 @@ refresh_devel_BCI:
220224
- trigger_services:
221225
project: devel:BCI:SLE-15-SP5
222226
package: alertmanager-image
227+
- trigger_services:
228+
project: devel:BCI:SLE-15-SP5
229+
package: sles15-image
223230
- trigger_services:
224231
project: devel:BCI:SLE-15-SP5
225232
package: blackbox_exporter-image

sles15-image/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SLE BCI Base Container Image
2+
![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)
3+
[![SLSA](https://img.shields.io/badge/SLSA_(v0.1)-Level_4-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/)
4+
[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify)
5+
6+
## Description
7+
8+
SUSE Linux Enterprise Base Container Images (SLE BCI) provide truly open,
9+
flexible, and secure container images and application development tools. The
10+
images consist of container environments based on SUSE Linux Enterprise and
11+
designed to be a secure base for any containerized workload.
12+
13+
SLE BCI is freely available, re-distributable, and supported across many
14+
different environments. These templates and tools address modern, containerized
15+
application development and CI/CD application containerization. They can be
16+
used immediately by developers and integrators without the “lock-in” imposed by
17+
other offerings.
18+
19+
SLE BCI inherits industry-leading security and compliance from SUSE Linux
20+
within your container build process. The container images are designed to be a
21+
secure base for any application workload. SUSE ensures that compliance
22+
standards are applied consistently and continuously improves security-related
23+
capabilities.
24+
25+
SLE BCI is lightweight and easy to adopt, with the ability to run with any
26+
Linux OS. Avoid lock-in imposed by other vendors and get exactly what you need,
27+
fast. SLE BCI delivers a flexible developer experience that accounts for,
28+
integrates with, and supports language-native tools and workflows.
29+
30+
## Usage
31+
32+
## Licensing
33+
34+
`SPDX-License-Identifier: MIT`
35+
36+
This documentation and the build recipe are licensed as MIT.
37+
The container itself contains various software components under various open source licenses listed in the associated
38+
Software Bill of Materials (SBOM).
39+
40+
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.
41+
42+
See the [SLE BCI EULA](https://www.suse.com/licensing/eula/#bci) for further information.

sles15-image/_service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<services>
2+
<service mode="buildtime" name="kiwi_label_helper"/>
3+
<service mode="buildtime" name="kiwi_metainfo_helper"/>
4+
</services>

sles15-image/config.sh

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#!/bin/bash
2+
# SPDX-License-Identifier: MIT
3+
# SPDX-FileCopyrightText: (c) 2022-2024 SUSE LLC
4+
5+
set -euo pipefail
6+
7+
test -f /.kconfig && . /.kconfig
8+
test -f /.profile && . /.profile
9+
10+
echo "Configure image: [$kiwi_iname]..."
11+
12+
#============================================
13+
# Import repositories' keys if rpm is present
14+
#--------------------------------------------
15+
if command -v rpm > /dev/null; then
16+
suseImportBuildKey
17+
fi
18+
19+
20+
echo "Configure image: [$kiwi_iname]..."
21+
22+
#======================================
23+
# Setup baseproduct link
24+
#--------------------------------------
25+
suseSetupProduct
26+
27+
#======================================
28+
# Import repositories' keys
29+
#--------------------------------------
30+
suseImportBuildKey
31+
32+
33+
# don't have duplicate licenses of the same type
34+
jdupes -1 -L -r /usr/share/licenses
35+
36+
zypper --non-interactive rm -u jdupes
37+
38+
# Not needed, but neither rpm nor libzypp handle rpmlib(X-CheckUnifiedSystemdir) yet
39+
# which would avoid it being installed by filesystem package
40+
rpm -e compat-usrmerge-tools
41+
42+
#======================================
43+
# Disable recommends
44+
#--------------------------------------
45+
sed -i 's/.*solver.onlyRequires.*/solver.onlyRequires = true/g' /etc/zypp/zypp.conf
46+
47+
#======================================
48+
# Exclude docs installation
49+
#--------------------------------------
50+
sed -i 's/.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/g' /etc/zypp/zypp.conf
51+
52+
#======================================
53+
# Configure SLE BCI repositories
54+
#--------------------------------------
55+
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
56+
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
57+
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
58+
59+
#======================================
60+
# Remove locale files
61+
#--------------------------------------
62+
shopt -s globstar
63+
rm -f /usr/share/locale/**/*.mo
64+
65+
#======================================
66+
# Remove zypp uuid (bsc#1098535)
67+
#--------------------------------------
68+
rm -f /var/lib/zypp/AnonymousUniqueId
69+
70+
# Remove various log files. Although possible to just rm -rf /var/log/*, that
71+
# would also remove some package owned directories (not %ghost) and some files
72+
# are actually wanted, like lastlog in the !docker case.
73+
# For those wondering about YaST2 here: Kiwi writes /etc/hosts, so the version
74+
# from the netcfg package ends up as /etc/hosts.rpmnew, which zypper writes a
75+
# letter about to /var/log/YaST2/config_diff_2022_03_06.log. Kiwi fixes this,
76+
# but the log file remains.
77+
rm -rf /var/log/{zypper.log,zypp/history,YaST2}
78+
79+
# Remove the entire zypper cache content (not the dir itself, owned by libzypp)
80+
rm -rf /var/cache/zypp/*
81+
82+
#==========================================
83+
# Hack! The go container management tools can't handle sparse files:
84+
# https://github.com/golang/go/issues/13548
85+
# If lastlog doesn't exist, useradd doesn't attempt to reserve space,
86+
# also in derived containers.
87+
#------------------------------------------
88+
rm -f /var/log/lastlog
89+
90+
#======================================
91+
# Remove locale files
92+
#--------------------------------------
93+
find /usr/share/locale -name '*.mo' -delete
94+
95+
exit 0
96+
97+
98+
#=======================================
99+
# Clean up after zypper if it is present
100+
#---------------------------------------
101+
if command -v zypper > /dev/null; then
102+
zypper -n clean
103+
fi
104+
105+
rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2}
106+
107+
exit 0

sles15-image/sles15-image.changes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-------------------------------------------------------------------
2+
Fri Jun 21 15:47:09 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
3+
4+
- First version of the Base Container Image BCI

sles15-image/sles15-image.kiwi

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- SPDX-License-Identifier: MIT -->
3+
<!--
4+
Copyright (c) 2024 SUSE LLC
5+
6+
All modifications and additions to the file contributed by third parties
7+
remain the property of their copyright owners, unless otherwise agreed
8+
upon.
9+
10+
The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
11+
It is maintained by the BCI team and generated by
12+
https://github.com/SUSE/BCI-dockerfile-generator
13+
14+
Please submit bugfixes or comments via https://bugs.opensuse.org/
15+
You can contact the BCI team via https://github.com/SUSE/bci/discussions
16+
-->
17+
<!-- OBS-AddTag: bci/bci-base:%OS_VERSION_ID_SP% bci/bci-base:%OS_VERSION_ID_SP%.%RELEASE% bci/bci-base:latest -->
18+
<!-- OBS-Imagerepo: obsrepositories:/ -->
19+
20+
<image schemaversion="7.4" name="base-image" xmlns:suse_label_helper="com.suse.label_helper">
21+
<description type="system">
22+
<author>SUSE LLC</author>
23+
<contact>https://www.suse.com/</contact>
24+
<specification>SLE BCI Base Container Image Container Image</specification>
25+
</description>
26+
<preferences>
27+
<type image="docker">
28+
<containerconfig
29+
name="bci/bci-base"
30+
tag="%OS_VERSION_ID_SP%"
31+
maintainer="SUSE LLC (https://www.suse.com/)"
32+
additionaltags="%OS_VERSION_ID_SP%.%RELEASE%,latest">
33+
<labels>
34+
<suse_label_helper:add_prefix prefix="com.suse.bci.base">
35+
<label name="org.opencontainers.image.title" value="SLE BCI Base Container Image"/>
36+
<label name="org.opencontainers.image.description" value="Base Container Image container based on the SLE Base Container Image."/>
37+
<label name="org.opencontainers.image.version" value="%OS_VERSION_ID_SP%.%RELEASE%"/>
38+
<label name="org.opencontainers.image.created" value="%BUILDTIME%"/>
39+
<label name="org.opencontainers.image.vendor" value="SUSE LLC"/>
40+
<label name="org.opencontainers.image.source" value="%SOURCEURL%"/>
41+
<label name="org.opencontainers.image.url" value="https://www.suse.com/products/base-container-images/"/>
42+
<label name="org.opensuse.reference" value="registry.suse.com/bci/bci-base:%OS_VERSION_ID_SP%.%RELEASE%"/>
43+
<label name="org.openbuildservice.disturl" value="%DISTURL%"/>
44+
<label name="com.suse.supportlevel" value="l3"/>
45+
<label name="com.suse.eula" value="sle-bci"/>
46+
<label name="com.suse.release-stage" value="released"/>
47+
<label name="com.suse.lifecycle-url" value="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15"/>
48+
</suse_label_helper:add_prefix>
49+
<label name="io.artifacthub.package.readme-url" value="%SOURCEURL%/README.md"/>
50+
<label name="io.artifacthub.package.logo-url" value="https://opensource.suse.com/bci/SLE_BCI_logomark_green.svg"/>
51+
</labels>
52+
</containerconfig>
53+
</type>
54+
<version>15.5.0</version>
55+
<packagemanager>zypper</packagemanager>
56+
<rpm-check-signatures>false</rpm-check-signatures>
57+
<rpm-excludedocs>true</rpm-excludedocs>
58+
</preferences>
59+
<repository type="rpm-md">
60+
<source path="obsrepositories:/"/>
61+
</repository>
62+
<packages type="bootstrap">
63+
<package name="aaa_base"/>
64+
<package name="cracklib-dict-small"/>
65+
<package name="filesystem"/>
66+
<package name="jdupes"/>
67+
<package name="kubic-locale-archive"/>
68+
<package name="patterns-base-fips"/>
69+
<package name="patterns-base-minimal_base"/>
70+
<package name="rpm-ndb"/>
71+
<package name="shadow"/>
72+
<package name="sles-release"/>
73+
<package name="zypper"/>
74+
</packages>
75+
<packages type="image">
76+
<package name="bash"/>
77+
<package name="ca-certificates-mozilla"/>
78+
<package name="ca-certificates"/>
79+
<package name="container-suseconnect"/>
80+
<package name="coreutils"/>
81+
<package name="curl"/>
82+
<package name="findutils"/>
83+
<package name="glibc-locale-base"/>
84+
<package name="gzip"/>
85+
<package name="lsb-release"/>
86+
<package name="netcfg"/>
87+
<package name="openssl"/>
88+
<package name="skelcd-EULA-bci"/>
89+
<package name="sle-module-basesystem-release"/>
90+
<package name="sle-module-server-applications-release"/>
91+
<package name="sle-module-python3-release"/>
92+
<package name="suse-build-key"/>
93+
<package name="tar"/>
94+
<package name="timezone"/>
95+
</packages>
96+
97+
</image>

0 commit comments

Comments
 (0)