summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRubenKelevra2022-06-21 18:03:44 +0200
committerRubenKelevra2022-06-21 18:04:26 +0200
commitc363d0a1c40abc18e68d2a1075dd66ff139ba8f9 (patch)
tree4cb48ca01d825acee3e9492fa6258fae51c88c4c
parent3055b7f763d59c0b9cb30ba945d69395723f8a92 (diff)
downloadaur-c363d0a1c40abc18e68d2a1075dd66ff139ba8f9.tar.gz
handle migration step in install process now
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
-rw-r--r--go-ipfs-git.install8
3 files changed, 13 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 22525960982f..06770c73f8ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = go-ipfs-git
pkgdesc = A peer-to-peer hypermedia distribution protocol
- pkgver = 0.13.0.r36.ga433064d7
+ pkgver = 0.13.0.r38.g88d88158c
pkgrel = 2
epoch = 1
url = https://github.com/ipfs/go-ipfs
diff --git a/PKGBUILD b/PKGBUILD
index 2912a2a37d3a..a1a6f90b1259 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ DEBUG=0
_pkgname=go-ipfs
pkgname=$_pkgname-git
-pkgver=0.13.0.r36.ga433064d7
+pkgver=0.13.0.r38.g88d88158c
pkgrel=2
epoch=1
@@ -128,12 +128,12 @@ build() {
# set IPFS_PATH if not set by upstream already
sed -i '/StateDirectory=ipfs/,/ExecStart=\/usr\/bin\/ipfs daemon --init --migrate/c StateDirectory=ipfs\nEnvironment=IPFS_PATH=\~\nExecStart=\/usr\/bin\/ipfs daemon --init --migrate' "misc/systemd/ipfs-hardened.service"
- # remove --init (handled by install file)
- sed -i 's/ExecStart=\/usr\/bin\/ipfs daemon --init --migrate/ExecStart=\/usr\/bin\/ipfs daemon --migrate/g' "misc/systemd/ipfs-hardened.service"
+ # remove --init and --migrate (handled by install file)
+ sed -i 's/ExecStart=\/usr\/bin\/ipfs daemon /ExecStart=\/usr\/bin\/ipfs daemon /g' "misc/systemd/ipfs-hardened.service"
# enable gc and pubsub by default (sane defaults)
sed -i 's/ExecStart=\/usr\/bin\/ipfs daemon/ExecStart=\/usr\/bin\/ipfs daemon --enable-gc --enable-pubsub-experiment --enable-namesys-pubsub/g' "misc/systemd/ipfs-hardened.service"
# increase timeouts (see #7283)
- sed -i 's/MemorySwapMax=0/MemorySwapMax=0\n\nTimeoutStartSec=15min\nTimeoutStopSec=15min\nTimeoutAbortSec=15min/' "misc/systemd/ipfs-hardened.service"
+ sed -i 's/MemorySwapMax=0/MemorySwapMax=0\n\nTimeoutStopSec=15min\nTimeoutAbortSec=15min/' "misc/systemd/ipfs-hardened.service"
}
package() {
diff --git a/go-ipfs-git.install b/go-ipfs-git.install
index 6ab20aef092c..7da084800dc9 100644
--- a/go-ipfs-git.install
+++ b/go-ipfs-git.install
@@ -22,6 +22,14 @@ post_upgrade() {
su ipfs -s /bin/bash -c "export IPFS_PATH='/var/lib/ipfs/'; ipfs init"
fi
+
+ # do the repo migration now
+ echo "stopping ipfs to check if repo migration is necessary..."
+ systemctl stop ipfs >/dev/null 2>&1 || true
+ echo "checking/running repo migration..."
+ su ipfs -s /bin/bash -c "export IPFS_PATH='/var/lib/ipfs/'; ipfs repo migrate"
+ echo "checking/migration completed"
+ echo "Please restart your ipfs service manually if necessary"
}
post_install() {