Habe IPFire auf LFS 6.2 gebracht.

Das hier ist der erste Teil.
Nur Toolchain bisher.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@297 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-09-30 16:33:03 +00:00
parent f522e3076b
commit dd714b8aad
52 changed files with 9252 additions and 466 deletions

View File

@@ -4,16 +4,12 @@ passwd: files
group: files
shadow: files
publickey: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: db files
protocols: files
services: files
ethers: files
rpc: files
# End /etc/nsswitch.conf

View File

@@ -26,7 +26,7 @@
include Config
VER = 2.05b
VER = 3.1
THISAPP = bash-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -37,12 +37,14 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --bindir=/bin --disable-nls
EXTRA_CONFIG = --prefix=/usr --bindir=/bin \
--without-bash-malloc --with-installed-readline \
--disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_CONFIG = --prefix=/tools --without-bash-malloc --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -50,13 +52,12 @@ endif
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE) $(THISAPP)-2.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(THISAPP)-2.patch = $(URL_LFS)/bash/$(THISAPP)-2.patch
$(DL_FILE)_MD5 = 5238251b4926d778dfe162f6ce729733
$(THISAPP)-2.patch_MD5 = dfc7399bb57798e18fbb99f9edce4da0
$(DL_FILE)_MD5 = ef5304c4b22aaa5088972c792ed45d72
install : $(TARGET)
@@ -86,9 +87,9 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-2.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-3.1-fixes-8.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
ln -sf bash /bin/sh
ifneq "$(ROOT)" ""

View File

@@ -26,7 +26,7 @@
include Config
VER = 2.15.90.0.3
VER = 2.16.1
THISAPP = binutils-$(VER)
DL_FILE = $(THISAPP).tar.bz2
@@ -48,7 +48,7 @@ ifeq "$(LFS_PASS)" "1"
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
EXTRA_CONFIG = --prefix=/tools --enable-shared --with-lib-path=/tools/lib --disable-nls
EXTRA_CONFIG = --prefix=/tools --with-lib-path=/tools/lib --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -62,7 +62,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 1c1af0064ebd3d7bd99905874656a21e
$(DL_FILE)_MD5 = 6a9d529efb285071dad10e1f3d2b2967
install : $(TARGET)
@@ -95,14 +95,24 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@mkdir $(DIR_SRC)/binutils-build
cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE)
cd $(DIR_SRC)/binutils-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
else
ifeq "$(LFS_PASS)" "1"
cd $(DIR_SRC)/binutils-build && make configure-host
cd $(DIR_SRC)/binutils-build && make $(MAKETUNING)
cd $(DIR_SRC)/binutils-build && make $(MAKETUNING) clean
cd $(DIR_SRC)/binutils-build && make $(MAKETUNING) $(EXTRA_MAKE)
else
cd $(DIR_SRC)/binutils-build && make $(MAKETUNING) $(EXTRA_MAKE)
endif
cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE)
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
cd $(DIR_SRC)/binutils-build && make -C ld clean
ifeq "$(LFS_PASS)" "1"
cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib
else
cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
endif
cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
endif
@rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build
@$(POSTBUILD)

View File

@@ -80,22 +80,22 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/bzip2-1.0.2-use_mktemp-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bzip2-1.0.2-chmod.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bzip2-1.0.3-bzgrep_security-1.patch
ifeq "$(ROOT)" ""
cd $(DIR_APP) && sed -i 's@tempfile -d /tmp -p bz@mktemp -p /tmp@' bzdiff
cd $(DIR_APP) && make -f Makefile-libbz2_so
cd $(DIR_APP) && make clean
cd $(DIR_APP) && make
rm -f /usr/bin/{bzgrep,bzegrep,bzfgrep,bzcmp,bzless}
cd $(DIR_APP) && make install
cd $(DIR_APP) && cp bzip2-shared /bin/bzip2
cd $(DIR_APP) && cp -a libbz2.so* /lib
ln -sf ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm /usr/bin/{bunzip2,bzcat,bzip2}
mv /usr/bin/{bzip2recover,bzless,bzmore} /bin
ln -sf bzip2 /bin/bunzip2
ln -sf bzip2 /bin/bzcat
cp -v bzip2-shared /bin/bzip2
cp -av libbz2.so* /lib
ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm -v /usr/bin/{bunzip2,bzcat,bzip2}
ln -sv bzip2 /bin/bunzip2
ln -sv bzip2 /bin/bzcat
else
cd $(DIR_APP) && make
rm -f /tools/bin/{bzgrep,bzegrep,bzfgrep,bzcmp,bzless}
cd $(DIR_APP) && make PREFIX=/tools install
endif

View File

@@ -26,7 +26,7 @@
include Config
VER = 2.3
VER = 2.4
THISAPP = ccache-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 5e4afc0b170bf282d1813aeaf3d577d2
$(DL_FILE)_MD5 = 73c1ed1e767c1752dd0f548ec1e66ce7
install : $(TARGET)

56
lfs/cleanup-toolchain Normal file
View File

@@ -0,0 +1,56 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
THISAPP = cleanup-toolchain
TARGET = $(DIR_INFO)/$(THISAPP)-tools
###############################################################################
# Top-level Rules
###############################################################################
objects =
install : $(TARGET)
check :
download :
md5 :
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
-strip --strip-debug /tools/lib/*
-strip --strip-unneeded /tools/{,s}bin/*
rm -rfv /tools/{info,man}
chown -R root:root /tools
@$(POSTBUILD)

View File

@@ -26,7 +26,7 @@
include Config
VER = 5.93
VER = 5.96
THISAPP = coreutils-$(VER)
DL_FILE = $(THISAPP).tar.bz2
@@ -50,13 +50,12 @@ endif
###############################################################################
# Top-level Rules
###############################################################################
objects =$(DL_FILE) $(THISAPP)-uname-1.patch
objects =$(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(THISAPP)-uname-1.patch = $(URL_LFS)/coreutils/$(THISAPP)-uname-1.patch
$(DL_FILE)_MD5 = 955d8abfd3dd8af2ca3af51480f1f9af
$(THISAPP)-uname-1.patch_MD5 = c05b735710fbd62239588c07084852a0
$(DL_FILE)_MD5 = bf55d069d82128fd754a090ce8b5acff
install : $(TARGET)
@@ -86,23 +85,23 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-uname-1.patch
ifneq "$(ROOT)" ""
#previous patch of uname implies rebuild of doc/uname.1 which fails; remove doc&man build from toolchain
cd $(DIR_APP) && sed -i "s/SUBDIRS = lib src doc man po tests/SUBDIRS = lib src po tests/g" Makefile.in
endif
cd $(DIR_APP) && DEFAULT_POSIX2_VERSION=199209 ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make -j 3 $(EXTRA_MAKE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-uname-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-suppress_uptime_kill_su-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-i18n-1.patch
cd $(DIR_APP) && chmod +x tests/sort/sort-mb-tests
cd $(DIR_APP) && sed -i 's/_LEN 6/_LEN 20/' src/who.c
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
#use hostname from inet-tools
ifeq "$(ROOT)" ""
rm /usr/bin/hostname
mv -f /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
mv -f /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin
mv -f /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin
mv -f /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin
mv -f /usr/bin/{touch,true,uname,vdir} /bin
mv -f /usr/bin/chroot /usr/sbin
mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/bin/{head,sleep,nice} /bin
ln -sf test /bin/[
ln -sf ../../bin/install /usr/bin
mv -f /bin/uname /bin/uname.bak

View File

@@ -86,7 +86,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -26,24 +26,23 @@
include Config
VER = 5.41.0
VER = 5.43.0
THISAPP = expect-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/expect-5.41
DIR_APP = $(DIR_SRC)/expect-5.43
TARGET = $(DIR_INFO)/$(THISAPP)-tools
###############################################################################
# Top-level Rules
###############################################################################
objects=$(DL_FILE) $(THISAPP)-spawn-1.patch
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(THISAPP)-spawn-1.patch = $(URL_LFS)/expect/$(THISAPP)-spawn-1.patch
objects=$(DL_FILE)
$(DL_FILE)_MD5 = 490664773286690d111d9cd055c50700
$(THISAPP)-spawn-1.patch_MD5 = ef6d0d0221c571fb420afb7033b3bbba
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 43e1dc0e0bc9492cf2e1a6f59f276bc3
install : $(TARGET)
@@ -73,10 +72,9 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/tcl* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_SRC) && tar zxf $(DIR_DL)/tcl8.4.6*.tar.gz
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-spawn-1.patch
cd $(DIR_APP) && ./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-spawn-1.patch
cd $(DIR_APP) && ./configure --prefix=/tools --with-tcl=/tools/lib --with-tclinclude=/tools/include --with-x=no --disable-nls
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make SCRIPTS="" install
@rm -rf $(DIR_APP) $(DIR_SRC)/tcl*
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: findutils,v 1.3.2.3 2005/02/26 12:26:43 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,18 +26,19 @@
include Config
VER = 4.1.20
VER = 4.2.27
THISAPP = findutils-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/findutils
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --libexecdir=/usr/bin --disable-nls
EXTRA_CONFIG = --prefix=/usr --libexecdir=/usr/lib/findutils \
--localstatedir=/var/lib/locate --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
@@ -61,7 +56,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = e90ce7222daadeb8616b8db461e17cbc
$(DL_FILE)_MD5 = f1e0ddf09f28f8102ff3b90f3b5bc920
install : $(TARGET)
@@ -92,7 +87,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
mv -v /usr/bin/find /bin
sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: gawk,v 1.3.2.5 2005/02/05 15:38:14 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,18 +26,18 @@
include Config
VER = 3.1.3
VER = 3.1.5
THISAPP = gawk-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/gawk
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --libexecdir=/usr/bin --disable-nls
EXTRA_CONFIG = --prefix=/usr --libexecdir=/usr/lib --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
@@ -57,13 +51,11 @@ endif
# Top-level Rules
###############################################################################
objects = $(DL_FILE) $(THISAPP)-libexecdir-1.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(THISAPP)-libexecdir-1.patch = $(URL_LFS)/gawk/$(THISAPP)-libexecdir-1.patch
$(DL_FILE)_MD5 = b637b454005f9e72a9a8eecfacd07ca0
$(THISAPP)-libexecdir-1.patch_MD5 = af3f30cc056f7959cbbfd0341e7b0146
$(DL_FILE)_MD5 = 5703f72d0eea1d463f735aad8222655f
install : $(TARGET)
@@ -92,13 +84,12 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-libexecdir-1.patch
endif
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-segfault_fix-1.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_MAKE) check
cd $(DIR_APP) && echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
cd $(DIR_APP) && echo "#define HAVE_LC_MESSAGES 1" >> config.h
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

102
lfs/gcc
View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: gcc,v 1.18.2.9 2006/01/22 21:58:23 franck78 Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 3.3.3
VER = 4.0.3
THISAPP = gcc-$(VER)
DL_FILE = gcc-core-$(VER).tar.bz2
DL_FROM = $(URL_GNU)/gcc/releases/gcc-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
CFLAGS =
CXXFLAGS =
@@ -54,16 +48,18 @@ ifeq "$(ROOT)" ""
else
ifeq "$(LFS_PASS)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
EXTRA_CONFIG = --prefix=/tools --with-local-prefix=/tools \
--disable-nls --enable-shared --enable-languages=c
EXTRA_CONFIG = --prefix=/tools \
--with-local-prefix=/tools --disable-nls --enable-shared \
--enable-languages=c
EXTRA_MAKE = BOOT_LDFLAGS="-static" bootstrap
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
EXTRA_CONFIG = --prefix=/tools --with-local-prefix=/tools \
--enable-clocale=gnu --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-nls
EXTRA_CONFIG = --prefix=/tools \
--with-local-prefix=/tools --enable-clocale=gnu \
--enable-shared --enable-threads=posix \
--enable-__cxa_atexit --enable-languages=c,c++ \
--disable-libstdcxx-pch
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -72,23 +68,11 @@ endif
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE) \
gcc-g++-$(VER).tar.bz2 \
$(THISAPP)-specs-1.patch \
$(THISAPP)-no_fixincludes-1.patch \
gcc-3.3-ssp-4.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
gcc-g++-$(VER).tar.bz2 = $(URL_GNU)/gcc/releases/gcc-$(VER)/gcc-g++-$(VER).tar.bz2
$(THISAPP)-specs-1.patch = $(URL_LFS)/gcc/$(THISAPP)-specs-1.patch
$(THISAPP)-no_fixincludes-1.patch = $(URL_LFS)/gcc/$(THISAPP)-no_fixincludes-1.patch
gcc-3.3-ssp-4.patch = $(URL_LFS)/gcc/gcc-3.3-ssp-4.patch
$(DL_FILE)_MD5 = f878a455b14b3830aaf2da0a17f003c0
gcc-g++-$(VER).tar.bz2_MD5 = 29830b52f2c112fc660d662427660641
$(THISAPP)-specs-1.patch_MD5 = 74cb9822f21774ae1c9a8ef1fa133f49
$(THISAPP)-no_fixincludes-1.patch_MD5 = 5f764c74b3e9c36252fe4f9a14598ee4
gcc-3.3-ssp-4.patch_MD5 = d31cccd0afbaaeeb95264164360ea135
$(DL_FILE)_MD5 = 6ff1af12c53cbb3f79b27f2d6a9a3d50
install : $(TARGET)
@@ -118,57 +102,25 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_SRC) && tar jxf $(DIR_DL)/gcc-g++-$(VER).tar.bz2
# fix a macro in gcc3.3.3 hurting gcc4.x !
cd $(DIR_APP) && sed -i "s/\*((void \*\*)__o.*;/*((void **)__o->next_free) = ((void *)datum); __o->next_free += sizeof(void *);/" include/obstack.h
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/gcc-3.3-ssp-4.patch
cd $(DIR_APP) && sed -i -e 's|^\(LIBGCC2_CFLAGS.*\)$$|\1 -D_LIBC_PROVIDES_SSP_|' gcc/Makefile.in
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-no_fixincludes-1.patch
else
ifeq "$(LFS_PASS)" "2"
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-no_fixincludes-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/$(THISAPP)-specs-1.patch
endif
endif
@mkdir $(DIR_SRC)/gcc-build
ifeq "$(ROOT)" ""
else
ifeq "$(LFS_PASS)" "1"
cd $(DIR_SRC)/gcc-build && /bin/bash $(DIR_APP)/configure $(EXTRA_CONFIG)
cd $(DIR_SRC)/gcc-build && make -j 3 $(EXTRA_MAKE)
cd $(DIR_SRC)/gcc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
GCC_SPECS_DIR="`/usr/bin/gcc --print-libgcc-file-name`"; \
GCC_SPECS="`dirname $$GCC_SPECS_DIR`/specs"; \
if [ "$(MACHINE)" = "i386" ]; then \
SSP_PROT_ALL_STRING="%(cc1_cpu) %{!fno-stack-protector: %{!fno-stack-protector-all: %{!D__KERNEL__: -fstack-protector %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: -fstack-protector-all} } } } } } } %{profile:-p}"; \
elif [ "$(MACHINE)" = "alpha" ]; then \
SSP_PROT_ALL_STRING="%{G*} %{!fno-stack-protector: %{!fno-stack-protector-all: %{!D__KERNEL__: -fstack-protector %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: -fstack-protector-all} } } } } } }"; \
fi; \
mv -f $${GCC_SPECS} $${GCC_SPECS}.noprot; \
sed "/cc1:/{n;d}" $${GCC_SPECS}.noprot > $${GCC_SPECS}.tmp; \
sed "s/cc1:/cc1:\n$${SSP_PROT_ALL_STRING}/" $${GCC_SPECS}.tmp > $${GCC_SPECS}.prot; \
rm -f $${GCC_SPECS}.tmp; \
cp -f $${GCC_SPECS}.prot $${GCC_SPECS}
ln -vs gcc /tools/bin/cc
else
ifeq "$(LFS_PASS)" "2"
GCC_SPECS_DIR="`/tools/bin/gcc --print-libgcc-file-name`"; \
GCC_SPECS="`dirname $$GCC_SPECS_DIR`/specs"; \
if [ "$(MACHINE)" = "i386" ]; then \
SSP_PROT_ALL_STRING="%(cc1_cpu) %{!fno-stack-protector: %{!fno-stack-protector-all: %{!D__KERNEL__: -fstack-protector %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: -fstack-protector-all} } } } } } } %{profile:-p}"; \
elif [ "$(MACHINE)" = "alpha" ]; then \
SSP_PROT_ALL_STRING="%{G*} %{!fno-stack-protector: %{!fno-stack-protector-all: %{!D__KERNEL__: -fstack-protector %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: -fstack-protector-all} } } } } } }"; \
fi; \
mv -f $${GCC_SPECS} $${GCC_SPECS}.noprot; \
sed "/cc1:/{n;d}" $${GCC_SPECS}.noprot > $${GCC_SPECS}.tmp; \
sed "s/cc1:/cc1:\n$${SSP_PROT_ALL_STRING}/" $${GCC_SPECS}.tmp > $${GCC_SPECS}.prot; \
rm -f $${GCC_SPECS}.tmp; \
cp -f $${GCC_SPECS}.prot $${GCC_SPECS}
cd $(DIR_APP) && cp -v gcc/Makefile.in{,.orig}
cd $(DIR_APP) && sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
cd $(DIR_APP) && cp -v gcc/Makefile.in{,.tmp}
#cd $(DIR_APP) && sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp > gcc/Makefile.in
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/gcc-4.0.3-specs-1.patch
cd $(DIR_SRC)/gcc-build && /bin/bash $(DIR_APP)/configure $(EXTRA_CONFIG)
cd $(DIR_SRC)/gcc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
endif
endif
ifeq "$(ROOT)" ""
ln -sf ../usr/bin/cpp /lib
ln -sf gcc /usr/bin/cc
else
ln -sf gcc /tools/bin/cc
endif
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: gettext,v 1.3.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 0.14.1
VER = 0.14.5
THISAPP = gettext-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/gettext
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -48,7 +42,7 @@ ifeq "$(ROOT)" ""
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_CONFIG = --prefix=/tools --disable-shared --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -61,7 +55,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 78f4b862510beb2e5d43223dd610e77d
$(DL_FILE)_MD5 = e2f6581626a22a0de66dce1d81d00de3
install : $(TARGET)
@@ -91,8 +85,15 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
else
cd $(DIR_APP)/gettext-tools && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP)/gettext-tools && make -C lib $(MAKETUNING)
cd $(DIR_APP)/gettext-tools && make -C src msgfmt $(MAKETUNING)
cd $(DIR_APP)/gettext-tools && cp -v src/msgfmt /tools/bin
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -26,9 +26,9 @@
include Config
VER = 2.3.3
VER = 2.3.6
THISAPP = glibc-$(VER)-lfs-5.1
THISAPP = glibc-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
@@ -40,18 +40,17 @@ CXXFLAGS =
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr \
--disable-profile --enable-add-ons=linuxthreads \
--libexecdir=/usr/lib --with-headers=/usr/include \
--without-cvs --disable-nls
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools \
--disable-profile --enable-add-ons=linuxthreads \
--with-headers=/tools/include \
--with-binutils=/tools/bin --without-gd \
--without-cvs --disable-nls
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
--without-gd --with-headers=/tools/include \
--without-selinux
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -60,11 +59,14 @@ endif
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
objects = $(DL_FILE) \
glibc-libidn-$(VER).tar.bz2
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2
$(DL_FILE)_MD5 = cd11fabdf5162ad68329e7b28b308278
$(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96
glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db
install : $(TARGET)
@@ -94,30 +96,25 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/glibc-2.3.3-ssp_frandom-2.patch
@mkdir $(DIR_SRC)/glibc-build
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-2.3.6-linux_types-1.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-2.3.6-inotify-1.patch
# This locale causes a loop on bash login - exclude it
cd $(DIR_APP) && sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
scripts/test-installation.pl
cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
touch /etc/ld.so.conf
cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE)
cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
cp -v $(DIR_APP)/sysdeps/unix/sysv/linux/inotify.h /usr/include/sys
else
-mkdir /tools/etc
touch /tools/etc/ld.so.conf
cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE) AUTOCONF=no
cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) AUTOCONF=no install
endif
# Locking in the toolchain
ifeq "$(ROOT)" ""
SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \
$$SPECFILE > newspecfile && mv -f newspecfile $$SPECFILE
else
SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \
$$SPECFILE > tempspecfile && mv -f tempspecfile $$SPECFILE
rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}
cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
endif
# Creating the locales
@@ -128,6 +125,7 @@ else
endif
cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
cd $(DIR_SRC)/glibc-build && make localedata/install-locales
# Configuring Glibc
ifeq "$(ROOT)" ""

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: grep,v 1.3.2.3 2005/02/26 20:13:20 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,25 +26,24 @@
include Config
VER = 2.5.1
VER = 2.5.1a
THISAPP = grep-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_GNU)/grep
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --bindir=/bin \
--with-included-regex --disable-nls
EXTRA_CONFIG = --prefix=/usr --bindir=/bin --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --disable-nls \
--disable-perl-regexp --with-included-regex
--disable-perl-regexp
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -63,7 +56,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = ddd99e2d5d4f4611357e31e97f080cf2
$(DL_FILE)_MD5 = 52202fe462770fa6be1bb667bd6cf30c
install : $(TARGET)
@@ -93,8 +86,10 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-redhat_fixes-2.patch
cd $(DIR_APP) && chmod +x tests/fmbtest.sh
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: gzip,v 1.3.2.4 2005/07/18 20:40:37 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 1.3.5
THISAPP = gzip-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_AGNU)/gzip
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -91,24 +85,20 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
#only gzip is include, so fix only this part
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gzip-1.3.5-asm-execstack.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gzip-1.3.3-window-size.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gzip-1.3.5-perm.patch # CAN-2005-0988
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gzip-1.3.5-gunzip-dir.patch # CAN-2005-1228
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gzip-1.3.5-security_fixes-1.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && cp gzexe.in{,.backup}
cd $(DIR_APP) && sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in
cd $(DIR_APP) && sed -i 's@"BINDIR"@/bin@g' gzexe.in
endif
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
mv /usr/bin/gzip /bin
rm /usr/bin/{gunzip,zcat}
ln -sf gzip /bin/gunzip
ln -sf gzip /bin/zcat
ln -sf gunzip /bin/uncompress
mv -v /usr/bin/gzip /bin
rm -v /usr/bin/{gunzip,zcat}
ln -sv gzip /bin/gunzip
ln -sv gzip /bin/zcat
ln -sv gzip /bin/compress
ln -sv gunzip /bin/uncompress
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

86
lfs/linux-libc-header Normal file
View File

@@ -0,0 +1,86 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 2.6.12.0
THISAPP = linux-libc-headers-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
endif
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = eae2f562afe224ad50f65a6acfb4252c
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
else
cd $(DIR_APP) && cp -Rv include/asm-i386 /tools/include/asm
cd $(DIR_APP) && cp -Rv include/linux /tools/include
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

24
lfs/m4
View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: m4,v 1.4.2.5 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 1.4
VER = 1.4.4
THISAPP = m4-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/m4
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -48,19 +42,11 @@ ifeq "$(ROOT)" ""
EXTRA_MAKE =
EXTRA_INSTALL =
else
ifeq "$(LFS_PASS)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS = -static
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS =
EXTRA_MAKE =
EXTRA_INSTALL =
endif
endif
###############################################################################
@@ -71,7 +57,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 9eb2dd07740b2d2f3c7adb3e8d299bda
$(DL_FILE)_MD5 = 8d1d64dbecf1494690a0f3ba8db4482a
install : $(TARGET)
@@ -102,7 +88,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && LDFLAGS="$(EXTRA_LDFLAGS)" ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: make,v 1.3.2.2 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 3.80
THISAPP = make-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/make
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -92,7 +86,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: ncurses,v 1.3.2.5 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 5.4
VER = 5.5
THISAPP = ncurses-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/ncurses
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -44,7 +38,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --with-shared \
--without-debug --disable-nls
--without-debug --enable-widec --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
@@ -64,7 +58,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 069c8880072060373290a4fefff43520
$(DL_FILE)_MD5 = e73c1ac10b4bfc46db43b2ddfd6244ef
install : $(TARGET)
@@ -94,15 +88,25 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ncurses-5.5-fixes-1.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
chmod 755 /usr/lib/*.$(VER)
chmod 644 /usr/lib/libncurses++.a
mv /usr/lib/libncurses.so.5* /lib
ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so
ln -sf libncurses.so /usr/lib/libcurses.so
chmod -v 755 /usr/lib/*.5.5
chmod -v 644 /usr/lib/libncurses++w.a
mv -v /usr/lib/libncursesw.so.5* /lib
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
cd $(DIR_APP) && for lib in curses ncurses form panel menu ; do \
rm -vf /usr/lib/lib${lib}.so ; \
echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
done
ln -sfv libncurses++w.a /usr/lib/libncurses++.a4
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so &&
ln -sfv libncurses.so /usr/lib/libcurses.so &&
ln -sfv libncursesw.a /usr/lib/libcursesw.a &&
ln -sfv libncurses.a /usr/lib/libcurses.a
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: patch,v 1.3.2.2 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 2.5.4
THISAPP = patch-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/patch
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -92,7 +86,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && CPPFLAGS=-D_GNU_SOURCE ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: perl,v 1.9.2.13 2005/02/27 15:23:03 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 5.8.5
VER = 5.8.8
THISAPP = perl-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = http://www.cpan.org/src
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -51,13 +45,11 @@ endif
# Top-level Rules
###############################################################################
objects = $(DL_FILE) perl-5.8.4-libc-1.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
perl-5.8.4-libc-1.patch = $(URL_LFS)/perl/perl-5.8.4-libc-1.patch
$(DL_FILE)_MD5 = 49baa8d7d29b4a9713c06edeb81e6b1b
perl-5.8.4-libc-1.patch_MD5 = f033161efa8b4b174ec6667e4e739efa
$(DL_FILE)_MD5 = a377c0c67ab43fd96eeec29ce19e8382
install : $(TARGET)
@@ -86,23 +78,19 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/perl-5.8.4-libc-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl-5.8.5-perlio_debug_security.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl-5.8.5-tempfiles.patch
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-libc-2.patch
ifeq "$(ROOT)" ""
cd $(DIR_APP) && ./configure.gnu --prefix=/usr -Dpager="/bin/less -isR" -Dd_dosuid -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Dmyhostname=localhost
cd $(DIR_APP) && make depend
cd $(DIR_APP) && make
cd $(DIR_APP) && ./configure.gnu --prefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" -Dmyhostname=localhost
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
else
cd $(DIR_APP) && ./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX' -Dd_dosuid -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Dmyhostname=localhost
cd $(DIR_APP) && make depend
cd $(DIR_APP) && make
cd $(DIR_APP) && cp -f perl pod/pod2man /tools/bin
-mkdir -p /tools/lib/perl5/$(VER)
cd $(DIR_APP) && cp -Rf lib/* /tools/lib/perl5/$(VER)
cd $(DIR_APP) && ./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper Fcntl IO POSIX' -Dmyhostname=localhost
cd $(DIR_APP) && make $(MAKETUNING) perl utilities
cd $(DIR_APP) && cp -v perl pod/pod2man /tools/bin
cd $(DIR_APP) && mkdir -pv /tools/lib/perl5/$(VER)
cd $(DIR_APP) && cp -Rv lib/* /tools/lib/perl5/$(VER)
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

24
lfs/sed
View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: sed,v 1.6.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 4.0.9
VER = 4.1.5
THISAPP = sed-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/sed
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -48,20 +42,12 @@ ifeq "$(ROOT)" ""
EXTRA_MAKE =
EXTRA_INSTALL =
else
ifeq "$(LFS_PASS)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS = -static
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS =
EXTRA_MAKE =
EXTRA_INSTALL =
endif
endif
###############################################################################
# Top-level Rules
@@ -71,7 +57,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = d8fb554bc6577aaedd39b94b3cb3df70
$(DL_FILE)_MD5 = 7a1cbbbb3341287308e140bd4834c3ba
install : $(TARGET)
@@ -102,7 +88,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && LDFLAGS="$(EXTRA_LDFLAGS)" ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

29
lfs/tar
View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: tar,v 1.3.2.5 2006/01/30 19:46:45 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 1.13.25
VER = 1.15.1
THISAPP = tar-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_AGNU)/tar
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -44,7 +38,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --bindir=/bin \
--libexecdir=/usr/bin --disable-nls
--libexecdir=/usr/sbin --disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
@@ -58,14 +52,11 @@ endif
# Top-level Rules
###############################################################################
objects = $(DL_FILE) \
tar-1.13.25-dot_dot-1.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
tar-1.13.25-dot_dot-1.patch = $(URL_LFS)/tar/tar-1.13.25-dot_dot-1.patch
$(DL_FILE)_MD5 = 6ef8c906e81eee441f8335652670ac4a
tar-1.13.25-dot_dot-1.patch_MD5 = 56ab09592243847e7410c4fde8d37f62
$(DL_FILE)_MD5 = 57da3c38f8e06589699548a34d5a5d07
install : $(TARGET)
@@ -94,10 +85,12 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/tar-1.13.25-dot_dot-1.patch
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-gcc4_fix_tests-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-sparse_fix-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-security_fixes-1.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

18
lfs/tcl
View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: tcl,v 1.4.2.4 2006/01/20 13:59:20 franck78 Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 8.4.6
VER = 8.4.13
THISAPP = tcl$(VER)
DL_FILE = $(THISAPP)-src.tar.gz
DL_FROM = $(URL_SFNET)/tcl
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)-tools
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 9009a92dc648775fb8a9b0789b995756
$(DL_FILE)_MD5 = c6b655ad5db095ee73227113220c0523
install : $(TARGET)
@@ -78,12 +72,10 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
#remove a syntax error in tcl. Appears with recent bash.
#tcl 8.4.13 will correct this bug, so next line can go away
cd $(DIR_APP) && sed -i "s/relid'/relid/g" unix/configure
cd $(DIR_APP)/unix && ./configure --prefix=/tools --disable-nls
cd $(DIR_APP)/unix && make
cd $(DIR_APP)/unix && make $(MAKETUNING)
cd $(DIR_APP)/unix && make install
cd $(DIR_APP)/unix && make install-private-headers
ln -sf tclsh8.4 /tools/bin/tclsh
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: texinfo,v 1.3.2.3 2005/02/05 15:38:16 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 4.7
VER = 4.8
THISAPP = texinfo-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/texinfo
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
@@ -61,7 +55,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 72a57e378efb9898c9e41ca839554dae
$(DL_FILE)_MD5 = 6ba369bbfe4afaa56122e65b3ee3a68c
install : $(TARGET)
@@ -90,9 +84,11 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-multibyte-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-tempfile_fix-2.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -18,12 +18,6 @@
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
# Modifications by: #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
# - Modified Makefile for IPCop build #
# #
# $Id: util-linux,v 1.8.2.7 2006/01/20 14:31:47 franck78 Exp $
# #
###############################################################################
###############################################################################
@@ -36,17 +30,13 @@ VER = 2.12r
THISAPP = util-linux-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_KERNEL)/linux/utils/util-linux
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
ifeq "$(LFS_PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
else
TARGET = $(DIR_INFO)/$(THISAPP)
endif
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
endif
@@ -60,6 +50,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = af9d9e03038481fbf79ea3ac33f116f9
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
@@ -89,35 +80,19 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
ifeq "$(LFS_PASS)" "install"
-mkdir -p /install/misc/bin
cd $(DIR_APP) && CFLAGS="-Os -fomit-frame-pointer" ./configure
cd $(DIR_APP)/fdisk && sed -i 's+setlocale+// setlocale+' sfdisk.c
cd $(DIR_APP)/fdisk && make sfdisk
cd $(DIR_APP)/fdisk && install -m 0755 sfdisk /install/misc/bin
if [ "$(MACHINE)" = "alpha" ]; then \
cd $(DIR_APP)/fdisk && make fdisk; \
cd $(DIR_APP)/fdisk && install -m 0755 fdisk /install/misc/bin; \
fi
else
cd $(DIR_APP) && cp hwclock/hwclock.c{,.backup}
cd $(DIR_APP) && sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
hwclock/hwclock.c.backup > hwclock/hwclock.c
cd $(DIR_APP) && sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
hwclock/hwclock.c
-mkdir -p /var/lib/hwclock
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-cramfs-1.patch
cd $(DIR_APP) && ./configure
cd $(DIR_APP) && make HAVE_SLN=yes
cd $(DIR_APP) && make HAVE_SLN=yes install
chmod u-s /bin/mount /bin/umount
touch /var/lib/hwclock/adjtime
endif
cd $(DIR_APP) && make $(MAKETUNING) HAVE_KILL=yes HAVE_SLN=yes
cd $(DIR_APP) && make HAVE_KILL=yes HAVE_SLN=yes install
else
cd $(DIR_APP) && cp configure configure.backup
cd $(DIR_APP) && sed "s@/usr/include@/tools/include@g" configure.backup > configure
cd $(DIR_APP) && chmod 755 configure
cd $(DIR_APP) && sed -i 's@/usr/include@/tools/include@g' configure
cd $(DIR_APP) && ./configure
cd $(DIR_APP) && make -C lib
cd $(DIR_APP) && make -C mount mount umount
cd $(DIR_APP) && make -C text-utils more
cd $(DIR_APP) && make $(MAKETUNING) -C lib
cd $(DIR_APP) && make $(MAKETUNING) -C mount mount umount
cd $(DIR_APP) && make $(MAKETUNING) -C text-utils more
cd $(DIR_APP) && cp mount/{,u}mount text-utils/more /tools/bin
endif
@rm -rf $(DIR_APP)

74
make.sh
View File

@@ -64,16 +64,11 @@
fi
if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE -o 'i486' = $MACHINE -o 'i386' = $MACHINE ]; then
echo "`date -u '+%b %e %T'`: Machine is ix86 (or equivalent)" >> $LOGFILE
MACHINE=i386
BUILDTARGET=i386-pc-linux-gnu
CFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
elif [ 'alpha' = $MACHINE ]; then
echo "`date -u '+%b %e %T'`: Machine is Alpha AXP" >> $LOGFILE
BUILDTARGET=alpha-unknown-linux-gnu
CFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
CXXFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
echo "`date -u '+%b %e %T'`: Machine is i486 (or equivalent)" >> $LOGFILE
MACHINE=i486
BUILDTARGET=i486-pc-linux-gnu
CFLAGS="-O2 -mcpu=i486 -march=i486 -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -mcpu=i486 -march=i486 -pipe -fomit-frame-pointer"
else
echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
exit 1
@@ -217,7 +212,8 @@ prepareenv() {
# Setup environment
set +h
LC_ALL=POSIX
export LFS LC_ALL CFLAGS CXXFLAGS
MAKETUNING="-j8"
export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
# Make some extra directories
@@ -268,6 +264,7 @@ lfsmake1() {
LFS_BASEDIR=$BASEDIR \
ROOT=$LFS \
KVER=$KVER \
MAKETUNING=$MAKETUNING \
install >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
exiterror "Building $*";
@@ -297,7 +294,7 @@ lfsmake2() {
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
KVER=$KVER \
KVER=$KVER MAKETUNING=$MAKETUNING \
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
/tools/bin/bash -x -c "cd /usr/src/lfs && \
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
@@ -329,7 +326,7 @@ ipcopmake() {
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
KVER=$KVER \
KVER=$KVER MAKETUNING=$MAKETUNING \
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
/bin/bash -x -c "cd /usr/src/lfs && \
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
@@ -344,7 +341,6 @@ ipcopmake() {
ipfiredist() {
if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
# if [ ! `ls -w1 $BASEDIR/packages/*.ipfire | grep $1` ]; then
echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
chroot $LFS /tools/bin/env -i HOME=/root \
TERM=$TERM PS1='\u:\w\$ ' \
@@ -361,9 +357,6 @@ ipfiredist() {
if [ $? -ne 0 ]; then
exiterror "Packaging $1"
fi
# else
# echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
# fi
else
exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
fi
@@ -412,42 +405,37 @@ buildtoolchain() {
ORG_PATH=$PATH
NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
echo -ne "`date -u '+%b %e %T'`: Native GCC: $NATIVEGCC\n"
lfsmake1 ccache
lfsmake1 sed LFS_PASS=1
lfsmake1 m4 LFS_PASS=1
lfsmake1 bison LFS_PASS=1
lfsmake1 flex LFS_PASS=1
lfsmake1 binutils LFS_PASS=1
lfsmake1 gcc LFS_PASS=1
lfsmake1 binutils LFS_PASS=1
lfsmake1 gcc LFS_PASS=1
export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
lfsmake1 linux
lfsmake1 linux-libc-header
lfsmake1 glibc
lfsmake1 tcl
lfsmake1 expect
lfsmake1 glibc
lfsmake1 dejagnu
lfsmake1 gcc LFS_PASS=2
lfsmake1 binutils LFS_PASS=2
lfsmake1 gawk
lfsmake1 coreutils
lfsmake1 gcc LFS_PASS=2
lfsmake1 binutils LFS_PASS=2
lfsmake1 ncurses
lfsmake1 bash
lfsmake1 bzip2
lfsmake1 gzip
lfsmake1 coreutils
lfsmake1 diffutils
lfsmake1 findutils
lfsmake1 make
lfsmake1 grep
lfsmake1 sed LFS_PASS=2
lfsmake1 m4 LFS_PASS=2
lfsmake1 bison LFS_PASS=2
lfsmake1 flex LFS_PASS=2
lfsmake1 gawk
lfsmake1 gettext
lfsmake1 ncurses
lfsmake1 grep
lfsmake1 gzip
lfsmake1 m4
lfsmake1 make
lfsmake1 patch
lfsmake1 perl
lfsmake1 sed
lfsmake1 tar
lfsmake1 texinfo
lfsmake1 bash
lfsmake1 util-linux
lfsmake1 perl
lfsmake1 cleanup-toolchain
export PATH=$ORG_PATH
}
@@ -924,7 +912,7 @@ build)
BUILDMACHINE=`uname -m`
PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
#only restore on a clean disk
if [ ! -f log/perl-*-tools ]; then
if [ ! -f log/cleanup-toolchain-*-tools ]; then
if [ ! -n "$PACKAGE" ]; then
echo "`date -u '+%b %e %T'`: Full toolchain compilation" | tee -a $LOGFILE
prepareenv
@@ -1549,8 +1537,8 @@ unattended)
echo "### SAVING TIME"
export IPFIRE_START_TIME=`date`
echo "### GETTING TOOLCHAIN"
$0 gettoolchain
#echo "### GETTING TOOLCHAIN"
#$0 gettoolchain
echo "### RUNNING SVN-UPDATE"
$0 svn update

View File

@@ -0,0 +1,723 @@
Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org)
Date: 2006-04-11
Initial Package Version: 3.1
Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/
Upstream Status: From Upstream
Description: Contains patches 001-017 from upstream
diff -Naur bash-3.1.orig/arrayfunc.c bash-3.1/arrayfunc.c
--- bash-3.1.orig/arrayfunc.c 2005-07-04 17:25:58.000000000 -0700
+++ bash-3.1/arrayfunc.c 2006-04-19 15:59:29.000000000 -0700
@@ -592,11 +592,7 @@
exp = (char *)xmalloc (len);
strncpy (exp, s, len - 1);
exp[len - 1] = '\0';
-#if 0
- t = expand_string_to_string (exp, 0);
-#else
- t = expand_string_to_string (exp, Q_DOUBLE_QUOTES);
-#endif
+ t = expand_arith_string (exp, 0);
this_command_name = (char *)NULL;
val = evalexp (t, &expok);
free (t);
diff -Naur bash-3.1.orig/doc/bash.1 bash-3.1/doc/bash.1
--- bash-3.1.orig/doc/bash.1 2005-10-12 08:40:52.000000000 -0700
+++ bash-3.1/doc/bash.1 2006-04-19 15:58:34.000000000 -0700
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
-.\" Last Change: Sat Aug 27 13:28:44 EDT 2005
+.\" Last Change: Wed Dec 28 19:58:45 EST 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"
+.TH BASH 1 "2005 Dec 28" "GNU Bash-3.1"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -677,8 +677,8 @@
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
-The return value is 0 if the string matches or does not match
-the pattern, respectively, and 1 otherwise.
+The return value is 0 if the string matches (\fB==\fP) or does not match
+(\fB!=\fP) the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
string.
.if t .sp 0.5
@@ -807,6 +807,12 @@
as for pathname expansion (see
.B Pathname Expansion
below).
+The \fIword\fP is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substituion,
+command substitution, process substitution and quote removal.
+Each \fIpattern\fP examined is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substituion,
+command substitution, and process substitution.
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
@@ -8484,7 +8490,7 @@
returns true if any of the arguments are found, false if
none are found.
.TP
-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
+\fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]]
Provides control over the resources available to the shell and to
processes started by it, on systems that allow such control.
The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
@@ -8523,6 +8529,9 @@
.B \-f
The maximum size of files created by the shell
.TP
+.B \-i
+The maximum number of pending signals
+.TP
.B \-l
The maximum size that may be locked into memory
.TP
@@ -8536,6 +8545,9 @@
.B \-p
The pipe size in 512-byte blocks (this may not be set)
.TP
+.B \-q
+The maximum number of bytes in POSIX message queues
+.TP
.B \-s
The maximum stack size
.TP
@@ -8547,6 +8559,9 @@
.TP
.B \-v
The maximum amount of virtual memory available to the shell
+.TP
+.B \-x
+The maximum number of file locks
.PD
.PP
If
diff -Naur bash-3.1.orig/doc/bashref.texi bash-3.1/doc/bashref.texi
--- bash-3.1.orig/doc/bashref.texi 2005-10-03 12:07:21.000000000 -0700
+++ bash-3.1/doc/bashref.texi 2006-04-19 15:58:34.000000000 -0700
@@ -961,8 +961,8 @@
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
-The return value is 0 if the string matches or does not match
-the pattern, respectively, and 1 otherwise.
+The return value is 0 if the string matches (@samp{==}) or does not
+match (@samp{!=})the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
string.
@@ -2598,7 +2598,7 @@
Builtin commands are necessary to implement functionality impossible
or inconvenient to obtain with separate utilities.
-This section briefly the builtins which Bash inherits from
+This section briefly describes the builtins which Bash inherits from
the Bourne Shell, as well as the builtin commands which are unique
to or have been extended in Bash.
@@ -3833,7 +3833,7 @@
@item ulimit
@btindex ulimit
@example
-ulimit [-acdflmnpstuvSH] [@var{limit}]
+ulimit [-acdfilmnpqstuvxSH] [@var{limit}]
@end example
@code{ulimit} provides control over the resources available to processes
started by the shell, on systems that allow such control. If an
@@ -3857,6 +3857,9 @@
@item -f
The maximum size of files created by the shell.
+@item -i
+The maximum number of pending signals.
+
@item -l
The maximum size that may be locked into memory.
@@ -3869,6 +3872,9 @@
@item -p
The pipe buffer size.
+@item -q
+The maximum number of bytes in POSIX message queues.
+
@item -s
The maximum stack size.
@@ -3881,6 +3887,9 @@
@item -v
The maximum amount of virtual memory available to the process.
+@item -x
+The maximum number of file locks.
+
@end table
If @var{limit} is given, it is the new value of the specified resource;
@@ -4089,8 +4098,8 @@
Print shell input lines as they are read.
@item -x
-Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP
-commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands
+Print a trace of simple commands, @code{for} commands, @code{case}
+commands, @code{select} commands, and arithmetic @code{for} commands
and their arguments or associated word lists after they are
expanded and before they are executed. The value of the @env{PS4}
variable is expanded and the resultant value is printed before
diff -Naur bash-3.1.orig/doc/version.texi bash-3.1/doc/version.texi
--- bash-3.1.orig/doc/version.texi 2005-09-20 11:52:56.000000000 -0700
+++ bash-3.1/doc/version.texi 2006-04-19 15:58:34.000000000 -0700
@@ -2,9 +2,9 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Mon Sep 5 11:47:04 EDT 2005
+@set LASTCHANGE Fri Dec 30 10:50:51 EST 2005
-@set EDITION 3.1-beta1
-@set VERSION 3.1-beta1
-@set UPDATED 5 September 2005
-@set UPDATED-MONTH September 2005
+@set EDITION 3.1
+@set VERSION 3.1
+@set UPDATED 30 December 2005
+@set UPDATED-MONTH December 2005
diff -Naur bash-3.1.orig/jobs.c bash-3.1/jobs.c
--- bash-3.1.orig/jobs.c 2005-11-11 20:13:27.000000000 -0800
+++ bash-3.1/jobs.c 2006-04-19 15:58:34.000000000 -0700
@@ -619,8 +619,11 @@
* once in the parent and once in each child. This is where
* the parent gives it away.
*
+ * Don't give the terminal away if this shell is an asynchronous
+ * subshell.
+ *
*/
- if (job_control && newjob->pgrp)
+ if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0)
give_terminal_to (newjob->pgrp, 0);
}
}
@@ -844,9 +847,10 @@
realloc_jobs_list ()
{
sigset_t set, oset;
- int nsize, i, j;
+ int nsize, i, j, ncur, nprev;
JOB **nlist;
+ ncur = nprev = NO_JOB;
nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
nsize *= JOB_SLOTS;
i = js.j_njobs % JOB_SLOTS;
@@ -854,17 +858,51 @@
nsize += JOB_SLOTS;
BLOCK_CHILD (set, oset);
- nlist = (JOB **) xmalloc (nsize * sizeof (JOB *));
+ nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *));
+
for (i = j = 0; i < js.j_jobslots; i++)
if (jobs[i])
- nlist[j++] = jobs[i];
+ {
+ if (i == js.j_current)
+ ncur = j;
+ if (i == js.j_previous)
+ nprev = j;
+ nlist[j++] = jobs[i];
+ }
+
+#if defined (DEBUG)
+ itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize);
+ itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0);
+ itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0);
+#endif
js.j_firstj = 0;
- js.j_lastj = (j > 0) ? j - 1: 0;
+ js.j_lastj = (j > 0) ? j - 1 : 0;
+ js.j_njobs = j;
js.j_jobslots = nsize;
- free (jobs);
- jobs = nlist;
+ /* Zero out remaining slots in new jobs list */
+ for ( ; j < nsize; j++)
+ nlist[j] = (JOB *)NULL;
+
+ if (jobs != nlist)
+ {
+ free (jobs);
+ jobs = nlist;
+ }
+
+ if (ncur != NO_JOB)
+ js.j_current = ncur;
+ if (nprev != NO_JOB)
+ js.j_previous = nprev;
+
+ /* Need to reset these */
+ if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj)
+ reset_current ();
+
+#ifdef DEBUG
+ itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous);
+#endif
UNBLOCK_CHILD (oset);
}
@@ -1655,7 +1693,7 @@
In this case, we don't want to give the terminal to the
shell's process group (we could be in the middle of a
pipeline, for example). */
- if (async_p == 0 && pipeline_pgrp != shell_pgrp)
+ if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0))
give_terminal_to (pipeline_pgrp, 0);
#if defined (PGRP_PIPE)
@@ -2198,7 +2236,11 @@
/* This is possibly a race condition -- should it go in stop_pipeline? */
wait_sigint_received = 0;
if (job_control == 0)
- old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+ {
+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+ if (old_sigint_handler == SIG_IGN)
+ set_signal_handler (SIGINT, old_sigint_handler);
+ }
termination_state = last_command_exit_value;
diff -Naur bash-3.1.orig/lib/glob/glob.c bash-3.1/lib/glob/glob.c
--- bash-3.1.orig/lib/glob/glob.c 2005-03-24 09:42:27.000000000 -0800
+++ bash-3.1/lib/glob/glob.c 2006-04-19 15:58:34.000000000 -0700
@@ -360,6 +360,7 @@
count = lose = skip = 0;
firstmalloc = 0;
+ nalloca = 0;
/* If PAT is empty, skip the loop, but return one (empty) filename. */
if (pat == 0 || *pat == '\0')
@@ -546,6 +547,8 @@
firstmalloc = 0;
tmplink = lastlink;
}
+ else
+ tmplink = 0;
free (lastlink->name);
lastlink = lastlink->next;
FREE (tmplink);
diff -Naur bash-3.1.orig/lib/glob/sm_loop.c bash-3.1/lib/glob/sm_loop.c
--- bash-3.1.orig/lib/glob/sm_loop.c 2005-10-16 18:21:04.000000000 -0700
+++ bash-3.1/lib/glob/sm_loop.c 2006-04-19 15:58:34.000000000 -0700
@@ -638,12 +638,13 @@
CHAR *psub; /* pointer to sub-pattern */
CHAR *pnext; /* pointer to next sub-pattern */
CHAR *srest; /* pointer to rest of string */
- int m1, m2;
+ int m1, m2, xflags; /* xflags = flags passed to recursive matches */
#if DEBUG_MATCHING
fprintf(stderr, "extmatch: xc = %c\n", xc);
fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se);
fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe);
+fprintf(stderr, "extmatch: flags = %d\n", flags);
#endif
prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */
@@ -677,8 +678,12 @@
string matches the rest of the pattern. Also handle
multiple matches of the pattern. */
if (m1)
- m2 = (GMATCH (srest, se, prest, pe, flags) == 0) ||
- (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0);
+ {
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) ||
+ (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0);
+ }
if (m1 && m2)
return (0);
}
@@ -704,8 +709,10 @@
srest = (prest == pe) ? se : s;
for ( ; srest <= se; srest++)
{
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
- GMATCH (srest, se, prest, pe, flags) == 0)
+ GMATCH (srest, se, prest, pe, xflags) == 0)
return (0);
}
if (pnext == prest)
@@ -726,7 +733,9 @@
if (pnext == prest)
break;
}
- if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0)
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0)
return (0);
}
return (FNM_NOMATCH);
diff -Naur bash-3.1.orig/lib/readline/display.c bash-3.1/lib/readline/display.c
--- bash-3.1.orig/lib/readline/display.c 2005-11-30 11:05:02.000000000 -0800
+++ bash-3.1/lib/readline/display.c 2006-04-19 15:58:34.000000000 -0700
@@ -1983,11 +1983,15 @@
int pchar;
{
int len;
- char *pmt;
+ char *pmt, *p;
rl_save_prompt ();
- if (saved_local_prompt == 0)
+ /* We've saved the prompt, and can do anything with the various prompt
+ strings we need before they're restored. We want the unexpanded
+ portion of the prompt string after any final newline. */
+ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+ if (p == 0)
{
len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
pmt = (char *)xmalloc (len + 2);
@@ -1998,19 +2002,17 @@
}
else
{
- len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ p++;
+ len = strlen (p);
pmt = (char *)xmalloc (len + 2);
if (len)
- strcpy (pmt, saved_local_prompt);
+ strcpy (pmt, p);
pmt[len] = pchar;
pmt[len+1] = '\0';
- local_prompt = savestring (pmt);
- prompt_last_invisible = saved_last_invisible;
- prompt_visible_length = saved_visible_length + 1;
- }
+ }
+ /* will be overwritten by expand_prompt, called from rl_message */
prompt_physical_chars = saved_physical_chars + 1;
-
return pmt;
}
diff -Naur bash-3.1.orig/lib/readline/readline.c bash-3.1/lib/readline/readline.c
--- bash-3.1.orig/lib/readline/readline.c 2005-07-04 19:29:35.000000000 -0700
+++ bash-3.1/lib/readline/readline.c 2006-04-19 15:58:34.000000000 -0700
@@ -282,6 +282,7 @@
{
FREE (rl_prompt);
rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
diff -Naur bash-3.1.orig/lib/readline/terminal.c bash-3.1/lib/readline/terminal.c
--- bash-3.1.orig/lib/readline/terminal.c 2005-11-12 17:46:54.000000000 -0800
+++ bash-3.1/lib/readline/terminal.c 2006-04-19 15:58:34.000000000 -0700
@@ -122,7 +122,7 @@
static char *_rl_visible_bell;
/* Non-zero means the terminal can auto-wrap lines. */
-int _rl_term_autowrap;
+int _rl_term_autowrap = -1;
/* Non-zero means that this terminal has a meta key. */
static int term_has_meta;
@@ -274,6 +274,9 @@
_rl_set_screen_size (rows, cols)
int rows, cols;
{
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
+
if (rows > 0)
_rl_screenheight = rows;
if (cols > 0)
diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
--- bash-3.1.orig/parse.y 2005-11-11 20:14:18.000000000 -0800
+++ bash-3.1/parse.y 2006-04-19 15:58:34.000000000 -0700
@@ -2716,6 +2716,7 @@
#define P_ALLOWESC 0x02
#define P_DQUOTE 0x04
#define P_COMMAND 0x08 /* parsing a command, so look for comments */
+#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
static char matched_pair_error;
static char *
@@ -2725,12 +2726,12 @@
int *lenp, flags;
{
int count, ch, was_dollar, in_comment, check_comment;
- int pass_next_character, nestlen, ttranslen, start_lineno;
+ int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
int retind, retsize, rflags;
count = 1;
- pass_next_character = was_dollar = in_comment = 0;
+ pass_next_character = backq_backslash = was_dollar = in_comment = 0;
check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
@@ -2742,11 +2743,8 @@
start_lineno = line_number;
while (count)
{
-#if 0
- ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0);
-#else
- ch = shell_getc (qc != '\'' && pass_next_character == 0);
-#endif
+ ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
+
if (ch == EOF)
{
free (ret);
@@ -2771,9 +2769,16 @@
continue;
}
/* Not exactly right yet */
- else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))
+ else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
in_comment = 1;
+ /* last char was backslash inside backquoted command substitution */
+ if (backq_backslash)
+ {
+ backq_backslash = 0;
+ /* Placeholder for adding special characters */
+ }
+
if (pass_next_character) /* last char was backslash */
{
pass_next_character = 0;
@@ -2814,6 +2819,8 @@
{
if MBTEST((flags & P_ALLOWESC) && ch == '\\')
pass_next_character++;
+ else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
+ backq_backslash++;
continue;
}
@@ -2898,7 +2905,11 @@
}
else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
{
- nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags);
+ /* Add P_BACKQUOTE so backslash quotes the next character and
+ shell_getc does the right thing with \<newline>. We do this for
+ a measure of backwards compatibility -- it's not strictly the
+ right POSIX thing. */
+ nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
goto add_nestret;
}
else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
@@ -2907,7 +2918,7 @@
if (open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
- nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
+ nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE);
else if (ch == '{') /* } */
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
@@ -3578,7 +3589,7 @@
FREE (ttok);
all_digit_token = 0;
compound_assignment = 1;
-#if 0
+#if 1
goto next_character;
#else
goto got_token; /* ksh93 seems to do this */
@@ -3695,7 +3706,9 @@
struct builtin *b;
b = builtin_address_internal (token, 0);
if (b && (b->flags & ASSIGNMENT_BUILTIN))
- parser_state |= PST_ASSIGNOK;
+ parser_state |= PST_ASSIGNOK;
+ else if (STREQ (token, "eval") || STREQ (token, "let"))
+ parser_state |= PST_ASSIGNOK;
}
yylval.word = the_word;
@@ -4686,18 +4699,21 @@
int *retlenp;
{
WORD_LIST *wl, *rl;
- int tok, orig_line_number, orig_token_size;
+ int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
char *saved_token, *ret;
saved_token = token;
orig_token_size = token_buffer_size;
orig_line_number = line_number;
+ orig_last_token = last_read_token;
last_read_token = WORD; /* WORD to allow reserved words here */
token = (char *)NULL;
token_buffer_size = 0;
+ assignok = parser_state&PST_ASSIGNOK; /* XXX */
+
wl = (WORD_LIST *)NULL; /* ( */
parser_state |= PST_COMPASSIGN;
@@ -4740,7 +4756,7 @@
jump_to_top_level (DISCARD);
}
- last_read_token = WORD;
+ last_read_token = orig_last_token; /* XXX - was WORD? */
if (wl)
{
rl = REVERSE_LIST (wl, WORD_LIST *);
@@ -4752,6 +4768,10 @@
if (retlenp)
*retlenp = (ret && *ret) ? strlen (ret) : 0;
+
+ if (assignok)
+ parser_state |= PST_ASSIGNOK;
+
return ret;
}
diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
--- bash-3.1.orig/patchlevel.h 2005-07-20 10:58:20.000000000 -0700
+++ bash-3.1/patchlevel.h 2006-04-19 15:59:29.000000000 -0700
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 0
+#define PATCHLEVEL 17
#endif /* _PATCHLEVEL_H_ */
diff -Naur bash-3.1.orig/subst.c bash-3.1/subst.c
--- bash-3.1.orig/subst.c 2005-10-24 06:51:13.000000000 -0700
+++ bash-3.1/subst.c 2006-04-19 15:59:29.000000000 -0700
@@ -2187,7 +2187,7 @@
if (mklocal && variable_context)
{
v = find_variable (name);
- if (v == 0 || array_p (v) == 0)
+ if (v == 0 || array_p (v) == 0 || v->context != variable_context)
v = make_local_array_variable (name);
v = assign_array_var_from_string (v, value, flags);
}
@@ -2575,6 +2575,13 @@
return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
}
+char *
+expand_arith_string (string, quoted)
+ char *string;
+{
+ return (expand_string_if_necessary (string, quoted, expand_string));
+}
+
#if defined (COND_COMMAND)
/* Just remove backslashes in STRING. Returns a new string. */
char *
@@ -5248,7 +5255,7 @@
else
t = (char *)0;
- temp1 = expand_string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
*e1p = evalexp (temp1, &expok);
free (temp1);
if (expok == 0)
@@ -5293,7 +5300,7 @@
{
t++;
temp2 = savestring (t);
- temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
free (temp2);
t[-1] = ':';
*e2p = evalexp (temp1, &expok);
@@ -6435,7 +6442,7 @@
temp2[t_index] = '\0';
/* Expand variables found inside the expression. */
- temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
free (temp2);
arithsub:
@@ -6477,7 +6484,7 @@
zindex = t_index;
/* Do initial variable expansion. */
- temp1 = expand_string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
goto arithsub;
@@ -6795,6 +6802,12 @@
if (temp && *temp && t_index > 0)
{
temp1 = bash_tilde_expand (temp, tflag);
+ if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
+ {
+ FREE (temp);
+ FREE (temp1);
+ goto add_character; /* tilde expansion failed */
+ }
free (temp);
temp = temp1;
sindex += t_index;
diff -Naur bash-3.1.orig/subst.h bash-3.1/subst.h
--- bash-3.1.orig/subst.h 2004-11-07 12:12:28.000000000 -0800
+++ bash-3.1/subst.h 2006-04-19 15:59:29.000000000 -0700
@@ -151,6 +151,9 @@
extern char *expand_string_unsplit_to_string __P((char *, int));
extern char *expand_assignment_string_to_string __P((char *, int));
+/* Expand an arithmetic expression string */
+extern char *expand_arith_string __P((char *, int));
+
/* De-quoted quoted characters in STRING. */
extern char *dequote_string __P((char *));
diff -Naur bash-3.1.orig/variables.c bash-3.1/variables.c
--- bash-3.1.orig/variables.c 2005-11-12 18:22:37.000000000 -0800
+++ bash-3.1/variables.c 2006-04-19 15:58:34.000000000 -0700
@@ -860,9 +860,11 @@
{
char val[INT_STRLEN_BOUND(int) + 1], *v;
+#if defined (READLINE)
/* If we are currently assigning to LINES or COLUMNS, don't do anything. */
if (winsize_assignment)
return;
+#endif
v = inttostr (lines, val, sizeof (val));
bind_variable ("LINES", v, 0);

View File

@@ -0,0 +1,35 @@
Submitted By: Ken Moffat <ken@kenmoffat.uklinux.net>
Date: 2005-08-09
Initial Package Version: 1.0.3
Upstream Status: Unknown.
Origin: Jyri Ryska (RedHat) for fedora3
Description: Fixes filename sanitisation in bzgrep.
This fixes CAN-2005-0758 (if a user can be tricked into running
bzgrep in an untrusted directory containing files with carefully
crafted filenames, arbitrary commands could be executed as the user
running bzgrep). Risk is reported as low. I've modified it to force
the interpreter to be bash, some of the other shells in use won't
like the bash syntax.
diff -Naur bzip2-1.0.3/bzgrep bzip2-1.0.3-new/bzgrep
--- bzip2-1.0.3/bzgrep 2004-10-09 12:29:32.000000000 +0100
+++ bzip2-1.0.3-new/bzgrep 2005-08-09 21:36:37.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Bzgrep wrapped for bzip2,
# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
@@ -63,7 +63,11 @@
bzip2 -cdfq "$i" | $grep $opt "$pat"
r=$?
else
- bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
+ j=${i//\\/\\\\}
+ j=${j//|/\\|}
+ j=${j//&/\\&}
+ j=`printf "%s" "$j" | tr '\n' ' '`
+ bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
r=$?
fi
test "$r" -ne 0 && res="$r"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,272 @@
Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org>
Date: 2006-03-15
Initial Package Version: 5.94
Origin: original suppress_hotname_uptame_kill_su patch (Robert Connolly)
Upstream Status: N/A
Description: This patch supresses the building of uptime, and kill. The su
command is built so the testsuite can run, use './src/su', but it will not
be installed. Also see:
http://www.linuxfromscratch.org/patches/downloads/coreutils/
coreutils-5.0-dupes-2.patch
diff -Naur coreutils-5.94.orig/AUTHORS coreutils-5.94/AUTHORS
--- coreutils-5.94.orig/AUTHORS 2004-11-03 23:10:50.000000000 +0000
+++ coreutils-5.94/AUTHORS 2006-03-15 22:20:49.000000000 +0000
@@ -34,7 +34,6 @@
hostname: Jim Meyering
id: Arnold Robbins, David MacKenzie
join: Mike Haertel
-kill: Paul Eggert
link: Michael Stone
ln: Mike Parker, David MacKenzie
logname: FIXME: unknown
@@ -83,7 +82,6 @@
unexpand: David MacKenzie
uniq: Richard Stallman, David MacKenzie
unlink: Michael Stone
-uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
users: Joseph Arceneaux, David MacKenzie
vdir: Richard Stallman, David MacKenzie
wc: Paul Rubin, David MacKenzie
diff -Naur coreutils-5.94.orig/Makefile.in coreutils-5.94/Makefile.in
--- coreutils-5.94.orig/Makefile.in 2006-02-13 12:52:03.000000000 +0000
+++ coreutils-5.94/Makefile.in 2006-03-15 22:20:49.000000000 +0000
@@ -148,7 +148,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
diff -Naur coreutils-5.94.orig/README coreutils-5.94/README
--- coreutils-5.94.orig/README 2005-09-28 18:34:26.000000000 +0000
+++ coreutils-5.94/README 2006-03-15 22:20:49.000000000 +0000
@@ -9,11 +9,11 @@
[ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
df dir dircolors dirname du echo env expand expr factor false fmt fold
- ginstall groups head hostid hostname id join kill link ln logname ls
+ ginstall groups head hostid hostname id join link ln logname ls
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
split stat stty su sum sync tac tail tee test touch tr true tsort tty
- uname unexpand uniq unlink uptime users vdir wc who whoami yes
+ uname unexpand uniq unlink users vdir wc who whoami yes
See the file NEWS for a list of major changes in the current release.
diff -Naur coreutils-5.94.orig/configure coreutils-5.94/configure
--- coreutils-5.94.orig/configure 2006-02-13 12:52:04.000000000 +0000
+++ coreutils-5.94/configure 2006-03-15 22:20:49.000000000 +0000
@@ -50418,8 +50418,7 @@
{ echo "$as_me:$LINENO: result: $gnulib_cv_have_boot_time" >&5
echo "${ECHO_T}$gnulib_cv_have_boot_time" >&6; }
if test $gnulib_cv_have_boot_time = yes; then
- OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime\$(EXEEXT)"
- MAN="$MAN uptime.1"
+echo "uptime is suppressed"
fi
diff -Naur coreutils-5.94.orig/man/Makefile.in coreutils-5.94/man/Makefile.in
--- coreutils-5.94.orig/man/Makefile.in 2006-02-13 12:51:58.000000000 +0000
+++ coreutils-5.94/man/Makefile.in 2006-03-15 22:20:50.000000000 +0000
@@ -142,7 +142,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
@@ -303,13 +303,13 @@
basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \
cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \
echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \
- head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \
+ head.1 hostid.1 hostname.1 id.1 install.1 join.1 \
link.1 ln.1 logname.1 \
ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \
paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
- tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
+ sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
+ tty.1 uname.1 unexpand.1 uniq.1 unlink.1 users.1 vdir.1 wc.1 \
who.1 whoami.1 yes.1
man_aux = $(dist_man_MANS:.1=.x)
@@ -575,7 +575,6 @@
id.1: $(common_dep) $(srcdir)/id.x ../src/id.c
install.1: $(common_dep) $(srcdir)/install.x ../src/install.c
join.1: $(common_dep) $(srcdir)/join.x ../src/join.c
-kill.1: $(common_dep) $(srcdir)/kill.x ../src/kill.c
link.1: $(common_dep) $(srcdir)/link.x ../src/link.c
ln.1: $(common_dep) $(srcdir)/ln.x ../src/ln.c
logname.1: $(common_dep) $(srcdir)/logname.x ../src/logname.c
@@ -608,7 +607,6 @@
split.1: $(common_dep) $(srcdir)/split.x ../src/split.c
stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c
stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c
-su.1: $(common_dep) $(srcdir)/su.x ../src/su.c
sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c
sync.1: $(common_dep) $(srcdir)/sync.x ../src/sync.c
tac.1: $(common_dep) $(srcdir)/tac.x ../src/tac.c
@@ -624,7 +622,6 @@
unexpand.1: $(common_dep) $(srcdir)/unexpand.x ../src/unexpand.c
uniq.1: $(common_dep) $(srcdir)/uniq.x ../src/uniq.c
unlink.1: $(common_dep) $(srcdir)/unlink.x ../src/unlink.c
-uptime.1: $(common_dep) $(srcdir)/uptime.x ../src/uptime.c
users.1: $(common_dep) $(srcdir)/users.x ../src/users.c
vdir.1: $(common_dep) $(srcdir)/vdir.x ../src/ls.c
wc.1: $(common_dep) $(srcdir)/wc.x ../src/wc.c
@@ -656,7 +653,7 @@
check-x-vs-1:
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
- (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+ (cd $(srcdir) && ls -1 *.x) | grep -v -e 'kill.x' -e 'su.x' -e 'uptime.x' | sed 's/\.x$$//' | $(ASSORT) > $$t;\
echo $(dist_man_MANS) | tr -s ' ' '\n' | sed 's/\.1$$//' \
| $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
diff -Naur coreutils-5.94.orig/src/Makefile.in coreutils-5.94/src/Makefile.in
--- coreutils-5.94.orig/src/Makefile.in 2006-02-13 13:08:11.000000000 +0000
+++ coreutils-5.94/src/Makefile.in 2006-03-15 22:20:50.000000000 +0000
@@ -39,7 +39,7 @@
host_triplet = @host@
EXTRA_PROGRAMS = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \
nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) \
- uname$(EXEEXT) uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT)
+ uname$(EXEEXT) users$(EXEEXT) who$(EXEEXT)
bin_PROGRAMS = [$(EXEEXT) chgrp$(EXEEXT) chown$(EXEEXT) chmod$(EXEEXT) \
cp$(EXEEXT) dd$(EXEEXT) dircolors$(EXEEXT) du$(EXEEXT) \
ginstall$(EXEEXT) link$(EXEEXT) ln$(EXEEXT) dir$(EXEEXT) \
@@ -56,7 +56,7 @@
uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) date$(EXEEXT) \
dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) expr$(EXEEXT) \
factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) id$(EXEEXT) \
- kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \
+ logname$(EXEEXT) pathchk$(EXEEXT) \
printenv$(EXEEXT) printf$(EXEEXT) pwd$(EXEEXT) seq$(EXEEXT) \
sleep$(EXEEXT) tee$(EXEEXT) test$(EXEEXT) true$(EXEEXT) \
tty$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT) $(am__EXEEXT_1) \
@@ -169,7 +169,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
@@ -350,11 +350,6 @@
join_LDADD = $(LDADD)
join_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
../lib/libcoreutils.a
-kill_SOURCES = kill.c
-kill_OBJECTS = kill.$(OBJEXT)
-kill_LDADD = $(LDADD)
-kill_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
- ../lib/libcoreutils.a
link_SOURCES = link.c
link_OBJECTS = link.$(OBJEXT)
link_LDADD = $(LDADD)
@@ -577,9 +572,6 @@
unlink_LDADD = $(LDADD)
unlink_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
../lib/libcoreutils.a
-uptime_SOURCES = uptime.c
-uptime_OBJECTS = uptime.$(OBJEXT)
-uptime_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
users_SOURCES = users.c
users_OBJECTS = users.$(OBJEXT)
users_LDADD = $(LDADD)
@@ -622,28 +614,28 @@
csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \
dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \
fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \
- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
+ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \
$(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
+ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \
wc.c who.c whoami.c yes.c
DIST_SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c \
$(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \
csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \
dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \
fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \
- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
+ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \
$(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
+ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \
wc.c who.c whoami.c yes.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
@@ -840,7 +832,6 @@
nanosec_libs = $(LDADD) $(POW_LIB) $(LIB_NANOSLEEP)
sleep_LDADD = $(nanosec_libs)
tail_LDADD = $(nanosec_libs)
-uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
su_LDADD = $(LDADD) $(LIB_CRYPT)
SUFFIXES = .sh
installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
@@ -1076,9 +1067,6 @@
join$(EXEEXT): $(join_OBJECTS) $(join_DEPENDENCIES)
@rm -f join$(EXEEXT)
$(LINK) $(join_LDFLAGS) $(join_OBJECTS) $(join_LDADD) $(LIBS)
-kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES)
- @rm -f kill$(EXEEXT)
- $(LINK) $(kill_LDFLAGS) $(kill_OBJECTS) $(kill_LDADD) $(LIBS)
link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES)
@rm -f link$(EXEEXT)
$(LINK) $(link_LDFLAGS) $(link_OBJECTS) $(link_LDADD) $(LIBS)
@@ -1226,9 +1214,6 @@
unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES)
@rm -f unlink$(EXEEXT)
$(LINK) $(unlink_LDFLAGS) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS)
-uptime$(EXEEXT): $(uptime_OBJECTS) $(uptime_DEPENDENCIES)
- @rm -f uptime$(EXEEXT)
- $(LINK) $(uptime_LDFLAGS) $(uptime_OBJECTS) $(uptime_LDADD) $(LIBS)
users$(EXEEXT): $(users_OBJECTS) $(users_DEPENDENCIES)
@rm -f users$(EXEEXT)
$(LINK) $(users_LDFLAGS) $(users_OBJECTS) $(users_LDADD) $(LIBS)
@@ -1322,7 +1307,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/install.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbracket.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ln.Po@am__quote@
@@ -1378,7 +1362,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unexpand.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniq.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/users.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/who.Po@am__quote@
@@ -1606,7 +1589,7 @@
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SU); \
+ echo "Installation of su is suppressed"; \
else \
echo "WARNING: insufficient access; not installing su"; \
echo "NOTE: to install su, run 'make install-root' as root"; \

View File

@@ -0,0 +1,182 @@
Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org>
Date: 2005-10-23
Initial Package Version: 5.92
Upstream Status: pending
Origin: Scot McPherson
Description: Fix the output of uname once and for all.
$ uname -m # This always worked.
i686
$ uname -i # Used to report 'unknown'.
i386
$ uname -p # Likewise.
athlon-4
diff -Naur coreutils-5.92.orig/src/uname.c coreutils-5.92/src/uname.c
--- coreutils-5.92.orig/src/uname.c 2005-09-15 20:34:42.000000000 +0000
+++ coreutils-5.92/src/uname.c 2005-10-23 10:14:06.000000000 +0000
@@ -29,6 +29,12 @@
# include <sys/systeminfo.h>
#endif
+#ifdef linux
+#define cpuid(in,a,b,c,d)\
+ asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in));
+int has_sse( void );
+#endif
+
#if HAVE_SYS_SYSCTL_H
# if HAVE_SYS_PARAM_H
# include <sys/param.h> /* needed for OpenBSD 3.0 */
@@ -256,6 +262,96 @@
if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
element = processor;
}
+#else
+ {
+ struct utsname u;
+ uname (&u);
+ element = u.machine;
+#ifdef linux
+/******************************************************************************
+ *
+ * Hello, major hack. I shouldn't have to do this. struct utsname should
+ * have another element with this info in it. There's probably a struct
+ * somewhere that has this info, I just don't know where it is.
+ *
+ *****************************************************************************/
+
+ if( !strcmp( element, "i586" ) || !strcmp( element, "i686" ) ) {
+ int eax, ebx, ecx, edx, unused;
+ int model, family, sse;
+
+ cpuid(0,unused,ebx,ecx,edx);
+ cpuid(1,eax,unused,unused,unused);
+ model = (eax >> 4) & 0xf;
+ family = (eax >> 8) & 0xf;
+
+ switch(ebx) {
+ case 0x756e6547: // Intel
+ switch( family ) {
+ case 5: // Pentium
+ if( model <= 3 )
+ element="pentium";
+ if( model > 3 )
+ element="pentium-mmx";
+ break;
+ case 6: // PentiumPro - Pentium III
+ if( model == 1 ) // Pentium Pro
+ element="pentiumpro";
+ if( ( model == 3 ) || ( model == 5 ) ||
+ ( model == 6 ) ) // Pentium II
+ element="pentium2";
+ if( ( model == 7 ) || ( model == 8 ) ||
+ ( model == 10 ) || ( model == 11 ) ) // These are all Pentium III
+ element="pentium3";
+ break;
+ case 15: // Pentium4
+ element="pentium4";
+ break;
+ default:
+ break;
+ } // end switch( family )
+ break;
+ case 0x68747541: // AMD
+ switch(family) {
+ case 5:
+ if( ( model == 0 ) || ( model == 1 ) ||
+ ( model == 2 ) || ( model == 3 ) ) // K5
+ element="i586";
+ if( ( model == 6 ) || ( model == 7 ) ) // K6
+ element="k6";
+ if( model == 8 ) // K6-2
+ element="k6-2";
+ if( model == 9 ) // K6-3
+ element="k6-3";
+ break;
+ case 6:
+ if( model <= 4 )
+ element="athlon";
+ if( model > 4 ) {
+ sse = has_sse();
+ if( sse == 0 )
+ element="athlon";
+ if( sse == 1 )
+ element="athlon-4";
+ }
+ break;
+ case 15:
+ element="athlon-4";
+ break;
+ default:
+ break;
+ } // end switch( family )
+ break;
+ case 0x69727943: // Cyrix
+ element="i386"; // who knows what cyrix supports, lets be safe
+ break;
+ default:
+ break;
+ } // end switch(ebx)
+ }
+
+#endif
+ }
#endif
#ifdef UNAME_PROCESSOR
if (element == unknown)
@@ -293,7 +389,7 @@
if (toprint & PRINT_HARDWARE_PLATFORM)
{
- char const *element = unknown;
+ char *element = unknown;
#if HAVE_SYSINFO && defined SI_PLATFORM
{
static char hardware_platform[257];
@@ -301,6 +397,15 @@
hardware_platform, sizeof hardware_platform))
element = hardware_platform;
}
+#else
+ {
+ struct utsname u;
+ uname (&u);
+ element = u.machine;
+ if (strlen (element) == 4 && element[0] == 'i' && element[2] == '8'
+ && element[3] == '6')
+ element[1] = '3';
+ }
#endif
#ifdef UNAME_HARDWARE_PLATFORM
if (element == unknown)
@@ -323,3 +428,29 @@
exit (EXIT_SUCCESS);
}
+
+#ifdef linux
+
+/******************************************************************************
+ *
+ * int has_sse( void )
+ * Checks Athlon CPU's to see if they support SSE.
+ *
+ *****************************************************************************/
+
+int has_sse( void )
+{
+ unsigned long edx, unused;
+ int sse;
+ cpuid(1,unused,unused,unused,edx);
+ // I think, I need this tested on a Duron with SSE
+ // and one without it.
+ sse = edx & 0x2000000;
+ if( sse == 0 ) {
+ return 0;
+ } else {
+ return 1;
+ }
+
+}
+#endif

