From f9295cfcd5bdefa5df40d7bd633de113b4ba27fa Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 6 Mar 2020 20:42:19 +0100 Subject: [PATCH] modem/qcom_rmtfs: cleanup (!1032) - use supervise-daemon to restart when necessary - run normally, without wrapping with sh and logger - add "need qrtr-ns" to make sure it gets started first - stop enabling service directly in rmtfs package (moved to msm-modem) --- modem/qcom_rmtfs/APKBUILD | 9 ++++----- modem/qcom_rmtfs/qcom_rmtfs.initd | 22 +++++++++++++++------- modem/qcom_rmtfs/qcom_rmtfs.post-install | 3 --- 3 files changed, 19 insertions(+), 15 deletions(-) delete mode 100644 modem/qcom_rmtfs/qcom_rmtfs.post-install diff --git a/modem/qcom_rmtfs/APKBUILD b/modem/qcom_rmtfs/APKBUILD index 8273a3e33..90670c836 100644 --- a/modem/qcom_rmtfs/APKBUILD +++ b/modem/qcom_rmtfs/APKBUILD @@ -7,8 +7,7 @@ url="https://github.com/andersson/rmtfs" arch="all" license="BSD-3-Clause" makedepends="eudev-dev qrtr-dev" -install="$pkgname.post-install" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-openrc" source=" rmtfs-$_commit.tar.gz::https://github.com/andersson/rmtfs/archive/$_commit.tar.gz qcom_rmtfs.initd @@ -22,12 +21,12 @@ build() { } package() { - install -Dm755 rmtfs "$pkgdir"/usr/sbin/"$pkgname" + install -Dm755 rmtfs "$pkgdir"/usr/sbin/rmtfs install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" - install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/65-qcom_rmtfs.rules" + install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/65-$pkgname.rules" install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING } sha512sums="bdb6f0e5a37b7456c06ad5ce657b1354d5c97657b448dc29cf5dd2729a180cb9fe0aae1761ca17917626311372f6a1c8c1b6a68cebb752b2b7376cbd7fbdd2e5 rmtfs-dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1.tar.gz -4db920dc26dde899d86627cec6c4a21db61884c764c7ee83ba5bc1a2102d918c6d318113e21a8621bad47c7c6948362987d2980a916ccf9829d10e340d1f40b9 qcom_rmtfs.initd +0b90447c035a4540f0d817978b1dc6c8344e1a885679788e1a24877c2739ed3466d5b2a3994cbbb0e2d7ed4fce2debd8b5971d33765c0198220ff0833de9f08c qcom_rmtfs.initd cb2435c159d81d3a40d30e1355c82a3d560dc2df7d05fee95085bc80e492ac93a728258f2f1b463c04a964979760990c8c9176b22cb585cbec19ab285cd45440 udev.rules" diff --git a/modem/qcom_rmtfs/qcom_rmtfs.initd b/modem/qcom_rmtfs/qcom_rmtfs.initd index 0db5e4a8b..9118e896d 100755 --- a/modem/qcom_rmtfs/qcom_rmtfs.initd +++ b/modem/qcom_rmtfs/qcom_rmtfs.initd @@ -1,14 +1,22 @@ #!/sbin/openrc-run +supervisor=supervise-daemon -depend() { - after udev-settle -} +name="RMTFS" +description="Qualcomm remote file system service" # libqipcrtr4msmipc.so may not be present, on devices that don't need it export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so -command="/bin/sh" -command_args="-c 'exec /usr/sbin/qcom_rmtfs -P -r -s -v 2>&1 | logger -t qcom_rmtfs'" -command_background="yes" +# -P: find and use raw EFS partitions +# -r: avoid writing to storage +# -s: enable sync for the mss rproc instance +command="/usr/sbin/rmtfs" +command_args="-P -r -s" -pidfile="/var/run/${SVCNAME}.pid" +# https://github.com/andersson/rmtfs/commit/dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1 +respawn_delay=1 + +depend() { + after udev-settle + need qrtr-ns +} diff --git a/modem/qcom_rmtfs/qcom_rmtfs.post-install b/modem/qcom_rmtfs/qcom_rmtfs.post-install deleted file mode 100644 index 283c451d9..000000000 --- a/modem/qcom_rmtfs/qcom_rmtfs.post-install +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -rc-update -q add qcom_rmtfs boot