Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rust-keylime-image for openSUSE:Factory checked in at 2022-10-28 19:31:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rust-keylime-image (Old) and /work/SRC/openSUSE:Factory/.rust-keylime-image.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rust-keylime-image" Fri Oct 28 19:31:58 2022 rev:2 rq:1031956 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/rust-keylime-image/rust-keylime-image.changes 2022-10-21 16:19:11.426132739 +0200 +++ /work/SRC/openSUSE:Factory/.rust-keylime-image.new.2275/rust-keylime-image.changes 2022-10-28 19:32:29.211520915 +0200 @@ -1,0 +2,8 @@ +Fri Oct 28 12:51:07 UTC 2022 - Alberto Planas Dominguez <apla...@suse.com> + +- Rename the published image to "keylime-agent" +- Rename the volumes and container default name, and the configuration + file under "keylime-agent-XXXX" +- Update the README for use new name + +------------------------------------------------------------------- Old: ---- rust-keylime-configure.sh New: ---- keylime-agent-configure.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Dockerfile ++++++ --- /var/tmp/diff_new_pack.tUSiQh/_old 2022-10-28 19:32:29.663523182 +0200 +++ /var/tmp/diff_new_pack.tUSiQh/_new 2022-10-28 19:32:29.667523202 +0200 @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 -#!BuildTag: opensuse/rust-keylime:%%KEYLIME_VERSION%% -#!BuildTag: opensuse/rust-keylime:%%KEYLIME_VERSION%%-%RELEASE% -#!BuildTag: opensuse/rust-keylime:latest +#!BuildTag: opensuse/keylime-agent:%%KEYLIME_VERSION%% +#!BuildTag: opensuse/keylime-agent:%%KEYLIME_VERSION%%-%RELEASE% +#!BuildTag: opensuse/keylime-agent:latest FROM opensuse/tumbleweed:latest # Define labels according to https://en.opensuse.org/Building_derived_containers -# labelprefix=org.opensuse.application.rust-keylime +# labelprefix=org.opensuse.application.keylime-agent LABEL org.opencontainers.image.title="openSUSE Tumbleweed Keylime Rust Agent Service Container Image" LABEL org.opencontainers.image.description="Keylime Rust agent service based on the openSUSE Tumbleweed Base Container Image." LABEL org.opencontainers.image.version="%%KEYLIME_VERSION%%" @@ -13,16 +13,16 @@ LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="openSUSE Project" LABEL org.opencontainers.image.authors="apla...@suse.de" -LABEL org.opensuse.reference="registry.opensuse.org/opensuse/rust-keylime:%%KEYLIME_VERSION%%-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/keylime-agent:%%KEYLIME_VERSION%%-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" LABEL com.suse.release-stage="released" # endlabelprefix -LABEL RUN="podman run --name rust-keylime-container --rm --device /dev/tpm0 --device /dev/tpmrm0 -v rust-keylime-volume:/var/lib/keylime -v rust-keylime-volume:/etc/keylime --tmpfs /var/lib/keylime/secure:rw,size=1m,mode=0700 -dt IMAGE" -LABEL INSTALL="podman volume create rust-keylime-volume" -LABEL CONFIGURE="podman run --rm -v rust-keylime-volume:/var/lib/keylime -v rust-keylime-volume:/etc/keylime IMAGE /rust-keylime-configure.sh" -LABEL UNINSTALL="podman volume rm rust-keylime-volume" +LABEL RUN="podman run --name keylime-agent-container --rm --device /dev/tpm0 --device /dev/tpmrm0 -v keylime-agent-volume:/var/lib/keylime -v keylime-agent-volume:/etc/keylime --tmpfs /var/lib/keylime/secure:rw,size=1m,mode=0700 -dt IMAGE" +LABEL INSTALL="podman volume create keylime-agent-volume" +LABEL CONFIGURE="podman run --rm -v keylime-agent-volume:/var/lib/keylime -v keylime-agent-volume:/etc/keylime IMAGE /keylime-agent-configure.sh" +LABEL UNINSTALL="podman volume rm keylime-agent-volume" RUN set -euo pipefail; \ zypper -n in --no-recommends \ @@ -31,9 +31,9 @@ zypper -n clean; \ rm -rf /var/log/* -COPY rust-keylime-configure.sh / +COPY keylime-agent-configure.sh / RUN set -euo pipefail; \ - chmod a+x rust-keylime-configure.sh + chmod a+x keylime-agent-configure.sh ENV UUID="<UUID>" REMOTE_IP="<REMOTE_IP>" RUST_LOG="keylime_agent=info" ++++++ README ++++++ --- /var/tmp/diff_new_pack.tUSiQh/_old 2022-10-28 19:32:29.699523362 +0200 +++ /var/tmp/diff_new_pack.tUSiQh/_new 2022-10-28 19:32:29.703523382 +0200 @@ -16,7 +16,7 @@ devel:microos:containers, and can be pulled directly from it. podman pull \ - registry.opensuse.org/devel/microos/containers/containerfile/opensuse/rust-keylime:latest + registry.opensuse.org/devel/microos/containers/containerfile/opensuse/keylime-agent:latest The agent service needs to be configured before it can be used. It will need a persistent volume where to store the certificates and the @@ -24,9 +24,9 @@ can create this volume running the "install" label. podman container runlabel install \ - registry.opensuse.org/devel/microos/containers/containerfile/opensuse/rust-keylime:latest + registry.opensuse.org/devel/microos/containers/containerfile/opensuse/keylime-agent:latest -This will create the "rust-keylime-volume" that will be attached into +This will create the "keylime-agent-volume" that will be attached into the running container. Now we need to create a configuration file, were we indicate the UUID @@ -34,7 +34,7 @@ that we can run the "configure" label. podman container runlabel configure \ - registry.opensuse.org/devel/microos/containers/containerfile/opensuse/rust-keylime:latest \ + registry.opensuse.org/devel/microos/containers/containerfile/opensuse/keylime-agent:latest \ $(uuidgen) 10.88.0.1 The last configuration step is to copy the certificate from the @@ -46,23 +46,23 @@ One way to copy the certificate is mounting the volume generated during the first step. - podman volume mount rust-keylime-volume + podman volume mount keylime-agent-volume cp -a cacert.crt \ - /var/lib/containers/storage/volumes/rust-keylime-volume/_data/cv_ca/. + /var/lib/containers/storage/volumes/keylime-agent-volume/_data/cv_ca/. We can now start the agent. podman container runlabel run \ - registry.opensuse.org/devel/microos/containers/containerfile/opensuse/rust-keylime:latest + registry.opensuse.org/devel/microos/containers/containerfile/opensuse/keylime-agent:latest We can monitor the status with podman. podman ps - podman logs rust-keylime-container + podman logs keylime-agent-container And finally, we can stop the services via the kill command. - podman kill rust-keylime-container + podman kill keylime-agent-container ++++++ keylime-agent-configure.sh ++++++ #!/bin/sh set -e [ -n "$1" ] && UUID="$1" [ -n "$2" ] && REMOTE_IP="$2" if [ -n "$UUID" ] && [ "$UUID" != "<UUID>" ] && [ -n "$REMOTE_IP" ] && [ "$REMOTE_IP" != "<REMOTE_IP>" ]; then mkdir -p /var/lib/keylime/cv_ca mkdir -p /etc/keylime/agent.conf.d cat <<EOF > /etc/keylime/agent.conf.d/agent.conf [agent] uuid = "$UUID" registrar_ip = "$REMOTE_IP" revocation_notification_ip = "$REMOTE_IP" run_as = "root:root" EOF fi