diff --git a/frontend/deb/distro/container.go b/frontend/deb/distro/container.go index 6340c649d..d3ad97792 100644 --- a/frontend/deb/distro/container.go +++ b/frontend/deb/distro/container.go @@ -38,6 +38,7 @@ func (c *Config) BuildContainer(worker llb.State, sOpt dalec.SourceOpts, client withRepos, llb.AddEnv("DEBIAN_FRONTEND", "noninteractive"), dalec.WithMountedAptCache(c.AptCachePrefix), + // This file makes dpkg give more verbose output which can be useful when things go awry. llb.AddMount("/etc/dpkg/dpkg.cfg.d/99-dalec-debug", debug, llb.SourcePath("debug"), llb.Readonly), dalec.RunOptFunc(func(cfg *llb.ExecInfo) { tmp := llb.Scratch().File(llb.Mkfile("tmp", 0o644, nil), opts...) diff --git a/frontend/deb/distro/distro.go b/frontend/deb/distro/distro.go index e6e57f9f7..9e41efe01 100644 --- a/frontend/deb/distro/distro.go +++ b/frontend/deb/distro/distro.go @@ -14,6 +14,14 @@ import ( "github.com/pkg/errors" ) +var ( + defaultRepoConfig = &dalec.RepoPlatformConfig{ + ConfigRoot: "/etc/apt/sources.list.d", + GPGKeyRoot: "/usr/share/keyrings", + ConfigExt: ".list", + } +) + type Config struct { ImageRef string ContextRef string @@ -64,11 +72,7 @@ func (cfg *Config) RepoMounts(repos []dalec.PackageRepositoryConfig, sOpt dalec. repoConfig := cfg.RepoPlatformConfig if repoConfig == nil { - repoConfig = &dalec.RepoPlatformConfig{ - ConfigRoot: "/etc/apt/sources.list.d", - GPGKeyRoot: "/usr/share/keyrings", - ConfigExt: ".list", - } + repoConfig = defaultRepoConfig } withRepos, err := dalec.WithRepoConfigs(repos, repoConfig, sOpt, opts...) diff --git a/frontend/deb/distro/install.go b/frontend/deb/distro/install.go index a77da4fbd..6e777e754 100644 --- a/frontend/deb/distro/install.go +++ b/frontend/deb/distro/install.go @@ -75,7 +75,7 @@ apt autoclean -y apt update -if ! command -v apititude > /dev/null; then +if ! command -v aptitude > /dev/null; then needs_cleanup=1 apt install -y aptitude fi @@ -131,7 +131,7 @@ func (d *Config) InstallBuildDeps(sOpt dalec.SourceOpts, spec *dalec.Spec, targe } return in.Async(func(ctx context.Context, in llb.State, c *llb.Constraints) (llb.State, error) { - opts := append(opts, dalec.ProgressGroup("Insall build dependencies")) + opts := append(opts, dalec.ProgressGroup("Install build dependencies")) opts = append([]llb.ConstraintsOpt{dalec.WithConstraint(c)}, opts...) srcPkg, err := deb.SourcePackage(sOpt, in, depsSpec, targetKey, "", opts...)