From 0a3be548f9b817c8258d3e8bc029a3fee66a568d Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 4 Jul 2014 16:25:03 +0000 Subject: REmove GCC binaries in the chef system manually Nasty hack, but saves 200MB or about 50% of the total size of the system. --- chef-demo.morph | 13 +++++++++++++ chef-system-x86_32-container.morph | 1 + remove-gcc.configure | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 chef-demo.morph create mode 100644 remove-gcc.configure diff --git a/chef-demo.morph b/chef-demo.morph new file mode 100644 index 00000000..606fad5e --- /dev/null +++ b/chef-demo.morph @@ -0,0 +1,13 @@ +name: chef-demo +kind: cluster +description: | + Deploy a demo Chef system. +systems: +- morph: chef-system-x86_32-container + deploy: + chef-demo: + type: tar + location: chef-demo.tar + # If you put 'yes' without the quotes yaml converts it to True. Thanks yaml. + REMOVE_GCC: "yes" + INIT_SYSTEM: busybox diff --git a/chef-system-x86_32-container.morph b/chef-system-x86_32-container.morph index 40a41e90..4abc7d64 100644 --- a/chef-system-x86_32-container.morph +++ b/chef-system-x86_32-container.morph @@ -8,6 +8,7 @@ configuration-extensions: - nfsboot - install-files - busybox-init +- remove-gcc strata: - morph: build-essential artifacts: diff --git a/remove-gcc.configure b/remove-gcc.configure new file mode 100644 index 00000000..67474af1 --- /dev/null +++ b/remove-gcc.configure @@ -0,0 +1,8 @@ +#!/bin/sh +# This configure extension is a total hack to work around the fact that +# the GCC chunk isn't split properly. I'll leave fixing that to Richard +# Maw for now. This removes about 200MB from the resulting system. + +if [ "$REMOVE_GCC" = "yes" ]; then + rm -Rf "$1"/usr/libexec/gcc/ +fi -- cgit v1.2.1