Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Flavien Bridault (0c41c262a31f17c34cdf7dd9fc86ccc2eea9c996)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Flavien Bridault <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Flavien Bridault (0c41c262a31f17c34cdf7dd9fc86ccc2eea9c996)
  • Date: Sun, 1 Oct 2006 10:13:05 -0500

GIT changes to master grimoire by Flavien Bridault <vlaaad AT sourcemage.org>:

disk/udev/52-modules.rules | 35 ------------
disk/udev/52-modules.rules-hotplug | 5 -
disk/udev/BUILD | 6 +-
disk/udev/DEPENDS | 7 --
disk/udev/DETAILS | 4 -
disk/udev/FINAL | 22 +++----
disk/udev/HISTORY | 14 +++++
disk/udev/INSTALL | 20 +------
disk/udev/helpers/cdsymlink_helper | 61
----------------------
disk/udev/helpers/mac2name | 18 ------
disk/udev/rules/07-bindings.rules | 2
disk/udev/rules/52-modules.rules | 35 ++++++++++++
disk/udev/rules/70-cdrom_perms.rules | 3 +
disk/udev/rules/70-cdrom_symlinks_and_perms.rules | 3 -
14 files changed, 70 insertions(+), 165 deletions(-)

New commits:
commit b43e631c9a31c11a09a8488e97c739dd535a3500
Author: Flavien Bridault <vlaaad AT sourcemage.org>
Commit: Flavien Bridault <vlaaad AT sourcemage.org>

udev: updated to 101, removed custom helpers and use new udev default
rules generator instead

diff --git a/disk/udev/52-modules.rules b/disk/udev/52-modules.rules
deleted file mode 100644
index fac6f9c..0000000
--- a/disk/udev/52-modules.rules
+++ /dev/null
@@ -1,35 +0,0 @@
-# Module loading rules for systems without hotplug
-
-# Autoload modules that lack aliases but have them defined in
-# /etc/modprobe.conf
-ENV{MODALIAS}!="?*", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do
/sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
-
-# Check whether we need these rules for this event
-ACTION!="add", GOTO="modprobe_end"
-
-# Autoload modules with aliases
-ATTRS{modalias}=="?*", ACTION=="add", RUN+="/sbin/modprobe $env{MODALIAS}"
-
-# PCMCIA
-SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
-
-# I2O
-SUBSYSTEM!="i2o", GOTO="i2o_end"
-RUN+="/sbin/modprobe i2o-block"
-LABEL="i2o_end"
-
-# MMC
-SUBSYSTEM!="mmc", GOTO="mmc_end"
-RUN+="/sbin/modprobe mmc-block"
-LABEL="mmc_end"
-
-# SCSI
-SUBSYSTEM!="scsi_device", GOTO="scsi_device_end"
-ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-ATTRS{type}=="1", ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
RUN+="/sbin/modprobe osst"
-ATTRS{type}=="1", RUN+="/sbin/modprobe st"
-ATTRS{type}=="[345]", RUN+="/sbin/modprobe sr_mod"
-RUN+="/sbin/modprobe sg"
-LABEL="scsi_device_end"
-
-LABEL="modprobe_end"
diff --git a/disk/udev/52-modules.rules-hotplug
b/disk/udev/52-modules.rules-hotplug
deleted file mode 100644
index 4512d32..0000000
--- a/disk/udev/52-modules.rules-hotplug
+++ /dev/null
@@ -1,5 +0,0 @@
-# Module loading rules for systems with hotplug
-
-# be backward compatible for a while with the /etc/hotplug.d/ system
-# run /etc/hotplug.d/ stuff only if we came from a hotplug event, not for
udevstart
-ENV{UDEVD_EVENT}=="1", RUN="udev_run_hotplugd $env{SUBSYSTEM}"
diff --git a/disk/udev/BUILD b/disk/udev/BUILD
index dca1df7..b83f6f9 100755
--- a/disk/udev/BUILD
+++ b/disk/udev/BUILD
@@ -1,8 +1,8 @@
make prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ V=true \
${OPTS} ${UDEV_DEBUG} &&
-make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware" \
- prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ ${OPTS} \
- ${UDEV_DEBUG} DEST_DIR="./" V=true &&
+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 \
diff --git a/disk/udev/DEPENDS b/disk/udev/DEPENDS
index f17ed61..0b1f630 100755
--- a/disk/udev/DEPENDS
+++ b/disk/udev/DEPENDS
@@ -1,13 +1,6 @@
depends gnupg &&
depends smgl-fhs &&

-. $GRIMOIRE/FUNCTIONS
-local KVER=$(get_kernel_version |cut -c-6) &&
-
-if [[ "$KVER" < "2.6.13" ]]; then
- depends hotplug
-fi &&
-
optional_depends libselinux \
"USE_SELINUX=true" \
"USE_SELINUX=false" \
diff --git a/disk/udev/DETAILS b/disk/udev/DETAILS
index 371a0ad..31c84ae 100755
--- a/disk/udev/DETAILS
+++ b/disk/udev/DETAILS
@@ -1,5 +1,5 @@
SPELL=udev
- VERSION=100
+ VERSION=101
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sign
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
@@ -9,7 +9,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL
SOURCE_GPG="kernel.gpg:$SOURCE.sign"

