Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (74b825f76b4857af454b027837754d515705994c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Fredrik Carlström <fredrik.carlstrom AT tele2.se>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (74b825f76b4857af454b027837754d515705994c)
  • Date: Fri, 05 Dec 2008 07:11:42 +0100

The latest recommendation I can find from a linux maintainer is here:
<https://kerneltrap.org/mailarchive/linux-kernel/2008/5/30/1983844/thread>

If there is anyone who is interested, I've attached a patch so that glibc can
use any kernel version since 2.6.18 (i.e when "make install_headers" was
introduced into the kernel code) and has options for installed/running
kernel, latest kernel and old version (doesn't work the first time since
HEADERS_VERSION currently isn't persistent). It has the installed/running
kernel version as default. The present option for the 2.6.25 kernel headers
is replaced by the option to use sanitized headers from the 2.6.25 kernel.

Regards Fredrik

diff -Naur glibc.orig/BUILD glibc/BUILD
--- glibc.orig/BUILD 2008-11-27 00:19:11.000000000 +0100
+++ glibc/BUILD 2008-12-05 02:01:47.096062402 +0100
@@ -67,7 +67,7 @@
# Setup sanitised glibc-kernel-headers for the glibc compile
# ...as well as other arch-dependend specialties
#
-if [[ ${GLIBC_NPTL} == y ]] && [[ ${GLIBC_SANITIZE_HEADERS} == y ]]; then
+if [[ ${GLIBC_NPTL} == y ]]; then
cd ${GLIBC_HEADERS_DIR} &&
GL_ARCH=${SMGL_COMPAT_ARCHS[1]} &&
if [[ ${SMGL_COMPAT_ARCHS[0]} == 64 ]];then
diff -Naur glibc.orig/DETAILS glibc/DETAILS
--- glibc.orig/DETAILS 2008-11-27 00:19:11.000000000 +0100
+++ glibc/DETAILS 2008-12-05 06:53:13.802380716 +0100
@@ -20,20 +20,17 @@

SOURCE5_HASH=sha512:c1931495915c8461de97e4156c9d0edd7b44e4b48cbce2d4c3a52b83d331a9ce48f3c7abb7dd787ed897f1e7d0e81c5cdb4eb3986bc24a5e2788708427e2dcb1
PATCHLEVEL=1
else
+ VERSION=2.9
if [[ "$GLIBC_CVS" == "y" ]]; then
-local GLIBC_VERSION
- GLIBC_VERSION=2.9
+ SOURCE=$SPELL-cvs-$VERSION.tar.bz2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-cvs-$VERSION
+ FORCE_DOWNLOAD=on
+
SOURCE_URL=cvs://:pserver:anoncvs:anoncvs AT sources.redhat.com:/cvs/glibc:libc:$SPELL-${VERSION/./_}-branch
+ SOURCE_IGNORE=volatile
if [[ "${GLIBC_CVS_AUTOUPDATE}" == "y" ]]; then
- VERSION=${GLIBC_VERSION}-$(date +%Y%m%d) && FORCE_DOWNLOAD=on
- else
- VERSION=${GLIBC_VERSION}
+ VERSION=${VERSION}-$(date +%Y%m%d)
fi
- SOURCE=$SPELL-${GLIBC_VERSION}.tar.bz2
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-${GLIBC_VERSION}
-
SOURCE_URL=cvs://:pserver:anoncvs:anoncvs AT sources.redhat.com:/cvs/glibc:libc:$SPELL-${GLIBC_VERSION/./_}-branch
- SOURCE_IGNORE=volatile
else
- VERSION=2.9
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE2=$SOURCE.asc
@@ -43,67 +40,20 @@
SOURCE2_IGNORE=signature
PATCHLEVEL=2
fi
- if [[ $GLIBC_SANITIZE_HEADERS == n ]]; then
- HEADERS_VERSION=2.6.25
-case "${SMGL_COMPAT_ARCHS[1]}" in
- ia32)
- SOURCE3=linux-headers-${HEADERS_VERSION}-x86.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- ;;
- x86_64)
- SOURCE3=linux-headers-${HEADERS_VERSION}-x86_64.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- ;;
- ppc)
- SOURCE3=linux-headers-${HEADERS_VERSION}-powerpc.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- ;;
- alpha)
- SOURCE3=linux-headers-${HEADERS_VERSION}-alpha.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- ;;
- sparc)
- if [[ ${SMGL_COMPAT_ARCHS[0]} == 64 ]]
- then
- SOURCE3=linux-headers-${HEADERS_VERSION}-sparc64.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- else
- SOURCE3=linux-headers-${HEADERS_VERSION}-sparc.tar.bz2
- SOURCE6=${SOURCE3}.sig
- SOURCE3_GPG="gurus.gpg:${SOURCE6}"
- fi
- ;;
- *)
- SOURCE3=UNKNOWN
- message "${PROBLEM_COLOR}You have an unknown architecture, you
should file a bug for this${DEFAULT_COLOR}"
- return 222
- ;;
-esac
-
SOURCE3_URL[0]=http://download.sourcemage.org/distro/kernel/headers/$SOURCE3
- SOURCE6_URL[0]=${SOURCE3_URL[0]}.sig
+ SOURCE3=linux-${HEADERS_VERSION%.*}.tar.bz2
+ if [[ $SOURCE3 == linux-2.6.tar.bz2 ]]; then
+ SOURCE3=linux-${HEADERS_VERSION}.tar.bz2
else
- local LINUX_DIRECTORY
- LINUX_DIRECTORY=$(gaze where -path linux | sed "s/linux -> //")
- . $LINUX_DIRECTORY/latest.defaults
- HEADERS_VERSION=$(echo $LATEST_maintenance_patches | sed "s/patch-//")
- HEADERS_VERSION=${HEADERS_VERSION:-$LATEST_2_6}
- SOURCE3=linux-${LATEST_2_6}.tar.bz2
- SOURCE6="${SOURCE3}.sign"
- SOURCE3_GPG="kernel.gpg:${SOURCE6}:ESTABLISHED_UPSTREAM_KEY"
- SOURCE3_URL="${KERNEL_URL}/pub/linux/kernel/v2.6/${SOURC3}"
- SOURCE6_URL="${SOURCE3_URL}.sign"
- if [[ $HEADERS_VERSION != $LATEST_2_6 ]]; then
SOURCE7=patch-${HEADERS_VERSION}.bz2
SOURCE8="${SOURCE7}.sign"
SOURCE7_GPG="kernel.gpg:${SOURCE8}:ESTABLISHED_UPSTREAM_KEY"
SOURCE7_URL="${KERNEL_URL}/pub/linux/kernel/v2.6/${SOURCE7}"
SOURCE8_URL="${SOURCE7_URL}.sign"
- fi
+ fi
+ SOURCE6="${SOURCE3}.sign"
+ SOURCE3_GPG="kernel.gpg:${SOURCE6}:ESTABLISHED_UPSTREAM_KEY"
+ SOURCE3_URL="${KERNEL_URL}/pub/linux/kernel/v2.6/${SOURCE3}"
+ SOURCE6_URL="${SOURCE3_URL}.sign"
fi
fi
WEB_SITE=http://www.gnu.org/software/libc
diff -Naur glibc.orig/PRE_BUILD glibc/PRE_BUILD
--- glibc.orig/PRE_BUILD 2008-11-27 00:19:11.000000000 +0100
+++ glibc/PRE_BUILD 2008-12-05 01:59:35.734158359 +0100
@@ -15,24 +15,19 @@
GLIBC_HEADERS_DIR=$SOURCE_DIRECTORY/${SOURCE3/.tar.bz2} &&

unpack_file 3 &&
- if [[ $GLIBC_SANITIZE_HEADERS == n ]]; then
- cd $GLIBC_HEADERS_DIR/usr/include &&
- chmod -R +r * &&
- find . -type d -exec chmod +x '{}' ';'
- else
- cd $GLIBC_HEADERS_DIR &&
- if [ ! -z $SOURCE7 ]; then
- verify_file 7 || return 1 &&
- bzcat ${SOURCE_CACHE}/$SOURCE7 > ${SOURCE7%.bz2} &&
- message "${MESSAGE_COLOR}Patching ${!patch}${DEFAULT_COLOR}" &&
- patch -p1 < ${SOURCE7%.bz2} &&
- if [[ $? != 0 ]]; then
- message "${PROBLEM_COLOR}Patch ${!patch} failed${DEFAULT_COLOR}" &&
- return 1
- fi
- fi &&
- make mrproper
- fi
+ cd $GLIBC_HEADERS_DIR &&
+ if [ ! -z $SOURCE7 ]; then
+ verify_file 7 || return 1 &&
+ bzcat ${SOURCE_CACHE}/$SOURCE7 > ${SOURCE7%.bz2} &&
+ message "${MESSAGE_COLOR}Patching ${!patch}${DEFAULT_COLOR}" &&
+ patch -p1 < ${SOURCE7%.bz2} &&
+ if [[ $? != 0 ]]; then
+ message "${PROBLEM_COLOR}Patch ${!patch} failed${DEFAULT_COLOR}" &&
+ return 1
+ fi
+ fi &&
+ make mrproper
+
else
cd $SOURCE_DIRECTORY &&
#
diff -Naur glibc.orig/PREPARE glibc/PREPARE
--- glibc.orig/PREPARE 2008-11-27 00:19:11.000000000 +0100
+++ glibc/PREPARE 2008-12-05 06:04:04.064385896 +0100
@@ -1,3 +1,23 @@
+# Retrieves the version from the linux spell
+function latest_linux_version() {
+ ( codex_set_current_spell_quick $(codex_find_spell_by_name linux)
+ echo ${VERSION}
+ )
+}
+
+# A naive function to check that a string can be a kernel version later then
2.6.18
+function valid_linux_version() {
+ local minor=${1#2.6.}
+ [[ $minor == $1 ]] && return 1
+ local int=${minor%.*}
+ [[ ${int%[1-9][0-9]} ]] || [[ $int -lt 18 ]] && return 1
+ [[ $int == $minor ]] && return 0
+ int=${minor#*.}
+ [[ $int ]] || return 1
+ [[ ${int%[1-9]} ]] || return 0
+ ! [[ ${int%[1-9][0-9]} ]] || return 1
+}
+
if [[ $(uname -r) = 2.6.* ]]; then
if test "$HOST" == "i386-pc-linux-gnu"; then
message "[[ ${QUERY_COLOR}Not building with NPTL as that's unsupported
on i386; use i486 or higher.${DEFAULT} ]]" &&
@@ -5,17 +25,34 @@
else
config_query GLIBC_NPTL "As you are running a 2.6 kernel, would you
like to use the new nptl (Native Posix Thread Libary)?" y &&
if [[ "$GLIBC_NPTL" == "y" ]]; then
- config_query GLIBC_CVS "Do you want to install the latest unstable
release (requires cvs)?" n &&
+ config_query GLIBC_CVS "Do you want to download from cvs?" n &&
if [[ "$GLIBC_CVS" == "y" ]]; then
config_query GLIBC_CVS_AUTOUPDATE "Update cvs repo on every system
update?" n
fi
fi &&
config_query GLIBC_USEIDN "Would you like to compile glibc with libidn
support?" y &&
- config_query GLIBC_SANITIZE_HEADERS "Do you want to use sanitized linux
kernel headers from the latest stable release" n
+
+ local installed_kernel=$(installed_version linux)
+ installed_kernel=${installed_version:-$(uname -r)}
+ local latest_kernel=$(latest_linux_version)
+ local old_version
+ config_get_last_option HEADERS_VERSION old_version
+ old_version=${old_version:-2.6.25}
+ config_query_list HEADERS_VERSION "Select the kernel header version to
use:" \
+ ${installed_kernel:+"installed
kernel\t$installed_kernel"} \
+ ${latest_kernel:+"latest
kernel\t$latest_kernel"} \
+ ${old_version:+"old
version\t$old_version"} \
+ other &&
+ if [[ ${HEADERS_VERSION} == other ]]; then
+ while ! valid_linux_version ${HEADERS_VERSION}; do
+ read -p "Wich kernel do you want to use (must be at least 2.6.18)? "
HEADERS_VERSION
+ done
+ else
+ HEADERS_VERSION=${HEADERS_VERSION##*\t}
+ fi
fi
fi &&

if [[ ${SMGL_COMPAT_ARCHS[1]} == x86_64 ]]; then
config_query GLIBC_NOLIB64 "Shall the dynamic linker install to /lib (not
/lib64) (lib64 purge part 2 of 2)?" n
fi
-



Archive powered by MHonArc 2.6.24.

Top of Page