Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / builder / b-metrics.c
Author[]Andy Green <andy@warmcat.com> 2020-12-05 19:26 UTC
Committer[]Andy Green <andy@warmcat.com> 2020-12-06 07:48 UTC
Treec58ee64ebd594c24ec61fc3e2d96137bb66e1da6   Raw Patch
 
osx: m1 and plist scripts
osx: m1 and plist scripts
diff --git a/READMEs/README-systemd-nspawn.md b/READMEs/README-systemd-nspawn.md index b622746..e6b120a 100644 --- a/READMEs/README-systemd-nspawn.md +++ b/READMEs/README-systemd-nspawn.md @@ -327,6 +327,14 @@ Container # make -j && make -j install && ldconfig For OSX, you'll need to add something like `-DLWS_OPENSSL_INCLUDE_DIRS=/usr/local/opt/openssl@1.1/include -DLWS_OPENSSL_LIBRARIES="/usr/local/opt/openssl/lib/libssl.dylib;/usr/local/opt/openssl/lib/libcrypto.dylib"` to the cmake line +For newer M1 based OSX + +``` +cmake .. -DLWS_OPENSSL_INCLUDE_DIRS=/opt/homebrew/Cellar/openssl@1.1/1.1.1h/include '-DLWS_OPENSSL_LIBRARIES=/opt/homebrew/Cellar/openssl@1.1/1.1.1h/lib/libssl.dylib;/opt/homebrew/Cellar/openssl@1.1/1.1.1h/lib/libcrypto.dylib' -DLWS_WITH_MINIMAL_EXAMPLES=0 -DLWS_WITH_JOSE=1 -DLWS_UNIX_SOCK=1 -DLWS_WITH_STRUCT_JSON=1 \ + -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_SPAWN=1 \ + -DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_THREADPOOL=1 -DLWS_WITH_JOSE=1 +``` + ### Windows: build libgit2 For Windows, after following the way to build lws in @@ -388,7 +396,15 @@ Also in the Administrator window, copy and edit the sai-builder config For OSX, you'll need to adapt the cmake to something like +``` cmake .. -DLWS_OPENSSL_INCLUDE_DIRS=/usr/local/opt/openssl@1.1/include -DLWS_OPENSSL_LIBRARIES="/usr/local/opt/openssl/lib/libssl.dylib;/usr/local/opt/openssl/lib/libcrypto.dylib" +``` + +On the newer M1 OSX, honebrew has to be teleported in /opt, the following worked + +``` +cmake .. -DSAI_SERVER=0 -DSAI_GIT2_INC_PATH=/opt/homebrew/Cellar/libgit2/1.1.0/include -DSAI_GIT2_LIB_PATH=/opt/homebrew/Cellar/libgit2/1.1.0/lib/libgit2.dylib -DLWS_OPENSSL_INCLUDE_DIRS=/opt/homebrew/Cellar/openssl@1.1/1.1.1h/include '-DLWS_OPENSSL_LIBRARIES=/opt/homebrew/Cellar/openssl@1.1/1.1.1h/lib/libssl.dylib;/opt/homebrew/Cellar/openssl@1.1/1.1.1h/lib/libcrypto.dylib' +``` Make sai-builder run as a daemon, create the file `/Library/LaunchDaemons/com.warmcat.sai-builder.plist` diff --git a/assets/arch-aarch64-apple-m1.svg b/assets/arch-aarch64-apple-m1.svg new file mode 100644 index 0000000..09c068a --- /dev/null +++ b/assets/arch-aarch64-apple-m1.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="3.8163mm" height="3.8163mm" version="1.1" viewBox="0 0 3.8163 3.8163" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g transform="translate(-147.77 -176.5)"> + <circle cx="149.68" cy="178.4" r="1.9082" fill="#e6e6e6" opacity=".42096"/> + <path d="m148.14 178.38v-0.952h0.188c0.161 0 0.191 0 0.205 0.03 0.01 0.02 0.417 1.02 0.56 1.379l0.02 0.05 0.02-0.05c0.01-0.03 0.146-0.359 0.296-0.732l0.274-0.679h0.391v1.905h-0.305v-1.352l-0.276 0.677-0.277 0.676h-0.235l-0.27-0.663-0.271-0.664v1.337h-0.305zm2.659 0.171c0-0.43 0-0.782-0.01-0.782 0 0-0.111 0.07-0.232 0.153-0.122 0.08-0.226 0.153-0.232 0.153 0 0-0.01-0.07-0.01-0.15v-0.15l0.251-0.173 0.249-0.174h0.328v1.904h-0.342z" stroke-width=".017965"/> + </g> +</svg> diff --git a/assets/netbsd-OSX-bigsur.svg b/assets/netbsd-OSX-bigsur.svg new file mode 100644 index 0000000..3f5276c --- /dev/null +++ b/assets/netbsd-OSX-bigsur.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3.816 3.816" height="14.423" width="14.423" xmlns:v="https://vecta.io/nano"><circle cx="1.908" cy="1.908" r="1.908" opacity=".12" fill="#f9f9f9"/><path d="M1.332 3.303c-.08-.02-.166-.08-.255-.174-.04-.05-.145-.19-.165-.23 0-.02 0-.04-.04-.04 0-.02-.103-.2-.125-.262l-.124-.408v-.402c0-.137 0-.134.04-.22a.9.9 0 0 1 .208-.322c.103-.1.213-.16.364-.2a.39.39 0 0 1 .214 0c.04 0 .04.02.103.03.04 0 .125.04.166.06s.124.04.145.04c.04 0 .08-.02.207-.06.04-.02.104-.04.125-.04.124-.04.124-.04.23-.04h.124c.186.04.325.116.435.25 0 .02.04.04 0 .04-.04.05-.124.12-.145.167-.07.07-.104.157-.145.265v.34c0 .03.07.116.07.157.07.104.166.2.276.25.04.02.04.02.04.03v.03c0 .03-.04.13-.08.197-.103.207-.277.433-.39.503-.125.08-.224.07-.43 0l-.145-.05c-.104-.02-.213-.02-.33.03-.187.07-.264.09-.338.07zM1.88.986h-.04v-.02c0-.05 0-.172.04-.25.04-.112.145-.25.253-.31.08-.06.186-.1.265-.107h.04v.25c0 .02-.04.08-.04.103 0 .04-.07.12-.125.163-.08.08-.145.112-.22.143-.04.02-.08.02-.145.02z"/></svg> diff --git a/scripts/com.warmcat.sai-builder.plist b/scripts/com.warmcat.sai-builder.plist new file mode 100644 index 0000000..bc7cb31 --- /dev/null +++ b/scripts/com.warmcat.sai-builder.plist @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" + "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>PATH</key> + <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> + <key>Label</key> + <string>com.warmcat.sai-builder</string> + <key>ServiceDescription</key> + <string>Sai Builder Daemon</string> + <key>ProgramArguments</key> + <array> + <string>/usr/local/bin/sai-builder</string> + </array> + <key>RunAtLoad</key> + <true/> + + <key>StandardErrorPath</key> + <string>/var/log/sai-builder.log</string> +</dict> +</plist> + diff --git a/src/builder/b-nspawn.c b/src/builder/b-nspawn.c index f755f41..fd99352 100644 --- a/src/builder/b-nspawn.c +++ b/src/builder/b-nspawn.c @@ -210,7 +210,7 @@ static const char * const runscript = static const char * const runscript = "#!/bin/bash -x\n" #if defined(__APPLE__) - "export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin\n" + "export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin\n" #endif "export SAI_OVN=%s\n" "export SAI_PROJECT=%s\n"
Page fetched 0s ago, creation time: 3ms (vhost etag hits: 0%, cache hits: 0%)