Skip to content

AUR build broken (again) #4462

Closed
Closed

Description

@rubin55

Description

You guys are using find incorrectly. For some reason, the current build creates 4 binaries, and the current find invocation finds them all and tries to copy them to a single opencode target. Next to that, the target directory does not exist yet, so, given multiple sources, install expects a directory.

Ideally, you would case on architecture, and copy precisely the binary you want for x86-64 or aarch64, and check also if you are on a glibc system or a musl system. If you don't care, and just want the first binary find comes up with (...), do this:

diff --git a/PKGBUILD b/PKGBUILD
index 0bb248c..aa72e99 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,5 +27,6 @@ build() {

 package() {
   cd "opencode-${pkgver}/packages/opencode"
-  install -Dm755 $(find dist/*/bin/opencode) "${pkgdir}/usr/bin/opencode"
+  mkdir -p "${pkgdir}/usr/bin"
+  install -Dm755 $(find dist/*/bin -type f -name opencode -print -quit) "${pkgdir}/usr/bin"
 }

OpenCode version

1.0.72

Steps to reproduce

  1. try to build your PKGBUILD
  2. observe error

Screenshot and/or share link

No response

Operating System

Arch Linux

Terminal

Alacritty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 18, 2025
  2. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Collaborator

    gahhh we will fix this apologies

  3. self-assigned this
    on Nov 18, 2025
  4. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    Okay I made a fix I think it should work I tried getting arch setup and im a dumbass and couldnt test it super well but I adjusted script to handle the musl and glibc stuff.

    Lmk if it fixed it for you @rubin55

  5. rubin55 commented on Nov 20, 2025

    @rubin55
    Author

    @rekram1-node I suppose publish.ts resulting artifacts are a PKGBUILD, but I don't see it in the AUR yet!

  6. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    dumb script bug, fixing, releasing

  7. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    I need to make smoke tests for aur builds

  8. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    Okay released @rubin55

  9. rubin55 commented on Nov 20, 2025

    @rubin55
    Author

    @rekram1-node just tested the AUR build for 1.0.81, success! Thanks a bunch!

  10. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    Yayyy finally

    Okay NO more touching build script XD

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions