From 76c81a12a7fecda7a6833b6ebe76d487a361b5ee Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Tue, 9 May 2023 15:33:36 +0200 Subject: [PATCH] Add support for FreeBSD --- acceptance/testdata/launcher/exec.d/fd_unix.go | 4 ++-- acceptance/variables_unix.go | 4 ++-- archive/tar_unix.go | 4 ++-- .../extend/kaniko/dockerfile_applier_freebsd.go | 16 ++++++++++++++++ internal/fsutil/os_detection_linux_test.go | 4 ++-- internal/path/defaults_unix.go | 4 ++-- launch/exec_d_unix.go | 4 ++-- launch/launcher_unix.go | 4 ++-- launch/testdata/cmd/execd/fd_unix.go | 4 ++-- launch/testhelpers/syscall_unix.go | 4 ++-- layers/layers_unix_test.go | 4 ++-- priv/sock_unix.go | 4 ++-- testhelpers/vars_linux.go | 4 ++-- 13 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 internal/extend/kaniko/dockerfile_applier_freebsd.go diff --git a/acceptance/testdata/launcher/exec.d/fd_unix.go b/acceptance/testdata/launcher/exec.d/fd_unix.go index f7e84cdb8..eea7d59e9 100644 --- a/acceptance/testdata/launcher/exec.d/fd_unix.go +++ b/acceptance/testdata/launcher/exec.d/fd_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package main diff --git a/acceptance/variables_unix.go b/acceptance/variables_unix.go index 243c1963e..8e794f05b 100644 --- a/acceptance/variables_unix.go +++ b/acceptance/variables_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package acceptance diff --git a/archive/tar_unix.go b/archive/tar_unix.go index a140903f2..b210cd476 100644 --- a/archive/tar_unix.go +++ b/archive/tar_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package archive diff --git a/internal/extend/kaniko/dockerfile_applier_freebsd.go b/internal/extend/kaniko/dockerfile_applier_freebsd.go new file mode 100644 index 000000000..38c2c5170 --- /dev/null +++ b/internal/extend/kaniko/dockerfile_applier_freebsd.go @@ -0,0 +1,16 @@ +//go:build linux + +package kaniko + +package kaniko + +import ( + v1 "github.com/google/go-containerregistry/pkg/v1" + + "github.com/buildpacks/lifecycle/internal/extend" + "github.com/buildpacks/lifecycle/log" +) + +func (a *DockerfileApplier) Apply(dockerfile extend.Dockerfile, toBaseImage v1.Image, withBuildOptions extend.Options, logger log.Logger) (v1.Image, error) { + return nil, nil +} diff --git a/internal/fsutil/os_detection_linux_test.go b/internal/fsutil/os_detection_linux_test.go index 9cf1ffcb2..2b6ee6d3c 100644 --- a/internal/fsutil/os_detection_linux_test.go +++ b/internal/fsutil/os_detection_linux_test.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux || freebsd +// +build linux freebsd package fsutil_test diff --git a/internal/path/defaults_unix.go b/internal/path/defaults_unix.go index 50c3815dd..be626f31a 100644 --- a/internal/path/defaults_unix.go +++ b/internal/path/defaults_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package path diff --git a/launch/exec_d_unix.go b/launch/exec_d_unix.go index a71af4a24..a50eaaf45 100644 --- a/launch/exec_d_unix.go +++ b/launch/exec_d_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package launch diff --git a/launch/launcher_unix.go b/launch/launcher_unix.go index b547a9a40..e86034f77 100644 --- a/launch/launcher_unix.go +++ b/launch/launcher_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package launch diff --git a/launch/testdata/cmd/execd/fd_unix.go b/launch/testdata/cmd/execd/fd_unix.go index f7e84cdb8..eea7d59e9 100644 --- a/launch/testdata/cmd/execd/fd_unix.go +++ b/launch/testdata/cmd/execd/fd_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package main diff --git a/launch/testhelpers/syscall_unix.go b/launch/testhelpers/syscall_unix.go index c5b74923f..e6ff333f4 100644 --- a/launch/testhelpers/syscall_unix.go +++ b/launch/testhelpers/syscall_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package testhelpers diff --git a/layers/layers_unix_test.go b/layers/layers_unix_test.go index f97892127..36ee5cbed 100644 --- a/layers/layers_unix_test.go +++ b/layers/layers_unix_test.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package layers_test diff --git a/priv/sock_unix.go b/priv/sock_unix.go index cee7f3f7b..0549ed18d 100644 --- a/priv/sock_unix.go +++ b/priv/sock_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package priv diff --git a/testhelpers/vars_linux.go b/testhelpers/vars_linux.go index a284c4306..a3347844f 100644 --- a/testhelpers/vars_linux.go +++ b/testhelpers/vars_linux.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux || freebsd +// +build linux freebsd package testhelpers