From e66bba6bb166057ab003306689b25fcd7533db3f Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sun, 5 Jan 2025 12:56:13 -0300 Subject: [PATCH 1/4] feat: add artifacthub metadata on rechunker step --- Justfile | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 7ac00185..94eb654f 100644 --- a/Justfile +++ b/Justfile @@ -342,6 +342,34 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": if [[ -z "$(git status -s)" ]]; then SHA=$(git rev-parse HEAD) fi + + # Should generate a timestamp like what is defined on the ArtifactHub documentation + # E.G: 2022-02-08T15:38:15Z' + # https://artifacthub.io/docs/topics/repositories/container-images/ + # https://linux.die.net/man/1/date + CREATED_DATE="$(date -u +%Y\-%m\-%d\T%H\:%M\:%S\Z)" + + LABELS=() + LABELS+=("org.opencontainers.image.created=$CREATED_DATE") + LABELS+=("org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology") + LABELS+=("org.opencontainers.image.documentation=https://getaurora.dev") + LABELS+=("org.opencontainers.image.source=https://github.com/ublue-os/aurora/blob/main/Containerfile") + LABELS+=("org.opencontainers.image.title=bluefin") + LABELS+=("org.opencontainers.image.url=https://getaurora.dev") + LABELS+=("org.opencontainers.image.vendor=ublue-os") + LABELS+=("org.opencontainers.image.version=$fedora_version") + LABELS+=("io.artifacthub.package.deprecated=false") + LABELS+=("io.artifacthub.package.keywords=bootc,fedora,aurora,ublue,universal-blue") + LABELS+=("io.artifacthub.package.license=Apache-2.0") + LABELS+=("io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4") + LABELS+=("containers.bootc=1") + + FINAL_LABELS="io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/aurora/refs/heads/main/README.md" + # Escape labels in a way that sudoif works with it + for label in "${LABELS[@]}"; do + FINAL_LABELS+="$'\n'$label" + done + # Run Rechunker just sudoif podman run --rm \ --pull=newer \ @@ -352,7 +380,7 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": --env REPO=/var/ostree/repo \ --env PREV_REF=ghcr.io/ublue-os/"${image_name}":"${tag}" \ --env OUT_NAME="$OUT_NAME" \ - --env LABELS="org.opencontainers.image.title=${image_name}$'\n''io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/aurora/refs/heads/main/README.md'$'\n''io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4'$'\n'" \ + --env LABELS=$FINAL_LABELS \ --env "DESCRIPTION='An interpretation of the Ubuntu spirit built on Fedora technology'" \ --env "VERSION=${VERSION}" \ --env VERSION_FN=/workspace/version.txt \ From d583bba01537b7ee226bbb1881203fdb4f21b625 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sun, 5 Jan 2025 13:05:25 -0300 Subject: [PATCH 2/4] fix: make sure labels is quoted --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 94eb654f..9f2873ab 100644 --- a/Justfile +++ b/Justfile @@ -380,7 +380,7 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": --env REPO=/var/ostree/repo \ --env PREV_REF=ghcr.io/ublue-os/"${image_name}":"${tag}" \ --env OUT_NAME="$OUT_NAME" \ - --env LABELS=$FINAL_LABELS \ + --env "LABELS=$FINAL_LABELS" \ --env "DESCRIPTION='An interpretation of the Ubuntu spirit built on Fedora technology'" \ --env "VERSION=${VERSION}" \ --env VERSION_FN=/workspace/version.txt \ From 3d38cfc1cd3610f1a2fad32ba7173de1cd7aaac2 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sun, 5 Jan 2025 13:16:54 -0300 Subject: [PATCH 3/4] fix: quoting in description --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 9f2873ab..6085bd96 100644 --- a/Justfile +++ b/Justfile @@ -351,7 +351,7 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": LABELS=() LABELS+=("org.opencontainers.image.created=$CREATED_DATE") - LABELS+=("org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology") + LABELS+=("org.opencontainers.image.description='An interpretation of the Ubuntu spirit built on Fedora technology'") LABELS+=("org.opencontainers.image.documentation=https://getaurora.dev") LABELS+=("org.opencontainers.image.source=https://github.com/ublue-os/aurora/blob/main/Containerfile") LABELS+=("org.opencontainers.image.title=bluefin") From d43afbc8221e11ea842fdf7c0f88f74909d152f7 Mon Sep 17 00:00:00 2001 From: Juha Uotila <10782843+inffy@users.noreply.github.com> Date: Tue, 21 Jan 2025 14:44:42 +0200 Subject: [PATCH 4/4] Update Justfile --- Justfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Justfile b/Justfile index 6085bd96..c1c2b5b1 100644 --- a/Justfile +++ b/Justfile @@ -351,10 +351,10 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": LABELS=() LABELS+=("org.opencontainers.image.created=$CREATED_DATE") - LABELS+=("org.opencontainers.image.description='An interpretation of the Ubuntu spirit built on Fedora technology'") + LABELS+=("org.opencontainers.image.description='The ultimate productivity workstation'") LABELS+=("org.opencontainers.image.documentation=https://getaurora.dev") LABELS+=("org.opencontainers.image.source=https://github.com/ublue-os/aurora/blob/main/Containerfile") - LABELS+=("org.opencontainers.image.title=bluefin") + LABELS+=("org.opencontainers.image.title=aurora") LABELS+=("org.opencontainers.image.url=https://getaurora.dev") LABELS+=("org.opencontainers.image.vendor=ublue-os") LABELS+=("org.opencontainers.image.version=$fedora_version") @@ -381,7 +381,7 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": --env PREV_REF=ghcr.io/ublue-os/"${image_name}":"${tag}" \ --env OUT_NAME="$OUT_NAME" \ --env "LABELS=$FINAL_LABELS" \ - --env "DESCRIPTION='An interpretation of the Ubuntu spirit built on Fedora technology'" \ + --env "DESCRIPTION='The ultimate productivity workstation'" \ --env "VERSION=${VERSION}" \ --env VERSION_FN=/workspace/version.txt \ --env OUT_REF="oci:$OUT_NAME" \