install

installer
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/install

commit 4cf46edd7b69afd36ba4bb21e078baff6f19b0a7
parent a816b77429a2814af056a2ee5562086d7ede0fc3
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Fri,  6 Jan 2017 11:41:32 +0100

Add(Strip binaires): Now can strip binaries

Diffstat:
Mscreens/install/install.py | 19++++++++++++++-----
Mscreens/options/options.py | 3++-
2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/screens/install/install.py b/screens/install/install.py @@ -130,10 +130,13 @@ class Install: self.links() self.phase_2_install() -# if "KEEP_SRC" not in self.conf_lst["config"] or \ - #("KEEP_SRC" in self.conf_lst["config"] and self.conf_lst["config"]["KEEP_SRC"] == False): - #self.clean_all() - #self.dlg.msgbox("The installation is finished. Hit 'Enter' to close this dialog and reboot.", title="Success !") + if "STRIP_BIN" in self.conf_lst["config"] and self.conf_lst["config"]["STRIP_BIN"] == True: + self.strip_binaries() + + if "KEEP_SRC" not in self.conf_lst["config"] or ("KEEP_SRC" in self.conf_lst["config"] and self.conf_lst["config"]["KEEP_SRC"] == False): + self.clean_all() + + self.dlg.msgbox("The installation is finished. Hit 'Enter' to close this dialog and reboot.", title="Success !") # Need reboot here sys.exit(1) @@ -859,4 +862,10 @@ class Install: # This function clean all the installation traces def clean_all(self): self.exec(["rm", "-rf", "/tools"]) - self.exec(["rm", "-rf", "/packages"]) + self.exec(["rm", "-rf", "/tmp/*"], shell=True) + + # This function strip installed binaries + def strip_binaries(self): + self.e(["/tools/bin/find /usr/lib -type f -name \*.a -exec /tools/bin/strip --strip-debug {} ';'"], shell=True, ignore=True) + self.e(["/tools/bin/find /lib /usr/lib -type f -name \*.so* -exec /tools/bin/strip --strip-unneeded {} ';'"], shell=True, ignore=True) + self.e(["/tools/bin/find /{bin,sbin} /usr/{bin,sbin,libexec} -type f -exec /tools/bin/strip --strip-all {} ';'"], shell=True, ignore=True) diff --git a/screens/options/options.py b/screens/options/options.py @@ -45,7 +45,8 @@ class Options: ("MERGE_USR", "Build the system with symbolic links between /{bin,sbin} and /usr", 1), ("TEST", "Make all the tests possibles on packages", 0), ("FAKE_ROOT", "Build and install the packages in a fakeroot", 0), - ("BUILD_LIVECD", "Build the live-cd with the installed packages.", 0) + ("BUILD_LIVECD", "Build the live-cd with the installed packages.", 0), + ("STRIP_BIN", "Remove debyg symbols from binaries", 1) ] ##