WEB_SITE=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
ENTERED=20030725
- PATCHLEVEL=16
+ PATCHLEVEL=17
DOCS="ChangeLog COPYING FAQ README docs/* RELEASE-NOTES"
LICENSE[0]=GPL
KEYWORDS="disk devices nodes modules"
diff --git a/disk/udev/FINAL b/disk/udev/FINAL
index d707d46..00a1e53 100755
--- a/disk/udev/FINAL
+++ b/disk/udev/FINAL
@@ -7,16 +7,12 @@ create_group video
create_group audio

# warn of coming changes
-cat << EOF
-MODALIAS and \$modalias are not needed and will be removed from one of
-the next udev versions, replace it in all rules with ENV{MODALIAS} or
-the sysfs "modalias" value.
-
-RUN="/bin/program" not longer automatically adds the subsystem
-as the first parameter. This is from the days of /sbin/hotplug
-which is dead now and it's just confusing to need to add a space at
-the end of the program name to prevent this.
-If you use rules that need the subsystem as the first parameter,
-like the old "udev_run_hotlugd" and "udev_run_devd", add the subsystem
-to the key like RUN+="/bin/program $env{SUBSYSTEM}".
-EOF
+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}"
diff --git a/disk/udev/HISTORY b/disk/udev/HISTORY
index 4d1c601..883193e 100644
--- a/disk/udev/HISTORY
+++ b/disk/udev/HISTORY
@@ -1,3 +1,17 @@
+2006-10-01 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: updated to 101
+ * DEPENDS: removed hotplug for old kernels since they are no longer
+ supported in this spell
+ * INSTALL: no longer installs custom helpers, use new udev rules
+ generator, removed hotplug test for dedicated rules
+ * BUILD: build rules generator
+ * rules/70-cdrom_symlinks_and_perms.rules: removed
+ * rules/70-cdrom_perms: added
+ * helpers/{mac2name,cdrom_symlink_helper}: removed
+ * rules/07-bindings.rules: removed
+ * 52-modules.rules: moved in /rules directory
+ * FINAL: removed old warns, added one about net interfaces naming
+
2006-09-23 Flavien Bridault <vlaaad AT sourcemage.org>
* DETAILS: Removed 092
* 50-default.rules: moved back firmware.sh there
diff --git a/disk/udev/INSTALL b/disk/udev/INSTALL
index d477c6f..69de821 100755
--- a/disk/udev/INSTALL
+++ b/disk/udev/INSTALL
@@ -9,15 +9,9 @@ for FILE in $SCRIPT_DIRECTORY/rules/* ;
install_config_file $FILE ${UDEV_CFG}/rules.d/$(basename $FILE)
done &&

-# install diff default rules on hotplug and non-hotplug systems, install
-# required modprobe aliases for non-hotplug rules
-if spell_ok hotplug; then
- install_config_file $SCRIPT_DIRECTORY/52-modules.rules-hotplug
${UDEV_CFG}/rules.d/52-modules.rules
-else
- install_config_file $SCRIPT_DIRECTORY/52-modules.rules
${UDEV_CFG}/rules.d/52-modules.rules &&
- mkdir -p $INSTALL_ROOT/etc/modprobe.d &&
- install_config_file $SCRIPT_DIRECTORY/modprobe.aliases
$INSTALL_ROOT/etc/modprobe.d/udev
-fi &&
+# 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 \
@@ -27,16 +21,10 @@ install_config_file $SOURCE_DIRECTORY/et
${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" \
+make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware
extras/rule_generator" \
prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ \
V=true ${OPTS} install &&

-# Install helper scripts
-mkdir -p /lib/udev &&
-for FILE in $SCRIPT_DIRECTORY/helpers/*; do
- install -m 755 $FILE $INSTALL_ROOT/lib/udev
-done &&
-
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 &&
diff --git a/disk/udev/helpers/cdsymlink_helper
b/disk/udev/helpers/cdsymlink_helper
deleted file mode 100644
index 803cc20..0000000
--- a/disk/udev/helpers/cdsymlink_helper
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-if [[ -z "$1" ]]; then
- echo "Not enough input!"
- echo "Usage: $0 %k"
- exit 1
-fi
-
-# Prevent conflicts between parallel processes by creating a lock dir
-# and using it as a queue ticket. Only the process that can create it
-# (meaning it doesn't already exist from another process) is allowed to
-# proceed, others have to wait. Maximum queue time is 5 seconds, queue
-# check happens every 20 milliseconds.
-lock()
-{
- [[ -d /dev/.udev ]] ||
- if ! mkdir -p /dev/.udev; then
- echo "Cannot create /dev/.udev!"
- exit 1
- fi
- LOCK_DIR=/dev/.udev/.lock-cdsymlink
- local retry=250
- while ! mkdir $LOCK_DIR 2>/dev/null; do
- if ((retry==0)); then
- echo "Cannot lock $LOCK_DIR!" >&2
- exit 2
- fi
- sleep 0.02
- ((retry-=1))
- done
-}
-
-# Once the process is finished, delete lock dir so that the next process
-# may step forward in queue.
-unlock()
-{
- [[ "$LOCK_DIR" ]] || return 0
- rm -r $LOCK_DIR 2>/dev/null || return 0
-}
-
-# Find the next available symlink name for device. $1 is the device name
-# from kernel (udev's %k value), $2 is the desired symlink basename
-# (e.g. basename "cdrom" will be used to create symlinks /dev/cdrom,
-# /dev/cdrom1, etc.)
-echo_link()
-{
- local num
- while [[ -e /dev/$2$num ]] &&
- [[ "$(readlink /dev/$2$num)" != "$1" ]]; do
- ((num+=1))
- done
- echo -n "$2$num "
-}
-
-lock
-
-# Output symlink name for cdrom, and then for dvd if needed.
-echo_link $1 cdrom
-[[ "$ID_CDROM_DVD" ]] && echo_link $1 dvd
-
-unlock
diff --git a/disk/udev/helpers/mac2name b/disk/udev/helpers/mac2name
deleted file mode 100755
index 9124da8..0000000
--- a/disk/udev/helpers/mac2name
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-# Source Mage GNU/Linux udev helper script
-# Retrieve interface name for given MAC address
-
-[[ -z $1 ]] && builtin echo Argument required! >&2 && exit 1
-
-for a in /etc/sysconfig/network/*.dev; do
- DEVICE_MAC=
- . $a 2>/dev/null
- if [[ "$DEVICE_MAC" == "$1" ]]; then
- a=${a%\.dev}
- builtin echo ${a#\/etc\/sysconfig\/network\/}
- exit 0
- fi
-done
-
-builtin echo No matching device found! >&2
-exit 1
diff --git a/disk/udev/rules/07-bindings.rules
b/disk/udev/rules/07-bindings.rules
deleted file mode 100644
index a4a03eb..0000000
--- a/disk/udev/rules/07-bindings.rules
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bind MAC addresses to interface names if they are set with netconf
-KERNEL=="eth*", ATTRS{address}=="?*", PROGRAM="/lib/udev/mac2name
%s{address}", NAME="%c"
diff --git a/disk/udev/rules/52-modules.rules
b/disk/udev/rules/52-modules.rules
new file mode 100644
index 0000000..fac6f9c
--- /dev/null
+++ b/disk/udev/rules/52-modules.rules
@@ -0,0 +1,35 @@
+# Module loading rules for systems without hotplug
+
+# Autoload modules that lack aliases but have them defined in
+# /etc/modprobe.conf
+ENV{MODALIAS}!="?*", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do
/sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
+
+# Check whether we need these rules for this event
+ACTION!="add", GOTO="modprobe_end"
+
+# Autoload modules with aliases
+ATTRS{modalias}=="?*", ACTION=="add", RUN+="/sbin/modprobe $env{MODALIAS}"
+
+# PCMCIA
+SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
+
+# I2O
+SUBSYSTEM!="i2o", GOTO="i2o_end"
+RUN+="/sbin/modprobe i2o-block"
+LABEL="i2o_end"
+
+# MMC
+SUBSYSTEM!="mmc", GOTO="mmc_end"
+RUN+="/sbin/modprobe mmc-block"
+LABEL="mmc_end"
+
+# SCSI
+SUBSYSTEM!="scsi_device", GOTO="scsi_device_end"
+ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
+ATTRS{type}=="1", ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
RUN+="/sbin/modprobe osst"
+ATTRS{type}=="1", RUN+="/sbin/modprobe st"
+ATTRS{type}=="[345]", RUN+="/sbin/modprobe sr_mod"
+RUN+="/sbin/modprobe sg"
+LABEL="scsi_device_end"
+
+LABEL="modprobe_end"
diff --git a/disk/udev/rules/70-cdrom_perms.rules
b/disk/udev/rules/70-cdrom_perms.rules
new file mode 100644
index 0000000..a0409a5
--- /dev/null
+++ b/disk/udev/rules/70-cdrom_perms.rules
@@ -0,0 +1,3 @@
+# cdrom device symlinks and permissions
+ENV{ID_CDROM}=="?*", GROUP="cdrom"
+ENV{ID_CDROM_CD_R}=="?*", MODE="0660", GROUP="burning"
diff --git a/disk/udev/rules/70-cdrom_symlinks_and_perms.rules
b/disk/udev/rules/70-cdrom_symlinks_and_perms.rules
deleted file mode 100644
index f4aa4bb..0000000
--- a/disk/udev/rules/70-cdrom_symlinks_and_perms.rules
+++ /dev/null
@@ -1,3 +0,0 @@
-# cdrom device symlinks and permissions
-ENV{ID_CDROM}=="?*", PROGRAM="cdsymlink_helper %k", SYMLINK+="%c",
GROUP="cdrom"
-ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="%c", MODE="0660", GROUP="burning"




Archive powered by MHonArc 2.6.24.

Top of Page