Zwischencommit beim Umzug auf LFS 6.2.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@299 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-10-01 10:51:18 +00:00
parent 15679d9f96
commit 9b0ff0a0b6
57 changed files with 22590 additions and 24525 deletions

View File

@@ -1,5 +1,5 @@
#
# $Id: inittab,v 1.6.2.1 2006/01/24 15:25:35 franck78 Exp $
# IPFire inittab
#
id:3:initdefault:
@@ -9,15 +9,17 @@ l6:6:wait:/etc/rc.d/rc.halt reboot
si::sysinit:/etc/rc.d/rc.sysinit
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -r now
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S016:once:/sbin/sulogin
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
1:2345:respawn:/sbin/agetty tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600
# Going single user mode for maintenance
xx:S1:respawn:/bin/bash

View File

@@ -29,7 +29,7 @@ include Config
VER = 2.59
THISAPP = autoconf-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -41,7 +41,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = d4d45eaa1769d45e59dcb131a4af17a0
$(DL_FILE)_MD5 = 1ee40f7a676b3cfdc0e3f7cd81551b5f
install : $(TARGET)
@@ -72,7 +72,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -26,10 +26,10 @@
include Config
VER = 1.8.4
VER = 1.9.6
THISAPP = automake-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0875b1d44c584decfd0afa60a2381b9d
$(DL_FILE)_MD5 = c11b8100bb311492d8220378fd8bf9e0
install : $(TARGET)
@@ -71,10 +71,9 @@ $(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) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
ln -sf automake-1.7 /usr/share/automake
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -44,7 +44,8 @@ ifeq "$(ROOT)" ""
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools --without-bash-malloc --disable-nls
EXTRA_CONFIG = --prefix=/tools --without-bash-malloc \
--disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
endif
@@ -87,7 +88,7 @@ $(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_SRC)/src/patches/bash-3.1-fixes-8.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-fixes-8.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install

View File

@@ -72,11 +72,11 @@ $(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_SRC)/src/patches/db-4.4.20-fixes-1.patch
cd $(DIR_APP)/build_unix && ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx
cd $(DIR_APP)/build_unix && make
cd $(DIR_APP)/build_unix && make $(MAKETUNING)
cd $(DIR_APP)/build_unix && make docdir=/usr/share/doc/$(THISAPP) install
chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db*
# chown -v root:root /usr/bin/berkeley_db_svc
chown -v -R root:root /usr/share/doc/$(THISAPP)
chown -Rv root:root /usr/share/doc/$(THISAPP)
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -26,47 +26,23 @@
include Config
VER = 1.875
VER = 2.2
THISAPP = bison-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --disable-nls
EXTRA_LDFLAGS =
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
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS =
EXTRA_MAKE =
EXTRA_INSTALL =
endif
endif
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects =$(DL_FILE) $(THISAPP)-attribute-1.patch
objects =$(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(THISAPP)-attribute-1.patch = $(URL_LFS)/bison/$(THISAPP)-attribute-1.patch
$(DL_FILE)_MD5 = 278515c1195194cad633bf40c892f512
$(THISAPP)-attribute-1.patch_MD5 = 599a35b0a76fc4335e640389acdaffbe
install : $(TARGET)
@@ -96,9 +72,10 @@ $(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)-attribute-1.patch
cd $(DIR_APP) && LDFLAGS="$(EXTRA_LDFLAGS)" ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
# Disable NLS
#cd $(DIR_APP) && echo '#define YYENABLE_NLS 1' >> config.h
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -44,13 +44,12 @@ endif
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE) bzip2-1.0.2-use_mktemp-1.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
bzip2-1.0.2-use_mktemp-1.patch = $(URL_LFS)/bzip2/bzip2-1.0.2-use_mktemp-1.patch
$(DL_FILE)_MD5 = 8a716bebecb6e647d2e8a29ea5d8447f
bzip2-1.0.2-use_mktemp-1.patch_MD5 = d8f29ca8b25c48e16dc2f7a093df21ef
install : $(TARGET)
@@ -80,13 +79,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_SRC)/src/patches/bzip2-1.0.3-bzgrep_security-1.patch
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-bzgrep_security-1.patch
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 $(MAKETUNING)
cd $(DIR_APP) && make install
cp -v bzip2-shared /bin/bzip2
cp -av libbz2.so* /lib
@@ -95,8 +93,7 @@ ifeq "$(ROOT)" ""
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 $(MAKETUNING)
cd $(DIR_APP) && make PREFIX=/tools install
endif
@rm -rf $(DIR_APP)

View File

@@ -29,7 +29,7 @@ include Config
VER = ipfire
THISAPP = cleanup-toolchain
TARGET = $(DIR_INFO)/$(THISAPP)-tools
TARGET = $(DIR_INFO)/$(THISAPP)-$(PASS)-tools
###############################################################################
# Top-level Rules
@@ -51,8 +51,35 @@ md5 :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
ifeq "$(PASS)" "1"
cp -v /tools/bin/{ld,ld-old.bak}
mv -v /tools/bin/{ld,ld-old}
cp -v /tools/i686-pc-linux-gnu/bin/{ld,ld-old.bak}
mv -v /tools/i686-pc-linux-gnu/bin/{ld,ld-old}
cp -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/i686-pc-linux-gnu/bin/ld
/tools/bin/gcc -dumpspecs > /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/specs
sed 's@^/lib/ld-linux.so.2@/tools&@g' /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/specs > tempspecfile
mv -vf tempspecfile /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/specs
GCC_INCLUDEDIR=/tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include
find /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
rm -vf `grep -l "DO NOT EDIT THIS FILE" /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/*`
endif
ifeq "$(PASS)" "2"
### I have to check if this really works
-strip --strip-debug /tools/lib/*
-strip --strip-unneeded /tools/{,s}bin/*
rm -rfv /tools/{info,man}
rm -rfv /tools/{info,man} /usr/local/man
chown -R root:root /tools
endif
ifeq "$(PASS)" "3"
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/i686-pc-linux-gnu/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/i686-pc-linux-gnu/bin/ld
gcc -dumpspecs | \
perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \
-e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \
`dirname $(gcc --print-libgcc-file-name)`/specs
endif
@$(POSTBUILD)

View File

@@ -85,12 +85,13 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
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
endif
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install

View File

@@ -85,6 +85,10 @@ $(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_SRC)/src/patches/$(THISAPP)-i18n-1.patch
cd $(DIR_APP) && touch man/diff.1
endif
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install

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: e2fsprogs,v 1.7.2.4 2005/02/05 15:38:14 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,13 +26,13 @@
include Config
VER = 1.35
VER = 1.39
THISAPP = e2fsprogs-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_SFNET)/e2fsprogs
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(LFS_PASS)" "install"
ifeq "$(PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
else
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -52,7 +46,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 8d25ffd60d405ef32d341704a2323807
$(DL_FILE)_MD5 = 06f7806782e357797fad1d34b7ced0c6
install : $(TARGET)
@@ -82,7 +76,7 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/e2fsprogs-build && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
ifeq "$(LFS_PASS)" "install"
ifeq "$(PASS)" "install"
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-install.patch
-mkdir -p /install/misc/bin
cd $(DIR_APP) && CFLAGS="-Os -fomit-frame-pointer" ./configure --disable-nls
@@ -90,20 +84,20 @@ ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && make lib/blkid/blkid_types.h
cd $(DIR_APP) && make lib/ext2fs/ext2_types.h
cd $(DIR_APP) && make lib/uuid/uuid_types.h
cd $(DIR_APP)/lib/blkid && make
cd $(DIR_APP)/lib/et && make
cd $(DIR_APP)/lib/ext2fs && make
cd $(DIR_APP)/lib/e2p && make
cd $(DIR_APP)/lib/uuid && make
cd $(DIR_APP)/misc && make mke2fs
cd $(DIR_APP)/lib/blkid && make $(MAKETUNING)
cd $(DIR_APP)/lib/et && make $(MAKETUNING)
cd $(DIR_APP)/lib/ext2fs && make $(MAKETUNING)
cd $(DIR_APP)/lib/e2p && make $(MAKETUNING)
cd $(DIR_APP)/lib/uuid && make $(MAKETUNING)
cd $(DIR_APP)/misc && make $(MAKETUNING) mke2fs
cd $(DIR_APP) && install -m 0755 misc/mke2fs /install/misc/bin
else
cd $(DIR_SRC) && mkdir e2fsprogs-build
cd $(DIR_SRC)/e2fsprogs-build && $(DIR_APP)/configure --prefix=/usr --disable-nls \
--with-root-prefix="" --enable-elf-shlibs --disable-evms
cd $(DIR_SRC)/e2fsprogs-build && make
cd $(DIR_SRC)/e2fsprogs-build && make install
cd $(DIR_SRC)/e2fsprogs-build && make install-libs
cd $(DIR_SRC) && mkdir build
cd $(DIR_SRC)/build && $(DIR_APP)/configure --prefix=/usr --with-root-prefix="" \
--enable-elf-shlibs --disable-evms --disable-nls
cd $(DIR_SRC)/build && make $(MAKETUNING)
cd $(DIR_SRC)/build && make install
cd $(DIR_SRC)/build && make install-libs
endif
@rm -rf $(DIR_APP) $(DIR_SRC)/e2fsprogs-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: file,v 1.3.2.8 2005/10/18 21:30:32 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 4.16
VER = 4.17
THISAPP = file-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = ftp://ftp.astron.com/pub/file
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 9bc5a7017ab7bd544f288fd931ec741a
$(DL_FILE)_MD5 = 50919c65e0181423d66bb25d7fe7b0fd
install : $(TARGET)
@@ -79,7 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make 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: flex,v 1.4.2.5 2005/02/05 15:38:14 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,36 +26,13 @@
include Config
VER = 2.5.4a
VER = 2.5.33
THISAPP = flex-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/non-gnu/flex
DIR_APP = $(DIR_SRC)/flex-2.5.4
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr --disable-nls
EXTRA_LDFLAGS =
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
EXTRA_CONFIG = --prefix=/tools --disable-nls
EXTRA_LDFLAGS =
EXTRA_MAKE =
EXTRA_INSTALL =
endif
endif
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
@@ -71,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = bd8753d0b22e1f4ec87a553a73021adf
$(DL_FILE)_MD5 = 343374a00b38d9e39d1158b71af37150
install : $(TARGET)
@@ -101,11 +72,11 @@ $(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) && LDFLAGS="$(EXTRA_LDFLAGS)" ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
ln -sf libfl.a /usr/lib/libl.a
ln -sv libfl.a /usr/lib/libl.a
echo "#!/bin/sh" > /usr/bin/lex
echo "exec /usr/bin/flex -l \"\$$@\"" >> /usr/bin/lex
chmod 755 /usr/bin/lex

View File

@@ -53,9 +53,9 @@ endif
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 5703f72d0eea1d463f735aad8222655f
$(DL_FILE)_MD5 = 5703f72d0eea1d463f735aad8222655f
install : $(TARGET)
@@ -85,7 +85,9 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-segfault_fix-1.patch
endif
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
cd $(DIR_APP) && echo "#define HAVE_LC_MESSAGES 1" >> config.h

20
lfs/gcc
View File

@@ -40,9 +40,10 @@ CXXFLAGS =
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr \
--enable-shared --enable-threads=posix \
--enable-__cxa_atexit --enable-clocale=gnu \
--enable-languages=c,c++ --disable-nls
--libexecdir=/usr/lib --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --enable-languages=c,c++ \
--disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
else
@@ -104,19 +105,28 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@mkdir $(DIR_SRC)/gcc-build
ifeq "$(ROOT)" ""
cd $(DIR_APP) && sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
#cd $(DIR_APP) && sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
cd $(DIR_APP) && sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
cd $(DIR_APP) && sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in
cd $(DIR_SRC)/gcc-build && /bin/bash $(DIR_APP)/configure $(EXTRA_CONFIG)
cd $(DIR_SRC)/gcc-build && make $(MAKETUNING)
cd $(DIR_SRC)/gcc-build && make install
ln -sfv ../usr/bin/cpp /lib
ln -sfv gcc /usr/bin/cc
else
ifeq "$(PASS)" "1"
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
ln -vs gcc /tools/bin/cc
ln -sfv gcc /tools/bin/cc
else
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_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-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

View File

@@ -97,14 +97,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@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
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-linux_types-1.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-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
endif
cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
touch /etc/ld.so.conf
cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
@@ -120,17 +122,9 @@ endif
# Creating the locales
ifeq "$(ROOT)" ""
mkdir -p /usr/lib/locale
else
mkdir -p /tools/lib/locale
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)" ""
cp -f /usr/share/zoneinfo/GMT /etc/localtime
cp -f /usr/share/zoneinfo/GMT /etc/localtime
endif
# Cleanup
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
@$(POSTBUILD)

View File

@@ -86,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)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-redhat_fixes-2.patch
cd $(DIR_APP) && chmod +x tests/fmbtest.sh
endif
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install

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: groff,v 1.3.2.2 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 1.19
VER = 1.18.1.1
THISAPP = groff-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/groff
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = c12bf574120df33ec8c18d92703e099e
$(DL_FILE)_MD5 = 511dbd64b67548c99805f1521f82cc5e
install : $(TARGET)
@@ -78,11 +72,13 @@ $(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) && PAGE=letter ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-debian_fixes-1.patch
cd $(DIR_APP) && sed -i -e 's/2010/002D/' -e 's/2212/002D/' \
-e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.proto
cd $(DIR_APP) && PAGE=A4 ./configure --prefix=/usr --enable-multibyte --disable-nls
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
ln -sf soelim /usr/bin/zsoelim
ln -sf eqn /usr/bin/geqn
ln -sf tbl /usr/bin/gtbl
ln -sv eqn /usr/bin/geqn
ln -sv tbl /usr/bin/gtbl
@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: grub,v 1.9.2.9 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,7 +26,6 @@
include Config
#VER = 0.95
VER = 0.97
THISAPP = grub-$(VER)
@@ -81,8 +74,8 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
# Patch SuSE 10.2
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.97-disk_geometry-1.patch
### WHICH ONE OF THESE PATCHES DO WE REALLY NEED? CAN WE DELETE ANY?
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.97/grub-0.97-path-patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/grub-0.97/use_ferror.diff
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.97/grub-R
@@ -101,24 +94,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && autoreconf --install --force
cd $(DIR_APP) && CFLAGS="-0s -fno-stack-protector" \
STAGE2_CFLAGS="-0s -fno-stack-protector" \
./configure --prefix=/usr --datadir=/usr/share \
--disable-rtl8139 \
--disable-auto-linux-mem-opt \
--disable-ne \
--disable-nls \
--disable-fat \
--disable-ffs \
--disable-minix \
--disable-reiserfs \
--disable-vstafs \
--disable-jfs \
--disable-xfs
cd $(DIR_APP) && make
./configure --prefix=/usr
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
# grub files
mkdir -p /boot/grub
mkdir -vp /boot/grub
cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub
for i in $(DIR_SRC)/config/grub/*; do \
[ -f $$i ] && cp -f $$i /boot/grub; \
done

View File

@@ -85,7 +85,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_SRC)/src/patches/gzip-1.3.5-security_fixes-1.patch
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-security_fixes-1.patch
endif
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && sed -i 's@"BINDIR"@/bin@g' gzexe.in

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: iana-etc,v 1.1.2.5 2006/02/02 14:23:24 franck78 Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 2.00
VER = 2.10
THISAPP = iana-etc-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = http://www.sethwklein.net/projects/iana-etc/downloads
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 880842cd24c219241ceef7f8de442d82
$(DL_FILE)_MD5 = 53dea53262b281322143c744ca60ffbb
install : $(TARGET)

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: inetutils,v 1.3.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 1.4.2
THISAPP = inetutils-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_GNU)/inetutils
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -78,13 +72,14 @@ $(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_SRC)/src/patches/$(THISAPP)-ping-1.patch
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls --disable-syslogd \
--libexecdir=/usr/sbin --disable-logger \
--sysconfdir=/etc --localstatedir=/var \
--disable-whois --disable-servers
cd $(DIR_APP) && make
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-gcc4_fixes-3.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-no_server_man_pages-1.patch
cd $(DIR_APP) && ./configure --prefix=/usr --libexecdir=/usr/sbin \
--sysconfdir=/etc --localstatedir=/var \
--disable-logger --disable-syslogd \
--disable-whois --disable-servers
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
mv -f /usr/bin/ping /bin
mv -v /usr/bin/ping /bin
@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: iproute2,v 1.6.2.4 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 2.4.7-now-ss010824
VER = 2.6.16-060323
THISAPP = iproute2-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = ftp://ftp.funet.fi/pub/mirrors/ftp.inr.ac.ru/ip-routing
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/iproute2
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -46,9 +40,9 @@ TARGET = $(DIR_INFO)/$(THISAPP)
objects = $(DL_FILE) htb3.6-020525.tgz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
htb3.6-020525.tgz = http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz
htb3.6-020525.tgz = $(DL_FROM)/htb3.6-020525.tgz
$(DL_FILE)_MD5 = b05a4e375d9468be3a1dd3f0e83daee8
$(DL_FILE)_MD5 = f31d4516b35bbfeaa72c762f5959e97c
htb3.6-020525.tgz_MD5 = 3064fd8642ce6a7e155a29c5205b99d4
install : $(TARGET)
@@ -81,10 +75,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && tar xfz $(DIR_DL)/htb3.6-020525.tgz *.diff
cd $(DIR_APP) && for i in htb3*tc.diff ; do patch -Np1 < $$i; done
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/iproute2-includes.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/iproute2-2.4.7-netlink.patch
cd $(DIR_APP) && sed -i -e 's/-Werror//' Makefile
cd $(DIR_APP) && make
cd $(DIR_APP) && install -m 0755 ip/ip ip/rtmon tc/tc /sbin
cd $(DIR_APP) && make $(MAKETUNING) SBINDIR=/sbin
cd $(DIR_APP) && make SBINDIR=/sbin install
cd $(DIR_APP) && mv -v /sbin/arpd /usr/sbin
@rm -rf $(DIR_APP)
@$(POSTBUILD)

23
lfs/kbd
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: kbd,v 1.5.2.10 2005/10/03 22:49:44 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,9 +30,9 @@ VER = 1.12
THISAPP = kbd-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_KERNEL)/linux/utils/kbd
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(LFS_PASS)" "install"
ifeq "$(PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
else
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -83,10 +77,9 @@ $(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)-more-programs-1.patch
# copy patched Vietnamese font
cd $(DIR_APP) && cp -f $(DIR_SRC)/src/patches/viscii10-8x16-new.psfu data/consolefonts/viscii10-8x16.psfu
ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-backspace-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-gcc4_fixes-1.patch
ifeq "$(PASS)" "install"
cd $(DIR_APP) && CFLAGS="-Os -fomit-frame-pointer" CC=/usr/bin/gcc ./configure --disable-nls
cd $(DIR_APP)/src && make CFLAGS="-Os -fomit-frame-pointer" DATA_DIR=/lib/kbd BINDIR=/bin setfont kbd_mode dumpkeys loadkeys loadunimap showconsolefont
cd $(DIR_APP)/src && install -m 0755 setfont loadunimap kbd_mode dumpkeys loadkeys showconsolefont unicode_start unicode_stop /install/initrd/bin
@@ -96,11 +89,11 @@ ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && install -m 0644 data/consolefonts/lat2-16.psfu /install/initrd/lib/kbd/consolefonts
cd $(DIR_APP) && install -m 0644 data/consolefonts/lat5-16.psfu /install/initrd/lib/kbd/consolefonts
cd $(DIR_APP) && install -m 0644 data/consolefonts/iso07u-16.psfu /install/initrd/lib/kbd/consolefonts
cd $(DIR_APP) && install -m 0644 data/consolefonts/viscii10-8x16.psfu /install/initrd/lib/kbd/consolefonts
else
cd $(DIR_APP) && ./configure --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && ./configure --datadir=/lib/kbd --disable-nls
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
mv -v /usr/bin/{kbd_mode,openvt,setfont} /bin
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: less,v 1.3.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 382
VER = 394
THISAPP = less-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = http://www.greenwoodsoftware.com/less
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 103fe4aef6297b93f0f73f38cc3b1bd7
$(DL_FILE)_MD5 = a9f072ccefa0d315b325f3e9cdbd4b97
install : $(TARGET)
@@ -78,8 +72,8 @@ $(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) && ./configure --prefix=/usr --disable-nls --bindir=/bin --sysconfdir=/etc
cd $(DIR_APP) && make
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc --disable-nls
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make 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: libtool,v 1.3.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,12 +26,11 @@
include Config
VER = 1.5.6
VER = 1.5.22
THISAPP = libtool-$(VER)
DL_FILE = $(THISAPP).tar.bz2
#DL_FROM = $(URL_GNU)/libtool
DL_FROM = $(URL_LFS_FTP)
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -49,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 31d49196d0ab276453c44905e34c40aa
$(DL_FILE)_MD5 = 8e0ac9797b62ba4dcc8a2fb7936412b0
install : $(TARGET)
@@ -80,7 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -77,7 +77,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-inotify-3.patch
cd $(DIR_APP) && install -dv /usr/include/asm
cd $(DIR_APP) && cp -Rv include/asm-i386/* /usr/include/asm
cd $(DIR_APP) && cp -Rv include/linux /usr/include
cd $(DIR_APP) && chown -Rv root:root /usr/include/{asm,linux}
cd $(DIR_APP) && find /usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
cd $(DIR_APP) && find /usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;
else
cd $(DIR_APP) && cp -Rv include/asm-i386 /tools/include/asm
cd $(DIR_APP) && cp -Rv include/linux /tools/include

32
lfs/man
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: man,v 1.4.2.5 2005/07/05 15:11:12 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 1.5p
VER = 2.4.3
THISAPP = man-$(VER)
THISAPP = man-db-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_KERNEL)/linux/utils/man
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -44,14 +38,11 @@ TARGET = $(DIR_INFO)/$(THISAPP)
# Top-level Rules
###############################################################################
objects = $(DL_FILE) \
man-1.5m2-pager-1.patch
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
man-1.5m2-pager-1.patch = http://www.linuxfromscratch.org/patches/downloads/man/man-1.5m2-pager-1.patch
$(DL_FILE)_MD5 = 037d5644f8ef9ea0ef22b271bae0297d
man-1.5m2-pager-1.patch_MD5 = e5ffe77f8ce0115dcf4b498ed0b6e8ca
install : $(TARGET)
@@ -81,9 +72,18 @@ $(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)/man-1.5m2-pager-1.patch
cd $(DIR_APP) && ./configure -default -confdir=/etc +lang none
cd $(DIR_APP) && make CFLAGS="-fno-stack-protector"
cd $(DIR_APP) && mv man/de{_DE.88591,}
cd $(DIR_APP) && mv man/es{_ES.88591,}
cd $(DIR_APP) && mv man/it{_IT.88591,}
cd $(DIR_APP) && mv man/ja{_JP.eucJP,}
cd $(DIR_APP) && sed -i 's,\*_\*,??,' man/Makefile.in
cd $(DIR_APP) && sed -i '/\t\/usr\/man/d' src/man_db.conf.in
cd $(DIR_APP) && echo -e "#define WEB_BROWSER \"exec /usr/bin/lynx\"" >> include/manconfig.h.in
cd $(DIR_APP) && echo -e "#define COL \"/usr/bin/col\"" >> include/manconfig.h.in
cd $(DIR_APP) && echo -e "#define VGRIND \"/usr/bin/vgrind\"" >> include/manconfig.h.in
cd $(DIR_APP) && echo -e "#define GRAP \"/usr/bin/grap\"" >> include/manconfig.h.in
cd $(DIR_APP) && ./configure --prefix=/usr --enable-mb-groff --disable-setuid
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -26,10 +26,10 @@
include Config
VER = 2.17
VER = 2.34
THISAPP = man-pages-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 433ea1df15fa849e703a92eb553051a8
$(DL_FILE)_MD5 = fb8d9f55fef19ea5ab899437159c9420
install : $(TARGET)
@@ -71,7 +71,7 @@ $(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) && make 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: mktemp,v 1.1.2.4 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 1.5
THISAPP = mktemp-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_LFS_FTP)
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -78,8 +72,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)-add_tempfile-3.patch
cd $(DIR_APP) && ./configure --prefix=/usr --with-libc
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
cd $(DIR_APP) && make install-tempfile
@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: modutils,v 1.5.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 2.4.27
VER = 3.2.2
THISAPP = modutils-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_KERNEL)/linux/utils/kernel/modutils/v2.4
THISAPP = module-init-tools-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 51aa91627a2803df5873beae59d2f785
$(DL_FILE)_MD5 = a1ad0a09d3231673f70d631f3f5040e9
install : $(TARGET)
@@ -77,9 +71,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) && ./configure --disable-nls --enable-zlib --enable-insmod-static
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --disable-nls --enable-zlib
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make INSTALL=install install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -79,10 +79,13 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
ifneq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-libc-2.patch
endif
ifeq "$(ROOT)" ""
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) && ./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

View File

@@ -26,7 +26,7 @@
include Config
VER = 3.2.5
VER = 3.2.6
THISAPP = procps-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = cde0e3612d1d7c68f404d46f01c44fb4
$(DL_FILE)_MD5 = 7ce39ea27d7b3da0e8ad74dd41d06783
install : $(TARGET)
@@ -72,9 +72,8 @@ $(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) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
rm -f /lib/libproc.so
install -m 0644 $(DIR_SRC)/config/etc/sysctl.conf /etc
@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: psmisc,v 1.3.2.3 2005/02/05 15:38:15 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -32,11 +26,11 @@
include Config
VER = 21.4
VER = 22.2
THISAPP = psmisc-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_SFNET)/psmisc
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 8449269fdc8ae5d7d494df745e1180d3
$(DL_FILE)_MD5 = 77737c817a40ef2c160a7194b5b64337
install : $(TARGET)
@@ -78,9 +72,10 @@ $(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) && ./configure --prefix=/usr --disable-nls --exec-prefix=/
cd $(DIR_APP) && make
cd $(DIR_APP) && ./configure --prefix=/usr --exec-prefix="" --disable-nls
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
ln -sf killall /bin/pidof
mv -v /bin/pstree* /usr/bin
#ln -sf killall /bin/pidof
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -76,7 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && sed -i '/MV.*old/d' Makefile.in
cd $(DIR_APP) && sed -i '/{OLDSUFF}/c:' support/shlib-install
cd $(DIR_APP) && ./configure --prefix=/usr --libdir=/lib
cd $(DIR_APP) && make SHLIB_LIBS=-lncurses
cd $(DIR_APP) && make $(MAKETUNING) SHLIB_LIBS=-lncurses
cd $(DIR_APP) && make install
chmod -v 755 /lib/lib{readline,history}.so*
mv -v /lib/lib{readline,history}.a /usr/lib

View File

@@ -26,10 +26,10 @@
include Config
VER = 4.0.4.1
VER = 4.0.15
THISAPP = shadow-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 4e5662f360a29f174a19163c8d8a0698
$(DL_FILE)_MD5 = a0452fa989f8ba45023cc5a08136568e
install : $(TARGET)
@@ -72,25 +72,20 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}
touch /usr/bin/passwd
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls --libdir=/usr/lib --enable-shared
cd $(DIR_APP) && make
cd $(DIR_APP) && ./configure --libdir=/lib --enable-shared --without-selinux --disable-nls
cd $(DIR_APP) && sed -i 's/groups$(EXEEXT) //' src/Makefile
cd $(DIR_APP) && find man -name Makefile -exec sed -i '/groups/d' {} \;
cd $(DIR_APP) && sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
cd $(DIR_APP) && cp -f etc/{limits,login.access} /etc
cd $(DIR_APP) && sed -e 's%/var/spool/mail%/var/mail%' \
-e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \
etc/login.defs.linux > /etc/login.defs
ln -sf vipw /usr/sbin/vigr
mv -f /bin/sg /usr/bin
mv -f /usr/lib/lib{shadow,misc}.so.0* /lib
ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so
ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so
rm /bin/vigr
rm /bin/groups
/usr/sbin/pwconv
/usr/sbin/grpconv
chmod u-s /usr/bin/{chfn,chsh,chage,expiry,newgrp,passwd,gpasswd}
cd $(DIR_APP) && cp -v etc/{limits,login.access} /etc
cd $(DIR_APP) && sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
-e 's@/var/spool/mail@/var/mail@' \
etc/login.defs > /etc/login.defs
mv -v /usr/bin/passwd /bin
mv -v /lib/libshadow.*a /usr/lib
rm -v /lib/libshadow.so
ln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so
mkdir -v /etc/default
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -51,37 +51,33 @@ $(TARGET) :
@$(PREBUILD)
# Create directories
-mkdir -p /{bin,boot,dev/{pts,shm,net},etc/opt,home,lib,mnt,proc}
-mkdir -p /{root,sbin,tmp,usr/local,var,opt}
-for dirname in /usr /usr/local; do \
mkdir $$dirname/{bin,etc,include,lib,sbin,share,src}; \
ln -sf share/{man,doc,info} $$dirname; \
mkdir $$dirname/share/{dict,doc,info,locale,man}; \
mkdir $$dirname/share/{nls,misc,terminfo,zoneinfo}; \
mkdir $$dirname/share/man/man{1,2,3,4,5,6,7,8}; \
-mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
-mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
-install -dv -m 0750 /root
-install -dv -m 1777 /tmp /var/tmp
-mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
-mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
-mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
-mkdir -pv /usr/{,local/}share/man/man{1..8}
-for dir in /usr /usr/local; do \
ln -sv share/{man,doc,info} $$dir; \
done
-mkdir -p /var/{lock/subsys,log,mail,run,spool}
-mkdir -p /var/{tmp,opt,cache,lib/misc,local,empty}
-mkdir /opt/{bin,doc,include,info}
-mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}
# Permissions
chmod 0750 /root
chmod 1777 /tmp /var/tmp
chmod 0711 /var/empty
# Symlinks
# for this reason, stage2 rebuild will broke the iso:perl, grubbatch
-ln -sf /tools/bin/{bash,cat,pwd,stty} /bin
-ln -sf /tools/bin/perl /usr/bin
-ln -sf /tools/lib/libgcc_s.so.1 /usr/lib
-ln -sf bash /bin/sh
-ln -sv /tools/bin/{bash,cat,grep,pwd,stty} /bin
-ln -sv /tools/bin/perl /usr/bin
-ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
-ln -sv bash /bin/sh
# Config files
for i in $(DIR_SRC)/config/etc/*; do \
[ -f $$i ] && cp $$i /etc; \
done
ln -sf /proc/mounts /etc/mtab
touch /etc/mtab
echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
# Scripts
@@ -94,11 +90,11 @@ $(TARGET) :
-mkdir -p /home/nobody
chown -R nobody:nobody /home/nobody
# Patches directory
-mkdir -m 1775 -p /var/patches
chown -R root:nobody /var/patches
# Versionsfile
echo -n "$(VERSION)" > /etc/ipfire_vers
# Create /var dirs and files
-mkdir -v /var/{lock,log,mail,run,spool,empty}
-mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp -v utmp /var/run/utmp /var/log/lastlog
chmod -v 664 /var/run/utmp /var/log/lastlog
@$(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: sysklogd,v 1.3.2.7 2005/10/17 21:15:49 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 1.4.1
THISAPP = sysklogd-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_LFS_FTP)
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@@ -78,13 +72,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/sysklogd-1.3-31-rh-ksyslog-nul.diff
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sysklogd-1.4.1-caen-owl-klogd-drop-root.diff
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sysklogd-1.4.1-caen-owl-syslogd-bind.diff
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sysklogd-1.4.1-caen-owl-syslogd-drop-root.diff
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sysklogd-1.4.1-owl-syslogd-crunch_list.diff
cd $(DIR_APP) && CFLAGS="$(CFLAGS) -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce" make -e
cd $(DIR_APP) && CFLAGS="$(CFLAGS) -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce" make -e install
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-fixes-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-1.4.1-8bit-1.patch
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
touch /var/log/{boot.log,dhcpcd.log,messages,ovpnserver.log}
chmod 664 /var/log/{boot.log,dhcpcd.log,messages,ovpnserver.log}
chown 0:105 /var/log/{boot.log,dhcpcd.log,messages,ovpnserver.log}

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: sysvinit,v 1.6.2.4 2005/07/28 00:32:46 franck78 Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 2.86
THISAPP = sysvinit-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = ftp://ftp.cistron.nl/pub/people/miquels/sysvinit
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(LFS_PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
@@ -88,9 +82,9 @@ ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP)/src && install -m 0755 killall5 /install/initrd/bin
else
cd $(DIR_APP) && cp src/init.c{,.backup}
cd $(DIR_APP) && sed 's/Sending processes/Sending processes started by init/g' \
src/init.c.backup > src/init.c
cd $(DIR_APP) && make -C src
cd $(DIR_APP) && sed -i 's@Sending processes@& started by init@g' \
src/init.c
cd $(DIR_APP) && make $(MAKETUNING) -C src
cd $(DIR_APP) && make -C src install
endif
@rm -rf $(DIR_APP)

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: zlib,v 1.4.2.8 2005/07/26 06:27:49 gespinasse Exp $
# #
###############################################################################
###############################################################################
@@ -36,7 +30,7 @@ VER = 1.2.3
THISAPP = zlib-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_SFNET)/libpng
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
CFLAGS += -fPIC
@@ -79,11 +73,14 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --shared --libdir=/lib
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
rm -v /lib/libz.so
ln -sfv ../../lib/libz.so.1.2.3 /usr/lib/libz.so
cd $(DIR_APP) && make clean
cd $(DIR_APP) && ./configure --prefix=/usr
cd $(DIR_APP) && make
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
chmod -v 644 /usr/lib/libz.a
@rm -rf $(DIR_APP)
@$(POSTBUILD)

76
make.sh
View File

@@ -95,7 +95,7 @@ prepareenv() {
# Resetting our nice level #
# #
############################################################################
echo -ne "`date -u '+%b %e %T'`: Resetting our nice level to $NICE" | tee -a $LOGFILE
echo -ne "Resetting our nice level to $NICE" | tee -a $LOGFILE
renice $NICE $$ > /dev/null
if [ `nice` != "$NICE" ]; then
beautify message FAIL
@@ -110,7 +110,7 @@ prepareenv() {
# Checking if running as root user #
# #
############################################################################
echo -ne "`date -u '+%b %e %T'`: Checking if we're running as root user" | tee -a $LOGFILE
echo -ne "Checking if we're running as root user" | tee -a $LOGFILE
if [ `id -u` != 0 ]; then
beautify message FAIL
exiterror "Not building as root"
@@ -124,7 +124,7 @@ prepareenv() {
# Checking for necessary temporary space #
# #
############################################################################
echo -ne "`date -u '+%b %e %T'`: Checking for necessary space on disk $BASE_DEV" | tee -a $LOGFILE
echo -ne "Checking for necessary space on disk $BASE_DEV" | tee -a $LOGFILE
BASE_DEV=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
BASE_ASPACE=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
if (( 2202000 > $BASE_ASPACE )); then
@@ -142,8 +142,6 @@ prepareenv() {
# Building Linux From Scratch system #
# #
############################################################################
echo "`date -u '+%b %e %T'`: Building Linux From Scratch system" | tee -a $LOGFILE
# Set umask
umask 022
@@ -206,6 +204,7 @@ buildtoolchain() {
export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
lfsmake1 linux-libc-header
lfsmake1 glibc
lfsmake1 cleanup-toolchain PASS=1
lfsmake1 tcl
lfsmake1 expect
lfsmake1 dejagnu
@@ -229,7 +228,7 @@ buildtoolchain() {
lfsmake1 tar
lfsmake1 texinfo
lfsmake1 util-linux
lfsmake1 cleanup-toolchain
lfsmake1 cleanup-toolchain PASS=2
export PATH=$ORG_PATH
}
@@ -237,54 +236,61 @@ buildbase() {
LOGFILE="$BASEDIR/log/_build.base.log"
export LOGFILE
lfsmake2 stage2
lfsmake2 makedev
lfsmake2 linux
# lfsmake2 makedev
lfsmake2 linux-libc-header
lfsmake2 man-pages
lfsmake2 glibc
lfsmake2 cleanup-toolchain PASS=3
lfsmake2 binutils
lfsmake2 gcc
lfsmake2 berkeley
lfsmake2 coreutils
lfsmake2 zlib
lfsmake2 mktemp
lfsmake2 iana-etc
lfsmake2 findutils
lfsmake2 gawk
lfsmake2 ncurses
lfsmake2 vim
lfsmake2 m4
lfsmake2 bison
lfsmake2 less
lfsmake2 groff
lfsmake2 ncurses
lfsmake2 procps
lfsmake2 sed
lfsmake2 flex
lfsmake2 gettext
lfsmake2 net-tools
lfsmake2 inetutils
lfsmake2 libtool
lfsmake2 perl
lfsmake2 texinfo
lfsmake2 readline
lfsmake2 zlib
lfsmake2 autoconf
lfsmake2 automake
lfsmake2 bash
lfsmake2 file
lfsmake2 libtool
lfsmake2 bzip2
lfsmake2 diffutils
lfsmake2 ed
lfsmake2 kbd
lfsmake2 e2fsprogs
lfsmake2 grep
lfsmake2 file
lfsmake2 findutils
lfsmake2 flex
lfsmake2 grub
lfsmake2 gawk
lfsmake2 gettext
lfsmake2 grep
lfsmake2 groff
lfsmake2 gzip
lfsmake2 man
lfsmake2 inetutils
lfsmake2 iproute2
lfsmake2 kbd
lfsmake2 less
lfsmake2 make
lfsmake2 man
lfsmake2 mktemp
lfsmake2 modutils
lfsmake2 patch
lfsmake2 procinfo
lfsmake2 procps
lfsmake2 psmisc
lfsmake2 shadow
lfsmake2 sysklogd
lfsmake2 sysvinit
####
lfsmake2 vim
lfsmake2 net-tools
lfsmake2 inetutils
lfsmake2 texinfo
lfsmake2 ed
lfsmake2 procinfo
lfsmake2 tar
lfsmake2 util-linux
}
@@ -668,7 +674,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/cleanup-toolchain-tools ]; then
if [ ! -f log/cleanup-toolchain-2-tools ]; then
if [ ! -n "$PACKAGE" ]; then
beautify build_stage "Full toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
prepareenv
@@ -975,9 +981,6 @@ uploadsrc)
else
beautify message FAIL
fi
else
echo -ne "$i"
beautify message SKIP
fi
done
rm -f /var/tmp/ftplist
@@ -1084,7 +1087,10 @@ watch)
;;
"SVN: Commit")
if [ -f /usr/bin/mcedit ]; then
export EDITOR=/usr/sbin/mcedit
export EDITOR=/usr/bin/mcedit
fi
if [ -f /usr/bin/nano ]; then
export EDITOR=/usr/bin/nano
fi
$0 svn commit
$0 uploadsrc
@@ -1099,7 +1105,7 @@ watch)
$0 svn diff
;;
"Help")
echo "Usage: $0 {build|changelog|check|checkclean|clean|gettoolchain|newpak|prefetch|shell|sync|toolchain}"
echo "Usage: $0 {build|changelog|clean|gettoolchain|newpak|prefetch|shell|sync|toolchain}"
cat doc/make.sh-usage
;;
"LOG: Tail")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,111 @@
Submitted By: Dan Nicholson <dnicholson AT linuxfromscratch DOT org>
Date: 2006-09-02
Initial Package Version: 4.4.20
Origin: Upstream - http://www.sleepycat.com/update/4.4.20/patch.4.4.20.html
Description: Bug fixes provided by the developer. Contains patches 1-4.
diff -pNur db-4.4.20.orig/db/db_cam.c db-4.4.20/db/db_cam.c
--- db-4.4.20.orig/db/db_cam.c 2006-01-10 16:19:21.000000000 +0000
+++ db-4.4.20/db/db_cam.c 2006-08-03 14:31:20.220319610 +0000
@@ -579,11 +579,12 @@ __db_c_get(dbc_arg, key, data, flags)
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
return (ret);
- if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
+ opd = cp->opd;
+ else if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
return (ret);
- switch (ret =
- opd->c_am_get(opd, key, data, flags, NULL)) {
+ switch (ret = opd->c_am_get(opd, key, data, flags, NULL)) {
case 0:
goto done;
case DB_NOTFOUND:
@@ -596,12 +597,18 @@ __db_c_get(dbc_arg, key, data, flags)
if ((ret = __db_c_close(opd)) != 0)
goto err;
opd = NULL;
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
+ cp->opd = NULL;
break;
}
goto err;
default:
goto err;
}
+ } else if (cp->opd != NULL && F_ISSET(dbc_arg, DBC_TRANSIENT)) {
+ if ((ret = __db_c_close(cp->opd)) != 0)
+ goto err;
+ cp->opd = NULL;
}
/*
diff -pNur db-4.4.20.orig/mp/mp_fget.c db-4.4.20/mp/mp_fget.c
--- db-4.4.20.orig/mp/mp_fget.c 2005-10-12 17:53:36.000000000 +0000
+++ db-4.4.20/mp/mp_fget.c 2006-08-03 14:31:20.223318410 +0000
@@ -587,8 +587,11 @@ alloc: /*
*/
if (state != SECOND_MISS && bhp->ref == 1) {
bhp->priority = UINT32_MAX;
- SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
- SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+ if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) !=
+ SH_TAILQ_LAST(&hp->hash_bucket, hq, __bh)) {
+ SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
+ SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+ }
hp->hash_priority =
SH_TAILQ_FIRSTP(&hp->hash_bucket, __bh)->priority;
}
diff -pNur db-4.4.20.orig/qam/qam_files.c db-4.4.20/qam/qam_files.c
--- db-4.4.20.orig/qam/qam_files.c 2005-10-20 18:57:12.000000000 +0000
+++ db-4.4.20/qam/qam_files.c 2006-08-03 14:31:20.211323209 +0000
@@ -411,6 +411,12 @@ __qam_fremove(dbp, pgnoaddr)
DB_APP_DATA, buf, 0, NULL, &real_name)) != 0)
goto err;
#endif
+
+ mpf = array->mpfarray[offset].mpf;
+ /* This extent my already be marked for delete and closed. */
+ if (mpf == NULL)
+ goto err;
+
/*
* The log must be flushed before the file is deleted. We depend on
* the log record of the last delete to recreate the file if we crash.
@@ -418,7 +424,6 @@ __qam_fremove(dbp, pgnoaddr)
if (LOGGING_ON(dbenv) && (ret = __log_flush(dbenv, NULL)) != 0)
goto err;
- mpf = array->mpfarray[offset].mpf;
(void)__memp_set_flags(mpf, DB_MPOOL_UNLINK, 1);
/* Someone could be real slow, let them close it down. */
if (array->mpfarray[offset].pinref != 0)
diff -pNur db-4.4.20.orig/txn/txn.c db-4.4.20/txn/txn.c
--- db-4.4.20.orig/txn/txn.c 2005-11-01 14:50:03.000000000 +0000
+++ db-4.4.20/txn/txn.c 2006-08-03 14:31:20.215321609 +0000
@@ -1049,12 +1049,14 @@ __txn_set_name(txn, name)
return (ret);
memcpy(txn->name, name, len);
+ TXN_SYSTEM_LOCK(dbenv);
if (td->name != INVALID_ROFF) {
__db_shalloc_free(
&mgr->reginfo, R_ADDR(&mgr->reginfo, td->name));
td->name = INVALID_ROFF;
}
if ((ret = __db_shalloc(&mgr->reginfo, len, 0, &p)) != 0) {
+ TXN_SYSTEM_UNLOCK(dbenv);
__db_err(dbenv,
"Unable to allocate memory for transaction name");
@@ -1063,6 +1065,7 @@ __txn_set_name(txn, name)
return (ret);
}
+ TXN_SYSTEM_UNLOCK(dbenv);
td->name = R_OFFSET(&mgr->reginfo, p);
memcpy(p, name, len);

View File

@@ -0,0 +1,802 @@
Submitted by: Alexander E. Patrakov
Date: 2005-08-13
Initial Package Version: 2.8.1
Upstream Status: Unknown, but required for LSB >= 2.0 certification
Origin: RedHat
Description: Fixes treatment of whitespace in multibyte locales.
--- diffutils-2.8.4/src/diff.c.i18n 2002-06-17 01:55:42.000000000 -0400
+++ diffutils-2.8.4/src/diff.c 2002-11-16 18:41:37.000000000 -0500
@@ -275,6 +275,13 @@
re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
excluded = new_exclude ();
+#ifdef HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1)
+ lines_differ = lines_differ_multibyte;
+ else
+#endif
+ lines_differ = lines_differ_singlebyte;
+
/* Decode the options. */
while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
--- diffutils-2.8.4/src/diff.h.i18n 2002-11-16 18:31:32.000000000 -0500
+++ diffutils-2.8.4/src/diff.h 2002-11-16 18:48:58.000000000 -0500
@@ -23,6 +23,19 @@
#include "system.h"
#include <stdio.h>
+/* For platform which support the ISO C amendement 1 functionality we
+ support user defined character classes. */
+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
+# include <wchar.h>
+# include <wctype.h>
+# if defined (HAVE_MBRTOWC)
+# define HANDLE_MULTIBYTE 1
+# endif
+#endif
+
+#define TAB_WIDTH 8
+
/* What kind of changes a hunk contains. */
enum changes
{
@@ -350,7 +363,13 @@
extern char const pr_program[];
char *concat (char const *, char const *, char const *);
char *dir_file_pathname (char const *, char const *);
-bool lines_differ (char const *, char const *);
+
+bool (*lines_differ) (char const *, char const *);
+bool lines_differ_singlebyte (char const *, char const *);
+#ifdef HANDLE_MULTIBYTE
+bool lines_differ_multibyte (char const *, char const *);
+#endif
+
lin translate_line_number (struct file_data const *, lin);
struct change *find_change (struct change *);
struct change *find_reverse_change (struct change *);
--- diffutils-2.8.4/src/io.c.i18n 2002-06-11 02:06:32.000000000 -0400
+++ diffutils-2.8.4/src/io.c 2002-11-16 18:57:30.000000000 -0500
@@ -26,6 +26,7 @@
#include <regex.h>
#include <setmode.h>
#include <xalloc.h>
+#include <assert.h>
/* Rotate an unsigned value to the left. */
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
@@ -213,6 +214,28 @@
/* Split the file into lines, simultaneously computing the equivalence
class for each line. */
+#ifdef HANDLE_MULTIBYTE
+# define MBC2WC(P, END, MBLENGTH, WC, STATE, CONVFAIL) \
+do \
+{ \
+ mbstate_t state_bak = STATE; \
+ \
+ CONVFAIL = 0; \
+ MBLENGTH = mbrtowc (&WC, P, END - (char const *)P, &STATE); \
+ \
+ switch (MBLENGTH) \
+ { \
+ case (size_t)-2: \
+ case (size_t)-1: \
+ STATE = state_bak; \
+ ++CONVFAIL; \
+ /* Fall through. */ \
+ case 0: \
+ MBLENGTH = 1; \
+ } \
+} \
+while (0)
+#endif
static void
find_and_hash_each_line (struct file_data *current)
@@ -239,12 +262,280 @@
bool same_length_diff_contents_compare_anyway =
diff_length_compare_anyway | ignore_case;
+#ifdef HANDLE_MULTIBYTE
+ wchar_t wc;
+ size_t mblength;
+ mbstate_t state;
+ int convfail;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+#endif
+
while ((char const *) p < suffix_begin)
{
char const *ip = (char const *) p;
h = 0;
+#ifdef HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1)
+ {
+ wchar_t lo_wc;
+ char mbc[MB_LEN_MAX];
+ mbstate_t state_wc;
+
+ /* Hash this line until we find a newline. */
+ switch (ignore_white_space)
+ {
+ case IGNORE_ALL_SPACE:
+ while (1)
+ {
+ if (*p == '\n')
+ {
+ ++p;
+ break;
+ }
+
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
+
+ if (convfail)
+ mbc[0] = *p++;
+ else if (!iswspace (wc))
+ {
+ bool flag = 0;
+
+ if (ignore_case)
+ {
+ lo_wc = towlower (wc);
+ if (lo_wc != wc)
+ {
+ flag = 1;
+
+ p += mblength;
+ memset (&state_wc, '\0', sizeof(mbstate_t));
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
+
+ assert (mblength != (size_t)-1 &&
+ mblength != (size_t)-2);
+
+ mblength = (mblength < 1) ? 1 : mblength;
+ }
+ }
+
+ if (!flag)
+ {
+ for (i = 0; i < mblength; i++)
+ mbc[i] = *p++;
+ }
+ }
+ else
+ {
+ p += mblength;
+ continue;
+ }
+
+ for (i = 0; i < mblength; i++)
+ h = HASH (h, mbc[i]);
+ }
+ break;
+
+ case IGNORE_SPACE_CHANGE:
+ while (1)
+ {
+ if (*p == '\n')
+ {
+ ++p;
+ break;
+ }
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
+
+ if (!convfail && iswspace (wc))
+ {
+ while (1)
+ {
+ if (*p == '\n')
+ {
+ ++p;
+ goto hashing_done;
+ }
+
+ p += mblength;
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
+ if (convfail || (!convfail && !iswspace (wc)))
+ break;
+ }
+ h = HASH (h, ' ');
+ }
+
+ /* WC is now the first non-space. */
+ if (convfail)
+ mbc[0] = *p++;
+ else
+ {
+ bool flag = 0;
+
+ if (ignore_case)
+ {
+ lo_wc = towlower (wc);
+ if (lo_wc != wc)
+ {
+ flag = 1;
+
+ p += mblength;
+ memset (&state_wc, '\0', sizeof(mbstate_t));
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
+
+ assert (mblength != (size_t)-1 &&
+ mblength != (size_t)-2);
+
+ mblength = (mblength < 1) ? 1 : mblength;
+ }
+ }
+
+ if (!flag)
+ {
+ for (i = 0; i < mblength; i++)
+ mbc[i] = *p++;
+ }
+ }
+
+ for (i = 0; i < mblength; i++)
+ h = HASH (h, mbc[i]);
+ }
+ break;
+
+ case IGNORE_TAB_EXPANSION:
+ {
+ size_t column = 0;
+
+ while (1)
+ {
+ if (*p == '\n')
+ {
+ ++p;
+ break;
+ }
+
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
+
+ if (convfail)
+ {
+ h = HASH (h, *p++);
+ ++column;
+ }
+ else
+ {
+ bool flag;
+
+ switch (wc)
+ {
+ case L'\b':
+ column -= 0 < column;
+ h = HASH (h, '\b');
+ ++p;
+ break;
+
+ case L'\t':
+ {
+ int repetitions;
+
+ repetitions = TAB_WIDTH - column % TAB_WIDTH;
+ column += repetitions;
+ do
+ h = HASH (h, ' ');
+ while (--repetitions != 0);
+ ++p;
+ }
+ break;
+
+ case L'\r':
+ column = 0;
+ h = HASH (h, '\r');
+ ++p;
+ break;
+
+ default:
+ flag = 0;
+ column += wcwidth (wc);
+ if (ignore_case)
+ {
+ lo_wc = towlower (wc);
+ if (lo_wc != wc)
+ {
+ flag = 1;
+ p += mblength;
+ memset (&state_wc, '\0', sizeof(mbstate_t));
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
+
+ assert (mblength != (size_t)-1 &&
+ mblength != (size_t)-2);
+
+ mblength = (mblength < 1) ? 1 : mblength;
+ }
+ }
+
+ if (!flag)
+ {
+ for (i = 0; i < mblength; i++)
+ mbc[i] = *p++;
+ }
+
+ for (i = 0; i < mblength; i++)
+ h = HASH (h, mbc[i]);
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ while (1)
+ {
+ if (*p == '\n')
+ {
+ ++p;
+ break;
+ }
+
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
+
+ if (convfail)
+ mbc[0] = *p++;
+ else
+ {
+ int flag = 0;
+
+ if (ignore_case)
+ {
+ lo_wc = towlower (wc);
+ if (lo_wc != wc)
+ {
+ flag = 1;
+ p += mblength;
+ memset (&state_wc, '\0', sizeof(mbstate_t));
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
+
+ assert (mblength != (size_t)-1 &&
+ mblength != (size_t)-2);
+
+ mblength = (mblength < 1) ? 1 : mblength;
+ }
+ }
+
+ if (!flag)
+ {
+ for (i = 0; i < mblength; i++)
+ mbc[i] = *p++;
+ }
+ }
+
+ for (i = 0; i < mblength; i++)
+ h = HASH (h, mbc[i]);
+ }
+ }
+ }
+ else
+#endif
/* Hash this line until we find a newline. */
if (ignore_case)
switch (ignore_white_space)
--- diffutils-2.8.4/src/side.c.i18n 2002-06-11 02:06:32.000000000 -0400
+++ diffutils-2.8.4/src/side.c 2002-11-16 18:41:37.000000000 -0500
@@ -73,11 +73,72 @@
register size_t out_position = 0;
register char const *text_pointer = line[0];
register char const *text_limit = line[1];
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
+ unsigned char mbc[MB_LEN_MAX];
+ wchar_t wc;
+ mbstate_t state, state_bak;
+ size_t mbc_pos, mblength;
+ int mbc_loading_flag = 0;
+ int wc_width;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+#endif
while (text_pointer < text_limit)
{
register unsigned char c = *text_pointer++;
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
+ if (MB_CUR_MAX > 1 && mbc_loading_flag)
+ {
+ mbc_loading_flag = 0;
+ state_bak = state;
+ mbc[mbc_pos++] = c;
+
+process_mbc:
+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
+
+ switch (mblength)
+ {
+ case (size_t)-2: /* Incomplete multibyte character. */
+ mbc_loading_flag = 1;
+ state = state_bak;
+ break;
+
+ case (size_t)-1: /* Invalid as a multibyte character. */
+ if (in_position++ < out_bound)
+ {
+ out_position = in_position;
+ putc (mbc[0], out);
+ }
+ memmove (mbc, mbc + 1, --mbc_pos);
+ if (mbc_pos > 0)
+ {
+ mbc[mbc_pos] = '\0';
+ goto process_mbc;
+ }
+ break;
+
+ default:
+ wc_width = wcwidth (wc);
+ if (wc_width < 1) /* Unprintable multibyte character. */
+ {
+ if (in_position <= out_bound)
+ fprintf (out, "%lc", (wint_t)wc);
+ }
+ else /* Printable multibyte character. */
+ {
+ in_position += wc_width;
+ if (in_position <= out_bound)
+ {
+ out_position = in_position;
+ fprintf (out, "%lc", (wint_t)wc);
+ }
+ }
+ }
+ continue;
+ }
+#endif
switch (c)
{
case '\t':
@@ -135,8 +196,39 @@
break;
default:
- if (! ISPRINT (c))
- goto control_char;
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
+ if (MB_CUR_MAX > 1)
+ {
+ memset (mbc, '\0', MB_LEN_MAX);
+ mbc_pos = 0;
+ mbc[mbc_pos++] = c;
+ state_bak = state;
+
+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
+
+ /* The value of mblength is always less than 2 here. */
+ switch (mblength)
+ {
+ case (size_t)-2: /* Incomplete multibyte character. */
+ state = state_bak;
+ mbc_loading_flag = 1;
+ continue;
+
+ case (size_t)-1: /* Invalid as a multibyte character. */
+ state = state_bak;
+ break;
+
+ default:
+ if (! iswprint (wc))
+ goto control_char;
+ }
+ }
+ else
+#endif
+ {
+ if (! ISPRINT (c))
+ goto control_char;
+ }
/* falls through */
case ' ':
if (in_position++ < out_bound)
--- diffutils-2.8.4/src/util.c.i18n 2002-06-11 02:06:32.000000000 -0400
+++ diffutils-2.8.4/src/util.c 2002-11-16 18:41:37.000000000 -0500
@@ -321,7 +321,7 @@
Return nonzero if the lines differ. */
bool
-lines_differ (char const *s1, char const *s2)
+lines_differ_singlebyte (char const *s1, char const *s2)
{
register unsigned char const *t1 = (unsigned char const *) s1;
register unsigned char const *t2 = (unsigned char const *) s2;
@@ -450,6 +450,293 @@
return 1;
}
+
+#ifdef HANDLE_MULTIBYTE
+# define MBC2WC(T, END, MBLENGTH, WC, STATE, CONVFAIL) \
+do \
+{ \
+ mbstate_t bak = STATE; \
+ \
+ CONVFAIL = 0; \
+ MBLENGTH = mbrtowc (&WC, T, END - T, &STATE); \
+ \
+ switch (MBLENGTH) \
+ { \
+ case (size_t)-2: \
+ case (size_t)-1: \
+ STATE = bak; \
+ ++CONVFAIL; \
+ /* Fall through. */ \
+ case 0: \
+ MBLENGTH = 1; \
+ } \
+} \
+while (0)
+
+bool
+lines_differ_multibyte (char const *s1, char const *s2)
+{
+ unsigned char const *end1, *end2;
+ unsigned char c1, c2;
+ wchar_t wc1, wc2, wc1_bak, wc2_bak;
+ size_t mblen1, mblen2;
+ mbstate_t state1, state2, state1_bak, state2_bak;
+ int convfail1, convfail2, convfail1_bak, convfail2_bak;
+
+ unsigned char const *t1 = (unsigned char const *) s1;
+ unsigned char const *t2 = (unsigned char const *) s2;
+ unsigned char const *t1_bak, *t2_bak;
+ size_t column = 0;
+
+ if (ignore_white_space == IGNORE_NO_WHITE_SPACE && !ignore_case)
+ {
+ while (*t1 != '\n')
+ if (*t1++ != * t2++)
+ return 1;
+ return 0;
+ }
+
+ memset (&state1, '\0', sizeof (mbstate_t));
+ memset (&state2, '\0', sizeof (mbstate_t));
+
+ end1 = s1 + strlen (s1);
+ end2 = s2 + strlen (s2);
+
+ while (1)
+ {
+ c1 = *t1;
+ c2 = *t2;
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
+
+ /* Test for exact char equality first, since it's a common case. */
+ if (convfail1 ^ convfail2)
+ break;
+ else if (convfail1 && convfail2 && c1 != c2)
+ break;
+ else if (!convfail1 && !convfail2 && wc1 != wc2)
+ {
+ switch (ignore_white_space)
+ {
+ case IGNORE_ALL_SPACE:
+ /* For -w, just skip past any white space. */
+ while (1)
+ {
+ if (convfail1)
+ break;
+ else if (wc1 == L'\n' || !iswspace (wc1))
+ break;
+
+ t1 += mblen1;
+ c1 = *t1;
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
+ }
+
+ while (1)
+ {
+ if (convfail2)
+ break;
+ else if (wc2 == L'\n' || !iswspace (wc2))
+ break;
+
+ t2 += mblen2;
+ c2 = *t2;
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
+ }
+ t1 += mblen1;
+ t2 += mblen2;
+ break;
+
+ case IGNORE_SPACE_CHANGE:
+ /* For -b, advance past any sequence of white space in
+ line 1 and consider it just one space, or nothing at
+ all if it is at the end of the line. */
+ if (wc1 != L'\n' && iswspace (wc1))
+ {
+ size_t mblen_bak;
+ mbstate_t state_bak;
+
+ do
+ {
+ t1 += mblen1;
+ mblen_bak = mblen1;
+ state_bak = state1;
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
+ }
+ while (!convfail1 && (wc1 != L'\n' && iswspace (wc1)));
+
+ state1 = state_bak;
+ mblen1 = mblen_bak;
+ t1 -= mblen1;
+ convfail1 = 0;
+ wc1 = L' ';
+ }
+
+ /* Likewise for line 2. */
+ if (wc2 != L'\n' && iswspace (wc2))
+ {
+ size_t mblen_bak;
+ mbstate_t state_bak;
+
+ do
+ {
+ t2 += mblen2;
+ mblen_bak = mblen2;
+ state_bak = state2;
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
+ }
+ while (!convfail2 && (wc2 != L'\n' && iswspace (wc2)));
+
+ state2 = state_bak;
+ mblen2 = mblen_bak;
+ t2 -= mblen2;
+ convfail2 = 0;
+ wc2 = L' ';
+ }
+
+ if (wc1 != wc2)
+ {
+ if (wc2 == L' ' && wc1 != L'\n' &&
+ t1 > (unsigned char const *)s1 &&
+ !convfail1_bak && iswspace (wc1_bak))
+ {
+ t1 = t1_bak;
+ wc1 = wc1_bak;
+ state1 = state1_bak;
+ convfail1 = convfail1_bak;
+ continue;
+ }
+ if (wc1 == L' ' && wc2 != L'\n'
+ && t2 > (unsigned char const *)s2
+ && !convfail2_bak && iswspace (wc2_bak))
+ {
+ t2 = t2_bak;
+ wc2 = wc2_bak;
+ state2 = state2_bak;
+ convfail2 = convfail2_bak;
+ continue;
+ }
+ }
+
+ t1_bak = t1; t2_bak = t2;
+ wc1_bak = wc1; wc2_bak = wc2;
+ state1_bak = state1; state2_bak = state2;
+ convfail1_bak = convfail1; convfail2_bak = convfail2;
+
+ if (wc1 == L'\n')
+ wc1 = L' ';
+ else
+ t1 += mblen1;
+
+ if (wc2 == L'\n')
+ wc2 = L' ';
+ else
+ t2 += mblen2;
+
+ break;
+
+ case IGNORE_TAB_EXPANSION:
+ if ((wc1 == L' ' && wc2 == L'\t')
+ || (wc1 == L'\t' && wc2 == L' '))
+ {
+ size_t column2 = column;
+
+ while (1)
+ {
+ if (convfail1)
+ {
+ ++t1;
+ break;
+ }
+ else if (wc1 == L' ')
+ column++;
+ else if (wc1 == L'\t')
+ column += TAB_WIDTH - column % TAB_WIDTH;
+ else
+ {
+ t1 += mblen1;
+ break;
+ }
+
+ t1 += mblen1;
+ c1 = *t1;
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
+ }
+
+ while (1)
+ {
+ if (convfail2)
+ {
+ ++t2;
+ break;
+ }
+ else if (wc2 == L' ')
+ column2++;
+ else if (wc2 == L'\t')
+ column2 += TAB_WIDTH - column2 % TAB_WIDTH;
+ else
+ {
+ t2 += mblen2;
+ break;
+ }
+
+ t2 += mblen2;
+ c2 = *t2;
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
+ }
+
+ if (column != column2)
+ return 1;
+ }
+ else
+ {
+ t1 += mblen1;
+ t2 += mblen2;
+ }
+ break;
+
+ case IGNORE_NO_WHITE_SPACE:
+ t1 += mblen1;
+ t2 += mblen2;
+ break;
+ }
+
+ /* Lowercase all letters if -i is specified. */
+ if (ignore_case)
+ {
+ if (!convfail1)
+ wc1 = towlower (wc1);
+ if (!convfail2)
+ wc2 = towlower (wc2);
+ }
+
+ if (convfail1 ^ convfail2)
+ break;
+ else if (convfail1 && convfail2 && c1 != c2)
+ break;
+ else if (!convfail1 && !convfail2 && wc1 != wc2)
+ break;
+ }
+ else
+ {
+ t1_bak = t1; t2_bak = t2;
+ wc1_bak = wc1; wc2_bak = wc2;
+ state1_bak = state1; state2_bak = state2;
+ convfail1_bak = convfail1; convfail2_bak = convfail2;
+
+ t1 += mblen1; t2 += mblen2;
+ }
+
+ if (!convfail1 && wc1 == L'\n')
+ return 0;
+
+ column += convfail1 ? 1 :
+ (wc1 == L'\t') ? TAB_WIDTH - column % TAB_WIDTH : wcwidth (wc1);
+ }
+
+ return 1;
+}
+#endif
/* Find the consecutive changes at the start of the script START.
Return the last link before the first gap. */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,892 @@
Submitted By: Jim Gifford <jim@linuxfromscratch.org>
Date: 05-28-2006
Initial Package Version: 0.97
Upstream Status: Unknown
Origin: Fedora and Mandriva
Description: This patch fixes issues with disk geometry not being
detected properly. Part of this patch also fixes
gcc 4 compile errors, which are a part of the issue.
diff -Naur grub-0.97.orig/configure grub-0.97/configure
--- grub-0.97.orig/configure 2005-05-07 19:48:12.000000000 -0700
+++ grub-0.97/configure 2006-05-28 20:29:36.025466751 -0700
@@ -3485,9 +3485,9 @@
echo "$as_me:$LINENO: result: $size_flag" >&5
echo "${ECHO_T}$size_flag" >&6
if test "x$size_flag" = xyes; then
- STAGE2_CFLAGS="-Os"
+ STAGE2_CFLAGS="-Os -fno-strict-aliasing"
else
- STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
+ STAGE2_CFLAGS="-O2 -fno-strict-aliasing -fno-strength-reduce -fno-unroll-loops"
fi
# OpenBSD has a GCC extension for protecting applications from
# stack smashing attacks, but GRUB doesn't want this feature.
diff -Naur grub-0.97.orig/configure.ac grub-0.97/configure.ac
--- grub-0.97.orig/configure.ac 2005-05-07 19:36:03.000000000 -0700
+++ grub-0.97/configure.ac 2006-05-28 20:28:41.538819726 -0700
@@ -93,9 +93,9 @@
CFLAGS=$saved_CFLAGS
])
if test "x$size_flag" = xyes; then
- STAGE2_CFLAGS="-Os"
+ STAGE2_CFLAGS="-Os -fno-strict-aliasing"
else
- STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
+ STAGE2_CFLAGS="-O2 -fno-strict-aliasing -fno-strength-reduce -fno-unroll-loops"
fi
# OpenBSD has a GCC extension for protecting applications from
# stack smashing attacks, but GRUB doesn't want this feature.
diff -Naur grub-0.97.orig/lib/device.c grub-0.97/lib/device.c
--- grub-0.97.orig/lib/device.c 2005-03-27 15:14:25.000000000 -0800
+++ grub-0.97/lib/device.c 2006-05-28 20:34:03.546804777 -0700
@@ -131,6 +131,152 @@
#include <shared.h>
#include <device.h>
+#if defined(__linux__)
+/* The 2.6 kernel has removed all of the geometry handling for IDE drives
+ * that did fixups for LBA, etc. This means that the geometry we get
+ * with the ioctl has a good chance of being wrong. So, we get to
+ * also know about partition tables and try to read what the geometry
+ * is there. *grumble* Very closely based on code from cfdisk
+ */
+static void get_kernel_geometry(int fd, long long *cyl, int *heads, int *sectors) {
+ struct hd_geometry hdg;
+
+ if (ioctl (fd, HDIO_GETGEO, &hdg))
+ return;
+
+ *cyl = hdg.cylinders;
+ *heads = hdg.heads;
+ *sectors = hdg.sectors;
+}
+
+struct partition {
+ unsigned char boot_ind; /* 0x80 - active */
+ unsigned char head; /* starting head */
+ unsigned char sector; /* starting sector */
+ unsigned char cyl; /* starting cylinder */
+ unsigned char sys_ind; /* What partition type */
+ unsigned char end_head; /* end head */
+ unsigned char end_sector; /* end sector */
+ unsigned char end_cyl; /* end cylinder */
+ unsigned char start4[4]; /* starting sector counting from 0 */
+ unsigned char size4[4]; /* nr of sectors in partition */
+};
+
+#define ALIGNMENT 2
+typedef union {
+ struct {
+ unsigned char align[ALIGNMENT];
+ unsigned char b[SECTOR_SIZE];
+ } c;
+ struct {
+ unsigned char align[ALIGNMENT];
+ unsigned char buffer[0x1BE];
+ struct partition part[4];
+ unsigned char magicflag[2];
+ } p;
+} partition_table;
+
+#define PART_TABLE_FLAG0 0x55
+#define PART_TABLE_FLAG1 0xAA
+
+static void
+get_partition_table_geometry(partition_table *bufp, long long *cyl, int *heads,
+ int *sectors) {
+ struct partition *p;
+ int i,h,s,hh,ss;
+ int first = 1;
+ int bad = 0;
+
+ if (bufp->p.magicflag[0] != PART_TABLE_FLAG0 ||
+ bufp->p.magicflag[1] != PART_TABLE_FLAG1) {
+ /* Matthew Wilcox: slightly friendlier version of
+ fatal(_("Bad signature on partition table"), 3);
+ */
+ fprintf(stderr, "Unknown partition table signature\n");
+ return;
+ }
+
+ hh = ss = 0;
+ for (i=0; i<4; i++) {
+ p = &(bufp->p.part[i]);
+ if (p->sys_ind != 0) {
+ h = p->end_head + 1;
+ s = (p->end_sector & 077);
+ if (first) {
+ hh = h;
+ ss = s;
+ first = 0;
+ } else if (hh != h || ss != s)
+ bad = 1;
+ }
+ }
+
+ if (!first && !bad) {
+ *heads = hh;
+ *sectors = ss;
+ }
+}
+
+static long long my_lseek (unsigned int fd, long long offset,
+ unsigned int origin)
+{
+#if defined(__linux__) && (!defined(__GLIBC__) || \
+ ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+ /* Maybe libc doesn't have large file support. */
+ loff_t offset, result;
+ static int _llseek (uint filedes, ulong hi, ulong lo,
+ loff_t *res, uint wh);
+ _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+ loff_t *, res, uint, wh);
+
+ if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET) < 0)
+ return (long long) -1;
+ return result;
+#else
+ return lseek(fd, offset, SEEK_SET);
+#endif
+}
+
+static void get_linux_geometry (int fd, struct geometry *geom) {
+ long long kern_cyl = 0; int kern_head = 0, kern_sectors = 0;
+ long long pt_cyl = 0; int pt_head = 0, pt_sectors = 0;
+ partition_table bufp;
+ char *buff, *buf_unaligned;
+
+ buf_unaligned = malloc(sizeof(partition_table) + 4095);
+ buff = (char *) (((unsigned long)buf_unaligned + 4096 - 1) &
+ (~(4096-1)));
+
+ get_kernel_geometry(fd, &kern_cyl, &kern_head, &kern_sectors);
+
+ if (my_lseek (fd, 0*SECTOR_SIZE, SEEK_SET) < 0) {
+ fprintf(stderr, "Unable to seek");
+ }
+
+ if (read(fd, buff, SECTOR_SIZE) == SECTOR_SIZE) {
+ memcpy(bufp.c.b, buff, SECTOR_SIZE);
+ get_partition_table_geometry(&bufp, &pt_cyl, &pt_head, &pt_sectors);
+ } else {
+ fprintf(stderr, "Unable to read partition table: %s\n", strerror(errno));
+ }
+
+ if (pt_head && pt_sectors) {
+ int cyl_size;
+
+ geom->heads = pt_head;
+ geom->sectors = pt_sectors;
+ cyl_size = pt_head * pt_sectors;
+ geom->cylinders = geom->total_sectors/cyl_size;
+ } else {
+ geom->heads = kern_head;
+ geom->sectors = kern_sectors;
+ geom->cylinders = kern_cyl;
+ }
+
+ return;
+}
+#endif
+
/* Get the geometry of a drive DRIVE. */
void
get_drive_geometry (struct geometry *geom, char **map, int drive)
@@ -151,21 +297,16 @@
#if defined(__linux__)
/* Linux */
{
- struct hd_geometry hdg;
unsigned long nr;
-
- if (ioctl (fd, HDIO_GETGEO, &hdg))
- goto fail;
if (ioctl (fd, BLKGETSIZE, &nr))
goto fail;
/* Got the geometry, so save it. */
- geom->cylinders = hdg.cylinders;
- geom->heads = hdg.heads;
- geom->sectors = hdg.sectors;
geom->total_sectors = nr;
-
+ get_linux_geometry(fd, geom);
+ if (!geom->heads && !geom->cylinders && !geom->sectors)
+ goto fail;
goto success;
}
@@ -844,6 +985,7 @@
{
char dev[PATH_MAX]; /* XXX */
int fd;
+ off_t offset = (off_t) sector * (off_t) SECTOR_SIZE;
if ((partition & 0x00FF00) != 0x00FF00)
{
@@ -870,35 +1012,13 @@
errnum = ERR_NO_PART;
return 0;
}
-
-#if defined(__linux__) && (!defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
- /* Maybe libc doesn't have large file support. */
- {
- loff_t offset, result;
- static int _llseek (uint filedes, ulong hi, ulong lo,
- loff_t *res, uint wh);
- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
- loff_t *, res, uint, wh);
- offset = (loff_t) sector * (loff_t) SECTOR_SIZE;
- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
- {
- errnum = ERR_DEV_VALUES;
- return 0;
- }
- }
-#else
- {
- off_t offset = (off_t) sector * (off_t) SECTOR_SIZE;
- if (lseek (fd, offset, SEEK_SET) != offset)
- {
- errnum = ERR_DEV_VALUES;
- return 0;
- }
- }
-#endif
+ if (my_lseek(fd, offset, SEEK_SET) != offset)
+ {
+ errnum = ERR_DEV_VALUES;
+ return 0;
+ }
if (write (fd, buf, size * SECTOR_SIZE) != (size * SECTOR_SIZE))
{
diff -Naur grub-0.97.orig/stage2/Makefile.am grub-0.97/stage2/Makefile.am
--- grub-0.97.orig/stage2/Makefile.am 2005-02-02 12:37:35.000000000 -0800
+++ grub-0.97/stage2/Makefile.am 2006-05-28 20:28:41.590818435 -0700
@@ -24,7 +24,8 @@
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
- -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
+ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 \
+ -fno-strict-aliasing
# Stage 2 and Stage 1.5's.
pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
diff -Naur grub-0.97.orig/stage2/boot.c grub-0.97/stage2/boot.c
--- grub-0.97.orig/stage2/boot.c 2004-03-30 03:44:08.000000000 -0800
+++ grub-0.97/stage2/boot.c 2006-05-28 20:33:30.123638792 -0700
@@ -55,7 +55,7 @@
pu;
/* presuming that MULTIBOOT_SEARCH is large enough to encompass an
executable header */
- unsigned char buffer[MULTIBOOT_SEARCH];
+ char buffer[MULTIBOOT_SEARCH];
/* sets the header pointer to point to the beginning of the
buffer by default */
@@ -98,7 +98,7 @@
/* ELF loading supported if multiboot, FreeBSD and NetBSD. */
if ((type == KERNEL_TYPE_MULTIBOOT
|| pu.elf->e_ident[EI_OSABI] == ELFOSABI_FREEBSD
- || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0
+ || grub_strcmp ((char *) pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0
|| suggested_type == KERNEL_TYPE_NETBSD)
&& len > sizeof (Elf32_Ehdr)
&& BOOTABLE_I386_ELF ((*((Elf32_Ehdr *) buffer))))
@@ -824,8 +824,12 @@
moveto = (mbi.mem_upper + 0x400) << 10;
moveto = (moveto - len) & 0xfffff000;
+#if 0
max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203
? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS);
+#else
+ max_addr = LINUX_INITRD_MAX_ADDRESS;
+#endif
if (moveto + len >= max_addr)
moveto = (max_addr - len) & 0xfffff000;
diff -Naur grub-0.97.orig/stage2/disk_io.c grub-0.97/stage2/disk_io.c
--- grub-0.97.orig/stage2/disk_io.c 2004-05-23 09:35:24.000000000 -0700
+++ grub-0.97/stage2/disk_io.c 2006-05-28 20:28:41.582818634 -0700
@@ -127,12 +127,19 @@
int filepos;
int filemax;
-static inline unsigned long
-log2 (unsigned long word)
+#define log2(n) ffz(~(n))
+
+/* include/asm-i386/bitops.h */
+/*
+ * ffz = Find First Zero in word. Undefined if no zero exists,
+ * so code should check against ~0UL first..
+ */
+static __inline__ unsigned long
+ffz (unsigned long word)
{
- asm volatile ("bsfl %1,%0"
- : "=r" (word)
- : "r" (word));
+ __asm__ ("bsfl %1,%0"
+: "=r" (word)
+: "r" (~word));
return word;
}
diff -Naur grub-0.97.orig/stage2/freebsd.h grub-0.97/stage2/freebsd.h
--- grub-0.97.orig/stage2/freebsd.h 2003-07-09 04:45:52.000000000 -0700
+++ grub-0.97/stage2/freebsd.h 2006-05-28 20:28:41.582818634 -0700
@@ -78,7 +78,7 @@
struct bootinfo
{
unsigned int bi_version;
- unsigned char *bi_kernelname;
+ char *bi_kernelname;
struct nfs_diskless *bi_nfs_diskless;
/* End of fields that are always present. */
#define bi_endcommon bi_n_bios_used
diff -Naur grub-0.97.orig/stage2/fsys_fat.c grub-0.97/stage2/fsys_fat.c
--- grub-0.97.orig/stage2/fsys_fat.c 2005-03-15 08:52:00.000000000 -0800
+++ grub-0.97/stage2/fsys_fat.c 2006-05-28 20:28:41.582818634 -0700
@@ -54,12 +54,19 @@
#define FAT_CACHE_SIZE 2048
+#define log2(n) ffz(~(n))
+
+/* include/asm-i386/bitops.h */
+/*
+ * ffz = Find First Zero in word. Undefined if no zero exists,
+ * so code should check against ~0UL first..
+ */
static __inline__ unsigned long
-log2 (unsigned long word)
+ffz (unsigned long word)
{
__asm__ ("bsfl %1,%0"
- : "=r" (word)
- : "r" (word));
+: "=r" (word)
+: "r" (~word));
return word;
}
diff -Naur grub-0.97.orig/stage2/fsys_iso9660.c grub-0.97/stage2/fsys_iso9660.c
--- grub-0.97.orig/stage2/fsys_iso9660.c 2004-05-11 05:11:19.000000000 -0700
+++ grub-0.97/stage2/fsys_iso9660.c 2006-05-28 20:28:41.582818634 -0700
@@ -55,13 +55,19 @@
#define RRCONT_BUF ((unsigned char *)(FSYS_BUF + 6144))
#define NAME_BUF ((unsigned char *)(FSYS_BUF + 8192))
+#define log2(n) ffz(~(n))
-static inline unsigned long
-log2 (unsigned long word)
+/* include/asm-i386/bitops.h */
+/*
+ * ffz = Find First Zero in word. Undefined if no zero exists,
+ * so code should check against ~0UL first..
+ */
+static __inline__ unsigned long
+ffz (unsigned long word)
{
- asm volatile ("bsfl %1,%0"
- : "=r" (word)
- : "r" (word));
+ __asm__ ("bsfl %1,%0"
+: "=r" (word)
+: "r" (~word));
return word;
}
@@ -120,7 +126,7 @@
break;
/* check ISO_VD_PRIMARY and ISO_STANDARD_ID */
if (PRIMDESC->type.l == ISO_VD_PRIMARY
- && !memcmp(PRIMDESC->id, ISO_STANDARD_ID, sizeof(PRIMDESC->id)))
+ && !memcmp((char *) PRIMDESC->id, ISO_STANDARD_ID, sizeof(PRIMDESC->id)))
{
ISO_SUPER->vol_sector = sector;
INODE->file_start = 0;
@@ -175,7 +181,7 @@
for (; idr->length.l > 0;
idr = (struct iso_directory_record *)((char *)idr + idr->length.l) )
{
- const char *name = idr->name;
+ const u_int8_t *name = idr->name;
unsigned int name_len = idr->name_len.l;
file_type = (idr->flags.l & 2) ? ISO_DIRECTORY : ISO_REGULAR;
@@ -198,7 +204,7 @@
rr_len = (idr->length.l - idr->name_len.l
- sizeof(struct iso_directory_record)
+ sizeof(idr->name));
- rr_ptr.ptr = ((unsigned char *)idr + idr->name_len.l
+ rr_ptr.ptr = ((char *)idr + idr->name_len.l
+ sizeof(struct iso_directory_record)
- sizeof(idr->name));
if (rr_ptr.i & 1)
@@ -331,9 +337,9 @@
memcpy(NAME_BUF, name, name_len);
name = NAME_BUF;
}
- rr_ptr.ptr = RRCONT_BUF + ce_ptr->u.ce.offset.l;
+ rr_ptr.ptr = (char *) RRCONT_BUF + ce_ptr->u.ce.offset.l;
rr_len = ce_ptr->u.ce.size.l;
- if (!iso9660_devread(ce_ptr->u.ce.extent.l, 0, ISO_SECTOR_SIZE, RRCONT_BUF))
+ if (!iso9660_devread(ce_ptr->u.ce.extent.l, 0, ISO_SECTOR_SIZE, (char *) RRCONT_BUF))
{
errnum = 0; /* this is not fatal. */
break;
@@ -344,7 +350,7 @@
filemax = MAXINT;
if (name_len >= pathlen
- && !memcmp(name, dirname, pathlen))
+ && !memcmp((char *) name, dirname, pathlen))
{
if (dirname[pathlen] == '/' || !print_possibilities)
{
@@ -381,7 +387,7 @@
print_possibilities = -print_possibilities;
memcpy(NAME_BUF, name, name_len);
NAME_BUF[name_len] = '\0';
- print_a_completion (NAME_BUF);
+ print_a_completion ((char *) NAME_BUF);
#endif
}
}
diff -Naur grub-0.97.orig/stage2/fsys_reiserfs.c grub-0.97/stage2/fsys_reiserfs.c
--- grub-0.97.orig/stage2/fsys_reiserfs.c 2004-02-18 14:09:10.000000000 -0800
+++ grub-0.97/stage2/fsys_reiserfs.c 2006-05-28 20:28:41.586818535 -0700
@@ -365,13 +365,19 @@
#define JOURNAL_START ((__u32 *) (INFO + 1))
#define JOURNAL_END ((__u32 *) (FSYS_BUF + FSYS_BUFLEN))
+#define log2(n) ffz(~(n))
+/* include/asm-i386/bitops.h */
+/*
+ * ffz = Find First Zero in word. Undefined if no zero exists,
+ * so code should check against ~0UL first..
+ */
static __inline__ unsigned long
-log2 (unsigned long word)
+ffz (unsigned long word)
{
__asm__ ("bsfl %1,%0"
- : "=r" (word)
- : "r" (word));
+: "=r" (word)
+: "r" (~word));
return word;
}
diff -Naur grub-0.97.orig/stage2/fsys_vstafs.c grub-0.97/stage2/fsys_vstafs.c
--- grub-0.97.orig/stage2/fsys_vstafs.c 2003-07-09 04:45:53.000000000 -0700
+++ grub-0.97/stage2/fsys_vstafs.c 2006-05-28 20:28:41.586818535 -0700
@@ -186,35 +186,35 @@
int
vstafs_read (char *addr, int len)
{
- struct alloc *a;
+ struct alloc *b;
int size, ret = 0, offset, curr_len = 0;
- int curr_ext;
+ int curr_exten;
char extent;
int ext_size;
char *curr_pos;
get_file_info (f_sector);
size = FILE_INFO->len-VSTAFS_START_DATA;
- a = FILE_INFO->blocks;
+ b = FILE_INFO->blocks;
if (filepos > 0)
{
- if (filepos < a[0].a_len * 512 - VSTAFS_START_DATA)
+ if (filepos < b[0].a_len * 512 - VSTAFS_START_DATA)
{
offset = filepos + VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset - filepos;
+ curr_len = b[0].a_len * 512 - offset - filepos;
}
else
{
- ext_size = a[0].a_len * 512 - VSTAFS_START_DATA;
+ ext_size = b[0].a_len * 512 - VSTAFS_START_DATA;
offset = filepos - ext_size;
extent = 1;
do
{
curr_len -= ext_size;
offset -= ext_size;
- ext_size = a[extent+1].a_len * 512;
+ ext_size = b[extent+1].a_len * 512;
}
while (extent < FILE_INFO->extents && offset>ext_size);
}
@@ -223,16 +223,16 @@
{
offset = VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset;
+ curr_len = b[0].a_len * 512 - offset;
}
curr_pos = addr;
if (curr_len > len)
curr_len = len;
- for (curr_ext=extent;
- curr_ext < FILE_INFO->extents;
- curr_len = a[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext++)
+ for (curr_exten = extent;
+ curr_exten < FILE_INFO->extents;
+ curr_len = b[curr_exten].a_len * 512, curr_pos += curr_len, curr_exten++)
{
ret += curr_len;
size -= curr_len;
@@ -242,7 +242,7 @@
curr_len += size;
}
- devread (a[curr_ext].a_start,offset, curr_len, curr_pos);
+ devread (b[curr_exten].a_start, offset, curr_len, curr_pos);
offset = 0;
}
diff -Naur grub-0.97.orig/stage2/fsys_xfs.c grub-0.97/stage2/fsys_xfs.c
--- grub-0.97.orig/stage2/fsys_xfs.c 2005-05-07 19:15:55.000000000 -0700
+++ grub-0.97/stage2/fsys_xfs.c 2006-05-28 20:28:41.586818535 -0700
@@ -97,7 +97,7 @@
return ino & XFS_INO_MASK(XFS_INO_OFFSET_BITS);
}
-static inline __const__ xfs_uint16_t
+static inline __attribute__((const)) xfs_uint16_t
le16 (xfs_uint16_t x)
{
__asm__("xchgb %b0,%h0" \
@@ -106,7 +106,7 @@
return x;
}
-static inline __const__ xfs_uint32_t
+static inline __attribute__((const)) xfs_uint32_t
le32 (xfs_uint32_t x)
{
#if 0
@@ -122,7 +122,7 @@
return x;
}
-static inline __const__ xfs_uint64_t
+static inline __attribute__((const)) xfs_uint64_t
le64 (xfs_uint64_t x)
{
xfs_uint32_t h = x >> 32;
@@ -368,7 +368,7 @@
default:
namelen = sfe->namelen;
*ino = sf_ino ((char *)sfe, namelen);
- name = sfe->name;
+ name = (char *) sfe->name;
sfe = (xfs_dir2_sf_entry_t *)
((char *)sfe + namelen + 11 - xfs.i8param);
}
diff -Naur grub-0.97.orig/stage2/gunzip.c grub-0.97/stage2/gunzip.c
--- grub-0.97.orig/stage2/gunzip.c 2003-07-09 04:45:53.000000000 -0700
+++ grub-0.97/stage2/gunzip.c 2006-05-28 20:28:41.586818535 -0700
@@ -277,7 +277,7 @@
* is a compressed file, and simply mark it as such.
*/
if (no_decompression
- || grub_read (buf, 10) != 10
+ || grub_read ((char *) buf, 10) != 10
|| ((*((unsigned short *) buf) != GZIP_HDR_LE)
&& (*((unsigned short *) buf) != OLD_GZIP_HDR_LE)))
{
@@ -293,7 +293,7 @@
if (buf[2] != DEFLATED
|| (buf[3] & UNSUPP_FLAGS)
|| ((buf[3] & EXTRA_FIELD)
- && (grub_read (buf, 2) != 2
+ && (grub_read ((char *) buf, 2) != 2
|| bad_field (*((unsigned short *) buf))))
|| ((buf[3] & ORIG_NAME) && bad_field (-1))
|| ((buf[3] & COMMENT) && bad_field (-1)))
@@ -308,7 +308,7 @@
filepos = filemax - 8;
- if (grub_read (buf, 8) != 8)
+ if (grub_read ((char *) buf, 8) != 8)
{
if (! errnum)
errnum = ERR_BAD_GZIP_HEADER;
@@ -485,8 +485,8 @@
#define INBUFSIZ 0x2000
-static uch inbuf[INBUFSIZ];
-static int bufloc;
+static unsigned char inbuf[INBUFSIZ];
+static int bufloc;
static int
get_byte (void)
@@ -494,7 +494,7 @@
if (filepos == gzip_data_offset || bufloc == INBUFSIZ)
{
bufloc = 0;
- grub_read (inbuf, INBUFSIZ);
+ grub_read ((char *) inbuf, INBUFSIZ);
}
return inbuf[bufloc++];
@@ -925,7 +925,7 @@
unsigned m; /* mask for bit lengths table */
unsigned n; /* number of lengths to get */
unsigned nb; /* number of bit length codes */
- unsigned nl; /* number of literal/length codes */
+ unsigned nc; /* number of literal/length codes */
unsigned nd; /* number of distance codes */
unsigned ll[286 + 30]; /* literal/length and distance code lengths */
register ulg b; /* bit buffer */
@@ -937,7 +937,7 @@
/* read in table lengths */
NEEDBITS (5);
- nl = 257 + ((unsigned) b & 0x1f); /* number of literal/length codes */
+ nc = 257 + ((unsigned) b & 0x1f); /* number of literal/length codes */
DUMPBITS (5);
NEEDBITS (5);
nd = 1 + ((unsigned) b & 0x1f); /* number of distance codes */
@@ -945,7 +945,7 @@
NEEDBITS (4);
nb = 4 + ((unsigned) b & 0xf); /* number of bit length codes */
DUMPBITS (4);
- if (nl > 286 || nd > 30)
+ if (nc > 286 || nd > 30)
{
errnum = ERR_BAD_GZIP_DATA;
return;
@@ -970,7 +970,7 @@
}
/* read in literal and distance code lengths */
- n = nl + nd;
+ n = nc + nd;
m = mask_bits[bl];
i = l = 0;
while ((unsigned) i < n)
@@ -1034,7 +1034,7 @@
/* build the decoding tables for literal/length and distance codes */
bl = lbits;
- if ((i = huft_build (ll, nl, 257, cplens, cplext, &tl, &bl)) != 0)
+ if ((i = huft_build (ll, nc, 257, cplens, cplext, &tl, &bl)) != 0)
{
#if 0
if (i == 1)
@@ -1045,7 +1045,7 @@
return;
}
bd = dbits;
- if ((i = huft_build (ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
+ if ((i = huft_build (ll + nc, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
{
#if 0
if (i == 1)
diff -Naur grub-0.97.orig/stage2/md5.c grub-0.97/stage2/md5.c
--- grub-0.97.orig/stage2/md5.c 2003-07-09 04:45:53.000000000 -0700
+++ grub-0.97/stage2/md5.c 2006-05-28 20:28:41.590818435 -0700
@@ -166,7 +166,7 @@
inputlen -= 64 - buflen;
while (inputlen >= 64)
{
- md5_transform (input);
+ md5_transform ((unsigned char *) input);
input += 64;
inputlen -= 64;
}
@@ -211,7 +211,7 @@
char *p;
int saltlen;
int i, n;
- unsigned char alt_result[16];
+ char alt_result[16];
unsigned char *digest;
if (check)
diff -Naur grub-0.97.orig/stage2/start_eltorito.S grub-0.97/stage2/start_eltorito.S
--- grub-0.97.orig/stage2/start_eltorito.S 2004-03-27 08:14:20.000000000 -0800
+++ grub-0.97/stage2/start_eltorito.S 2006-05-28 20:31:17.770936712 -0700
@@ -40,9 +40,9 @@
#define ABS(x) (x-_start+BOOTSEC_LOCATION)
#ifdef STAGE1_5
-# define STAGE_ADDR 0x2000
+# define STAGE_ADDR 0x2200
#else
-# define STAGE_ADDR 0x8000
+# define STAGE_ADDR 0x8200
#endif /* STAGE1_5 */
/* Print message string */
@@ -71,12 +71,14 @@
. = _start + 8 /* Pad to file offset 8 */
/* This table gets filled in by mkisofs using the
- -boot-info-table option */
-bi_pvd: .long 0xDEADBEEF /* LBA of primary volume descript */
-bi_file: .long 0xDEADBEEF /* LBA of boot file */
-bi_length: .long 0xDEADBEEF /* Length of boot file */
-bi_csum: .long 0xDEADBEEF /* Checksum of boot file */
-bi_reserved: .space (10*4) /* Reserved */
+ -boot-info-table option If not, the values in this
+ table are default values that we can use to get us
+ what we need, at least under a certain set of assumptions. */
+bi_pvd: .long 16 /* LBA of primary volume descript */
+bi_file: .long 0 /* LBA of boot file */
+bi_length: .long 0xDEADBEEF /* Length of boot file */
+bi_csum: .long 0xDEADBEEF /* Checksum of boot file */
+bi_reserved: .space (10*4) /* Reserved */
real_start:
xor %ax, %ax
@@ -92,10 +94,28 @@
/* save drive reference first thing! */
mov %dl, ABS(BootDrive)
- /* print a notification message on the screen */
- MSG(notification_string)
+ /* check if machine support IBM/MS int 13h extensions */
+ mov $0x41, %ah
+ mov $0x55AA, %bx
+ int $0x13
+ jnc load_image
+
+ /* bios doesn't support int 13h extensions, print error messages */
+ MSG(int13_error_string1)
+ MSG(notification_done)
+ MSG(int13_error_string2)
+ MSG(notification_done)
+ MSG(int13_error_string3)
+ MSG(notification_done)
+ /* even when bios says that it doesn't support int 13h
+ extensions, do not stop here and try to load image anyway,
+ because some bioses says that there isn't support for
+ extended functions but have the needed extended read function
+ (int 13h, function AH=42h) */
load_image:
+ /* print a notification message on the screen */
+ MSG(notification_string)
/* Set up boot file sector, size, load address */
mov ABS(bi_length), %eax
add $(ISO_SECTOR_SIZE-1), %eax
@@ -105,6 +125,8 @@
mov %bx, %es
xor %bx, %bx
mov ABS(bi_file), %eax
+ inc %eax /* do not reload the first sector (this code) */
+ dec %bp /* this way we have more room for code in stage1 */
call getlinsec
mov %ds, %ax
mov %ax, %es
@@ -115,7 +137,7 @@
mov $ABS(firstlist - BOOTSEC_LISTSIZE), %si
mov (%si), %ebp
mov ABS(BootDrive), %dl /* this makes sure %dl is our "boot" drive */
- ljmp $0, $(STAGE_ADDR+SECTOR_SIZE) /* jump to main() in asm.S */
+ ljmp $0, $(STAGE_ADDR) /* jump to main() in asm.S */
/* go here when you need to stop the machine hard after an error condition */
stop: jmp stop
@@ -171,11 +193,11 @@
*/
xint13:
movb $6, ABS(RetryCount)
- pushal
.try:
+ pushal
int $0x13
jc 1f
- add $(8*4), %sp /* Clean up stack */
+ popal /* Clean up stack */
ret
1:
mov %ah, %dl /* Save error code */
@@ -276,6 +298,10 @@
read_error_string: .string "Read error 0x"
+int13_error_string1: .string "Support for IBM/MS INT 13h extensions not found"
+int13_error_string2: .string "GRUB cannot be loaded if int 13h/function AH=42h isn't present"
+int13_error_string3: .string "Trying to load stage 2 anyway..."
+
/*
* EBIOS disk address packet
*/
@@ -306,7 +332,8 @@
.word 0
.word 0
- . = _start + SECTOR_SIZE - BOOTSEC_LISTSIZE
+ /* size of the code we can place between main body and fixed top location */
+ . = _start + 1536 - BOOTSEC_LISTSIZE
/* fill the first data listing with the default */
blocklist_default_start:/* this is the sector start parameter, in logical
@@ -321,6 +348,12 @@
#endif
blocklist_default_seg: /* this is the segment of the starting address
to load the data into */
- .word (STAGE_ADDR + SECTOR_SIZE) >> 4
+ .word (STAGE_ADDR) >> 4
firstlist: /* this label has to be after the list data!!! */
+
+ /* this is a workaround to allow more code to be added in stage1,
+ it allows more code to be added for this stage, but for this
+ we can't reload the first sector. So we have to align the code
+ to ISO_SECTOR_SIZE. */
+ . = _start + ISO_SECTOR_SIZE
diff -Naur grub-0.97.orig/util/grub-install.in grub-0.97/util/grub-install.in
--- grub-0.97.orig/util/grub-install.in 2004-07-24 11:57:31.000000000 -0700
+++ grub-0.97/util/grub-install.in 2006-05-28 20:30:31.484088268 -0700
@@ -336,6 +336,10 @@
# Create a safe temporary file.
test -n "$mklog" && log_file=`$mklog`
+ # Before all invocations of the grub shell, call sync to make sure
+ # the raw device is in sync with any bufferring in filesystems.
+ sync
+
$grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
quit
EOF
@@ -450,6 +454,10 @@
# Create a safe temporary file.
test -n "$mklog" && log_file=`$mklog`
+# Before all invocations of the grub shell, call sync to make sure
+# the raw device is in sync with any bufferring in filesystems.
+sync
+
# Now perform the installation.
$grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
root $root_drive

View File

@@ -0,0 +1,37 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-08-30
Initial Package Version: 1.4.2
Upstream Status: From upstream
Origin: Greg Schafer <gschafer@zip.com.au> (http://www.diy-linux.org/downloads/patches/GCC4/inetutils-1.4.2-gcc4-fixes-1.patch)
Description: Fix compilation issues with gcc4
diff -Naur inetutils-1.4.2.orig/ftp/ftp_var.h inetutils-1.4.2/ftp/ftp_var.h
--- inetutils-1.4.2.orig/ftp/ftp_var.h 2000-07-08 01:00:53.000000000 +0000
+++ inetutils-1.4.2/ftp/ftp_var.h 2005-08-30 20:25:27.205932304 +0000
@@ -36,8 +36,6 @@
#include <sys/param.h>
#include <setjmp.h>
-#include "extern.h"
-
#ifndef FTP_EXTERN
#define FTP_EXTERN extern
#endif
@@ -129,3 +127,5 @@
FTP_EXTERN int macnum; /* number of defined macros */
FTP_EXTERN struct macel macros[16];
FTP_EXTERN char macbuf[4096];
+
+#include "extern.h"
diff -Naur inetutils-1.4.2.orig/libinetutils/ttymsg.c inetutils-1.4.2/libinetutils/ttymsg.c
--- inetutils-1.4.2.orig/libinetutils/ttymsg.c 2001-11-01 15:52:19.000000000 +0000
+++ inetutils-1.4.2/libinetutils/ttymsg.c 2005-08-30 20:24:27.168059448 +0000
@@ -132,7 +132,7 @@
}
if (wret)
{
- (char *)iov->iov_base += wret;
+ iov->iov_base = (char *)iov->iov_base + wret;
iov->iov_len -= wret;
}
continue;

View File

@@ -0,0 +1,116 @@
Submitted By: Greg Schafer <gschafer at zip dot com dot au>
Date: 2003-12-11
Initial Package Version: 1.4.2
Origin: Greg Schafer
Description: Prevent installation of unwanted server man pages.
diff -Naur inetutils-1.4.2.orig/ftpd/Makefile.in inetutils-1.4.2/ftpd/Makefile.in
--- inetutils-1.4.2.orig/ftpd/Makefile.in 2002-12-23 04:30:12.000000000 +0000
+++ inetutils-1.4.2/ftpd/Makefile.in 2003-12-11 02:21:24.222010104 +0000
@@ -177,7 +177,6 @@
noinst_HEADERS = extern.h
-man_MANS = ftpd.8
INCLUDES = $(PATHDEF_FTPWELCOME) $(PATHDEF_FTPUSERS) \
$(PATHDEF_FTPLOGINMESG) $(PATHDEF_FTPCHROOT) $(PATHDEF_FTPDPID) \
diff -Naur inetutils-1.4.2.orig/inetd/Makefile.in inetutils-1.4.2/inetd/Makefile.in
--- inetutils-1.4.2.orig/inetd/Makefile.in 2002-12-23 04:30:13.000000000 +0000
+++ inetutils-1.4.2/inetd/Makefile.in 2003-12-11 02:21:24.223009952 +0000
@@ -172,7 +172,6 @@
inetd_SOURCES = inetd.c
-man_MANS = inetd.8
INCLUDES = $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/logger/Makefile.in inetutils-1.4.2/logger/Makefile.in
--- inetutils-1.4.2.orig/logger/Makefile.in 2002-12-23 04:30:16.000000000 +0000
+++ inetutils-1.4.2/logger/Makefile.in 2003-12-11 02:21:24.224009800 +0000
@@ -175,7 +175,6 @@
logger_SOURCES = logger.c
-man_MANS = logger.1
EXTRA_DIST = $(man_MANS)
subdir = logger
diff -Naur inetutils-1.4.2.orig/rexecd/Makefile.in inetutils-1.4.2/rexecd/Makefile.in
--- inetutils-1.4.2.orig/rexecd/Makefile.in 2002-12-23 04:30:17.000000000 +0000
+++ inetutils-1.4.2/rexecd/Makefile.in 2003-12-11 02:21:24.225009648 +0000
@@ -173,7 +173,6 @@
rexecd_SOURCES = rexecd.c
-man_MANS = rexecd.8
INCLUDES = $(PATHDEF_DEFPATH) $(PATHDEF_BSHELL) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/rlogind/Makefile.in inetutils-1.4.2/rlogind/Makefile.in
--- inetutils-1.4.2.orig/rlogind/Makefile.in 2002-12-23 04:30:18.000000000 +0000
+++ inetutils-1.4.2/rlogind/Makefile.in 2003-12-11 02:21:24.225009648 +0000
@@ -173,7 +173,6 @@
rlogind_SOURCES = rlogind.c
-man_MANS = rlogind.8
INCLUDES = $(PATHDEF_DEV) $(PATHDEF_LOGIN) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/rshd/Makefile.in inetutils-1.4.2/rshd/Makefile.in
--- inetutils-1.4.2.orig/rshd/Makefile.in 2002-12-23 04:30:19.000000000 +0000
+++ inetutils-1.4.2/rshd/Makefile.in 2003-12-11 02:21:24.226009496 +0000
@@ -172,7 +172,6 @@
rshd_SOURCES = rshd.c
-man_MANS = rshd.8
INCLUDES = $(PATHDEF_BSHELL) $(PATHDEF_NOLOGIN) $(PATHDEF_DEFPATH) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/syslogd/Makefile.in inetutils-1.4.2/syslogd/Makefile.in
--- inetutils-1.4.2.orig/syslogd/Makefile.in 2002-12-23 04:30:19.000000000 +0000
+++ inetutils-1.4.2/syslogd/Makefile.in 2003-12-11 02:21:24.226009496 +0000
@@ -172,7 +172,6 @@
syslogd_SOURCES = syslogd.c
-man_MANS = syslog.conf.5 syslogd.8
INCLUDES = $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGPID) \
$(PATHDEF_CONSOLE) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/talkd/Makefile.in inetutils-1.4.2/talkd/Makefile.in
--- inetutils-1.4.2.orig/talkd/Makefile.in 2002-12-23 04:30:20.000000000 +0000
+++ inetutils-1.4.2/talkd/Makefile.in 2003-12-11 02:21:24.227009344 +0000
@@ -180,7 +180,6 @@
intalkd.h
-man_MANS = talkd.8
INCLUDES = $(PATHDEF_DEV) -I${top_srcdir}/libinetutils -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/telnetd/Makefile.in inetutils-1.4.2/telnetd/Makefile.in
--- inetutils-1.4.2.orig/telnetd/Makefile.in 2002-12-23 04:30:21.000000000 +0000
+++ inetutils-1.4.2/telnetd/Makefile.in 2003-12-11 02:21:24.228009192 +0000
@@ -176,7 +176,6 @@
noinst_HEADERS = telnetd.h
-man_MANS = telnetd.8
INCLUDES = $(PATHDEF_DEV) $(PATHDEF_TTY) $(PATHDEF_LOGIN) -I$(top_builddir)/include \
-I$(top_srcdir) @INCAUTH@
diff -Naur inetutils-1.4.2.orig/tftpd/Makefile.in inetutils-1.4.2/tftpd/Makefile.in
--- inetutils-1.4.2.orig/tftpd/Makefile.in 2002-12-23 04:30:22.000000000 +0000
+++ inetutils-1.4.2/tftpd/Makefile.in 2003-12-11 02:21:24.229009040 +0000
@@ -174,7 +174,6 @@
tftpd_SOURCES = tftpd.c
-man_MANS = tftpd.8
LDADD = -L../libinetutils -linetutils

View File

@@ -0,0 +1,232 @@
Submitted By: Alexander E. Patrakov
Date: 2005-05-16
Initial Package Version: 1.12
Upstream Status: Not submitted, possibly incomplete
Description: Makes Backspace and Delete keys consistent in all i386 keymaps.
Obsoletes the /etc/kbd/bs-sends-del file for i386.
diff -urN kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-l.map kbd-1.12/data/keymaps/i386/dvorak/dvorak-l.map
--- kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-l.map 2002-10-11 17:08:51.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/dvorak/dvorak-l.map 2005-05-16 19:54:48.000000000 +0600
@@ -43,7 +43,7 @@
keycode 11 = three numbersign
keycode 12 = two at
keycode 13 = one exclam
- keycode 14 = BackSpace Delete
+ keycode 14 = Delete Delete
! --------------------------------------------------------------------------
! Row 3
! --------------------------------------------------------------------------
diff -urN kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-r.map kbd-1.12/data/keymaps/i386/dvorak/dvorak-r.map
--- kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-r.map 2002-10-11 17:08:51.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/dvorak/dvorak-r.map 2005-05-16 19:54:48.000000000 +0600
@@ -43,7 +43,7 @@
keycode 11 = slash question
keycode 12 = bracketleft braceleft
keycode 13 = bracketright braceright
- keycode 14 = BackSpace Delete
+ keycode 14 = Delete Delete
! --------------------------------------------------------------------------
! Row 3
! --------------------------------------------------------------------------
diff -urN kbd-1.12.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.12/data/keymaps/i386/fgGIod/tr_f-latin5.map
--- kbd-1.12.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map 2002-10-13 06:21:12.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/fgGIod/tr_f-latin5.map 2005-05-16 19:54:48.000000000 +0600
@@ -51,7 +51,7 @@
alt keycode 12 = Meta_minus
keycode 13 = minus underscore
alt keycode 13 = Meta_equal
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab
alt keycode 15 = Meta_Tab
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/lt.l4.map kbd-1.12/data/keymaps/i386/qwerty/lt.l4.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/lt.l4.map 2002-10-13 05:59:51.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/lt.l4.map 2005-05-16 19:54:48.000000000 +0600
@@ -205,7 +205,7 @@
# edit this if you want the key above <Enter> to delete symbols above
# cursor, not before.
keycode 14 = \
- BackSpace BackSpace BackSpace BackSpace \
+ Delete Delete Delete Delete \
Delete Delete Delete Delete \
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
@@ -506,7 +506,7 @@
# Edit this if you want strict VT100 emulation.
string F111 = "\033[3$"
-keycode 111 = Delete F111 Delete F111 \
+keycode 111 = Remove F111 Remove F111 \
Remove Remove Remove Remove \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
Boot Boot Boot Boot
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/lt.map kbd-1.12/data/keymaps/i386/qwerty/lt.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/lt.map 2002-10-13 06:00:25.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/lt.map 2005-05-16 19:54:48.000000000 +0600
@@ -204,7 +204,7 @@
# edit this if you want the key above <Enter> to delete symbols above
# cursor, not before.
keycode 14 = \
- BackSpace BackSpace BackSpace BackSpace \
+ Delete Delete Delete Delete \
Delete Delete Delete Delete \
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
@@ -505,7 +505,7 @@
# Edit this if you want strict VT100 emulation.
string F111 = "\033[3$"
-keycode 111 = Delete F111 Delete F111 \
+keycode 111 = Remove F111 Remove F111 \
Remove Remove Remove Remove \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
Boot Boot Boot Boot
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/no-latin1.map kbd-1.12/data/keymaps/i386/qwerty/no-latin1.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/no-latin1.map 2002-10-11 17:08:49.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/no-latin1.map 2005-05-16 19:54:48.000000000 +0600
@@ -3,7 +3,7 @@
# Send comments to Kjetil T. Homme <kjetilho@ifi.uio.no>
include "linux-with-alt-and-altgr"
plain keycode 83 = KP_Comma
- plain keycode 111 = Delete # "Remove" originally, weird...
+ plain keycode 111 = Remove
strings as usual
keycode 1 = Escape
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru-ms.map kbd-1.12/data/keymaps/i386/qwerty/ru-ms.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru-ms.map 2002-10-13 06:07:05.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ru-ms.map 2005-05-16 19:54:48.000000000 +0600
@@ -89,8 +89,8 @@
altgr alt keycode 13 = Meta_equal
shift alt keycode 13 = Meta_plus
altgr shift alt keycode 13 = Meta_plus
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
-# keycode 14 = Delete Delete Delete Delete
+# keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
altgr alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru.map kbd-1.12/data/keymaps/i386/qwerty/ru.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru.map 2002-10-13 06:02:19.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ru.map 2005-05-16 19:56:08.000000000 +0600
@@ -37,7 +37,7 @@
alt keycode 12 = Meta_minus
keycode 13 = equal plus equal plus
alt keycode 13 = Meta_equal
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
alt keycode 15 = Meta_Tab
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru1.map kbd-1.12/data/keymaps/i386/qwerty/ru1.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru1.map 2002-10-13 06:02:30.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ru1.map 2005-05-16 19:55:32.000000000 +0600
@@ -143,8 +143,8 @@
# The keycode "0xFF" is too dangerous for many programs (including emacs).
# So let it be bracket instead of Hard Sign.
-# altgr keycode 27 = +0xDF
-# altgr shift keycode 27 = +0xFF
+altgr keycode 27 = +0xDF
+altgr shift keycode 27 = +0xFF
control keycode 27 = Control_bracketright
altgr control keycode 27 = Control_bracketright
alt keycode 27 = Meta_bracketright
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru2.map kbd-1.12/data/keymaps/i386/qwerty/ru2.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru2.map 2002-10-13 06:05:47.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ru2.map 2005-05-16 19:56:52.000000000 +0600
@@ -46,7 +46,7 @@
alt keycode 12 = Meta_minus
keycode 13 = equal plus equal plus
alt keycode 13 = Meta_equal
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
alt keycode 15 = Meta_Tab
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/se-ir209.map kbd-1.12/data/keymaps/i386/qwerty/se-ir209.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/se-ir209.map 2002-10-13 06:12:48.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/se-ir209.map 2005-05-16 19:54:48.000000000 +0600
@@ -345,7 +345,7 @@
keycode 109 = Next Scroll_Forward
keycode 110 = Insert
- keycode 111 = Delete # "Remove" originally, weird...
+ keycode 111 = Remove
control alt keycode 111 = Boot
control altgr keycode 111 = Boot
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/se-lat6.map kbd-1.12/data/keymaps/i386/qwerty/se-lat6.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/se-lat6.map 2002-10-13 06:13:01.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/se-lat6.map 2005-05-16 19:54:48.000000000 +0600
@@ -374,6 +374,6 @@
keycode 109 = Next Scroll_Forward
keycode 110 = Insert
- keycode 111 = Delete # "Remove" originally, weird...
+ keycode 111 = Remove
control alt keycode 111 = Boot
control altgr keycode 111 = Boot
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/tr_q-latin5.map kbd-1.12/data/keymaps/i386/qwerty/tr_q-latin5.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/tr_q-latin5.map 2002-10-11 17:08:49.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/tr_q-latin5.map 2005-05-16 19:54:48.000000000 +0600
@@ -49,7 +49,7 @@
alt keycode 12 = Meta_minus
keycode 13 = minus underscore
alt keycode 13 = Meta_equal
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab
alt keycode 15 = Meta_Tab
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.12/data/keymaps/i386/qwerty/ua-utf-ws.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf-ws.map 2002-10-13 06:07:56.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-utf-ws.map 2005-05-16 19:54:48.000000000 +0600
@@ -260,7 +260,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf.map kbd-1.12/data/keymaps/i386/qwerty/ua-utf.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf.map 2002-10-13 06:08:07.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-utf.map 2005-05-16 19:54:48.000000000 +0600
@@ -250,7 +250,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-ws.map kbd-1.12/data/keymaps/i386/qwerty/ua-ws.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-ws.map 2002-10-13 06:08:19.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-ws.map 2005-05-16 19:54:48.000000000 +0600
@@ -260,7 +260,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua.map kbd-1.12/data/keymaps/i386/qwerty/ua.map
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua.map 2002-10-13 06:08:31.000000000 +0600
+++ kbd-1.12/data/keymaps/i386/qwerty/ua.map 2005-05-16 19:54:48.000000000 +0600
@@ -249,7 +249,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace

View File

@@ -0,0 +1,54 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-07-28
Initial Package Version: 1.12
Upstream Status: Unknown
Origin: http://cvs.fedora.redhat.com/viewcvs/devel/kbd/kbd-1.12-alias.patch?rev=1.2&view=markup
Description: Fix violations of C aliasing rules, triggered by gcc4.
diff -Naur kbd-1.12.orig/src/psffontop.c kbd-1.12/src/psffontop.c
--- kbd-1.12.orig/src/psffontop.c 2004-01-16 19:45:31.000000000 +0000
+++ kbd-1.12/src/psffontop.c 2005-07-28 20:33:57.946088984 +0000
@@ -59,7 +59,6 @@
static unsigned int
assemble_ucs2(char **inptr, int cnt) {
- unsigned char **in = (unsigned char **) inptr;
unsigned int u1, u2;
if (cnt < 2) {
@@ -68,8 +67,8 @@
exit(EX_DATAERR);
}
- u1 = *(*in)++;
- u2 = *(*in)++;
+ u1 = (unsigned char)*(*inptr)++;
+ u2 = (unsigned char)*(*inptr)++;
return (u1 | (u2 << 8));
}
@@ -110,7 +109,6 @@
*/
static void
get_uni_entry(char **inptr, char **endptr, struct unicode_list *up, int utf8) {
- unsigned char **in = (unsigned char **) inptr;
unsigned char uc;
unicode unichar;
int inseq = 0;
@@ -126,14 +124,14 @@
exit(EX_DATAERR);
}
if (utf8) {
- uc = *(*in)++;
+ uc = *(*inptr)++;
if (uc == PSF2_SEPARATOR)
break;
if (uc == PSF2_STARTSEQ) {
inseq = 1;
continue;
}
- --(*in);
+ --(*inptr);
unichar = assemble_utf8(inptr, *endptr - *inptr);
} else {
unichar = assemble_ucs2(inptr, *endptr - *inptr);

View File

@@ -0,0 +1,115 @@
Submitted By: Dan Nicholson <dnicholson at linuxfromscratch dot org>
Date: 2006-08-01
Initial Package Version: 2.6.12.0
Origin: linux-2.6.16 series, syscalls diffed by Alexander Patrakov
Upstream Status: Project is dead
Description: Adds userspace headers and syscalls for inotify
Testcase: dovecot-1.0rc2, ./configure --with-notify=inotify
diff -pNur linux-libc-headers-2.6.12.0.orig/include/asm-i386/unistd.h linux-libc-headers-2.6.12.0/include/asm-i386/unistd.h
--- linux-libc-headers-2.6.12.0.orig/include/asm-i386/unistd.h 2005-07-06 00:17:47.000000000 +0000
+++ linux-libc-headers-2.6.12.0/include/asm-i386/unistd.h 2006-08-01 05:56:42.000000000 +0000
@@ -294,8 +294,13 @@
#define __NR_add_key 286
#define __NR_request_key 287
#define __NR_keyctl 288
+/* #define __NR_ioprio_set 289 */
+/* #define __NR_ioprio_get 290 */
+#define __NR_inotify_init 291
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_rm_watch 293
-#define NR_syscalls 289
+#define NR_syscalls 294
/*
* user-visible error numbers are in the range -1 - -128: see
diff -pNur linux-libc-headers-2.6.12.0.orig/include/asm-ppc/unistd.h linux-libc-headers-2.6.12.0/include/asm-ppc/unistd.h
--- linux-libc-headers-2.6.12.0.orig/include/asm-ppc/unistd.h 2005-07-06 00:17:23.000000000 +0000
+++ linux-libc-headers-2.6.12.0/include/asm-ppc/unistd.h 2006-08-01 05:56:42.000000000 +0000
@@ -277,8 +277,13 @@
#define __NR_request_key 270
#define __NR_keyctl 271
#define __NR_waitid 272
+/* #define __NR_ioprio_set 273 */
+/* #define __NR_ioprio_get 274 */
+#define __NR_inotify_init 275
+#define __NR_inotify_add_watch 276
+#define __NR_inotify_rm_watch 277
-#define __NR_syscalls 273
+#define __NR_syscalls 278
#define __NR(n) #n
diff -pNur linux-libc-headers-2.6.12.0.orig/include/linux/inotify.h linux-libc-headers-2.6.12.0/include/linux/inotify.h
--- linux-libc-headers-2.6.12.0.orig/include/linux/inotify.h 1970-01-01 00:00:00.000000000 +0000
+++ linux-libc-headers-2.6.12.0/include/linux/inotify.h 2006-08-01 05:56:42.000000000 +0000
@@ -0,0 +1,67 @@
+/*
+ * Inode based directory notification for Linux
+ *
+ * Copyright (C) 2005 John McCutchan
+ */
+
+#ifndef _LINUX_INOTIFY_H
+#define _LINUX_INOTIFY_H
+
+#include <linux/types.h>
+
+/*
+ * struct inotify_event - structure read from the inotify device for each event
+ *
+ * When you are watching a directory, you will receive the filename for events
+ * such as IN_CREATE, IN_DELETE, IN_OPEN, IN_CLOSE, ..., relative to the wd.
+ */
+struct inotify_event {
+ __s32 wd; /* watch descriptor */
+ __u32 mask; /* watch mask */
+ __u32 cookie; /* cookie to synchronize two events */
+ __u32 len; /* length (including nulls) of name */
+ char name[0]; /* stub for possible name */
+};
+
+/* the following are legal, implemented events that user-space can watch for */
+#define IN_ACCESS 0x00000001 /* File was accessed */
+#define IN_MODIFY 0x00000002 /* File was modified */
+#define IN_ATTRIB 0x00000004 /* Metadata changed */
+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
+#define IN_OPEN 0x00000020 /* File was opened */
+#define IN_MOVED_FROM 0x00000040 /* File was moved from X */
+#define IN_MOVED_TO 0x00000080 /* File was moved to Y */
+#define IN_CREATE 0x00000100 /* Subfile was created */
+#define IN_DELETE 0x00000200 /* Subfile was deleted */
+#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
+#define IN_MOVE_SELF 0x00000800 /* Self was moved */
+
+/* the following are legal events. they are sent as needed to any watch */
+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
+#define IN_IGNORED 0x00008000 /* File was ignored */
+
+/* helper events */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */
+
+/* special flags */
+#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */
+#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */
+#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */
+#define IN_ISDIR 0x40000000 /* event occurred against dir */
+#define IN_ONESHOT 0x80000000 /* only send event once */
+
+/*
+ * All of the events - we build the list by hand so that we can add flags in
+ * the future and not break backward compatibility. Apps will get only the
+ * events that they originally wanted. Be sure to add new events here!
+ */
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
+ IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
+ IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
+ IN_MOVE_SELF)
+
+
+#endif /* _LINUX_INOTIFY_H */

View File

@@ -0,0 +1,111 @@
Submitted By: Tushar Teredesai <tushar@linuxfromscratch.org>
Date: 2005-07-25
Initial Package Version: 1.5
Upstream Status: Sent, no response yet.
Origin: http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003-April/033602.html
http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003-June/035234.html
http://linuxfromscratch.org/pipermail/lfs-dev/2005-June/051908.html
Description: Add tempfile wrapper script. Use "make install-tempfile" to install it.
diff -Naur mktemp-1.5.orig/Makefile.in mktemp-1.5/Makefile.in
--- mktemp-1.5.orig/Makefile.in 2003-03-23 18:09:56.000000000 -0700
+++ mktemp-1.5/Makefile.in 2005-07-25 11:11:11.000000000 -0600
@@ -113,6 +113,9 @@
install-man:
$(INSTALL) -m 0444 $(srcdir)/$(PROG).$(mantype) $(mandir)/man1/$(PROG).1
+install-tempfile: $(srcdir)/tempfile
+ $(INSTALL) -m 0555 $(srcdir)/tempfile $(bindir)/tempfile
+
check:
@echo nothing to check
diff -Naur mktemp-1.5.orig/tempfile mktemp-1.5/tempfile
--- mktemp-1.5.orig/tempfile 1969-12-31 17:00:00.000000000 -0700
+++ mktemp-1.5/tempfile 2005-07-25 11:13:41.000000000 -0600
@@ -0,0 +1,85 @@
+#!/bin/bash
+# A tempfile wrapper for mktemp
+# Note: If you can, avoid using tempfile and use mktemp instead.
+# This wrapper is provided for compatibility since some scripts use
+# tempfile. If possible, the best solution is to patch the scripts
+# to use mktemp.
+#
+# Copyright (c) Tushar Teredesai <tush@yahoo.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Usage info
+usage()
+{
+ echo "Usage: tempfile [OPTION]"
+ echo
+ echo "Create a temporary file in a safe manner."
+ echo "This version is a wrapper that invokes mktemp."
+ echo "NOTE: Do not use tempfile in your scripts."
+ echo " Use mktemp instead."
+ echo
+ echo "[-d|--directory] DIR -> place temporary file in DIR"
+ echo "[-p|--prefix] PREFIX -> ignored"
+ echo "[-s|--suffix] SUFFIX -> ignored"
+ echo "[-n|--name] NAME -> ignored"
+ echo "[-m|--mode] MODE -> ignored"
+ echo "--version -> output version information and exit"
+}
+
+# parse all arguments
+while [ $# != 0 ]
+do
+ case "$1" in
+ # -d for tempfile is equivalent to -p for mktemp
+ -d|--directory)
+ dir="$2"
+ shift 2
+ ;;
+ --directory=*)
+ dir="${1#--directory=}"
+ shift 1
+ ;;
+ -d*)
+ dir="${1#-d}"
+ shift 1
+ ;;
+ # The following switches are ignored.
+ -p|--prefix|-s|--suffix|-n|--name|-m|--mode)
+ shift 2
+ ;;
+ -p*|--prefix=*|-s*|--suffix=*|-n*|--name=*|-m*|--mode=*)
+ shift 1
+ ;;
+ # --version for tempfile is equivalent to -V for mktemp
+ --version)
+ echo "tempfile 1.0 (`mktemp -V 2>/dev/null`)"
+ exit 0
+ ;;
+ # Unknown switch
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+# Use the dir if $TMPDIR is not set.
+if [ -z "$TMPDIR" -a ! -z "$dir" ]
+then
+ export TMPDIR="$dir"
+fi
+# Execute mktemp with proper arguments
+# the -t behaviour of mktemp is the default for tempfile
+exec mktemp -t

View File

@@ -0,0 +1,41 @@
Submitted By: Bruce Dubbs (bdubbs at linuxfromscratch dot org)
Date: 2006-07-15
Initial Package Version: 3.2.2
Origin:
Upstream Status: This is fixed in 3.3-pre1
Description: Updates modprobe functionality to fix problem where
aliases don't quite work properly
--- module-init-tools-3.2.2/modprobe.c 2005-12-01 15:42:09.000000000 -0800
+++ module-init-tools-3.3-pre1/modprobe.c 2006-02-04 15:18:07.000000000 -0800
@@ -990,13 +990,27 @@
return ret;
}
+/* Careful! Don't munge - in [ ] as per Debian Bug#350915 */
static char *underscores(char *string)
{
if (string) {
unsigned int i;
- for (i = 0; string[i]; i++)
- if (string[i] == '-')
- string[i] = '_';
+ int inbracket = 0;
+ for (i = 0; string[i]; i++) {
+ switch (string[i]) {
+ case '[':
+ inbracket++;
+ break;
+ case ']':
+ inbracket--;
+ break;
+ case '-':
+ if (!inbracket)
+ string[i] = '_';
+ }
+ }
+ if (inbracket)
+ warn("Unmatched bracket in %s\n", string);
}
return string;
}

View File

@@ -0,0 +1,23 @@
Submitted By: Alexander E. Patrakov
Date: 2004-05-09
Initial Package Version: 1.4.1
Origin: Alexander E. Patrakov
Upstream status: not submitted yet, probably will not be accepted
Description: Weakens rules for determining whether a character is printable.
Now only bytes < 0x20 and the 0x7f byte are considered to be unprintable.
The original rules were valid for ISO-8859-* and KOI*.
Without this fix, logging meaningful Russian messages in UTF-8 is impossible.
diff -u sysklogd-1.4.1/syslogd.c sysklogd-1.4.1.fixed/syslogd.c
--- sysklogd-1.4.1/syslogd.c 2001-03-12 00:40:10.000000000 +0500
+++ sysklogd-1.4.1.fixed/syslogd.c 2004-05-09 09:05:42.972864104 +0600
@@ -1449,7 +1449,7 @@
else if (c < 040) {
*q++ = '^';
*q++ = c ^ 0100;
- } else if (c == 0177 || (c & 0177) < 040) {
+ } else if (c == 0177) {
*q++ = '\\';
*q++ = '0' + ((c & 0300) >> 6);
*q++ = '0' + ((c & 0070) >> 3);

View File

@@ -0,0 +1,833 @@
Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
Date: 2005-01-23
Initial Package Version: 1.4.1
Upstream Status: Not submitted
Origin: http://www.infodrom.org/projects/sysklogd/cvs.php3
Description: This patch is a cvs snapshot update as of 20050123.
Minus the debain and CVS directories. See the CHANGES.
diff -Naur sysklogd-1.4.1/CHANGES sysklogd-20050123/CHANGES
--- sysklogd-1.4.1/CHANGES 2001-03-11 14:35:51.000000000 -0500
+++ sysklogd-20050123/CHANGES 2005-01-15 14:14:21.000000000 -0500
@@ -1,3 +1,42 @@
+Version 1.4.2
+
+ . Dmitry V. Levin <ldv@altlinux.org>
+ - Close file descriptor in FindSymbolFile() in ksym.c in order not to
+ leak file descriptors.
+ . Solar Designer <solar@openwall.com>
+ - improve crunch_list()
+ - Prevent potential buffer overflow in reading messages from the
+ kernel log ringbuffer.
+ - Ensure that "len" is not placed in a register, and that the
+ endtty() signal handler is not installed too early which could
+ cause a segmentation fault or worse.
+ . Steve Grubb <linux_4ever@yahoo.com>
+ - fix memory calculation in crunch_list()
+ . Martin Schulze <joey@infodrom.org>
+ - klogd will reconnect to the logger (mostly syslogd) after it went
+ away
+ - On heavily loaded system syslog will not spit out error messages
+ anymore when recvfrom() results in EAGAIN
+ - Makefile improvements
+ - Local copy of module.h
+ - Improved sysklogd.8
+ - Always log with syslogd's timezone and locale
+ - Remove trailing newline when forwarding messages
+ . Jon Burgess <Jon_Burgess@eur.3com.com>
+ - Moved the installation of the signal handler up a little bit so it
+ guaranteed to be available when the child is forked, hence, fixing a
+ race condition. This used to create problems with UML and fast
+ machines.
+ . Greg Trounson <gregt@maths.otago.ac.nz>
+ - Improved README.linux
+ . Ulf H<>rnhammar <Ulf.Harnhammar.9485@student.uu.se>
+ - Bondary check for fscanf() in InitKsyms() and CheckMapVersion()
+ . Colin Phipps <cph@cph.demon.co.uk>
+ - Don't block on the network socket in case of package los
+ . Dirk Mueller <mueller@kde.org>
+ - Don't crash when filesize limit is reached (e.g. without LFS)
+
+
Version 1.4.1
. klogd will set the console log level only if `-c' is given on the
@@ -30,3 +69,9 @@
. Olaf Kirch <okir@caldera.de>
- Remove Unix Domain Sockets and switch to Datagram Unix Sockets
. Several bugfixes and improvements, please refer to the .c files
+
+
+Local variables:
+mode: indented-text
+fill-column: 72
+End:
diff -Naur sysklogd-1.4.1/klogd.8 sysklogd-20050123/klogd.8
--- sysklogd-1.4.1/klogd.8 2001-03-11 14:35:51.000000000 -0500
+++ sysklogd-20050123/klogd.8 2001-03-11 18:00:51.000000000 -0500
@@ -321,7 +321,7 @@
.B klogd
to reload the module symbol information whenever a protection fault
is detected. Caution should be used before invoking the program in
-\'paranoid\' mode. The stability of the kernel and the operating
+\&'paranoid\&' mode. The stability of the kernel and the operating
environment is always under question when a protection fault occurs.
Since the klogd daemon must execute system calls in order to read the
module symbol information there is the possibility that the system may
diff -Naur sysklogd-1.4.1/klogd.c sysklogd-20050123/klogd.c
--- sysklogd-1.4.1/klogd.c 2001-03-11 14:40:10.000000000 -0500
+++ sysklogd-20050123/klogd.c 2004-04-29 09:29:03.000000000 -0400
@@ -243,6 +243,9 @@
* people have submitted patches: Troels Walsted Hansen
* <troels@thule.no>, Wolfgang Oertl <Wolfgang.Oertl@uibk.ac.at>
* and Thomas Roessler.
+ * Thu Apr 29 15:24:07 2004: Solar Designer <solar@openwall.com>
+ * Prevent potential buffer overflow in reading messages from the
+ * kernel log rinbuffer.
*/
@@ -938,7 +941,7 @@
* messages into this fresh buffer.
*/
memset(log_buffer, '\0', sizeof(log_buffer));
- if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer))) < 0 )
+ if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer)-1)) < 0 )
{
if ( errno == EINTR )
return;
diff -Naur sysklogd-1.4.1/ksym.c sysklogd-20050123/ksym.c
--- sysklogd-1.4.1/ksym.c 2000-09-12 17:53:31.000000000 -0400
+++ sysklogd-20050123/ksym.c 2004-07-16 02:48:27.000000000 -0400
@@ -105,6 +105,15 @@
*
* Tue Sep 12 23:48:12 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
* Close symbol file in InitKsyms() when an error occurred.
+ *
+ * Thu Apr 29 18:07:16 CEST 2004: Dmitry Levin <ldv@altlinux.org>
+ * Close file descriptor in FindSymbolFile() in order not to leak
+ * file descriptors.
+ *
+ * Fri Jul 16 08:32:49 CEST 2004: Ulf H<>rnhammar <Ulf.Harnhammar.9485@student.uu.se>
+ * Added boundary check for fscanf() in InitKsyms() and
+ * CheckMapVersion() to prevent an unintended crash when reading
+ * an incorrect System.map.
*/
@@ -236,7 +245,7 @@
*/
while ( !feof(sym_file) )
{
- if ( fscanf(sym_file, "%lx %c %s\n", &address, &type, sym)
+ if ( fscanf(sym_file, "%lx %c %511s\n", &address, &type, sym)
!= 3 )
{
Syslog(LOG_ERR, "Error in symbol table input (#1).");
@@ -344,6 +353,7 @@
if ( (sym_file = fopen(symfile, "r")) != (FILE *) 0 ) {
if (CheckMapVersion(symfile) == 1)
file = symfile;
+ fclose (sym_file);
}
if (sym_file == (FILE *) 0 || file == (char *) 0) {
sprintf (symfile, "%s", *mf);
@@ -352,6 +362,7 @@
if ( (sym_file = fopen(symfile, "r")) != (FILE *) 0 ) {
if (CheckMapVersion(symfile) == 1)
file = symfile;
+ fclose (sym_file);
}
}
@@ -533,7 +544,7 @@
version = 0;
while ( !feof(sym_file) && (version == 0) )
{
- if ( fscanf(sym_file, "%lx %c %s\n", &address, \
+ if ( fscanf(sym_file, "%lx %c %511s\n", &address, \
&type, sym) != 3 )
{
Syslog(LOG_ERR, "Error in symbol table input (#2).");
@@ -899,3 +910,11 @@
return;
}
#endif
+
+/*
+ * Local variables:
+ * c-indent-level: 8
+ * c-basic-offset: 8
+ * tab-width: 8
+ * End:
+ */
diff -Naur sysklogd-1.4.1/ksym_mod.c sysklogd-20050123/ksym_mod.c
--- sysklogd-1.4.1/ksym_mod.c 2000-09-12 17:15:28.000000000 -0400
+++ sysklogd-20050123/ksym_mod.c 2004-03-31 10:47:08.000000000 -0500
@@ -78,6 +78,11 @@
*
* Tue Sep 12 23:11:13 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
* Changed llseek() to lseek64() in order to skip a libc warning.
+ *
+ * Wed Mar 31 17:35:01 CEST 2004: Martin Schulze <joey@infodrom.org>
+ * Removed references to <linux/module.h> since it doesn't work
+ * anymore with its recent content from Linux 2.4/2.6, created
+ * module.h locally instead.
*/
@@ -89,11 +94,12 @@
#include <errno.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
+#include "module.h"
#if !defined(__GLIBC__)
#include <linux/time.h>
-#include <linux/module.h>
+#include <linux/linkage.h>
#else /* __GLIBC__ */
-#include <linux/module.h>
+#include <linux/linkage.h>
extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
extern int get_kernel_syms __P ((struct kernel_sym *__table));
#endif /* __GLIBC__ */
@@ -107,7 +113,7 @@
#if !defined(__GLIBC__)
/*
- * The following bit uses some kernel/library magic to product what
+ * The following bit uses some kernel/library magic to produce what
* looks like a function call to user level code. This function is
* actually a system call in disguise. The purpose of the getsyms
* call is to return a current copy of the in-kernel symbol table.
diff -Naur sysklogd-1.4.1/Makefile sysklogd-20050123/Makefile
--- sysklogd-1.4.1/Makefile 1998-10-12 16:25:15.000000000 -0400
+++ sysklogd-20050123/Makefile 2004-04-29 07:04:03.000000000 -0400
@@ -4,12 +4,15 @@
#CFLAGS= -g -DSYSV -Wall
#LDFLAGS= -g
CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
+# -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
LDFLAGS= -s
# Look where your install program is.
INSTALL = /usr/bin/install
-BINDIR = /usr/sbin
-MANDIR = /usr/man
+
+# Destination paths, set prefix=/opt if required
+BINDIR = $(prefix)/usr/sbin
+MANDIR = $(prefix)/usr/share/man
# There is one report that under an all ELF system there may be a need to
# explicilty link with libresolv.a. If linking syslogd fails you may wish
@@ -34,8 +37,9 @@
# The following define establishes ownership for the man pages.
# Avery tells me that there is a difference between Debian and
# Slackware. Rather than choose sides I am leaving it up to the user.
-MAN_OWNER = root
-# MAN_OWNER = man
+MAN_USER = root
+MAN_GROUP = root
+MAN_PERMS = 644
# The following define establishes the name of the pid file for the
# syslogd daemon. The library include file (paths.h) defines the
@@ -116,7 +120,7 @@
${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
install_man:
- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 sysklogd.8 ${MANDIR}/man8/sysklogd.8
- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 syslogd.8 ${MANDIR}/man8/syslogd.8
- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 syslog.conf.5 ${MANDIR}/man5/syslog.conf.5
- ${INSTALL} -o ${MAN_OWNER} -g ${MAN_OWNER} -m 644 klogd.8 ${MANDIR}/man8/klogd.8
+ ${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
+ ${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} syslogd.8 ${MANDIR}/man8/syslogd.8
+ ${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} syslog.conf.5 ${MANDIR}/man5/syslog.conf.5
+ ${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} klogd.8 ${MANDIR}/man8/klogd.8
diff -Naur sysklogd-1.4.1/module.h sysklogd-20050123/module.h
--- sysklogd-1.4.1/module.h 1969-12-31 19:00:00.000000000 -0500
+++ sysklogd-20050123/module.h 2004-07-27 07:36:10.000000000 -0400
@@ -0,0 +1,90 @@
+/*
+ module.h - Miscellaneous module definitions
+ Copyright (c) 1996 Richard Henderson <rth@tamu.edu>
+ Copyright (c) 2004 Martin Schulze <joey@infodrom.org>
+
+ This file is part of the sysklogd package.
+
+ 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 Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/* ChangeLog:
+ *
+ * Wed Mar 31 17:35:01 CEST 2004: Martin Schulze <joey@infodrom.org>
+ * Created local copy of module.h based on the content of Linux
+ * 2.2 since <linux/module.h> doesn't work anymore with its
+ * recent content from Linux 2.4/2.6.
+ */
+
+#include <asm/atomic.h>
+
+#define MODULE_NAME_LEN 60
+
+struct kernel_sym
+{
+ unsigned long value;
+ char name[MODULE_NAME_LEN];
+};
+
+
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+
+struct module_info
+{
+ unsigned long addr;
+ unsigned long size;
+ unsigned long flags;
+ long usecount;
+};
+
+
+struct module
+{
+ unsigned long size_of_struct; /* == sizeof(module) */
+ struct module *next;
+ const char *name;
+ unsigned long size;
+
+ union
+ {
+ int usecount;
+ long pad;
+ } uc; /* Needs to keep its size - so says rth */
+
+ unsigned long flags; /* AUTOCLEAN et al */
+
+ unsigned nsyms;
+ unsigned ndeps;
+
+ struct module_symbol *syms;
+ struct module_ref *deps;
+ struct module_ref *refs;
+ int (*init)(void);
+ void (*cleanup)(void);
+ const struct exception_table_entry *ex_table_start;
+ const struct exception_table_entry *ex_table_end;
+#ifdef __alpha__
+ unsigned long gp;
+#endif
+ /* Members past this point are extensions to the basic
+ module support and are optional. Use mod_opt_member()
+ to examine them. */
+ const struct module_persist *persist_start;
+ const struct module_persist *persist_end;
+ int (*can_unload)(void);
+};
diff -Naur sysklogd-1.4.1/pidfile.c sysklogd-20050123/pidfile.c
--- sysklogd-1.4.1/pidfile.c 1998-02-10 17:37:12.000000000 -0500
+++ sysklogd-20050123/pidfile.c 2003-09-27 22:38:18.000000000 -0400
@@ -87,7 +87,7 @@
int fd;
int pid;
- if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1)
+ if ( ((fd = open(pidfile, O_RDWR|O_CREAT|O_TRUNC, 0644)) == -1)
|| ((f = fdopen(fd, "r+")) == NULL) ) {
fprintf(stderr, "Can't open or create %s.\n", pidfile);
return 0;
diff -Naur sysklogd-1.4.1/README.1st sysklogd-20050123/README.1st
--- sysklogd-1.4.1/README.1st 1997-06-02 13:21:39.000000000 -0400
+++ sysklogd-20050123/README.1st 2003-09-04 09:22:23.000000000 -0400
@@ -1,5 +1,5 @@
-Very important information before using version 1.3
----------------------------------------------------
+Important information
+---------------------
The included version of syslogd behaves in a slightly different manner
to the one in former releases. Please review the following important
@@ -63,3 +63,10 @@
these scripts should remove all old .pid files found in /var/run.
This will insure that klogd and syslogd start properly even if prior
executions have been terminated harshly.
+
+* Large file support, i.e. support to write to log files that are
+ larger than 2 GB is not part of syslogd, but a matter of the Glibc
+ emitting different system calls to the kernel interface. To support
+ large files you'll have to compile syslogd with the compiler defines
+ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE so that glibc adjusts the
+ system calls.
diff -Naur sysklogd-1.4.1/README.linux sysklogd-20050123/README.linux
--- sysklogd-1.4.1/README.linux 1999-01-18 19:09:12.000000000 -0500
+++ sysklogd-20050123/README.linux 2004-07-09 13:22:29.000000000 -0400
@@ -40,12 +40,17 @@
a useful addition to the software gene pool.
There is a mailing list covering this package and syslog in general.
-The lists address is sysklogd@Infodrom.North.DE . To subscribe send a
-mail to Majordomo@Infodrom.North.DE with a line "subscribe sysklogd"
+The lists address is infodrom-sysklogd@lists.infodrom.org . To subscribe send a
+mail to majordomo@lists.infodrom.org with a line "subscribe infodrom-sysklogd"
in the message body.
-New versions of this package will be available at Joey's ftp server.
-ftp://ftp.infodrom.north.de/pub/people/joey/sysklogd/
+A second mailing list exists as infodrom-sysklogd-cvs@lists.infodrom.org. Only
+CVS messages and diffs are distributed there. Whenever new code is added to
+sysklogd, CVS generates a mail from these changes which will be sent to
+this list. Discussions will take place on the first list.
+
+The latest version of this software can be found at:
+http://www.infodrom.org/projects/sysklogd/download.php3
Best regards,
@@ -67,6 +72,6 @@
Martin Schulze
Infodrom Oldenburg
-joey@linux.de
+joey@infodrom.org
-And a host of bug reporters whose contributions cannot be underestimated.
+And a number of bug reporters whose contributions cannot be underestimated.
diff -Naur sysklogd-1.4.1/sysklogd.8 sysklogd-20050123/sysklogd.8
--- sysklogd-1.4.1/sysklogd.8 2001-03-11 14:35:51.000000000 -0500
+++ sysklogd-20050123/sysklogd.8 2004-07-09 13:33:32.000000000 -0400
@@ -84,7 +84,7 @@
.B MAXFUNIX
within the syslogd.c source file. An example for a chroot() daemon is
described by the people from OpenBSD at
-http://www.psionic.com/papers/dns.html.
+<http://www.guides.sk/psionic/dns/>.
.TP
.B "\-d"
Turns on debug mode. Using this the daemon will not proceed a
@@ -117,7 +117,8 @@
between two \fI-- MARK --\fR lines is 20 minutes. This can be changed
with this option. Setting the
.I interval
-to zero turns it off entirely.
+to zero turns it off entirely. Depending on other log messages
+generated these lines may not be written consecutively.
.TP
.B "\-n"
Avoid auto-backgrounding. This is needed especially if the
@@ -364,8 +365,10 @@
To avoid this in further times no messages that were received from a
remote host are sent out to another (or the same) remote host
-anymore. If there are scenarios where this doesn't make sense, please
-drop me (Joey) a line.
+anymore. If you experience are setup in which this doesn't make
+sense, please use the
+.B \-h
+commandline switch.
If the remote host is located in the same domain as the host,
.B syslogd
diff -Naur sysklogd-1.4.1/syslog.c sysklogd-20050123/syslog.c
--- sysklogd-1.4.1/syslog.c 2001-03-11 14:35:51.000000000 -0500
+++ sysklogd-20050123/syslog.c 2003-08-27 11:56:01.000000000 -0400
@@ -47,6 +47,9 @@
* Sun Mar 11 20:23:44 CET 2001: Martin Schulze <joey@infodrom.ffis.de>
* Use SOCK_DGRAM for loggin, renables it to work.
*
+ * Wed Aug 27 17:48:16 CEST 2003: Martin Schulze <joey@Infodrom.org>
+ * Improved patch by Michael Pomraning <mjp@securepipe.com> to
+ * reconnect klogd to the logger after it went away.
*/
#include <sys/types.h>
@@ -98,6 +101,7 @@
register char *p;
time_t now;
int fd, saved_errno;
+ int result;
char tbuf[2048], fmt_cpy[1024], *stdp = (char *) 0;
saved_errno = errno;
@@ -167,7 +171,16 @@
}
/* output the message to the local logger */
- if (write(LogFile, tbuf, cnt + 1) >= 0 || !(LogStat&LOG_CONS))
+ result = write(LogFile, tbuf, cnt + 1);
+
+ if (result == -1
+ && (errno == ECONNRESET || errno == ENOTCONN || errno == ECONNREFUSED)) {
+ closelog();
+ openlog(LogTag, LogStat | LOG_NDELAY, LogFacility);
+ result = write(LogFile, tbuf, cnt + 1);
+ }
+
+ if (result >= 0 || !(LogStat&LOG_CONS))
return;
/*
diff -Naur sysklogd-1.4.1/syslog.conf.5 sysklogd-20050123/syslog.conf.5
--- sysklogd-1.4.1/syslog.conf.5 1999-08-21 06:49:14.000000000 -0400
+++ sysklogd-20050123/syslog.conf.5 2003-05-22 15:31:20.000000000 -0400
@@ -64,7 +64,7 @@
The
.I facility
is one of the following keywords:
-.BR auth ", " authpriv ", " cron ", " daemon ", " kern ", " lpr ", "
+.BR auth ", " authpriv ", " cron ", " daemon ", " ftp ", " kern ", " lpr ", "
.BR mail ", " mark ", " news ", " security " (same as " auth "), "
.BR syslog ", " user ", " uucp " and " local0 " through " local7 .
The keyword
@@ -121,12 +121,21 @@
This
.BR syslogd (8)
-has a syntax extension to the original BSD source, that makes its use
+has a syntax extension to the original BSD source, which makes its use
more intuitively. You may precede every priority with an equation sign
-(``='') to specify only this single priority and not any of the
-above. You may also (both is valid, too) precede the priority with an
-exclamation mark (``!'') to ignore all that priorities, either exact
-this one or this and any higher priority. If you use both extensions
+(``='') to specify that
+.B syslogd
+should only refer to this single priority and not this priority and
+all higher priorities.
+
+You may also precide the priority with an exclamation mark (``!'') if
+you want
+.B syslogd
+to ignore this priority and all higher priorities.
+You may even use both, the exclamation mark and the equation sign if
+you want
+.B syslogd
+to ignore only this single priority. If you use both extensions
than the exclamation mark must occur before the equation sign, just
use it intuitively.
@@ -300,7 +309,7 @@
.B syslogd
log all messages that come with either the
.BR info " or the " notice
-facility into the file
+priority into the file
.IR /var/log/messages ,
except for all messages that use the
.B mail
diff -Naur sysklogd-1.4.1/syslogd.c sysklogd-20050123/syslogd.c
--- sysklogd-1.4.1/syslogd.c 2001-03-11 14:40:10.000000000 -0500
+++ sysklogd-20050123/syslogd.c 2005-01-15 14:13:08.000000000 -0500
@@ -441,6 +441,39 @@
* Don't return a closed fd if `-a' is called with a wrong path.
* Thanks to Bill Nottingham <notting@redhat.com> for providing
* a patch.
+ * Thu Apr 13 05:08:10 CEST 2001: Jon Burgess <Jon_Burgess@eur.3com.com>
+ * Moved the installation of the signal handler up a little bit
+ * so it guaranteed to be available when the child is forked,
+ * hence, fixing a race condition. This used to create problems
+ * with UML and fast machines.
+ *
+ * Sat Apr 17 18:03:05 CEST 2004: Steve Grubb <linux_4ever@yahoo.com>
+ * Correct memory allocation for for commandline arguments in
+ * crunch_list().
+ *
+ * Thu Apr 29 12:38:39 CEST 2004: Solar Designer <solar@openwall.com>
+ * Applied Openwall paranoia patches to improve crunch_list().
+ *
+ * Tue May 4 16:47:30 CEST 2004: Solar Designer <solar@openwall.com>
+ * Ensure that "len" is not placed in a register, and that the
+ * endtty() signal handler is not installed too early which could
+ * cause a segmentation fault or worse.
+ *
+ * Tue May 4 16:52:01 CEST 2004: Solar Designer <solar@openwall.com>
+ * Adjust the size of a variable to prevent a buffer overflow
+ * should _PATH_DEV ever contain something different than "/dev/".
+ *
+ * Tue Nov 2 20:28:23 CET 2004: Colin Phipps <cph@cph.demon.co.uk>
+ * Don't block on the network socket, in case a packet gets lost
+ * between select and recv.
+ *
+ * Sun Nov 7 12:28:47 CET 2004: Martin Schulze <joey@infodrom.org>
+ * Discard any timestamp information found in received syslog
+ * messages. This will affect local messages sent from a
+ * different timezone.
+ *
+ * Sun Nov 7 13:47:00 CET 2004: Martin Schulze <joey@infodrom.org>
+ * Remove trailing newline when forwarding messages.
*/
@@ -890,11 +923,11 @@
dprintf("Checking pidfile.\n");
if (!check_pid(PidFile))
{
+ signal (SIGTERM, doexit);
if (fork()) {
/*
* Parent process
*/
- signal (SIGTERM, doexit);
sleep(300);
/*
* Not reached unless something major went wrong. 5
@@ -992,6 +1025,7 @@
(void) signal(SIGCHLD, reapchild);
(void) signal(SIGALRM, domark);
(void) signal(SIGUSR1, Debug ? debug_switch : SIG_IGN);
+ (void) signal(SIGXFSZ, SIG_IGN);
(void) alarm(TIMERINTVL);
/* Create a partial message table for all file descriptors. */
@@ -1141,13 +1175,13 @@
*/
printchopped(from, line, \
i + 2, finet);
- } else if (i < 0 && errno != EINTR) {
+ } else if (i < 0 && errno != EINTR && errno != EAGAIN) {
dprintf("INET socket error: %d = %s.\n", \
errno, strerror(errno));
logerror("recvfrom inet");
/* should be harmless now that we set
* BSDCOMPAT on the socket */
- sleep(10);
+ sleep(1);
}
}
#endif
@@ -1216,6 +1250,7 @@
{
int fd, on = 1;
struct sockaddr_in sin;
+ int sockflags;
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
@@ -1241,6 +1276,24 @@
close(fd);
return -1;
}
+ /* We must not block on the network socket, in case a packet
+ * gets lost between select and recv, otherise the process
+ * will stall until the timeout, and other processes trying to
+ * log will also stall.
+ */
+ if ((sockflags = fcntl(fd, F_GETFL)) != -1) {
+ sockflags |= O_NONBLOCK;
+ /*
+ * SETFL could fail too, so get it caught by the subsequent
+ * error check.
+ */
+ sockflags = fcntl(fd, F_SETFL, sockflags);
+ }
+ if (sockflags == -1) {
+ logerror("fcntl(O_NONBLOCK), suspending inet");
+ close(fd);
+ return -1;
+ }
if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
logerror("bind, suspending inet");
close(fd);
@@ -1254,30 +1307,26 @@
crunch_list(list)
char *list;
{
- int count, i;
+ int i, m, n;
char *p, *q;
char **result = NULL;
p = list;
/* strip off trailing delimiters */
- while (p[strlen(p)-1] == LIST_DELIMITER) {
- count--;
+ while (*p && p[strlen(p)-1] == LIST_DELIMITER)
p[strlen(p)-1] = '\0';
- }
/* cut off leading delimiters */
- while (p[0] == LIST_DELIMITER) {
- count--;
+ while (p[0] == LIST_DELIMITER)
p++;
- }
- /* count delimiters to calculate elements */
- for (count=i=0; p[i]; i++)
- if (p[i] == LIST_DELIMITER) count++;
+ /* count delimiters to calculate the number of elements */
+ for (n = i = 0; p[i]; i++)
+ if (p[i] == LIST_DELIMITER) n++;
- if ((result = (char **)malloc(sizeof(char *) * count+2)) == NULL) {
+ if ((result = (char **)malloc(sizeof(char *) * (n + 2))) == NULL) {
printf ("Sorry, can't get enough memory, exiting.\n");
- exit(0);
+ exit(1);
}
/*
@@ -1285,30 +1334,28 @@
* characters are different from any delimiters,
* so we don't have to care about this.
*/
- count = 0;
- while ((q=strchr(p, LIST_DELIMITER))) {
- result[count] = (char *) malloc((q - p + 1) * sizeof(char));
- if (result[count] == NULL) {
+ m = 0;
+ while ((q = strchr(p, LIST_DELIMITER)) && m < n) {
+ result[m] = (char *) malloc((q - p + 1) * sizeof(char));
+ if (result[m] == NULL) {
printf ("Sorry, can't get enough memory, exiting.\n");
- exit(0);
+ exit(1);
}
- strncpy(result[count], p, q - p);
- result[count][q - p] = '\0';
+ memcpy(result[m], p, q - p);
+ result[m][q - p] = '\0';
p = q; p++;
- count++;
+ m++;
}
- if ((result[count] = \
- (char *)malloc(sizeof(char) * strlen(p) + 1)) == NULL) {
+ if ((result[m] = strdup(p)) == NULL) {
printf ("Sorry, can't get enough memory, exiting.\n");
- exit(0);
+ exit(1);
}
- strcpy(result[count],p);
- result[++count] = NULL;
+ result[++m] = NULL;
#if 0
- count=0;
- while (result[count])
- dprintf ("#%d: %s\n", count, StripDomains[count++]);
+ m = 0;
+ while (result[m])
+ dprintf ("#%d: %s\n", m, result[m++]);
#endif
return result;
}
@@ -1548,21 +1595,25 @@
/*
* Check to see if msg looks non-standard.
+ *
+ * A message looks like
+ * Nov 17 11:42:33 CRON[
+ * 01234567890123456
+ * ^ ^ ^ ^ ^
+ *
+ * Remote messages are not accompanied by a timestamp.
+ * Local messages are accompanied by a timestamp (program's timezone)
*/
msglen = strlen(msg);
- if (msglen < 16 || msg[3] != ' ' || msg[6] != ' ' ||
- msg[9] != ':' || msg[12] != ':' || msg[15] != ' ')
- flags |= ADDDATE;
-
- (void) time(&now);
- if (flags & ADDDATE)
- timestamp = ctime(&now) + 4;
- else {
- timestamp = msg;
+ if (!(msglen < 16 || msg[3] != ' ' || msg[6] != ' ' ||
+ msg[9] != ':' || msg[12] != ':' || msg[15] != ' ')) {
msg += 16;
msglen -= 16;
}
+ (void) time(&now);
+ timestamp = ctime(&now) + 4;
+
/* extract facility and priority level */
if (flags & MARK)
fac = LOG_NFACILITIES;
@@ -1771,7 +1822,7 @@
dprintf("Not sending message to remote.\n");
else {
f->f_time = now;
- (void) snprintf(line, sizeof(line), "<%d>%s\n", f->f_prevpri, \
+ (void) snprintf(line, sizeof(line), "<%d>%s", f->f_prevpri, \
(char *) iov[4].iov_base);
l = strlen(line);
if (l > MAXLINE)
@@ -1815,7 +1866,7 @@
v->iov_len = 1;
}
again:
- /* f->f_file == -1 is an indicator that the we couldn't
+ /* f->f_file == -1 is an indicator that we couldn't
open the file at startup. */
if (f->f_file == -1)
break;
@@ -1852,7 +1903,7 @@
errno = e;
logerror(f->f_un.f_fname);
}
- } else if (f->f_flags & SYNC_FILE)
+ } else if (f->f_type == F_FILE && (f->f_flags & SYNC_FILE))
(void) fsync(f->f_file);
break;
@@ -1891,7 +1942,7 @@
register struct filed *f;
struct iovec *iov;
{
- char p[6 + UNAMESZ];
+ char p[sizeof (_PATH_DEV) + UNAMESZ];
register int i;
int ttyf, len;
static int reenter = 0;
@@ -1899,6 +1950,8 @@
struct utmp *uptr;
char greetings[200];
+ (void) &len;
+
if (reenter++)
return;
@@ -1913,7 +1966,6 @@
if (fork() == 0) {
(void) signal(SIGTERM, SIG_DFL);
(void) alarm(0);
- (void) signal(SIGALRM, endtty);
#ifndef SYSV
(void) signal(SIGTTOU, SIG_IGN);
(void) sigsetmask(0);
@@ -1929,7 +1981,7 @@
/* is this slot used? */
if (ut.ut_name[0] == '\0')
continue;
- if (ut.ut_type == LOGIN_PROCESS)
+ if (ut.ut_type != USER_PROCESS)
continue;
if (!(strcmp (ut.ut_name,"LOGIN"))) /* paranoia */
continue;
@@ -1959,6 +2011,7 @@
iov[1].iov_len = 0;
}
if (setjmp(ttybuf) == 0) {
+ (void) signal(SIGALRM, endtty);
(void) alarm(15);
/* open the terminal */
ttyf = open(p, O_WRONLY|O_NOCTTY);

View File

@@ -181,6 +181,8 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
echo "`date -u '+%b %e %T'`: Machine is iX86 (or equivalent)" >> $LOGFILE
MACHINE=i586
BUILDTARGET=i586-pc-linux-gnu
CFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
CXX2FLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
C2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
CXX2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
else