Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Remko van der Vossen (577be8dad91bc56d22140004cb44ce051dfd6dd1)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Remko van der Vossen <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Remko van der Vossen (577be8dad91bc56d22140004cb44ce051dfd6dd1)
  • Date: Fri, 2 Nov 2018 07:35:05 +0000

GIT changes to master grimoire by Remko van der Vossen <wich AT sourcemage.org>:

chroot.function | 18 ++++++++++++++++++
disk/eudev/HISTORY | 3 +++
disk/eudev/PRE_BUILD | 49 ++++++++++++++++++++++++++-----------------------
3 files changed, 47 insertions(+), 23 deletions(-)

New commits:
commit 577be8dad91bc56d22140004cb44ce051dfd6dd1
Author: Remko van der Vossen <wich AT sourcemage.org>
Commit: Remko van der Vossen <wich AT sourcemage.org>

eudev: only check kernel config when not in a chroot

diff --git a/chroot.function b/chroot.function
new file mode 100644
index 0000000..5ebb93e
--- /dev/null
+++ b/chroot.function
@@ -0,0 +1,18 @@
+#---------------------------------------------------------------------
+## @Synopsis Set of functions for handling chroots
+##
+## @Copyright Source Mage Team
+#---------------------------------------------------------------------
+
+#---------------------------------------------------------------------
+## Determine whether the current environment is a chroot or not.
+##
+## Limitation; the chroot will not be detected if the chroot is using
+## "/" as a mountpoint or if pid 1 itself is the chroot.
+##
+## @return 0 if the current environment is a chroot
+## @return 1 if the current environment is not a chroot
+#---------------------------------------------------------------------
+function is_chroot() {
+ [[ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]]
+}
diff --git a/disk/eudev/HISTORY b/disk/eudev/HISTORY
index 012721e..d20589a 100644
--- a/disk/eudev/HISTORY
+++ b/disk/eudev/HISTORY
@@ -1,3 +1,6 @@
+2018-11-01 Remko van der Vossen <wich AT sourcemage.org>
+ * PRE_BUILD: only check kernel config when not in a chroot
+
2018-10-13 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 3.2.6
* PRE_BUILD, fix-modes.patch: added upstream fix to default rules
diff --git a/disk/eudev/PRE_BUILD b/disk/eudev/PRE_BUILD
index 366cf46..7172e9e 100755
--- a/disk/eudev/PRE_BUILD
+++ b/disk/eudev/PRE_BUILD
@@ -1,30 +1,33 @@
-if [[ "$(get_kernel_config CONFIG_DEVTMPFS)" != "y" &&
- "$(get_kernel_config CONFIG_DEVTMPFS_MOUNT)" != "y" ]]; then
- message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
- "CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT
built-in${DEFAULT_COLOR}" &&
- return 1
-fi &&
+. "$GRIMOIRE"/chroot.function

-if [[ "$(get_kernel_config CONFIG_FHANDLE)" != "y" ]]; then
- message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
- "CONFIG_FHANDLE built-in${DEFAULT_COLOR}" &&
- return 1
-fi &&
+if ! is_chroot; then
+ if [[ "$(get_kernel_config CONFIG_DEVTMPFS)" != "y" &&
+ "$(get_kernel_config CONFIG_DEVTMPFS_MOUNT)" != "y" ]]; then
+ message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
+ "CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT
built-in${DEFAULT_COLOR}" &&
+ return 1
+ fi &&

-if [[ "$(get_kernel_config CONFIG_NET)" != "y" ]]; then
- message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
- "CONFIG_NET built-in${DEFAULT_COLOR}" &&
- return 1
-fi &&
+ if [[ "$(get_kernel_config CONFIG_FHANDLE)" != "y" ]]; then
+ message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
+ "CONFIG_FHANDLE built-in${DEFAULT_COLOR}" &&
+ return 1
+ fi &&

-# Disable userspace firmware loader in Linux 3.7+
-if [[ "$(get_kernel_version|cut -d. -f3)" -ge "37" &&
- "$(get_kernel_config CONFIG_FW_LOADER_USER_HELPER)" == "y" ]]; then
- message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
- "CONFIG_FW_LOADER_USER_HELPER disabled${DEFAULT_COLOR}" &&
- return 1
-fi &&
+ if [[ "$(get_kernel_config CONFIG_NET)" != "y" ]]; then
+ message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
+ "CONFIG_NET built-in${DEFAULT_COLOR}" &&
+ return 1
+ fi &&

+ # Disable userspace firmware loader in Linux 3.7+
+ if [[ "$(get_kernel_version|cut -d. -f3)" -ge "37" &&
+ "$(get_kernel_config CONFIG_FW_LOADER_USER_HELPER)" == "y" ]]; then
+ message "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${PROBLEM_COLOR} requires" \
+ "CONFIG_FW_LOADER_USER_HELPER disabled${DEFAULT_COLOR}" &&
+ return 1
+ fi
+fi &&

create_group input &&
default_pre_build &&



  • [SM-Commit] GIT changes to master grimoire by Remko van der Vossen (577be8dad91bc56d22140004cb44ce051dfd6dd1), Remko van der Vossen, 11/02/2018

Archive powered by MHonArc 2.6.24.

Top of Page