Skip to content

fix(opentabletdriver): fix opentabletdriver recipe#343

Merged
inffy merged 1 commit into
mainfrom
opentabletdriver
May 22, 2026
Merged

fix(opentabletdriver): fix opentabletdriver recipe#343
inffy merged 1 commit into
mainfrom
opentabletdriver

Conversation

@inffy
Copy link
Copy Markdown
Member

@inffy inffy commented May 20, 2026

The recipe failed to extract the downloaded tar.gz properly and the rules never got placed which is why the cp of the rules didn't succeed -> recipe couldn't find the actual udev rule

Closed #342

Summary by CodeRabbit

  • Chores
    • Updated the OpenTabletDriver installation download mechanism for improved reliability.

Review Change Stack

The recipe failed to extract the downloaded tar.gz properly and the rules never got placed which is why the cp of the rules didn't succeed -> recipe couldn't find the actual udev rule
Copilot AI review requested due to automatic review settings May 20, 2026 10:39
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. area/just Justfile things kind/bug Something isn't working labels May 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

📝 Walkthrough

Walkthrough

The PR modifies the OpenTabletDriver installation recipe in apps.just to fix an archive download failure. The download pipeline is refactored to replace a wget-based approach with a curl-based approach using improved URL extraction via jq.

Changes

OpenTabletDriver Release Download

Layer / File(s) Summary
OpenTabletDriver download pipeline refactor
system_files/shared/usr/share/ublue-os/just/apps.just
The install-opentabletdriver recipe replaces asset URL extraction from sorted asset filtering with direct jq -r URL emission and uses xargs curl -L -s instead of wget -qi to stream the release archive.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A tablet driver script now flows with grace,
Where curl replaces wget in this debug chase,
The jq extraction shines, no sorting slow,
Fresh archive streams through pipes—let releases flow! 📦

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references the opentabletdriver recipe fix, which is the main focus of the changeset and addresses the core issue reported.
Linked Issues check ✅ Passed The PR changes the asset URL extraction/joining pipeline to use jq and curl/xargs instead of sorting and wget, which directly addresses issue #342's extraction failures.
Out of Scope Changes check ✅ Passed All changes are limited to the install-opentabletdriver recipe in apps.just file and directly address the extraction issue reported in issue #342.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch opentabletdriver

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the install-opentabletdriver Just recipe so it can successfully download and extract the OpenTabletDriver release tarball and then copy the bundled udev rules, addressing the extraction failure reported in #342.

Changes:

  • Adjusts the GitHub release asset selection and download pipeline (switches from wget to curl via xargs).
  • Continues to extract the downloaded tar.gz stream into a temp directory for subsequent udev rules installation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread system_files/shared/usr/share/ublue-os/just/apps.just
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
system_files/shared/usr/share/ublue-os/just/apps.just (1)

29-30: ⚡ Quick win

Add safeguard to ensure only one archive URL is selected.

The jq filter outputs all asset URLs matching opentabletdriver.*tar.gz$. If a release contains multiple matching tar.gz files (e.g., for different architectures), xargs curl will download all of them, and the concatenated output to tar will fail with "invalid compressed data"—the symptom from issue #342.

While current releases appear to have only one matching file, adding an explicit safeguard prevents future breakage if the release structure changes.

Proposed safeguard
   curl -s "https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases/latest" \
     | jq -r '.assets[] | select(.name | test("opentabletdriver.*tar.gz$")) | .browser_download_url' \
+    | head -n1 \
     | xargs curl -L -s \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@system_files/shared/usr/share/ublue-os/just/apps.just` around lines 29 - 30,
The jq filter currently emits all matching asset URLs and pipes them to xargs
curl; change it so exactly one URL is selected (and fail if not) to avoid
downloading/concatenating multiple archives. Replace the pipeline that uses jq
-r '.assets[] | select(.name | test("opentabletdriver.*tar.gz$")) |
.browser_download_url' | xargs curl -L -s with a jq expression that produces a
single URL or errors (for example build an array and require length==1:
'[.assets[] | select(.name|test("opentabletdriver.*tar.gz$")) |
.browser_download_url] | if length==1 then .[0] else error("expected exactly one
opentabletdriver tar.gz asset") end' ) and feed that single URL to curl;
reference the existing jq expression and the xargs curl usage when making the
edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@system_files/shared/usr/share/ublue-os/just/apps.just`:
- Around line 29-30: The jq filter currently emits all matching asset URLs and
pipes them to xargs curl; change it so exactly one URL is selected (and fail if
not) to avoid downloading/concatenating multiple archives. Replace the pipeline
that uses jq -r '.assets[] | select(.name | test("opentabletdriver.*tar.gz$")) |
.browser_download_url' | xargs curl -L -s with a jq expression that produces a
single URL or errors (for example build an array and require length==1:
'[.assets[] | select(.name|test("opentabletdriver.*tar.gz$")) |
.browser_download_url] | if length==1 then .[0] else error("expected exactly one
opentabletdriver tar.gz asset") end' ) and feed that single URL to curl;
reference the existing jq expression and the xargs curl usage when making the
edit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a9900fa2-a4e9-4216-94ec-6403bdd1e77d

📥 Commits

Reviewing files that changed from the base of the PR and between 2a7d6fa and 666458b.

📒 Files selected for processing (1)
  • system_files/shared/usr/share/ublue-os/just/apps.just

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 20, 2026
@inffy inffy enabled auto-merge May 20, 2026 17:11
@inffy inffy added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit f363b45 May 22, 2026
8 checks passed
@inffy inffy deleted the opentabletdriver branch May 22, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/just Justfile things kind/bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ujust install-opentabletdriver fails to download udev rules

4 participants