From 50576daec8c8e6b9d7b51949836b934530be84e4 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 15 Nov 2021 14:24:20 +0100 Subject: [PATCH] [forwardport] fix(ios): make sure we can build an iOS release (#598) (#599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This diff forward ports f47b0c6c16e0cd417e3591358eb85b45962f307d to master. Original commit message: - - - 1. we now need to name the framework `.xcframework` otherwise gomobile refuses to build a new framework for us ¯\_(ツ)_/¯ 2. remove duplicate errno definition for iOS (iOS and darwin are considered the same, therefore we don't need iOS defs) Reference issue for this PR: https://github.com/ooni/probe/issues/1876 This diff WILL need to be forwardported to master. --- .github/workflows/ios.yml | 2 +- go.mod | 4 +- go.sum | 8 +- internal/netxlite/certifi.go | 2 +- internal/netxlite/errno.go | 2 +- internal/netxlite/errno_darwin.go | 2 +- internal/netxlite/errno_darwin_test.go | 2 +- internal/netxlite/errno_freebsd.go | 2 +- internal/netxlite/errno_freebsd_test.go | 2 +- internal/netxlite/errno_ios.go | 112 ------------ internal/netxlite/errno_ios_test.go | 188 -------------------- internal/netxlite/errno_linux.go | 2 +- internal/netxlite/errno_linux_test.go | 2 +- internal/netxlite/errno_windows.go | 2 +- internal/netxlite/errno_windows_test.go | 2 +- internal/netxlite/internal/generrno/main.go | 3 +- mk | 20 +-- 17 files changed, 28 insertions(+), 329 deletions(-) delete mode 100644 internal/netxlite/errno_ios.go delete mode 100644 internal/netxlite/errno_ios_test.go diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 5463f76..438dc2e 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -13,4 +13,4 @@ jobs: with: go-version: "1.17.3" - uses: actions/checkout@v2 - - run: ./mk OONI_PSIPHON_TAGS="" XCODE_VERSION=12.4 ./MOBILE/ios/oonimkall.framework.zip + - run: ./mk OONI_PSIPHON_TAGS="" XCODE_VERSION=12.4 ./MOBILE/ios/oonimkall.xcframework.zip diff --git a/go.mod b/go.mod index d6306b0..24a3b27 100644 --- a/go.mod +++ b/go.mod @@ -50,9 +50,9 @@ require ( gitlab.com/yawning/utls.git v0.0.12-1 golang.org/x/mod v0.5.1 // indirect golang.org/x/net v0.0.0-20211109214657-ef0fda0de508 - golang.org/x/sys v0.0.0-20211020064051-0ec99a608a1b + golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02 golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.7 // indirect + golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098 // indirect gopkg.in/AlecAivazis/survey.v1 v1.8.8 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect upper.io/db.v3 v3.8.0+incompatible diff --git a/go.sum b/go.sum index 9025c2e..143d6ec 100644 --- a/go.sum +++ b/go.sum @@ -833,8 +833,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211020064051-0ec99a608a1b h1:byBDhtWGQmWDrv1MlEv/BzGRMkw36h9QqsNnZQcDhRw= -golang.org/x/sys v0.0.0-20211020064051-0ec99a608a1b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02 h1:7NCfEGl0sfUojmX78nK9pBJuUlSZWEJA/TwASvfiPLo= +golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= @@ -871,8 +871,8 @@ golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098 h1:YuekqPskqwCCPM79F1X5Dhv4ezTCj+Ki1oNwiafxkA0= +golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/netxlite/certifi.go b/internal/netxlite/certifi.go index 1cd4845..f88cef3 100644 --- a/internal/netxlite/certifi.go +++ b/internal/netxlite/certifi.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2021-11-10 12:32:19.01980139 +0100 CET m=+0.363371740 +// 2021-11-15 13:49:26.332888 +0100 CET m=+0.458267251 // https://curl.haxx.se/ca/cacert.pem package netxlite diff --git a/internal/netxlite/errno.go b/internal/netxlite/errno.go index bcd5c2e..431778a 100644 --- a/internal/netxlite/errno.go +++ b/internal/netxlite/errno.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:24.588032308 +0100 CET m=+4.347991484 +// Generated: 2021-11-15 13:49:27.173375 +0100 CET m=+0.490372584 package netxlite diff --git a/internal/netxlite/errno_darwin.go b/internal/netxlite/errno_darwin.go index ca56433..b80c1cd 100644 --- a/internal/netxlite/errno_darwin.go +++ b/internal/netxlite/errno_darwin.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:20.240263878 +0100 CET m=+0.000223034 +// Generated: 2021-11-15 13:49:26.683306 +0100 CET m=+0.000292626 package netxlite diff --git a/internal/netxlite/errno_darwin_test.go b/internal/netxlite/errno_darwin_test.go index 9d00594..e71656a 100644 --- a/internal/netxlite/errno_darwin_test.go +++ b/internal/netxlite/errno_darwin_test.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:20.868774842 +0100 CET m=+0.628733978 +// Generated: 2021-11-15 13:49:26.819002 +0100 CET m=+0.135992126 package netxlite diff --git a/internal/netxlite/errno_freebsd.go b/internal/netxlite/errno_freebsd.go index 69d2524..84a9272 100644 --- a/internal/netxlite/errno_freebsd.go +++ b/internal/netxlite/errno_freebsd.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:21.21962196 +0100 CET m=+0.979581106 +// Generated: 2021-11-15 13:49:26.856794 +0100 CET m=+0.173784751 package netxlite diff --git a/internal/netxlite/errno_freebsd_test.go b/internal/netxlite/errno_freebsd_test.go index e3adc86..d061695 100644 --- a/internal/netxlite/errno_freebsd_test.go +++ b/internal/netxlite/errno_freebsd_test.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:21.590776904 +0100 CET m=+1.350736040 +// Generated: 2021-11-15 13:49:26.921544 +0100 CET m=+0.238535667 package netxlite diff --git a/internal/netxlite/errno_ios.go b/internal/netxlite/errno_ios.go deleted file mode 100644 index d3ce93a..0000000 --- a/internal/netxlite/errno_ios.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:21.956427226 +0100 CET m=+1.716386362 - -package netxlite - -import ( - "errors" - "syscall" - - "golang.org/x/sys/unix" -) - -// This enumeration provides a canonical name for -// every system-call error we support. Note: this list -// is system dependent. You're currently looking at -// the list of errors for ios. -const ( - ECONNREFUSED = unix.ECONNREFUSED - ECONNRESET = unix.ECONNRESET - EHOSTUNREACH = unix.EHOSTUNREACH - ETIMEDOUT = unix.ETIMEDOUT - EAFNOSUPPORT = unix.EAFNOSUPPORT - EADDRINUSE = unix.EADDRINUSE - EADDRNOTAVAIL = unix.EADDRNOTAVAIL - EISCONN = unix.EISCONN - EFAULT = unix.EFAULT - EBADF = unix.EBADF - ECONNABORTED = unix.ECONNABORTED - EALREADY = unix.EALREADY - EDESTADDRREQ = unix.EDESTADDRREQ - EINTR = unix.EINTR - EINVAL = unix.EINVAL - EMSGSIZE = unix.EMSGSIZE - ENETDOWN = unix.ENETDOWN - ENETRESET = unix.ENETRESET - ENETUNREACH = unix.ENETUNREACH - ENOBUFS = unix.ENOBUFS - ENOPROTOOPT = unix.ENOPROTOOPT - ENOTSOCK = unix.ENOTSOCK - ENOTCONN = unix.ENOTCONN - EWOULDBLOCK = unix.EWOULDBLOCK - EACCES = unix.EACCES - EPROTONOSUPPORT = unix.EPROTONOSUPPORT - EPROTOTYPE = unix.EPROTOTYPE -) - -// classifySyscallError converts a syscall error to the -// proper OONI error. Returns the OONI error string -// on success, an empty string otherwise. -func classifySyscallError(err error) string { - var errno syscall.Errno - if !errors.As(err, &errno) { - return "" - } - switch errno { - case unix.ECONNREFUSED: - return FailureConnectionRefused - case unix.ECONNRESET: - return FailureConnectionReset - case unix.EHOSTUNREACH: - return FailureHostUnreachable - case unix.ETIMEDOUT: - return FailureTimedOut - case unix.EAFNOSUPPORT: - return FailureAddressFamilyNotSupported - case unix.EADDRINUSE: - return FailureAddressInUse - case unix.EADDRNOTAVAIL: - return FailureAddressNotAvailable - case unix.EISCONN: - return FailureAlreadyConnected - case unix.EFAULT: - return FailureBadAddress - case unix.EBADF: - return FailureBadFileDescriptor - case unix.ECONNABORTED: - return FailureConnectionAborted - case unix.EALREADY: - return FailureConnectionAlreadyInProgress - case unix.EDESTADDRREQ: - return FailureDestinationAddressRequired - case unix.EINTR: - return FailureInterrupted - case unix.EINVAL: - return FailureInvalidArgument - case unix.EMSGSIZE: - return FailureMessageSize - case unix.ENETDOWN: - return FailureNetworkDown - case unix.ENETRESET: - return FailureNetworkReset - case unix.ENETUNREACH: - return FailureNetworkUnreachable - case unix.ENOBUFS: - return FailureNoBufferSpace - case unix.ENOPROTOOPT: - return FailureNoProtocolOption - case unix.ENOTSOCK: - return FailureNotASocket - case unix.ENOTCONN: - return FailureNotConnected - case unix.EWOULDBLOCK: - return FailureOperationWouldBlock - case unix.EACCES: - return FailurePermissionDenied - case unix.EPROTONOSUPPORT: - return FailureProtocolNotSupported - case unix.EPROTOTYPE: - return FailureWrongProtocolType - } - return "" -} diff --git a/internal/netxlite/errno_ios_test.go b/internal/netxlite/errno_ios_test.go deleted file mode 100644 index 5a65f3a..0000000 --- a/internal/netxlite/errno_ios_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:22.413994086 +0100 CET m=+2.173953232 - -package netxlite - -import ( - "io" - "syscall" - "testing" - - "golang.org/x/sys/unix" -) - -func TestClassifySyscallError(t *testing.T) { - t.Run("for a non-syscall error", func(t *testing.T) { - if v := classifySyscallError(io.EOF); v != "" { - t.Fatalf("expected empty string, got '%s'", v) - } - }) - - t.Run("for ECONNREFUSED", func(t *testing.T) { - if v := classifySyscallError(unix.ECONNREFUSED); v != FailureConnectionRefused { - t.Fatalf("expected '%s', got '%s'", FailureConnectionRefused, v) - } - }) - - t.Run("for ECONNRESET", func(t *testing.T) { - if v := classifySyscallError(unix.ECONNRESET); v != FailureConnectionReset { - t.Fatalf("expected '%s', got '%s'", FailureConnectionReset, v) - } - }) - - t.Run("for EHOSTUNREACH", func(t *testing.T) { - if v := classifySyscallError(unix.EHOSTUNREACH); v != FailureHostUnreachable { - t.Fatalf("expected '%s', got '%s'", FailureHostUnreachable, v) - } - }) - - t.Run("for ETIMEDOUT", func(t *testing.T) { - if v := classifySyscallError(unix.ETIMEDOUT); v != FailureTimedOut { - t.Fatalf("expected '%s', got '%s'", FailureTimedOut, v) - } - }) - - t.Run("for EAFNOSUPPORT", func(t *testing.T) { - if v := classifySyscallError(unix.EAFNOSUPPORT); v != FailureAddressFamilyNotSupported { - t.Fatalf("expected '%s', got '%s'", FailureAddressFamilyNotSupported, v) - } - }) - - t.Run("for EADDRINUSE", func(t *testing.T) { - if v := classifySyscallError(unix.EADDRINUSE); v != FailureAddressInUse { - t.Fatalf("expected '%s', got '%s'", FailureAddressInUse, v) - } - }) - - t.Run("for EADDRNOTAVAIL", func(t *testing.T) { - if v := classifySyscallError(unix.EADDRNOTAVAIL); v != FailureAddressNotAvailable { - t.Fatalf("expected '%s', got '%s'", FailureAddressNotAvailable, v) - } - }) - - t.Run("for EISCONN", func(t *testing.T) { - if v := classifySyscallError(unix.EISCONN); v != FailureAlreadyConnected { - t.Fatalf("expected '%s', got '%s'", FailureAlreadyConnected, v) - } - }) - - t.Run("for EFAULT", func(t *testing.T) { - if v := classifySyscallError(unix.EFAULT); v != FailureBadAddress { - t.Fatalf("expected '%s', got '%s'", FailureBadAddress, v) - } - }) - - t.Run("for EBADF", func(t *testing.T) { - if v := classifySyscallError(unix.EBADF); v != FailureBadFileDescriptor { - t.Fatalf("expected '%s', got '%s'", FailureBadFileDescriptor, v) - } - }) - - t.Run("for ECONNABORTED", func(t *testing.T) { - if v := classifySyscallError(unix.ECONNABORTED); v != FailureConnectionAborted { - t.Fatalf("expected '%s', got '%s'", FailureConnectionAborted, v) - } - }) - - t.Run("for EALREADY", func(t *testing.T) { - if v := classifySyscallError(unix.EALREADY); v != FailureConnectionAlreadyInProgress { - t.Fatalf("expected '%s', got '%s'", FailureConnectionAlreadyInProgress, v) - } - }) - - t.Run("for EDESTADDRREQ", func(t *testing.T) { - if v := classifySyscallError(unix.EDESTADDRREQ); v != FailureDestinationAddressRequired { - t.Fatalf("expected '%s', got '%s'", FailureDestinationAddressRequired, v) - } - }) - - t.Run("for EINTR", func(t *testing.T) { - if v := classifySyscallError(unix.EINTR); v != FailureInterrupted { - t.Fatalf("expected '%s', got '%s'", FailureInterrupted, v) - } - }) - - t.Run("for EINVAL", func(t *testing.T) { - if v := classifySyscallError(unix.EINVAL); v != FailureInvalidArgument { - t.Fatalf("expected '%s', got '%s'", FailureInvalidArgument, v) - } - }) - - t.Run("for EMSGSIZE", func(t *testing.T) { - if v := classifySyscallError(unix.EMSGSIZE); v != FailureMessageSize { - t.Fatalf("expected '%s', got '%s'", FailureMessageSize, v) - } - }) - - t.Run("for ENETDOWN", func(t *testing.T) { - if v := classifySyscallError(unix.ENETDOWN); v != FailureNetworkDown { - t.Fatalf("expected '%s', got '%s'", FailureNetworkDown, v) - } - }) - - t.Run("for ENETRESET", func(t *testing.T) { - if v := classifySyscallError(unix.ENETRESET); v != FailureNetworkReset { - t.Fatalf("expected '%s', got '%s'", FailureNetworkReset, v) - } - }) - - t.Run("for ENETUNREACH", func(t *testing.T) { - if v := classifySyscallError(unix.ENETUNREACH); v != FailureNetworkUnreachable { - t.Fatalf("expected '%s', got '%s'", FailureNetworkUnreachable, v) - } - }) - - t.Run("for ENOBUFS", func(t *testing.T) { - if v := classifySyscallError(unix.ENOBUFS); v != FailureNoBufferSpace { - t.Fatalf("expected '%s', got '%s'", FailureNoBufferSpace, v) - } - }) - - t.Run("for ENOPROTOOPT", func(t *testing.T) { - if v := classifySyscallError(unix.ENOPROTOOPT); v != FailureNoProtocolOption { - t.Fatalf("expected '%s', got '%s'", FailureNoProtocolOption, v) - } - }) - - t.Run("for ENOTSOCK", func(t *testing.T) { - if v := classifySyscallError(unix.ENOTSOCK); v != FailureNotASocket { - t.Fatalf("expected '%s', got '%s'", FailureNotASocket, v) - } - }) - - t.Run("for ENOTCONN", func(t *testing.T) { - if v := classifySyscallError(unix.ENOTCONN); v != FailureNotConnected { - t.Fatalf("expected '%s', got '%s'", FailureNotConnected, v) - } - }) - - t.Run("for EWOULDBLOCK", func(t *testing.T) { - if v := classifySyscallError(unix.EWOULDBLOCK); v != FailureOperationWouldBlock { - t.Fatalf("expected '%s', got '%s'", FailureOperationWouldBlock, v) - } - }) - - t.Run("for EACCES", func(t *testing.T) { - if v := classifySyscallError(unix.EACCES); v != FailurePermissionDenied { - t.Fatalf("expected '%s', got '%s'", FailurePermissionDenied, v) - } - }) - - t.Run("for EPROTONOSUPPORT", func(t *testing.T) { - if v := classifySyscallError(unix.EPROTONOSUPPORT); v != FailureProtocolNotSupported { - t.Fatalf("expected '%s', got '%s'", FailureProtocolNotSupported, v) - } - }) - - t.Run("for EPROTOTYPE", func(t *testing.T) { - if v := classifySyscallError(unix.EPROTOTYPE); v != FailureWrongProtocolType { - t.Fatalf("expected '%s', got '%s'", FailureWrongProtocolType, v) - } - }) - - t.Run("for the zero errno value", func(t *testing.T) { - if v := classifySyscallError(syscall.Errno(0)); v != "" { - t.Fatalf("expected empty string, got '%s'", v) - } - }) -} diff --git a/internal/netxlite/errno_linux.go b/internal/netxlite/errno_linux.go index e6b1ac4..a80417f 100644 --- a/internal/netxlite/errno_linux.go +++ b/internal/netxlite/errno_linux.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:22.795026799 +0100 CET m=+2.554985925 +// Generated: 2021-11-15 13:49:26.975879 +0100 CET m=+0.292872626 package netxlite diff --git a/internal/netxlite/errno_linux_test.go b/internal/netxlite/errno_linux_test.go index 3dbb256..1fcff25 100644 --- a/internal/netxlite/errno_linux_test.go +++ b/internal/netxlite/errno_linux_test.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:23.366945689 +0100 CET m=+3.126904885 +// Generated: 2021-11-15 13:49:27.048049 +0100 CET m=+0.365044251 package netxlite diff --git a/internal/netxlite/errno_windows.go b/internal/netxlite/errno_windows.go index 201b488..d370af4 100644 --- a/internal/netxlite/errno_windows.go +++ b/internal/netxlite/errno_windows.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:23.769840098 +0100 CET m=+3.529799255 +// Generated: 2021-11-15 13:49:27.087772 +0100 CET m=+0.404768167 package netxlite diff --git a/internal/netxlite/errno_windows_test.go b/internal/netxlite/errno_windows_test.go index 2e506f7..a8776e4 100644 --- a/internal/netxlite/errno_windows_test.go +++ b/internal/netxlite/errno_windows_test.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// Generated: 2021-11-10 12:32:24.267604596 +0100 CET m=+4.027563753 +// Generated: 2021-11-15 13:49:27.135917 +0100 CET m=+0.452914042 package netxlite diff --git a/internal/netxlite/internal/generrno/main.go b/internal/netxlite/internal/generrno/main.go index c342e26..ec76d8b 100644 --- a/internal/netxlite/internal/generrno/main.go +++ b/internal/netxlite/internal/generrno/main.go @@ -173,7 +173,7 @@ var Specs = []*ErrorSpec{ // of the related golang.org/x/sys/$name library. func mapSystemToLibrary(system string) string { switch system { - case "darwin", "freebsd", "ios", "linux": + case "darwin", "freebsd", "linux": return "unix" case "windows": return "windows" @@ -364,7 +364,6 @@ func writeSystemSpecificTestFile(system string) { var SupportedSystems = []string{ "darwin", "freebsd", - "ios", "linux", "windows", } diff --git a/mk b/mk index 05ca326..6cc5835 100755 --- a/mk +++ b/mk @@ -119,7 +119,7 @@ OONI_ANDROID_HOME = $(HOME)/.ooniprobe-build/sdk/android #help: #help: * XCODE_VERSION : the version of Xcode we expect. -XCODE_VERSION = 12.5 +XCODE_VERSION = 13.1 #quickhelp: #quickhelp: The `./mk show-config` command shows the current value of the @@ -474,20 +474,20 @@ __android_build_with_ooni_go: search/for/go #help: You can also build the following subtargets: .PHONY: ./MOBILE/ios ./MOBILE/ios: \ - ./MOBILE/ios/oonimkall.framework.zip \ + ./MOBILE/ios/oonimkall.xcframework.zip \ ./MOBILE/ios/oonimkall.podspec #help: -#help: * `./mk ./MOBILE/ios/oonimkall.framework.zip`: zip the framework -.PHONY: ./MOBILE/ios/oonimkall.framework.zip -./MOBILE/ios/oonimkall.framework.zip: search/for/zip ./MOBILE/ios/oonimkall.framework - cd ./MOBILE/ios && rm -rf oonimkall.framework.zip - cd ./MOBILE/ios && zip -yr oonimkall.framework.zip oonimkall.framework +#help: * `./mk ./MOBILE/ios/oonimkall.xcframework.zip`: zip the xcframework +.PHONY: ./MOBILE/ios/oonimkall.xcframework.zip +./MOBILE/ios/oonimkall.xcframework.zip: search/for/zip ./MOBILE/ios/oonimkall.xcframework + cd ./MOBILE/ios && rm -rf oonimkall.xcframework.zip + cd ./MOBILE/ios && zip -yr oonimkall.xcframework.zip oonimkall.xcframework #help: -#help: * `./mk ./MOBILE/ios/framework`: the framework -.PHONY: ./MOBILE/ios/oonimkall.framework -./MOBILE/ios/oonimkall.framework: search/for/go search/for/xcode maybe/copypsiphon +#help: * `./mk ./MOBILE/ios/xcframework`: the xcframework +.PHONY: ./MOBILE/ios/oonimkall.xcframework +./MOBILE/ios/oonimkall.xcframework: search/for/go search/for/xcode maybe/copypsiphon go get -u golang.org/x/mobile/cmd/gomobile $(GOMOBILE) init PATH=$(shell go env GOPATH)/bin:$$PATH $(GOMOBILE) bind -target ios -o $@ -tags="$(OONI_PSIPHON_TAGS)" -ldflags '-s -w' $(GOLANG_EXTRA_FLAGS) ./pkg/oonimkall