Skip to content

Build setup of 1.11.0, use of npm #10253

@stblassitude

Description

@stblassitude
  • Gitea version (or commit ref):1.11.0
  • Git version:
  • Operating system: FreeBSD
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm the maintainer for the FreeBSD port of Gitea, allowing FreeBSD users to simply pkg install gitea.

It seems that with 1.11.0, the CSS and JS files are not included pre-built in the repo anymore, but are built during the Gitea build process, requiring the use of npm install, including network access to download almost a thousand node modules.

The FreeBSD package build system does not allow network access during the build phase; all required files need to be downloaded first using a build-system specific download mechanism from pre-recorded URLs. Among other aspects, this allows the build system to verify cryptographic checksums on files downloaded from potentially unreliable mirrors for source packages.

The FreeBSD ports/package system currently contains no provisions to handle npm install as part of a package build.

This means that with the current state, no FreeBSD package of Gitea 1.11.0 can be produced.

Would you consider adding ./node_modules to the source archive for releases, or provide a single file archive for download of it (matching the release), so that the necessary node modules can be made available to package builds without the necessity to run npm install? I don't think it's necessary to add the directory to the Git repo, only make it part of the release tar.gz. I see this as similar to the vendoring of Go modules.

I have a suspicion that other OS/distributions might have similar restrictions on files that are used during package builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/buildPR changes how Gitea is built, i.e. regarding Docker or the Makefile

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions