Skip to content

Commit

Permalink
debian/rules: set HOME to support go builds
Browse files Browse the repository at this point in the history
Since go requires GOCACHE be set and the default ($HOME/.go-cache) will
cause a build failure with sbuild, we must ensure that GOCACHE points
somewhere defined and writable during the debuild.  Setting $HOME to
$(CURDIR) is a default solution to this problem for some such packages:

     https://lists.debian.org/debian-mentors/2018/08/msg00003.html

Signed-off-by: Joe MacDonald <[email protected]>
  • Loading branch information
jjmcdn committed Jul 14, 2023
1 parent a3d06c0 commit fe80322
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
k3s (1.27.2+k3s1+mel4) UNRELEASED; urgency=medium

* set HOME in rules to allow successful go builds

-- Joe MacDonald <[email protected]> Fri, 14 Jul 2023 16:06:00 -0400

k3s (1.27.2+k3s1+mel3) UNRELEASED; urgency=medium

* Add git to Build-Depends since debian/source/format requires it
Expand Down
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# make debhelper commands more verbose
# export DH_OPTIONS = -v
export USE_DAPPER ?= 0
# set HOME since go requires GOCACHE be set and the default ($HOME/.go-cache)
# will cause a build failure with sbuild. Setting $HOME to $(CURDIR) is a
# default solution to this problem for some packages:
# https://lists.debian.org/debian-mentors/2018/08/msg00003.html
export HOME = $(CURDIR)

%:
dh $@
Expand Down

0 comments on commit fe80322

Please sign in to comment.