View File

@@ -0,0 +1,217 @@
Submitted By: LFS Book <lfs-book@linuxfromscratch.org>
Date: 2003-10-05
Initial Package Version: 5.38
Origin: Redhat RPM (Patch by HJ Lu)
Description: NA
diff -uNr expect-5.38.orig/exp_chan.c expect-5.38/exp_chan.c
--- expect-5.38.orig/exp_chan.c 2002-02-12 13:00:55.000000000 +1100
+++ expect-5.38/exp_chan.c 2003-03-01 10:36:18.000000000 +1100
@@ -519,6 +519,7 @@
esPtr->buffer = Tcl_NewStringObj("",0);
Tcl_IncrRefCount(esPtr->buffer);
esPtr->umsize = exp_default_match_max;
+ esPtr->umsize_changed = exp_default_match_max_changed;
/* this will reallocate object with an appropriate sized buffer */
expAdjust(esPtr);
diff -uNr expect-5.38.orig/exp_command.h expect-5.38/exp_command.h
--- expect-5.38.orig/exp_command.h 2002-04-08 08:57:20.000000000 +1000
+++ expect-5.38/exp_command.h 2003-03-01 10:36:18.000000000 +1100
@@ -25,6 +25,7 @@
EXTERN char * exp_get_var _ANSI_ARGS_((Tcl_Interp *,char *));
EXTERN int exp_default_match_max;
+EXTERN int exp_default_match_max_changed;
EXTERN int exp_default_parity;
EXTERN int exp_default_rm_nulls;
@@ -97,6 +98,7 @@
int msize; /* # of bytes that buffer can hold (max) */
int umsize; /* # of bytes (min) that is guaranteed to match */
/* this comes from match_max command */
+ int umsize_changed; /* is umsize changed by user? */
int printed; /* # of bytes written to stdout (if logging on) */
/* but not actually returned via a match yet */
int echoed; /* additional # of bytes (beyond "printed" above) */
diff -uNr expect-5.38.orig/expect.c expect-5.38/expect.c
--- expect-5.38.orig/expect.c 2002-04-08 09:00:33.000000000 +1000
+++ expect-5.38/expect.c 2003-03-01 10:36:18.000000000 +1100
@@ -41,8 +41,17 @@
#include "tcldbg.h"
#endif
+/* The initial length is 2000. We increment it by 2000. The maximum
+ is 8MB (0x800000). */
+#define EXP_MATCH_MAX 2000
+#define EXP_MATCH_INC 2000
+#define EXP_MATCH_STEP_LIMIT 0x700000
+#define EXP_MATCH_LIMIT 0x800000
+#define EXP_MATCH_LIMIT_QUOTE "0x800000"
+
/* initial length of strings that we can guarantee patterns can match */
-int exp_default_match_max = 2000;
+int exp_default_match_max = EXP_MATCH_MAX;
+int exp_default_match_max_changed = 0;
#define INIT_EXPECT_TIMEOUT_LIT "10" /* seconds */
#define INIT_EXPECT_TIMEOUT 10 /* seconds */
int exp_default_parity = TRUE;
@@ -1618,6 +1627,76 @@
return newsize;
}
+/* returns # of bytes until we see a newline at the end or EOF. */
+/*ARGSUSED*/
+static int
+expReadNewLine(interp,esPtr,save_flags) /* INTL */
+Tcl_Interp *interp;
+ExpState *esPtr;
+int save_flags;
+{
+ int size;
+ int exp_size;
+ int full_size;
+ int count;
+ char *str;
+
+ count = 0;
+ for (;;) {
+ exp_size = expSizeGet(esPtr);
+
+ /* When we reach the limit, we will only read one char at a
+ time. */
+ if (esPtr->umsize >= EXP_MATCH_STEP_LIMIT)
+ size = TCL_UTF_MAX;
+ else
+ size = exp_size;
+
+ if (exp_size + TCL_UTF_MAX >= esPtr->msize) {
+ if (esPtr->umsize >= EXP_MATCH_LIMIT) {
+ expDiagLogU("WARNING: interact buffer is full. probably your program\r\n");
+ expDiagLogU("is not interactive or has a very long output line. The\r\n");
+ expDiagLogU("current limit is " EXP_MATCH_LIMIT_QUOTE ".\r\n");
+ expDiagLogU("Dumping first half of buffer in order to continue\r\n");
+ expDiagLogU("Recommend you enlarge the buffer.\r\n");
+ exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
+ return count;
+ }
+ else {
+ esPtr->umsize += EXP_MATCH_INC;
+ expAdjust(esPtr);
+ }
+ }
+
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
+ size = Tcl_ReadChars(esPtr->channel,
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (size > 0) {
+ count += size;
+ /* We try again if there are more to read and we haven't
+ seen a newline at the end. */
+ if (size == full_size) {
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n')
+ continue;
+ }
+ }
+ else {
+ /* It is even trickier. We got an error from read. We have
+ to recover from it. Let's make sure the size of
+ buffer is correct. It can be corrupted. */
+ str = Tcl_GetString(esPtr->buffer);
+ Tcl_SetObjLength(esPtr->buffer, strlen(str));
+ }
+
+ break;
+ }
+
+ return count;
+}
+
/* returns # of bytes read or (non-positive) error of form EXP_XXX */
/* returns 0 for end of file */
/* If timeout is non-zero, set an alarm before doing the read, else assume */
@@ -1632,6 +1711,8 @@
{
int cc = EXP_TIMEOUT;
int size = expSizeGet(esPtr);
+ int full_size;
+ int count;
if (size + TCL_UTF_MAX >= esPtr->msize)
exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
@@ -1648,11 +1729,43 @@
}
#endif
-
+ /* FIXME: If we ask less than what is available in the tcl buffer
+ when tcl has seen EOF, we will throw away the remaining data
+ since the next read will get EOF. Since expect is line-oriented,
+ we exand our buffer to get EOF or the next newline at the end of
+ the input buffer. I don't know if it is the right fix. H.J. */
+ count = 0;
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
cc = Tcl_ReadChars(esPtr->channel,
- esPtr->buffer,
- esPtr->msize - (size / TCL_UTF_MAX),
- 1 /* append */);
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (cc > 0) {
+ count += cc;
+ /* It gets very tricky. There are more to read. We will expand
+ our buffer and get EOF or a newline at the end unless the
+ buffer length has been changed. */
+ if (cc == full_size) {
+ char *str;
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n') {
+ if (esPtr->umsize_changed) {
+ char buf[20]; /* big enough for 64bit int in hex. */
+ snprintf(buf,sizeof(buf),"0x%x", esPtr->umsize);
+ expDiagLogU("WARNING: interact buffer is not large enough to hold\r\n");
+ expDiagLogU("all output. probably your program is not interactive or\r\n");
+ expDiagLogU("has a very long output line. The current limit is ");
+ expDiagLogU(buf);
+ expDiagLogU(".\r\n");
+ }
+ else {
+ cc = expReadNewLine(interp,esPtr,save_flags);
+ if (cc > 0)
+ count += cc;
+ }
+ }
+ }
+ }
i_read_errno = errno;
#ifdef SIMPLE_EVENT
@@ -1673,7 +1786,7 @@
}
}
#endif
- return cc;
+ return count > 0 ? count : cc;
}
/*
@@ -2746,8 +2859,14 @@
return(TCL_ERROR);
}
- if (Default) exp_default_match_max = size;
- else esPtr->umsize = size;
+ if (Default) {
+ exp_default_match_max = size;
+ exp_default_match_max_changed = 1;
+ }
+ else {
+ esPtr->umsize = size;
+ esPtr->umsize_changed = 1;
+ }
return(TCL_OK);
}

View File

@@ -0,0 +1,43 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-09-24
Initial Package Version: 3.1.5
Upstream Status: From Upstream
Origin: http://lists.gnu.org/archive/html/bug-gnu-utils/2005-08/msg00047.html
Description: Fixes a bug which causes gawk to segfault when operating on a non-existent file.
diff -Naur gawk-3.1.5.orig/io.c gawk-3.1.5/io.c
--- gawk-3.1.5.orig/io.c 2005-07-26 18:07:43.000000000 +0000
+++ gawk-3.1.5/io.c 2005-09-24 14:43:13.771380264 +0000
@@ -2480,9 +2480,12 @@
{
struct stat sbuf;
struct open_hook *oh;
+ int iop_malloced = FALSE;
- if (iop == NULL)
+ if (iop == NULL) {
emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
+ iop_malloced = TRUE;
+ }
memset(iop, '\0', sizeof(IOBUF));
iop->flag = 0;
iop->fd = fd;
@@ -2495,7 +2498,8 @@
}
if (iop->fd == INVALID_HANDLE) {
- free(iop);
+ if (iop_malloced)
+ free(iop);
return NULL;
}
if (isatty(iop->fd))
@@ -2503,7 +2507,7 @@
iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf);
iop->sbuf = sbuf;
if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0)
- lintwarn(_("data file `%s' is empty"), name);
+ lintwarn(_("data file `%s' is empty"), name);
errno = 0;
iop->count = iop->scanoff = 0;
emalloc(iop->buf, char *, iop->size += 2, "iop_alloc");

View File

@@ -0,0 +1,336 @@
Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
Date: 2006-01-16
Initial Package Version: 4.0.0
Upstream Status: Not Sent - LFS Specfic
Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
the Pure LFS project.
More architectures added by Zack Winkles.
Further fine tunings by Greg Schafer.
Modified for gcc 3.3.2 by Oliver Brakmann.
Rediffed against gcc 3.4.0 by Zack Winkles.
Rediffed against gcc 3.4.3 by Jim Gifford.
Rediffed against gcc 4.0.0 by Robert Connolly.
Description: This patch modifies the location of the dynamic linker for
the GCC Pass 2 build in LFS Chapter 5.
diff -Naur gcc-20050116.orig/gcc/config/alpha/linux-elf.h gcc-20050116/gcc/config/alpha/linux-elf.h
--- gcc-20050116.orig/gcc/config/alpha/linux-elf.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/alpha/linux-elf.h 2005-01-17 00:46:14.560651027 +0000
@@ -27,7 +27,7 @@
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define ELF_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
diff -Naur gcc-20050116.orig/gcc/config/arm/linux-elf.h gcc-20050116/gcc/config/arm/linux-elf.h
--- gcc-20050116.orig/gcc/config/arm/linux-elf.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/arm/linux-elf.h 2005-01-17 00:46:50.538578614 +0000
@@ -87,7 +87,7 @@
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2} \
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
diff -Naur gcc-20050116.orig/gcc/config/frv/linux.h gcc-20050116/gcc/config/frv/linux.h
--- gcc-20050116.orig/gcc/config/frv/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/frv/linux.h 2005-01-17 01:33:50.600805260 +0000
@@ -41,7 +41,7 @@
%{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
%{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static}}"
/* Support for compile-time default CPU. */
diff -Naur gcc-20050116.orig/gcc/config/i386/gnu.h gcc-20050116/gcc/config/i386/gnu.h
--- gcc-20050116.orig/gcc/config/i386/gnu.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/gnu.h 2005-01-17 01:34:11.142021939 +0000
@@ -27,7 +27,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
%{static:-static}}"
#undef STARTFILE_SPEC
diff -Naur gcc-20050116.orig/gcc/config/i386/linux.h gcc-20050116/gcc/config/i386/linux.h
--- gcc-20050116.orig/gcc/config/i386/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/linux.h 2005-01-17 00:49:27.412667132 +0000
@@ -105,7 +105,7 @@
/* If ELF is the default format, we should not use /lib/elf. */
#define LINK_EMULATION "elf_i386"
-#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff -Naur gcc-20050116.orig/gcc/config/i386/linux64.h gcc-20050116/gcc/config/i386/linux64.h
--- gcc-20050116.orig/gcc/config/i386/linux64.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/linux64.h 2005-01-17 00:50:23.055094690 +0000
@@ -60,8 +60,8 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux-x86-64.so.2}}} \
%{static:-static}}"
#define MULTILIB_DEFAULTS { "m64" }
diff -Naur gcc-20050116.orig/gcc/config/ia64/linux.h gcc-20050116/gcc/config/ia64/linux.h
--- gcc-20050116.orig/gcc/config/ia64/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/ia64/linux.h 2005-01-17 00:50:43.146472133 +0000
@@ -43,7 +43,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux-ia64.so.2}} \
%{static:-static}}"
diff -Naur gcc-20050116.orig/gcc/config/linux.h gcc-20050116/gcc/config/linux.h
--- gcc-20050116.orig/gcc/config/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/linux.h 2005-01-17 00:51:14.101809663 +0000
@@ -104,3 +104,7 @@
#define TARGET_C99_FUNCTIONS 1
#define TARGET_HAS_F_SETLKW
+
+/* Remove /usr/include from the end of the include search path. */
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR 0
diff -Naur gcc-20050116.orig/gcc/config/m32r/linux.h gcc-20050116/gcc/config/m32r/linux.h
--- gcc-20050116.orig/gcc/config/m32r/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/m32r/linux.h 2005-01-17 00:51:39.720640870 +0000
@@ -66,7 +66,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
#else
#define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \
@@ -74,7 +74,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
#endif
diff -Naur gcc-20050116.orig/gcc/config/m68k/linux.h gcc-20050116/gcc/config/m68k/linux.h
--- gcc-20050116.orig/gcc/config/m68k/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/m68k/linux.h 2005-01-17 00:52:07.633830392 +0000
@@ -132,7 +132,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker /tools/lib/ld.so.1}} \
%{static}}"
/* For compatibility with linux/a.out */
diff -Naur gcc-20050116.orig/gcc/config/mips/linux.h gcc-20050116/gcc/config/mips/linux.h
--- gcc-20050116.orig/gcc/config/mips/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mips/linux.h 2005-01-17 00:52:28.348034505 +0000
@@ -115,7 +115,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}}"
#undef SUBTARGET_ASM_SPEC
diff -Naur gcc-20050116.orig/gcc/config/mips/linux64.h gcc-20050116/gcc/config/mips/linux64.h
--- gcc-20050116.orig/gcc/config/mips/linux64.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mips/linux64.h 2005-01-17 00:53:04.645878728 +0000
@@ -60,9 +60,9 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
- %{mabi=64: -dynamic-linker /lib64/ld.so.1} \
- %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
+ %{mabi=n32: -dynamic-linker /tools/lib32/ld.so.1} \
+ %{mabi=64: -dynamic-linker /tools/lib64/ld.so.1} \
+ %{mabi=32: -dynamic-linker /tools/lib/ld.so.1}}} \
%{static:-static}}} \
%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -Naur gcc-20050116.orig/gcc/config/mn10300/linux.h gcc-20050116/gcc/config/mn10300/linux.h
--- gcc-20050116.orig/gcc/config/mn10300/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mn10300/linux.h 2005-01-17 00:53:23.477610026 +0000
@@ -37,7 +37,7 @@
#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}"
#undef LIB_SPEC
diff -Naur gcc-20050116.orig/gcc/config/pa/pa-linux.h gcc-20050116/gcc/config/pa/pa-linux.h
--- gcc-20050116.orig/gcc/config/pa/pa-linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/pa/pa-linux.h 2005-01-17 00:53:45.334495141 +0000
@@ -88,7 +88,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */
diff -Naur gcc-20050116.orig/gcc/config/rs6000/linux64.h gcc-20050116/gcc/config/rs6000/linux64.h
--- gcc-20050116.orig/gcc/config/rs6000/linux64.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/rs6000/linux64.h 2005-01-17 00:54:28.524412534 +0000
@@ -351,11 +351,11 @@
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld64.so.1}}}"
#undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \
diff -Naur gcc-20050116.orig/gcc/config/rs6000/sysv4.h gcc-20050116/gcc/config/rs6000/sysv4.h
--- gcc-20050116.orig/gcc/config/rs6000/sysv4.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/rs6000/sysv4.h 2005-01-17 01:26:39.126999460 +0000
@@ -1131,7 +1131,7 @@
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
@@ -1162,7 +1162,7 @@
#define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
%{!undef: \
diff -Naur gcc-20050116.orig/gcc/config/s390/linux.h gcc-20050116/gcc/config/s390/linux.h
--- gcc-20050116.orig/gcc/config/s390/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/s390/linux.h 2005-01-17 01:26:58.672523211 +0000
@@ -86,8 +86,8 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{m31:-dynamic-linker /lib/ld.so.1} \
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
+ %{m31:-dynamic-linker /tools/lib/ld.so.1} \
+ %{m64:-dynamic-linker /tools/lib/ld64.so.1}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
diff -Naur gcc-20050116.orig/gcc/config/sh/linux.h gcc-20050116/gcc/config/sh/linux.h
--- gcc-20050116.orig/gcc/config/sh/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sh/linux.h 2005-01-17 01:27:19.588663163 +0000
@@ -70,7 +70,7 @@
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}"
#undef LIB_SPEC
diff -Naur gcc-20050116.orig/gcc/config/sparc/linux.h gcc-20050116/gcc/config/sparc/linux.h
--- gcc-20050116.orig/gcc/config/sparc/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sparc/linux.h 2005-01-17 01:30:07.282688639 +0000
@@ -131,13 +131,13 @@
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
diff -Naur gcc-20050116.orig/gcc/config/sparc/linux64.h gcc-20050116/gcc/config/sparc/linux64.h
--- gcc-20050116.orig/gcc/config/sparc/linux64.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sparc/linux64.h 2005-01-17 01:31:18.242712476 +0000
@@ -167,21 +167,21 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
%{static:-static}}} \
"
@@ -257,12 +257,12 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
%{static:-static}}} \
%{mlittle-endian:-EL} \
%{!mno-relax:%{!r:-relax}} \
diff -Naur gcc-20050116.orig/gcc/config/xtensa/linux.h gcc-20050116/gcc/config/xtensa/linux.h
--- gcc-20050116.orig/gcc/config/xtensa/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/xtensa/linux.h 2005-01-17 01:32:08.951429623 +0000
@@ -50,7 +50,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}}"
#undef LOCAL_LABEL_PREFIX

