Add arch instructions
Some checks failed
CI / osx-x64 (push) Has been cancelled
CI / debian-x64 (push) Has been cancelled
CI / linux-x64 (push) Has been cancelled
CI / applesign (push) Has been cancelled
CI / win-x64 (push) Has been cancelled
CI / pgpsign (push) Has been cancelled
CI / makerelease (push) Has been cancelled
Some checks failed
CI / osx-x64 (push) Has been cancelled
CI / debian-x64 (push) Has been cancelled
CI / linux-x64 (push) Has been cancelled
CI / applesign (push) Has been cancelled
CI / win-x64 (push) Has been cancelled
CI / pgpsign (push) Has been cancelled
CI / makerelease (push) Has been cancelled
This commit is contained in:
parent
946bbf5111
commit
a7ba63fc8f
@ -6,6 +6,7 @@ FRAMEWORK="net8.0"
|
||||
DIST="/source/dist"
|
||||
RESOURCES="/source/Build/${RUNTIME}"
|
||||
RESOURCES_COMMON="/source/Build/common"
|
||||
RESOURCES_LINUX="/source/Build/linux-x64"
|
||||
PROJECT_FILE="/source/BTCPayServer.Vault/BTCPayServer.Vault.csproj"
|
||||
VERSION_FILE="/source/BTCPayServer.Vault/Version.csproj"
|
||||
LICENSE="$(cat $PROJECT_FILE | sed -n 's/.*<PackageLicenseExpression>\(.*\)<\/PackageLicenseExpression>.*/\1/p')"
|
||||
|
||||
@ -18,6 +18,7 @@ WORKDIR /source
|
||||
ENV DOTNET_RUNTIME "linux-x64"
|
||||
ENV RUNTIME "debian-x64"
|
||||
COPY "Build/common" "Build/common"
|
||||
COPY "Build/linux-x64" "Build/linux-x64"
|
||||
ENV EXPORT_VARIABLES "source Build/common/export-variables.sh"
|
||||
COPY BTCPayServer.Vault/BTCPayServer.Vault.csproj BTCPayServer.Vault/BTCPayServer.Vault.csproj
|
||||
COPY BTCPayServer.Hwi/BTCPayServer.Hwi.csproj BTCPayServer.Hwi/BTCPayServer.Hwi.csproj
|
||||
@ -29,6 +30,7 @@ RUN $EXPORT_VARIABLES && dotnet_publish && mv /tmp/hwi "$PUBLISH_FOLDER/"
|
||||
|
||||
COPY "Build/${RUNTIME}" "Build/${RUNTIME}"
|
||||
COPY BTCPayServerVault.png BTCPayServerVault.png
|
||||
|
||||
RUN $EXPORT_VARIABLES && \
|
||||
find "$PUBLISH_FOLDER" -type f -exec chmod 644 {} \; && \
|
||||
find "$PUBLISH_FOLDER" -type f \( -name 'hwi' -o -name "$EXECUTABLE" \) -exec chmod +x {} \; && \
|
||||
@ -50,7 +52,7 @@ RUN $EXPORT_VARIABLES && \
|
||||
cp "$RESOURCES/BTCPayServer.Vault.desktop" "$debiandir/usr/share/applications/" && \
|
||||
replaceProjectVariables "$debiandir/usr/share/applications/BTCPayServer.Vault.desktop" && \
|
||||
mkdir -p "$debiandir/lib/udev/rules.d" && \
|
||||
cp $RESOURCES/udev/* "$debiandir/lib/udev/rules.d/" && \
|
||||
cp $RESOURCES_LINUX/udev/* "$debiandir/lib/udev/rules.d/" && \
|
||||
sizeinkb="$(du -k --max-depth=0 $debiandir | cut -f 1)" && \
|
||||
sed -i "s/{SIZEINKB}/$sizeinkb/g" "$debiandir/DEBIAN/control" && \
|
||||
dpkg --build "$debiandir" && mv /tmp/debian.deb "$DIST/BTCPayServerVault-$VERSION.deb" && \
|
||||
|
||||
7
Build/linux-x64/BTCPayServerVault.desktop
Normal file
7
Build/linux-x64/BTCPayServerVault.desktop
Normal file
@ -0,0 +1,7 @@
|
||||
[Desktop Entry]
|
||||
|
||||
Type=Application
|
||||
Name=BTCPayServer Vault
|
||||
Exec=/usr/local/bin/BTCPayServer.Vault
|
||||
Icon=BTCPayServerVault
|
||||
Categories=Utility;
|
||||
@ -5,9 +5,14 @@ RUN wget -qO /tmp/hwi.tar.gz https://github.com/bitcoin-core/HWI/releases/downlo
|
||||
echo "4732e06e879b51eb5b42ce334c54373d7901556227dca4a63d342190f04b22c9 /tmp/hwi" | sha256sum -c - && \
|
||||
rm /tmp/hwi.tar.gz
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends imagemagick && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /source
|
||||
ENV RUNTIME "linux-x64"
|
||||
COPY "Build/common" "Build/common"
|
||||
COPY "Build/linux-x64" "Build/linux-x64"
|
||||
ENV EXPORT_VARIABLES "source Build/common/export-variables.sh"
|
||||
COPY BTCPayServer.Vault/BTCPayServer.Vault.csproj BTCPayServer.Vault/BTCPayServer.Vault.csproj
|
||||
COPY BTCPayServer.Hwi/BTCPayServer.Hwi.csproj BTCPayServer.Hwi/BTCPayServer.Hwi.csproj
|
||||
@ -18,10 +23,17 @@ COPY BTCPayServer.Hwi BTCPayServer.Hwi
|
||||
COPY BTCPayServer.Vault BTCPayServer.Vault
|
||||
RUN $EXPORT_VARIABLES && dotnet_publish && mv /tmp/hwi "$PUBLISH_FOLDER/"
|
||||
|
||||
COPY "BTCPayServerVault.png" "BTCPayServerVault.png"
|
||||
|
||||
RUN $EXPORT_VARIABLES && \
|
||||
cp -r "$RESOURCES_LINUX/udev" "$PUBLISH_FOLDER/" && \
|
||||
cp -r $RESOURCES_LINUX/install-*.sh "$PUBLISH_FOLDER/" && \
|
||||
cp -r "$RESOURCES_LINUX/BTCPayServerVault.desktop" "$PUBLISH_FOLDER/" && \
|
||||
convert -background none -resize "64x64" "BTCPayServerVault.png" "/tmp/BTCPayServerVault.png" && \
|
||||
cp "/tmp/BTCPayServerVault.png" "$PUBLISH_FOLDER/" && \
|
||||
find "$PUBLISH_FOLDER" -type f -exec chmod 644 {} \; && \
|
||||
find "$PUBLISH_FOLDER" -type f \( -name 'hwi' -o -name "$EXECUTABLE" \) -exec chmod +x {} \; && \
|
||||
find "$PUBLISH_FOLDER" -type f \( -name 'hwi' -o -name "$EXECUTABLE" -o -name '*.sh' \) -exec chmod +x {} \; && \
|
||||
# We need to cd in "$PUBLISH_FOLDER", because tar's -C option always add a root folder to the tar otherwise
|
||||
cd "$PUBLISH_FOLDER" && tar -czf "$DIST/BTCPayServerVault-Linux-$VERSION.tar.gz" *
|
||||
|
||||
ENTRYPOINT [ "/bin/bash", "-c", "$EXPORT_VARIABLES && cp $DIST/* /opt/dist/" ]
|
||||
ENTRYPOINT [ "/bin/bash", "-c", "$EXPORT_VARIABLES && cp -a $DIST/* /opt/dist/" ]
|
||||
|
||||
54
Build/linux-x64/install-arch.sh
Executable file
54
Build/linux-x64/install-arch.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "This script must be run as root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! getent group plugdev > /dev/null; then
|
||||
echo "Creating system group plugdev"
|
||||
groupadd -r plugdev
|
||||
else
|
||||
echo "Group plugdev already exists"
|
||||
fi
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
RULES_DIR="$SCRIPT_DIR/udev"
|
||||
|
||||
echo 'Adding udev rules to /usr/local/lib/udev/rules.d'
|
||||
|
||||
shopt -s nullglob
|
||||
for f in "$RULES_DIR"/*; do
|
||||
install -Dm644 "$f" "/usr/local/lib/udev/rules.d/$(basename "$f")"
|
||||
echo "Installed $(basename "$f")"
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
|
||||
udevadm control --reload-rules
|
||||
udevadm trigger
|
||||
|
||||
echo "udevadm triggered and reloaded"
|
||||
|
||||
gpasswd -a $SUDO_USER plugdev
|
||||
|
||||
echo "User $SUDO_USER added to plugdev"
|
||||
|
||||
install -Dm644 "$SCRIPT_DIR/BTCPayServerVault.desktop" /usr/share/applications/BTCPayServerVault.desktop
|
||||
install -Dm644 "$SCRIPT_DIR/BTCPayServerVault.png" /usr/share/icons/hicolor/64x64/apps/BTCPayServerVault.png
|
||||
|
||||
rm -rf /opt/BTCPayServer.Vault
|
||||
mkdir -p /opt/BTCPayServer.Vault
|
||||
cp -r "$SCRIPT_DIR"/. "/opt/BTCPayServer.Vault/"
|
||||
chmod +x /opt/BTCPayServer.Vault/BTCPayServer.Vault
|
||||
|
||||
echo "/opt/BTCPayServer.Vault created"
|
||||
|
||||
ln -s /opt/BTCPayServer.Vault/BTCPayServer.Vault /usr/local/bin/BTCPayServer.Vault
|
||||
|
||||
chmod +x /usr/local/bin/BTCPayServer.Vault
|
||||
echo "/usr/local/bin/BTCPayServer.Vault created"
|
||||
|
||||
echo "If the Vault cannot access your hardware wallet, you may need to restart your computer."
|
||||
31
README.md
31
README.md
@ -32,6 +32,37 @@ You can use brew:
|
||||
brew install btcpayserver-vault
|
||||
```
|
||||
|
||||
### On Arch Linux
|
||||
|
||||
Download the tarball on our [release page](https://github.com/btcpayserver/BTCPayServer.Vault/releases/latest)
|
||||
|
||||
```bash
|
||||
tar -xvf <tarball.tar.gz>
|
||||
sudo ./install-arch.sh
|
||||
```
|
||||
|
||||
If BTCPay Server fails to detect your hardware wallet, you may need to restart.
|
||||
|
||||
|
||||
Check if you try to run the `hwi` executable. If not, install python9 dependencies, and run
|
||||
|
||||
```bash
|
||||
ln -s /usr/lib/libcrypt.so.2 /usr/lib/libcrypt.so.1
|
||||
```
|
||||
|
||||
### On Debian
|
||||
|
||||
Download the `.deb` package on our [release page](https://github.com/btcpayserver/BTCPayServer.Vault/releases/latest)
|
||||
|
||||
```bash
|
||||
sudo apt install <package.deb>
|
||||
```
|
||||
|
||||
### Other linux
|
||||
|
||||
Inspire you from [install-arch.sh](Build/linux-x64/install-arch.sh).
|
||||
We provide the udev rules and desktop entries in the tarball.
|
||||
|
||||
## How does BTCPayServer Vault work
|
||||
|
||||
When running the BTCPayServer Vault, a local webserver is hosted on `http://127.0.0.1:65092` which web applications, via your local browser, can connect to in order to interact with your hardware wallet.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user