mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
changed dependencies to https://github.com/RiV-chain/RiV-mesh repo
This commit is contained in:
parent
af9260c802
commit
1dce2d51be
42 changed files with 187 additions and 187 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/cheggaaa/pb/v3"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
)
|
||||
|
||||
var numHosts = flag.Int("hosts", 1, "number of host vars to generate")
|
||||
|
|
|
@ -41,7 +41,7 @@ mkdir -p /tmp/$PKGNAME/usr/bin/
|
|||
mkdir -p /tmp/$PKGNAME/etc/systemd/system/
|
||||
|
||||
cat > /tmp/$PKGNAME/debian/changelog << EOF
|
||||
Please see https://github.com/yggdrasil-network/yggdrasil-go/
|
||||
Please see https://github.com/RiV-chain/RiV-mesh/
|
||||
EOF
|
||||
echo 9 > /tmp/$PKGNAME/debian/compat
|
||||
cat > /tmp/$PKGNAME/debian/control << EOF
|
||||
|
@ -53,17 +53,17 @@ Architecture: $PKGARCH
|
|||
Replaces: $PKGREPLACES
|
||||
Conflicts: $PKGREPLACES
|
||||
Maintainer: Neil Alexander <neilalexander@users.noreply.github.com>
|
||||
Description: Yggdrasil Network
|
||||
Yggdrasil is an early-stage implementation of a fully end-to-end encrypted IPv6
|
||||
Description: Mesh Network
|
||||
Mesh is an early-stage implementation of a fully end-to-end encrypted IPv6
|
||||
network. It is lightweight, self-arranging, supported on multiple platforms and
|
||||
allows pretty much any IPv6-capable application to communicate securely with
|
||||
other Yggdrasil nodes.
|
||||
other Mesh nodes.
|
||||
EOF
|
||||
cat > /tmp/$PKGNAME/debian/copyright << EOF
|
||||
Please see https://github.com/yggdrasil-network/yggdrasil-go/
|
||||
Please see https://github.com/RiV-chain/RiV-mesh/
|
||||
EOF
|
||||
cat > /tmp/$PKGNAME/debian/docs << EOF
|
||||
Please see https://github.com/yggdrasil-network/yggdrasil-go/
|
||||
Please see https://github.com/RiV-chain/RiV-mesh/
|
||||
EOF
|
||||
cat > /tmp/$PKGNAME/debian/install << EOF
|
||||
usr/bin/yggdrasil usr/bin
|
||||
|
@ -93,7 +93,7 @@ then
|
|||
fi
|
||||
else
|
||||
echo "Generating initial configuration file /etc/yggdrasil.conf"
|
||||
echo "Please familiarise yourself with this file before starting Yggdrasil"
|
||||
echo "Please familiarise yourself with this file before starting Mesh"
|
||||
sh -c 'umask 0027 && /usr/bin/yggdrasil -genconf > /etc/yggdrasil.conf'
|
||||
chgrp yggdrasil /etc/yggdrasil.conf
|
||||
fi
|
||||
|
|
|
@ -14,12 +14,12 @@ COPY --from=builder /src/yggdrasilctl /usr/bin/yggdrasilctl
|
|||
COPY --from=builder /src/genkeys /usr/bin/genkeys
|
||||
COPY contrib/docker/entrypoint.sh /usr/bin/entrypoint.sh
|
||||
|
||||
# RUN addgroup -g 1000 -S yggdrasil-network \
|
||||
# && adduser -u 1000 -S -g 1000 --home /etc/yggdrasil-network yggdrasil-network
|
||||
# RUN addgroup -g 1000 -S RiV-chain \
|
||||
# && adduser -u 1000 -S -g 1000 --home /etc/RiV-chain RiV-chain
|
||||
#
|
||||
# USER yggdrasil-network
|
||||
# USER RiV-chain
|
||||
# TODO: Make running unprivileged work
|
||||
|
||||
VOLUME [ "/etc/yggdrasil-network" ]
|
||||
VOLUME [ "/etc/RiV-chain" ]
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
CONF_DIR="/etc/yggdrasil-network"
|
||||
CONF_DIR="/etc/RiV-chain"
|
||||
|
||||
if [ ! -f "$CONF_DIR/config.conf" ]; then
|
||||
echo "generate $CONF_DIR/config.conf"
|
||||
|
|
|
@ -17,7 +17,7 @@ command -v mkbom >/dev/null 2>&1 || (
|
|||
|
||||
# Check if we can find the files we need - they should
|
||||
# exist if you are running this script from the root of
|
||||
# the yggdrasil-go repo and you have ran ./build
|
||||
# the RiV-mesh repo and you have ran ./build
|
||||
test -f yggdrasil || (echo "yggdrasil binary not found"; exit 1)
|
||||
test -f yggdrasilctl || (echo "yggdrasilctl binary not found"; exit 1)
|
||||
test -f contrib/macos/yggdrasil.plist || (echo "contrib/macos/yggdrasil.plist not found"; exit 1)
|
||||
|
@ -45,19 +45,19 @@ cat > pkgbuild/scripts/postinstall << EOF
|
|||
# Normalise the config if it exists, generate it if it doesn't
|
||||
if [ -f /etc/yggdrasil.conf ];
|
||||
then
|
||||
mkdir -p /Library/Preferences/Yggdrasil
|
||||
echo "Backing up configuration file to /Library/Preferences/Yggdrasil/yggdrasil.conf.`date +%Y%m%d`"
|
||||
cp /etc/yggdrasil.conf /Library/Preferences/Yggdrasil/yggdrasil.conf.`date +%Y%m%d`
|
||||
mkdir -p /Library/Preferences/Mesh
|
||||
echo "Backing up configuration file to /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d`"
|
||||
cp /etc/yggdrasil.conf /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d`
|
||||
echo "Normalising /etc/yggdrasil.conf"
|
||||
/usr/local/bin/yggdrasil -useconffile /Library/Preferences/Yggdrasil/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf
|
||||
/usr/local/bin/yggdrasil -useconffile /Library/Preferences/Mesh/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf
|
||||
else
|
||||
/usr/local/bin/yggdrasil -genconf > /etc/yggdrasil.conf
|
||||
fi
|
||||
|
||||
# Unload existing Yggdrasil launchd service, if possible
|
||||
# Unload existing Mesh launchd service, if possible
|
||||
test -f /Library/LaunchDaemons/yggdrasil.plist && (launchctl unload /Library/LaunchDaemons/yggdrasil.plist || true)
|
||||
|
||||
# Load Yggdrasil launchd service and start Yggdrasil
|
||||
# Load Mesh launchd service and start Mesh
|
||||
launchctl load /Library/LaunchDaemons/yggdrasil.plist
|
||||
EOF
|
||||
|
||||
|
@ -78,7 +78,7 @@ PAYLOADSIZE=$(( $(wc -c pkgbuild/flat/base.pkg/Payload | awk '{ print $1 }') / 1
|
|||
|
||||
# Create the PackageInfo file
|
||||
cat > pkgbuild/flat/base.pkg/PackageInfo << EOF
|
||||
<pkg-info format-version="2" identifier="io.github.yggdrasil-network.pkg" version="${PKGVERSION}" install-location="/" auth="root">
|
||||
<pkg-info format-version="2" identifier="io.github.RiV-chain.pkg" version="${PKGVERSION}" install-location="/" auth="root">
|
||||
<payload installKBytes="${PAYLOADSIZE}" numberOfFiles="3"/>
|
||||
<scripts>
|
||||
<postinstall file="./postinstall"/>
|
||||
|
@ -93,7 +93,7 @@ EOF
|
|||
cat > pkgbuild/flat/Distribution << EOF
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
|
||||
<title>Yggdrasil (${PKGNAME}-${PKGVERSION})</title>
|
||||
<title>Mesh (${PKGNAME}-${PKGVERSION})</title>
|
||||
<options customize="never" allow-external-scripts="no"/>
|
||||
<domains enable_anywhere="true"/>
|
||||
<installation-check script="pm_install_check();"/>
|
||||
|
@ -101,7 +101,7 @@ cat > pkgbuild/flat/Distribution << EOF
|
|||
function pm_install_check() {
|
||||
if(!(system.compareVersions(system.version.ProductVersion,'10.10') >= 0)) {
|
||||
my.result.title = 'Failure';
|
||||
my.result.message = 'You need at least Mac OS X 10.10 to install Yggdrasil.';
|
||||
my.result.message = 'You need at least Mac OS X 10.10 to install Mesh.';
|
||||
my.result.type = 'Fatal';
|
||||
return false;
|
||||
}
|
||||
|
@ -112,9 +112,9 @@ cat > pkgbuild/flat/Distribution << EOF
|
|||
<line choice="choice1"/>
|
||||
</choices-outline>
|
||||
<choice id="choice1" title="base">
|
||||
<pkg-ref id="io.github.yggdrasil-network.pkg"/>
|
||||
<pkg-ref id="io.github.RiV-chain.pkg"/>
|
||||
</choice>
|
||||
<pkg-ref id="io.github.yggdrasil-network.pkg" installKBytes="${PAYLOADSIZE}" version="${VERSION}" auth="Root">#base.pkg</pkg-ref>
|
||||
<pkg-ref id="io.github.RiV-chain.pkg" installKBytes="${PAYLOADSIZE}" version="${VERSION}" auth="Root">#base.pkg</pkg-ref>
|
||||
</installer-script>
|
||||
EOF
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script generates an MSI file for Yggdrasil for a given architecture. It
|
||||
# This script generates an MSI file for Mesh for a given architecture. It
|
||||
# needs to run on Windows within MSYS2 and Go 1.13 or later must be installed on
|
||||
# the system and within the PATH. This is ran currently by Appveyor (see
|
||||
# appveyor.yml in the repository root) for both x86 and x64.
|
||||
|
@ -47,7 +47,7 @@ then
|
|||
)
|
||||
fi
|
||||
|
||||
# Build Yggdrasil!
|
||||
# Build Mesh!
|
||||
[ "${PKGARCH}" == "x64" ] && GOOS=windows GOARCH=amd64 CGO_ENABLED=0 ./build
|
||||
[ "${PKGARCH}" == "x86" ] && GOOS=windows GOARCH=386 CGO_ENABLED=0 ./build
|
||||
[ "${PKGARCH}" == "arm" ] && GOOS=windows GOARCH=arm CGO_ENABLED=0 ./build
|
||||
|
@ -55,12 +55,12 @@ fi
|
|||
|
||||
# Create the postinstall script
|
||||
cat > updateconfig.bat << EOF
|
||||
if not exist %ALLUSERSPROFILE%\\Yggdrasil (
|
||||
mkdir %ALLUSERSPROFILE%\\Yggdrasil
|
||||
if not exist %ALLUSERSPROFILE%\\Mesh (
|
||||
mkdir %ALLUSERSPROFILE%\\Mesh
|
||||
)
|
||||
if not exist %ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf (
|
||||
if not exist %ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf (
|
||||
if exist yggdrasil.exe (
|
||||
yggdrasil.exe -genconf > %ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf
|
||||
yggdrasil.exe -genconf > %ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf
|
||||
)
|
||||
)
|
||||
EOF
|
||||
|
@ -93,9 +93,9 @@ else
|
|||
fi
|
||||
|
||||
if [ $PKGNAME != "master" ]; then
|
||||
PKGDISPLAYNAME="Yggdrasil Network (${PKGNAME} branch)"
|
||||
PKGDISPLAYNAME="Mesh Network (${PKGNAME} branch)"
|
||||
else
|
||||
PKGDISPLAYNAME="Yggdrasil Network"
|
||||
PKGDISPLAYNAME="Mesh Network"
|
||||
fi
|
||||
|
||||
# Generate the wix.xml file
|
||||
|
@ -109,14 +109,14 @@ cat > wix.xml << EOF
|
|||
Language="1033"
|
||||
Codepage="1252"
|
||||
Version="${PKGVERSIONMS}"
|
||||
Manufacturer="github.com/yggdrasil-network">
|
||||
Manufacturer="github.com/RiV-chain">
|
||||
|
||||
<Package
|
||||
Id="*"
|
||||
Keywords="Installer"
|
||||
Description="Yggdrasil Network Installer"
|
||||
Comments="Yggdrasil Network standalone router for Windows."
|
||||
Manufacturer="github.com/yggdrasil-network"
|
||||
Description="Mesh Network Installer"
|
||||
Comments="Mesh Network standalone router for Windows."
|
||||
Manufacturer="github.com/RiV-chain"
|
||||
InstallerVersion="200"
|
||||
InstallScope="perMachine"
|
||||
Languages="1033"
|
||||
|
@ -134,11 +134,11 @@ cat > wix.xml << EOF
|
|||
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="${PKGINSTFOLDER}" Name="PFiles">
|
||||
<Directory Id="YggdrasilInstallFolder" Name="Yggdrasil">
|
||||
<Directory Id="MeshInstallFolder" Name="Mesh">
|
||||
|
||||
<Component Id="MainExecutable" Guid="c2119231-2aa3-4962-867a-9759c87beb24">
|
||||
<File
|
||||
Id="Yggdrasil"
|
||||
Id="Mesh"
|
||||
Name="yggdrasil.exe"
|
||||
DiskId="1"
|
||||
Source="yggdrasil.exe"
|
||||
|
@ -153,14 +153,14 @@ cat > wix.xml << EOF
|
|||
<ServiceInstall
|
||||
Id="ServiceInstaller"
|
||||
Account="LocalSystem"
|
||||
Description="Yggdrasil Network router process"
|
||||
DisplayName="Yggdrasil Service"
|
||||
Description="Mesh Network router process"
|
||||
DisplayName="Mesh Service"
|
||||
ErrorControl="normal"
|
||||
LoadOrderGroup="NetworkProvider"
|
||||
Name="Yggdrasil"
|
||||
Name="Mesh"
|
||||
Start="auto"
|
||||
Type="ownProcess"
|
||||
Arguments='-useconffile "%ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.conf" -logto "%ALLUSERSPROFILE%\\Yggdrasil\\yggdrasil.log"'
|
||||
Arguments='-useconffile "%ALLUSERSPROFILE%\\Mesh\\yggdrasil.conf" -logto "%ALLUSERSPROFILE%\\Mesh\\yggdrasil.log"'
|
||||
Vital="yes" />
|
||||
|
||||
<ServiceControl
|
||||
|
@ -173,7 +173,7 @@ cat > wix.xml << EOF
|
|||
|
||||
<Component Id="CtrlExecutable" Guid="a916b730-974d-42a1-b687-d9d504cbb86a">
|
||||
<File
|
||||
Id="Yggdrasilctl"
|
||||
Id="Meshctl"
|
||||
Name="yggdrasilctl.exe"
|
||||
DiskId="1"
|
||||
Source="yggdrasilctl.exe"
|
||||
|
@ -192,7 +192,7 @@ cat > wix.xml << EOF
|
|||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<Feature Id="YggdrasilFeature" Title="Yggdrasil" Level="1">
|
||||
<Feature Id="MeshFeature" Title="Mesh" Level="1">
|
||||
<ComponentRef Id="MainExecutable" />
|
||||
<ComponentRef Id="CtrlExecutable" />
|
||||
<ComponentRef Id="ConfigScript" />
|
||||
|
@ -200,7 +200,7 @@ cat > wix.xml << EOF
|
|||
|
||||
<CustomAction
|
||||
Id="UpdateGenerateConfig"
|
||||
Directory="YggdrasilInstallFolder"
|
||||
Directory="MeshInstallFolder"
|
||||
ExeCommand="cmd.exe /c updateconfig.bat"
|
||||
Execute="deferred"
|
||||
Return="check"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue