Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (e6edc2350efa527d385324b620b365120aec010c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Juuso Alasuutari <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (e6edc2350efa527d385324b620b365120aec010c)
  • Date: Sun, 7 Jan 2007 06:15:50 -0600

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

disk/udev/BUILD | 21 -----------
disk/udev/CONFIGURE | 66 +++++++++++++++++++++++-----------
disk/udev/DEPENDS | 10 ++---
disk/udev/DETAILS | 4 +-
disk/udev/FINAL | 30 +++++++--------
disk/udev/HISTORY | 22 +++++++++++
disk/udev/INSTALL | 87
++++++++++++++++++++++------------------------
disk/udev/Makefile.patch | 6 +--
disk/udev/PREPARE | 31 ++++++----------
disk/udev/PRE_BUILD | 15 ++-----
disk/udev/init.d/coldplug | 6 ++-
disk/udev/init.d/udevd | 2 -
disk/udev/udev.conf | 25 ++++---------
disk/udev/udev.missing | 3 +
14 files changed, 167 insertions(+), 161 deletions(-)

New commits:
commit e6edc2350efa527d385324b620b365120aec010c
Author: Juuso Alasuutari <iuso AT sourcemage.org>
Commit: Juuso Alasuutari <iuso AT sourcemage.org>

udev 104. Also lots of fixes all around. Udev is now bright and shiny,
still need to go through all the rules.

diff --git a/disk/udev/BUILD b/disk/udev/BUILD
index b83f6f9..d84b706 100755
--- a/disk/udev/BUILD
+++ b/disk/udev/BUILD
@@ -1,20 +1 @@
-make prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ V=true \
- ${OPTS} ${UDEV_DEBUG} &&
-make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware \
- extras/rule_generator" prefix=${INSTALL_ROOT}/
exec_prefix=${INSTALL_ROOT}/ \
- ${OPTS} ${UDEV_DEBUG} DEST_DIR="./" V=true &&
-
-if [[ "$UDEV_EXTRAS" == 'y' ]]; then
- make EXTRAS="extras/ata_id extras/dasd_id extras/edd_id extras/floppy \
- extras/scsi_id extras/usb_id extras/volume_id" \
- prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ ${OPTS} \
- ${UDEV_DEBUG} DEST_DIR="./" V=true
-fi
-
-#if [[ "$UDEV_STATIC" == 'y' ]]; then
-# pushd __static__ &&
-# # we are not going to use `make install' so no need to set its parameters
-# message "${MESSAGE_COLOR}Building static utilities:
$UDEV_STATIC_TARGET${DEFAULT_COLOR}" &&
-# make USE_STATIC=true V=true $OPTS $UDEV_STATIC_TARGET &&
-# popd
-#fi
+make prefix=$INSTALL_ROOT $OPTS $UDEV_DEBUG V=true EXTRAS="$_EXTRAS_TARG"
diff --git a/disk/udev/CONFIGURE b/disk/udev/CONFIGURE
index 84286b3..fec797e 100755
--- a/disk/udev/CONFIGURE
+++ b/disk/udev/CONFIGURE
@@ -1,22 +1,44 @@
-config_query UDEV_PERSIST 'Install persistent storage rules?' n &&
-
-config_query UDEV_PERSIST_INPUT 'Install persistent input rules?' n
-
-config_query_option UDEV_DEBUG 'Compile extra debugging messages?' n
'DEBUG=true' 'DEBUG=false' &&
-
-#config_query UDEV_STATIC 'Create static binaries in addition to dynamically
linked ones?' n &&
-#if [[ "$UDEV_STATIC" == 'y' ]]; then
-# if [[ -z "$UDEV_STATIC_TARGET" ]]; then
-# # add more UDEV utilities here as necessary, space-separated
-# local UDEV_STATIC_TARGET="udevstart"
-# fi &&
-# persistent_add UDEV_STATIC_TARGET &&
-# message "${MESSAGE_COLOR}Static utilities (with suffix .static):
$UDEV_STATIC_TARGET${DEFAULT_COLOR}"
-#fi &&
-
-if [[ "$UDEV_PERSIST" == "y" ]]; then
- UDEV_EXTRAS=y &&
- persistent_add UDEV_EXTRAS
-else
- config_query UDEV_EXTRAS 'Compile extras helpers?' y
-fi
+# Added in stable 0.6, remove when appropriate
+if [[ $UDEV_PERSIST ]]
+then
+ UDEV_PERSIST_STORAGE=$UDEV_PERSIST &&
+ persistent_add UDEV_PERSIST_STORAGE &&
+ persistent_remove UDEV_PERSIST
+fi &&
+
+config_query UDEV_PERSIST_STORAGE \
+ 'Install persistent storage rules?' \
+ n &&
+
+config_query UDEV_PERSIST_INPUT \
+ 'Install persistent input rules?' \
+ n &&
+
+if [[ $UDEV_PERSIST_STORAGE == n ]]
+then
+ config_query UDEV_EXTRAS \
+ 'Build extra helpers?' \
+ y
+fi &&
+
+config_query_option UDEV_DEBUG \
+ 'Compile extra debugging messages?' \
+ n \
+ 'DEBUG=true' \
+ 'DEBUG=false' &&
+
+# Store extras build options in a var for reuse
+
+local _EXTRAS_TARG="extras/run_directory extras/cdrom_id \
+ extras/firmware extras/rule_generator" &&
+
+if [[ $UDEV_EXTRAS == y || $UDEV_PERSIST_STORAGE == y ]]
+then
+ _EXTRAS_TARG="$_EXTRAS_TARG extras/ata_id extras/usb_id extras/edd_id \
+ extras/floppy extras/scsi_id extras/dasd_id extras/volume_id"
+elif [[ $UDEV_PERSIST_INPUT == y ]]
+then
+ _EXTRAS_TARG="$_EXTRAS_TARG extras/usb_id"
+fi &&
+
+persistent_add _EXTRAS_TARG
diff --git a/disk/udev/DEPENDS b/disk/udev/DEPENDS
index 0b1f630..e878072 100755
--- a/disk/udev/DEPENDS
+++ b/disk/udev/DEPENDS
@@ -4,9 +4,9 @@ depends smgl-fhs &&
optional_depends libselinux \
"USE_SELINUX=true" \
"USE_SELINUX=false" \
- "For selinux support" &&
+ "for SELinux support" &&

-optional_depends SYSTEM-LOGGER \
- "USE_LOG=true" \
- "USE_LOG=false" \
- "For logging through syslog"
+optional_depends SYSTEM-LOGGER \
+ "USE_LOG=true" \
+ "USE_LOG=false" \
+ "for logging to syslog"
diff --git a/disk/udev/DETAILS b/disk/udev/DETAILS
index 2d93df6..466628c 100755
--- a/disk/udev/DETAILS
+++ b/disk/udev/DETAILS
@@ -1,8 +1,8 @@
SPELL=udev
- VERSION=103
+ VERSION=104
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sign
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
SOURCE_URL=$KERNEL_URL/pub/linux/utils/kernel/hotplug/$SOURCE
SOURCE2_URL=$SOURCE_URL.sign
SOURCE2_IGNORE=signature
diff --git a/disk/udev/FINAL b/disk/udev/FINAL
index 00a1e53..822b61f 100755
--- a/disk/udev/FINAL
+++ b/disk/udev/FINAL
@@ -1,18 +1,18 @@
#Ensure that all groups used in 50-default.rules exist
-create_group disk
-create_group cdrom
-create_group floppy
-create_group burning
-create_group video
-create_group audio
+create_group disk
+create_group cdrom
+create_group floppy
+create_group burning
+create_group video
+create_group audio

# warn of coming changes
-message ""
-message "${PROBLEM_COLOR}About persistent net interfaces naming:"
-message ""
-message "${MESSAGE_COLOR}The spell now uses udev rules generator. Next time
you boot, udev will generate"
-message "a rules file called /etc/udev/rules.d/70-persistent-net.rules for
all the"
-message "interfaces it has detected. Then you can modify the name of the
interface by"
-message "changing the NAME key. Udev will not erase it."
-message "The old configuration stuff with the DEVICE_MAC field in netconf is
now obsolete."
-message "${DEFAULT_COLOR}"
+message "\n${PROBLEM_COLOR}About persistent net interfaces naming:" \
+ "$DEFAULT_COLOR$MESSAGE_COLOR" \
+ "\nThe spell now uses udev rules generator. Next time you" \
+ "boot, udev will\ngenerate a rules file called" \
+ "/etc/udev/rules.d/70-persistent-net.rules\nfor all the" \
+ "interfaces it has detected. Then you can modify the name" \
+ "of\nthe interface by changing the NAME key. Udev will" \
+ "not erase it.\nThe old configuration stuff with the" \
+ "DEVICE_MAC field in netconf is now\nobsolete.$DEFAULT_COLOR"
diff --git a/disk/udev/HISTORY b/disk/udev/HISTORY
index 81524c7..74623bb 100644
--- a/disk/udev/HISTORY
+++ b/disk/udev/HISTORY
@@ -1,3 +1,25 @@
+2007-01-07 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: Updated to 104.
+ * PREPARE: Fixed kernel ver checking, removed obsolete check for
+ install_config_file.
+ * CONFIGURE: Renamed UDEV_PERSIST to UDEV_PERSIST_STORAGE,
+ created _EXTRAS_TARG var for storing extras build targets,
+ removed stale commented code.
+ * DEPENDS: Cleaned wording & formatting.
+ * PRE_BUILD: Removed commented code.
+ * BUILD: Removed redundant make commands and commented code,
+ only needs one make command that gets its volatile build
+ targets from $_EXTRAS_TARG.
+ * INSTALL: Removed redundant make commands, removed commented
+ code, fixed borked conditional logic, cleaned up real good.
+ * FINAL: Moved notify text into a single message call.
+ * udev.conf: Removed default_* vars (not used since 051), added
+ udev_log, updated comments, added notice about devices script.
+ * udev.missing: Fixed typo in comment.
+ * Makefile.patch: Updated.
+ * init.d/coldplug: More verbose status messages, retval handling.
+ * init.d/udevd: Removed trailing empty lines.
+
2006-10-21 Flavien Bridault <vlaaad AT sourcemage.org>
* DETAILS: Updated to 103

diff --git a/disk/udev/INSTALL b/disk/udev/INSTALL
index 69de821..a5c3874 100755
--- a/disk/udev/INSTALL
+++ b/disk/udev/INSTALL
@@ -1,48 +1,47 @@
-install -d ${INSTALL_ROOT}/sys &&
-local FILE UDEV_CFG=${INSTALL_ROOT}/etc/udev &&
-mkdir -p ${UDEV_CFG}/rules.d &&
+local file UDEV_CFG="$INSTALL_ROOT/etc/udev" &&
+mkdir -p "$INSTALL_ROOT/sys" "$UDEV_CFG/rules.d" &&

-install_config_file $SCRIPT_DIRECTORY/udev.conf ${UDEV_CFG}/udev.conf &&
-install_config_file $SCRIPT_DIRECTORY/udev.missing ${UDEV_CFG}/udev.missing
&&
-
-for FILE in $SCRIPT_DIRECTORY/rules/* ; do
- install_config_file $FILE ${UDEV_CFG}/rules.d/$(basename $FILE)
+for file in $SCRIPT_DIRECTORY/rules/*
+do
+ install_config_file "$file" \
+ "$UDEV_CFG/rules.d/$(basename $file)"
done &&

-# install required modprobe aliases for non-hotplug rules
-mkdir -p $INSTALL_ROOT/etc/modprobe.d &&
-install_config_file $SCRIPT_DIRECTORY/modprobe.aliases
$INSTALL_ROOT/etc/modprobe.d/udev
-
-# install early rules
-install_config_file $SOURCE_DIRECTORY/etc/udev/rules.d/05-udev-early.rules \
- ${UDEV_CFG}/rules.d/05-udev-early.rules &&
-# install late rules
-install_config_file $SOURCE_DIRECTORY/etc/udev/rules.d/95-udev-late.rules \
- ${UDEV_CFG}/rules.d/95-udev-late.rules
-
-make prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ V=true ${OPTS}
install &&
-make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware
extras/rule_generator" \
- prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ \
- V=true ${OPTS} install &&
-
-if [[ "$UDEV_EXTRAS" == 'y' ]]; then
- make EXTRAS="extras/ata_id extras/dasd_id extras/edd_id extras/floppy
extras/scsi_id extras/usb_id extras/volume_id" prefix=${INSTALL_ROOT}/
exec_prefix=${INSTALL_ROOT}/ ${OPTS} V=true install &&
- install extras/path_id/path_id ${INSTALL_ROOT}/lib/udev &&
-
- if [[ "$UDEV_PERSIST" == 'y' ]]; then
- install_config_file etc/udev/rules.d/60-persistent-storage.rules
${UDEV_CFG}/rules.d/60-persistent-storage.rules
- fi &&
-
- if [ "$UDEV_PERSIST_INPUT" == 'y' ]; then
- install_config_file etc/udev/rules.d/60-persistent-input.rules
${UDEV_CFG}/rules.d/60-persistent-input.rules
- fi
+install_config_file
"$SOURCE_DIRECTORY/etc/udev/rules.d/05-udev-early.rules" \
+ "$UDEV_CFG/rules.d/05-udev-early.rules"
&&
+
+install_config_file "$SOURCE_DIRECTORY/etc/udev/rules.d/95-udev-late.rules"
\
+ "$UDEV_CFG/rules.d/95-udev-late.rules"
&&
+
+if [[ $UDEV_PERSIST_STORAGE == y ]]
+then
+ install_config_file etc/udev/rules.d/60-persistent-storage.rules \
+ "$UDEV_CFG/rules.d/60-persistent-storage.rules"
+fi &&
+
+if [[ $UDEV_PERSIST_INPUT == y ]]
+then
+ install_config_file etc/udev/rules.d/60-persistent-input.rules \
+ "$UDEV_CFG/rules.d/60-persistent-input.rules"
+fi &&
+
+# Aliases for modprobe
+mkdir -p "$INSTALL_ROOT/etc/modprobe.d" &&
+install_config_file "$SCRIPT_DIRECTORY/modprobe.aliases" \
+ "$INSTALL_ROOT/etc/modprobe.d/udev" &&
+
+# These are used by devices init script, udev.conf also by udev
+install_config_file "$SCRIPT_DIRECTORY/udev.conf" \
+ "$UDEV_CFG/udev.conf" &&
+install_config_file "$SCRIPT_DIRECTORY/udev.missing" \
+ "$UDEV_CFG/udev.missing" &&
+
+make prefix="$INSTALL_ROOT" $OPTS $UDEV_DEBUG \
+ V=true EXTRAS="$_EXTRAS_TARG" install &&
+
+# Persistent rules need path_id helper
+if [[ $UDEV_PERSIST_STORAGE == y || $UDEV_PERSIST_INPUT == y ]]
+then
+ install extras/path_id/path_id \
+ "$INSTALL_ROOT/lib/udev/"
fi
-
-#if [[ "$UDEV_STATIC" == 'y' ]]; then
-# pushd __static__ &&
-# # we are not supposed to use `make install'
-# for FILE in $UDEV_STATIC_TARGET; do
-# install -D $FILE $INSTALL_ROOT/usr/sbin/$FILE.static
-# done &&
-# popd
-#fi
diff --git a/disk/udev/Makefile.patch b/disk/udev/Makefile.patch
index 77c1c5b..a887ac2 100644
--- a/disk/udev/Makefile.patch
+++ b/disk/udev/Makefile.patch
@@ -1,6 +1,6 @@
---- Makefile 2006-06-25 15:48:49.000000000 +0300
-+++ Makefile.new 2006-06-25 15:49:39.000000000 +0300
-@@ -294,11 +294,6 @@
+--- Makefile~ 2007-01-02 16:58:41.000000000 +0200
++++ Makefile 2007-01-07 01:39:26.000000000 +0200
+@@ -285,11 +285,6 @@
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
diff --git a/disk/udev/PREPARE b/disk/udev/PREPARE
index e5e0a8a..d1b4721 100755
--- a/disk/udev/PREPARE
+++ b/disk/udev/PREPARE
@@ -1,24 +1,19 @@
# Source grimoire FUNCTIONS to have get_kernel_version
-. $SCRIPT_DIRECTORY/../../FUNCTIONS
+. "$GRIMOIRE/FUNCTIONS"

-# testing if the install_config_file function is available
-# we don't want to spend time building udev if we can't install it properly
+# kernel < 2.6.15-rc1 can't use udev > 0.93 because udevsend
+# has been removed

-if ! grep -q install_config_file /var/lib/sorcery/modules/libapi ; then
- message "${PROBLEM_COLOR}You don't have the latest stable Sorcery. Run
- \`sorcery update\`${DEFAULT_COLOR}" &&
- return 1
-fi
-
-KERNEL_VERSION=$(get_kernel_version) &&
-PATCHLEVEL=`echo $KERNEL_VERSION | cut -d. -f2` &&
-SUBLEVEL=`echo $KERNEL_VERSION | cut -d. -f3` &&
-tmp=`echo $KERNEL_VERSION | cut -d. -f3 | sed 's/^[0-9]*//g'` &&
-SUBLEVEL=${SUBLEVEL/$tmp/} &&
+local KVER=$(get_kernel_version) &&
+local VER2=$(echo $KVER | cut -d. -f2) &&
+local VER3=$(echo $KVER | cut -d. -f3) &&
+ VER3=${VER3%%[^0-9]*} &&

-# kernel < 2.6.15-rc1 can't use udev > 0.93 tarballs because udevsend has
been removed
-if [ $SUBLEVEL -lt 15 -o $PATCHLEVEL -lt 6 ]; then
- message "${PROBLEM_COLOR}You have a kernel < 2.6.15, it is too old for
latest udev." &&
- message "Please use udev-old spell instead..." &&
+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 5a3ef7c..003ab00 100755
--- a/disk/udev/PRE_BUILD
+++ b/disk/udev/PRE_BUILD
@@ -1,12 +1,5 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&

-# Prevent udev restart on 'make install',
-# allow network interface renaming with existing name.
-patch -p0 < $SCRIPT_DIRECTORY/Makefile.patch
-
-#if [[ "$UDEV_STATIC" == 'y' ]]; then
-# message "${MESSAGE_COLOR}Setting up static build
directory...${DEFAULT_COLOR}" &&
-# mkdir __static__ &&
-# cp -aRv Makefile *.{c,h} ./__static__/
-#fi
+# Prevent udev restart on 'make install'
+patch -p0 < "$SCRIPT_DIRECTORY/Makefile.patch"
diff --git a/disk/udev/init.d/coldplug b/disk/udev/init.d/coldplug
old mode 100644
new mode 100755
index cebfb79..66ca154
--- a/disk/udev/init.d/coldplug
+++ b/disk/udev/init.d/coldplug
@@ -10,10 +10,12 @@ NEEDS="udevd"

start()
{
- echo "Populating /dev with existing devices"
+ echo "Triggering kernel device uevents..."
/sbin/udevtrigger
- # Wait for udev events
+ evaluate_retval
+ echo "Waiting for all events to be handled..."
/sbin/udevsettle --timeout=60
+ evaluate_retval
}

stop() { exit 0; }
diff --git a/disk/udev/init.d/udevd b/disk/udev/init.d/udevd
index 9942271..970089b 100755
--- a/disk/udev/init.d/udevd
+++ b/disk/udev/init.d/udevd
@@ -7,5 +7,3 @@ ESSENTIAL=yes
NEEDS="devices"

. /etc/init.d/smgl_init
-
-
diff --git a/disk/udev/udev.conf b/disk/udev/udev.conf
index 900642e..1dfcbd9 100644
--- a/disk/udev/udev.conf
+++ b/disk/udev/udev.conf
@@ -3,23 +3,16 @@
#
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.
+#
+# NOTICE: The udev_root setting is needed by the devices init script.

+# Specifies where to place the device nodes in the filesystem.
+udev_root="/dev"

-# udev_root - where in the filesystem to place the device nodes
-udev_root="/dev/"
-
-# udev_rules - The name and location of the udev rules file
+# The name of the udev rules file or directory to look for files with
+# the suffix .rules. Multiple rule files are read in lexical order.
udev_rules="/etc/udev/rules.d"

-# default_mode - set the default mode for all nodes that have no
-# explicit match in the permissions file
-default_mode="0600"
-
-# default_owner - set the default owner for all nodes that have no
-# explicit match in the permissions file
-default_owner="root"
-
-# default_group - set the default group for all nodes that have no
-# explicit match in the permissions file
-default_group="root"
-
+# The logging priority. Valid values are the numerical syslog priorities
+# or their textual representations: err, info and debug.
+udev_log="err"
diff --git a/disk/udev/udev.missing b/disk/udev/udev.missing
index 796a150..4a210ed 100644
--- a/disk/udev/udev.missing
+++ b/disk/udev/udev.missing
@@ -2,7 +2,8 @@
#
# this file contains a list of devices that udev doesn't create because
# they are missing from sysfs
-# /etc/init.d/%DEV/devices will read this file and create the device nodes
+# /etc/init.d/runlevels/%DEV/devices will read this file and create the
+# device nodes
#
# format:
# devname:type:major:minor:permissions:owner:group




Archive powered by MHonArc 2.6.24.

Top of Page