[Buildroot] [git commit branch/2021.08.x] package/swupdate: prevent systemd from removing swupdate tmp folders
Peter Korsgaard
peter at korsgaard.com
Mon Sep 13 13:26:10 UTC 2021
commit: https://git.buildroot.net/buildroot/commit/?id=73550db1d60ea62bac5e437af6bf374a6ad3a7fd
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.08.x
Ensure these folders are excluded from being cleaned up by systemd.
Fixes:
[ERROR] : SWUPDATE failed [0] ERROR : I cannot open /tmp/scripts/format.lua 2
[ERROR] : SWUPDATE failed [0] ERROR : extracting script to /tmp/scripts/ failed
[ERROR] : SWUPDATE failed [1] Installation failed !
Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
(cherry picked from commit daa46718e0642a92c59edb166ced1ff1911b0043)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/swupdate/swupdate.mk | 2 ++
package/swupdate/tmpfiles-swupdate.conf | 2 ++
2 files changed, 4 insertions(+)
diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index cf3607a661..4bcdb96602 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -248,6 +248,8 @@ define SWUPDATE_INSTALL_INIT_SYSTEMD
$(SWUPDATE_INSTALL_COMMON)
$(INSTALL) -D -m 644 package/swupdate/swupdate.service \
$(TARGET_DIR)/usr/lib/systemd/system/swupdate.service
+ $(INSTALL) -D -m 644 package/swupdate/tmpfiles-swupdate.conf \
+ $(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
endef
define SWUPDATE_INSTALL_INIT_SYSV
$(SWUPDATE_INSTALL_COMMON)
diff --git a/package/swupdate/tmpfiles-swupdate.conf b/package/swupdate/tmpfiles-swupdate.conf
new file mode 100644
index 0000000000..4743672fcc
--- /dev/null
+++ b/package/swupdate/tmpfiles-swupdate.conf
@@ -0,0 +1,2 @@
+X /tmp/datadst
+X /tmp/scripts
More information about the buildroot
mailing list