View File

@@ -0,0 +1,45 @@
Submitted By: Dan Nicholson <dnicholson at linuxfromscratch dot org>
Date: 2006-09-01
Initial Package Version: 2.3.6
Origin: udev-096, syscall functions generated by Alexander E. Patrakov
Upstream Status: Added to syscall list in 2.4
Description: Adds inotify syscall functions for use in userspace. Minimal
syscall functions borrowed from udev local implementation to
provide system inotify support.
Testcase: dovecot-1.0rc2, ./configure --with-notify=inotify
diff -pNur glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h
--- glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h 1970-01-01 00:00:00.000000000 +0000
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h 2006-08-01 05:48:27.000000000 +0000
@@ -0,0 +1,31 @@
+/*
+ * Inode based directory notification for Linux
+ *
+ * Copyright (C) 2005 John McCutchan
+ */
+
+#ifndef _SYS_INOTIFY_H
+#define _SYS_INOTIFY_H
+
+#include <stdint.h>
+#include <linux/inotify.h>
+#include <asm/unistd.h>
+
+extern long int syscall (long int __sysno, ...) __THROW;
+
+static inline int inotify_init(void)
+{
+ return syscall(__NR_inotify_init);
+}
+
+static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
+{
+ return syscall(__NR_inotify_add_watch, fd, name, mask);
+}
+
+static inline int inotify_rm_watch (int fd, uint32_t wd)
+{
+ return syscall(__NR_inotify_rm_watch, fd, wd);
+}
+
+#endif /* _SYS_INOTIFY_H */

