diff --git a/Makefile b/Makefile index 36ed6d3..6ecbb4c 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ launchfolder: ~/Library/LaunchAgents ~/Library/LaunchAgents: @if [ ! -d ~/Library/LaunchAgents ]; then mkdir ~/Library/LaunchAgents; fi; -# --- VIDEO ENABLER --- +# --- VIDEO ENABLER --- ve_alias: bin/video_enabler @@ -99,8 +99,6 @@ repos/osx_ios_device_trigger/osx_ios_device_trigger/main.cpp: | repos/osx_ios_de # --- VIEW LOG --- view_log: view_log.go - go get github.com/fsnotify/fsnotify - go get github.com/sirupsen/logrus go build view_log.go # --- H264_TO_JPEG --- @@ -202,7 +200,7 @@ bin/ios_video_pull: repos/ios_video_pull/ios_video_pull # --- WDA / WebDriverAgent --- repos/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer/Info.plist: | repos/WebDriverAgent - cd repos/WebDriverAgent && ./Scripts/bootstrap.sh +# cd repos/WebDriverAgent && ./Scripts/bootstrap.sh wda: bin/wda/build_info.json @@ -334,7 +332,7 @@ repos/libimobiledevice/Makefile: | repos/libimobiledevice stf: repos/stf-ios-provider/package-lock.json repos/stf-ios-provider/package-lock.json: repos/stf-ios-provider/package.json - cd repos/stf-ios-provider && PATH="/usr/local/opt/node@12/bin:$(PATH)" npm install + cd repos/stf-ios-provider && PATH="/usr/local/opt/node/bin:$(PATH)" npm install touch repos/stf-ios-provider/package-lock.json # --- OFFLINE STF --- diff --git a/config.json.example b/config.json.example index 1de7fa7..10cf9b6 100644 --- a/config.json.example +++ b/config.json.example @@ -17,6 +17,9 @@ "root_path": "[desired stf provider install folder]", "config_path": "[desired stf provider install folder]/config.json", "set_working_dir": false + }, + "bin_paths": { + "node": "/usr/local/opt/node/bin/node" } } @@ -69,7 +72,8 @@ "openvpn": "/usr/local/opt/openvpn/sbin/openvpn", "iproxy": "/usr/local/bin/iproxy", "wdawrapper": "bin/wda_wrapper", - "ffmpeg": "bin/ffmpeg" + "ffmpeg": "bin/ffmpeg", + "node": "/usr/local/opt/node/bin/node" }, "repos": { "stf": "https://github.com/nanoscopic/stf-ios-provider.git", diff --git a/coordinator/config.go b/coordinator/config.go index 28b9685..048344a 100644 --- a/coordinator/config.go +++ b/coordinator/config.go @@ -5,7 +5,7 @@ import ( "fmt" "io/ioutil" "os" - + log "github.com/sirupsen/logrus" uj "github.com/nanoscopic/ujsonin/mod" ) @@ -90,6 +90,7 @@ type BinPathConfig struct { IVF string `json:"ivf"` VideoEnabler string `json:"video_enabler"` IosDeploy string `json:"ios-deploy"` + Node string `json:"node"` } type VPNConfig struct { @@ -118,12 +119,12 @@ type DeviceConfig struct { func get_device_config( config *Config, udid string ) ( *DeviceConfig ) { dev := DeviceConfig{} - + devs := config.ujson.Get("devices") if devs == nil { return nil } - + /*devs.ForEach( func( conf *uj.JNode ) { oneid := conf.Get("udid").String() if oneid == udid { @@ -133,13 +134,13 @@ func get_device_config( config *Config, udid string ) ( *DeviceConfig ) { } )*/ dev.Width = 735 dev.Height = 1134 - + return &dev } func read_config( configPath string ) *Config { var config Config - + for { fh, serr := os.Stat( configPath ) if serr != nil { @@ -149,7 +150,7 @@ func read_config( configPath string ) *Config { "config_path": configPath, } ).Fatal("Could not read specified config path") } - + var configFile string switch mode := fh.Mode(); { case mode.IsDir(): @@ -157,7 +158,7 @@ func read_config( configPath string ) *Config { case mode.IsRegular(): configFile = configPath } - + configFh, err := os.Open( configFile ) if err != nil { log.WithFields( log.Fields{ @@ -167,9 +168,9 @@ func read_config( configPath string ) *Config { } ).Fatal("failed reading config file") } defer configFh.Close() - + jsonBytes, _ := ioutil.ReadAll( configFh ) - + defaultJson := `{ "wda_folder": "./bin/wda", "device_detector": "api", @@ -237,7 +238,8 @@ func read_config( configPath string ) *Config { "h264_to_jpeg": "bin/decode", "ivf": "bin/ivf_pull", "video_enabler": "bin/video_enabler", - "ios-deploy": "bin/ios-deploy" + "ios-deploy": "bin/ios-deploy", + "node": "/usr/local/opt/node/bin/node" }, "repos":{ "stf": "https://github.com/nanoscopic/stf-ios-provider.git", @@ -249,7 +251,7 @@ func read_config( configPath string ) *Config { "devices":[ ] }` - + config = Config{ MirrorFeedPort: 8000, WDAProxyPort: 8100, @@ -259,23 +261,23 @@ func read_config( configPath string ) *Config { DecodeInPort: 7879, UsbmuxdPort: 9920, } - + err = json.Unmarshal( []byte( defaultJson ), &config ) if err != nil { log.Fatal( "1 ", err ) } - + err = json.Unmarshal( jsonBytes, &config ) if err != nil { log.Fatal( "2 ", err ) } - + config.ujson, _ = uj.Parse( jsonBytes ) - + //jsonCombined, _ := json.MarshalIndent(config, "", " ") //fmt.Printf("Combined config:%s\n", string( jsonCombined ) ) //os.Exit(0) - + if config.ConfigPath != "" { configPath = config.ConfigPath continue diff --git a/coordinator/go.mod b/coordinator/go.mod index 4d7df1b..74881c3 100644 --- a/coordinator/go.mod +++ b/coordinator/go.mod @@ -6,6 +6,7 @@ require ( github.com/elastic/go-sysinfo v1.4.0 github.com/fsnotify/fsnotify v1.4.7 github.com/go-cmd/cmd v1.2.0 + github.com/google/gops v0.3.27 // indirect github.com/jviney/go-proc v0.2.0 github.com/nanoscopic/ujsonin v1.9.0 github.com/sirupsen/logrus v1.4.2 diff --git a/coordinator/proc_device_unit.go b/coordinator/proc_device_unit.go index d2cda96..da3365d 100644 --- a/coordinator/proc_device_unit.go +++ b/coordinator/proc_device_unit.go @@ -22,7 +22,7 @@ func proc_device_ios_unit( o ProcOptions, uuid string, curIP string) { if o.config.Video.UseVnc && o.config.Video.Enabled { vncPort = o.devd.vncPort } - + secure := o.config.FrameServer.Secure var frameServer string if secure { @@ -30,9 +30,9 @@ func proc_device_ios_unit( o ProcOptions, uuid string, curIP string) { } else { frameServer = fmt.Sprintf("ws://%s:%d/echo", curIP, o.devd.vidPort) } - + curDir, _ := os.Getwd() - + o.args = []string{ fmt.Sprintf("--inspect=0.0.0.0:%d", o.devd.devIosPort), "runmod.js" , "device-ios", @@ -71,7 +71,7 @@ func proc_device_ios_unit( o ProcOptions, uuid string, curIP string) { "clickHeight": o.devd.clickHeight, "frame_server": frameServer, } - + devd := o.devd o.stderrHandler = func( line string, plog *log.Entry ) (bool) { if strings.Contains( line, "Now owned by" ) { @@ -115,8 +115,7 @@ func proc_device_ios_unit( o ProcOptions, uuid string, curIP string) { return true } o.procName = "stf_device_ios" - o.binary = "/usr/local/opt/node@12/bin/node" + o.binary = o.config.BinPaths.Node o.startDir = "./repos/stf-ios-provider" proc_generic( o ) } - diff --git a/coordinator/proc_stf_provider.go b/coordinator/proc_stf_provider.go index fd0cc2e..f002c21 100644 --- a/coordinator/proc_stf_provider.go +++ b/coordinator/proc_stf_provider.go @@ -9,16 +9,16 @@ import ( func proc_stf_provider( o ProcOptions, curIP string ) { o.binary = o.config.BinPaths.IosVideoStream - + serverHostname := o.config.Stf.HostName clientHostname, _ := os.Hostname() serverIP := o.config.Stf.Ip - + location := fmt.Sprintf("macmini/%s", clientHostname) if o.config.Stf.Location != "" { location = o.config.Stf.Location } - + o.startFields = log.Fields { "client_ip": curIP, "server_ip": serverIP, @@ -26,7 +26,7 @@ func proc_stf_provider( o ProcOptions, curIP string ) { "server_hostname": serverHostname, "location": location, } - o.binary = "/usr/local/opt/node@12/bin/node" + o.binary = o.config.BinPaths.Node o.args = []string { "--inspect=127.0.0.1:9230", "runmod.js" , "provider", diff --git a/coordinator/shutdown.go b/coordinator/shutdown.go index 41f77e3..20c6f57 100644 --- a/coordinator/shutdown.go +++ b/coordinator/shutdown.go @@ -25,26 +25,26 @@ func cleanup_procs(config *Config) { "ivf": config.BinPaths.IVF, "ios-deploy": config.BinPaths.IosDeploy, } - + // Cleanup hanging processes if any procs, listErr := si.Processes() if listErr != nil { fmt.Printf( "listErr:%s\n", listErr ) os.Exit(1) } - + var hangingPids []int - + for _, proc := range procs { info, infoErr := proc.Info() if infoErr != nil { //fmt.Printf( "infoErr:%s\n", infoErr ) continue } - + cmd := info.Args //cmdFlat := strings.Join( cmd, " " ) - + for k,v := range procMap { if cmd[0] == v { pid := proc.PID() @@ -52,49 +52,49 @@ func cleanup_procs(config *Config) { "proc": k, "pid": pid, } ).Warn("Leftover " + k + " - Sending SIGTERM") - + syscall.Kill( pid, syscall.SIGTERM ) - hangingPids = append( hangingPids, pid ) + hangingPids = append( hangingPids, pid ) } } - + /*if strings.Contains( cmdFlat, "node" ) { log.WithFields( log.Fields{ "cmdLine": cmdFlat, } ).Info("Leftover Node proc") }*/ - + // node --inspect=[ip]:[port] runmod.js device-ios - if cmd[0] == "/usr/local/opt/node@12/bin/node" && cmd[3] == "device-ios" { + if cmd[0] == config.BinPaths.Node && cmd[3] == "device-ios" { pid := proc.PID() - + plog.WithFields( log.Fields{ "proc": "device-ios", "pid": pid, } ).Warn("Leftover Proc - Sending SIGTERM") syscall.Kill( pid, syscall.SIGTERM ) - hangingPids = append( hangingPids, pid ) + hangingPids = append( hangingPids, pid ) } // node --inspect=[ip]:[port] runmod.js provider - if cmd[0] == "/usr/local/opt/node@12/bin/node" && cmd[3] == "provider" { + if cmd[0] == config.BinPaths.Node && cmd[3] == "provider" { pid := proc.PID() - + plog.WithFields( log.Fields{ "proc": "stf_provider", "pid": pid, } ).Warn("Leftover Proc - Sending SIGTERM") - + syscall.Kill( pid, syscall.SIGTERM ) - hangingPids = append( hangingPids, pid ) + hangingPids = append( hangingPids, pid ) } } - + if len( hangingPids ) > 0 { // Give the processes half a second to shudown cleanly time.Sleep( time.Millisecond * 500 ) - + // Send kill to processes still around for _, pid := range( hangingPids ) { proc, _ := si.Process( pid ) @@ -108,14 +108,14 @@ func cleanup_procs(config *Config) { // If the process vanished before here; it errors out fetching info continue } - + plog.WithFields( log.Fields{ "arg0": arg0, } ).Warn("Leftover Proc - Sending SIGKILL") syscall.Kill( pid, syscall.SIGKILL ) } } - + // Spend up to 500 ms waiting for killed processes to vanish i := 0 for { @@ -136,7 +136,7 @@ func cleanup_procs(config *Config) { break } } - + // Write out error messages for processes that could not be killed for _, pid := range( hangingPids ) { proc, _ := si.Process( pid ) @@ -148,7 +148,7 @@ func cleanup_procs(config *Config) { } args := info.Args arg0 = args[0] - + plog.WithFields( log.Fields{ "arg0": arg0, } ).Error("Kill attempted and failed") @@ -167,7 +167,7 @@ func closeRunningDev( devd *RunningDev, portMap *PortMap ) { devd.lock.Lock() devd.shuttingDown = true devd.lock.Unlock() - + if portMap != nil { free_ports( devd.wdaPort, devd.vidPort, devd.devIosPort, devd.vncPort, devd.usbmuxdPort, portMap ) } @@ -188,7 +188,7 @@ func closeRunningDev( devd *RunningDev, portMap *PortMap ) { func closeBaseProgs( baseProgs *BaseProgs ) { baseProgs.shuttingDown = true vpn_shutdown( baseProgs ) - + plog := log.WithFields( log.Fields{ "type": "proc_cleanup_kill" } ) for k,v := range( baseProgs.process ) { @@ -210,10 +210,10 @@ func coro_sigterm( runningDevs map [string] *RunningDev, baseProgs *BaseProgs, c // This triggers zmq to stop receiving // We don't actually wait after this to ensure it has finished cleanly... oh well :) gStop = true - + closeAllRunningDevs( runningDevs ) closeBaseProgs( baseProgs ) - + time.Sleep( time.Millisecond * 1000 ) cleanup_procs( config ) @@ -224,4 +224,4 @@ func coro_sigterm( runningDevs map [string] *RunningDev, baseProgs *BaseProgs, c os.Exit(0) }() -} \ No newline at end of file +} diff --git a/get-version-info.sh b/get-version-info.sh index 2c458f8..06045b4 100755 --- a/get-version-info.sh +++ b/get-version-info.sh @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 import json import os @@ -19,21 +19,21 @@ def git_info( dir ): cmd = ["/usr/bin/git","-C","./"+dir,"log","-1", "--no-merges"] try: - res = subprocess.check_output( cmd, stderr=subprocess.STDOUT ) + res = subprocess.check_output( cmd, stderr=subprocess.STDOUT ).decode('utf-8') except subprocess.CalledProcessError as e: #sys.stderr.write( e.output ) return { "error": "missing"#e.output } - - remote = subprocess.check_output( ["/usr/bin/git", "-C", "./" + dir, "remote","-v"] ) - + + remote = subprocess.check_output( ["/usr/bin/git", "-C", "./" + dir, "remote","-v"] ).decode('utf-8') + res = res[:-1] # remove trailing "\n" remote = remote[:-1] remote = remote.split("\n")[0].split("\t") # just first line - + parts = res.split("\n") - + return { "commit": parts[0][7:], # remove 'commit ' "author": parts[1][7:].lstrip(), # remove 'Author:' and spaces @@ -42,7 +42,7 @@ def git_info( dir ): } def xcode_version(): - res = subprocess.check_output( ["/usr/bin/xcodebuild", "-version"] ) + res = subprocess.check_output( ["/usr/bin/xcodebuild", "-version"] ).decode('utf-8') res = res[:-1] return res.split("\n") @@ -73,5 +73,5 @@ else: if args.wdasource != 1: data["wda"] = wda_root["wda"] -print json.dumps( data, indent = 2 ) +print(json.dumps( data, indent = 2 )) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ebcafb4 --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module view_log.go + +go 1.12 + +require ( + github.com/fsnotify/fsnotify v1.6.0 + github.com/google/gousb v0.0.0-20190812193832-18f4c1d8a750 // indirect + github.com/sirupsen/logrus v1.9.3 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..baea009 --- /dev/null +++ b/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/google/gousb v0.0.0-20190812193832-18f4c1d8a750 h1:DVKHLo3yE4psTjD9aM2pY7EHoicaQbgmaxxvvHC6ZSM= +github.com/google/gousb v0.0.0-20190812193832-18f4c1d8a750/go.mod h1:Tl4HdAs1ThE3gECkNwz+1MWicX6FXddhJEw7L8jRDiI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956 h1:XeJjHH1KiLpKGb6lvMiksZ9l0fVUh+AmGcm0nOMEBOY= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/init.sh b/init.sh index 4335325..773932e 100755 --- a/init.sh +++ b/init.sh @@ -21,10 +21,10 @@ function assert_has_xcodebuild() { XCODE_MAJOR_VERSION=`echo $XCODE_VERSION | perl -pe 's/([0-9]+)\.[0-9]+/$1/'` XCODE_MINOR_VERSION=`echo $XCODE_VERSION | perl -pe 's/[0-9]+\.([0-9]+)/$1/'` fi - + #echo "XCODE Version: $XCODE_VERSION" #echo "XCODE Version: Major = $XCODE_MAJOR_VERSION, Minor = $XCODE_MINOR_VERSION" - + if [ $XCODE_MAJOR_VERSION > 10 ]; then echo -e "${GR}Xcode $XCODE_VERSION installed$RST" elif [ "$XCODE_VERSION" == "10.3" ]; then @@ -39,8 +39,16 @@ function assert_has_xcodebuild() { install_brew_if_needed assert_has_xcodebuild ./util/brewser.pl installdeps stf_ios_support.rb + ./util/brewser.pl ensurehead libplist 2.2.1 ./util/brewser.pl fixpc libplist 2.0 -./util/brewser.pl ensurehead libusbmuxd 2.0.3 + +brew install --build-from-source --HEAD libimobiledevice-glue.rb +./util/brewser.pl fixpc libimobiledevice-glue 1.0 + +brew install --build-from-source --HEAD libusbmuxd.rb ./util/brewser.pl fixpc libusbmuxd 2.0 -#make libimd \ No newline at end of file + +brew install --build-from-source --HEAD libimobiledevice.rb + +make libimd diff --git a/libimobiledevice-glue.rb b/libimobiledevice-glue.rb new file mode 100644 index 0000000..666a0f6 --- /dev/null +++ b/libimobiledevice-glue.rb @@ -0,0 +1,18 @@ +class LibimobiledeviceGlue < Formula + desc "" + homepage "" + license "" + head "https://github.com/libimobiledevice/libimobiledevice-glue.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkg-config" => :build + depends_on "libplist" + + def install + system "./autogen.sh", "--prefix=#{prefix}" + system "make", "install" + end + +end diff --git a/libimobiledevice.rb b/libimobiledevice.rb new file mode 100644 index 0000000..c7593c4 --- /dev/null +++ b/libimobiledevice.rb @@ -0,0 +1,51 @@ +class Libimobiledevice < Formula + desc "Library to communicate with iOS devices natively" + homepage "https://www.libimobiledevice.org/" + url "https://github.com/libimobiledevice/libimobiledevice/releases/download/1.3.0/libimobiledevice-1.3.0.tar.bz2" + sha256 "53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6" + license "LGPL-2.1" + + bottle do + sha256 cellar: :any, arm64_ventura: "011e027433848f23cd9d96aee9f46531f48f8462bd763fe799e09b36eeaa4851" + sha256 cellar: :any, arm64_monterey: "f3c97e567f59c4a8ab79f8a3d66a32d109fc9a7c22891589b998edb6a4e5ba28" + sha256 cellar: :any, arm64_big_sur: "41a64c9856f7845bb4c21bba4f42eb55c640301b59c032eb4db416db19ecf97d" + sha256 cellar: :any, ventura: "3db04118fec82077bd2b1a3e137f3a6a6037aeaa094865fc3d1187d7f795a308" + sha256 cellar: :any, monterey: "2cde67c8eef4e971ce74428a9162e9680d7a9ab542571f438602efe431d3a121" + sha256 cellar: :any, big_sur: "0fe21433f470130b972354d411d05f43ab37d82198565bb6b947734a95e98c5d" + sha256 cellar: :any, catalina: "eb7f28d86797461d5ef859d00629176e1ce3234790ef17b9ee3f9c9990a664e2" + sha256 cellar: :any, mojave: "5143eaf34011a22dd1951f10495a7568e77a2e862fb9f4dbae9bab2f784f926e" + sha256 cellar: :any, high_sierra: "072d224a0fa2a77bccde27eee39b65300a387613b41f07fc677108a7812ec003" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3a744d1aa95788a31c40fa0029e5f70631e81b040375bf92f18c845371a7f4a" + end + + head do + url "https://git.libimobiledevice.org/libimobiledevice.git" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libimobiledevice-glue" + end + + depends_on "pkg-config" => :build + depends_on "libplist" + depends_on "libimobiledevice-glue" + depends_on "libtasn1" + depends_on "libusbmuxd" + depends_on "openssl@1.1" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + # As long as libplist builds without Cython + # bindings, libimobiledevice must as well. + "--without-cython", + "--enable-debug-code" + system "make", "install" + end + + test do + system "#{bin}/idevicedate", "--help" + end +end diff --git a/libusbmuxd.rb b/libusbmuxd.rb new file mode 100644 index 0000000..58e92d6 --- /dev/null +++ b/libusbmuxd.rb @@ -0,0 +1,50 @@ +class Libusbmuxd < Formula + desc "USB multiplexor library for iOS devices" + homepage "https://www.libimobiledevice.org/" + url "https://github.com/libimobiledevice/libusbmuxd/archive/2.0.2.tar.gz" + sha256 "8ae3e1d9340177f8f3a785be276435869363de79f491d05d8a84a59efc8a8fdc" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://github.com/libimobiledevice/libusbmuxd.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_ventura: "839072b0f95782fb42835a56e17177d641efab6aed22e1864f6cbcf5501f4e5a" + sha256 cellar: :any, arm64_monterey: "27d1d27bbc4b9b2079bebe6460610c4c57acc9f2cffe51374ede91b717f7b49b" + sha256 cellar: :any, arm64_big_sur: "9cd9d1df802799e026f09775bbde2c4bf0557fb3e1f5919f14a5b0def0b0255e" + sha256 cellar: :any, ventura: "6f10083e1ab4c71cc4f21e570f1a6a988198f74dea26a0740625abce646ddc02" + sha256 cellar: :any, monterey: "b5e52f9c8804a553ee3832d13c3e2a56a3253f17573addc3d8231c1503b35d07" + sha256 cellar: :any, big_sur: "faf8346e0e4caa8ac7c4ac7e3b838693f847a88120cf477b8e8c82bd0a7628f6" + sha256 cellar: :any, catalina: "72fcc67099f03a3d68faa131eaf464a431e5d5eaea0a5ddb9b8414c065f7ef73" + sha256 cellar: :any, mojave: "132ee76aa823e51abb97c92c53ab8a30819720ced7020080f949cf4fd937f6ea" + sha256 cellar: :any, high_sierra: "67c3d43cb2a1ebfd68fba1c9b51b419288fedefc93f101adeea1b5f6bdf1ad77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1f289531042024ef7fb1f87cad05f36a1c68ece14614266cf0564e32b3565ac" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkg-config" => :build + depends_on "libimobiledevice-glue" + depends_on "libplist" + depends_on "libusb" + + uses_from_macos "netcat" => :test + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + source = free_port + dest = free_port + fork do + exec bin/"iproxy", "-s", "localhost", "#{source}:#{dest}" + end + + sleep(2) + system "nc", "-z", "localhost", source + end +end diff --git a/server/docker-compose.yml b/server/docker-compose.yml index c94cda4..7238f96 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -84,7 +84,7 @@ services: --bind-dealer "tcp://*:7160" --bind-pull "tcp://*:7170" volumes: - - ./runcli.js:/app/runcli.js + - ./runcli.js:/app/runcli.js ports: - 10005:9229 dev-triproxy: @@ -188,11 +188,10 @@ services: --connect-sub-dev tcp://dev-triproxy:7250 --connect-push-dev tcp://dev-triproxy:7270 ports: - - 10001:9229 + - "10001:9229" + - "9229:9229" volumes: - ./runcli.js:/app/runcli.js - ports: - - 9229:9229 depends_on: - migrate - rethinkdb diff --git a/server/storage-temp/Dockerfile b/server/storage-temp/Dockerfile index 96a334b..60dfe10 100644 --- a/server/storage-temp/Dockerfile +++ b/server/storage-temp/Dockerfile @@ -1,4 +1,4 @@ -FROM livxtrm/devicefarmer:latest +FROM devicefarmer:latest USER root RUN mkdir data && chown stf:stf data diff --git a/stf_ios_support.rb b/stf_ios_support.rb index eb6ceac..21b3f92 100644 --- a/stf_ios_support.rb +++ b/stf_ios_support.rb @@ -25,7 +25,7 @@ def install # depends_on "libimobiledevice" # need to install with --HEAD depends_on "go" => :build depends_on :xcode => "10.3" - depends_on "node@12" + depends_on "node" depends_on "libsodium" depends_on "czmq" depends_on "jpeg-turbo"