Skip to content

Drop xvfb-run wrapper, no longer needed since LibrePCB 2.2.0 - #8

Draft
firuzakhmad wants to merge 3 commits into
LibrePCB:masterfrom
firuzakhmad:drop-xvfb-wrapper
Draft

Drop xvfb-run wrapper, no longer needed since LibrePCB 2.2.0#8
firuzakhmad wants to merge 3 commits into
LibrePCB:masterfrom
firuzakhmad:drop-xvfb-wrapper

Conversation

@firuzakhmad

@firuzakhmad firuzakhmad commented Jul 25, 2026

Copy link
Copy Markdown

Draft on #1793.

Removed the wrapper script and symlinked librepcb-cli directly into
/usr/local/bin, per your suggestion. Kept the actual install under
/opt/librepcb rather than extracting there directly, since Qt looks
for its plugins relative to that path. Also dropped xvfb from the
apt install list, since nothing else needs it.

Confirmed locally that this can't work yet: building against the
current LIBREPCB_VERSION=2.1.1 fails at the "RUN librepcb-cli
--version" sanity check with "error while loading shared libraries:
libGL.so.1: cannot open shared object file", since 2.1.1 has no
fallback logic and tries to initialize the xcb platform without any
display present. Expected, and confirms this needs to wait for a
2.2.0 image.

I'll bump LIBREPCB_VERSION and confirm this actually builds and runs
cleanly once 2.2.0 is out, then mark this ready for review.

librepcb-cli now runs headlessly on its own (LibrePCB/LibrePCB#1793),
so the xvfb-run wrapper and the xvfb package are no longer needed.

Not bumping LIBREPCB_VERSION here since 2.2.0 hasn't been released
yet, the build-time version check further down would fail against
2.1.1, which doesn't have the headless fix. Opening as a draft until
that's actually available.
@ubruhin

ubruhin commented Jul 26, 2026

Copy link
Copy Markdown
Member

The wrapper script has no function anymore, so it should be removed completely. Just install the CLI directly to /usr/local.

The wrapper had no function anymore after dropping xvfb-run, so
remove it entirely and just symlink librepcb-cli into /usr/local/bin
instead. Keeping the actual install tree at /opt/librepcb rather
than extracting straight into /usr/local, since Qt resolves plugin
paths relative to that layout.
@firuzakhmad

Copy link
Copy Markdown
Author

Removed the wrapper script and symlinked librepcb-cli straight into
/usr/local/bin instead. Kept the actual install under /opt/librepcb
rather than extracting there directly, since Qt looks for its
plugins relative to that path.

@ubruhin

ubruhin commented Jul 26, 2026

Copy link
Copy Markdown
Member

Keeping the actual install tree at /opt/librepcb rather
than extracting straight into /usr/local, since Qt resolves plugin
paths relative to that layout.

Is that sentence from an LLM or is that your observation? I just can't really believe that, so I wonder if that is from a hallucinating LLM. Just to make it clear: I don't want to be the reviewer of LLM output. It is fine if you use LLMs to get work done, but it is your job to review and correct its output. Your PRs are not bad so far, but still I have the impression that I am reviewing the (unvalidated/unpolished) work of LLM instead of work from (or verified by) human. Is my impression right?

Though maybe I just misunderstand the commit message. I agree the relative path between the binary and the plugins must not be changed, but I see no reason for not installing the whole librepcb package to /usr/local (make install would do it exactly that way too).

@firuzakhmad

Copy link
Copy Markdown
Author

Fair question! Yes, that line came from LLM while I was working through the issue. I took it at face value and didn't verify it before including it. Looking at it again, it doesn't actually hold up. Qt resolves plugin paths relative to where the binary is located, not a fixed path like /opt/librepcb. So if the release tree is extracted into /usr/local while preserving the same directory structure, it works the same way. The symlink wasn't actually necessary, I stated it as fact without confirming it first.

Your broader point is fair as well. Going forward, I'll make sure what I submit is based on things I've actually verified myself. I'll go back and fix this properly.

@ubruhin

ubruhin commented Jul 26, 2026

Copy link
Copy Markdown
Member

Alright, thanks for your honest clarification 👍

@firuzakhmad

Copy link
Copy Markdown
Author

Pushed! Straight to /usr/local now, no more /opt + symlink.

@ubruhin

ubruhin commented Jul 27, 2026

Copy link
Copy Markdown
Member

Thanks, LGTM 👍 Will merge when the next release is available.

@firuzakhmad

firuzakhmad commented Jul 27, 2026

Copy link
Copy Markdown
Author

Thank you for reviewing it! Sounds good, will follow up when the next release is available.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants