From a59ea7db50eca6e34dc1f470b6439e67e26fc04b Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 22 Jul 2024 20:32:34 +0300 Subject: [PATCH] . --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ UNLICENSE | 24 +++++++++++++++++++++++ zstd.md | 17 +++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 README.md create mode 100644 UNLICENSE create mode 100644 zstd.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4fe2ab7 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +``` +# Alpine Linux 3.19 + +cd /var/lib/libvirt/images/ +qemu-img create -f qcow2 alpinecross.qcow2 64G +virt-install --osinfo detect=on,require=off --cdrom /root/alpine-standard-3.19.1-x86_64.iso \ + --vcpus 20 --ram 8192 --disk /var/lib/libvirt/images/alpinecross.qcow2 \ + --virt-type kvm --network network=default --graphics none --boot cdrom,hd \ + --name alpinecross + +# install os +vi /etc/apk/repositories + +# let it be +apk add alpine-sdk llvm llvm-dev gcc shadow bash openssl-dev libsodium-dev perl +apk add curl openssl-libs-static libsodium-static zstd-static + +chsh root <- /bin/bash + +# install rustup, enable it +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +edit .profile, enable env + +# only and only if you want pijul-static +cargo install pijul --version "~1.0.0-beta" +pijul clone https://nest.pijul.com/pijul/pijul + +# always +rustup target add x86_64-pc-windows-gnu +apk add mingw-w64-gcc + +# always, STATIC! +wget https://openssl.org/source/openssl-3.3.0.tar.gz +gunzip openssl-3.3.0.tar.gz +tar xvf openssl-3.3.0.tar +cd openssl-3.3.0/ +./Configure --openssldir=/usr/x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 --libdir=lib --cross-compile-prefix=x86_64-w64-mingw32- no-shared no-pinshared no-docs no-tests mingw64 +make -j20 +make DESTDIR=/ install + +# always, STATIC! +wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz +gunzip libsodium-1.0.20.tar.gz +tar xvf libsodium-1.0.20.tar +cd libsodium-1.0.20/ +./configure --prefix=/usr/x86_64-w64-mingw32 --disable-shared --host x86_64-w64-mingw32 --target x86_64-w64-mingw32 +make -j20 +make install + +# only for pijul-static +cd ~/pijul +cargo update +SODIUM_USE_PKG_CONFIG=1 PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 cargo build --release --all-features --target x86_64-pc-windows-gnu + +# only for pijul.exe +SODIUM_USE_PKG_CONFIG=1 PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 cargo install pijul --force --version "~1.0.0-beta" --all-features --target x86_64-pc-windows-gnu +``` diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/zstd.md b/zstd.md new file mode 100644 index 0000000..075907c --- /dev/null +++ b/zstd.md @@ -0,0 +1,17 @@ +``` +# let it be +apk add alpine-sdk llvm llvm-dev gcc shadow bash openssl-dev libsodium-dev perl +apk add curl openssl-libs-static libsodium-static zstd-static +apk add make mingw-w64-gcc + +wget https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz +gunzip zstd-1.5.6.tar.gz +tar xvf zstd-1.5.6.tar +cd zstd-1.5.6 + +make TARGET_SYSTEM=Windows CC=x86_64-w64-mingw32-gcc +ls -l lib/libzstd.a + +# copy +cp lib/libzstd.a /usr/x86_64-w64-mingw32/lib/ +```