hongquan / CoBang

A QR code scanner desktop app for Linux
GNU General Public License v3.0
240 stars 27 forks source link

Check: Validate appstream file FAIL #77

Closed xiota closed 9 months ago

xiota commented 9 months ago

Attempting to build cobang 0.10.1-1 using aur/cobang.

log ``` ==> Starting check()... ninja: Entering directory `/home/main-builder/pkgwork/src/build' ninja: no work to do. 1/3 Validate desktop file OK 0.01s 2/3 Validate schema file OK 0.01s 3/3 Validate appstream file FAIL 0.07s exit status 1 >>> MALLOC_PERTURB_=217 /usr/bin/appstream-util validate-relax /home/main-builder/pkgwork/src/build/../CoBang-0.10.1/data/vn.hoabinh.quan.CoBang.appdata.xml ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― stdout: /home/main-builder/pkgwork/src/build/../CoBang-0.10.1/data/vn.hoabinh.quan.CoBang.appdata.xml: FAILED: • file-invalid : url is a zero length file [https://i.imgur.com/K3TU9bm.png] • file-invalid : url is a zero length file [https://i.imgur.com/bIV57cV.png] • file-invalid : url is a zero length file [https://i.imgur.com/ldynPU6.png] • file-invalid : url is a zero length file [https://i.imgur.com/aORgQKj.png] • file-invalid : url is a zero length file [https://i.imgur.com/MyH9CEC.png] stderr: Validation of files failed ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― Summary of Failures: 3/3 Validate appstream file FAIL 0.07s exit status 1 Ok: 2 Expected Fail: 0 Fail: 1 Unexpected Pass: 0 Skipped: 0 Timeout: 0 Full log written to /home/main-builder/pkgwork/src/build/meson-logs/testlog.txt ==> ERROR: A failure occurred in check(). ```
hongquan commented 9 months ago

Maybe your build environment blocks Internet access? It said

url is a zero length file [https://i.imgur.com/K3TU9bm.png]

But that URL is actually valid, you can check it yourself.

xiota commented 9 months ago

Internet access was okay because build server downloads fresh sources prior to building. Seems like was probably a temporary Imgur issue because successfully builds now. But why are those files on Imgur instead of in the git repo and source tarball? Imgur can go down or refuse connections for maintenance, captcha checks, or other reasons.

hongquan commented 9 months ago

Because before your report, there was no issue with Imgur accessibility, and I don't want to store binary files in Git repo.

xiota commented 9 months ago

I think binaries are fine / common for screenshots, icons, and some other types of files. If you decide not to add them to the repo, I'll ask the aur maintainer to add them to the package.

hongquan commented 9 months ago

I will move the screenshots to Git repo.

hongquan commented 9 months ago

I planned to move the screenshots to Git repo, but then I don't know how to specify the image location in the appdata file. Its specs says that:

The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web.

So it seems that we still have to use https://... URL here, and using https://github.com is not different than using Imgur service.

xiota commented 9 months ago

I will move the screenshots to Git repo.

Would be appreciated.

I don't know how to specify the image location

Something like: https://raw.githubusercontent.com/hongquan/CoBang/main/LICENSE.txt

Even if the link is not changed, I think it would be beneficial to have a backup of the images in the git repo.

Is there a way to verify the appdata file without downloading the links?

using https://github.com is not different than using Imgur service.

Using a single site / service is less prone to failure than using more. To even access the source in the first place, Github has to be working. So it's less likely to fail during build than Imgur. Also, from personal use, Github uptime is much better than Imgur, which frequently goes down for "maintenance".

hongquan commented 9 months ago

I already move screenshots to Git repo.