Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • stork stork
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 198
    • Issues 198
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • storkstork
  • Issues
  • #490

Closed
Open
Created Feb 25, 2021 by Marcin Siodelski@marcinMaintainer

Make building packages in docker portable

The issue was described in !267 (comment 195252). It appears that building packges in docker on a host with macOS doesn't work. It may also fail on some other platforms but I didn't check. The issue is that the packages are built in Docker by a non-root user and that the user can't access the home directory, because it is owned by root. The home directory is the GOPATH and GOCACHE directory where the user must have writing permissions. I think this issue may not occur on Ubuntu because the tools built on the host are used instead and certain packages don't need to be rebuilt.

I propose the following fix:

diff --git a/Rakefile b/Rakefile
index cac6579..5a0d93a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -810,7 +810,7 @@ def run_bld_pkg_in_dkr(dkr_image, pkg_type, side)
   cmd +=      " && tar -C /tmp/build -zxvf /home/$USER/stork-#{TIMESTAMP}.tar.gz"
   cmd +=      " && cp /home/$USER/isc-stork-agent* /tmp/build"
   cmd +=      "  ; cd /tmp/build"
-  cmd +=      " && rake build_pkg pkg=#{pkg_type}_#{side} STORK_BUILD_TIMESTAMP=#{TIMESTAMP}"
+  cmd +=      " && rake build_pkg pkg=#{pkg_type}_#{side} STORK_BUILD_TIMESTAMP=#{TIMESTAMP} GOPATH=/tmp/build/go GOCACHE=/tmp/build/.cache/"
   cmd +=      " && mv isc-stork* /home/$USER"
   cmd +=      " && ls -al /home/$USER/"
   cmd +=      "\""
Assignee
Assign to
Time tracking