Skip to content

build(linux): avoid network for appstream cli & add missing deps#5363

Open
HurricanePootis wants to merge 1 commit into
LizardByte:masterfrom
HurricanePootis:PKGBUILD
Open

build(linux): avoid network for appstream cli & add missing deps#5363
HurricanePootis wants to merge 1 commit into
LizardByte:masterfrom
HurricanePootis:PKGBUILD

Conversation

@HurricanePootis

Copy link
Copy Markdown

Description

As of right now, the PKGBUILD fails to build on Arch Linux due to AppStream throwing warnings when validating a file. Therefore, I have created a pull request to add --no-net to appstreamcli validate. Furthermore, when checking the ensuing package with namcap (a tool used by Arch maintainers), the package was missing gtk3, hicolor-icon-theme, and libayatana-appindicator. This is with building sunshine against the latest pre-release (2026.619.155209).

I believe appstream fails to validate due to these pages being behind Cloudflare, but that's just my guess.

Here is CLI output of the build failing without this commit:

W: dev.lizardbyte.app.Sunshine:20: url-not-reachable
     https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2troubleshooting.html -
     Unexpected status code: 429
W: dev.lizardbyte.app.Sunshine:21: url-not-reachable
     https://docs.lizardbyte.dev/projects/sunshine - Unexpected status code: 429
I: dev.lizardbyte.app.Sunshine:26: description-first-word-not-capitalized

✘ Validation failed: warnings: 2, infos: 1, pedantic: 1
==> ERROR: A failure occurred in build().
    Aborting...
hurricane@TheCloutPC ~/sunshine/packaging/linux/Arch $ 

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher

Copy link
Copy Markdown
Member

W: dev.lizardbyte.app.Sunshine:20: url-not-reachable
https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2troubleshooting.html -
Unexpected status code: 429
W: dev.lizardbyte.app.Sunshine:21: url-not-reachable
https://docs.lizardbyte.dev/projects/sunshine - Unexpected status code: 429

These are transient errors. I'd rather not disable network altogether.

@HurricanePootis

Copy link
Copy Markdown
Author

These "transient errors" cause makepkg to completely fail at building the PKGBUILD. These URLs are reachable via browser, but appstreamcli seems to be blocked from accessing it, most likely (based on my experience) Cloudflare's protection.

@ReenigneArcher

Copy link
Copy Markdown
Member

We test it in CI on every PR run. It does fail sometimes, but not very often.

@HurricanePootis

Copy link
Copy Markdown
Author

Maybe Cloudflare is not blocking the CI servers from accessing the website, but it is being blocked on my network.

I just enabled Cloudflare WARP on my system and was able to build this project without my commit:

-- Build files have been written to: /home/hurricane/sunshine/packaging/linux/Arch/src/build
I: dev.lizardbyte.app.Sunshine:26: description-first-word-not-capitalized

✔ Validation was successful: infos: 1, pedantic: 1
build/dev.lizardbyte.app.Sunshine.metainfo.xml: OK

Thus, proving cloudflare is blocking certain networks from running appstream cli properly. Since this PKGBUILD is also hosted on the AUR and other places, I think it would be best just to disable the network all together. Or, at least have a way to check to see if cloudflare is blocking the site on someone's PC.

@ReenigneArcher

Copy link
Copy Markdown
Member

Can you add the new argument when GITHUB_ACTIONS env variable is not set?

@HurricanePootis

Copy link
Copy Markdown
Author

Can you add the new argument when GITHUB_ACTIONS env variable is not set?

Done!

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@ReenigneArcher

Copy link
Copy Markdown
Member

Are we not using namcap correctly here?

sudo -u builder namcap -i PKGBUILD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants