Skip to Content.
Sympa Menu

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

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 z-rejected grimoire by Juuso Alasuutari (ac2c9b386ac14ae71770c8881bf90592fcf307a5)
  • Date: Sun, 17 Dec 2006 11:55:32 -0600

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

ChangeLog | 8 +
FUNCTIONS | 178
++++++++++++++++++++++++++----------------
z-kernels/ieee80211/HISTORY | 4
z-kernels/ieee80211/PRE_BUILD | 42 +++++----
z-kernels/ipw2200/HISTORY | 4
z-kernels/ipw2200/PRE_BUILD | 48 ++++++-----
6 files changed, 177 insertions(+), 107 deletions(-)

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

ipw2200: get_sorcery_kernel_config -> get_kernel_config, bug #10940

commit 367a77be9b5020b840e77fbbd73ede0a18ba57bb
Author: Juuso Alasuutari <iuso AT sourcemage.org>
Commit: Juuso Alasuutari <iuso AT sourcemage.org>

ieee80211: get_sorcery_kernel_config -> get_kernel_config, bug #10940

commit 0ff9997ca8de9aec4ed3c8eb94bfcf7671f2facc
Author: Juuso Alasuutari <iuso AT sourcemage.org>
Commit: Juuso Alasuutari <iuso AT sourcemage.org>

FUNCTIONS: New get_*_kernel_* function family

diff --git a/ChangeLog b/ChangeLog
index 8e2ef68..24fd038 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-12-17 Juuso Alasuutari <iuso AT sourcemage.org>
+ * FUNCTIONS: Replaced old get_kernel_version,
+ get_sorcery_kernel_config, and get_running_kernel_config with
+ new functions get_kernel_version, get_sorcery_kernel_version,
+ get_running_kernel_version, get_kernel_config,
+ get_sorcery_kernel_config, and get_running_kernel_config (bug
+ #10940).
+
2006-12-05 Flavien Bridault <vlaaad AT sourcemage.org>
* z-x11/nvidia-settingsv: deprecated because it has been included for
a while in the nvidia_driver spell
diff --git a/FUNCTIONS b/FUNCTIONS
index 7fcec4a..07ad3f4 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -263,26 +263,6 @@ function mozilla_remove_nspr_nss() {
done
}

-#-------------------------------------------------------------------------
-## Returns the kernel version checks linux then linux-new (for now) and
-## then uname for the kernel version
-#-------------------------------------------------------------------------
-function get_kernel_version()
-{
- local KVER=$(installed_version linux)
- if [[ $KVER ]] ; then
- echo $KVER
- else
- KVER=$(installed_version linux-new)
- if [[ $KVER ]] ; then
- echo $KVER
- else
- KVER=$(uname -r)
- echo $KVER
- fi
- fi
-}
-
#---------------------------------------------------------------------------
## Invokes the unamechange spell any spell that uses this should depend on
## unamechange otherwise this function does nothing.
@@ -322,53 +302,6 @@ function devoke_uname_change()
fi
}

-#-----------------------------------------------------------------------
-## Get the running kernel config status of a some part of the kernel
-## given by $1. Used for spells that don't have linux triggers
-##
-## $1 string Config variable to look for
-#-----------------------------------------------------------------------
-function get_running_kernel_config()
-{
- local KVER
- # use proc interface because even inside a uname change invoke this
- # still returns the version of the running kernel
- if [ -f /proc/sys/kernel/osrelease ] ; then
- KVER=$(cat /proc/sys/kernel/osrelease)
- else
- # apparently you don't have proc mount
- KVER=$(uname -r)
- fi
- if [ -f /proc/config.gz ] ; then
- echo $(zgrep "^$1=" /proc/config.gz | awk -F= '{ print $2 }')
- elif [ -f /boot/config-$KVER ] ; then
- echo $(grep "^$1=" /boot/config-$KVER | awk -F= '{ print $2
}')
- elif [ -f /usr/src/linux-$KVER/.config ] ; then
- echo $(grep "^$1=" /usr/src/linux-$KVER/.config | awk -F= '{
print $2 }')
- else
- echo "-1"
- fi
-}
-
-#-------------------------------------------------------------------------
-## Get the config status of some part of the kernel sorcery says is
-## installed. Used by spells that have linux triggers.
-##
-## $1 string Config var to look for
-#-------------------------------------------------------------------------
-function get_sorcery_kernel_config()
-{
- local KVER=$(get_kernel_version)
- if [ -f /boot/config-$KVER ] ; then
- echo $(grep "^$1=" /boot/config-$KVER | awk -F= '{ print $2
}')
- elif [ -f /usr/src/linux-$KVER/.config ] ; then
- echo $(grep "^$1=" /usr/src/linux-$KVER/.config | awk -F= '{
print $2 }')
- else
- echo "-1"
- fi
-}
-
-
#-------------------------------------------------------------------------
## Compatibility code for gracefully failing if the user uses an older
## version of sorcery with a spell that calls unpack_file.
@@ -483,3 +416,114 @@ function default_games_build() {
default_build
}

+#-------------------------------------------------------------------------
+## Print the version of the running kernel.
+#-------------------------------------------------------------------------
+function get_running_kernel_version()
+{
+ # Try the proc interface first because it returns the version of the
+ # running kernel even when unamechange is invoked.
+ [[ -f /proc/sys/kernel/osrelease ]] && cat /proc/sys/kernel/osrelease ||
+ uname -r
+}
+
+#-------------------------------------------------------------------------
+## Print the version of the installed linux spell or, lacking that, "-1".
+## This is just a wrapper for 'installed_version linux' with the exception
+## that this will always print something and not return false.
+#-------------------------------------------------------------------------
+function get_sorcery_kernel_version()
+{
+ installed_version linux || echo "-1"
+}
+
+#-------------------------------------------------------------------------
+## Print the version of the kernel defined in USE_KERNEL_VERSION or,
+## lacking that, the version of either the installed linux spell or the
+## running kernel.
+#-------------------------------------------------------------------------
+function get_kernel_version()
+{
+ if [[ $USE_KERNEL_VERSION ]]
+ then
+ echo "$USE_KERNEL_VERSION"
+ else
+ installed_version linux || get_running_kernel_version
+ fi
+}
+
+#-----------------------------------------------------------------------
+## Print the kernel config status of the running kernel for the option
+## defined in $1.
+## If a configure file is found print the requested config status (if
+## any) and return 0, otherwise return 1.
+#-----------------------------------------------------------------------
+function get_running_kernel_config()
+{
+ if [[ -f /proc/config.gz ]]
+ then
+ zgrep "^$1=" /proc/config.gz | cut -d= -f2
+ else
+ local KVER="$(get_running_kernel_version)"
+ if [[ -f "/boot/config-$KVER" ]]
+ then
+ grep "^$1=" "/boot/config-$KVER" | cut -d= -f2
+ elif [[ -f "/usr/src/linux-$KVER/.config" ]]
+ then
+ grep "^$1=" "/usr/src/linux-$KVER/.config" | cut -d= -f2
+ else
+ return 1
+ fi
+ fi
+}
+
+#-----------------------------------------------------------------------
+## Print the kernel config status of the installed linux spell for the
+## option defined in $1.
+## If the linux spell is installed and a configure file is found print
+## the requested config status (if any) and return 0, otherwise return
+## 1.
+#-----------------------------------------------------------------------
+function get_sorcery_kernel_config()
+{
+ local KVER="$(installed_version linux)"
+ if [[ $KVER ]]
+ then
+ if [[ -f "/boot/config-$KVER" ]]
+ then
+ grep "^$1=" "/boot/config-$KVER" | cut -d= -f2
+ elif [[ -f "/usr/src/linux-$KVER/.config" ]]
+ then
+ grep "^$1=" "/usr/src/linux-$KVER/.config" | cut -d= -f2
+ else
+ return 1
+ fi
+ else
+ return 1
+ fi
+}
+
+#-----------------------------------------------------------------------
+## Print the kernel config status for the option defined in $1 from the
+## kernel defined in USE_KERNEL_VERSION or, lacking that, from either
+## the installed linux spell or the running kernel.
+## If a configure file is found print the requested config status (if
+## any) and return 0, otherwise return 1.
+#-----------------------------------------------------------------------
+function get_kernel_config()
+{
+ if [[ $USE_KERNEL_VERSION ]]
+ then
+ if [[ -f "/boot/config-$USE_KERNEL_VERSION" ]]
+ then
+ grep "^$1=" "/boot/config-$USE_KERNEL_VERSION" | cut -d= -f2
+ elif [[ -f "/usr/src/linux-$USE_KERNEL_VERSION/.config" ]]
+ then
+ grep "^$1=" "/usr/src/linux-$USE_KERNEL_VERSION/.config" | cut -d= -f2
+ else
+ return 1
+ fi
+ else
+ get_sorcery_kernel_config "$1" || get_running_kernel_config "$1"
+ fi
+}
diff --git a/z-kernels/ieee80211/HISTORY b/z-kernels/ieee80211/HISTORY
index 5d559e3..29f3830 100644
--- a/z-kernels/ieee80211/HISTORY
+++ b/z-kernels/ieee80211/HISTORY
@@ -1,3 +1,7 @@
+2006-12-17 Juuso Alasuutari <iuso AT sourcemage.org>
+ * PRE_BUILD: Changed all get_sorcery_kernel_config to
+ get_kernel_config (bug #10940).
+
2006-10-27 Juuso Alasuutari <iuso AT sourcemage.org>
* DETAILS: Updated to 1.2.15.

diff --git a/z-kernels/ieee80211/PRE_BUILD b/z-kernels/ieee80211/PRE_BUILD
index 784b799..290c410 100755
--- a/z-kernels/ieee80211/PRE_BUILD
+++ b/z-kernels/ieee80211/PRE_BUILD
@@ -1,30 +1,34 @@
-if [[ $(get_sorcery_kernel_config CONFIG_IEEE80211) == "y" ||
- $(get_sorcery_kernel_config CONFIG_IEEE80211) == "m" ]]; then
- message "${MESSAGE_COLOR}Kernel $(get_kernel_version) already has \
-the subsystem built in, cannot build external ieee80211 \
-stack.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_IEEE80211) == "y" ||
+ $(get_kernel_config CONFIG_IEEE80211) == "m" ]]
+ then
+ message "${MESSAGE_COLOR}Kernel $(get_kernel_version) already has" \
+ "the subsystem built in, cannot build external ieee80211" \
+ "stack.${DEFAULT_COLOR}" &&
return 1
fi &&

-if [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_ARC4) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_ARC4) != "m" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRC32) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRC32) != "m" ]] ; then
- message "${PROBLEM_COLOR}You don't have the right crypto support built in \
-the kernel, CONFIG_CRYPTO_ARC4 and CONFIG_CRC32. These are needed for WEP
key \
-support.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_CRYPTO_ARC4) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_ARC4) != "m" &&
+ $(get_kernel_config CONFIG_CRC32) != "y" &&
+ $(get_kernel_config CONFIG_CRC32) != "m" ]]
+ then
+ message "${PROBLEM_COLOR}You don't have the right crypto support" \
+ "built in the kernel, CONFIG_CRYPTO_ARC4 and CONFIG_CRC32." \
+ "These are needed for WEP key support.${DEFAULT_COLOR}" &&
if ! query "Continue anyway?"; then
return 1
fi
fi &&

-if [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "m" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_AES_586) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_AES_586) != "m" ]] ; then
- message "${PROBLEM_COLOR}You don't have the right crypto support built in \
-the kernel, CONFIG_CRYPTO_AES_586 and CONFIG_MICHAEL_MIC. These are needed \
-for WPA support.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "m" &&
+ $(get_kernel_config CONFIG_CRYPTO_AES_586) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_AES_586) != "m" ]]
+ then
+ message "${PROBLEM_COLOR}You don't have the right crypto support" \
+ "built in the kernel, CONFIG_CRYPTO_AES_586 and" \
+ "CONFIG_MICHAEL_MIC. These are needed for WPA" \
+ "support.${DEFAULT_COLOR}" &&
if ! query "Continue anyway?"; then
return 1
fi
diff --git a/z-kernels/ipw2200/HISTORY b/z-kernels/ipw2200/HISTORY
index fd36020..54935ce 100644
--- a/z-kernels/ipw2200/HISTORY
+++ b/z-kernels/ipw2200/HISTORY
@@ -1,3 +1,7 @@
+2006-12-17 Juuso Alasuutari <iuso AT sourcemage.org>
+ * PRE_BUILD: Changed all get_sorcery_kernel_config to
+ get_kernel_config (bug #10940).
+
2006-10-27 Juuso Alasuutari <iuso AT sourcemage.org>
* DETAILS: Updated to 1.2.0.

diff --git a/z-kernels/ipw2200/PRE_BUILD b/z-kernels/ipw2200/PRE_BUILD
index f34bd2d..9d77997 100755
--- a/z-kernels/ipw2200/PRE_BUILD
+++ b/z-kernels/ipw2200/PRE_BUILD
@@ -1,36 +1,42 @@
-if [[ $(get_sorcery_kernel_config CONFIG_NET_RADIO) != "y" ]]; then
- message "${PROBLEM_COLOR}You don't have CONFIG_NET_RADIO enabled in \
-your kernel configuration, cannot build ipw2200.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_NET_RADIO) != "y" ]]
+then
+ message "${PROBLEM_COLOR}You don't have CONFIG_NET_RADIO" \
+ "enabled in your kernel configuration, cannot build" \
+ "ipw2200.${DEFAULT_COLOR}" &&
return 1
fi &&

-if [[ $(get_sorcery_kernel_config CONFIG_FW_LOADER) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_FW_LOADER) != "m" ]]; then
- message "${PROBLEM_COLOR}You don't have CONFIG_FW_LOADER enabled in \
-your kernel configuration, cannot build ipw2200.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_FW_LOADER) != "y" &&
+ $(get_kernel_config CONFIG_FW_LOADER) != "m" ]]
+then
+ message "${PROBLEM_COLOR}You don't have CONFIG_FW_LOADER" \
+ "enabled in your kernel configuration, cannot build" \
+ "ipw2200.${DEFAULT_COLOR}" &&
return 1
fi &&

