mudler/luet

Trying to refer Mocaccino community repo in a local repo

msdobrescu opened this issue · 1 comments

I try to build in a local repo some packages based on Mocaccino repository.

Currently, the local repo has the following Dockerfile:

FROM quay.io/mocaccino/desktop

ENV LUET_YES=true
ENV LUET_NOLOCK=true
RUN luet install --relax repository/mocaccino-extra mocaccino/cli
RUN luet uninstall repository/mocaccino-desktop
RUN luet install --relax repository/mocaccino-desktop-stable
RUN luet install --relax repository/mocaccino-community-stable
RUN luet install --relax -qy container/docker system/luet

ENTRYPOINT /usr/bin/luet

And build_local.sh:

#!/bin/bash

root=$(git rev-parse --show-toplevel)

BASEDIR=$(dirname "$0")
if [ -z "$root" ]; then
  root=$BASEDIR
fi

pushd $root

#root=$(git rev-parse --show-toplevel)
docker build -t build-image $root

docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/workdir --entrypoint /usr/bin/luet -w /workdir build-image build \
      -q --only-target-package \
      --pull-repository quay.io/mocaccino/mocaccino-community \
      --pull-repository quay.io/mocaccino/desktop \
      --pull-repository quay.io/mocaccino/os-commons \
      --pull-repository quay.io/mocaccino/extra \
      --pull --image-repository local-repo --from-repositories --no-spinner --live-output --tree packages "$@"

Mocaccino community repo packages build fine there, but building in the local repo fails like this:

...

INFO:  Downloaded compilertree.tar.gz of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-kernel-stable-repository-20211120.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-musl-universe-stable-repository-20211121.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-os-commons-repository-20211019.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-os-commons-stable-repository-20211016.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-desktop-stable-repo-updater-0.3.metadata.yaml of 0.01 MB ( 0.02 MiB/s )
INFO:  Downloaded mocaccino-micro-stable-repo-updater-0.1.metadata.yaml of 0.01 MB ( 0.02 MiB/s )
INFO:  Downloaded luet-repository-20200717.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-community-repository-20231012084218.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-repository-index-repository-20211120.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-stage3-repository-20210520.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-portage-stable-repository-20201028.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-community-stable-repo-updater-0.3+57.metadata.yaml of 0.01 MB ( 0.02 MiB/s )
INFO:  Downloaded mocaccino-community-stable-repository-20231012084218.metadata.yaml of 0.00 MB ( 0.02 MiB/s )
INFO:  Downloaded mocaccino-extra-repository-20211023.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-micro-repository-20211120.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-portage-repository-20201028.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded livecd-repository-20200704.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-desktop-repository-20220205011736.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-extra-arm-repository-20211204.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-musl-universe-repository-20211121.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-desktop-stable-repository-20231011145906.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-extra-stable-repository-20211023.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-kernel-repository-20211120.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Downloaded mocaccino-micro-stable-repository-20211120140355.metadata.yaml of 0.00 MB ( 0.01 MiB/s )
INFO:  Building in /workdir/build
INFO:  📦  Compiling libs/vdr-sc-0.9.3.20120815-r4+2 .... ☕ 
ERROR:  Error: failed getting compile spec for package apps/dvdauthor-0.7.2-r2: while rendering package template: rendering file /var/tmp/luet/mocaccino-community-stable754556715/tree/packages/apps/build.yaml: template: :733:3: executing "community.build" at <include "community.package_setup" .Values>: error calling include: template: :971:96: executing "community.package_setup" at <$atom.atom>: can't evaluate field atom in type string
ERROR:  Bailing out

The package failure looks random, each build attempt is reporting the same kind of error for some other package.

It obviously tries to render the community repo. As a note, there must be no template named the same in both, so the local repo and community repo have their own template namespaces. Besides that, the local repo is the same as the community repo with regards to the package collections and templates.

Am I missing a luet plugin or something else?

Found the reason! There was a hidden character that broke a template.