-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SUSE Update Bot
committed
Nov 15, 2024
1 parent
c7c6575
commit 80ce154
Showing
6 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Copyright (c) 2024 SUSE LLC | ||
|
||
# All modifications and additions to the file contributed by third parties | ||
# remain the property of their copyright owners, unless otherwise agreed | ||
# upon. | ||
|
||
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. | ||
# It is maintained by the BCI team and generated by | ||
# https://github.com/SUSE/BCI-dockerfile-generator | ||
|
||
# Please submit bugfixes or comments via https://bugs.opensuse.org/ | ||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions | ||
|
||
#!UseOBSRepositories | ||
#!ExclusiveArch: x86_64 s390x aarch64 | ||
#!BuildTag: bci/bci-slm60-kernel-module-devel:%OS_VERSION_ID_SP%-%RELEASE% | ||
#!BuildTag: bci/bci-slm60-kernel-module-devel:%OS_VERSION_ID_SP% | ||
|
||
FROM bci/bci-base:16.0 | ||
|
||
RUN set -euo pipefail; \ | ||
zypper -n install --no-recommends gcc kmod make patch gawk pesign-obs-integration dwarves libelf-devel SLES-release; \ | ||
zypper -n clean; \ | ||
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} | ||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=com.suse.bci.slm60-kernel-module-devel | ||
LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" | ||
LABEL org.opencontainers.image.title="SLE BCI SUSE Linux Micro 6.0 Kernel module development" | ||
LABEL org.opencontainers.image.description="SUSE Linux Micro 6.0 Kernel module development container based on the SLE Base Container Image." | ||
LABEL org.opencontainers.image.version="%OS_VERSION_ID_SP%-%RELEASE%" | ||
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="SUSE LLC" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opencontainers.image.ref.name="%OS_VERSION_ID_SP%-%RELEASE%" | ||
LABEL org.opensuse.reference="registry.suse.com/bci/bci-slm60-kernel-module-devel:%OS_VERSION_ID_SP%-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL com.suse.supportlevel="techpreview" | ||
LABEL com.suse.eula="sle-bci" | ||
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" | ||
LABEL com.suse.release-stage="beta" | ||
# endlabelprefix | ||
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md" | ||
LABEL io.artifacthub.package.logo-url="https://opensource.suse.com/bci/SLE_BCI_logomark_green.svg" | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/x86_64/patchinfo.ga/kernel-devel-6.4.0-17.1.noarch.rpm | ||
COPY kernel-devel-6.4.0-17.1.noarch.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/x86_64/patchinfo.ga/kernel-macros-6.4.0-17.1.noarch.rpm | ||
COPY kernel-macros-6.4.0-17.1.noarch.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/x86_64/patchinfo.ga/kernel-syms-6.4.0-17.1.x86_64.rpm | ||
COPY kernel-syms-6.4.0-17.1.x86_64.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/x86_64/patchinfo.ga/kernel-default-devel-6.4.0-17.1.x86_64.rpm | ||
COPY kernel-default-devel-6.4.0-17.1.x86_64.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/aarch64/patchinfo.ga/kernel-syms-6.4.0-17.1.aarch64.rpm | ||
COPY kernel-syms-6.4.0-17.1.aarch64.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/aarch64/patchinfo.ga/kernel-default-devel-6.4.0-17.1.aarch64.rpm | ||
COPY kernel-default-devel-6.4.0-17.1.aarch64.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/aarch64/patchinfo.ga/kernel-64kb-devel-6.4.0-17.1.aarch64.rpm | ||
COPY kernel-64kb-devel-6.4.0-17.1.aarch64.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/s390x/patchinfo.ga/kernel-syms-6.4.0-17.1.s390x.rpm | ||
COPY kernel-syms-6.4.0-17.1.s390x.rpm . | ||
#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:ALP:Source:Standard:Core:1.0:Build/standard/s390x/patchinfo.ga/kernel-default-devel-6.4.0-17.1.s390x.rpm | ||
COPY kernel-default-devel-6.4.0-17.1.s390x.rpm . | ||
RUN set -euo pipefail; \ | ||
[ $(LC_ALL=C rpm --checksig -v *rpm | \ | ||
grep -c -E "^ *V3.*key ID 09d9ea69:") = 9 ] \ | ||
&& rpm -Uvh --oldpackage --force *.$(uname -m).rpm *.noarch.rpm \ | ||
&& rm -vf *.rpm \ | ||
&& rpmqpack | grep -E '^kernel-' | xargs zypper -n addlock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# SUSE Linux Micro 6.0 GA Kernel Module Development Container | ||
![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)![Support Level](https://img.shields.io/badge/Support_Level-techpreview-blue) | ||
[![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 | ||
|
||
Th Kernel Module Development Container Image includes all necessary tools to build kernel | ||
modules for SUSE Linux Micro 6.0. It is intended to be used for building out-of-tree kernel | ||
modules in restricted environments. | ||
|
||
|
||
## Usage | ||
|
||
The image can be used to launch a container and build a kernel | ||
module. The following example below shows how to do this for the DRBD kernel module: | ||
```ShellSession | ||
$ podman run --rm -it --name drbd-build registry.suse.com/bci/bci-slm60-kernel-module-devel:16.0 | ||
# zypper -n in coccinelle tar | ||
# curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-9.2.11.tar.gz | tar xzf - | ||
# cd drbd-9.2.11/ | ||
# make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default | ||
``` | ||
|
||
The built kernel module is then available in | ||
`/drbd-9.2.11/drbd/build-current/drbd.ko`. It can be copied to the host system | ||
as follows: | ||
```ShellSession | ||
$ podman cp drbd-build:/drbd-9.2.11/drbd/build-current/drbd.ko . | ||
$ sudo modprobe drbd.ko | ||
``` | ||
|
||
Alternatively, the kernel module can be built as part of a container build using | ||
a `Dockerfile`: | ||
|
||
```Dockerfile | ||
FROM registry.suse.com/bci/bci-slm60-kernel-module-devel:16.0 | ||
ENV DRBD_VERSION=9.2.11 | ||
WORKDIR /src/ | ||
RUN zypper -n in coccinelle tar | ||
|
||
RUN set -euxo pipefail; \ | ||
curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz | tar xzf - ; \ | ||
cd drbd-${DRBD_VERSION}; \ | ||
make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default | ||
``` | ||
|
||
Build the container image, launch the container, and copy the kernel module to | ||
the local machine: | ||
```ShellSession | ||
$ buildah bud --layers -t drbd-ko . | ||
$ podman run --name drbd drbd-ko | ||
$ podman cp drbd:/src/drbd-9.2.11/drbd/build-current/drbd.ko . | ||
$ podman rm drbd | ||
``` | ||
|
||
## 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 a tech preview. Do not use it for production. | ||
Your feedback is welcome. | ||
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<constraints> | ||
<hardware> | ||
<disk> | ||
<size unit="G">8</size> | ||
</disk> | ||
</hardware> | ||
</constraints> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
</services> |
4 changes: 4 additions & 0 deletions
4
slm60-kernel-module-devel-image/slm60-kernel-module-devel-image.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Fri Nov 15 16:41:17 UTC 2024 - SUSE Update Bot <[email protected]> | ||
|
||
- First version of the SUSE Linux Micro 6.0 Kernel module development BCI |