-if [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_ARC4) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_ARC4) != "m" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRC32) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRC32) != "m" ]] ; then
- message "${PROBLEM_COLOR}You don't have the right crypto support built in \
-the kernel, CONFIG_CRYPTO_ARC4 and CONFIG_CRC32. These are needed for WEP
key \
-support.${DEFAULT_COLOR}" &&
+if [[ $(get_kernel_config CONFIG_CRYPTO_ARC4) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_ARC4) != "m" &&
+ $(get_kernel_config CONFIG_CRC32) != "y" &&
+ $(get_kernel_config CONFIG_CRC32) != "m" ]]
+then
+ message "${PROBLEM_COLOR}You don't have the right crypto support" \
+ "built in the kernel, CONFIG_CRYPTO_ARC4 and CONFIG_CRC32." \
+ "These are needed for WEP key support.${DEFAULT_COLOR}" &&
if ! query "Continue anyway?"; then
return 1
fi
fi &&

-if [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "m" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_AES_586) != "y" ]] &&
- [[ $(get_sorcery_kernel_config CONFIG_CRYPTO_AES_586) != "m" ]] ;
+if [[ $(get_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_MICHAEL_MIC) != "m" &&
+ $(get_kernel_config CONFIG_CRYPTO_AES_586) != "y" &&
+ $(get_kernel_config CONFIG_CRYPTO_AES_586) != "m" ]]
then
- message "${PROBLEM_COLOR}You don't have the right crypto support built in \
-the kernel, CONFIG_CRYPTO_AES_586 and CONFIG_MICHAEL_MIC. These are needed \
-for WPA support.${DEFAULT_COLOR}" &&
+ message "${PROBLEM_COLOR}You don't have the right crypto support" \
+ "built in the kernel, CONFIG_CRYPTO_AES_586 and" \
+ "CONFIG_MICHAEL_MIC. These are needed for WPA" \
+ "support.${DEFAULT_COLOR}" &&
if ! query "Continue anyway?"; then
return 1
fi



  • [SM-Commit] GIT changes to master z-rejected grimoire by Juuso Alasuutari (ac2c9b386ac14ae71770c8881bf90592fcf307a5), Juuso Alasuutari, 12/17/2006

Archive powered by MHonArc 2.6.24.

Top of Page