Flathub builder fails to find icon files

Hello everyone,

I’ve recently updated the JReleaser flatpak repository (https://github.com/flathub/org.jreleaser.cli) with new settings. One of which copies icons found in icons/256x256/jreleaser.png into the target app install.

As you may appreciate the file does exist in the repository. Build instructions specify where to get this file
https://github.com/flathub/org.jreleaser.cli/blob/7d8d9b81512576e3de5bb183df5749fe48221c9c/org.jreleaser.cli.yml#L115-L122 and copy it

      - install -Dm644 icons/256x256/jreleaser.png /app/share/icons/hicolor/256x256/apps/org.jreleaser.cli.png
    sources:
      - type: archive
        url: https://github.com/jreleaser/jreleaser/releases/download/v1.2.0/jreleaser-1.2.0.zip
        sha256: cff8a16fa52356d4d7bb9abebffdb4534e6b7bfb545b0f0cbd459513050472a3
      - type: file
        path: org.jreleaser.cli.metainfo.xml
      - type: file
        path: icons/256x256/jreleaser.png

However, the Flathub build files because it cannot find the icon file Flathub builds

Running: install -Dm644 icons/256x256/jreleaser.png /app/share/icons/hicolor/256x256/apps/org.jreleaser.cli.png
FB: Running 'flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/jreleaser --nofilesystem=host:reset --filesystem=/srv/buildbot/worker/build-x86_64-1/build/.flatpak-builder/build/jreleaser-1 --bind-mount=/run/build/jreleaser=/srv/buildbot/worker/build-x86_64-1/build/.flatpak-builder/build/jreleaser-1 --build-dir=/run/build/jreleaser --bind-mount=/run/ccache=/srv/buildbot/worker/build-x86_64-1/build/.flatpak-builder/ccache --unshare=network --env=SOURCE_DATE_EPOCH=1661619706 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=48 /srv/buildbot/worker/build-x86_64-1/build/.flatpak-builder/rofiles/rofiles-48mpAm /bin/sh -c 'install -Dm644 icons/256x256/jreleaser.png /app/share/icons/hicolor/256x256/apps/org.jreleaser.cli.png'' on host
install: cannot stat 'icons/256x256/jreleaser.png': No such file or directory
FB: host_command_exited_cb 1490685 256

What am I missing?

TIA

path just tell where to find the file. By default it is copied into the top source directory. So it is in jreleaser.png.

Thanks. I suppose I can use dest-filename to place it where I want to, right?

Correction, dest should be used to place the file into a different location.

but there is no point. It’s for situations where a build system is expected to find things. Like when there are instruction “download this and put it there before starting the build”

Well, without dest I get a build failure. With it, I get a green build. https://buildbot.flathub.org/#/builders/8/builds/12923

because you’d need to change the install line too.