File elemental-2.0.4.obscpio of Package SLE-Micro

07070100000000000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000001500000000elemental-2.0.4/.obs07070100000001000081A4000000000000000000000001663B551D000001CE000000000000000000000000000000000000001F00000000elemental-2.0.4/.obs/README.md# Open Build Service integration files

This folder includes specific files to integrate with the [Open Build Service](https://build.opensuse.org) (OBS) by
[openSUSE](https://www.opensuse.org). Includes the workflows definition file (`workflows.yml`) that defines
actions for pull request, push tag and commit events.

In addition it also includes any required spec file or Dockerfile, usually these
are adapted to OBS and can't be used outside the OBS context.
07070100000002000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002000000000elemental-2.0.4/.obs/dockerfile07070100000003000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002E00000000elemental-2.0.4/.obs/dockerfile/slem-base-iso07070100000004000081A4000000000000000000000001663B551D000006EB000000000000000000000000000000000000003900000000elemental-2.0.4/.obs/dockerfile/slem-base-iso/Dockerfile# SPDX-License-Identifier: Apache-2.0
#!BuildTag: suse/sle-micro-iso/base-%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro-iso/base-%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro-iso/base-%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 10
#!BuildConstraint: hardware:memory:size unit=G 16

ARG SLEMICRO_VERSION
ARG SLE_VERSION

FROM suse/sle-micro/base-${SLEMICRO_VERSION}:latest AS os
FROM suse/sle-micro/${SLEMICRO_VERSION}:latest AS builder

WORKDIR /iso

COPY manifest.yaml manifest.yaml
COPY --from=os / rootfs

# Version value is taken form the elemental repository tags
# Release value of this image and os image are unrelated
RUN elemental --debug --config-dir . build-iso -o /output -n "sle-micro-base.$(uname -m)-%VERSION%-Build%RELEASE%" dir:rootfs

# Only keep the ISO as a result
FROM bci/bci-busybox:$SLE_VERSION
COPY --from=builder /output /elemental-iso

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro-iso/base-$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.rancher.slem
LABEL org.opencontainers.image.title="SLE Micro base-ISO"
LABEL org.opencontainers.image.description="Includes the SLE Micro base-ISO"
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.url="https://github.com/rancher/elemental"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL com.suse.supportlevel="l3"
# endlabelprefix

# By default run a shell
ENTRYPOINT ["busybox"]
CMD ["sh"]
07070100000005000081A4000000000000000000000001663B551D00000077000000000000000000000000000000000000003C00000000elemental-2.0.4/.obs/dockerfile/slem-base-iso/manifest.yamliso:
  bootloader-in-rootfs: true
  grub-entry-name: "SLE Micro for Rancher base Install"

squash-no-compression: true
07070100000006000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002D00000000elemental-2.0.4/.obs/dockerfile/slem-base-os07070100000007000081A4000000000000000000000001663B551D00001105000000000000000000000000000000000000003800000000elemental-2.0.4/.obs/dockerfile/slem-base-os/Dockerfile# SPDX-License-Identifier: Apache-2.0
# Define the names/tags of the container
#!BuildTag: suse/sle-micro/base-%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro/base-%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro/base-%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 8
#

ARG SLE_VERSION
FROM suse/sle15:$SLE_VERSION as host

MAINTAINER SUSE LLC (https://www.suse.com/)

RUN mkdir /osimage

RUN rpm --initdb --root /osimage

RUN zypper --installroot /osimage in --no-recommends -y filesystem

# make system bootable
# iputils: https://github.com/rancher/elemental/issues/1138
RUN zypper --installroot /osimage in --no-recommends -y grub2 shim dracut iputils kernel systemd bash

#!ArchExclusiveLine: x86_64
RUN if [ `uname -m` = "x86_64" ]; then zypper --installroot /osimage in --no-recommends -y syslinux grub2-i386-pc grub2-x86_64-efi; fi

# make dracut happy
RUN zypper --installroot /osimage in --no-recommends -y squashfs NetworkManager-branding-SLE NetworkManager device-mapper iproute2 tar curl ca-certificates ca-certificates-mozilla

# make ARM happy
#!ArchExclusiveLine: aarch64
RUN if [ `uname -m` = "aarch64" ]; then zypper --installroot /osimage in -y grub2-arm64-efi raspberrypi-firmware raspberrypi-firmware-config raspberrypi-firmware-dt u-boot-rpiarm64; fi

# make SUSE happy
RUN zypper --installroot /osimage in --no-recommends -y SLE-Micro-Rancher-release systemd-presets-branding-SLE-Micro-for-Rancher

# make elemental-register happy
RUN zypper --installroot /osimage in --no-recommends -y dmidecode lvm2

# make Rancher (containerd) happy
RUN zypper --installroot /osimage in --no-recommends -y apparmor-parser

# add elemental
RUN zypper --installroot /osimage in --no-recommends -y elemental

# end of mandatory package installs for SLE Micro

# make derived containers possible
RUN zypper --installroot /osimage in --no-recommends -y zypper

FROM scratch as osimage

COPY --from=host /osimage /

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro/base-$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# IMPORTANT: Setup elemental-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
# Also used by elemental-populate-labels
RUN echo IMAGE_REPO=\"${IMAGE_REPO}\"              >> /etc/os-release && \
    echo IMAGE_TAG=\"${IMAGE_TAG}\"                >> /etc/os-release && \
    echo IMAGE=\"${IMAGE_REPO}:${IMAGE_TAG}\"      >> /etc/os-release && \
    echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`"        >> /etc/os-release && \
    echo GRUB_ENTRY_NAME=\"SLE Micro\" >> /etc/os-release

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sle.micro
LABEL org.opencontainers.image.title="SLE Micro Base"
LABEL org.opencontainers.image.description="Image containing SLE Micro Base - a containerized OS layer for Kubernetes."
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.url="https://www.suse.com/products/micro/"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL com.suse.supportlevel="l3"
LABEL com.suse.eula="sle-eula"
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-micro"
LABEL com.suse.image-type="sle-micro"
LABEL com.suse.release-stage="released"
# endlabelprefix

# Make sure trusted certificates are properly generated
RUN /usr/sbin/update-ca-certificates

# Ensure /tmp is mounted as tmpfs by default
RUN if [ -e /usr/share/systemd/tmp.mount ]; then \
      cp /usr/share/systemd/tmp.mount /etc/systemd/system; \
    fi

# Save some space
RUN zypper clean --all && \
    rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force immutable-rootfs,grub-config,dracut-config,cloud-config-essentials,elemental-setup && \
    # aarch64 has an uncompressed kernel so we need to link it to vmlinuz
    kernel=$(ls /boot/Image-* 2>/dev/null | head -n1) && \
    if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi
07070100000008000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000003100000000elemental-2.0.4/.obs/dockerfile/slem-flavored-os07070100000009000081A4000000000000000000000001663B551D00000BA1000000000000000000000000000000000000003C00000000elemental-2.0.4/.obs/dockerfile/slem-flavored-os/Dockerfile# SPDX-License-Identifier: Apache-2.0
# Define the names/tags of the container
#!BuildTag: suse/sle-micro/%%BUILD_FLAVOR%%%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro/%%BUILD_FLAVOR%%%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro/%%BUILD_FLAVOR%%%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 8
#

ARG SLEMICRO_VERSION

FROM suse/sle-micro/base-${SLEMICRO_VERSION}:latest

# dummy zypper call to get elemental into the build context and extract %VERSION% from it via _service
RUN zypper in --no-recommends -y systemd-presets-branding-SLE-Micro-for-Rancher elemental


RUN if [[ "%%BUILD_FLAVOR%%" == "kvm-" ]]; then \
  # replace default kernel with smaller one, sufficient to run kvm guests \
  zypper in --no-recommends -y kernel-default-base -kernel-default; \
else \
  # extend -base with baremetal and usability packages \
  zypper in --no-recommends -y procps openssl openssh vim-small less iputils kernel-firmware-all NetworkManager-wwan cryptsetup; \
fi

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro/$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# IMPORTANT: Setup elemental-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
# Also used by elemental-populate-labels
RUN grep -v IMAGE_REPO /etc/os-release | grep -v "IMAGE_TAG|IMAGE=|TIMESTAMP|GRUB_ENTRY_NAME" > /tmp/os-release
RUN mv /tmp/os-release /etc/os-release
RUN echo IMAGE_REPO=\"${IMAGE_REPO}\"              >> /etc/os-release && \
    echo IMAGE_TAG=\"${IMAGE_TAG}\"                >> /etc/os-release && \
    echo IMAGE=\"${IMAGE_REPO}:${IMAGE_TAG}\"      >> /etc/os-release && \
    echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`"        >> /etc/os-release && \
    echo GRUB_ENTRY_NAME=\"SLE Micro\" >> /etc/os-release

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sle.micro
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix

# Ensure /tmp is mounted as tmpfs by default
RUN if [ -e /usr/share/systemd/tmp.mount ]; then \
      cp /usr/share/systemd/tmp.mount /etc/systemd/system; \
    fi

# Save some space
RUN if [ -f /usr/bin/zypper ]; then zypper clean --all; fi
# Save more space
RUN rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force immutable-rootfs,grub-config,dracut-config,cloud-config-essentials,elemental-setup && \
    # aarch64 has an uncompressed kernel so we need to link it to vmlinuz
    kernel=$(ls /boot/Image-* 2>/dev/null | head -n1) && \
    if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi
0707010000000A000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002900000000elemental-2.0.4/.obs/dockerfile/slem-iso0707010000000B000081A4000000000000000000000001663B551D000006BF000000000000000000000000000000000000003400000000elemental-2.0.4/.obs/dockerfile/slem-iso/Dockerfile# SPDX-License-Identifier: Apache-2.0
#!BuildTag: suse/sle-micro-iso/%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro-iso/%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro-iso/%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 10
#!BuildConstraint: hardware:memory:size unit=G 16

ARG SLE_VERSION
ARG SLEMICRO_VERSION

FROM suse/sle-micro/$SLEMICRO_VERSION:latest AS os
FROM suse/sle-micro/$SLEMICRO_VERSION:latest AS builder

WORKDIR /iso

COPY manifest.yaml manifest.yaml
COPY --from=os / rootfs

# Version value is taken form the elemental repository tags
# Release value of this image and os image are unrelated
RUN elemental --debug --config-dir . build-iso -o /output -n "sle-micro.$(uname -m)-%VERSION%-Build%RELEASE%" dir:rootfs

# Only keep the ISO as a result
FROM bci/bci-busybox:$SLE_VERSION
COPY --from=builder /output /elemental-iso

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro-iso/$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.rancher.slem
LABEL org.opencontainers.image.title="SLE Micro ISO"
LABEL org.opencontainers.image.description="Includes the SLE Micro ISO"
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.url="https://github.com/rancher/elemental"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL com.suse.supportlevel="l3"
# endlabelprefix

# By default run a shell
ENTRYPOINT ["busybox"]
CMD ["sh"]
0707010000000C000081A4000000000000000000000001663B551D00000073000000000000000000000000000000000000003700000000elemental-2.0.4/.obs/dockerfile/slem-iso/manifest.yamliso:
  bootloader-in-rootfs: true
  grub-entry-name: "SLE Micro for Rancher Install"

squash-no-compression: true

0707010000000D000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002C00000000elemental-2.0.4/.obs/dockerfile/slem-kvm-os0707010000000E000081A4000000000000000000000001663B551D00000B3A000000000000000000000000000000000000003700000000elemental-2.0.4/.obs/dockerfile/slem-kvm-os/Dockerfile# SPDX-License-Identifier: Apache-2.0
# Define the names/tags of the container
#!BuildTag: suse/sle-micro/kvm-%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro/kvm-%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro/kvm-%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 8
#

ARG SLEMICRO_VERSION

FROM suse/sle-micro/base-${SLEMICRO_VERSION}:latest

# dummy zypper call to get elemental into the build context and extract %VERSION% from it via _service
RUN zypper in --no-recommends -y systemd-presets-branding-SLE-Micro-for-Rancher elemental

# replace default kernel with smaller one, sufficient to run kvm guests
RUN zypper in --no-recommends -y kernel-default-base -kernel-default qemu-guest-agent

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro/kvm-$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# IMPORTANT: Setup elemental-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
# Also used by elemental-populate-labels
RUN grep -v "IMAGE_REPO\|IMAGE_TAG\|IMAGE=\|TIMESTAMP\|GRUB_ENTRY_NAME" /etc/os-release > /tmp/os-release
RUN mv /tmp/os-release /etc/os-release
RUN echo IMAGE_REPO=\"${IMAGE_REPO}\"              >> /etc/os-release && \
    echo IMAGE_TAG=\"${IMAGE_TAG}\"                >> /etc/os-release && \
    echo IMAGE=\"${IMAGE_REPO}:${IMAGE_TAG}\"      >> /etc/os-release && \
    echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`"        >> /etc/os-release && \
    echo GRUB_ENTRY_NAME=\"SLE Micro\" >> /etc/os-release

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sle.micro
LABEL org.opencontainers.image.title="SLE Micro KVM"
LABEL org.opencontainers.image.description="Image containing SLE Micro KVM - a containerized OS layer for Kubernetes."
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix

# Ensure /tmp is mounted as tmpfs by default
RUN if [ -e /usr/share/systemd/tmp.mount ]; then \
      cp /usr/share/systemd/tmp.mount /etc/systemd/system; \
    fi

# Save some space
RUN if [ -f /usr/bin/zypper ]; then zypper clean --all; fi
# Save more space
RUN rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force immutable-rootfs,grub-config,dracut-config,cloud-config-essentials,elemental-setup && \
    # aarch64 has an uncompressed kernel so we need to link it to vmlinuz
    kernel=$(ls /boot/Image-* 2>/dev/null | head -n1) && \
    if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi
0707010000000F000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002800000000elemental-2.0.4/.obs/dockerfile/slem-os07070100000010000081A4000000000000000000000001663B551D00000D7B000000000000000000000000000000000000003300000000elemental-2.0.4/.obs/dockerfile/slem-os/Dockerfile# SPDX-License-Identifier: Apache-2.0
# Define the names/tags of the container
#!BuildTag: suse/sle-micro/%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro/%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro/%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 8
#

ARG SLEMICRO_VERSION

FROM suse/sle-micro/base-${SLEMICRO_VERSION}:latest

# dummy zypper call to get elemental into the build context and extract %VERSION% from it via _service
RUN zypper in --no-recommends -y systemd-presets-branding-SLE-Micro-for-Rancher elemental

# extend -base with baremetal and usability packages
RUN zypper in --no-recommends -y procps openssl openssh openssh-server \
    vim-small less kernel-firmware-all NetworkManager-wwan cryptsetup \
    \
    avahi bash-completion catatonit cni cni-plugins conmon conntrack-tools \
    container-selinux ethtool fuse-overlayfs haveged hdparm hostname iptables \
    issue-generator jq k9s keyutils lshw lsof lsscsi mdadm multipath-tools \
    netcat-openbsd net-tools nfs-client nfsidmap \
    nss-mdns open-iscsi open-vm-tools pciutils pciutils-ids podman policycoreutils \
    procmail psmisc rpcbind runc selinux-policy selinux-policy-targeted \
    selinux-tools slirp4netns strace sudo sysstat system-user-nobody \
    timezone traceroute xtables-plugins

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro/$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# IMPORTANT: Setup elemental-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
# Also used by elemental-populate-labels
RUN grep -v "IMAGE_REPO\|IMAGE_TAG\|IMAGE=\|TIMESTAMP\|GRUB_ENTRY_NAME" /etc/os-release > /tmp/os-release
RUN mv /tmp/os-release /etc/os-release
RUN echo IMAGE_REPO=\"${IMAGE_REPO}\"              >> /etc/os-release && \
    echo IMAGE_TAG=\"${IMAGE_TAG}\"                >> /etc/os-release && \
    echo IMAGE=\"${IMAGE_REPO}:${IMAGE_TAG}\"      >> /etc/os-release && \
    echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`"        >> /etc/os-release && \
    echo GRUB_ENTRY_NAME=\"SLE Micro\" >> /etc/os-release

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sle.micro
LABEL org.opencontainers.image.title="SLE Micro"
LABEL org.opencontainers.image.description="Image containing SLE Micro - a containerized OS layer for Kubernetes."
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix

# Ensure /tmp is mounted as tmpfs by default
RUN if [ -e /usr/share/systemd/tmp.mount ]; then \
      cp /usr/share/systemd/tmp.mount /etc/systemd/system; \
    fi

# Save some space
RUN if [ -f /usr/bin/zypper ]; then zypper clean --all; fi
# Save more space
RUN rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force immutable-rootfs,grub-config,dracut-config,cloud-config-essentials,elemental-setup && \
    # aarch64 has an uncompressed kernel so we need to link it to vmlinuz
    kernel=$(ls /boot/Image-* 2>/dev/null | head -n1) && \
    if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi
07070100000011000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000002B00000000elemental-2.0.4/.obs/dockerfile/slem-rt-os07070100000012000081A4000000000000000000000001663B551D00000AFE000000000000000000000000000000000000003600000000elemental-2.0.4/.obs/dockerfile/slem-rt-os/Dockerfile# SPDX-License-Identifier: Apache-2.0
# Define the names/tags of the container
#!BuildTag: suse/sle-micro/rt-%%SLEMICRO_VERSION%%:latest
#!BuildTag: suse/sle-micro/rt-%%SLEMICRO_VERSION%%:%VERSION%
#!BuildTag: suse/sle-micro/rt-%%SLEMICRO_VERSION%%:%VERSION%-%RELEASE%
#!BuildConstraint: hardware:disk:size unit=G 8
#

ARG SLEMICRO_VERSION

FROM suse/sle-micro/$SLEMICRO_VERSION:latest AS os

MAINTAINER SUSE LLC (https://www.suse.com/)

ARG SLEMICRO_VERSION
ARG BUILD_REPO=%%IMG_REPO%%
ARG IMAGE_REPO=$BUILD_REPO/suse/sle-micro/rt-$SLEMICRO_VERSION
ARG IMAGE_TAG=%VERSION%-%RELEASE%

# dummy zypper call to get elemental into the build context and extract %VERSION% from it via _service
RUN zypper in --no-recommends -y systemd-presets-branding-SLE-Micro-for-Rancher elemental

# turn base image into a rt image
RUN zypper in --no-recommends -y -- \
  -kernel-default \
  kernel-rt

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sle.micro.rancher
LABEL org.opencontainers.image.title="SLE Micro for Rancher RT"
LABEL org.opencontainers.image.description="Image containing SLE Micro for Rancher RT - a containerized OS layer for Kubernetes."
LABEL org.opencontainers.image.version="${IMAGE_TAG}"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="${IMAGE_REPO}:${IMAGE_TAG}"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix

# IMPORTANT: Setup elemental-release used for versioning/upgrade. The
# values here should reflect the tag of the image being built
# Also used by elemental-populate-labels
RUN grep -v "IMAGE_REPO\|IMAGE_TAG\|IMAGE=\|TIMESTAMP\|GRUB_ENTRY_NAME" /etc/os-release > /tmp/os-release
RUN mv /tmp/os-release /etc/os-release
RUN echo IMAGE_REPO=\"${IMAGE_REPO}\"         >> /etc/os-release && \
    echo IMAGE_TAG=\"${IMAGE_TAG}\"           >> /etc/os-release && \
    echo IMAGE=\"${IMAGE_REPO}:${IMAGE_TAG}\" >> /etc/os-release && \
    echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`" >> /etc/os-release
RUN echo GRUB_ENTRY_NAME=\"Elemental\" >> /etc/os-release

# Ensure /tmp is mounted as tmpfs by default
RUN if [ -e /usr/share/systemd/tmp.mount ]; then \
      cp /usr/share/systemd/tmp.mount /etc/systemd/system; \
    fi

# Save some space
RUN zypper clean --all && \
    rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force immutable-rootfs,grub-config,dracut-config,cloud-config-essentials,elemental-setup && \
    # aarch64 has an uncompressed kernel so we need to link it to vmlinuz
    kernel=$(ls /boot/Image-* 2>/dev/null | head -n1) && \
    if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi
07070100000013000041ED000000000000000000000002663B551D00000000000000000000000000000000000000000000001E00000000elemental-2.0.4/.obs/specfile07070100000014000081A4000000000000000000000001663B551D0000008C000000000000000000000000000000000000003200000000elemental-2.0.4/.obs/specfile/elemental-rpmlintrc# ignore rclink missing checks
addFilter("W: suse-missing-rclink");

# ignore fhs complaints
addFilter("W: suse-filelist-forbidden-fhs23");
07070100000015000081A4000000000000000000000001663B551D000015D0000000000000000000000000000000000000002D00000000elemental-2.0.4/.obs/specfile/elemental.spec#
# spec file for package elemental
#
# Copyright (c) 2022 - 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 license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define systemdir /system
%define oemdir %{systemdir}/oem

Name:           elemental
Version:        0
Release:        0
Summary:        A Rancher and Kubernetes optimized immutable Linux distribution
License:        Apache-2.0
Group:          System/Management
URL:            https://github.com/rancher-sandbox/%{name}
Source:         %{name}-%{version}.tar
Source1:        LICENSE
Source2:        README.md
Source3:        %{name}-rpmlintrc

Requires:       elemental-toolkit
Requires:       elemental-register
Requires:       elemental-system-agent
Requires:       elemental-support
Requires:       NetworkManager
Requires:       systemd-presets-branding-Elemental
Requires:       elemental-updater = %{version}-%{release}
%{?systemd_requires}

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Elemental is a new set of tools to manage operating systems as container images within Rancher Manager

%package -n elemental-updater
Summary:        Rancher elemental node updater
Group:          System/Management

%description -n elemental-updater
Rancher elemental node updater. To be installed on the node.

%prep
%setup -q -n %{name}-%{version}
cp %{S:1} .
cp %{S:2} .

%build


%install

cp -a framework/files/* %{buildroot}

rm -rf %{buildroot}/var/log/journal

# remove placeholders
rm -rf %{buildroot}/usr/libexec/.placeholder

%pre
%if 0%{?suse_version}
%service_add_pre elemental-populate-node-labels.service
%service_add_pre shutdown-containerd.service
%service_add_pre elemental-register.service
%service_add_pre elemental-register-install.service
%service_add_pre elemental-register-reset.service
%service_add_pre elemental-register.timer
%service_add_pre elemental-system-agent.service
%endif

%post
%if 0%{?suse_version}
%service_add_post elemental-populate-node-labels.service
%service_add_post shutdown-containerd.service
%service_add_post elemental-register.service
%service_add_post elemental-register-install.service
%service_add_post elemental-register-reset.service
%service_add_post elemental-register.timer
%service_add_post elemental-system-agent.service
%else
%systemd_post elemental-populate-node-labels.service
%systemd_post shutdown-containerd.service
%systemd_post elemental-register.service
%systemd_post elemental-register-install.service
%systemd_post elemental-register-reset.service
%systemd_post elemental-register.timer
%systemd_post elemental-system-agent.service
%endif

%preun
%if 0%{?suse_version}
%service_del_preun elemental-populate-node-labels.service
%service_del_preun shutdown-containerd.service
%service_del_preun elemental-register.service
%service_del_preun elemental-register-install.service
%service_del_preun elemental-register-reset.service
%service_del_preun elemental-register.timer
%service_del_preun elemental-system-agent.service
%else
%systemd_preun elemental-populate-node-labels.service
%systemd_preun shutdown-containerd.service
%systemd_preun elemental-register.service
%systemd_preun elemental-register-install.service
%systemd_preun elemental-register-reset.service
%systemd_preun elemental-register.timer
%systemd_preun elemental-system-agent.service
%endif

%postun
%if 0%{?suse_version}
%service_del_postun elemental-populate-node-labels.service
%service_del_postun shutdown-containerd.service
%service_del_postun elemental-register.service
%service_del_postun elemental-register-install.service
%service_del_postun elemental-register-reset.service
%service_del_postun elemental-register.timer
%service_del_postun elemental-system-agent.service
%else
%systemd_postun elemental-populate-node-labels.service
%systemd_postun shutdown-containerd.service
%systemd_postun elemental-register.service
%systemd_postun elemental-register-install.service
%systemd_postun elemental-register-reset.service
%systemd_postun elemental-register.timer
%systemd_postun elemental-system-agent.service
%endif

%files
%defattr(-,root,root,-)
%doc README.md
%license LICENSE
%dir %{_sysconfdir}/cos
%config %{_sysconfdir}/cos/bootargs.cfg
%dir %{_sysconfdir}/dracut.conf.d
%config %{_sysconfdir}/dracut.conf.d/51-certificates-initrd.conf
%config %{_sysconfdir}/dracut.conf.d/99-elemental-systemd.conf
%dir %{_sysconfdir}/NetworkManager
%dir %{_sysconfdir}/NetworkManager/conf.d
%config %{_sysconfdir}/NetworkManager/conf.d/rke2-canal.conf
%dir %{_unitdir}
%{_unitdir}/shutdown-containerd.service
%{_unitdir}/elemental-register.service
%{_unitdir}/elemental-register-install.service
%{_unitdir}/elemental-register-reset.service
%{_unitdir}/elemental-register.timer
%{_unitdir}/elemental-populate-node-labels.service
%{_unitdir}/elemental-system-agent.service
%{_sbindir}/elemental-populate-node-labels
%dir /usr/libexec
%dir %{systemdir}
%dir %{oemdir}
%{oemdir}/*

%files -n elemental-updater
%defattr(-,root,root,-)
%license LICENSE
%{_sbindir}/self-upgrade
%{_sbindir}/suc-upgrade

%changelog
07070100000016000081A4000000000000000000000001663B551D000007C7000000000000000000000000000000000000002300000000elemental-2.0.4/.obs/workflows.ymlpush_workflow:
  steps:
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: elemental
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: build-iso
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: build-iso-base
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: SLE-Micro
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: SLE-Micro-base
  filters:
    branches:
      only:
        - main
    event: push

tag_workflow:
  steps:
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: elemental
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: build-iso
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: build-iso-base
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: SLE-Micro
    - trigger_services:
        project: isv:Rancher:Elemental:Dev
        package: SLE-Micro-base
  filters:
    event: tag_push

pr_workflow:
  steps:
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: elemental
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: build-iso-base
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: build-iso
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: SLE-Micro
        target_project: isv:Rancher:Elemental:PR
    - branch_package:
        source_project: isv:Rancher:Elemental:Dev
        source_package: SLE-Micro-base
        target_project: isv:Rancher:Elemental:PR
  filters:
    event: pull_request
    branches:
      only:
        - main
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!63 blocks
openSUSE Build Service is sponsored by