#!/bin/bash # # QEMU network interface configuration script. This utility needs to # be run as root, and will use the tunctl binary from a native sysroot. # Note: many Linux distros these days still use an older version of # tunctl which does not support the group permissions option, hence # the need to use build system's version. # # If you find yourself calling this script a lot, you can add the # the following to your /etc/sudoers file to be able to run this # command without entering your password each time: # # ALL=NOPASSWD: /path/to/runqemu-ifup # ALL=NOPASSWD: /path/to/runqemu-ifdown # # If you'd like to create a bank of tap devices at once, you should use # the runqemu-gen-tapdevs script instead. If tap devices are set up using # that script, the runqemu script will never end up calling this # script. # # Copyright (c) 2006-2011 Linux Foundation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. usage() { echo "sudo $(basename $0) " } if [ $EUID -ne 0 ]; then echo "Error: This script (runqemu-ifup) must be run with root privileges" exit 1 fi if [ $# -ne 3 ]; then usage exit 1 fi USERID="-u $1" GROUP="-g $2" NATIVE_SYSROOT_DIR=$3 TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl if [ ! -x "$TUNCTL" ]; then echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native" exit 1 fi TAP=`$TUNCTL -b $GROUP 2>&1` STATUS=$? if [ $STATUS -ne 0 ]; then # If tunctl -g fails, try using tunctl -u, for older host kernels # which do not support the TUNSETGROUP ioctl TAP=`$TUNCTL -b $USERID 2>&1` STATUS=$? if [ $STATUS -ne 0 ]; then echo "tunctl failed:" exit 1 fi fi IFCONFIG=`which ip 2> /dev/null` if [ "x$IFCONFIG" = "x" ]; then # better than nothing... IFCONFIG=/sbin/ip fi if [ ! -x "$IFCONFIG" ]; then echo "$IFCONFIG cannot be executed" exit 1 fi IPTABLES=`which iptables 2> /dev/null` if [ "x$IPTABLES" = "x" ]; then IPTABLES=/sbin/iptables fi if [ ! -x "$IPTABLES" ]; then echo "$IPTABLES cannot be executed" exit 1 fi n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] $IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP $IFCONFIG link set dev $TAP up dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] $IFCONFIG route add to 192.168.7.$dest dev $TAP # setup NAT for tap0 interface to have internet access in QEMU $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32 $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$dest/32 echo 1 > /proc/sys/net/ipv4/ip_forward echo 1 > /proc/sys/net/ipv4/conf/$TAP/proxy_arp $IPTABLES -P FORWARD ACCEPT echo $TAP space:mode:
-rw-r--r--.gitignore15
-rw-r--r--.templateconf2
-rw-r--r--LICENSE16
-rw-r--r--README18
-rw-r--r--meta-demoapps/recipes-connectivity/farsight/farsight2_0.0.9.bb23
-rw-r--r--meta-demoapps/recipes-connectivity/farsight/libnice_0.0.6.bb23
-rw-r--r--meta-demoapps/recipes-connectivity/libetpan/files/cxx-is-here.patch20
-rw-r--r--meta-demoapps/recipes-connectivity/libetpan/libetpan_0.54.bb20
-rw-r--r--meta-demoapps/recipes-connectivity/loudmouth/loudmouth_1.4.0.bb10
-rw-r--r--meta-demoapps/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch15
-rw-r--r--meta-demoapps/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch28
-rw-r--r--meta-demoapps/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch379
-rw-r--r--meta-demoapps/recipes-connectivity/openswan/openswan_2.4.7.bb36
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch20
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-0.37/cmake.patch19
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch18
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch25
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb8
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb2
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb2
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb4
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch15
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb8
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb4
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync-plugin_0.36.inc11
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libopensync_0.37.bb26
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libsync_git.bb22
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libsyncml/build-in-src.patch21
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/libsyncml_0.5.4.bb17
-rw-r--r--meta-demoapps/recipes-connectivity/opensync/msynctool_0.38.bb20
-rw-r--r--meta-demoapps/recipes-connectivity/telepathy/empathy/no-gnome-doc.patch41
-rw-r--r--meta-demoapps/recipes-connectivity/telepathy/empathy_2.26.1.bb29
-rw-r--r--meta-demoapps/recipes-connectivity/telepathy/telepathy-farsight_0.0.7.bb16
-rw-r--r--meta-demoapps/recipes-connectivity/telepathy/telepathy-gabble/gabble.manager33
-rw-r--r--meta-demoapps/recipes-connectivity/telepathy/telepathy-gabble_0.7.8.bb18
-rw-r--r--meta-demoapps/recipes-connectivity/wbxml/files/no-doc-install.patch17
-rw-r--r--meta-demoapps/recipes-connectivity/wbxml/wbxml2_0.9.2.bb24
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc64
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword-embedded_2.5.2.bb12
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword.inc64
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword_2.5.2.bb5
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword_svn.bb10
-rw-r--r--meta-demoapps/recipes-gnome/gcalctool/gcalctool/fix-includedir.patch33
-rw-r--r--meta-demoapps/recipes-gnome/gcalctool/gcalctool_5.7.32.bb13
-rw-r--r--meta-demoapps/recipes-gnome/gcalctool/gcalctool_5.8.17.bb12
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/configurefix.patch32
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/desktop-moblin.patch13
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/gnome-settings-daemon-2.24.0-catch-deviceadded.patch21
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/gnome-settings-daemon-fix-gthread.patch15
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch76
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mount-plugin.patch620
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon_2.26.1.bb25
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-terminal/30f29e7d8e1b67c40cd18a7155ba30c4382692d5.patch22
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-terminal_2.26.3.bb16
-rw-r--r--meta-demoapps/recipes-gnome/gnome/libgnomecanvas_2.20.0.bb14
-rw-r--r--meta-demoapps/recipes-gnome/gnome/libgnomekbd_2.26.0.bb14
-rw-r--r--meta-demoapps/recipes-gnome/libgsf/libgsf_1.14.5.bb25
-rw-r--r--meta-demoapps/recipes-gnome/libgtkstylus/files/gtkstylus.sh5
-rw-r--r--meta-demoapps/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb24
-rw-r--r--meta-demoapps/recipes-gnome/wv/wv-1.2.0/pkgconfig.patch15
-rw-r--r--meta-demoapps/recipes-gnome/wv/wv_1.2.0.bb14
-rw-r--r--meta-demoapps/recipes-graphics/clutter/tidy.inc20
-rw-r--r--meta-demoapps/recipes-graphics/clutter/tidy/autofoo.patch13
-rw-r--r--meta-demoapps/recipes-graphics/clutter/tidy/tidy-enable-tests.patch22
-rw-r--r--meta-demoapps/recipes-graphics/clutter/tidy_git.bb14
-rw-r--r--meta-demoapps/recipes-graphics/libxklavier/libxklavier/pkgconfigfix.patch17
-rw-r--r--meta-demoapps/recipes-graphics/libxklavier/libxklavier_3.9.bb11
-rw-r--r--meta-demoapps/recipes-graphics/pong-clock/pong-clock_1.0.bb16
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xbacklight_1.1.bb4
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xev/diet-x11.patch82
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xev_1.0.3.bb7
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xeyes_1.0.1.bb4
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xrdb/60XDefaults.sh3
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xrdb_1.0.5.bb14
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/liblbxutil/mkg3states.patch65
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb11
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxaw_1.0.5.bb21
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxevie_1.0.2.bb8
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb8
-rw-r--r--meta-demoapps/recipes-graphics/xorg-proto/xproxymanagementprotocol_1.0.3.bb5
-rw-r--r--meta-demoapps/recipes-graphics/xournal/files/ldflags.patch17
-rw-r--r--meta-demoapps/recipes-graphics/xournal/files/no-printing.diff180
-rw-r--r--meta-demoapps/recipes-graphics/xournal/xournal_0.2.bb12
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-mail.inc58
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-mail_2.9.1.bb1
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-plugin-gtkhtml2-viewer_0.15.bb14
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-plugin-maildir_0.24.4.bb14
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-plugin-mailmbox_1.13.bb14
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/claws-plugin-rssyl_0.13.bb14
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/files/desktop.patch21
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/files/fix-build.patch26
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/files/owl-window-menu.patch1011
-rw-r--r--meta-demoapps/recipes-sato/claws-mail/files/streamline-ui.patch1010
-rw-r--r--meta-demoapps/recipes-sato/clipboard-manager/clipboard-manager_0.6.4.bb33
-rw-r--r--meta-demoapps/recipes-sato/clipboard-manager/files/daemonize.patch46
-rw-r--r--meta-demoapps/recipes-sato/clipboard-manager/files/makefile.patch20
-rw-r--r--meta-demoapps/recipes-sato/clipboard-manager/files/script.patch41
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview/epdfview-ui-print.xml12
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview/epdfview-ui.xml57
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview/epdfview.desktop10
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview/owl-menus.patch327
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview_0.1.6.bb21
-rw-r--r--meta-demoapps/recipes-sato/epdfview/epdfview_0.1.7.bb21
-rw-r--r--meta-demoapps/recipes-sato/kf/files/fix-configure.patch27
-rw-r--r--meta-demoapps/recipes-sato/kf/files/fix-desktop-file.patch22
-rw-r--r--meta-demoapps/recipes-sato/kf/files/gcc4.patch32
-rw-r--r--meta-demoapps/recipes-sato/kf/kf_0.5.4.1.bb16
-rw-r--r--meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_0.3.bb28
-rw-r--r--meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_git.bb33
-rw-r--r--meta-demoapps/recipes-sato/matchbox-themes-gtk/files/gtkrc1
-rw-r--r--meta-demoapps/recipes-sato/matchbox-themes-gtk/matchbox-themes-gtk.bb17
-rw-r--r--meta-demoapps/recipes-support/iso-codes/iso-codes_3.3.bb13
-rw-r--r--meta-demoapps/recipes-support/libfribidi/files/libtool-update.patch13
-rw-r--r--meta-demoapps/recipes-support/libfribidi/libfribidi_0.10.4.bb23
-rw-r--r--meta-demoapps/recipes-support/openobex/files/disable-cable-test.patch17
-rw-r--r--meta-demoapps/recipes-support/openobex/files/libusb_crosscompile_check.patch15
-rw-r--r--meta-demoapps/recipes-support/openobex/openobex_1.5.bb23
-rw-r--r--meta-demoapps/recipes-support/poppler/poppler-data_0.1.bb16
-rw-r--r--meta-demoapps/recipes-support/poppler/poppler-fpu.inc6
-rw-r--r--meta-demoapps/recipes-support/poppler/poppler.inc18
-rw-r--r--meta-demoapps/recipes-support/poppler/poppl