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
-# 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
. /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
[SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (e6edc2350efa527d385324b620b365120aec010c),
Juuso Alasuutari, 01/07/2007