Packaging all dependencies #4401

Closed
opened 2025-11-02 05:49:27 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @berolinux on GitHub (Nov 27, 2019).

With gitea prior to 1.10.0, it was possible to get/tar up all dependencies (important for packaging in an OS distro) using

export GOPATH=pwd/.godeps
TAGS="bindata sqlite sqlite_unlock_notify pam" make generate build
tar cJf godeps-for-gitea-%{version}.tar.xz .godeps

and then build gitea without downloading external dependencies (build boxes for most distros refuse to download anything during the build process to make 100% sure users get exactly what distro devs have seen) by unpacking the godeps-for-gitea tarball and setting GOPATH=pwd/.godeps inside the gitea source.

With 1.10.0, due to the use of GO111MODULES, this is no longer possible - is there an alternative mechanism to build from source without downloading external dependencies?

Originally created by @berolinux on GitHub (Nov 27, 2019). With gitea prior to 1.10.0, it was possible to get/tar up all dependencies (important for packaging in an OS distro) using export GOPATH=`pwd`/.godeps TAGS="bindata sqlite sqlite_unlock_notify pam" make generate build tar cJf godeps-for-gitea-%{version}.tar.xz .godeps and then build gitea without downloading external dependencies (build boxes for most distros refuse to download anything during the build process to make 100% sure users get exactly what distro devs have seen) by unpacking the godeps-for-gitea tarball and setting GOPATH=`pwd`/.godeps inside the gitea source. With 1.10.0, due to the use of GO111MODULES, this is no longer possible - is there an alternative mechanism to build from source without downloading external dependencies?
Author
Owner

@lunny commented on GitHub (Nov 27, 2019):

@berolinux we use go mod with vendor. All dependencies are stored on vendor directory.

@lunny commented on GitHub (Nov 27, 2019): @berolinux we use go mod with vendor. All dependencies are stored on vendor directory.
Author
Owner

@sapk commented on GitHub (Nov 27, 2019):

You simply need to add the flag -mod=vendor to your command lines (like in makefile).

I will close this issue as I think it has been answered. Feel free to re-open it if you need more information.

@sapk commented on GitHub (Nov 27, 2019): You simply need to add the flag `-mod=vendor` to your command lines (like in makefile). I will close this issue as I think it has been answered. Feel free to re-open it if you need more information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4401