Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inconsitent go build tags #1417

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ lint_task:
echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get install -y libbtrfs-dev libdevmapper-dev
test_script: make lint
test_script: make local-validate && make lint


# Update metadata on VM images referenced by this repository state
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ local-test-integration: local-binary ## run the integration tests on the host (r
test-integration: local-binary ## run the integration tests using VMs
$(RUNINVM) $(MAKE) local-$@

local-validate: ## validate DCO and gofmt on the host
local-validate: install.tools ## validate DCO and gofmt on the host
@./hack/git-validation.sh
@./hack/gofmt.sh

Expand Down
1 change: 1 addition & 0 deletions drivers/aufs/mount.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package aufs
Expand Down
1 change: 1 addition & 0 deletions drivers/btrfs/btrfs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package btrfs
Expand Down
1 change: 1 addition & 0 deletions drivers/btrfs/dummy_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux || !cgo
// +build !linux !cgo

package btrfs
1 change: 1 addition & 0 deletions drivers/btrfs/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && !btrfs_noversion && cgo
// +build linux,!btrfs_noversion,cgo

package btrfs
Expand Down
1 change: 1 addition & 0 deletions drivers/btrfs/version_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && !btrfs_noversion
// +build linux,!btrfs_noversion

package btrfs
Expand Down
1 change: 1 addition & 0 deletions drivers/devmapper/devmapper_doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devmapper
Expand Down
1 change: 1 addition & 0 deletions drivers/devmapper/devmapper_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devmapper
Expand Down
1 change: 1 addition & 0 deletions drivers/devmapper/mount.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devmapper
Expand Down
1 change: 1 addition & 0 deletions drivers/driver_solaris.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build solaris && cgo
// +build solaris,cgo

package graphdriver
Expand Down
1 change: 1 addition & 0 deletions drivers/driver_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !windows && !freebsd && !solaris && !darwin
// +build !linux,!windows,!freebsd,!solaris,!darwin

package graphdriver
Expand Down
1 change: 1 addition & 0 deletions drivers/overlay/overlay_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package overlay
Expand Down
1 change: 1 addition & 0 deletions drivers/overlay/overlay_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && !cgo
// +build linux,!cgo

package overlay
Expand Down
1 change: 1 addition & 0 deletions drivers/overlay/overlay_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package overlay
Expand Down
1 change: 1 addition & 0 deletions drivers/register/register_aufs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !exclude_graphdriver_aufs && linux
// +build !exclude_graphdriver_aufs,linux

package register
Expand Down
1 change: 1 addition & 0 deletions drivers/register/register_btrfs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !exclude_graphdriver_btrfs && linux
// +build !exclude_graphdriver_btrfs,linux

package register
Expand Down
1 change: 1 addition & 0 deletions drivers/register/register_devicemapper.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !exclude_graphdriver_devicemapper && linux && cgo
// +build !exclude_graphdriver_devicemapper,linux,cgo

package register
Expand Down
1 change: 1 addition & 0 deletions drivers/register/register_overlay.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !exclude_graphdriver_overlay && linux && cgo
// +build !exclude_graphdriver_overlay,linux,cgo

package register
Expand Down
1 change: 1 addition & 0 deletions drivers/register/register_zfs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (!exclude_graphdriver_zfs && linux) || (!exclude_graphdriver_zfs && freebsd) || solaris
// +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd solaris

package register
Expand Down
1 change: 1 addition & 0 deletions drivers/vfs/copy_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package vfs // import "github.com/containers/storage/drivers/vfs"
Expand Down
1 change: 1 addition & 0 deletions drivers/vfs/vfs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package vfs
Expand Down
1 change: 1 addition & 0 deletions drivers/zfs/zfs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package zfs
Expand Down
8 changes: 2 additions & 6 deletions hack/git-validation.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env bash
export PATH=${GOPATH%%:*}/bin:${PATH}
export GIT_VALIDATION=tests/tools/build/git-validation
if [ ! -x "$GIT_VALIDATION" ]; then
echo git-validation is not installed.
echo Try installing it with \"make install.tools\"
exit 1
fi
if test "$TRAVIS" != true ; then
#GITVALIDATE_EPOCH=":/git-validation epoch"
GITVALIDATE_EPOCH="9b6484f0058d38a1b85d8b0a3e2ca83684d02e8b"
fi
exec "$GIT_VALIDATION" -q -run DCO,short-subject ${GITVALIDATE_EPOCH:+-range "${GITVALIDATE_EPOCH}""..${GITVALIDATE_TIP:-@}"} ${GITVALIDATE_FLAGS}
EPOCH_TEST_COMMIT=$(git merge-base ${DEST_BRANCH:-main} HEAD)
exec "$GIT_VALIDATION" -q -run DCO,short-subject -range "${EPOCH_TEST_COMMIT}..HEAD"
1 change: 1 addition & 0 deletions internal/opts/opts_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package opts
Expand Down
1 change: 1 addition & 0 deletions pkg/archive/archive_110.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package archive
Expand Down
1 change: 1 addition & 0 deletions pkg/archive/archive_19.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.10
// +build !go1.10

