diff --git a/acceptance/testdata/launcher/exec.d/fd_unix.go b/acceptance/testdata/launcher/exec.d/fd_unix.go index f7e84cdb8..cc7cef329 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package main diff --git a/acceptance/variables_unix.go b/acceptance/variables_unix.go index 243c1963e..a92644272 100644 --- a/acceptance/variables_unix.go +++ b/acceptance/variables_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package acceptance diff --git a/archive/tar_unix.go b/archive/tar_unix.go index a140903f2..68f4021d3 100644 --- a/archive/tar_unix.go +++ b/archive/tar_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package archive diff --git a/internal/extend/kaniko/dockerfile_applier_others.go b/internal/extend/kaniko/dockerfile_applier_others.go new file mode 100644 index 000000000..3793c3060 --- /dev/null +++ b/internal/extend/kaniko/dockerfile_applier_others.go @@ -0,0 +1,15 @@ +//go:build aix || dragonfly || freebsd || netbsd || openbsd || solaris || zos +// +build aix dragonfly freebsd netbsd openbsd solaris zos + +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_freebsd_test.go b/internal/fsutil/os_detection_freebsd_test.go new file mode 100644 index 000000000..965abbe10 --- /dev/null +++ b/internal/fsutil/os_detection_freebsd_test.go @@ -0,0 +1,31 @@ +//go:build freebsd +// +build freebsd + +package fsutil_test + +import ( + "testing" + + "github.com/buildpacks/lifecycle/internal/fsutil" + h "github.com/buildpacks/lifecycle/testhelpers" + + "github.com/sclevine/spec" + "github.com/sclevine/spec/report" +) + +func TestDetectorUnix(t *testing.T) { + spec.Run(t, "DetectorUnix", testDetectorUnix, spec.Report(report.Terminal{})) +} + +func testDetectorUnix(t *testing.T, when spec.G, it spec.S) { + when("we should have a file", func() { + it("returns true correctly", func() { + h.AssertEq(t, (&fsutil.Detect{}).HasSystemdFile(), true) + }) + it("returns the file contents", func() { + s, err := (&fsutil.Detect{}).ReadSystemdFile() + h.AssertNil(t, err) + h.AssertStringContains(t, s, "NAME") + }) + }) +} diff --git a/internal/fsutil/os_detection_notlinux_test.go b/internal/fsutil/os_detection_others_test.go similarity index 78% rename from internal/fsutil/os_detection_notlinux_test.go rename to internal/fsutil/os_detection_others_test.go index 3eb643a85..11183c5ad 100644 --- a/internal/fsutil/os_detection_notlinux_test.go +++ b/internal/fsutil/os_detection_others_test.go @@ -1,5 +1,5 @@ -//go:build windows || darwin -// +build windows darwin +//go:build windows || aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build windows aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package fsutil_test diff --git a/internal/path/defaults_unix.go b/internal/path/defaults_unix.go index 50c3815dd..bfd6fef5b 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package path diff --git a/launch/exec_d_unix.go b/launch/exec_d_unix.go index a71af4a24..ce6b5e476 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package launch diff --git a/launch/launcher_unix.go b/launch/launcher_unix.go index b547a9a40..0a115d90a 100644 --- a/launch/launcher_unix.go +++ b/launch/launcher_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package launch diff --git a/launch/testdata/cmd/execd/fd_unix.go b/launch/testdata/cmd/execd/fd_unix.go index f7e84cdb8..cc7cef329 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package main diff --git a/launch/testhelpers/syscall_unix.go b/launch/testhelpers/syscall_unix.go index c5b74923f..d9a08af70 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package testhelpers diff --git a/layers/layers_unix_test.go b/layers/layers_unix_test.go index f97892127..34546415f 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 aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package layers_test diff --git a/priv/sock_unix.go b/priv/sock_unix.go index cee7f3f7b..4bd71c5ee 100644 --- a/priv/sock_unix.go +++ b/priv/sock_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package priv diff --git a/testhelpers/vars_linux.go b/testhelpers/vars_unix.go similarity index 78% rename from testhelpers/vars_linux.go rename to testhelpers/vars_unix.go index a284c4306..435f89ea6 100644 --- a/testhelpers/vars_linux.go +++ b/testhelpers/vars_unix.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix dragonfly freebsd linux netbsd openbsd solaris zos package testhelpers