From 2cdf051fd525273b4ce9685a94de93a98893c1e3 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 8 Sep 2021 21:02:54 -0300 Subject: [PATCH] Bundle default bootstrap.signed in deb This avoids needing to download it on install, and matches what we do now on mac/win. --- .gitignore | 2 ++ debian/lokinet-bin.install | 2 ++ debian/lokinet-router.postinst | 10 ---------- debian/lokinet.postinst | 10 ---------- debian/mainnet/bootstrap.signed | Bin 0 -> 923 bytes debian/source/include-binaries | 2 ++ debian/testnet/bootstrap.signed | Bin 0 -> 305 bytes 7 files changed, 6 insertions(+), 20 deletions(-) create mode 100644 debian/mainnet/bootstrap.signed create mode 100644 debian/testnet/bootstrap.signed diff --git a/.gitignore b/.gitignore index 27e57ba86..95a189484 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ callgrind.* *.sig *.signed +!/debian/mainnet/bootstrap.signed +!/debian/testnet/bootstrap.signed *.key shadow.data diff --git a/debian/lokinet-bin.install b/debian/lokinet-bin.install index a5169e778..859d1ffb9 100644 --- a/debian/lokinet-bin.install +++ b/debian/lokinet-bin.install @@ -1,3 +1,5 @@ /usr/bin/lokinet /usr/bin/lokinet-bootstrap /usr/bin/lokinet-vpn +debian/mainnet/bootstrap.signed /var/lib/lokinet +debian/testnet/bootstrap.signed /var/lib/lokinet/testnet diff --git a/debian/lokinet-router.postinst b/debian/lokinet-router.postinst index 88f409954..65f9c997e 100644 --- a/debian/lokinet-router.postinst +++ b/debian/lokinet-router.postinst @@ -13,16 +13,6 @@ if [ "$1" = configure ]; then chown _lokinet:_loki $d done - if ! [ -e /var/lib/lokinet/bootstrap.signed ]; then - /usr/bin/lokinet-bootstrap lokinet /var/lib/lokinet/bootstrap.signed - chown _lokinet:_loki /var/lib/lokinet/bootstrap.signed - fi - - if ! [ -e /var/lib/lokinet/testnet/bootstrap.signed ]; then - /usr/bin/lokinet-bootstrap testnet /var/lib/lokinet/testnet/bootstrap.signed - chown _lokinet:_loki /var/lib/lokinet/testnet/bootstrap.signed - fi - tmpdir=$(mktemp --tmpdir -d lokinet.XXXXXXXXXX) /usr/bin/lokinet -r -g $tmpdir/lokinet.ini perl -pi -e " diff --git a/debian/lokinet.postinst b/debian/lokinet.postinst index 7ffd194e1..16bedc84f 100644 --- a/debian/lokinet.postinst +++ b/debian/lokinet.postinst @@ -12,16 +12,6 @@ if [ "$1" = configure ]; then su -s /bin/sh _lokinet -c "test -O $tn_datadir && test -G $tn_datadir" || \ chown _lokinet:_loki $tn_datadir - if ! [ -e /var/lib/lokinet/bootstrap.signed ]; then - /usr/bin/lokinet-bootstrap lokinet /var/lib/lokinet/bootstrap.signed - chown _lokinet:_loki /var/lib/lokinet/bootstrap.signed - fi - - if ! [ -e /var/lib/lokinet/testnet/bootstrap.signed ]; then - /usr/bin/lokinet-bootstrap testnet /var/lib/lokinet/testnet/bootstrap.signed - chown _lokinet:_loki /var/lib/lokinet/testnet/bootstrap.signed - fi - tmpdir=$(mktemp --tmpdir -d lokinet.XXXXXXXXXX) /usr/bin/lokinet -g $tmpdir/lokinet.ini sed -i -e "s#$tmpdir#$datadir#" $tmpdir/lokinet.ini diff --git a/debian/mainnet/bootstrap.signed b/debian/mainnet/bootstrap.signed new file mode 100644 index 0000000000000000000000000000000000000000..4dabc8e935a4f3af369132bd655b91e44f6e5119 GIT binary patch literal 923 zcmc~vF|ajnHuUD85!xB80i@qni*OZWEvV+8W;f8lw}&Erh?R( zTjk_uXXd4r7+PfmO_x{T_pp!s`Ss6C&UJi=Zf*1DMmKJcIlXZ6>|Lwp@^)MSngLX$ zaEecB)As3lQ`bDY5U<`6k@liu!hGRA(M55k{*qfx3mRG#bS(uv`8bh66XjPE|WLBA(Smn*!ecF(<<>f&${q83ZOit?`5?}x2$#FiDg<_NM zKlT2YQ1Z==-^6{E+7TK3Kjq=P-}iIpy#Ah+eWTKD&%sH5SW-$-;)`Eb8JWP8d)^B*+DEK?)mi&82n4OmXq`U3fwKsH(R0&)mZ?8)K5ftbu>!-)&=MYImX>;kM&^2E271J$vH*VZ z>ot-^7rMB9AC3;~*0EGiiddVj;H7SESDVFm77}9WQ~Ay@UMqb4M5Z;9seMCg@7g$_ z`MYegL~cw|Te=}u3N^$~Qkk)-xv7PLC1!}FU)Q^v=_B)zMeml8VE?<4D~}90G+(NA w#r`-iVyi_@% literal 0 HcmV?d00001 diff --git a/debian/source/include-binaries b/debian/source/include-binaries index 0f16ee8dd..01b2cbf07 100644 --- a/debian/source/include-binaries +++ b/debian/source/include-binaries @@ -1 +1,3 @@ debian/deb.loki.network.gpg +debian/mainnet/bootstrap.signed +debian/testnet/bootstrap.signed diff --git a/debian/testnet/bootstrap.signed b/debian/testnet/bootstrap.signed new file mode 100644 index 0000000000000000000000000000000000000000..9ad107115daace1d8c0f2a13528cb30d465a50ea GIT binary patch literal 305 zcmYc>v`WlLF|cFt-88@{cYveH&}S9h5PW`RV`cno=Z4M8d??Q0F4JBi_}bGkTs=1dksy@ zEi8-;4NOc;pbjv!s>lH{tISNSdX|(faNj@0WwLEg#nwgD@6VVT{$r7pPI!C2;iv1P pa&DGf%|bS#8|fVDH_rGmOX2$ literal 0 HcmV?d00001