Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into firewall-fifteen

This commit is contained in:
Alexander Marx
2013-10-01 07:44:29 +02:00
12 changed files with 41 additions and 123 deletions

View File

@@ -88,15 +88,6 @@ if ( -d "/var/ipfire/langs/${language}/" ) {
};
};
### Read IPFire Buildversion
$FIREBUILD = "File not found: firebuild\n";
if (open(MYFile, "<${swroot}/firebuild")) {
$FIREBUILD = <MYFile>;
chomp($FIREBUILD);
$FIREBUILD = "(Build: $FIREBUILD)";
close(MYFile);
};
require "${swroot}/langs/en.pl";
require "${swroot}/langs/${language}.pl";
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;

View File

@@ -1,3 +0,0 @@
#etc/system-release
#opt/pakfire/db/core/mine
#var/ipfire/firebuild

View File

@@ -1,5 +0,0 @@
#usr/bin/as86
#usr/bin/as86_encap
#var/ipfire/firebuild
#etc/system-release
#opt/pakfire/db/core/mine

View File

@@ -199,5 +199,3 @@ var/ipfire/wakeonlan
var/ipfire/wireless
#var/ipfire/wireless/config
#var/ipfire/wireless/settings
var/ipfire/firebuild
etc/system-release

View File

@@ -1,7 +1,4 @@
#opt/pakfire
opt/pakfire/cache
#opt/pakfire/db
opt/pakfire/db/core
opt/pakfire/db/installed
opt/pakfire/db/lists
opt/pakfire/db/meta

View File

@@ -50,6 +50,10 @@ media/floppy
media/usbkey
mnt
#opt
#opt/pakfire
#opt/pakfire/db
#opt/pakfire/db/core
opt/pakfire/db/core/mine
#root
root/.bash_logout
root/.bash_profile

View File

@@ -1,77 +0,0 @@
###############################################################################
# #
# 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 = 0.16.17
THISAPP = as86-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
SUP_ARCH = i586
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 69bca69aec7a272362bc9e050d289d12
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -52,6 +52,10 @@ md5 :
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
# Update /etc/system-release, because the string might have changed
# since stage2 has been executed..
echo "$(SYSTEM_RELEASE)" > /etc/system-release
rm -rf /install/cdrom /tmp/*
mkdir -p /install/cdrom/doc

View File

@@ -121,4 +121,11 @@ $(TARGET) :
-mkdir -pv /usr/share/doc/licenses/
cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3
# System release
echo "$(SYSTEM_RELEASE)" > /etc/system-release
# Pakfire
-mkdir -pv /opt/pakfire/db/core
echo "$(PAKFIRE_CORE)" > /opt/pakfire/db/core/mine
@$(POSTBUILD)

39
make.sh
View File

@@ -83,6 +83,22 @@ if [ -z $EDITOR ]; then
[ -z $EDITOR ] && exiterror "You should have installed an editor."
fi
# Prepare string for /etc/system-release.
SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})"
if [ "$(git status -s | wc -l)" == "0" ]; then
GIT_STATUS=""
else
GIT_STATUS="-dirty"
fi
case "$GIT_BRANCH" in
core*|beta?|rc?)
SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS"
;;
*)
SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
;;
esac
prepareenv() {
############################################################################
# #
@@ -773,35 +789,12 @@ buildipfire() {
ipfiremake wavemon
ipfiremake iptraf-ng
ipfiremake iotop
echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
echo >> $BASEDIR/build/var/ipfire/firebuild
git log -1 >> $BASEDIR/build/var/ipfire/firebuild
echo >> $BASEDIR/build/var/ipfire/firebuild
git status >> $BASEDIR/build/var/ipfire/firebuild
echo >> $BASEDIR/build/var/ipfire/firebuild
cat /proc/cpuinfo >> $BASEDIR/build/var/ipfire/firebuild
echo $PAKFIRE_CORE > $BASEDIR/build/opt/pakfire/db/core/mine
if [ "$(git status -s | wc -l)" == "0" ]; then
GIT_STATUS=""
else
GIT_STATUS="-dirty"
fi
case "$GIT_BRANCH" in
core*|beta?|rc?)
echo "$NAME $VERSION ($MACHINE) - $GIT_BRANCH$GIT_STATUS" > $BASEDIR/build/etc/system-release
;;
*)
echo "$NAME $VERSION ($MACHINE) - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" > $BASEDIR/build/etc/system-release
;;
esac
}
buildinstaller() {
# Run installer scripts one by one
LOGFILE="$BASEDIR/log/_build.installer.log"
export LOGFILE
ipfiremake as86
ipfiremake memtest
ipfiremake installer
installmake strip

View File

@@ -9,6 +9,8 @@
. /etc/sysconfig/rc
. ${rc_functions}
FILEDESCRIPTORS="65535"
eval $(/usr/local/bin/readhash /var/ipfire/tor/settings)
function tor_is_enabled() {
@@ -36,6 +38,11 @@ case "${1}" in
# Setup firewall.
setup_firewall
# Increasing open file descriptors.
if [ -n "${FILEDESCRIPTORS}" ]; then
ulimit -n "${FILEDESCRIPTORS}"
fi
boot_mesg "Starting tor..."
loadproc /usr/bin/tor \
--runasdaemon 1 \

View File

@@ -414,7 +414,8 @@ lfsmake2() {
chroot $LFS /tools/bin/env -i HOME=/root \
TERM=$TERM PS1='\u:\w\$ ' \
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
VERSION=$VERSION \
VERSION=$VERSION PAKFIRE_CORE="${PAKFIRE_CORE}" \
SYSTEM_RELEASE="${SYSTEM_RELEASE}" \
CONFIG_ROOT=$CONFIG_ROOT \
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \
@@ -521,6 +522,7 @@ installmake() {
TERM=$TERM PS1='\u:\w\$ ' \
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin \
VERSION=$VERSION \
SYSTEM_RELEASE="${SYSTEM_RELEASE}" \
CONFIG_ROOT=$CONFIG_ROOT \
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
CFLAGS="-Os" CXXFLAGS="-Os" \