From 2c51c4d186134829aa84c1c07373f20cd2ebd277 Mon Sep 17 00:00:00 2001 From: vdo Date: Fri, 24 Feb 2017 02:20:02 +0100 Subject: [PATCH 1/5] Reorganize snap. Add daemon wrapper --- contrib/snap/daemon.bash | 12 ------------ contrib/snap/log.bash | 3 --- contrib/snap/monerod-wrapper | 8 ++++++++ contrib/snap/monerod.conf | 9 +++++++++ snapcraft.yaml => contrib/snap/snapcraft.yaml | 18 ++++++++++++++---- contrib/snap/wallet.bash | 7 ------- 6 files changed, 31 insertions(+), 26 deletions(-) delete mode 100755 contrib/snap/daemon.bash delete mode 100755 contrib/snap/log.bash create mode 100644 contrib/snap/monerod-wrapper create mode 100644 contrib/snap/monerod.conf rename snapcraft.yaml => contrib/snap/snapcraft.yaml (76%) delete mode 100755 contrib/snap/wallet.bash diff --git a/contrib/snap/daemon.bash b/contrib/snap/daemon.bash deleted file mode 100755 index 41d1275de..000000000 --- a/contrib/snap/daemon.bash +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e - -export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu -export HOME=${SNAP_DATA} -cd ${SNAP_DATA} - -ARGS= -if [ -e "${SNAP_DATA}/etc/monerod.conf" ]; then - ARGS="--config-file ${SNAP_DATA}/etc/monerod.conf" -fi - -exec ${SNAP}/bin/monerod --detach $ARGS diff --git a/contrib/snap/log.bash b/contrib/snap/log.bash deleted file mode 100755 index c81efeb2c..000000000 --- a/contrib/snap/log.bash +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -e - -exec tail -c +0 -F ${SNAP_DATA}/.bitmonero/bitmonero.log diff --git a/contrib/snap/monerod-wrapper b/contrib/snap/monerod-wrapper new file mode 100644 index 000000000..f7266e11c --- /dev/null +++ b/contrib/snap/monerod-wrapper @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ ! -d "$SNAP_USER_DATA/etc" ]; then + mkdir $SNAP_USER_DATA/etc/ + cp -R $SNAP/etc/monerod.conf $SNAP_USER_DATA/etc/monerod.conf +fi + +exec "$SNAP/bin/monerod" "$@" diff --git a/contrib/snap/monerod.conf b/contrib/snap/monerod.conf new file mode 100644 index 000000000..9b3d308ed --- /dev/null +++ b/contrib/snap/monerod.conf @@ -0,0 +1,9 @@ +# Configuration for monerod +# Syntax: any command line option may be specified as 'clioptionname=value'. +# See 'monerod --help' for all available options. + +# Overrided by snap: +# data-dir=/var/lib/monero +# log-file=/var/log/monero/monero.log + +log-level=0 diff --git a/snapcraft.yaml b/contrib/snap/snapcraft.yaml similarity index 76% rename from snapcraft.yaml rename to contrib/snap/snapcraft.yaml index 17910392b..8ed4413ac 100644 --- a/snapcraft.yaml +++ b/contrib/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: monero -version: 0.10.1 # Current stable version +version: 0.10.2-1 summary: "Monero: the secure, private, untraceable cryptocurrency https://getmonero.org" description: | Monero is a private, secure, untraceable, decentralised digital currency. @@ -12,20 +12,20 @@ apps: monerod: daemon: forking command: | - monerod --detach --data-dir ${SNAP_DATA} + monerod-wrapper --detach --data-dir ${SNAP_COMMON} --config-file ${SNAP_USER_DATA}/etc/monerod.conf plugs: - network - network-bind monero-wallet-rpc: command: | - monero-wallet-rpc --log-file ${SNAP_USER_DATA} + monero-wallet-rpc --log-file ${SNAP_USER_DATA} plugs: - home - network - network-bind monero-wallet-cli: command: | - monero-wallet-cli --log-file ${SNAP_USER_DATA} + monero-wallet-cli --log-file ${SNAP_USER_DATA} plugs: - home - network @@ -63,3 +63,13 @@ parts: - usr/lib/ - -usr/lib/gcc - -usr/share + + dist-files: + plugin: dump + source: . + organize: + contrib/snap/monerod.conf: etc/monerod.conf + wrapper: + plugin: dump + source: contrib/snap/ + stage: [monerod-wrapper] diff --git a/contrib/snap/wallet.bash b/contrib/snap/wallet.bash deleted file mode 100755 index 004f1371e..000000000 --- a/contrib/snap/wallet.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -e - -export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu -export HOME=${SNAP_USER_DATA} -cd ${SNAP_USER_DATA} - -exec ${SNAP}/usr/bin/rlwrap ${SNAP}/bin/monero-wallet-cli "$@" From a2b90426bd6fe11e5a07b8c0dcb5d55ad5a30e0f Mon Sep 17 00:00:00 2001 From: vdo Date: Fri, 24 Feb 2017 02:49:48 +0100 Subject: [PATCH 2/5] Add snap symlink --- snap | 1 + 1 file changed, 1 insertion(+) create mode 120000 snap diff --git a/snap b/snap new file mode 120000 index 000000000..ef5bb2b3c --- /dev/null +++ b/snap @@ -0,0 +1 @@ +contrib/snap \ No newline at end of file From b4c90d56457712b2ec8f25b88a13f19b526927d6 Mon Sep 17 00:00:00 2001 From: vdo Date: Fri, 24 Feb 2017 02:52:15 +0100 Subject: [PATCH 3/5] Add meta icon for snap --- contrib/snap/setup/gui/icon.png | Bin 0 -> 19132 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 contrib/snap/setup/gui/icon.png diff --git a/contrib/snap/setup/gui/icon.png b/contrib/snap/setup/gui/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17b8bd47b2fe0d58cb6b133dda5819da41674727 GIT binary patch literal 19132 zcmeI4cT`i^x5qCoh0OT!B&+r;S8wq$1!4v;hIShR4mqKYi1fK8%o ze!qxQy`Z@{tK@^cM3xgLqK}I>sqq};>SG_5J$EAReB#kZA6`VB_wA`&dii*@ve#(x z(tJ)uJ9`}mPnwmclXf)EMU;%-^SI`FO)thZOk%j?0|5b!3Y=`niX0QLe89j!6h=7TT0fasj%%t$6+`)OGbro3bTB!o{i1AO#>OYK{angi}oK$u{A4*~S4 z15j%>f)#M}22j@~z+Db-@BmP!#CTV6hV41O5CK?UYq+(OFK3lZ^>N$lstUkNA^Y$(sBb4)- zR04TZ&)nt%*V&loCsp_NPmGWE+1x{I$3Ak4S|v8@u5(-Qdw0O#{uJEQV3@SQQ1 ztjo_ES{LjJq}o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HcmV?d00001 From 38b9226f44021360622406f69b2f644eba6615c5 Mon Sep 17 00:00:00 2001 From: vdo Date: Fri, 24 Feb 2017 02:53:59 +0100 Subject: [PATCH 4/5] wrapper +x --- contrib/snap/monerod-wrapper | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 contrib/snap/monerod-wrapper diff --git a/contrib/snap/monerod-wrapper b/contrib/snap/monerod-wrapper old mode 100644 new mode 100755 From 5db8df7bb63edb5f862fceeb493b502f76d0a260 Mon Sep 17 00:00:00 2001 From: vdo Date: Fri, 24 Feb 2017 03:28:22 +0100 Subject: [PATCH 5/5] Unify dist files and prime --- contrib/snap/snapcraft.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/snap/snapcraft.yaml b/contrib/snap/snapcraft.yaml index 8ed4413ac..11d480d10 100644 --- a/contrib/snap/snapcraft.yaml +++ b/contrib/snap/snapcraft.yaml @@ -69,7 +69,7 @@ parts: source: . organize: contrib/snap/monerod.conf: etc/monerod.conf - wrapper: - plugin: dump - source: contrib/snap/ - stage: [monerod-wrapper] + contrib/snap/monerod-wrapper: bin/monerod-wrapper + prime: + - etc + - bin