diff --git a/pkg/config/config.go b/pkg/config/config.go index b0f4287c0..358f92536 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -39,6 +39,7 @@ import ( "github.com/joho/godotenv" "gopkg.in/yaml.v3" + "chainguard.dev/melange/pkg/container" "chainguard.dev/melange/pkg/util" ) @@ -971,6 +972,7 @@ func buildConfigMap(cfg *Configuration) map[string]string { SubstitutionPackageDescription: cfg.Package.Description, SubstitutionPackageEpoch: strconv.FormatUint(cfg.Package.Epoch, 10), SubstitutionPackageFullVersion: fmt.Sprintf("%s-r%d", cfg.Package.Version, cfg.Package.Epoch), + SubstitutionPackageSrcdir: container.DefaultWorkspaceDir, } for k, v := range cfg.Vars { @@ -1378,8 +1380,8 @@ func ParseConfiguration(_ context.Context, configurationFilePath string, opts .. } const ( - defaultEnvVarHOME = "/home/build" - defaultEnvVarGOPATH = "/home/build/.cache/go" + defaultEnvVarHOME = container.DefaultWorkspaceDir + defaultEnvVarGOPATH = container.DefaultWorkspaceDir + "/.cache/go" defaultEnvVarGOMODCACHE = "/var/cache/melange/gomodcache" )