This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via c01c550df8a24dc1591441a6e9c005d2c9261b94 (commit) via da7ab3cf6d7cfea0a9994df7c8cbfd853aa276f5 (commit) via 4c3656d99deb897a6571fa82da2502df991a657e (commit) via 7c3fec29d0687950251a7fb9828dc3867631487b (commit) via ef9d89aa4e15ba8df328dd01039509cc81aa3410 (commit) via 332cc5e86466c0ac5248ee20ba721c3b4f4267c1 (commit) via cac9daa61b7d8522c55dff5faefd54aeb1c47c32 (commit) via ad768ac98b8b7445460f9402cc217e4fc7d79fbc (commit) via 71d3bfd4553ca94c6a3e8a25554f66eb899cf4a7 (commit) via f13d4e0b09e9aa8f8a47b402438848deaf5a26d1 (commit) via 8bd492fd495cdf954d65052bc1470a08cd13fbd8 (commit) via 5e3aa60749506205f13c6db588930de61e84f46f (commit) via b848d53c8471748c751e1f00cd886ddb9ca0cb02 (commit) via 4c8608f0160f9a0e0b3cbf0adece33ac16baeeb5 (commit) via e23114f49c2cc5d5af3b811fc0e266434606bc9b (commit) via 45abde762d84f351e801596dbd336461959dd157 (commit) from c6f13fa77c23a02d649ed1d56c7a366c3a7a2caa (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c01c550df8a24dc1591441a6e9c005d2c9261b94 Merge: c6f13fa da7ab3c Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 29 14:03:42 2011 +0100
Merge branch 'master' into next
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/54/filelists/GeoIP | 1 + config/rootfiles/core/54/filelists/files | 1 + config/rootfiles/core/54/update.sh | 4 ++ config/rootfiles/installer/glibc | 2 +- config/rootfiles/installer/util-linux | 2 +- lfs/{tunctl => fake-environ} | 22 ++++++++----- make.sh | 29 +++++++++++++++-- src/fake-environ/Makefile | 31 ++++++++++++++++++ src/fake-environ/uname.c | 50 ++++++++++++++++++++++++++++++ tools/make-functions | 27 ++++++++++++++-- 10 files changed, 151 insertions(+), 18 deletions(-) create mode 100644 config/rootfiles/core/54/filelists/GeoIP copy lfs/{tunctl => fake-environ} (86%) create mode 100644 src/fake-environ/Makefile create mode 100644 src/fake-environ/uname.c
Difference in files: diff --git a/config/rootfiles/core/54/filelists/GeoIP b/config/rootfiles/core/54/filelists/GeoIP new file mode 100644 index 0000000..0258236 --- /dev/null +++ b/config/rootfiles/core/54/filelists/GeoIP @@ -0,0 +1 @@ +usr/local/share/GeoIP/GeoIP.dat diff --git a/config/rootfiles/core/54/filelists/files b/config/rootfiles/core/54/filelists/files index ff13db6..01c4951 100644 --- a/config/rootfiles/core/54/filelists/files +++ b/config/rootfiles/core/54/filelists/files @@ -12,6 +12,7 @@ etc/rc.d/init.d/snort usr/local/bin/hddshutdown usr/local/bin/makegraphs usr/local/bin/scanhd +srv/web/ipfire/cgi-bin/credits.cgi srv/web/ipfire/cgi-bin/hardwaregraphs.cgi srv/web/ipfire/cgi-bin/ids.cgi srv/web/ipfire/cgi-bin/media.cgi diff --git a/config/rootfiles/core/54/update.sh b/config/rootfiles/core/54/update.sh index 59f97cf..61d1011 100644 --- a/config/rootfiles/core/54/update.sh +++ b/config/rootfiles/core/54/update.sh @@ -44,6 +44,10 @@ done rm -rf /usr/share/usb_modeswitch
# +# Flush old snort rules +rm -rf /etc/snort/rules + +# #Extract files extract_files
diff --git a/config/rootfiles/installer/glibc b/config/rootfiles/installer/glibc index 73e445e..4a46726 120000 --- a/config/rootfiles/installer/glibc +++ b/config/rootfiles/installer/glibc @@ -1 +1 @@ -../common/glibc \ No newline at end of file +../common/i586/glibc \ No newline at end of file diff --git a/config/rootfiles/installer/util-linux b/config/rootfiles/installer/util-linux index c8ab83e..f672071 120000 --- a/config/rootfiles/installer/util-linux +++ b/config/rootfiles/installer/util-linux @@ -1 +1 @@ -../common/util-linux \ No newline at end of file +../common/i586/util-linux \ No newline at end of file diff --git a/lfs/fake-environ b/lfs/fake-environ new file mode 100644 index 0000000..b724912 --- /dev/null +++ b/lfs/fake-environ @@ -0,0 +1,58 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# 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 3 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, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.0 + +THISAPP = fake-environ +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP)-tools$(PASS) + +############################################################################### +# Top-level Rules +############################################################################### + +install : $(TARGET) + +check : + +download : + +md5 : + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : + @$(PREBUILD) + @rm -rf $(DIR_APP) + cp -rvf $(DIR_SRC)/src/$(THISAPP) $(DIR_APP) + + cd $(DIR_APP) && make install CFLAGS="$(CFLAGS)" \ + TOOLS_DIR="/tools" + + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index f98d84a..415c195 100755 --- a/make.sh +++ b/make.sh @@ -37,7 +37,7 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'` MACHINE=`uname -m` GIT_TAG=$(git tag | tail -1) # Git Tag GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit -TOOLCHAINVER=1 +TOOLCHAINVER=2
BUILDMACHINE=$MACHINE if [ "$MACHINE" = "x86_64" ]; then @@ -229,9 +229,28 @@ prepareenv() { }
buildtoolchain() { - if [ "$(uname -m)" = "x86_64" ]; then - exiterror "Cannot build toolchain on x86_64. Please use the download." - fi + local error=false + case "${MACHINE}:$(uname -m)" in + # x86 + i586:i586|i586:i686) + # These are working. + ;; + i586:*) + error=true + ;; + + # ARM + armv5tel:armv5tel|armv5tel:armv5tejl) + # These are working. + ;; + armv5tel:*) + error=true + ;; + esac + + ${error} && \ + exiterror "Cannot build ${MACHINE} toolchain on $(uname -m). Please use the download if any." + if [ "$(uname -r | grep ipfire)" ]; then exiterror "Cannot build toolchain on ipfire. Please use the download." fi @@ -242,6 +261,7 @@ buildtoolchain() { export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1} ORG_PATH=$PATH export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH + lfsmake1 fake-environ PASS=1 lfsmake1 ccache PASS=1 lfsmake1 make PASS=1 lfsmake1 binutils PASS=1 @@ -253,6 +273,7 @@ buildtoolchain() { fi lfsmake1 glibc lfsmake1 cleanup-toolchain PASS=1 + lfsmake1 fake-environ PASS=2 lfsmake1 tcl lfsmake1 expect lfsmake1 dejagnu diff --git a/src/fake-environ/Makefile b/src/fake-environ/Makefile new file mode 100644 index 0000000..a75bdf2 --- /dev/null +++ b/src/fake-environ/Makefile @@ -0,0 +1,31 @@ + +ifeq "$(CFLAGS)" "" + $(error CLFAGS not defined.) +endif + +ifeq "$(TOOLS_DIR)" "" + $(error TOOLS_DIR not defined.) +endif + +LIB = libpakfire_preload.so + +SOURCES = $(wildcard *.c) +OBJECTS = $(patsubst %.c,%.o,$(SOURCES)) + +.PHONY: all +all: $(LIB) + +%.o: %.c Makefile + $(CC) $(CFLAGS) -o $@ -c $< + +$(LIB): $(OBJECTS) + $(CC) $(CFLAGS) -shared -o $@ $? -ldl + +.PHONY: install +install: all + -mkdir -pv $(TOOLS_DIR)/lib/ + install -p -m 755 $(LIB) $(TOOLS_DIR)/lib + +.PHONY: clean +clean: + $(LIB) diff --git a/src/fake-environ/uname.c b/src/fake-environ/uname.c new file mode 100644 index 0000000..2485a81 --- /dev/null +++ b/src/fake-environ/uname.c @@ -0,0 +1,50 @@ + + +#include <stdio.h> +#include <string.h> +#include <dlfcn.h> +#include <stdlib.h> /* for EXIT_FAILURE */ +#include <unistd.h> /* for _exit() */ +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <sys/syslog.h> +#include <sys/utsname.h> + +#ifndef RTLD_NEXT +#define RTLD_NEXT ((void *) -1l) +#endif + +typedef int (*uname_t)(struct utsname * buf); + +static void *get_libc_func(const char *funcname) { + char *error; + + void *func = dlsym(RTLD_NEXT, funcname); + if ((error = dlerror()) != NULL) { + fprintf(stderr, "I can't locate libc function `%s' error: %s", funcname, error); + _exit(EXIT_FAILURE); + } + + return func; +} + +int uname(struct utsname *buf) { + char *env = NULL; + + /* Call real uname to get the information we need. */ + uname_t real_uname = (uname_t)get_libc_func("uname"); + int ret = real_uname((struct utsname *) buf); + + /* Replace release if requested. */ + if ((env = getenv("UTS_RELEASE")) != NULL) { + strncpy(buf->release, env, _UTSNAME_RELEASE_LENGTH); + } + + /* Replace machine type if requested. */ + if ((env = getenv("UTS_MACHINE")) != NULL) { + strncpy(buf->machine, env, _UTSNAME_MACHINE_LENGTH); + } + + return ret; +} diff --git a/tools/make-functions b/tools/make-functions index e693ff9..783b46e 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -225,17 +225,17 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then CXXFLAGS="-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" -elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE ]; then +elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE -o 'armv7l' = $MACHINE ]; then echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE MACHINE=armv5tel MACHINE_TYPE=arm BUILDTARGET=${MACHINE}-unknown-linux-gnueabi - CFLAGS="-O2 -march=armv5te -fomit-frame-pointer -pipe" + CFLAGS="-O2 -march=armv5te -mfloat-abi=soft -fomit-frame-pointer -pipe" CXXFLAGS="$CFLAGS" C2FLAGS="$CFLAGS" CXX2FLAGS="$CXXFLAGS" else - echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE + echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" exit 1 fi
@@ -270,10 +270,26 @@ exiterror() { exit 1 }
+fake_environ() { + [ -e "${BASEDIR}/build/tools/lib/libpakfire_preload.so" ] || return + + local env="LD_PRELOAD=/tools/lib/libpakfire_preload.so" + + # Fake kernel version, because some of the packages do not compile + # with kernel 3.0 and later. + env="${env} UTS_RELEASE=${KVER}" + + # Fake machine version. + env="${env} UTS_MACHINE=${MACHINE}" + + echo "${env}" +} + entershell() { if [ ! -e $BASEDIR/build/usr/src/lfs/ ]; then exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/" fi + echo "Entering to a shell inside LFS chroot, go out with exit" $linux32 chroot $LFS /tools/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w$ ' \ PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ @@ -288,6 +304,7 @@ entershell() { MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ KGCC="ccache /usr/bin/gcc" \ + $(fake_environ) \ /tools/bin/bash if [ $? -ne 0 ]; then beautify message FAIL @@ -371,6 +388,7 @@ lfsmake1() { ROOT=$LFS \ KVER=$KVER \ MAKETUNING=$MAKETUNING \ + $(fake_environ) \ install >> $LOGFILE 2>&1 local COMPILE_SUCCESS=$? local PKG_TIME_END=`date +%s` @@ -401,6 +419,7 @@ lfsmake2() { KVER=$KVER MAKETUNING=$MAKETUNING \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ + $(fake_environ) \ /tools/bin/bash -x -c "cd /usr/src/lfs && \ make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1 local COMPILE_SUCCESS=$? @@ -433,6 +452,7 @@ ipfiremake() { KVER=$KVER MAKETUNING=$MAKETUNING \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ + $(fake_environ) \ /bin/bash -x -c "cd /usr/src/lfs && \ make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
@@ -464,6 +484,7 @@ ipfiredist() { KVER=$KVER \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ + $(fake_environ) \ /bin/bash -x -c "cd /usr/src/lfs && \ make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
hooks/post-receive -- IPFire 2.x development tree