diff --git a/network/git-lfs-transfer/README b/network/git-lfs-transfer/README new file mode 100644 index 00000000000..14e8f974120 --- /dev/null +++ b/network/git-lfs-transfer/README @@ -0,0 +1,20 @@ +git-lfs-transfer + +git-lfs-transfer provides an experimental server-side +implementation of the proposed Git LFS pure SSH-based +protocol. This utility is intended to be invoked over SSH to +transfer data from one repository to another. The Git LFS +documentation outlines the protocol. + +That is, if you want to use git-lfs for tracking large +files, but without an http server, git would normally only +be able to clone and push within one machine. + +This binary extends the support of "naive LFS" for multiple +machines connected over ssh. It needs to be installed on a +machine deemed "remote", that is the one you are pushing TO, +or pulling FROM. The machine ON which git-lfs checkouts +large files does not need to have this binary. + +The program nees no configuration, git automatically invokes +it if finds. diff --git a/network/git-lfs-transfer/git-lfs-transfer.SlackBuild b/network/git-lfs-transfer/git-lfs-transfer.SlackBuild new file mode 100644 index 00000000000..82c00c1d7ca --- /dev/null +++ b/network/git-lfs-transfer/git-lfs-transfer.SlackBuild @@ -0,0 +1,176 @@ +#!/bin/bash + +# Slackware build script for git-lfs-transfer + +# Copyright 2024 Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=git-lfs-transfer +TARNAM=scutiger +CMDNAM=git-lfs-transfer +VERSION=${VERSION:-0.2.0.20240108} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +COMMIT=614a4f01cfbe6aafa355ca92ed6d1581b5cfc088 + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac + + if [ "$ARCH" = "i586" ]; then + if rustc -Vv | grep host | grep i686 > /dev/null ; then + ARCH=i686 + fi + fi +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + CARGOTARGET="--target i586-unknown-linux-gnu" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + CARGOTARGET="--target i686-unknown-linux-gnu" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + CARGOTARGET="--target x86_64-unknown-linux-gnu" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + CARGOTARGET="" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $TARNAM-$COMMIT +tar xvf $CWD/$TARNAM-$COMMIT.tar.gz +cd $TARNAM-$COMMIT + +# build offline +# configuration tells cargo to use the configured directory +# for dependencies instead of downloading from crates.io +rm -rf $TMP/$TARNAM-$VERSION/.cargo +mkdir .cargo +cat << EOF >> .cargo/config +[source.crates-io] +registry = 'https://github.com/rust-lang/crates.io-index' +replace-with = 'vendored-sources' + +[source.vendored-sources] +directory = '$(pwd)/vendor' +EOF + +# deps and versions come from Cargo.lock +mkdir vendor +( + set -e + cd vendor + + grep -h -A 3 "\[\[package\]\]" $(find ../ -maxdepth 1 -mindepth 1 -name Cargo.lock | tr '\n' ' ') | \ + sed 's/[[:space:]]*=[[:space:]]*/=/g;s/^--//;s/^\[\[/--\n[[/' | \ + awk 'BEGIN { RS = "--\n" ; FS="\n" } { print $2, $3, $4 }' | sed 's/"//g;s/name=//;s/ version=/=/' | \ + grep crates\.io-index | sed 's/ source=.*$//' | sort -u | while read -r dep ; do + + ver="$(printf "%s\n" "$dep" | cut -d= -f2)" + dep="$(printf "%s\n" "$dep" | cut -d= -f1)" + + tar xvf $CWD/$dep-$ver.crate + + touch $dep-$ver/.cargo-ok + + # generate checksum + { + printf "{\n" + printf ' "files": {\n' + + ( + cd $dep-$ver + find . -type f -print0 | xargs -0 sha256sum | sed -n '/\.cargo-checksum\.json/!p' | sed 's/\.\///;s/^\([^ ]*\)[[:space:]][[:space:]]*\(.*\)$/"\2":"\1",/' + ) | sed '$ s/,$//' + + printf " },\n" + printf ' "package": "' + + sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/' + + printf "}\n" + } > $dep-$ver/.cargo-checksum.json + done +) + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} + -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + + +export PATH="/opt/rust/bin:$PATH" +if [ -z "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX" +else + export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH" +fi + + +CARGO_HOME=.cargo \ +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +cargo --verbose build --offline --release --locked $CARGOTARGET + +mkdir -p $PKG/usr/bin/ +find target -name $CMDNAM -exec install -m 755 {} $PKG/usr/bin/$CMDNAM \; + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGELOG LICENSE README.adoc doc $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/network/git-lfs-transfer/git-lfs-transfer.info b/network/git-lfs-transfer/git-lfs-transfer.info new file mode 100644 index 00000000000..5fa5b97bee4 --- /dev/null +++ b/network/git-lfs-transfer/git-lfs-transfer.info @@ -0,0 +1,176 @@ +PRGNAM="git-lfs-transfer" +VERSION="0.2.0.20240108" +HOMEPAGE="https://github.com/bk2204/scutiger" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/bk2204/scutiger/archive/614a4f01cfbe6aafa355ca92ed6d1581b5cfc088/scutiger-614a4f01cfbe6aafa355ca92ed6d1581b5cfc088.tar.gz \ +https://static.crates.io/crates/android-tzdata/android-tzdata-0.1.1.crate \ +https://static.crates.io/crates/android_system_properties/android_system_properties-0.1.5.crate \ +https://static.crates.io/crates/ansi_term/ansi_term-0.11.0.crate \ +https://static.crates.io/crates/autocfg/autocfg-1.0.1.crate \ +https://static.crates.io/crates/bitflags/bitflags-1.3.2.crate \ +https://static.crates.io/crates/block-buffer/block-buffer-0.9.0.crate \ +https://static.crates.io/crates/bumpalo/bumpalo-3.14.0.crate \ +https://static.crates.io/crates/byteorder/byteorder-1.3.4.crate \ +https://static.crates.io/crates/bytes/bytes-0.4.12.crate \ +https://static.crates.io/crates/cc/cc-1.0.61.crate \ +https://static.crates.io/crates/cfg-if/cfg-if-0.1.10.crate \ +https://static.crates.io/crates/cfg-if/cfg-if-1.0.0.crate \ +https://static.crates.io/crates/chrono/chrono-0.4.30.crate \ +https://static.crates.io/crates/clap/clap-2.33.3.crate \ +https://static.crates.io/crates/core-foundation-sys/core-foundation-sys-0.8.4.crate \ +https://static.crates.io/crates/cpuid-bool/cpuid-bool-0.1.2.crate \ +https://static.crates.io/crates/ctor/ctor-0.1.16.crate \ +https://static.crates.io/crates/difference/difference-2.0.0.crate \ +https://static.crates.io/crates/digest/digest-0.9.0.crate \ +https://static.crates.io/crates/errno/errno-0.3.5.crate \ +https://static.crates.io/crates/fastrand/fastrand-1.9.0.crate \ +https://static.crates.io/crates/generic-array/generic-array-0.14.4.crate \ +https://static.crates.io/crates/git2/git2-0.16.1.crate \ +https://static.crates.io/crates/hermit-abi/hermit-abi-0.3.3.crate \ +https://static.crates.io/crates/hex/hex-0.4.2.crate \ +https://static.crates.io/crates/iana-time-zone/iana-time-zone-0.1.50.crate \ +https://static.crates.io/crates/idna/idna-0.2.0.crate \ +https://static.crates.io/crates/instant/instant-0.1.12.crate \ +https://static.crates.io/crates/io-lifetimes/io-lifetimes-1.0.11.crate \ +https://static.crates.io/crates/iovec/iovec-0.1.4.crate \ +https://static.crates.io/crates/jobserver/jobserver-0.1.21.crate \ +https://static.crates.io/crates/js-sys/js-sys-0.3.49.crate \ +https://static.crates.io/crates/lazy_static/lazy_static-1.4.0.crate \ +https://static.crates.io/crates/libc/libc-0.2.149.crate \ +https://static.crates.io/crates/libgit2-sys/libgit2-sys-0.14.2+1.5.1.crate \ +https://static.crates.io/crates/libz-sys/libz-sys-1.1.2.crate \ +https://static.crates.io/crates/linux-raw-sys/linux-raw-sys-0.3.8.crate \ +https://static.crates.io/crates/log/log-0.4.11.crate \ +https://static.crates.io/crates/matches/matches-0.1.8.crate \ +https://static.crates.io/crates/num-traits/num-traits-0.2.14.crate \ +https://static.crates.io/crates/once_cell/once_cell-1.5.2.crate \ +https://static.crates.io/crates/opaque-debug/opaque-debug-0.3.0.crate \ +https://static.crates.io/crates/output_vt100/output_vt100-0.1.2.crate \ +https://static.crates.io/crates/passwd/passwd-0.0.1.crate \ +https://static.crates.io/crates/pcre2-sys/pcre2-sys-0.2.0.crate \ +https://static.crates.io/crates/pcre2/pcre2-0.2.3.crate \ +https://static.crates.io/crates/percent-encoding/percent-encoding-2.1.0.crate \ +https://static.crates.io/crates/pkg-config/pkg-config-0.3.27.crate \ +https://static.crates.io/crates/pretty_assertions/pretty_assertions-0.6.1.crate \ +https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.24.crate \ +https://static.crates.io/crates/quote/quote-1.0.7.crate \ +https://static.crates.io/crates/redox_syscall/redox_syscall-0.3.5.crate \ +https://static.crates.io/crates/rustix/rustix-0.37.25.crate \ +https://static.crates.io/crates/sha2/sha2-0.9.1.crate \ +https://static.crates.io/crates/syn/syn-1.0.43.crate \ +https://static.crates.io/crates/tempfile/tempfile-3.6.0.crate \ +https://static.crates.io/crates/textwrap/textwrap-0.11.0.crate \ +https://static.crates.io/crates/thread_local/thread_local-1.1.4.crate \ +https://static.crates.io/crates/typenum/typenum-1.12.0.crate \ +https://static.crates.io/crates/unicode-bidi/unicode-bidi-0.3.4.crate \ +https://static.crates.io/crates/unicode-normalization/unicode-normalization-0.1.6.crate \ +https://static.crates.io/crates/unicode-width/unicode-width-0.1.8.crate \ +https://static.crates.io/crates/unicode-xid/unicode-xid-0.2.1.crate \ +https://static.crates.io/crates/url/url-2.1.1.crate \ +https://static.crates.io/crates/vcpkg/vcpkg-0.2.10.crate \ +https://static.crates.io/crates/version_check/version_check-0.9.2.crate \ +https://static.crates.io/crates/wasm-bindgen-backend/wasm-bindgen-backend-0.2.72.crate \ +https://static.crates.io/crates/wasm-bindgen-macro-support/wasm-bindgen-macro-support-0.2.72.crate \ +https://static.crates.io/crates/wasm-bindgen-macro/wasm-bindgen-macro-0.2.72.crate \ +https://static.crates.io/crates/wasm-bindgen-shared/wasm-bindgen-shared-0.2.72.crate \ +https://static.crates.io/crates/wasm-bindgen/wasm-bindgen-0.2.72.crate \ +https://static.crates.io/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate \ +https://static.crates.io/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate \ +https://static.crates.io/crates/winapi/winapi-0.3.9.crate \ +https://static.crates.io/crates/windows-sys/windows-sys-0.48.0.crate \ +https://static.crates.io/crates/windows-targets/windows-targets-0.48.5.crate \ +https://static.crates.io/crates/windows_aarch64_gnullvm/windows_aarch64_gnullvm-0.48.5.crate \ +https://static.crates.io/crates/windows_aarch64_msvc/windows_aarch64_msvc-0.48.5.crate \ +https://static.crates.io/crates/windows_i686_gnu/windows_i686_gnu-0.48.5.crate \ +https://static.crates.io/crates/windows_i686_msvc/windows_i686_msvc-0.48.5.crate \ +https://static.crates.io/crates/windows_x86_64_gnu/windows_x86_64_gnu-0.48.5.crate \ +https://static.crates.io/crates/windows_x86_64_gnullvm/windows_x86_64_gnullvm-0.48.5.crate \ +https://static.crates.io/crates/windows_x86_64_msvc/windows_x86_64_msvc-0.48.5.crate" +MD5SUM_x86_64="b52f6ec4fc06a2a9e3b3835c9af43a05 \ +e0a03581a6aea080315323651f272d65 \ +bf23cd323c33a8c283c41bb9b79e4ce4 \ +294a49d3c53865fa7ac5d0ce2f5d5735 \ +c6443ec8d007c729ba5482008d0c864d \ +a295edb6953237ebbdfa8e731229f9a3 \ +c7fbaf61245dc847237ab7c72b3ee9ea \ +d8cacbb844fca8c0ca102c7576946131 \ +e502e6c6b0dca9c1ae2d99e92b26f645 \ +1d02fa9f0fca9470a24a05e7c155993d \ +87343079a03b28726b323c5c40c9167c \ +882dbbc613a93f64c3709b0a2bd0d6dc \ +74634128440dbc3766bda76fdf0aaa05 \ +a80fc16877f8d9c2b99942cbf28ca15f \ +bc79e0eb364df515a33755ac9a581cfd \ +b477cc1c7b45e2187b3cad0377b504d8 \ +e0a69519ad697a923799407d8b01f7e5 \ +3b94aa3d3b52930713c7558c1cf0d806 \ +5e49f4c3f9076fe30ae207fe951f9195 \ +493a2f042d86baa5c6bac75202c64554 \ +616ae19b360c12012591da557ee83f41 \ +06e723078de46119c270eea21ec4344e \ +65cd30f86e785b77fd82e0693d126e26 \ +2c94354dff5ae2870327df7b15fd6bac \ +b5fc3a27c94dc7bab487e15228c82d58 \ +139e82145454c3890131417576dd0b97 \ +65234f27af80ca5cd554a4b3d01c1d73 \ +54ac4c56d9ec2800b8428020f24be67c \ +5f153f7135dceb02f88266121c836b4e \ +c6612f34c3ee98ced239da95fbede236 \ +f1c40b9836035b69e464df711a1d2950 \ +04a84513cdad48c92d8363d627904227 \ +3a122f78d9b6aa9809d82155f2194736 \ +fba3b040a55c01be7376d3dd5c4d4920 \ +dcc90b220c18170e3e13cc5cc7050c74 \ +bcd6b6c28ea4a619dd02a810686c49c1 \ +e5768043e447a7423f030c1394440502 \ +18fa61f2d92d4df309c67cb3f3197987 \ +f50d2e280b4a3491fffda43b90982544 \ +7916dcd738a8fa6a2798754c20d6e146 \ +c0e036fd990d0c9cae11b5876a5cb572 \ +d227ca24b102ae4ab2a4f3bc3bd44bf3 \ +653e04baa68a4484b3b839c19221e474 \ +82887bf79a42c46bece8d18ca411587c \ +3a5206f1121a24d8236172c509565eef \ +1f3913e3ebbc638d4fa3743299b49dd0 \ +244c87ebce1ce19de9283d14e218618d \ +f490982aceabdbd515348f63e638a782 \ +73d4dff694f3acab34c217b4f4943a37 \ +574452341c38f8d6d4a45c63ad2d7cc7 \ +0736e4f76f4f8f0a29563b0608ca3974 \ +63b29211eef9ccee0b0401d423db0efd \ +782ea88d8e5b517b1c9e7d870e20e9e3 \ +3b149ee50fdf37d56186810660ea7a63 \ +000c9031f679bf9c392dafa59c134199 \ +6d3dcd4aedd72a8e633a30d490384544 \ +66826ecb6d808b1f4d82ee7b37e37ba6 \ +a8de006fe0c7e373c560dd51599287a8 \ +d03f75b223b8c2a58c73971ec0227fc0 \ +55927226b06f62ccbd2890269d68c2fd \ +f403bbb812ce1a2d9270d9159cf9e8d3 \ +265ce58c2fc66916d96df2b188812f7f \ +4272c279b06b88f8b0ffce7109348e27 \ +a51c43692084979295641a7ffba4b297 \ +81821d39675a1f584546b9920e5d6b5d \ +bff823ec07c5fbcc3e425c9c9e4b38a6 \ +8b01b016a9b6deebc1b43f296057efb5 \ +64b3ef5a405d415f5c835947160e1d62 \ +ab2e7ac7942edc057cb3184b55021aad \ +dde4280f1e7072ef5f8e07e1d682b385 \ +ce676535e3d0f93a6c751e9543bd053b \ +18b729e7ff65c5f317b10361d61f9c02 \ +db96b50050277bf05a3c68534bbb9586 \ +09de9d01e7331ff3da11f58be8bef0df \ +0498c4a11448bfc35dc7bb2caa64c753 \ +f2797ade0e36f1e5d6be9d11b5076582 \ +24c64817e85ef77765ed0f26c31c9b4c \ +dae6d89034a6988042fd8be4cf5e037d \ +de2839e16d9d7a9fd1c397da62f62b4a \ +e0c35ffb8cfdb74a39bf799811f79304 \ +d990172b607020701f9e84ca8e1c043c \ +0a68848588e847ceccf504891584d00b \ +45b469ad607b912256b7c80141fa2d17 \ +7799baff9a5664205d9110a2624e8989" +REQUIRES="rust-opt" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.git-lfs-transfer_2024-10-19@lockywolf.net" diff --git a/network/git-lfs-transfer/slack-desc b/network/git-lfs-transfer/slack-desc new file mode 100644 index 00000000000..fac0a3bca09 --- /dev/null +++ b/network/git-lfs-transfer/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +git-lfs-transfer: git-lfs-transfer (Git LFS pure SSH-based protocol) +git-lfs-transfer: +git-lfs-transfer: git-lfs-transfer provides an experimental server-side implementation +git-lfs-transfer: of the proposed Git LFS pure SSH-based protocol. This utility is +git-lfs-transfer: intended to be invoked over SSH to transfer data from one repository +git-lfs-transfer: to another. +git-lfs-transfer: +git-lfs-transfer: +git-lfs-transfer: +git-lfs-transfer: +git-lfs-transfer: