summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/system/service_abi.go13
-rw-r--r--docs/source/markdown/podman-build.1.md4
-rw-r--r--go.mod4
-rw-r--r--go.sum7
-rwxr-xr-xhack/buildah-vendor-treadmill582
-rw-r--r--libpod/events.go2
-rw-r--r--libpod/events/logfile.go4
-rw-r--r--pkg/api/server/server.go14
-rw-r--r--test/e2e/common_test.go2
-rw-r--r--vendor/github.com/containers/common/libimage/copier.go16
-rw-r--r--vendor/github.com/containers/common/libimage/image_config.go4
-rw-r--r--vendor/github.com/containers/common/libimage/inspect.go1
-rw-r--r--vendor/github.com/containers/common/libimage/manifests/copy.go16
-rw-r--r--vendor/github.com/containers/common/libimage/manifests/manifests.go10
-rw-r--r--vendor/github.com/containers/common/libimage/runtime.go2
-rw-r--r--vendor/github.com/containers/common/libimage/save.go1
-rw-r--r--vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go28
-rw-r--r--vendor/github.com/containers/common/libnetwork/cni/config.go1
-rw-r--r--vendor/github.com/containers/common/libnetwork/internal/util/util.go1
-rw-r--r--vendor/github.com/containers/common/libnetwork/netavark/config.go1
-rw-r--r--vendor/github.com/containers/common/libnetwork/netavark/ipam.go4
-rw-r--r--vendor/github.com/containers/common/libnetwork/netavark/network.go4
-rw-r--r--vendor/github.com/containers/common/libnetwork/network/interface.go3
-rw-r--r--vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go1
-rw-r--r--vendor/github.com/containers/common/pkg/cgroups/blkio.go3
-rw-r--r--vendor/github.com/containers/common/pkg/cgroups/cgroups.go12
-rw-r--r--vendor/github.com/containers/common/pkg/cgroups/cpu.go3
-rw-r--r--vendor/github.com/containers/common/pkg/cgroups/cpuset.go5
-rw-r--r--vendor/github.com/containers/common/pkg/cgroups/pids.go5
-rw-r--r--vendor/github.com/containers/common/pkg/chown/chown_unix.go1
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go43
-rw-r--r--vendor/github.com/containers/common/pkg/config/containers.conf12
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go15
-rw-r--r--vendor/github.com/containers/common/pkg/config/systemd.go2
-rw-r--r--vendor/github.com/containers/common/pkg/manifests/manifests.go30
-rw-r--r--vendor/github.com/containers/common/pkg/netns/netns_linux.go2
-rw-r--r--vendor/github.com/containers/common/pkg/parse/parse.go2
-rw-r--r--vendor/github.com/containers/common/pkg/report/template.go4
-rw-r--r--vendor/github.com/containers/common/pkg/seccomp/seccomp_linux.go2
-rw-r--r--vendor/github.com/containers/common/pkg/secrets/filedriver/filedriver.go6
-rw-r--r--vendor/github.com/containers/common/pkg/secrets/secrets.go3
-rw-r--r--vendor/github.com/containers/common/pkg/secrets/secretsdb.go4
-rw-r--r--vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go3
-rw-r--r--vendor/github.com/containers/common/pkg/sysinfo/sysinfo_solaris.go6
-rw-r--r--vendor/github.com/containers/common/pkg/timetype/timestamp.go11
-rw-r--r--vendor/github.com/containers/common/pkg/umask/umask_unix.go4
-rw-r--r--vendor/github.com/containers/common/pkg/util/util_supported.go10
-rw-r--r--vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md17
-rw-r--r--vendor/github.com/fsnotify/fsnotify/README.md24
-rw-r--r--vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go36
-rw-r--r--vendor/github.com/fsnotify/fsnotify/go.mod2
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify.go13
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify_poller.go1
-rw-r--r--vendor/github.com/fsnotify/fsnotify/kqueue.go13
-rw-r--r--vendor/github.com/fsnotify/fsnotify/windows.go28
-rw-r--r--vendor/modules.txt4
56 files changed, 855 insertions, 196 deletions
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index d6b42ed29..f8abea3aa 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -23,7 +23,7 @@ import (
func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities.ServiceOptions) error {
var (
- listener *net.Listener
+ listener net.Listener
err error
)
@@ -44,17 +44,15 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
// If it is activated by systemd, use the first LISTEN_FD (3)
// instead of opening the socket file.
f := os.NewFile(uintptr(3), "podman.sock")
- l, err := net.FileListener(f)
+ listener, err = net.FileListener(f)
if err != nil {
return err
}
- listener = &l
} else {
- l, err := net.Listen(uri.Scheme, path)
+ listener, err = net.Listen(uri.Scheme, path)
if err != nil {
return errors.Wrapf(err, "unable to create socket")
}
- listener = &l
}
case "tcp":
host := uri.Host
@@ -62,11 +60,10 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
// For backward compatibility, support "tcp:<host>:<port>" and "tcp://<host>:<port>"
host = uri.Opaque
}
- l, err := net.Listen(uri.Scheme, host)
+ listener, err = net.Listen(uri.Scheme, host)
if err != nil {
return errors.Wrapf(err, "unable to create socket %v", host)
}
- listener = &l
default:
logrus.Debugf("Attempting API Service endpoint scheme %q", uri.Scheme)
}
@@ -101,7 +98,7 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
err = server.Serve()
if listener != nil {
- _ = (*listener).Close()
+ _ = listener.Close()
}
return err
}
diff --git a/docs/source/markdown/podman-build.1.md b/docs/source/markdown/podman-build.1.md
index 03ff88aeb..1080581d7 100644
--- a/docs/source/markdown/podman-build.1.md
+++ b/docs/source/markdown/podman-build.1.md
@@ -495,6 +495,10 @@ If the pull option is set to `always` (with *--pull=always*),
pull the image from the first registry it is found in as listed in registries.conf.
Raise an error if not found in the registries, even if the image is present locally.
+If the pull option is set to `missing` (with *--pull=missing*),
+Pull the image only if it is not present in the local storage. Raise an error if it
+could neither be found in the local storage or on a registry.
+
If the pull option is set to `never` (with *--pull=never*),
Do not pull the image from the registry, use only the local version. Raise an error
if the image is not present locally.
diff --git a/go.mod b/go.mod
index a26db3de1..fcc1949fa 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@ require (
github.com/containernetworking/cni v1.0.1
github.com/containernetworking/plugins v1.1.1
github.com/containers/buildah v1.25.2-0.20220406205807-5b8e79118057
- github.com/containers/common v0.47.5-0.20220413182852-c23a4e11f91b
+ github.com/containers/common v0.47.5-0.20220421072908-49f1a40067b2
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.21.1-0.20220405081457-d1b64686e1d0
github.com/containers/ocicrypt v1.1.3
@@ -29,7 +29,7 @@ require (
github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651
github.com/docker/go-units v0.4.0
github.com/dtylman/scp v0.0.0-20181017070807-f3000a34aef4
- github.com/fsnotify/fsnotify v1.5.1
+ github.com/fsnotify/fsnotify v1.5.2
github.com/ghodss/yaml v1.0.0
github.com/godbus/dbus/v5 v5.1.0
github.com/google/gofuzz v1.2.0
diff --git a/go.sum b/go.sum
index ae5e486e4..a2a119dc4 100644
--- a/go.sum
+++ b/go.sum
@@ -356,8 +356,8 @@ github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19
github.com/containers/buildah v1.25.2-0.20220406205807-5b8e79118057 h1:lKSxhMBpcHyyQrj2QJYzcm56uiSeibRdSL2KoppF6rg=
github.com/containers/buildah v1.25.2-0.20220406205807-5b8e79118057/go.mod h1:iSoopbYRb6K4b5c3hXgXNkGTI/T085t2+XiGjceud94=
github.com/containers/common v0.47.5-0.20220331143923-5f14ec785c18/go.mod h1:Vr2Fn6EdzD6JNAbz8L8bTv3uWLv2p31Ih2O3EAK6Hyc=
-github.com/containers/common v0.47.5-0.20220413182852-c23a4e11f91b h1:HVOojcjTGPke7oOh1T/Wj67DK74LBJOR6qU5uW+33zk=
-github.com/containers/common v0.47.5-0.20220413182852-c23a4e11f91b/go.mod h1:nRW9288gdZqIGoRwoV23i3qO7Zznbd34sdDOBnq2GjY=
+github.com/containers/common v0.47.5-0.20220421072908-49f1a40067b2 h1:NadhQUF7FRaZkDeW7xDcU3nxk7kV6b2yRmwGWDp+BNY=
+github.com/containers/common v0.47.5-0.20220421072908-49f1a40067b2/go.mod h1:BBq6jdyjXvJh69YzQPvIuZjBho0MRdA0XGaqBnsO+1Y=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/image/v5 v5.19.2-0.20220224100137-1045fb70b094/go.mod h1:XoYK6kE0dpazFNcuS+a8lra+QfbC6s8tzv+cUuCrZpE=
@@ -511,8 +511,9 @@ github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fsnotify/fsnotify v1.5.2 h1:M+aHumjFDOySyAjWICQHrDfuizRTP7nzkRHxXfyRP68=
+github.com/fsnotify/fsnotify v1.5.2/go.mod h1:VKyWoa5earkjWzuYFJOy3s0DLrlWgSh5nf5hjFuJcAw=
github.com/fsouza/go-dockerclient v1.7.7/go.mod h1:njNCXvoZj3sLPjf3yO0DPHf1mdLdCPDYPc14GskKA4Y=
github.com/fsouza/go-dockerclient v1.7.10 h1:KIda66AP88BWQpyg+8ve9LQmn1ZZ/usCbmxeBoMth3U=
github.com/fsouza/go-dockerclient v1.7.10/go.mod h1:rdD3Eq3rHwMA8p/xrn+gLb+3ov7uRJGVkV1HsUFY39A=
diff --git a/hack/buildah-vendor-treadmill b/hack/buildah-vendor-treadmill
new file mode 100755
index 000000000..1feffaa60
--- /dev/null
+++ b/hack/buildah-vendor-treadmill
@@ -0,0 +1,582 @@
+#!/usr/bin/perl
+#
+# buildah-vendor-treadmill - daily vendor of latest-buildah onto latest-podman
+#
+package Podman::BuildahVendorTreadmill;
+
+use v5.14;
+use utf8;
+use open qw( :encoding(UTF-8) :std );
+
+use strict;
+use warnings;
+
+use File::Temp qw(tempfile);
+use JSON;
+use LWP::UserAgent;
+
+(our $ME = $0) =~ s|.*/||;
+our $VERSION = '0.1';
+
+# For debugging, show data structures using DumpTree($var)
+#use Data::TreeDumper; $Data::TreeDumper::Displayaddress = 0;
+
+###############################################################################
+# BEGIN user-customizable section
+
+# github path to buildah
+our $Buildah = 'github.com/containers/buildah';
+
+# FIXME FIXME FIXME: add 'main'? I hope we never need this script for branches.
+our $Treadmill_PR_Title = 'DO NOT MERGE: buildah vendor treadmill';
+
+our $API_URL = 'https://api.github.com/graphql';
+
+# Use colors if available and if stdout is a tty
+our $Highlight = '';
+our $Reset = '';
+eval '
+ use Term::ANSIColor;
+ if (-t 1) {
+ $Highlight = color("green");
+ $Reset = color("reset");
+ }
+ $SIG{__WARN__} = sub { print STDERR color("bold red"), "@_", $Reset; };
+
+';
+
+# END user-customizable section
+###############################################################################
+
+###############################################################################
+# BEGIN boilerplate args checking, usage messages
+
+sub usage {
+ print <<"END_USAGE";
+Usage: $ME [OPTIONS] [--sync | --pick ]
+
+$ME is (2022-04-20) **EXPERIMENTAL**
+
+$ME is intended to solve the problem of vendoring
+buildah into podman.
+
+Call me with one of two options:
+
+ --sync The usual case. Mostly used by Ed. Called from a
+ development branch, this just updates everything so
+ we vendor in latest-buildah (main) on top of
+ latest-podman (main). With a few sanity checks.
+
+ --pick Used for really-truly vendoring in a new buildah; will
+ cherry-pick a commit on your buildah-vendor working branch
+
+For latest documentation and best practices, please see:
+
+ https://github.com/containers/podman/wiki/Buildah-Vendor-Treadmill
+
+OPTIONS:
+
+ --help display this message
+ --version display program name and version
+END_USAGE
+
+ exit;
+}
+
+# Command-line options. Note that this operates directly on @ARGV !
+our %action;
+our $debug = 0;
+our $force = 0;
+our $verbose = 0;
+our $NOT = ''; # print "blahing the blah$NOT\n" if $debug
+sub handle_opts {
+ use Getopt::Long;
+ GetOptions(
+ 'sync' => sub { $action{sync}++ },
+ 'pick' => sub { $action{pick}++ },
+
+ 'debug!' => \$debug,
+ 'dry-run|n!' => sub { $NOT = ' [NOT]' },
+ 'force' => \$force,
+ 'verbose|v' => \$verbose,
+
+ help => \&usage,
+ version => sub { print "$ME version $VERSION\n"; exit 0 },
+ ) or die "Try `$ME --help' for help\n";
+}
+
+# END boilerplate args checking, usage messages
+###############################################################################
+
+############################## CODE BEGINS HERE ###############################
+
+# The term is "modulino".
+__PACKAGE__->main() unless caller();
+
+# Main code.
+sub main {
+ # Note that we operate directly on @ARGV, not on function parameters.
+ # This is deliberate: it's because Getopt::Long only operates on @ARGV
+ # and there's no clean way to make it use @_.
+ handle_opts(); # will set package globals
+
+ # Fetch command-line arguments. Barf if too many.
+ # FIXME: if called with arg, that's the --sync branch?
+ # FIXME: if called with --pick + arg, that's the PR?
+ die "$ME: Too many arguments; try $ME --help\n" if @ARGV;
+
+ my @action = keys(%action);
+ die "$ME: Please invoke me with one of --sync or --pick\n"
+ if ! @action;
+ die "$ME: Please invoke me with ONLY one of --sync or --pick\n"
+ if @action > 1;
+
+ my $handler = __PACKAGE__->can("do_@action")
+ or die "$ME: No handler available for --@action\n";
+
+ # We've validated the command-line args. Before running action, check
+ # that repo is clean. None of our actions can be run on a dirty repo.
+ assert_clean_repo();
+
+ $handler->();
+}
+
+###############################################################################
+# BEGIN sync and its helpers
+
+sub do_sync {
+ # Preserve current branch name, so we can come back after switching to main
+ my $current_branch = git_current_branch();
+
+ my $buildah_old = vendored_buildah();
+ print "-> buildah old = $buildah_old\n";
+
+ # If HEAD is a buildah-vendor commit (usual case), drop it now.
+ if (head_is_buildah_vendor_commit()) {
+ if (is_treadmill_commit('HEAD^')) {
+ progress("HEAD is buildah vendor (as expected); dropping it...");
+ git('reset', '--hard', 'HEAD^');
+ }
+ else {
+ die "$ME: HEAD is a buildah commit, but HEAD^ is not a treadmill commit! Cannot continue.\n";
+ }
+ }
+ # HEAD must now be a treadmill commit
+ is_treadmill_commit('HEAD')
+ or die "$ME: HEAD is not a treadmill commit!\n";
+
+ # HEAD is now a change to buildah-tests. Now update main and rebase.
+ pull_main();
+ git('checkout', '-q', $current_branch);
+ my $forkpoint = git('merge-base', '--fork-point', 'main');
+ my $main_commit = git('rev-parse', 'main');
+ my $rebased;
+ if ($forkpoint eq $main_commit) {
+ progress("[Already rebased on podman main]");
+ }
+ else {
+ # --empty=keep may be needed after a --pick commit, when we've
+ # vendored a new buildah into podman and incorporated the treadmill
+ # commit. Since this is a perpetual-motion workflow, in which we
+ # keep an in-progress PR open at all times, we need a baseline
+ # commit even if it's empty.
+ progress("Rebasing on podman main...");
+ git('rebase', '--empty=keep', 'main');
+ # FIXME: rebase can fail after --pick. If it does, offer instructions.
+ $rebased = 1;
+ }
+
+ # We're now back on our treadmill branch, with one commit on top of main.
+ # Now vendor in latest buildah.
+ progress("Vendoring in buildah...");
+ system('go', 'mod', 'edit', '--require' => "${Buildah}\@main") == 0
+ or die "$ME: go mod edit failed\n";
+ system('make', 'vendor') == 0
+ or die "$ME: make vendor failed\n";
+ my $buildah_new = vendored_buildah();
+ print "-> buildah new = $buildah_new\n";
+ git('commit', '-as', '-m', <<"END_COMMIT_MESSAGE");
+[DO NOT MERGE] vendor in buildah \@ $buildah_new
+
+This is a JUNK COMMIT from $ME v$VERSION.
+
+DO NOT MERGE. This is just a way to keep the buildah-podman
+vendoring in sync. See script --help for details.
+END_COMMIT_MESSAGE
+
+ # if buildah is unchanged, and we did not pull main, exit cleanly
+ my $change_message = '';
+ if ($buildah_new eq $buildah_old) {
+ if (! $rebased) {
+ progress("Nothing has changed (same buildah, same podman). Bye!");
+ exit 0;
+ }
+ $change_message = "Podman has bumped, but Buildah is unchanged. There's probably not much point to testing this.";
+ }
+ else {
+ my $samenew = ($rebased ? 'new' : 'same');
+ $change_message = "New buildah, $samenew podman. Good candidate for pushing.";
+ }
+ progress($change_message);
+
+ build_and_check_podman();
+
+ progress("All OK. It's now up to you to 'git push --force'");
+ progress(" --- Reminder: $change_message");
+}
+
+#########################
+# is_treadmill_commit # ARG (HEAD or HEAD^) commit message =~ treadmill
+#########################
+sub is_treadmill_commit {
+ my $commit_message = git('log', '-1', '--format=%s', @_);
+ print "[$commit_message]\n" if $verbose;
+ $commit_message =~ /buildah.*treadmill/;
+}
+
+###############
+# pull_main # Switch to main, and pull latest from github
+###############
+sub pull_main {
+ progress("Pulling podman main...");
+ git('checkout', '-q', 'main');
+ git('pull', '-r', git_upstream(), 'main');
+}
+
+############################
+# build_and_check_podman # Run quick (local) sanity checks before pushing
+############################
+sub build_and_check_podman {
+ my $errs = 0;
+
+ # Confirm that we can still build podman
+ progress("Running 'make' to confirm that podman builds cleanly...");
+ system('make') == 0
+ or die "$ME: 'make' failed with new buildah. Cannot continue.\n";
+
+ # See if any new options need man pages
+ progress('Cross-checking man pages...');
+ $errs += system('hack/xref-helpmsgs-manpages');
+
+ # Confirm that buildah-bud patches still apply. This requires knowing
+ # the name of the directory created by the bud-tests script.
+ progress("Confirming that buildah-bud-tests patches still apply...");
+ system('rm -rf test-buildah-*');
+ $errs += system('test/buildah-bud/run-buildah-bud-tests', '--no-test');
+ # Clean up
+ system('rm -rf test-buildah-*');
+
+ return if !$errs;
+ warn "$ME: Errors found. Please address, then add to HEAD^ commit\n";
+ die " ...see $ME --help for more information.\n";
+}
+
+# END sync and its helpers
+###############################################################################
+# BEGIN pick and its helpers
+#
+# This is what gets used on a real vendor-new-buildah PR
+
+sub do_pick {
+ my $current_branch = git_current_branch();
+
+ # Confirm that current branch is a buildah-vendor one
+ head_is_buildah_vendor_commit(1);
+ progress("HEAD is a buildah vendor commit. Good.");
+
+ # Identify and pull the treadmill PR
+ my $treadmill_pr = treadmill_pr();
+ my $treadmill_branch = "$ME/pr$treadmill_pr/tmp$$";
+ progress("Fetching treadmill PR $treadmill_pr into $treadmill_branch");
+ git('fetch', git_upstream(), "pull/$treadmill_pr/head:$treadmill_branch");
+
+ # read buildah go.mod from it, and from current tree, and compare
+ my $buildah_on_treadmill = vendored_buildah($treadmill_branch);
+ my $buildah_here = vendored_buildah();
+ if ($buildah_on_treadmill ne $buildah_here) {
+ warn "$ME: Warning: buildah version mismatch:\n";
+ warn "$ME: on treadmill: $buildah_on_treadmill\n";
+ warn "$ME: on this branch: $buildah_here\n";
+ # FIXME: should this require --force? A yes/no prompt?
+ # FIXME: I think not, because usual case will be a true tagged version
+ warn "$ME: Continuing anyway\n";
+ }
+
+ cherry_pick($treadmill_pr, $treadmill_branch);
+
+ # Clean up
+ git('branch', '-D', $treadmill_branch);
+
+ build_and_check_podman();
+
+ progress("Looks good! Please 'git commit --amend' before pushing.");
+}
+
+##################
+# treadmill_pr # Returns ID of open podman PR with the desired subject
+##################
+sub treadmill_pr {
+ my $query = <<'END_QUERY';
+{
+ search(
+ query: "buildah vendor treadmill repo:containers/podman",
+ type: ISSUE,
+ first: 10
+ ) {
+ edges { node { ... on PullRequest { number state title } } }
+ }
+}
+END_QUERY
+
+ my $ua = LWP::UserAgent->new;
+ $ua->agent("$ME " . $ua->agent); # Identify ourself
+
+ my %headers = (
+ 'Accept' => "application/vnd.github.antiope-preview+json",
+ 'Content-Type' => "application/json",
+ );
+
+ # Use github token if available, but don't require it. (All it does is
+ # bump up our throttling limit, which shouldn't be an issue) (unless
+ # someone invokes this script hundreds of times per minute).
+ if (my $token = $ENV{GITHUB_TOKEN}) {
+ $headers{Authorization} = "bearer $token";
+ }
+ $ua->default_header($_ => $headers{$_}) for keys %headers;
+
+ # Massage the query: escape quotes, put it all in one line, collapse spaces
+ $query =~ s/\"/\\"/g;
+ $query =~ s/\n/\\n/g;
+ $query =~ s/\s+/ /g;
+ # ...and now one more massage
+ my $postquery = qq/{ "query": \"$query\" }/;
+
+ print $postquery, "\n" if $debug;
+ my $res = $ua->post($API_URL, Content => $postquery);
+ if ((my $code = $res->code) != 200) {
+ print $code, " ", $res->message, "\n";
+ exit 1;
+ }
+
+ # Got something. Confirm that it has all our required fields
+ my $content = decode_json($res->content);
+ use Data::Dump; dd $content if $debug;
+ exists $content->{data}
+ or die "$ME: No '{data}' section in response\n";
+ exists $content->{data}{search}
+ or die "$ME: No '{data}{search}' section in response\n";
+ exists $content->{data}{search}{edges}
+ or die "$ME: No '{data}{search}{edges}' section in response\n";
+
+ # Confirm that there is exactly one such PR
+ my @prs = @{ $content->{data}{search}{edges} };
+ @prs > 0
+ or die "$ME: WEIRD! No 'buildah vendor treadmill' PRs found!\n";
+ @prs = grep { $_->{node}{title} eq $Treadmill_PR_Title } @prs
+ or die "$ME: No PRs found with title '$Treadmill_PR_Title'\n";
+ @prs = grep { $_->{node}{state} eq 'OPEN' } @prs
+ or die "$ME: Found '$Treadmill_PR_Title' PRs, but none are OPEN\n";
+ @prs == 1
+ or die "$ME: Multiple OPEN '$Treadmill_PR_Title' PRs found!\n";
+
+ # Yay. Found exactly one.
+ return $prs[0]{node}{number};
+}
+
+#################
+# cherry_pick # cherry-pick a commit, updating its commit message
+#################
+sub cherry_pick {
+ my $treadmill_pr = shift; # e.g., 12345
+ my $treadmill_branch = shift; # e.g., b-v-p/pr12345/tmpNNN
+
+ progress("Cherry-picking from $treadmill_pr^");
+
+ # Create a temp script. Do so in /var/tmp because sometimes $TMPDIR
+ # (e.g. /tmp) has noexec.
+ my ($fh, $editor) = tempfile( "$ME.edit-commit-message.XXXXXXXX", DIR => "/var/tmp" );
+ printf { $fh } <<'END_EDIT_SCRIPT', $ME, $VERSION, $treadmill_pr;
+#!/bin/bash
+
+if [[ -z "$1" ]]; then
+ echo "FATAL: Did not get called with an arg" >&2
+ exit 1
+fi
+
+msgfile=$1
+if [[ ! -e $msgfile ]]; then
+ echo "FATAL: git-commit file does not exist: $msgfile" >&2
+ exit 1
+fi
+
+tmpfile=$msgfile.tmp
+rm -f $tmpfile
+
+cat >$tmpfile <<EOF
+WIP: Fixes for vendoring Buildah
+
+This commit was automatically cherry-picked
+by %s v%s
+from the buildah vendor treadmill PR, #%s
+
+/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+> The git commit message from that PR is below. Please review it,
+> edit as necessary, then remove this comment block.
+\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+EOF
+
+# Strip the "DO NOT MERGE" header from the treadmill PR, print only
+# the "Changes as of YYYY-MM-DD" and subsequent lines
+sed -ne '/^Changes as of/,$ p' <$msgfile >>$tmpfile
+mv $tmpfile $msgfile
+
+END_EDIT_SCRIPT
+ close $fh
+ or die "$ME: Error writing $editor: $!\n";
+ chmod 0755 => $editor;
+ local $ENV{EDITOR} = $editor;
+ git('cherry-pick', '--allow-empty', '--edit', "$treadmill_branch^");
+ unlink $editor;
+}
+
+# END pick and its helpers
+###############################################################################
+# BEGIN general-purpose helpers
+
+##############
+# progress # Progris riport Dr Strauss says I shud rite down what I think
+##############
+sub progress {
+ print $Highlight, "|\n+---> @_\n", $Reset;
+}
+
+#######################
+# assert_clean_repo # Don't even think of running with local changes
+#######################
+sub assert_clean_repo {
+ my @changed = git('status', '--porcelain', '--untracked=no')
+ or return;
+
+ warn "$ME: Modified files in repo:\n";
+ warn " $_\n" for @changed;
+ exit 1;
+}
+
+########################
+# git_current_branch # e.g., 'vendor_buildah'
+########################
+sub git_current_branch() {
+ my $b = git('rev-parse', '--abbrev-ref=strict', 'HEAD');
+
+ # There is no circumstance in which we can ever be called from main
+ die "$ME: must run from side branch, not main\n" if $b eq 'main';
+ return $b;
+}
+
+##################
+# git_upstream # Name of true github upstream
+##################
+sub git_upstream {
+ for my $line (git('remote', '-v')) {
+ my ($remote, $url, $type) = split(' ', $line);
+ if ($url =~ m!github\.com.*containers/(podman|libpod)!) {
+ if ($type =~ /fetch/) {
+ return $remote;
+ }
+ }
+ }
+
+ die "$ME: did not find a remote with 'github.com/containers/podman'\n";
+}
+
+
+#########
+# git # Run a git command
+#########
+sub git {
+ my @cmd = ('git', @_);
+ print "\$ @cmd\n" if $verbose || $debug;
+ open my $fh, '-|', @cmd
+ or die "$ME: Cannot fork: $!\n";
+ my @results;
+ while (my $line = <$fh>) {
+ chomp $line;
+ push @results, $line;
+ }
+ close $fh
+ or die "$ME: command failed: @cmd\n";
+
+ return wantarray ? @results : join("\n", @results);
+}
+
+###################################
+# head_is_buildah_vendor_commit # Returns 1 if HEAD is buildah vendor
+###################################
+sub head_is_buildah_vendor_commit {
+ my $fatal = shift; # in: if true, die upon anything missing
+
+ my @deltas = git('diff', '--name-only', 'HEAD^', 'HEAD');
+
+ # It's OK if there are more modified files than just these.
+ # It's not OK if any of these are missing.
+ my @expect = qw(go.mod go.sum vendor/modules.txt);
+ my @missing;
+ for my $expect (@expect) {
+ if (! grep { $_ eq $expect } @deltas) {
+ push @missing, "$expect is unchanged";
+ }
+ }
+
+ if (! grep { m!^vendor/\Q$Buildah\E/! } @deltas) {
+ push @missing, "no changes under $Buildah";
+ }
+
+ if (@missing) {
+ if ($fatal || $verbose) {
+ warn "$ME: HEAD does not look like a buildah vendor commit:\n";
+ warn "$ME: - $_\n" for @missing;
+ if ($fatal) {
+ die "$ME: Cannot continue\n";
+ }
+ warn "$ME: ...this might be okay, continuing anyway...\n";
+ }
+ return;
+ }
+
+ return 1;
+}
+
+######################
+# vendored_buildah # Returns currently-vendored buildah
+######################
+sub vendored_buildah {
+ my $gomod_file = 'go.mod';
+ my @gomod;
+ if (@_) {
+ # Called with a branch argument; fetch that version of go.mod
+ $gomod_file = "@_:$gomod_file";
+ @gomod = git('show', $gomod_file);
+ }
+ else {
+ # No branch argument, read file
+ open my $fh, '<', $gomod_file
+ or die "$ME: Cannot read $gomod_file: $!\n";
+ while (my $line = <$fh>) {
+ chomp $line;
+ push @gomod, $line;
+ }
+ close $fh;
+ }
+
+ for my $line (@gomod) {
+ if ($line =~ m!^\s+\Q$Buildah\E\s+(\S+)!) {
+ return $1;
+ }
+ }
+
+ die "$ME: Could not find buildah in $gomod_file!\n";
+}
+
+# END general-purpose helpers
+###############################################################################
diff --git a/libpod/events.go b/libpod/events.go
index 3908536a1..39f5786a4 100644
--- a/libpod/events.go
+++ b/libpod/events.go
@@ -15,7 +15,7 @@ func (r *Runtime) newEventer() (events.Eventer, error) {
options := events.EventerOptions{
EventerType: r.config.Engine.EventsLogger,
LogFilePath: r.config.Engine.EventsLogFilePath,
- LogFileMaxSize: r.config.Engine.EventsLogFileMaxSize,
+ LogFileMaxSize: r.config.Engine.EventsLogMaxSize(),
}
return events.NewEventer(options)
}
diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go
index 5091f3723..21fdd8027 100644
--- a/libpod/events/logfile.go
+++ b/libpod/events/logfile.go
@@ -158,6 +158,10 @@ func rotateLog(logfile string, content string, limit uint64) (bool, error) {
}
file, err := os.Stat(logfile)
if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ // The logfile does not exist yet.
+ return false, nil
+ }
return false, err
}
var filesize = uint64(file.Size())
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 73740a6f9..a906a01f1 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -60,11 +60,11 @@ func NewServer(runtime *libpod.Runtime) (*APIServer, error) {
}
// NewServerWithSettings will create and configure a new API server using provided settings
-func NewServerWithSettings(runtime *libpod.Runtime, listener *net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
+func NewServerWithSettings(runtime *libpod.Runtime, listener net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
return newServer(runtime, listener, opts)
}
-func newServer(runtime *libpod.Runtime, listener *net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
+func newServer(runtime *libpod.Runtime, listener net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
// If listener not provided try socket activation protocol
if listener == nil {
if _, found := os.LookupEnv("LISTEN_PID"); !found {
@@ -78,7 +78,11 @@ func newServer(runtime *libpod.Runtime, listener *net.Listener, opts entities.Se
if len(listeners) != 1 {
return nil, fmt.Errorf("wrong number of file descriptors for socket activation protocol (%d != 1)", len(listeners))
}
- listener = &listeners[0]
+ listener = listeners[0]
+ // note that activation.Listeners() return nil when it cannot listen on the fd (i.e. udp connection)
+ if listener == nil {
+ return nil, fmt.Errorf("unexpected fd received from systemd: cannot listen on it")
+ }
}
if opts.CorsHeaders == "" {
logrus.Debug("CORS Headers were not set")
@@ -86,7 +90,7 @@ func newServer(runtime *libpod.Runtime, listener *net.Listener, opts entities.Se
logrus.Debugf("CORS Headers were set to %q", opts.CorsHeaders)
}
- logrus.Infof("API service listening on %q", (*listener).Addr())
+ logrus.Infof("API service listening on %q", listener.Addr())
router := mux.NewRouter().UseEncodedPath()
tracker := idle.NewTracker(opts.Timeout)
@@ -101,7 +105,7 @@ func newServer(runtime *libpod.Runtime, listener *net.Listener, opts entities.Se
IdleTimeout: opts.Timeout * 2,
},
CorsHeaders: opts.CorsHeaders,
- Listener: *listener,
+ Listener: listener,
PProfAddr: opts.PProfAddr,
idleTracker: tracker,
}
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index 620494b34..9580230b5 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -849,7 +849,7 @@ func (p *PodmanTestIntegration) makeOptions(args []string, noEvents, noCache boo
}
var debug string
- if _, ok := os.LookupEnv("DEBUG"); ok {
+ if _, ok := os.LookupEnv("E2E_DEBUG"); ok {
debug = "--log-level=debug --syslog=true "
}
diff --git a/vendor/github.com/containers/common/libimage/copier.go b/vendor/github.com/containers/common/libimage/copier.go
index 2a8f47f7f..01cedc7ed 100644
--- a/vendor/github.com/containers/common/libimage/copier.go
+++ b/vendor/github.com/containers/common/libimage/copier.go
@@ -147,15 +147,13 @@ type copier struct {
destinationLookup LookupReferenceFunc
}
-var (
- // storageAllowedPolicyScopes overrides the policy for local storage
- // to ensure that we can read images from it.
- storageAllowedPolicyScopes = signature.PolicyTransportScopes{
- "": []signature.PolicyRequirement{
- signature.NewPRInsecureAcceptAnything(),
- },
- }
-)
+// storageAllowedPolicyScopes overrides the policy for local storage
+// to ensure that we can read images from it.
+var storageAllowedPolicyScopes = signature.PolicyTransportScopes{
+ "": []signature.PolicyRequirement{
+ signature.NewPRInsecureAcceptAnything(),
+ },
+}
// getDockerAuthConfig extracts a docker auth config from the CopyOptions. Returns
// nil if no credentials are set.
diff --git a/vendor/github.com/containers/common/libimage/image_config.go b/vendor/github.com/containers/common/libimage/image_config.go
index 140202440..683a2dc98 100644
--- a/vendor/github.com/containers/common/libimage/image_config.go
+++ b/vendor/github.com/containers/common/libimage/image_config.go
@@ -95,9 +95,7 @@ func ImageConfigFromChanges(changes []string) (*ImageConfig, error) { // nolint:
// For now: we only support key=value
// We will attempt to strip quotation marks if present.
- var (
- key, val string
- )
+ var key, val string
splitEnv := strings.SplitN(value, "=", 2)
key = splitEnv[0]
diff --git a/vendor/github.com/containers/common/libimage/inspect.go b/vendor/github.com/containers/common/libimage/inspect.go
index d44ebf46e..05d60edfc 100644
--- a/vendor/github.com/containers/common/libimage/inspect.go
+++ b/vendor/github.com/containers/common/libimage/inspect.go
@@ -213,7 +213,6 @@ func (i *Image) inspectInfo(ctx context.Context) (*types.ImageInspectInfo, error
ref, err := i.StorageReference()
if err != nil {
-
return nil, err
}
diff --git a/vendor/github.com/containers/common/libimage/manifests/copy.go b/vendor/github.com/containers/common/libimage/manifests/copy.go
index 7e651a46c..578b64ca8 100644
--- a/vendor/github.com/containers/common/libimage/manifests/copy.go
+++ b/vendor/github.com/containers/common/libimage/manifests/copy.go
@@ -4,12 +4,10 @@ import (
"github.com/containers/image/v5/signature"
)
-var (
- // storageAllowedPolicyScopes overrides the policy for local storage
- // to ensure that we can read images from it.
- storageAllowedPolicyScopes = signature.PolicyTransportScopes{
- "": []signature.PolicyRequirement{
- signature.NewPRInsecureAcceptAnything(),
- },
- }
-)
+// storageAllowedPolicyScopes overrides the policy for local storage
+// to ensure that we can read images from it.
+var storageAllowedPolicyScopes = signature.PolicyTransportScopes{
+ "": []signature.PolicyRequirement{
+ signature.NewPRInsecureAcceptAnything(),
+ },
+}
diff --git a/vendor/github.com/containers/common/libimage/manifests/manifests.go b/vendor/github.com/containers/common/libimage/manifests/manifests.go
index ccff908c9..2624dee78 100644
--- a/vendor/github.com/containers/common/libimage/manifests/manifests.go
+++ b/vendor/github.com/containers/common/libimage/manifests/manifests.go
@@ -384,10 +384,8 @@ func (l *list) Add(ctx context.Context, sys *types.SystemContext, ref types.Imag
}
instanceInfo.instanceDigest = &manifestDigest
instanceInfo.Size = int64(len(manifestBytes))
- } else {
- if manifestDigest == "" {
- manifestDigest = *instanceInfo.instanceDigest
- }
+ } else if manifestDigest == "" {
+ manifestDigest = *instanceInfo.instanceDigest
}
err = l.List.AddInstance(*instanceInfo.instanceDigest, instanceInfo.Size, manifestType, instanceInfo.OS, instanceInfo.Architecture, instanceInfo.OSVersion, instanceInfo.OSFeatures, instanceInfo.Variant, instanceInfo.Features, instanceInfo.Annotations)
if err != nil {
@@ -405,9 +403,7 @@ func (l *list) Add(ctx context.Context, sys *types.SystemContext, ref types.Imag
func (l *list) Remove(instanceDigest digest.Digest) error {
err := l.List.Remove(instanceDigest)
if err == nil {
- if _, needToDelete := l.instances[instanceDigest]; needToDelete {
- delete(l.instances, instanceDigest)
- }
+ delete(l.instances, instanceDigest)
}
return err
}
diff --git a/vendor/github.com/containers/common/libimage/runtime.go b/vendor/github.com/containers/common/libimage/runtime.go
index 2191e3c4a..974b50b50 100644
--- a/vendor/github.com/containers/common/libimage/runtime.go
+++ b/vendor/github.com/containers/common/libimage/runtime.go
@@ -74,7 +74,7 @@ func (r *Runtime) SystemContext() *types.SystemContext {
// Returns a copy of the runtime's system context.
func (r *Runtime) systemContextCopy() *types.SystemContext {
var sys types.SystemContext
- deepcopy.Copy(&sys, &r.systemContext)
+ _ = deepcopy.Copy(&sys, &r.systemContext)
return &sys
}
diff --git a/vendor/github.com/containers/common/libimage/save.go b/vendor/github.com/containers/common/libimage/save.go
index e1b8c3f75..fed86d4ef 100644
--- a/vendor/github.com/containers/common/libimage/save.go
+++ b/vendor/github.com/containers/common/libimage/save.go
@@ -68,7 +68,6 @@ func (r *Runtime) Save(ctx context.Context, names []string, format, path string,
}
return errors.Errorf("unsupported format %q for saving images", format)
-
}
// saveSingleImage saves the specified image name to the specified path.
diff --git a/vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go b/vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go
index 36ac468de..bda7ed7d0 100644
--- a/vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go
+++ b/vendor/github.com/containers/common/libnetwork/cni/cni_conversion.go
@@ -11,7 +11,6 @@ import (
"path/filepath"
"strconv"
"strings"
- "syscall"
"time"
"github.com/containernetworking/cni/libcni"
@@ -21,6 +20,7 @@ import (
pkgutil "github.com/containers/common/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
+ "golang.org/x/sys/unix"
)
func createNetworkFromCNIConfigList(conf *libcni.NetworkConfigList, confPath string) (*types.Network, error) {
@@ -45,12 +45,11 @@ func createNetworkFromCNIConfigList(conf *libcni.NetworkConfigList, confPath str
}
}
- f, err := os.Stat(confPath)
+ t, err := fileTime(confPath)
if err != nil {
return nil, err
}
- stat := f.Sys().(*syscall.Stat_t)
- network.Created = time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec))
+ network.Created = t
firstPlugin := conf.Plugins[0]
network.Driver = firstPlugin.Network.Type
@@ -316,16 +315,15 @@ func (n *cniNetwork) createCNIConfigListFromNetwork(network *types.Network, writ
cniPathName := ""
if writeToDisk {
cniPathName = filepath.Join(n.cniConfigDir, network.Name+".conflist")
- err = ioutil.WriteFile(cniPathName, b, 0644)
+ err = ioutil.WriteFile(cniPathName, b, 0o644)
if err != nil {
return nil, "", err
}
- f, err := os.Stat(cniPathName)
+ t, err := fileTime(cniPathName)
if err != nil {
return nil, "", err
}
- stat := f.Sys().(*syscall.Stat_t)
- network.Created = time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec))
+ network.Created = t
} else {
network.Created = time.Now()
}
@@ -424,3 +422,17 @@ func parseOptions(networkOptions map[string]string, networkDriver string) (*opti
}
return opt, nil
}
+
+func fileTime(file string) (time.Time, error) {
+ var st unix.Stat_t
+ for {
+ err := unix.Stat(file, &st)
+ if err == nil {
+ break
+ }
+ if err != unix.EINTR { //nolint:errorlint // unix errors are bare
+ return time.Time{}, &os.PathError{Path: file, Op: "stat", Err: err}
+ }
+ }
+ return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec)), nil //nolint:unconvert // On some platforms Sec and Nsec are int32.
+}
diff --git a/vendor/github.com/containers/common/libnetwork/cni/config.go b/vendor/github.com/containers/common/libnetwork/cni/config.go
index e94a53db6..c6967b600 100644
--- a/vendor/github.com/containers/common/libnetwork/cni/config.go
+++ b/vendor/github.com/containers/common/libnetwork/cni/config.go
@@ -17,7 +17,6 @@ import (
// NetworkCreate will take a partial filled Network and fill the
// missing fields. It creates the Network and returns the full Network.
-// nolint:gocritic
func (n *cniNetwork) NetworkCreate(net types.Network) (types.Network, error) {
n.lock.Lock()
defer n.lock.Unlock()
diff --git a/vendor/github.com/containers/common/libnetwork/internal/util/util.go b/vendor/github.com/containers/common/libnetwork/internal/util/util.go
index 0ae8b6443..6b76a700b 100644
--- a/vendor/github.com/containers/common/libnetwork/internal/util/util.go
+++ b/vendor/github.com/containers/common/libnetwork/internal/util/util.go
@@ -109,7 +109,6 @@ func GetFreeIPv4NetworkSubnet(usedNetworks []*net.IPNet, subnetPools []config.Su
return nil, err
}
return nil, errors.New("could not find free subnet from subnet pools")
-
}
// GetFreeIPv6NetworkSubnet returns a unused ipv6 subnet
diff --git a/vendor/github.com/containers/common/libnetwork/netavark/config.go b/vendor/github.com/containers/common/libnetwork/netavark/config.go
index 6a08de55c..0bb0539b2 100644
--- a/vendor/github.com/containers/common/libnetwork/netavark/config.go
+++ b/vendor/github.com/containers/common/libnetwork/netavark/config.go
@@ -19,7 +19,6 @@ import (
// NetworkCreate will take a partial filled Network and fill the
// missing fields. It creates the Network and returns the full Network.
-// nolint:gocritic
func (n *netavarkNetwork) NetworkCreate(net types.Network) (types.Network, error) {
n.lock.Lock()
defer n.lock.Unlock()
diff --git a/vendor/github.com/containers/common/libnetwork/netavark/ipam.go b/vendor/github.com/containers/common/libnetwork/netavark/ipam.go
index c0535515a..861854351 100644
--- a/vendor/github.com/containers/common/libnetwork/netavark/ipam.go
+++ b/vendor/github.com/containers/common/libnetwork/netavark/ipam.go
@@ -59,9 +59,7 @@ func newIPAMError(cause error, msg string, args ...interface{}) *ipamError {
// openDB will open the ipam database
// Note that the caller has to Close it.
func (n *netavarkNetwork) openDB() (*bbolt.DB, error) {
- // linter complains about the octal value
- // nolint:gocritic
- db, err := bbolt.Open(n.ipamDBPath, 0600, nil)
+ db, err := bbolt.Open(n.ipamDBPath, 0o600, nil)
if err != nil {
return nil, newIPAMError(err, "failed to open database %s", n.ipamDBPath)
}
diff --git a/vendor/github.com/containers/common/libnetwork/netavark/network.go b/vendor/github.com/containers/common/libnetwork/netavark/network.go
index 15d1f03eb..9c8c4bfb4 100644
--- a/vendor/github.com/containers/common/libnetwork/netavark/network.go
+++ b/vendor/github.com/containers/common/libnetwork/netavark/network.go
@@ -108,11 +108,11 @@ func NewNetworkInterface(conf *InitConfig) (types.ContainerNetwork, error) {
return nil, errors.Wrap(err, "failed to parse default subnet")
}
- if err := os.MkdirAll(conf.NetworkConfigDir, 0755); err != nil {
+ if err := os.MkdirAll(conf.NetworkConfigDir, 0o755); err != nil {
return nil, err
}
- if err := os.MkdirAll(conf.NetworkRunDir, 0755); err != nil {
+ if err := os.MkdirAll(conf.NetworkRunDir, 0o755); err != nil {
return nil, err
}
diff --git a/vendor/github.com/containers/common/libnetwork/network/interface.go b/vendor/github.com/containers/common/libnetwork/network/interface.go
index 9278d7773..e452e6cd5 100644
--- a/vendor/github.com/containers/common/libnetwork/network/interface.go
+++ b/vendor/github.com/containers/common/libnetwork/network/interface.go
@@ -121,8 +121,7 @@ func defaultNetworkBackend(store storage.Store, conf *config.Config) (backend ty
defer func() {
// only write when there is no error
if err == nil {
- // nolint:gocritic
- if err := ioutils.AtomicWriteFile(file, []byte(backend), 0644); err != nil {
+ if err := ioutils.AtomicWriteFile(file, []byte(backend), 0o644); err != nil {
logrus.Errorf("could not write network backend to file: %v", err)
}
}
diff --git a/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go b/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go
index c864a189e..35f79a1ad 100644
--- a/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go
+++ b/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go
@@ -233,7 +233,6 @@ func parseAAParserVersion(output string) (int, error) {
// major*10^5 + minor*10^3 + patch*10^0
numericVersion := majorVersion*1e5 + minorVersion*1e3 + patchLevel
return numericVersion, nil
-
}
// CheckProfileAndLoadDefault checks if the specified profile is loaded and
diff --git a/vendor/github.com/containers/common/pkg/cgroups/blkio.go b/vendor/github.com/containers/common/pkg/cgroups/blkio.go
index bacd4eb93..0fb61c757 100644
--- a/vendor/github.com/containers/common/pkg/cgroups/blkio.go
+++ b/vendor/github.com/containers/common/pkg/cgroups/blkio.go
@@ -12,8 +12,7 @@ import (
"github.com/pkg/errors"
)
-type blkioHandler struct {
-}
+type blkioHandler struct{}
func getBlkioHandler() *blkioHandler {
return &blkioHandler{}
diff --git a/vendor/github.com/containers/common/pkg/cgroups/cgroups.go b/vendor/github.com/containers/common/pkg/cgroups/cgroups.go
index 0bf275f38..57997d652 100644
--- a/vendor/github.com/containers/common/pkg/cgroups/cgroups.go
+++ b/vendor/github.com/containers/common/pkg/cgroups/cgroups.go
@@ -265,7 +265,7 @@ func createCgroupv2Path(path string) (deferredError error) {
for i, e := range elements[3:] {
current = filepath.Join(current, e)
if i > 0 {
- if err := os.Mkdir(current, 0755); err != nil {
+ if err := os.Mkdir(current, 0o755); err != nil {
if !os.IsExist(err) {
return err
}
@@ -281,7 +281,7 @@ func createCgroupv2Path(path string) (deferredError error) {
// We enable the controllers for all the path components except the last one. It is not allowed to add
// PIDs if there are already enabled controllers.
if i < len(elements[3:])-1 {
- if err := ioutil.WriteFile(filepath.Join(current, "cgroup.subtree_control"), res, 0755); err != nil {
+ if err := ioutil.WriteFile(filepath.Join(current, "cgroup.subtree_control"), res, 0o755); err != nil {
return err
}
}
@@ -323,7 +323,7 @@ func (c *CgroupControl) initialize() (err error) {
continue
}
path := c.getCgroupv1Path(ctr.name)
- if err := os.MkdirAll(path, 0755); err != nil {
+ if err := os.MkdirAll(path, 0o755); err != nil {
return errors.Wrapf(err, "error creating cgroup path for %s", ctr.name)
}
}
@@ -343,7 +343,7 @@ func (c *CgroupControl) createCgroupDirectory(controller string) (bool, error) {
return false, err
}
- if err := os.MkdirAll(cPath, 0755); err != nil {
+ if err := os.MkdirAll(cPath, 0o755); err != nil {
return false, errors.Wrapf(err, "error creating cgroup for %s", controller)
}
return true, nil
@@ -589,7 +589,7 @@ func (c *CgroupControl) AddPid(pid int) error {
if c.cgroup2 {
p := filepath.Join(cgroupRoot, c.path, "cgroup.procs")
- if err := ioutil.WriteFile(p, pidString, 0644); err != nil {
+ if err := ioutil.WriteFile(p, pidString, 0o644); err != nil {
return errors.Wrapf(err, "write %s", p)
}
return nil
@@ -612,7 +612,7 @@ func (c *CgroupControl) AddPid(pid int) error {
continue
}
p := filepath.Join(c.getCgroupv1Path(n), "tasks")
- if err := ioutil.WriteFile(p, pidString, 0644); err != nil {
+ if err := ioutil.WriteFile(p, pidString, 0o644); err != nil {
return errors.Wrapf(err, "write %s", p)
}
}
diff --git a/vendor/github.com/containers/common/pkg/cgroups/cpu.go b/vendor/github.com/containers/common/pkg/cgroups/cpu.go
index 23539757d..c9e94f269 100644
--- a/vendor/github.com/containers/common/pkg/cgroups/cpu.go
+++ b/vendor/github.com/containers/common/pkg/cgroups/cpu.go
@@ -12,8 +12,7 @@ import (
"github.com/pkg/errors"
)
-type cpuHandler struct {
-}
+type cpuHandler struct{}
func getCPUHandler() *cpuHandler {
return &cpuHandler{}
diff --git a/vendor/github.com/containers/common/pkg/cgroups/cpuset.go b/vendor/github.com/containers/common/pkg/cgroups/cpuset.go
index 22ac0a079..2bfeb80db 100644
--- a/vendor/github.com/containers/common/pkg/cgroups/cpuset.go
+++ b/vendor/github.com/containers/common/pkg/cgroups/cpuset.go
@@ -10,8 +10,7 @@ import (
"github.com/pkg/errors"
)
-type cpusetHandler struct {
-}
+type cpusetHandler struct{}
func cpusetCopyFileFromParent(dir, file string, cgroupv2 bool) ([]byte, error) {
if dir == cgroupRoot {
@@ -33,7 +32,7 @@ func cpusetCopyFileFromParent(dir, file string, cgroupv2 bool) ([]byte, error) {
if err != nil {
return nil, err
}
- if err := ioutil.WriteFile(path, data, 0644); err != nil {
+ if err := ioutil.WriteFile(path, data, 0o644); err != nil {
return nil, errors.Wrapf(err, "write %s", path)
}
return data, nil
diff --git a/vendor/github.com/containers/common/pkg/cgroups/pids.go b/vendor/github.com/containers/common/pkg/cgroups/pids.go
index 58cb32b3b..650120a56 100644
--- a/vendor/github.com/containers/common/pkg/cgroups/pids.go
+++ b/vendor/github.com/containers/common/pkg/cgroups/pids.go
@@ -8,8 +8,7 @@ import (
spec "github.com/opencontainers/runtime-spec/specs-go"
)
-type pidHandler struct {
-}
+type pidHandler struct{}
func getPidsHandler() *pidHandler {
return &pidHandler{}
@@ -29,7 +28,7 @@ func (c *pidHandler) Apply(ctr *CgroupControl, res *spec.LinuxResources) error {
}
p := filepath.Join(PIDRoot, "pids.max")
- return ioutil.WriteFile(p, []byte(fmt.Sprintf("%d\n", res.Pids.Limit)), 0644)
+ return ioutil.WriteFile(p, []byte(fmt.Sprintf("%d\n", res.Pids.Limit)), 0o644)
}
// Create the cgroup
diff --git a/vendor/github.com/containers/common/pkg/chown/chown_unix.go b/vendor/github.com/containers/common/pkg/chown/chown_unix.go
index ea8f5963e..61327fd24 100644
--- a/vendor/github.com/containers/common/pkg/chown/chown_unix.go
+++ b/vendor/github.com/containers/common/pkg/chown/chown_unix.go
@@ -41,7 +41,6 @@ func ChangeHostPathOwnership(path string, recursive bool, uid, gid int) error {
return nil
})
-
if err != nil {
return errors.Wrap(err, "failed to chown recursively host path")
}
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index 77654406a..b28c527bc 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -252,7 +252,7 @@ type EngineConfig struct {
// EventsLogFileMaxSize sets the maximum size for the events log. When the limit is exceeded,
// the logfile is rotated and the old one is deleted.
- EventsLogFileMaxSize uint64 `toml:"events_logfile_max_size,omitempty,omitzero"`
+ EventsLogFileMaxSize eventsLogMaxSize `toml:"events_logfile_max_size,omitzero"`
// EventsLogger determines where events should be logged.
EventsLogger string `toml:"events_logger,omitempty"`
@@ -581,7 +581,6 @@ type Destination struct {
// with cgroupv2v2. Other OCI runtimes are not yet supporting cgroupv2v2. This
// might change in the future.
func NewConfig(userConfigPath string) (*Config, error) {
-
// Generate the default config for the system
config, err := DefaultConfig()
if err != nil {
@@ -765,7 +764,6 @@ func (c *Config) addCAPPrefix() {
// Validate is the main entry point for library configuration validation.
func (c *Config) Validate() error {
-
if err := c.Containers.Validate(); err != nil {
return errors.Wrap(err, "validating containers config")
}
@@ -822,7 +820,6 @@ func (c *EngineConfig) Validate() error {
// It returns an `error` on validation failure, otherwise
// `nil`.
func (c *ContainersConfig) Validate() error {
-
if err := c.validateUlimits(); err != nil {
return err
}
@@ -954,7 +951,6 @@ func (c *Config) GetDefaultEnvEx(envHost, httpProxy bool) []string {
// Capabilities returns the capabilities parses the Add and Drop capability
// list from the default capabiltiies for the container
func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
-
userNotRoot := func(user string) bool {
if user == "" || user == "root" || user == "0" {
return false
@@ -1014,7 +1010,7 @@ func Device(device string) (src, dst, permissions string, err error) {
// IsValidDeviceMode checks if the mode for device is valid or not.
// IsValid mode is a composition of r (read), w (write), and m (mknod).
func IsValidDeviceMode(mode string) bool {
- var legalDeviceMode = map[rune]bool{
+ legalDeviceMode := map[rune]bool{
'r': true,
'w': true,
'm': true,
@@ -1065,7 +1061,6 @@ func rootlessConfigPath() (string, error) {
}
func stringsEq(a, b []string) bool {
-
if len(a) != len(b) {
return false
}
@@ -1150,10 +1145,10 @@ func (c *Config) Write() error {
if err != nil {
return err
}
- if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
+ if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return err
}
- configFile, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0644)
+ configFile, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o644)
if err != nil {
return err
}
@@ -1266,3 +1261,33 @@ func (c *Config) setupEnv() error {
}
return nil
}
+
+// eventsLogMaxSize is the type used by EventsLogFileMaxSize
+type eventsLogMaxSize uint64
+
+// UnmarshalText parses the JSON encoding of eventsLogMaxSize and
+// stores it in a value.
+func (e *eventsLogMaxSize) UnmarshalText(text []byte) error {
+ // REMOVE once writing works
+ if string(text) == "" {
+ return nil
+ }
+ val, err := units.FromHumanSize((string(text)))
+ if err != nil {
+ return err
+ }
+ if val < 0 {
+ return fmt.Errorf("events log file max size cannot be negative: %s", string(text))
+ }
+ *e = eventsLogMaxSize(uint64(val))
+ return nil
+}
+
+// MarshalText returns the JSON encoding of eventsLogMaxSize.
+func (e eventsLogMaxSize) MarshalText() ([]byte, error) {
+ if uint64(e) == DefaultEventsLogSizeMax || e == 0 {
+ v := []byte{}
+ return v, nil
+ }
+ return []byte(fmt.Sprintf("%d", e)), nil
+}
diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf
index 923b668bb..f069c531d 100644
--- a/vendor/github.com/containers/common/pkg/config/containers.conf
+++ b/vendor/github.com/containers/common/pkg/config/containers.conf
@@ -373,11 +373,14 @@ default_sysctls = [
# Define where event logs will be stored, when events_logger is "file".
#events_logfile_path=""
-# Sets the maximum size for events_logfile_path in bytes. When the limit is exceeded,
-# the logfile will be rotated and the old one will be deleted.
+# Sets the maximum size for events_logfile_path.
+# The size can be b (bytes), k (kilobytes), m (megabytes), or g (gigabytes).
+# The format for the size is `<number><unit>`, e.g., `1b` or `3g`.
+# If no unit is included then the size will be read in bytes.
+# When the limit is exceeded, the logfile will be rotated and the old one will be deleted.
# If the maximum size is set to 0, then no limit will be applied,
# and the logfile will not be rotated.
-#events_logfile_max_size = 0
+#events_logfile_max_size = "1m"
# Selects which logging mechanism to use for container engine events.
# Valid values are `journald`, `file` and `none`.
@@ -629,7 +632,7 @@ default_sysctls = [
# Host directories to be mounted as volumes into the VM by default.
# Environment variables like $HOME as well as complete paths are supported for
-# the source and destination. An optional third field `:ro` can be used to
+# the source and destination. An optional third field `:ro` can be used to
# tell the container engines to mount the volume readonly.
#
# volumes = [
@@ -641,3 +644,4 @@ default_sysctls = [
# TOML does not provide a way to end a table other than a further table being
# defined, so every key hereafter will be part of [machine] and not the
# main config.
+
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 1a1da3fcd..275f67cbf 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -109,7 +109,6 @@ func parseSubnetPool(subnet string, size int) SubnetPool {
Base: &nettypes.IPNet{IPNet: *n},
Size: size,
}
-
}
const (
@@ -128,6 +127,9 @@ const (
// DefaultLogSizeMax is the default value for the maximum log size
// allowed for a container. Negative values mean that no limit is imposed.
DefaultLogSizeMax = -1
+ // DefaultEventsLogSize is the default value for the maximum events log size
+ // before rotation.
+ DefaultEventsLogSizeMax = uint64(1000000)
// DefaultPidsLimit is the default value for maximum number of processes
// allowed inside a container
DefaultPidsLimit = 2048
@@ -156,7 +158,6 @@ const (
// DefaultConfig defines the default values from containers.conf
func DefaultConfig() (*Config, error) {
-
defaultEngineConfig, err := defaultConfigFromMemory()
if err != nil {
return nil, err
@@ -263,6 +264,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
c.EventsLogFilePath = filepath.Join(c.TmpDir, "events", "events.log")
+ c.EventsLogFileMaxSize = eventsLogMaxSize(DefaultEventsLogSizeMax)
+
c.CompatAPIEnforceDockerHub = true
if path, ok := os.LookupEnv("CONTAINERS_STORAGE_CONF"); ok {
@@ -399,10 +402,10 @@ func defaultTmpDir() (string, error) {
}
libpodRuntimeDir := filepath.Join(runtimeDir, "libpod")
- if err := os.Mkdir(libpodRuntimeDir, 0700|os.ModeSticky); err != nil {
+ if err := os.Mkdir(libpodRuntimeDir, 0o700|os.ModeSticky); err != nil {
if !os.IsExist(err) {
return "", err
- } else if err := os.Chmod(libpodRuntimeDir, 0700|os.ModeSticky); err != nil {
+ } else if err := os.Chmod(libpodRuntimeDir, 0o700|os.ModeSticky); err != nil {
// The directory already exist, just set the sticky bit
return "", errors.Wrap(err, "set sticky bit on")
}
@@ -466,6 +469,10 @@ func (c *Config) NetNS() string {
return c.Containers.NetNS
}
+func (c EngineConfig) EventsLogMaxSize() uint64 {
+ return uint64(c.EventsLogFileMaxSize)
+}
+
// SecurityOptions returns the default security options
func (c *Config) SecurityOptions() []string {
securityOpts := []string{}
diff --git a/vendor/github.com/containers/common/pkg/config/systemd.go b/vendor/github.com/containers/common/pkg/config/systemd.go
index f17a84304..03d19a12f 100644
--- a/vendor/github.com/containers/common/pkg/config/systemd.go
+++ b/vendor/github.com/containers/common/pkg/config/systemd.go
@@ -58,7 +58,6 @@ func useSystemd() bool {
val := strings.TrimSuffix(string(dat), "\n")
usesSystemd = (val == "systemd")
}
- return
})
return usesSystemd
}
@@ -82,7 +81,6 @@ func useJournald() bool {
}
}
}
- return
})
return usesJournald
}
diff --git a/vendor/github.com/containers/common/pkg/manifests/manifests.go b/vendor/github.com/containers/common/pkg/manifests/manifests.go
index 5c2836893..75ffac06c 100644
--- a/vendor/github.com/containers/common/pkg/manifests/manifests.go
+++ b/vendor/github.com/containers/common/pkg/manifests/manifests.go
@@ -16,31 +16,22 @@ import (
type List interface {
AddInstance(manifestDigest digest.Digest, manifestSize int64, manifestType, os, architecture, osVersion string, osFeatures []string, variant string, features []string, annotations []string) error
Remove(instanceDigest digest.Digest) error
-
SetURLs(instanceDigest digest.Digest, urls []string) error
URLs(instanceDigest digest.Digest) ([]string, error)
-
SetAnnotations(instanceDigest *digest.Digest, annotations map[string]string) error
Annotations(instanceDigest *digest.Digest) (map[string]string, error)
-
SetOS(instanceDigest digest.Digest, os string) error
OS(instanceDigest digest.Digest) (string, error)
-
SetArchitecture(instanceDigest digest.Digest, arch string) error
Architecture(instanceDigest digest.Digest) (string, error)
-
SetOSVersion(instanceDigest digest.Digest, osVersion string) error
OSVersion(instanceDigest digest.Digest) (string, error)
-
SetVariant(instanceDigest digest.Digest, variant string) error
Variant(instanceDigest digest.Digest) (string, error)
-
SetFeatures(instanceDigest digest.Digest, features []string) error
Features(instanceDigest digest.Digest) ([]string, error)
-
SetOSFeatures(instanceDigest digest.Digest, osFeatures []string) error
OSFeatures(instanceDigest digest.Digest) ([]string, error)
-
Serialize(mimeType string) ([]byte, error)
Instances() []digest.Digest
OCIv1() *v1.Index
@@ -81,7 +72,7 @@ func Create() List {
// AddInstance adds an entry for the specified manifest digest, with assorted
// additional information specified in parameters, to the list or index.
-func (l *list) AddInstance(manifestDigest digest.Digest, manifestSize int64, manifestType, osName, architecture, osVersion string, osFeatures []string, variant string, features []string, annotations []string) error {
+func (l *list) AddInstance(manifestDigest digest.Digest, manifestSize int64, manifestType, osName, architecture, osVersion string, osFeatures []string, variant string, features, annotations []string) error {
if err := l.Remove(manifestDigest); err != nil && !os.IsNotExist(errors.Cause(err)) {
return err
}
@@ -451,38 +442,37 @@ func (l *list) preferOCI() bool {
// Serialize encodes the list using the specified format, or by selecting one
// which it thinks is appropriate.
func (l *list) Serialize(mimeType string) ([]byte, error) {
- var manifestBytes []byte
+ var (
+ res []byte
+ err error
+ )
switch mimeType {
case "":
if l.preferOCI() {
- manifest, err := json.Marshal(&l.oci)
+ res, err = json.Marshal(&l.oci)
if err != nil {
return nil, errors.Wrapf(err, "error marshalling OCI image index")
}
- manifestBytes = manifest
} else {
- manifest, err := json.Marshal(&l.docker)
+ res, err = json.Marshal(&l.docker)
if err != nil {
return nil, errors.Wrapf(err, "error marshalling Docker manifest list")
}
- manifestBytes = manifest
}
case v1.MediaTypeImageIndex:
- manifest, err := json.Marshal(&l.oci)
+ res, err = json.Marshal(&l.oci)
if err != nil {
return nil, errors.Wrapf(err, "error marshalling OCI image index")
}
- manifestBytes = manifest
case manifest.DockerV2ListMediaType:
- manifest, err := json.Marshal(&l.docker)
+ res, err = json.Marshal(&l.docker)
if err != nil {
return nil, errors.Wrapf(err, "error marshalling Docker manifest list")
}
- manifestBytes = manifest
default:
return nil, errors.Wrapf(ErrManifestTypeNotSupported, "serializing list to type %q not implemented", mimeType)
}
- return manifestBytes, nil
+ return res, nil
}
// Instances returns the list of image instances mentioned in this list.
diff --git a/vendor/github.com/containers/common/pkg/netns/netns_linux.go b/vendor/github.com/containers/common/pkg/netns/netns_linux.go
index 9f85e910d..b3459b213 100644
--- a/vendor/github.com/containers/common/pkg/netns/netns_linux.go
+++ b/vendor/github.com/containers/common/pkg/netns/netns_linux.go
@@ -71,7 +71,7 @@ func NewNSWithName(name string) (ns.NetNS, error) {
// Create the directory for mounting network namespaces
// This needs to be a shared mountpoint in case it is mounted in to
// other namespaces (containers)
- err = os.MkdirAll(nsRunDir, 0755)
+ err = os.MkdirAll(nsRunDir, 0o755)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/containers/common/pkg/parse/parse.go b/vendor/github.com/containers/common/pkg/parse/parse.go
index e73d44287..6c4958cc2 100644
--- a/vendor/github.com/containers/common/pkg/parse/parse.go
+++ b/vendor/github.com/containers/common/pkg/parse/parse.go
@@ -141,7 +141,7 @@ func Device(device string) (src, dest, permissions string, err error) {
// isValidDeviceMode checks if the mode for device is valid or not.
// isValid mode is a composition of r (read), w (write), and m (mknod).
func isValidDeviceMode(mode string) bool {
- var legalDeviceMode = map[rune]bool{
+ legalDeviceMode := map[rune]bool{
'r': true,
'w': true,
'm': true,
diff --git a/vendor/github.com/containers/common/pkg/report/template.go b/vendor/github.com/containers/common/pkg/report/template.go
index 95c04424d..29963099e 100644
--- a/vendor/github.com/containers/common/pkg/report/template.go
+++ b/vendor/github.com/containers/common/pkg/report/template.go
@@ -40,14 +40,14 @@ var DefaultFuncs = FuncMap{
buf := new(bytes.Buffer)
enc := json.NewEncoder(buf)
enc.SetEscapeHTML(false)
- enc.Encode(v)
+ _ = enc.Encode(v)
// Remove the trailing new line added by the encoder
return strings.TrimSpace(buf.String())
},
"lower": strings.ToLower,
"pad": padWithSpace,
"split": strings.Split,
- "title": strings.Title,
+ "title": strings.Title, //nolint:staticcheck
"truncate": truncateWithLength,
"upper": strings.ToUpper,
}
diff --git a/vendor/github.com/containers/common/pkg/seccomp/seccomp_linux.go b/vendor/github.com/containers/common/pkg/seccomp/seccomp_linux.go
index d2498747c..f7adde8ab 100644
--- a/vendor/github.com/containers/common/pkg/seccomp/seccomp_linux.go
+++ b/vendor/github.com/containers/common/pkg/seccomp/seccomp_linux.go
@@ -112,7 +112,7 @@ func setupSeccomp(config *Seccomp, rs *specs.Spec) (*specs.LinuxSeccomp, error)
newConfig := &specs.LinuxSeccomp{}
var arch string
- var native, err = libseccomp.GetNativeArch()
+ native, err := libseccomp.GetNativeArch()
if err == nil {
arch = native.String()
}
diff --git a/vendor/github.com/containers/common/pkg/secrets/filedriver/filedriver.go b/vendor/github.com/containers/common/pkg/secrets/filedriver/filedriver.go
index 80fcf5458..e0c275851 100644
--- a/vendor/github.com/containers/common/pkg/secrets/filedriver/filedriver.go
+++ b/vendor/github.com/containers/common/pkg/secrets/filedriver/filedriver.go
@@ -34,7 +34,7 @@ func NewDriver(rootPath string) (*Driver, error) {
fileDriver := new(Driver)
fileDriver.secretsDataFilePath = filepath.Join(rootPath, secretsDataFile)
// the lockfile functions require that the rootPath dir is executable
- if err := os.MkdirAll(rootPath, 0700); err != nil {
+ if err := os.MkdirAll(rootPath, 0o700); err != nil {
return nil, err
}
@@ -95,7 +95,7 @@ func (d *Driver) Store(id string, data []byte) error {
if err != nil {
return err
}
- err = ioutil.WriteFile(d.secretsDataFilePath, marshalled, 0600)
+ err = ioutil.WriteFile(d.secretsDataFilePath, marshalled, 0o600)
if err != nil {
return err
}
@@ -119,7 +119,7 @@ func (d *Driver) Delete(id string) error {
if err != nil {
return err
}
- err = ioutil.WriteFile(d.secretsDataFilePath, marshalled, 0600)
+ err = ioutil.WriteFile(d.secretsDataFilePath, marshalled, 0o600)
if err != nil {
return err
}
diff --git a/vendor/github.com/containers/common/pkg/secrets/secrets.go b/vendor/github.com/containers/common/pkg/secrets/secrets.go
index aea983cb1..4a04e2b2f 100644
--- a/vendor/github.com/containers/common/pkg/secrets/secrets.go
+++ b/vendor/github.com/containers/common/pkg/secrets/secrets.go
@@ -102,7 +102,7 @@ func NewManager(rootPath string) (*SecretsManager, error) {
return nil, errors.Wrapf(errInvalidPath, "path must be absolute: %s", rootPath)
}
// the lockfile functions require that the rootPath dir is executable
- if err := os.MkdirAll(rootPath, 0700); err != nil {
+ if err := os.MkdirAll(rootPath, 0o700); err != nil {
return nil, err
}
@@ -237,7 +237,6 @@ func (s *SecretsManager) List() ([]Secret, error) {
var ls []Secret
for _, v := range secrets {
ls = append(ls, v)
-
}
return ls, nil
}
diff --git a/vendor/github.com/containers/common/pkg/secrets/secretsdb.go b/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
index 0c4929995..4d2ca0fca 100644
--- a/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
+++ b/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
@@ -177,7 +177,7 @@ func (s *SecretsManager) store(entry *Secret) error {
if err != nil {
return err
}
- err = ioutil.WriteFile(s.secretsDBPath, marshalled, 0600)
+ err = ioutil.WriteFile(s.secretsDBPath, marshalled, 0o600)
if err != nil {
return err
}
@@ -203,7 +203,7 @@ func (s *SecretsManager) delete(nameOrID string) error {
if err != nil {
return err
}
- err = ioutil.WriteFile(s.secretsDBPath, marshalled, 0600)
+ err = ioutil.WriteFile(s.secretsDBPath, marshalled, 0o600)
if err != nil {
return err
}
diff --git a/vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go b/vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go
index 3c0d2b237..4410292a7 100644
--- a/vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go
+++ b/vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go
@@ -262,7 +262,6 @@ func addSubscriptionsFromMountsFile(filePath, mountLabel, containerRunDir string
data, err := readFileOrDir("", hostDirOrFile, mode.Perm())
if err != nil {
return nil, err
-
}
for _, s := range data {
if err := os.MkdirAll(filepath.Dir(ctrDirOrFileOnHost), s.dirMode); err != nil {
@@ -313,7 +312,7 @@ func addFIPSModeSubscription(mounts *[]rspec.Mount, containerRunDir, mountPoint,
subscriptionsDir := "/run/secrets"
ctrDirOnHost := filepath.Join(containerRunDir, subscriptionsDir)
if _, err := os.Stat(ctrDirOnHost); os.IsNotExist(err) {
- if err = idtools.MkdirAllAs(ctrDirOnHost, 0755, uid, gid); err != nil { //nolint
+ if err = idtools.MkdirAllAs(ctrDirOnHost, 0o755, uid, gid); err != nil { //nolint
return err
}
if err = label.Relabel(ctrDirOnHost, mountLabel, false); err != nil {
diff --git a/vendor/github.com/containers/common/pkg/sysinfo/sysinfo_solaris.go b/vendor/github.com/containers/common/pkg/sysinfo/sysinfo_solaris.go
index 801db8c80..af1c77d60 100644
--- a/vendor/github.com/containers/common/pkg/sysinfo/sysinfo_solaris.go
+++ b/vendor/github.com/containers/common/pkg/sysinfo/sysinfo_solaris.go
@@ -46,7 +46,7 @@ func IsCPUSharesAvailable() bool {
// New returns a new SysInfo, using the filesystem to detect which features
// the kernel supports.
-//NOTE Solaris: If we change the below capabilities be sure
+// NOTE Solaris: If we change the below capabilities be sure
// to update verifyPlatformContainerSettings() in daemon_solaris.go
func New(quiet bool) *SysInfo {
sysInfo := &SysInfo{}
@@ -64,7 +64,6 @@ func New(quiet bool) *SysInfo {
// setCgroupMem reads the memory information for Solaris.
func setCgroupMem(quiet bool) cgroupMemInfo {
-
return cgroupMemInfo{
MemoryLimit: true,
SwapLimit: true,
@@ -77,7 +76,6 @@ func setCgroupMem(quiet bool) cgroupMemInfo {
// setCgroupCPU reads the cpu information for Solaris.
func setCgroupCPU(quiet bool) cgroupCPUInfo {
-
return cgroupCPUInfo{
CPUShares: true,
CPUCfsPeriod: false,
@@ -89,7 +87,6 @@ func setCgroupCPU(quiet bool) cgroupCPUInfo {
// blkio switches are not supported in Solaris.
func setCgroupBlkioInfo(quiet bool) cgroupBlkioInfo {
-
return cgroupBlkioInfo{
BlkioWeight: false,
BlkioWeightDevice: false,
@@ -98,7 +95,6 @@ func setCgroupBlkioInfo(quiet bool) cgroupBlkioInfo {
// setCgroupCPUsetInfo reads the cpuset information for Solaris.
func setCgroupCPUsetInfo(quiet bool) cgroupCpusetInfo {
-
return cgroupCpusetInfo{
Cpuset: true,
Cpus: getCPUCount(),
diff --git a/vendor/github.com/containers/common/pkg/timetype/timestamp.go b/vendor/github.com/containers/common/pkg/timetype/timestamp.go
index ce2cb64f2..3cbfe4098 100644
--- a/vendor/github.com/containers/common/pkg/timetype/timestamp.go
+++ b/vendor/github.com/containers/common/pkg/timetype/timestamp.go
@@ -34,13 +34,14 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
// if the string has a Z or a + or three dashes use parse otherwise use parseinlocation
parseInLocation := !(strings.ContainsAny(value, "zZ+") || strings.Count(value, "-") == 3)
- if strings.Contains(value, ".") { // nolint:gocritic
+ switch {
+ case strings.Contains(value, "."):
if parseInLocation {
format = rFC3339NanoLocal
} else {
format = time.RFC3339Nano
}
- } else if strings.Contains(value, "T") {
+ case strings.Contains(value, "T"):
// we want the number of colons in the T portion of the timestamp
tcolons := strings.Count(value, ":")
// if parseInLocation is off and we have a +/- zone offset (not Z) then
@@ -68,9 +69,9 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
format = time.RFC3339
}
}
- } else if parseInLocation {
+ case parseInLocation:
format = dateLocal
- } else {
+ default:
format = dateWithZone
}
@@ -112,7 +113,7 @@ func ParseTimestamps(value string, def int64) (secs, nanoSecs int64, err error)
return parseTimestamp(value)
}
-func parseTimestamp(value string) (int64, int64, error) { // nolint:gocritic
+func parseTimestamp(value string) (int64, int64, error) {
sa := strings.SplitN(value, ".", 2)
s, err := strconv.ParseInt(sa[0], 10, 64)
if err != nil {
diff --git a/vendor/github.com/containers/common/pkg/umask/umask_unix.go b/vendor/github.com/containers/common/pkg/umask/umask_unix.go
index e59d7bea7..4f5527cb6 100644
--- a/vendor/github.com/containers/common/pkg/umask/umask_unix.go
+++ b/vendor/github.com/containers/common/pkg/umask/umask_unix.go
@@ -10,8 +10,8 @@ import (
)
func Check() {
- oldUmask := syscall.Umask(0022) //nolint
- if (oldUmask & ^0022) != 0 {
+ oldUmask := syscall.Umask(0o022) //nolint
+ if (oldUmask & ^0o022) != 0 {
logrus.Debugf("umask value too restrictive. Forcing it to 022")
}
}
diff --git a/vendor/github.com/containers/common/pkg/util/util_supported.go b/vendor/github.com/containers/common/pkg/util/util_supported.go
index 284f3ffdd..35201f932 100644
--- a/vendor/github.com/containers/common/pkg/util/util_supported.go
+++ b/vendor/github.com/containers/common/pkg/util/util_supported.go
@@ -1,5 +1,5 @@
-//go:build linux || darwin
-// +build linux darwin
+//go:build linux || darwin || freebsd
+// +build linux darwin freebsd
package util
@@ -23,7 +23,7 @@ var (
// isWriteableOnlyByOwner checks that the specified permission mask allows write
// access only to the owner.
func isWriteableOnlyByOwner(perm os.FileMode) bool {
- return (perm & 0722) == 0700
+ return (perm & 0o722) == 0o700
}
// GetRuntimeDir returns the runtime directory
@@ -46,7 +46,7 @@ func GetRuntimeDir() (string, error) {
uid := fmt.Sprintf("%d", unshare.GetRootlessUID())
if runtimeDir == "" {
tmpDir := filepath.Join("/run", "user", uid)
- if err := os.MkdirAll(tmpDir, 0700); err != nil {
+ if err := os.MkdirAll(tmpDir, 0o700); err != nil {
logrus.Debugf("unable to make temp dir: %v", err)
}
st, err := os.Stat(tmpDir)
@@ -56,7 +56,7 @@ func GetRuntimeDir() (string, error) {
}
if runtimeDir == "" {
tmpDir := filepath.Join(os.TempDir(), fmt.Sprintf("podman-run-%s", uid))
- if err := os.MkdirAll(tmpDir, 0700); err != nil {
+ if err := os.MkdirAll(tmpDir, 0o700); err != nil {
logrus.Debugf("unable to make temp dir %v", err)
}
st, err := os.Stat(tmpDir)
diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
index 828a60b24..8a642563d 100644
--- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
@@ -48,18 +48,6 @@ fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Win
Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-To aid in cross-platform testing there is a Vagrantfile for Linux and BSD.
-
-* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder.
-* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
-* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`.
-* When you're done, you will want to halt or destroy the Vagrant boxes.
-
-Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory.
-
-Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
-
### Maintainers
Help maintaining fsnotify is welcome. To be a maintainer:
@@ -67,11 +55,6 @@ Help maintaining fsnotify is welcome. To be a maintainer:
* Submit a pull request and sign the CLA as above.
* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][].
-
All code changes should be internal pull requests.
Releases are tagged using [Semantic Versioning](http://semver.org/).
-
-[hub]: https://github.com/github/hub
-[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs
diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md
index df57b1b28..7797745da 100644
--- a/vendor/github.com/fsnotify/fsnotify/README.md
+++ b/vendor/github.com/fsnotify/fsnotify/README.md
@@ -1,12 +1,10 @@
# File system notifications for Go
-[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)
+[![Go Reference](https://pkg.go.dev/badge/github.com/fsnotify/fsnotify.svg)](https://pkg.go.dev/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) [![Maintainers Wanted](https://img.shields.io/badge/maintainers-wanted-red.svg)](https://github.com/fsnotify/fsnotify/issues/413)
-fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:
-```console
-go get -u golang.org/x/sys/...
-```
+
+fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library.
Cross platform: Windows, Linux, BSD and macOS.
@@ -16,22 +14,20 @@ Cross platform: Windows, Linux, BSD and macOS.
| kqueue | BSD, macOS, iOS\* | Supported |
| ReadDirectoryChangesW | Windows | Supported |
| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
-| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
-| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) |
+| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/pull/371) |
+| fanotify | Linux 2.6.37+ | [Maybe](https://github.com/fsnotify/fsnotify/issues/114) |
| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
\* Android and iOS are untested.
-Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
+Please see [the documentation](https://pkg.go.dev/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
## API stability
-fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.
+fsnotify is a fork of [howeyc/fsnotify](https://github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
+All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/).
## Usage
@@ -84,10 +80,6 @@ func main() {
Please refer to [CONTRIBUTING][] before opening an issue or pull request.
-## Example
-
-See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
## FAQ
**When a file is moved to another directory is it still being watched?**
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
new file mode 100644
index 000000000..eb25cb407
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
@@ -0,0 +1,36 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !solaris && !windows
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!solaris,!windows
+
+package fsnotify
+
+import (
+ "fmt"
+ "runtime"
+)
+
+// Watcher watches a set of files, delivering events to a channel.
+type Watcher struct{}
+
+// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
+func NewWatcher() (*Watcher, error) {
+ return nil, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ return nil
+}
+
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
+ return nil
+}
+
+// Remove stops watching the the named file or directory (non-recursively).
+func (w *Watcher) Remove(name string) error {
+ return nil
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/go.mod b/vendor/github.com/fsnotify/fsnotify/go.mod
index 54089e48b..8d1fc1295 100644
--- a/vendor/github.com/fsnotify/fsnotify/go.mod
+++ b/vendor/github.com/fsnotify/fsnotify/go.mod
@@ -1,6 +1,6 @@
module github.com/fsnotify/fsnotify
-go 1.13
+go 1.16
require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go
index eb87699b5..a6d0e0ec8 100644
--- a/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ b/vendor/github.com/fsnotify/fsnotify/inotify.go
@@ -163,6 +163,19 @@ func (w *Watcher) Remove(name string) error {
return nil
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for pathname := range w.watches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
type watch struct {
wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
index e9ff9439f..b572a37c3 100644
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
+++ b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
@@ -38,7 +38,6 @@ func newFdPoller(fd int) (*fdPoller, error) {
poller.close()
}
}()
- poller.fd = fd
// Create epoll fd
poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go
index 368f5b790..6fb8d8532 100644
--- a/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ b/vendor/github.com/fsnotify/fsnotify/kqueue.go
@@ -148,6 +148,19 @@ func (w *Watcher) Remove(name string) error {
return nil
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for pathname := range w.watches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go
index c02b75f7c..ddc69ef87 100644
--- a/vendor/github.com/fsnotify/fsnotify/windows.go
+++ b/vendor/github.com/fsnotify/fsnotify/windows.go
@@ -12,6 +12,7 @@ import (
"fmt"
"os"
"path/filepath"
+ "reflect"
"runtime"
"sync"
"syscall"
@@ -96,6 +97,21 @@ func (w *Watcher) Remove(name string) error {
return <-in.reply
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for _, entry := range w.watches {
+ for _, watchEntry := range entry {
+ entries = append(entries, watchEntry.path)
+ }
+ }
+
+ return entries
+}
+
const (
// Options for AddWatch
sysFSONESHOT = 0x80000000
@@ -452,8 +468,16 @@ func (w *Watcher) readEvents() {
// Point "raw" to the event in the buffer
raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))
- name := syscall.UTF16ToString(buf[:raw.FileNameLength/2])
+ // TODO: Consider using unsafe.Slice that is available from go1.17
+ // https://stackoverflow.com/questions/51187973/how-to-create-an-array-or-a-slice-from-an-array-unsafe-pointer-in-golang
+ // instead of using a fixed syscall.MAX_PATH buf, we create a buf that is the size of the path name
+ size := int(raw.FileNameLength / 2)
+ var buf []uint16
+ sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
+ sh.Data = uintptr(unsafe.Pointer(&raw.FileName))
+ sh.Len = size
+ sh.Cap = size
+ name := syscall.UTF16ToString(buf)
fullname := filepath.Join(watch.path, name)
var mask uint64
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 62fa6920d..8150ab970 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -109,7 +109,7 @@ github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/sshagent
github.com/containers/buildah/pkg/util
github.com/containers/buildah/util
-# github.com/containers/common v0.47.5-0.20220413182852-c23a4e11f91b
+# github.com/containers/common v0.47.5-0.20220421072908-49f1a40067b2
## explicit
github.com/containers/common/libimage
github.com/containers/common/libimage/manifests
@@ -386,7 +386,7 @@ github.com/docker/libnetwork/types
github.com/dtylman/scp
# github.com/felixge/httpsnoop v1.0.1
github.com/felixge/httpsnoop
-# github.com/fsnotify/fsnotify v1.5.1
+# github.com/fsnotify/fsnotify v1.5.2
## explicit
github.com/fsnotify/fsnotify
# github.com/fsouza/go-dockerclient v1.7.10