View File

@@ -0,0 +1,33 @@
Submitted By: DJ Lucas <dj at linuxfromscratch dot org>
Date: 2006-04-05
Initial Package Version: 2.3.6
Upstream Status: Committed
Origin: Glibc CVS
Description: Fixes build errors where linux/types.h is included after sys/kd.h.
diff -Naur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h 2001-07-05 23:56:21.000000000 -0500
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h 2006-04-04 21:40:50.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,15 @@
/* Make sure the <linux/types.h> header is not loaded. */
#ifndef _LINUX_TYPES_H
-# define _LINUX_TYPES_H 1
+# define _LINUX_TYPES_H 1
+# define __undef_LINUX_TYPES_H
#endif
#include <linux/kd.h>
+#ifdef __undef_LINUX_TYPES_H
+# undef _LINUX_TYPES_H
+# undef __undef_LINUX_TYPES_H
+#endif
+
#endif /* sys/kd.h */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,63 @@
Submitted By: Matthew Burgess (matthew at linuxfromscratch dot org)
Origin: http://security.ubuntu.com/ubuntu/pool/main/g/gzip/gzip_1.3.5-9ubuntu3.1.diff.gz
Date: 2005-05-12
Initial package version: 1.3.5
Description: Fix two security vulnerabilities in gzip: A path traversal
bug when using the -N option (CAN-2005-1228) and a race condition in the
file permission restore code (CAN-2005-0998).
diff -Naur gzip-1.3.5.orig/gzip.c gzip-1.3.5/gzip.c
--- gzip-1.3.5.orig/gzip.c 2002-09-28 07:38:43.000000000 +0000
+++ gzip-1.3.5/gzip.c 2005-05-12 19:15:14.796031360 +0000
@@ -875,8 +875,11 @@
}
close(ifd);
- if (!to_stdout && close(ofd)) {
- write_error();
+ if (!to_stdout) {
+ /* Copy modes, times, ownership, and remove the input file */
+ copy_stat(&istat);
+ if (close(ofd))
+ write_error();
}
if (method == -1) {
if (!to_stdout) xunlink (ofname);
@@ -896,10 +899,6 @@
}
fprintf(stderr, "\n");
}
- /* Copy modes, times, ownership, and remove the input file */
- if (!to_stdout) {
- copy_stat(&istat);
- }
}
/* ========================================================================
@@ -1324,6 +1323,8 @@
error("corrupted input -- file name too large");
}
}
+ char *base2 = base_name (base);
+ strcpy(base, base2);
/* If necessary, adapt the name to local OS conventions: */
if (!list) {
MAKE_LEGAL_NAME(base);
@@ -1725,7 +1726,7 @@
reset_times(ofname, ifstat);
#endif
/* Copy the protection modes */
- if (chmod(ofname, ifstat->st_mode & 07777)) {
+ if (fchmod(ofd, ifstat->st_mode & 07777)) {
int e = errno;
WARN((stderr, "%s: ", progname));
if (!quiet) {
@@ -1734,7 +1735,7 @@
}
}
#ifndef NO_CHOWN
- chown(ofname, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */
+ fchown(ofd, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */
#endif
remove_ofname = 0;
/* It's now safe to remove the input file: */

View File

@@ -0,0 +1,225 @@
Submitted by: Alexander E. Patrakov
Date: 2005-12-07
Initial Package Version: 5.5
Upstream Status: Backport
Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
Description: Fixes the following bugs:
* memory leak in keyname()
* mishandling of overlapped wide characters, http://bugs.debian.org/316663
* problems with line-drawing characters on cygwin, http://bugs.debian.org/338234
* mishandling of EINTR in tcgetattr/tcsetattr, http://bugs.debian.org/339518
* mishandling of single-column multibyte characters, http://bugs.debian.org/341661
--- ncurses-5.5-20051015+/ncurses/base/MKkeyname.awk 2005-04-30 19:26:25.000000000 +0000
+++ ncurses-5.5-20051022/ncurses/base/MKkeyname.awk 2005-10-22 19:01:23.000000000 +0000
@@ -97,6 +97,7 @@
print " break;"
print " }"
print " }"
+ print " free(bound);"
print " if (result != 0)"
print " break;"
print " }"
--- ncurses-5.5-20051022+/ncurses/base/lib_addch.c 2005-03-27 16:52:16.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_addch.c 2005-10-30 00:51:36.000000000 +0000
@@ -315,7 +315,7 @@
* setup though.
*/
for (i = 0; i < len; ++i) {
- if (isWidecBase(win->_line[y].text[i])) {
+ if (isWidecBase(win->_line[y].text[x + i])) {
break;
} else if (isWidecExt(win->_line[y].text[x + i])) {
for (j = i; x + j <= win->_maxx; ++j) {
@@ -334,7 +334,9 @@
for (i = 0; i < len; ++i) {
NCURSES_CH_T value = ch;
SetWidecExt(value, i);
- TR(TRACE_VIRTPUT, ("multicolumn %d:%d", i + 1, len));
+ TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
+ i + 1, len,
+ win->_begy + y, win->_begx + x));
line->text[x] = value;
CHANGED_CELL(line, x);
++x;
--- ncurses-5.5-20051022+/ncurses/base/lib_bkgd.c 2005-04-16 18:03:48.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_bkgd.c 2005-10-30 00:41:09.000000000 +0000
@@ -131,11 +131,11 @@
for (y = 0; y <= win->_maxy; y++) {
for (x = 0; x <= win->_maxx; x++) {
- if (CharEq(win->_line[y].text[x], old_bkgrnd))
+ if (CharEq(win->_line[y].text[x], old_bkgrnd)) {
win->_line[y].text[x] = win->_nc_bkgd;
- else {
+ } else {
NCURSES_CH_T wch = win->_line[y].text[x];
- RemAttr(wch, (~A_ALTCHARSET));
+ RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT)));
win->_line[y].text[x] = _nc_render(win, wch);
}
}
--- ncurses-5.5-20051022+/ncurses/base/lib_erase.c 2001-12-19 01:06:13.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_erase.c 2005-10-30 00:36:36.000000000 +0000
@@ -58,6 +59,24 @@
start = win->_line[y].text;
end = &start[win->_maxx];
+ /*
+ * If this is a derived window, we have to handle the case where
+ * a multicolumn character extends into the window that we are
+ * erasing.
+ */
+ if_WIDEC({
+ if (isWidecExt(start[0])) {
+ int x = (win->_parent != 0) ? (win->_begx) : 0;
+ while (x-- > 0) {
+ if (isWidecBase(start[-1])) {
+ --start;
+ break;
+ }
+ --start;
+ }
+ }
+ });
+
for (sp = start; sp <= end; sp++)
*sp = blank;
--- ncurses-5.5-20051029+/misc/terminfo.src 2005-10-26 23:21:06.000000000 +0000
+++ ncurses-5.5-20051112/misc/terminfo.src 2005-11-12 23:01:03.000000000 +0000
@@ -4731,32 +4731,35 @@
# civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c
# ech [erase characters param] broken \E[%p1%dX
# kcbt [back-tab key] not implemented in cygwin? \E[Z
+#
+# 2005/11/12 -TD
+# Remove cbt since it does not work in current cygwin
+# Add 'mir' and 'in' flags based on tack
cygwin|ansi emulation for Cygwin,
- am, hs, in, msgr, xon,
+ am, hs, mir, msgr, xon,
colors#8, it#8, pairs#64,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
- bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M,
- cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
- cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
- cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
- dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G,
- home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@,
- ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m,
- kb2=\E[G, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
- kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
- kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
- kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
- kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
- kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
- kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
- knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m,
- rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m,
- rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m,
- rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7,
- setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD,
+ cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
+ cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+ cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
+ dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, home=\E[H,
+ hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, ich1=\E[@,
+ il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kb2=\E[G,
+ kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+ kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~,
+ kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
+ kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
+ kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D,
+ kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+ khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z,
+ nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
+ rmacs=\E[10m, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
+ rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R,
+ sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
- sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h,
- smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
+ sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h,
+ smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c,
vpa=\E[%i%p1%dd,
--- ncurses-5.5-20051112+/ncurses/tinfo/lib_ttyflags.c 2003-05-17 23:50:37.000000000 +0000
+++ ncurses-5.5-20051119/ncurses/tinfo/lib_ttyflags.c 2005-11-19 20:36:23.000000000 +0000
@@ -59,28 +59,51 @@
NCURSES_EXPORT(int)
_nc_get_tty_mode(TTY * buf)
{
- if (cur_term == 0
- || GET_TTY(cur_term->Filedes, buf) != 0) {
- memset(buf, 0, sizeof(*buf));
- return (ERR);
+ int result = OK;
+
+ if (cur_term == 0) {
+ result = ERR;
+ } else {
+ for (;;) {
+ if (GET_TTY(cur_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ result = ERR;
+ }
+ break;
+ }
}
+
+ if (result == ERR)
+ memset(buf, 0, sizeof(*buf));
+
TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
cur_term->Filedes, _nc_trace_ttymode(buf)));
- return (OK);
+ return (result);
}
NCURSES_EXPORT(int)
_nc_set_tty_mode(TTY * buf)
{
- if (cur_term == 0
- || SET_TTY(cur_term->Filedes, buf) != 0) {
- if ((errno == ENOTTY) && (SP != 0))
- SP->_notty = TRUE;
- return (ERR);
+ int result = OK;
+
+ if (cur_term == 0) {
+ result = ERR;
+ } else {
+ for (;;) {
+ if (SET_TTY(cur_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ if ((errno == ENOTTY) && (SP != 0))
+ SP->_notty = TRUE;
+ result = ERR;
+ }
+ break;
+ }
}
TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
cur_term->Filedes, _nc_trace_ttymode(buf)));
- return (OK);
+ return (result);
}
NCURSES_EXPORT(int)
--- ncurses-5.5-20051126+/ncurses/widechar/lib_ins_wch.c 2005-09-17 19:25:13.000000000 +0000
+++ ncurses-5.5-20051203/ncurses/widechar/lib_ins_wch.c 2005-12-03 20:24:19.000000000 +0000
@@ -117,7 +117,7 @@
for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
int len = wcwidth(*cp);
- if (len != 1) {
+ if (len != 1 || !is8bits(*cp)) {
cchar_t tmp_cchar;
wchar_t tmp_wchar = *cp;
memset(&tmp_cchar, 0, sizeof(tmp_cchar));

View File

@@ -0,0 +1,32 @@
Submitted By: Anderson Lizardo <andersonlizardo(at)yahoo(dot)com(dot)br>
Date: 2006-02-15
Initial Package Version: 5.8.8
Origin: based on current LFS-BOOK patch (perl-5.8.0-libc-2.patch)
Description: this patch adapts some hard-wired paths to the C library.
It uses the $prefix variable to locate the correct libc.
diff -Naur perl-5.8.8.orig/hints/linux.sh perl-5.8.8/hints/linux.sh
--- perl-5.8.8.orig/hints/linux.sh 2005-11-18 01:18:45.000000000 +0000
+++ perl-5.8.8/hints/linux.sh 2006-02-12 12:20:32.000000000 +0000
@@ -52,9 +52,9 @@
# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
# are insufficiently precise to distinguish things like
# libc-2.0.6 and libc-2.0.7.
-if test -L /lib/libc.so.6; then
- libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'`
- libc=/lib/$libc
+if test -L ${prefix}/lib/libc.so.6; then
+ libc=`ls -l ${prefix}/lib/libc.so.6 | awk '{print $NF}'`
+ libc=${prefix}/lib/$libc
fi
# Configure may fail to find lstat() since it's a static/inline
@@ -330,3 +330,8 @@
libswanted="$*"
;;
esac
+
+locincpth=""
+loclibpth=""
+glibpth="${prefix}/lib"
+usrinc="${prefix}/include"

View File

@@ -0,0 +1,25 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-07-15
Initial Package Version: 1.15.1
Upstream Status: From Upstream
Origin: Ryan Oliver
Description: Fixes a compilation problem with gcc-4.0.x that results in:
genfile.c:63: error: static declaration of 'argp_program_version' follows non-static declaration
../lib/argp.h:428: error: previous declaration of 'argp_program_version' was here
genfile.c:64: error: static declaration of 'argp_program_bug_address' follows non-static declaration
../lib/argp.h:444: error: previous declaration of 'argp_program_bug_address' was here
--- tar-1.15.1/tests/genfile.c-orig 2005-04-25 15:23:47.000000000 +1000
+++ tar-1.15.1/tests/genfile.c 2005-04-25 15:24:08.000000000 +1000
@@ -60,8 +60,8 @@
/* Block buffer for sparse file */
char *buffer;
-static const char *argp_program_version = "genfile (" PACKAGE ") " VERSION;
-static const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
+const char *argp_program_version = "genfile (" PACKAGE ") " VERSION;
+const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
static char doc[] = N_("genfile generates data files for GNU paxutils test suite");
static struct argp_option options[] = {

View File

@@ -0,0 +1,128 @@
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2006-04-14
Initial Package Version: 1.15.1
Origin: gentoo, backported from CVS, rediffed to apply with -p1
Description: addresses vulnerability CVE-2006-0300
diff -Naurp tar-1.15.1-vanilla/src/xheader.c tar-1.15.1/src/xheader.c
--- tar-1.15.1-vanilla/src/xheader.c 2004-09-06 12:31:14.000000000 +0100
+++ tar-1.15.1/src/xheader.c 2006-04-14 16:26:26.000000000 +0100
@@ -783,6 +783,32 @@ code_num (uintmax_t value, char const *k
xheader_print (xhdr, keyword, sbuf);
}
+static bool
+decode_num (uintmax_t *num, char const *arg, uintmax_t maxval,
+ char const *keyword)
+{
+ uintmax_t u;
+ char *arg_lim;
+
+ if (! (ISDIGIT (*arg)
+ && (errno = 0, u = strtoumax (arg, &arg_lim, 10), !*arg_lim)))
+ {
+ ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"),
+ keyword, arg));
+ return false;
+ }
+
+ if (! (u <= maxval && errno != ERANGE))
+ {
+ ERROR ((0, 0, _("Extended header %s=%s is out of range"),
+ keyword, arg));
+ return false;
+ }
+
+ *num = u;
+ return true;
+}
+
static void
dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)),
char const *keyword __attribute__ ((unused)),
@@ -821,7 +847,7 @@ static void
gid_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid"))
st->stat.st_gid = u;
}
@@ -903,7 +929,7 @@ static void
size_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size"))
st->archive_file_size = st->stat.st_size = u;
}
@@ -918,7 +944,7 @@ static void
uid_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid"))
st->stat.st_uid = u;
}
@@ -946,7 +972,7 @@ static void
sparse_size_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size"))
st->stat.st_size = u;
}
@@ -962,10 +988,10 @@ static void
sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks"))
{
st->sparse_map_size = u;
- st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0]));
+ st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]);
st->sparse_map_avail = 0;
}
}
@@ -982,8 +1008,14 @@ static void
sparse_offset_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset"))
+ {
+ if (st->sparse_map_avail < st->sparse_map_size)
st->sparse_map[st->sparse_map_avail].offset = u;
+ else
+ ERROR ((0, 0, _("Malformed extended header: excess %s=%s"),
+ "GNU.sparse.offset", arg));
+ }
}
static void
@@ -998,15 +1030,13 @@ static void
sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg)
{
uintmax_t u;
- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes"))
{
if (st->sparse_map_avail == st->sparse_map_size)
- {
- st->sparse_map_size *= 2;
- st->sparse_map = xrealloc (st->sparse_map,
- st->sparse_map_size
- * sizeof st->sparse_map[0]);
- }
+ st->sparse_map = x2nrealloc (st->sparse_map,
+ &st->sparse_map_size,
+ sizeof st->sparse_map[0]);
+
st->sparse_map[st->sparse_map_avail++].numbytes = u;
}
}

View File

@@ -0,0 +1,26 @@
Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2005-03-19
Initial Package Version: 1.15.1
Origin: Tar Bug Reports List
Upstream Status: Applied
Description: Fixes large file corruptions using option -S
http://lists.gnu.org/archive/html/bug-tar/2005-03/msg00004.html
--- tar-1.15.1/src/sparse.c.orig 2005-03-20 04:23:34.144506120 +0000
+++ tar-1.15.1/src/sparse.c 2005-03-20 04:23:56.842055568 +0000
@@ -1,6 +1,6 @@
/* Functions for dealing with sparse files
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -182,7 +182,7 @@
{
static char buffer[BLOCKSIZE];
size_t count;
- size_t offset = 0;
+ off_t offset = 0;
struct sp_array sp = {0, 0};
if (!lseek_or_error (file, 0, SEEK_SET))

View File

@@ -0,0 +1,44 @@
Submitted By: Alexander E. Patrakov
Date: 2005-07-12
Initial Package Version: 4.8
Upstream Status: Hack, won't submit
Origin: Alexander E. Patrakov
Description: Info assumes that a string width in character cells is the
same as its length in bytes. This patch avoids cases when this assumption
is not true.
diff -ur texinfo-4.8/info/info.c texinfo-4.8.hacked/info/info.c
--- texinfo-4.8/info/info.c 2004-04-11 23:56:45.000000000 +0600
+++ texinfo-4.8.hacked/info/info.c 2005-07-12 12:11:34.852485776 +0600
@@ -154,6 +154,10 @@
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
+ /* But don't use translated messages in the case when
+ string width and length can differ */
+ if (MB_CUR_MAX > 1)
+ setlocale(LC_MESSAGES, "C");
#endif
#ifdef ENABLE_NLS
diff -ur texinfo-4.8/info/man.c texinfo-4.8.hacked/info/man.c
--- texinfo-4.8/info/man.c 2004-04-11 23:56:46.000000000 +0600
+++ texinfo-4.8.hacked/info/man.c 2005-07-12 12:08:40.267026800 +0600
@@ -325,6 +325,17 @@
freopen (NULL_DEVICE, "r", stdin);
dup2 (pipes[1], fileno (stdout));
+ if (MB_CUR_MAX > 1)
+ {
+ /* Info has trouble wrapping man output if it contains
+ multibyte characters */
+ setenv("LANGUAGE", "C", 1);
+ setenv("LANG", "C", 1);
+ setenv("LC_MESSAGES", "C", 1);
+ setenv("LC_CTYPE", "C", 1);
+ setenv("LC_ALL", "C", 1);
+ }
+
execv (formatter_args[0], formatter_args);
/* If we get here, we couldn't exec, so close out the pipe and

View File

@@ -0,0 +1,80 @@
Updated By: Bruce Dubbs (bdubbs -aT- linuxfromscratch -DoT- org)
Date: 2005-12-12
Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org)
Date: 2005-10-08
Initial Package Version: 4.8
Origin: http://gentoo.kems.net/gentoo-portage/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch
Upstream Status: A few patches are floating around in Debian BZ #328365 of which
upstream hasn't made a full commitment on yet.
Description: (CAN-2005-3011) texindex in texinfo 4.8 and earlier allows local
users to overwrite arbitrary files via a symlink attack on
temporary files.
Update: Changed to not pass a constant string to mktemp().
diff -Naur texinfo-4.8.orig/util/texindex.c texinfo-4.8/util/texindex.c
--- texinfo-4.8.orig/util/texindex.c 2005-12-11 23:29:08.000000000 -0600
+++ texinfo-4.8/util/texindex.c 2005-12-11 23:33:31.000000000 -0600
@@ -99,6 +99,9 @@
/* Directory to use for temporary files. On Unix, it ends with a slash. */
char *tempdir;
+/* Basename for temp files inside of tempdir. */
+char *tempbase;
+
/* Number of last temporary file. */
int tempcount;
@@ -153,6 +156,7 @@
main (int argc, char **argv)
{
int i;
+ char template[]="txidxXXXXXX";
tempcount = 0;
last_deleted_tempcount = 0;
@@ -190,6 +194,11 @@
decode_command (argc, argv);
+ /* XXX mkstemp not appropriate, as we need to have somewhat predictable
+ * names. But race condition was fixed, see maketempname.
+ */
+ tempbase = mktemp (template);
+
/* Process input files completely, one by one. */
for (i = 0; i < num_infiles; i++)
@@ -389,21 +398,21 @@
static char *
maketempname (int count)
{
- static char *tempbase = NULL;
char tempsuffix[10];
-
- if (!tempbase)
- {
- int fd;
- tempbase = concat (tempdir, "txidxXXXXXX");
-
- fd = mkstemp (tempbase);
- if (fd == -1)
- pfatal_with_name (tempbase);
- }
+ char *name, *tmp_name;
+ int fd;
sprintf (tempsuffix, ".%d", count);
- return concat (tempbase, tempsuffix);
+ tmp_name = concat (tempdir, tempbase);
+ name = concat (tmp_name, tempsuffix);
+ free(tmp_name);
+
+ fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0600);
+ if (fd == -1)
+ pfatal_with_name (name);
+
+ close(fd);
+ return name;
}

