Paul "TBBle" Hampson
9fd4d731d6
Fix oci.hasPrefix to operate correctly on Windows
...
Due to use of filepath.Clean(), on Windows we end up operating on the
paths in Windows-slashed form, even if the inputs were Unix-slashed.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
13bf35d640
Run all the hasPrefix test-cases, even if one fails
...
This makes it easier to see what's gone wrong if they start failing.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
32a080f0f3
Skip source tests on Windows that depend on read-write bind-mounts
...
These were previously failing due to use of sh.exe on Windows, and with
that fixed, have been revealed to depend on bind-mounts.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
31195373cf
Don't rely on sh being in the PATH on Windows for tests
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
b2d3473cba
Skip tests on Windows that attempt to bind-mount read-only
...
Containerd's mounter doesn't yet support bind-mounts on Windows.
BuildKit short-cuts this for read-write mounts, but not read-only
mounts.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
e48eaf9619
Log HostComputeNamespace name instead of the whole object
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
0c9d862645
Fix undefined variable in Windows-specific test
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
b5e6d54910
Add errors-on-non-Linux ToRootless implementation
...
`go test` complains about this tree because the package ends up with no
symbols on non-Linux platforms, e.g., Windows, even though this API is
never be called on non-Linux platforms, according to the compiler.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
5e3e18a72d
Use OS-agnostic os.SameFile instead of inode comparision
...
This fixes the build of this test under Windows.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Paul "TBBle" Hampson
f617b0828a
Fix testutil/integration build on Windows
...
Although we don't run any integration tests on Windows at this time,
this does mean that the SKIP_INTEGRATION_TESTS env-var works, so we can
run a wider range of non-integration tests without spurious failures.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Tõnis Tiigi
3ac3a61321
Merge pull request #1604 from AkihiroSuda/update-doc-20200717
...
update docs
2020-07-27 15:15:50 -07:00
Tõnis Tiigi
fe59e20f40
Merge pull request #1606 from TBBle/windows-CI-on-GitHub_Actions
...
Add initial GitHub Actions-based Windows CI
2020-07-27 08:58:38 -07:00
Paul "TBBle" Hampson
81595fe320
Add initial GitHub Actions-based Windows CI
...
Only a few tests are able to be run, because the integration test
support code fails to compile on Windows, taking effect before the
SKIP_INTEGRATION_TESTS env-var is handled.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 00:27:13 +10:00
Akihiro Suda
d73640f7a1
Merge pull request #1595 from tonistiigi/shfmt
...
hack: add shfmt
2020-07-27 18:28:06 +09:00
Akihiro Suda
3691733e70
Merge pull request #1605 from tonistiigi/update-fsutil
...
vendor: update fsutil to c3ed55f3b4
2020-07-27 16:11:25 +09:00
Tonis Tiigi
846142df61
push: reenable setting insecure exporter opt
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 23:27:19 -07:00
Tonis Tiigi
dc95525191
vendor: update fsutil to c3ed55f3b4
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 23:25:00 -07:00
Akihiro Suda
1957461428
README.md: add HLB, Earthfile, and Cargo Wharf
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 15:04:11 +09:00
Akihiro Suda
444d506251
docs/rootless.md: drop support for Debian 9 and Fedora 30
...
Debian 9 has reached EOL on 2020-07-06: https://wiki.debian.org/DebianReleases
Fedora 30 has reached EOL on 2020-05-26: https://fedoraproject.org/wiki/End_of_life
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 14:34:56 +09:00
Akihiro Suda
f22f2fc103
README.md: drop cgroup v2 notes
...
cgroup v2 is supported since runc v1.0.0-rc91 (will be included in
BuildKit since v0.7.2)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 14:31:42 +09:00
Tonis Tiigi
67044875c4
resolver: allow setting both insecure tls and http
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 18:29:45 -07:00
Akihiro Suda
e2260891a3
Merge pull request #1565 from AkihiroSuda/daemonless-show-log
...
buildctl-daemonless.sh: show log on "could not connect to ..."
2020-07-25 18:30:33 +09:00
Tonis Tiigi
8c55320f45
hack: add shfmt
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-24 21:17:54 -07:00
Tõnis Tiigi
866c12f9d2
Merge pull request #1593 from TBBle/locally_shortcut_ro_bind_mounts_on_windows
...
Locally shortcut read-only bind mounts on Windows
2020-07-24 20:05:39 -07:00
Paul "TBBle" Hampson
f9b8fc64b1
Give a name to the only mount we care about
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-24 20:40:46 +10:00
Paul "TBBle" Hampson
4e69b50469
Shortcut read-only bind-mounts in Windows, like non-Windows
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-24 20:36:39 +10:00
Akihiro Suda
11a8e7216a
Merge pull request #1590 from tonistiigi/buffer-write
...
integration: lock buffer for concurrent writes
2020-07-24 16:17:47 +09:00
Akihiro Suda
d376a39357
buildctl-daemonless.sh: show log on "could not connect to ..."
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-24 16:14:59 +09:00
Tõnis Tiigi
a67af5b10c
Merge pull request #1581 from alexcb/tar-exporter-with-socket-copy-reproduce-error
...
fix socket handling during copy
2020-07-23 12:07:15 -07:00
Tonis Tiigi
9cb0654ce4
integration: lock buffer for concurrent writes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-23 12:04:14 -07:00
Alex Couture-Beil
5382a2056e
Treat unix sockets as regular files
...
This fix is similar to the fix in #1144 ; but was hit in a different code
path.
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-07-23 11:25:48 -07:00
Tõnis Tiigi
754bcfbe51
Merge pull request #1589 from thaJeztah/update_fsutil
...
vendor: update tonistiigi/fsutil v0.0.0-20200720184806-8f851f9d2045
2020-07-23 09:25:57 -07:00
Sebastiaan van Stijn
3890bbe6f7
vendor: update tonistiigi/fsutil v0.0.0-20200720184806-8f851f9d2045
...
full diff: ae3a8d7530...8f851f9d20
notable changes:
- walker: fix notadir error
- improving error returns
- more typed errors
- remove extra verbosity (eg. PathError already contains action and path)
- ensure stack traces are added to errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-23 17:05:59 +02:00
Tõnis Tiigi
b3cf4e508c
Merge pull request #1588 from TBBle/no_chopt_works_everywhere
...
Support not chowning files on all platforms
2020-07-22 10:39:02 -07:00
Paul "TBBle" Hampson
3c96d0b863
Support not chowning files on all platforms
...
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-23 03:18:30 +10:00
Tõnis Tiigi
5de894a607
Merge pull request #1585 from TBBle/windows_cni_support
...
CNI support for Windows
2020-07-20 23:57:38 -07:00
Paul "TBBle" Hampson
50c5d4ce51
Don't add loopback CNI configuration on Windows
...
There's no Loopback CNI plugin for Windows as far as I can see, so I'm
assuming it's not needed.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:32 +10:00
Paul "TBBle" Hampson
1fedff0e4b
Reorder CNI config to set options before consumers
...
The `WithLoNetwork` and `WithConfFile` options consume the
`WithPluginDir` and `WithInterfacePrefix` settings, so they must come
first.
This fixes the issue that the provided plugin directory was not used for
the provided configuration file. This would have been more visible, but
the default `InterfacePrefix` is already "eth".
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Paul "TBBle" Hampson
dc2574ceae
Implement separate handling for Windows Network namespaces
...
The Windows API is completely different, so the common code cannot
create the unique identifier, but must accept what the OS-specific code
does.
For Linux, it's a pathname. In Windows, it's a GUID string.
This pulls in direct usage of Microsoft/hcsshim, which previously was
only an indirect usage via containerd calls from, e.g., localMounter on
Windows.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Paul "TBBle" Hampson
1645a1e2ca
Provide separate NetProviders map for Windows
...
This enforces the lack of host networking support on Windows.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Akihiro Suda
40b0d17fc5
Merge pull request #1582 from tonistiigi/new-lint
...
replace gometalinter with golangci linter
2020-07-21 14:33:15 +09:00
Tonis Tiigi
94c202bfb9
handle error returns more properly
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
5da4a40ae8
lint: enable more linters
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
dc40e5708c
client: update dialer to contextDialer
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
0ed9eb77ce
contenthash: fix buffer reuse pool
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
bd3354fea3
session: avoid deprecated grpc.Stream type
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
57abacc68d
contenthash: avoid deprecated Xattrs header
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
3e9c84ff86
avoid returning private type from public function
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
e4aaec2fea
package name fixes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
06c4197c05
rename binfmt_misc to archutil
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00