From 5ee65cb1c1810a6000cc45a691412a66c786d059 Mon Sep 17 00:00:00 2001
From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Date: Sun, 1 Mar 2015 15:10:24 +0100
Subject: [PATCH] Move the patch_all call from remaster_rootfs to the Makefile

Now rootfs patches are applied on the host (and not inside the remaster
container). Thus, _all_ patches are applied on the host.
As a side effect the assumption that "patch" is installed in the
ubuntu rootfs is removed.
---
 Makefile                                   | 3 +++
 config/copy_to_rootfs_remaster_dir/patches | 1 -
 scripts/remaster_rootfs.sh                 | 3 ---
 3 files changed, 3 insertions(+), 4 deletions(-)
 delete mode 120000 config/copy_to_rootfs_remaster_dir/patches

diff --git a/Makefile b/Makefile
index de48a69..6600661 100644
--- a/Makefile
+++ b/Makefile
@@ -184,6 +184,9 @@ $(call gentargets,$(STATE_DIR)/rootfs_remastered) : $(call archdir,%)$(STATE_DIR
 	-s lxc.mount.entry="none $(call archdir,$*)$(ROOTFS)/run tmpfs defaults 0 0" \
 	-- /bin/bash -l /remaster/remaster.proxy.sh /remaster/scripts/remaster_rootfs.sh
 	$(MAKE) ARCH=$* rootfs_finalize
+
+	#apply patches
+	$(call patch_all,$(CURDIR)/patches/rootfs,$(call archdir,$*)$(ROOTFS))
 	touch "$(call archdir,$*)$(STATE_DIR)/rootfs_remastered"
 
 rootfs_console : $(call archdir,$(ARCH))$(STATE_DIR)/rootfs_extracted | $(APT_CACHE_DIR)
diff --git a/config/copy_to_rootfs_remaster_dir/patches b/config/copy_to_rootfs_remaster_dir/patches
deleted file mode 120000
index cc06b73..0000000
--- a/config/copy_to_rootfs_remaster_dir/patches
+++ /dev/null
@@ -1 +0,0 @@
-../../patches/rootfs
\ No newline at end of file
diff --git a/scripts/remaster_rootfs.sh b/scripts/remaster_rootfs.sh
index 3a67469..0db9063 100755
--- a/scripts/remaster_rootfs.sh
+++ b/scripts/remaster_rootfs.sh
@@ -149,9 +149,6 @@ install_packages
 
 install_kde_defaults
 
-#patch rootfs
-patch_all "$SCRIPT_DIR/patches/" "/"
-
 #i.e. required for applying default-wallpaper patch
 #echo "compiling glib2 schemas..."
 #glib-compile-schemas /usr/share/glib-2.0/schemas
-- 
GitLab