commit: e35587b117197615902a50077af628fb746d3b15
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 6 17:41:41 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 7 17:32:51 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=e35587b1
tools-hardened/desktop: Adds kernel source population in chroot
In order to make the building of the ISO non-reliant on any sort of
external settings from the build system, the kernel source for needs
to be populated into the chroot, along with the pre-made kernel config.
---
tools-hardened/desktop/fluxbox-run.sh | 1 +
tools-hardened/desktop/gnome3-run.sh | 1 +
tools-hardened/desktop/run-base.sh | 7 +++++++
tools-hardened/desktop/xfce4-run.sh | 1 +
4 files changed, 10 insertions(+)
diff --git a/tools-hardened/desktop/fluxbox-run.sh
b/tools-hardened/desktop/fluxbox-run.sh
index a429aad..28bbe50 100755
--- a/tools-hardened/desktop/fluxbox-run.sh
+++ b/tools-hardened/desktop/fluxbox-run.sh
@@ -80,6 +80,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
+ populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world
diff --git a/tools-hardened/desktop/gnome3-run.sh
b/tools-hardened/desktop/gnome3-run.sh
index 1280520..8b6bc73 100755
--- a/tools-hardened/desktop/gnome3-run.sh
+++ b/tools-hardened/desktop/gnome3-run.sh
@@ -71,6 +71,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
+ populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world
diff --git a/tools-hardened/desktop/run-base.sh
b/tools-hardened/desktop/run-base.sh
index 12a0ee5..24326b3 100755
--- a/tools-hardened/desktop/run-base.sh
+++ b/tools-hardened/desktop/run-base.sh
@@ -15,6 +15,12 @@ mount_dirs() {
mount --bind /sys/ "${ROOTFS}"/sys/
}
+populate_kernel_src()
+{
+ cp -f files/kernel-config "${KERNEL_SOURCE}"
+ cp -Rf "${KERNEL_SOURCE}"/ "${ROOTFS}"/usr/src/
+}
+
populate_etc() {
cp -f files/fstab "${ROOTFS}"/etc/fstab
cp -f files/resolv.conf "${ROOTFS}"/etc/resolv.conf
@@ -117,6 +123,7 @@ setup_systemd() {
cleanup_dirs() {
rm -rf "${ROOTFS}"/tmp/*
+ rm -rf "${ROOTFS}"/usr/src/*
rm -rf "${ROOTFS}"/var/cache/*
rm -rf "${ROOTFS}"/var/log/*
rm -rf "${ROOTFS}"/var/tmp/*
diff --git a/tools-hardened/desktop/xfce4-run.sh
b/tools-hardened/desktop/xfce4-run.sh
index 0d5bafc..951dab0 100755
--- a/tools-hardened/desktop/xfce4-run.sh
+++ b/tools-hardened/desktop/xfce4-run.sh
@@ -74,6 +74,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
+ populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world