]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - make.sh
firewall: Allow access to the entire GREEN/BLUE/ORANGE subnets.
[people/teissler/ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 2ada02880296d8196dc16fe55b7386635826ccc2..50fca8f7644c5a1d65f7e209d9fcf89f87f2fa6f 100755 (executable)
--- a/make.sh
+++ b/make.sh
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2014 IPFire Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
 
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
-VERSION="2.13"                                                 # Version number
-CORE="73"                                                      # Core Level (Filename)
-PAKFIRE_CORE="72"                                              # Core Level (PAKFIRE)
-GIT_BRANCH=`git status | head -n1 | cut -d" " -f4`             # Git Branch
+VERSION="2.15"                                                 # Version number
+CORE="76-beta2"                                                        # Core Level (Filename)
+PAKFIRE_CORE="76"                                              # Core Level (PAKFIRE)
+GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`                   # Git Branch
 SLOGAN="www.ipfire.org"                                                # Software slogan
 CONFIG_ROOT=/var/ipfire                                                # Configuration rootdir
 NICE=10                                                                # Nice level
@@ -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() {
     ############################################################################
     #                                                                          #
@@ -179,11 +195,12 @@ prepareenv() {
     set +h
     LC_ALL=POSIX
     if [ -z $MAKETUNING ]; then
-        if [ "${MACHINE:0:3}" = "arm" ]; then
-            MAKETUNING="-j2"
-        else
-            MAKETUNING="-j6"
-        fi
+       CPU_COUNT="$(getconf _NPROCESSORS_ONLN 2>/dev/null)"
+       if [ -z "${CPU_COUNT}" ]; then
+               CPU_COUNT=1
+       fi
+
+       MAKETUNING="-j$(( ${CPU_COUNT} * 2 + 1 ))"
     fi
     export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
     unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
@@ -343,7 +360,7 @@ buildbase() {
     lfsmake2 make
     lfsmake2 man
     lfsmake2 mktemp
-    lfsmake2 module-init-tools
+    lfsmake2 kmod
     lfsmake2 net-tools
     lfsmake2 patch
     lfsmake2 psmisc
@@ -352,8 +369,8 @@ buildbase() {
     lfsmake2 sysvinit
     lfsmake2 tar
     lfsmake2 texinfo
-    lfsmake2 udev
     lfsmake2 util-linux
+    lfsmake2 udev
     lfsmake2 vim
     lfsmake2 xz
     lfsmake2 paxctl
@@ -369,6 +386,7 @@ buildipfire() {
   ipfiremake dhcp
   ipfiremake dhcpcd
   ipfiremake libusb
+  ipfiremake libusbx
   ipfiremake libpcap
   ipfiremake ppp
   ipfiremake pptp
@@ -393,8 +411,8 @@ buildipfire() {
 #    ipfiremake r8169                  KCFG="-pae"
 #    ipfiremake r8168                  KCFG="-pae"
 #    ipfiremake r8101                  KCFG="-pae"
-#    ipfiremake e1000e                 KCFG="-pae"
-#    ipfiremake igb                    KCFG="-pae"
+    ipfiremake e1000e                  KCFG="-pae"
+    ipfiremake igb                     KCFG="-pae"
 
     # x86 kernel build
     ipfiremake linux                   KCFG=""
@@ -406,8 +424,8 @@ buildipfire() {
 #    ipfiremake r8169                  KCFG=""
 #    ipfiremake r8168                  KCFG=""
 #    ipfiremake r8101                  KCFG=""
-#    ipfiremake e1000e                 KCFG=""
-#    ipfiremake igb                    KCFG=""
+    ipfiremake e1000e                  KCFG=""
+    ipfiremake igb                     KCFG=""
 
   else
     # arm-rpi (Raspberry Pi) kernel build
@@ -420,6 +438,8 @@ buildipfire() {
     # arm multi platform (Panda, Wandboard ...) kernel build
     ipfiremake linux                   KCFG="-multi"
     ipfiremake cryptodev               KCFG="-multi"
+    ipfiremake e1000e                  KCFG="-multi"
+    ipfiremake igb                     KCFG="-multi"
 
     # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build
     ipfiremake linux                   KCFG="-kirkwood"
@@ -430,8 +450,8 @@ buildipfire() {
 #    ipfiremake r8169                  KCFG="-kirkwood"
 #    ipfiremake r8168                  KCFG="-kirkwood"
 #    ipfiremake r8101                  KCFG="-kirkwood"
-#   ipfiremake e1000e                  KCFG="-kirkwood"
-#    ipfiremake igb                    KCFG="-kirkwood"
+#    ipfiremake e1000e                 KCFG="-kirkwood"
+    ipfiremake igb                     KCFG="-kirkwood"
 
   fi
   ipfiremake pkg-config
@@ -442,6 +462,7 @@ buildipfire() {
   ipfiremake gdbm
   ipfiremake pam
   ipfiremake openssl
+  ipfiremake openssl-compat
   ipfiremake curl
   ipfiremake tcl
   ipfiremake sqlite
@@ -476,6 +497,7 @@ buildipfire() {
   ipfiremake apache2
   ipfiremake php
   ipfiremake apache2                   PASS=C
+  ipfiremake jquery
   ipfiremake arping
   ipfiremake beep
   ipfiremake dvdrtools
@@ -576,6 +598,8 @@ buildipfire() {
   ipfiremake lzo
   ipfiremake openvpn
   ipfiremake pammysql
+  ipfiremake mpage
+  ipfiremake dbus
   ipfiremake cups
   ipfiremake ghostscript
   ipfiremake foomatic
@@ -629,6 +653,7 @@ buildipfire() {
   ipfiremake sysstat
   ipfiremake vsftpd
   ipfiremake strongswan
+  ipfiremake rng-tools
   ipfiremake lsof
   ipfiremake br2684ctl
   ipfiremake pcmciautils
@@ -674,7 +699,6 @@ buildipfire() {
   ipfiremake syslinux
   ipfiremake tftpd
   ipfiremake cpufrequtils
-  ipfiremake dbus
   ipfiremake bluetooth
   ipfiremake gutenprint
   ipfiremake apcupsd
@@ -694,6 +718,8 @@ buildipfire() {
   ipfiremake netsnmpd
   ipfiremake perl-DBI
   ipfiremake perl-DBD-mysql
+  ipfiremake perl-DBD-SQLite
+  ipfiremake perl-File-ReadBackwards
   ipfiremake cacti
   ipfiremake icecc
   ipfiremake openvmtools
@@ -710,7 +736,6 @@ buildipfire() {
   ipfiremake usb_modeswitch_data
   ipfiremake zerofree
   ipfiremake mdadm
-  ipfiremake eject
   ipfiremake pound
   ipfiremake minicom
   ipfiremake ddrescue
@@ -747,7 +772,6 @@ buildipfire() {
   ipfiremake stress
   ipfiremake libstatgrab
   ipfiremake sarg
-  ipfiremake fstrim
   ipfiremake check_mk_agent
   ipfiremake libdaemon
   ipfiremake avahi
@@ -772,35 +796,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
@@ -1087,11 +1088,11 @@ uploadsrc)
        fi
 
        URL_SOURCE=$(grep URL_SOURCE lfs/Config | awk '{ print $3 }')
-       REMOTE_FILES=$(echo "ls -1 --ignore=toolchains" | sftp -C ${IPFIRE_USER}@${URL_SOURCE})
+       REMOTE_FILES=$(echo "ls -1" | sftp -C ${IPFIRE_USER}@${URL_SOURCE})
 
-       cd $BASEDIR/cache/
-       for file in $(ls -1 --ignore=toolchains); do
-               grep -q "$file" <<<$REMOTE_FILES && continue
+       for file in ${BASEDIR}/cache/*; do
+               [ -d "${file}" ] && continue
+               grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue
                NEW_FILES="$NEW_FILES $file"
        done
        [ -n "$NEW_FILES" ] && scp -2 $NEW_FILES ${IPFIRE_USER}@${URL_SOURCE}