[2/7] rust: Drop Cargo home directory after build

Message ID 20211119174458.789486-2-michael.tremer@ipfire.org
State Accepted
Commit 112441db22d07e43c1f6b5e55d9c60f65916ed3a
Headers
Series [1/7] suricata: Include all default rules |

Commit Message

Michael Tremer Nov. 19, 2021, 5:44 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/rootfiles/common/suricata | 2 --
 lfs/Config                       | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)
  

Patch

diff --git a/config/rootfiles/common/suricata b/config/rootfiles/common/suricata
index 21dbeae64..7c512b033 100644
--- a/config/rootfiles/common/suricata
+++ b/config/rootfiles/common/suricata
@@ -1,7 +1,5 @@ 
 etc/suricata
 etc/suricata/suricata.yaml
-#root/.cargo
-#root/.cargo/.package-cache
 usr/bin/suricata
 #usr/share/doc/suricata
 #usr/share/doc/suricata/AUTHORS
diff --git a/lfs/Config b/lfs/Config
index a2d3cddc5..8b2e5dabb 100644
--- a/lfs/Config
+++ b/lfs/Config
@@ -143,6 +143,9 @@  ifeq "$(BUILD_ARCH)" "aarch64"
 	GOARCH = arm64
 endif
 
+# Rust
+export CARGOPATH = $(HOME)/.cargo
+
 ###############################################################################
 # Common Macro Definitions
 ###############################################################################
@@ -184,7 +187,7 @@  define POSTBUILD
 	@echo "Updating linker cache..."
 	@type -p ldconfig >/dev/null && ldconfig || :
 	@echo "Install done; saving file list to $(TARGET) ..."
-	@rm -rf $(GOPATH)
+	@rm -rf $(GOPATH) $(CARGOPATH)
 	@$(FIND_FILES) > $(DIR_SRC)/lsalrnew
 	@diff $(DIR_SRC)/lsalr $(DIR_SRC)/lsalrnew | grep '^> ' | sed 's/^> //' > $(TARGET)_diff
 	@cp -f $(DIR_SRC)/lsalrnew $(DIR_SRC)/lsalr