package archive
Expand Down
1 change: 1 addition & 0 deletions pkg/archive/archive_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package archive
Expand Down
1 change: 1 addition & 0 deletions pkg/archive/copy_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package archive
Expand Down
1 change: 1 addition & 0 deletions pkg/archive/time_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package archive
Expand Down
1 change: 1 addition & 0 deletions pkg/chrootarchive/chroot_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows && !linux && !darwin
// +build !windows,!linux,!darwin

package chrootarchive
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_log.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_wrapper.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_wrapper_deferred_remove.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo && !libdm_no_deferred_remove
// +build linux,cgo,!libdm_no_deferred_remove

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_wrapper_dynamic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo && !static_build
// +build linux,cgo,!static_build

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo && libdm_no_deferred_remove
// +build linux,cgo,libdm_no_deferred_remove

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/devmapper_wrapper_static.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo && static_build
// +build linux,cgo,static_build

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/devicemapper/ioctl.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package devicemapper
Expand Down
1 change: 1 addition & 0 deletions pkg/dmesg/dmesg_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package dmesg
Expand Down
1 change: 1 addition & 0 deletions pkg/homedir/homedir_others.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !darwin && !freebsd
// +build !linux,!darwin,!freebsd

package homedir
Expand Down
1 change: 1 addition & 0 deletions pkg/idtools/idtools_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux || !libsubid || !cgo
// +build !linux !libsubid !cgo

package idtools
Expand Down
1 change: 1 addition & 0 deletions pkg/idtools/idtools_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package idtools
Expand Down
1 change: 1 addition & 0 deletions pkg/idtools/parser_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package idtools
Expand Down
1 change: 1 addition & 0 deletions pkg/ioutils/fswriters_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package ioutils
Expand Down
1 change: 1 addition & 0 deletions pkg/loopback/attach_loopback.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package loopback
Expand Down
1 change: 1 addition & 0 deletions pkg/loopback/ioctl.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package loopback
Expand Down
1 change: 1 addition & 0 deletions pkg/loopback/loop_wrapper.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package loopback
Expand Down
1 change: 1 addition & 0 deletions pkg/loopback/loopback.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package loopback
Expand Down
1 change: 1 addition & 0 deletions pkg/mount/mount_unix_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package mount
Expand Down
1 change: 1 addition & 0 deletions pkg/mount/unmount_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package mount
Expand Down
1 change: 1 addition & 0 deletions pkg/parsers/kernel/kernel.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Package kernel provides helper function to get, parse and compare kernel
Expand Down
1 change: 1 addition & 0 deletions pkg/parsers/kernel/kernel_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux || freebsd || solaris || openbsd
// +build linux freebsd solaris openbsd

// Package kernel provides helper function to get, parse and compare kernel
Expand Down
1 change: 1 addition & 0 deletions pkg/parsers/kernel/kernel_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package kernel
Expand Down
1 change: 1 addition & 0 deletions pkg/reexec/command_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build freebsd
// +build freebsd

package reexec
Expand Down
1 change: 1 addition & 0 deletions pkg/reexec/command_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package reexec
Expand Down
1 change: 1 addition & 0 deletions pkg/reexec/command_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !windows && !freebsd && !solaris && !darwin
// +build !linux,!windows,!freebsd,!solaris,!darwin

package reexec
Expand Down
1 change: 1 addition & 0 deletions pkg/reexec/command_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package reexec
Expand Down
1 change: 1 addition & 0 deletions pkg/system/chtimes_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/chtimes_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/lcow_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/mknod_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/path_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/path_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/process_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux || freebsd || solaris || darwin
// +build linux freebsd solaris darwin

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/umask.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/umask_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/utimes_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !freebsd
// +build !linux,!freebsd

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/system/xattrs_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux && !darwin
// +build !linux,!darwin

package system
Expand Down
1 change: 1 addition & 0 deletions pkg/unshare/getenv_linux_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package unshare
Expand Down
1 change: 1 addition & 0 deletions pkg/unshare/getenv_linux_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && !cgo
// +build linux,!cgo

package unshare
Expand Down
1 change: 1 addition & 0 deletions pkg/unshare/unshare_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin
// +build darwin

package unshare
Expand Down
1 change: 1 addition & 0 deletions pkg/unshare/unshare_gccgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo && gccgo
// +build linux,cgo,gccgo

package unshare
Expand Down
1 change: 1 addition & 0 deletions tests/tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build tools
// +build tools

package tools
Expand Down