[SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (fab861e0cdece6d25436ba94396ca847e8e7919e)

Juuso Alasuutari scm at mail.sourcemage.org
Sun Jan 21 16:06:27 EST 2007


GIT changes to master grimoire by Juuso Alasuutari <iuso at sourcemage.org>:

 disk/udev/CONFLICTS       |    3 ++-
 disk/udev/HISTORY         |   11 +++++++++++
 disk/udev/PREPARE         |   19 -------------------
 disk/udev/PRE_BUILD       |   17 +++++++++++++++++
 disk/udev/TRIGGERS        |    2 --
 disk/udev/UP_TRIGGERS     |    8 ++++++++
 kernels/hotplug/HISTORY   |    3 +++
 kernels/hotplug/PRE_BUILD |    9 +++++++++
 kernels/linux/HISTORY     |    4 ++++
 kernels/linux/UP_TRIGGERS |   17 +++++++++++++++++
 10 files changed, 71 insertions(+), 22 deletions(-)

New commits:
commit fab861e0cdece6d25436ba94396ca847e8e7919e
Author: Juuso Alasuutari <iuso at sourcemage.org>
Commit: Juuso Alasuutari <iuso at sourcemage.org>

    linux: fixing #13417

commit 16abb7c0003dd583cbf711f468c6de96a0ded68a
Author: Juuso Alasuutari <iuso at sourcemage.org>
Commit: Juuso Alasuutari <iuso at sourcemage.org>

    hotplug: fixing #13417

commit 164d82d2ee88f52e5896075757b955579879ea82
Author: Juuso Alasuutari <iuso at sourcemage.org>
Commit: Juuso Alasuutari <iuso at sourcemage.org>

    udev: fixing #13417

diff --git a/disk/udev/CONFLICTS b/disk/udev/CONFLICTS
index a68b971..bf07bd2 100755
--- a/disk/udev/CONFLICTS
+++ b/disk/udev/CONFLICTS
@@ -1 +1,2 @@
-conflicts udev-old n
+conflicts  udev-old  n
+conflicts  hotplug   n
diff --git a/disk/udev/HISTORY b/disk/udev/HISTORY
index 74623bb..a26fbe6 100644
--- a/disk/udev/HISTORY
+++ b/disk/udev/HISTORY
@@ -1,3 +1,14 @@
+2007-01-21 Juuso Alasuutari <iuso at sourcemage.org>
+	* all: These edits are aimed at fixing bug #13417.
+	* PRE_BUILD: Moved kernel version check here from PREPARE
+	  because failing in configure phase is undefined behavior.
+	* PREPARE: Deleted.
+	* TRIGGERS: Deleted, not needed anymore.
+	* UP_TRIGGERS: Added, recast init.d if it depends on udev-old to
+	  update it to depend on new udev.
+	* CONFLICTS: Added conflicts hotplug because module loading with
+	  hotplug is deprecated upstream in favor of udev.
+
 2007-01-07 Juuso Alasuutari <iuso at sourcemage.org>
 	* DETAILS: Updated to 104.
 	* PREPARE: Fixed kernel ver checking, removed obsolete check for
diff --git a/disk/udev/PREPARE b/disk/udev/PREPARE
deleted file mode 100755
index d1b4721..0000000
--- a/disk/udev/PREPARE
+++ /dev/null
@@ -1,19 +0,0 @@
-# Source grimoire FUNCTIONS to have get_kernel_version
-.  "$GRIMOIRE/FUNCTIONS"
-
-# kernel < 2.6.15-rc1 can't use udev > 0.93 because udevsend
-# has been removed
-
-local  KVER=$(get_kernel_version)        &&
-local  VER2=$(echo $KVER | cut -d. -f2)  &&
-local  VER3=$(echo $KVER | cut -d. -f3)  &&
-       VER3=${VER3%%[^0-9]*}             &&
-
-if (( VER2 < 6 ))            ||
-   (( VER2 == 6 && VER3 < 15 ))
-then
-  message  "${PROBLEM_COLOR}You have a kernel < 2.6.15, it is too"    \
-           "old for the latest udev.\nPlease cast udev-old instead."  \
-           "$DEFAULT_COLOR"                                           &&
-  return 1
-fi
diff --git a/disk/udev/PRE_BUILD b/disk/udev/PRE_BUILD
index 003ab00..c074d5b 100755
--- a/disk/udev/PRE_BUILD
+++ b/disk/udev/PRE_BUILD
@@ -1,3 +1,20 @@
+# kernel < 2.6.15 can't use udev > 092 because udevsend has been removed
+
+local  KVER=$(get_kernel_version)        &&
+local  VER2=$(echo $KVER | cut -d. -f2)  &&
+local  VER3=$(echo $KVER | cut -d. -f3)  &&
+       VER3=${VER3%%[^0-9]*}             &&
+
+if (( VER2 < 6 ))            ||
+   (( VER2 == 6 && VER3 < 15 ))
+then
+  message  "${PROBLEM_COLOR}You have a kernel < 2.6.15, it is too"  \
+           "old for udev. Please install\na newer kernel.\nIf you"  \
+           "insist on using your old kernel with hotplug,\nyou"     \
+           "can install udev-old.$DEFAULT_COLOR"                    &&
+  return 1
+fi  &&
+
 default_pre_build        &&
 cd  "$SOURCE_DIRECTORY"  &&
 
diff --git a/disk/udev/TRIGGERS b/disk/udev/TRIGGERS
deleted file mode 100755
index 0ae3c19..0000000
--- a/disk/udev/TRIGGERS
+++ /dev/null
@@ -1,2 +0,0 @@
-on_cast    hotplug  cast_self
-on_dispel  hotplug  cast_self
diff --git a/disk/udev/UP_TRIGGERS b/disk/udev/UP_TRIGGERS
new file mode 100755
index 0000000..24637c4
--- /dev/null
+++ b/disk/udev/UP_TRIGGERS
@@ -0,0 +1,8 @@
+# when upgrading from udev-old also trigger init.d to refresh its depends
+
+.  "$GRIMOIRE/is_depends_enabled.function"
+
+if  is_depends_enabled  init.d  udev-old
+then
+  up_trigger  init.d  cast_self
+fi
diff --git a/kernels/hotplug/HISTORY b/kernels/hotplug/HISTORY
index a7afb6e..48570b8 100644
--- a/kernels/hotplug/HISTORY
+++ b/kernels/hotplug/HISTORY
@@ -1,3 +1,6 @@
+2007-01-21 Juuso Alasuutari <iuso at sourcemage.org>
+	* PRE_BUILD: Added, abort if udev > 092 is installed (bug #13417).
+
 2006-09-21 Juuso Alasuutari <iuso at sourcemage.org>
 	* DETAILS: [automated] Removed BUILD_API=2.
 
diff --git a/kernels/hotplug/PRE_BUILD b/kernels/hotplug/PRE_BUILD
new file mode 100755
index 0000000..dc20895
--- /dev/null
+++ b/kernels/hotplug/PRE_BUILD
@@ -0,0 +1,9 @@
+local  UVER=$(installed_version udev | sed -e "s/^0*//")  &&
+
+if (( UVER > 92 ))
+then
+  message  "${PROBLEM_COLOR}You have udev > 092 installed"    \
+           "and hotplug is deprecated in favor of new\nudev"  \
+           "versions, aborting.$DEFAULT_COLOR"                &&
+  return 1
+fi
diff --git a/kernels/linux/HISTORY b/kernels/linux/HISTORY
index 1a609d5..b9afa66 100644
--- a/kernels/linux/HISTORY
+++ b/kernels/linux/HISTORY
@@ -1,3 +1,7 @@
+2007-01-21 Juuso Alasuutari <iuso at sourcemage.org>
+	* UP_TRIGGERS: Added, when casting a > 2.6.14 kernel upgrade to
+	  newer udev if installed version is < 093 (bug #13417).
+
 2007-01-18 David Brown <dmlb2000 at gmail.com>
 	* info/patches/xen_patches/xen-3.0.4-2.6.16.33.patch: added
 
diff --git a/kernels/linux/UP_TRIGGERS b/kernels/linux/UP_TRIGGERS
new file mode 100755
index 0000000..e04e715
--- /dev/null
+++ b/kernels/linux/UP_TRIGGERS
@@ -0,0 +1,17 @@
+# upgrade udev if the installed version is < 093 and we're casting
+# a > 2.6.14 kernel
+
+local  UVER=$(installed_version udev | sed -e "s/^0*//")  &&
+
+if (( UVER > 1 && UVER < 93 )) || spell_ok udev-old
+then
+  local VER2=$(echo $VERSION | cut -d. -f2)  &&
+  local VER3=$(echo $VERSION | cut -d. -f3)  &&
+  VER3=${VER3%%[^0-9]*}                      &&
+
+  if (( VER > 6 ))             ||
+     (( VER2 == 6 && VER3 > 14 ))
+  then
+    up_trigger  udev  cast_self
+  fi
+fi



More information about the SM-Commit mailing list