View File

@@ -0,0 +1,93 @@
Submitted by: Jeremy Utley <jeremy@linuxfromscratch.org>
Date: 2004-12-25
Initial Package Version: 2.12p (should apply to versions back to at least k)
Upstream Status: Not Submitted - Test Version
Origin: Alexander Patrakov, adapted from debian build of cramfs utilities
Description: Util-Linux fails in cramfs compilation due to changes in the
linux-libc-headers package 2.6.9 and after. This patch is a proper fix to the
problem, but may in fact not be accepted upstream.
diff -Naur util-linux-2.12p/disk-utils/fsck.cramfs.c util-linux-2.12p-new/disk-utils/fsck.cramfs.c
--- util-linux-2.12p/disk-utils/fsck.cramfs.c 2004-12-11 14:53:16.000000000 +0000
+++ util-linux-2.12p-new/disk-utils/fsck.cramfs.c 2004-12-26 00:53:10.665199086 +0000
@@ -76,16 +76,7 @@
#define PAD_SIZE 512
-#include <asm/page.h>
-#ifdef PAGE_SIZE
-#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
-#elif defined __ia64__
-#define PAGE_CACHE_SIZE (16384)
-#elif defined __alpha__
-#define PAGE_CACHE_SIZE (8192)
-#else
-#define PAGE_CACHE_SIZE (4096)
-#endif
+#define PAGE_CACHE_SIZE page_size
/* Guarantee access to at least 8kB at a time */
#define ROMBUFFER_BITS 13
@@ -95,11 +86,13 @@
static unsigned long read_buffer_block = ~0UL;
/* Uncompressing data structures... */
-static char outbuffer[PAGE_CACHE_SIZE*2];
+static char *outbuffer;
z_stream stream;
#endif /* INCLUDE_FS_TESTS */
+static size_t page_size;
+
/* Input status of 0 to print help and exit without an error. */
static void usage(int status)
{
@@ -464,9 +457,17 @@
int c; /* for getopt */
int start = 0;
+ page_size = sysconf(_SC_PAGESIZE);
+
if (argc)
progname = argv[0];
+ outbuffer = malloc(page_size * 2);
+ if (!outbuffer) {
+ fprintf(stderr, _("failed to allocate outbuffer\n"));
+ exit(8);
+ }
+
/* command line options */
while ((c = getopt(argc, argv, "hx:v")) != EOF) {
switch (c) {
diff -Naur util-linux-2.12p/disk-utils/mkfs.cramfs.c util-linux-2.12p-new/disk-utils/mkfs.cramfs.c
--- util-linux-2.12p/disk-utils/mkfs.cramfs.c 2004-12-11 14:56:01.000000000 +0000
+++ util-linux-2.12p-new/disk-utils/mkfs.cramfs.c 2004-12-26 00:53:10.666198928 +0000
@@ -46,16 +46,8 @@
static const char *progname = "mkcramfs";
static int verbose = 0;
-#ifdef __ia64__
-#define PAGE_CACHE_SIZE (16384)
-#elif defined __alpha__
-#define PAGE_CACHE_SIZE (8192)
-#else
-#define PAGE_CACHE_SIZE (4096)
-#endif
-
/* The kernel assumes PAGE_CACHE_SIZE as block size. */
-static unsigned int blksize = PAGE_CACHE_SIZE; /* settable via -b option */
+static unsigned int blksize; /* settable via -b option */
static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */
static int image_length = 0;
@@ -730,6 +722,7 @@
u32 crc = crc32(0L, Z_NULL, 0);
int c;
+ blksize = sysconf(_SC_PAGESIZE);
total_blocks = 0;
if (argc) {

9
src/scripts/langcache Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
#
# IPFire SCRIPTs
#
# This code is distributed under the terms of the GPL
#
# (C) Benedikt Correll for IPFire
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"

View File

@@ -1,6 +0,0 @@
#!/bin/bash
#
# IPFire! GPLv2
#
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"

52
tools/version-check.sh Normal file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Einfaches Skript zum Auflisten der Versionsnummern wichtiger Werkzeuge
echo "BENOETIGT - VORHANDEN"
echo -n "Bash-2.05a - "
bash --version | head -n1 | cut -d" " -f2-4
echo -n "Binutils-2.12 - "
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-4
echo -n "Bzip2-1.0.2 - "
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils-5.0 - "
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
echo -n "Diffutils-2.8 - "
diff --version | head -n1
echo -n "Findutils-4.1.20 - "
find --version | head -n1
echo -n "Gawk-3.0 - "
gawk --version | head -n1
echo -n "Gcc-2.95.3 - "
gcc --version | head -n1
echo -n "Glibc-2.2.5 - "
/lib/libc.so.6 | head -n1 | cut -d" " -f1-7
echo -n "Grep-2.5 - "
grep --version | head -n1
echo -n "Gzip-1.2.4 - "
gzip --version | head -n1
echo -n "Linux-Kernel-2.6 - "
cat /proc/version | head -n1 | cut -d" " -f1-3,5-7
echo -n "Make-3.79.1 - "
make --version | head -n1
echo -n "Patch-2.5.4 - "
patch --version | head -n1
echo -n "Sed-3.0.2 - "
sed --version | head -n1
echo -n "Tar-1.14 - "
tar --version | head -n1