]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/strip
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / strip
index a3572dc7b9ebd9f3cae5276e6b9f0301baa4f38b..8fc7218e19fdfffdcb7326afc55d358c2b0bc11b 100644 (file)
--- a/lfs/strip
+++ b/lfs/strip
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -39,32 +39,36 @@ check :
 
 download :
 
-md5 :
+b2 :
 
 ###############################################################################
 # Installation Details
 ###############################################################################
 
 $(TARGET) :
-
-ifeq "$(LFS_PASS)" "toolchain"
-       -find $(TOOLS_DIR)/lib -type f -exec $(TOOLS_DIR)/bin/strip --strip-debug '{}' ';'
-       -find $(TOOLS_DIR)/{bin,sbin,libexec} -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';'
-       rm -rf $(TOOLS_DIR)/{,share/}{doc,info,man}
+ifeq "$(TOOLCHAIN)" "1"
+       # Strip everything in the toolchain
+       $(DIR_SRC)/src/stripper $(TOOLS_DIR) \
+               --strip="$(TOOLS_DIR)/$(CROSSTARGET)/bin/strip" \
+               --ignore-errors \
+               --exclude=$(TOOLS_DIR)/$(CROSSTARGET)
+else
+       # Don't strip VDR binaries, because they use a weird plugin system
+       # which does not work when unneeded symbols get stripped from
+       # /usr/sbin/vdr.
+       $(DIR_SRC)/src/stripper / \
+               --exclude=$(TOOLS_DIR) \
+               --exclude=$(QEMU_TARGET_HELPER) \
+               --exclude=/lib/firmware/qcom/sc8280xp/LENOVO/21BX \
+               --exclude=/tmp \
+               --exclude=/usr/lib/go \
+               --exclude=/usr/lib/vdr \
+               --exclude=/usr/sbin/vdr \
+               --exclude=/usr/bin/cargo \
+               --exclude=/usr/bin/rustdoc \
+               --exclude=/usr/bin/rustc \
+               --exclude=/usr/libexec/rust-analyzer-proc-macro-srv \
+               --exclude=/usr/libexec/cargo-credential-1password \
+               --exclude=/usr/src \
+               --exclude=/var/tmp
 endif
-
-ifeq "$(LFS_PASS)" "install"
-       # Add -ls before -exec if you want to verify what files are in the path to be stripped
-       # A running binary can't be stripped, so use the version from /tools
-       # It may fail (signal 11) under circonstance not identified by me (Gilles),
-       # to strip libc again so ignore the error now. Probably need a static strip for libc
-       # Don't use --strip-all on libraries, or they'll be destroyed. Don't use --strip-unneeded, either.
-       -/tools/bin/find /lib /usr/lib /usr/share/rrdtool-* /install/initrd/lib \
-               -type f \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
-               -exec /tools/bin/strip --strip-debug {} \; 2>/dev/null
-
-       -/tools/bin/strip --strip-all /{,usr/}{,local/}{bin,sbin}/* /install/{initrd,misc}/bin/* 2>/dev/null
-       -/tools/bin/strip --strip-all /usr/lib/awk/{grcat,pwcat} 2>/dev/null
-       -/tools/bin/strip --strip-all /usr/lib/gcc/*-linux-gnu/4.0.3/{cc1*,collect2} 2>/dev/null
-endif
-