Skip to content

Conversation

@ExplodingDragon
Copy link

@ExplodingDragon ExplodingDragon commented Nov 5, 2025

Gitea now uses pnpm for project compilation. Since the current environment does not support pnpm, we are using the prebuilt packages provided in Gitea's releases.

closes #27054

@TomJo2000
Copy link
Member

This most likely won't be sufficient to update the gitea package.
There is currently an open auto update issue open for it.

@ExplodingDragon
Copy link
Author

This most likely won't be sufficient to update the gitea package. There is currently an open auto update issue open for it.

* [Auto update failing for gitea #27054](https://github.com/termux/termux-packages/issues/27054)

@TomJo2000 The current environment is incompatible with pnpm compilation. Therefore, I leveraged the pre-built frontend package provided by Gitea as the source package, and the issue has now been resolved.

@TomJo2000
Copy link
Member

I don't think that's a workable solution for us.
But I'd like to get a second opinion on that.

@ExplodingDragon
Copy link
Author

I don't think that's a workable solution for us. But I'd like to get a second opinion on that.

@TomJo2000 Gitea switched from npm to pnpm in go-gitea/gitea#35274. The termux_setup_nodejs script does not initialize the pnpm executable, which causes the build to fail.

However, since Termux does not involve any frontend changes, it may be possible to skip the frontend compilation to save time. The pre-built frontend packages provided by Gitea are signed and do not pose a supply chain attack risk.

An optional solution is to add support for initializing pnpm in termux_setup_nodejs.

cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/code.gitea.io/gitea

(cd "$TERMUX_PKG_SRCDIR" && npm install pnpm)
export PATH="$TERMUX_PKG_SRCDIR/node_modules/.bin:$PATH"
Copy link
Member

Choose a reason for hiding this comment

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

If you want to use these commands in termux_step_make() instead of termux_step_pre_configure() (where I tested them), you could probably also write them like this instead:

npm install pnpm
export PATH="$TERMUX_PKG_BUILDDIR/node_modules/.bin:$PATH"

however it doesn't really matter, I think either way is fine.

Copy link
Author

@ExplodingDragon ExplodingDragon Nov 5, 2025

Choose a reason for hiding this comment

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

@robertkirkman This can be considered a quick fix for now. Adding proper support for pnpm in a subsequent update would indeed be a better long-term solution. Thank you for the reminder.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, what more would a termux_setup_pnpm need to do?
Maybe put pnpm in a "more proper" location?

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

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

Thanks for the assist Robert.

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.

Auto update failing for gitea

3 participants