From bb603658f2fb39998d40dffc5aaa60bba88d5efb Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sun, 3 Jun 2007 12:55:22 +0000 Subject: pidgin: update to 2.0.1 --- packages/gaim/pidgin_2.0.0.bb | 8 -------- packages/gaim/pidgin_2.0.1.bb | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 packages/gaim/pidgin_2.0.0.bb create mode 100644 packages/gaim/pidgin_2.0.1.bb diff --git a/packages/gaim/pidgin_2.0.0.bb b/packages/gaim/pidgin_2.0.0.bb deleted file mode 100644 index 411b49ff4b..0000000000 --- a/packages/gaim/pidgin_2.0.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require pidgin.inc - -SRC_URI = "${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \ - file://sanitize-configure.ac.patch;patch=1 \ - file://gconf-no-errors.patch;patch=1 \ - " - -PR = "r2" diff --git a/packages/gaim/pidgin_2.0.1.bb b/packages/gaim/pidgin_2.0.1.bb new file mode 100644 index 0000000000..7f62f6ac79 --- /dev/null +++ b/packages/gaim/pidgin_2.0.1.bb @@ -0,0 +1,8 @@ +require pidgin.inc + +SRC_URI = "${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \ + file://sanitize-configure.ac.patch;patch=1 \ + file://gconf-no-errors.patch;patch=1 \ + " + +PR = "r0" -- cgit v1.2.3 From 43c0e490400a24a50edf8f7ec50a7532ba691523 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 3 Jun 2007 13:02:05 +0000 Subject: classes/insane: fixed a bug with undefined 'name' and improved output a bit. --- classes/insane.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 963ace4221..e6f4f1440d 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -393,9 +393,9 @@ def package_qa_check_rdepends(pkg, workdir, d): # Now do the sanity check!!! for rdepend in rdepends: if "-dbg" in rdepend: - package_qa_write_error( 2, name, rdepend, d ) - bb.error("QA issue, koen give us a better msg!!!") - if package_qa_make_fatal_error( 2, name, rdepend, d ): + package_qa_write_error( 2, pkgname, rdepend, d ) + bb.error("QA issue: %s rdepends on %s" % (pkgname,rdepend)) + if package_qa_make_fatal_error( 2, pkgname, rdepend, d ): sane = False return sane -- cgit v1.2.3 From 40c44c63416e2aa92344d18c5f7e6d1be8884821 Mon Sep 17 00:00:00 2001 From: Matthias Hentges Date: Sun, 3 Jun 2007 16:14:30 +0000 Subject: wpa-supplicant: Replace /etc/wpa_supplicant.conf with the Debian way to handle WPA: - All configuration is done via /etc/network/interfaces (similiar to WEP) - /etc/init.d/wpa is no longer needed - wpa_supplicant is launched on ifup with the settings from /e/n/interfaces --- packages/wpa-supplicant/files/functions.sh | 841 ++++++++++++++++++++++++ packages/wpa-supplicant/files/ifupdown.sh | 132 ++++ packages/wpa-supplicant/wpa-supplicant-0.5.inc | 36 +- packages/wpa-supplicant/wpa-supplicant_0.5.5.bb | 2 +- packages/wpa-supplicant/wpa-supplicant_0.5.7.bb | 2 + 5 files changed, 989 insertions(+), 24 deletions(-) create mode 100755 packages/wpa-supplicant/files/functions.sh create mode 100755 packages/wpa-supplicant/files/ifupdown.sh diff --git a/packages/wpa-supplicant/files/functions.sh b/packages/wpa-supplicant/files/functions.sh new file mode 100755 index 0000000000..5132fbbca4 --- /dev/null +++ b/packages/wpa-supplicant/files/functions.sh @@ -0,0 +1,841 @@ +#!/bin/sh + +# Copyright (C) 2006 Debian/Ubuntu wpasupplicant Maintainers +# +# +# 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. +# +# On Debian GNU/Linux systems, the text of the GPL license can be +# found in /usr/share/common-licenses/GPL. + +##################################################################### +## global variables +# wpa_supplicant variables +WPA_SUP_BIN="/usr/sbin/wpa_supplicant" +WPA_SUP_PNAME="wpa_supplicant" +WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$WPA_IFACE.pid" + +# wpa_cli variables +WPA_CLI_BIN="/usr/sbin/wpa_cli" +WPA_CLI_PNAME="wpa_cli" +WPA_CLI_PIDFILE="/var/run/wpa_action.$WPA_IFACE.pid" +WPA_CLI_LOGFILE="/var/log/wpa_action.log" +WPA_CLI_TIMESTAMP="/var/run/wpa_action.$WPA_IFACE.timestamp" + +# default ctrl_interface socket directory +if [ -z "$WPA_CTRL_DIR" ]; then + WPA_CTRL_DIR="/var/run/wpa_supplicant" +fi + +# verbosity variables +if [ -n "$IF_WPA_VERBOSITY" ] || [ "$VERBOSITY" = "1" ]; then + TO_NULL="/dev/stdout" + DAEMON_VERBOSITY="--verbose" +else + TO_NULL="/dev/null" + DAEMON_VERBOSITY="--quiet" +fi + +##################################################################### +## wpa_cli wrapper +# Path to common ctrl_interface socket and iface supplied. +# NB: WPA_CTRL_DIR cannot be used for interactive commands. +# +wpa_cli () { + $WPA_CLI_BIN -p $WPA_CTRL_DIR -i $WPA_IFACE "$@" +} + +##################################################################### +## verbose and stderr message wrapper +# Ensures a standard and easily identifiable message is printed by +# scripts using this function library. +# +# verbose To stdout when IF_WPA_VERBOSITY or VERBOSITY is true +# +# action Same as verbose but without newline +# Useful for allowing wpa_cli commands to echo result +# value of 'OK' or 'FAILED' +# +# stderr Echo warning or error messages to stderr +# +# NB: when called by wpa_action, there is no redirection (verbose) +# +wpa_msg () { + + if [ -n "$WPA_ACTION" ]; then + shift + echo "wpa_action: $@" + return + fi + + case "$1" in + "verbose") + shift + echo "$WPA_SUP_PNAME: $@" >$TO_NULL + ;; + "action") + shift + echo -n "$WPA_SUP_PNAME: $@ -- " >$TO_NULL + ;; + "stderr") + shift + echo "$WPA_SUP_PNAME: $@" >/dev/stderr + ;; + *) + ;; + esac +} + +##################################################################### +## validate daemon pid files +# Test daemon process ID files via start-stop-daemon with a signal 0 +# given the exec binary and pidfile location. +# +# $1 daemon +# $2 pidfile +# +# Returns true when pidfile exists, the process ID exists _and_ was +# created by the exec binary. +# +# If the test fails, but the pidfile exists, it is stale +# +test_daemon_pidfile () { + local DAEMON PIDFILE + + if [ -n "$1" ]; then + DAEMON="$1" + fi + + if [ -f "$2" ]; then + PIDFILE="$2" + fi + + if [ -n "$DAEMON" ] && [ -f "$PIDFILE" ]; then + if start-stop-daemon --stop --quiet --signal 0 \ + --exec "$DAEMON" --pidfile "$PIDFILE"; then + return 0 + else + rm -f "$PIDFILE" + return 1 + fi + else + return 1 + fi +} + +# validate wpa_supplicant pidfile +test_wpa_supplicant () { + test_daemon_pidfile "$WPA_SUP_BIN" "$WPA_SUP_PIDFILE" +} + +# validate wpa_cli pidfile +test_wpa_cli () { + test_daemon_pidfile "$WPA_CLI_BIN" "$WPA_CLI_PIDFILE" +} + +##################################################################### +## daemonize wpa_supplicant +# Start wpa_supplicant via start-stop-dameon with all required +# options. Will start if environment variable WPA_SUP_CONF is present +# +# Required options: +# -B dameonize/background process +# -D driver backend ('wext' if none given) +# -P process ID file +# -C path to ctrl_interface socket directory +# +# Optional options: +# -c configuration file +# -W wait for wpa_cli to attach to ctrl_interface socket +# -b bridge interface name +# +init_wpa_supplicant () { + if [ -n "$WPA_SUP_CONF" ]; then + # wpa-action was removed, point to wpa-roam + if [ -n "$IF_WPA_ACTION" ]; then + wpa_msg stderr "wpa-action support has been removed" + wpa_msg stderr "refer to /usr/share/doc/wpasupplicant/README.modes.gz" + return 1 + fi + + local WPA_SUP_DRIVER WPA_SUP_OPTIONS + + if [ -n "$WPA_ACTION_SCRIPT" ]; then + if [ -x "$WPA_ACTION_SCRIPT" ]; then + WPA_SUP_OPTIONS="-W -B -P $WPA_SUP_PIDFILE -i $WPA_IFACE" + wpa_msg verbose "wait for wpa_cli to attach" + else + wpa_msg stderr "action script \"$WPA_ACTION_SCRIPT\" not executable" + return 1 + fi + else + WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $WPA_IFACE" + fi + + if [ -n "$IF_WPA_BRIDGE" ]; then + WPA_SUP_OPTIONS="$WPA_SUP_OPTIONS -b $IF_WPA_BRIDGE" + wpa_msg verbose "wpa-bridge $IF_WPA_BRIDGE" + fi + + if [ -n "$IF_WPA_DRIVER" ]; then + WPA_SUP_DRIVER="$IF_WPA_DRIVER" + wpa_msg verbose "wpa-driver $WPA_SUP_DRIVER" + else + WPA_SUP_DRIVER="wext" + wpa_msg verbose "using default driver type: wpa-driver $WPA_SUP_DRIVER" + fi + + wpa_msg verbose "$WPA_SUP_BIN $WPA_SUP_OPTIONS -D $WPA_SUP_DRIVER $WPA_SUP_CONF" + + start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \ + --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \ + -- $WPA_SUP_OPTIONS -D $WPA_SUP_DRIVER $WPA_SUP_CONF + + if [ "$?" != "0" ]; then + wpa_msg stderr "$WPA_SUP_BIN daemon failed to start" + return 1 + fi + + local WPA_SOCKET_WAIT MAX_WPA_SOCKET_WAIT + WPA_SOCKET_WAIT="0" + MAX_WPA_SOCKET_WAIT="5" + until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do + if [ "$WPA_SOCKET_WAIT" -ge "$MAX_WPA_SOCKET_WAIT" ]; then + wpa_msg stderr "ctrl_interface socket not found at $WPA_CTRL_DIR/$WPA_IFACE" + return 1 + else + wpa_msg verbose "waiting for \"$WPA_CTRL_DIR/$WPA_IFACE\": $WPA_SOCKET_WAIT (max. $MAX_WPA_SOCKET_WAIT)" + fi + + WPA_SOCKET_WAIT=$(($WPA_SOCKET_WAIT + 1)) + sleep 1 + done + + wpa_msg verbose "ctrl_interface socket located at $WPA_CTRL_DIR/$WPA_IFACE" + else + wpa_msg stderr "init_wpa_supplicant() called without WPA_SUP_CONF" + return 1 + fi +} + +##################################################################### +## stop wpa_supplicant process +# Kill wpa_supplicant via start-stop-daemon, given the location of +# the pidfile or ctrl_interface socket path and interface name +# +kill_wpa_supplicant () { + if test_wpa_supplicant; then + + wpa_msg verbose "terminating $WPA_SUP_PNAME daemon via pidfile $WPA_SUP_PIDFILE" + + start-stop-daemon --stop --oknodo $DAEMON_VERBOSITY \ + --exec $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE + + if [ -f "$WPA_SUP_PIDFILE" ]; then + rm -f "$WPA_SUP_PIDFILE" + fi + elif [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; then + + wpa_msg action "terminating via ctrl_interface socket $WPA_CTRL_DIR/$WPA_IFACE" + + wpa_cli terminate >$TO_NULL + + if [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; then + rm -f "$WPA_CTRL_DIR/$WPA_IFACE" + fi + fi +} + +##################################################################### +## reload wpa_supplicant process +# Sending a HUP signal causes wpa_supplicant to reparse its +# configuration file +# +reload_wpa_supplicant () { + if test_wpa_supplicant; then + wpa_msg verbose "reloading wpa_supplicant configuration file via HUP signal" + start-stop-daemon --stop --signal HUP \ + --name "$WPA_SUP_PNAME" --pidfile "$WPA_SUP_PIDFILE" + else + wpa_msg verbose "cannot $WPA_ACTION, $WPA_SUP_PIDFILE does not exist" + fi +} + +##################################################################### +## daemonize wpa_cli and action script +# If environment variable WPA_ACTION_SCRIPT is present, wpa_cli will +# be spawned via start-stop-daemon +# +# Required options: +# -a action script => wpa_action +# -P process ID file +# -B background process +# +init_wpa_cli () { + if [ -n "$WPA_ACTION_SCRIPT" ]; then + local WPA_CLI_OPTIONS + WPA_CLI_OPTIONS="-B -P $WPA_CLI_PIDFILE -i $WPA_IFACE" + + wpa_msg verbose "$WPA_CLI_BIN $WPA_CLI_OPTIONS -p $WPA_CTRL_DIR -a $WPA_ACTION_SCRIPT" + + start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \ + --name $WPA_CLI_PNAME --startas $WPA_CLI_BIN --pidfile $WPA_CLI_PIDFILE \ + -- $WPA_CLI_OPTIONS -p $WPA_CTRL_DIR -a $WPA_ACTION_SCRIPT + + if [ "$?" != "0" ]; then + wpa_msg stderr "$WPA_CLI_BIN daemon failed to start" + return 1 + fi + fi +} + +##################################################################### +## stop wpa_cli process +# Kill wpa_cli via start-stop-daemon, given the location of the +# pidfile +# +kill_wpa_cli () { + if test_wpa_cli; then + + wpa_msg verbose "terminating $WPA_CLI_PNAME daemon via pidfile $WPA_CLI_PIDFILE" + + start-stop-daemon --stop --oknodo $DAEMON_VERBOSITY \ + --exec $WPA_CLI_BIN --pidfile $WPA_CLI_PIDFILE + + if [ -f "$WPA_CLI_PIDFILE" ]; then + rm -f "$WPA_CLI_PIDFILE" + fi + fi +} + +##################################################################### +## higher level wpa_cli wrapper for variable and set_network commands +# wpa_cli_do [set_network variable] +# +# $1 envorinment variable +# $2 data type of variable {raw|ascii} +# $3 wpa_cli variable, if $3 is set_network, shift and take +# set_network subvariable +# $4 wpa-* string as it would appear in interfaces file, enhances +# verbose messages +# +wpa_cli_do () { + if [ -z "$1" ]; then + return 0 + fi + + local WPACLISET_VALUE WPACLISET_VARIABLE WPACLISET_DESC + + case "$2" in + ascii) + # Double quote + WPACLISET_VALUE="\"$1\"" + ;; + raw|*) + # Provide raw value + WPACLISET_VALUE="$1" + ;; + esac + + case "$3" in + set_network) + if [ -z "$WPA_ID" ]; then + return 1 + fi + shift + WPACLISET_VARIABLE="set_network $WPA_ID $3" + ;; + *) + WPACLISET_VARIABLE="$3" + ;; + esac + + case "$4" in + *-psk|*-passphrase|*-passwd*|*-wep-key*) + WPACLISET_DESC="$4 *****" + ;; + *) + WPACLISET_DESC="$4 $WPACLISET_VALUE" + ;; + esac + + wpa_msg action "$WPACLISET_DESC" + + wpa_cli $WPACLISET_VARIABLE "$WPACLISET_VALUE" >$TO_NULL +} + +##################################################################### +## check value data type in plaintext or hex +# returns 0 if input consists of hexadecimal digits only, 1 otherwise +# +ishex () { + if [ -z "$1" ]; then + return 0 + fi + + case "$1" in + *[!0-9a-fA-F]*) + # plaintext + return 1 + ;; + *) + # hexadecimal + return 0 + ;; + esac +} + +##################################################################### +## sanity check and set psk|passphrase +# Warn about strange psk|passphrase values +# +# $1 psk or passphrase value +# +# If psk is surrounded by quotes strip them. +# +# If psk contains all hexadecimal characters and string length is 64: +# is 256bit hexadecimal +# else: +# is plaintext +# +# plaintext passphrases must be 8 - 63 characters in length +# 256-bit hexadecimal key must be 64 characters in length +# +wpa_key_check_and_set () { + if [ -z "$1" ]; then + return 0 + fi + + local KEY KEY_TYPE + + case "$1" in + '"'*'"') + # Strip surrounding quotation marks + KEY=$(echo -n "$1" | sed 's/^"//;s/"$//') + ;; + *) + KEY="$1" + ;; + esac + + if ishex "$KEY" && [ "${#KEY}" -eq "64" ]; then + KEY_TYPE="raw" + else + KEY_TYPE="ascii" + if [ "${#KEY}" -lt "8" ] || [ "${#KEY}" -gt "63" ]; then + wpa_msg stderr \ + "plaintext or ascii wpa-psk has ${#KEY} characters, it must have between 8 and 63" + wpa_msg stderr \ + "if wpa-psk truly is a 256-bit hexadecimal key, it must have 64 characters" + fi + fi + + wpa_cli_do "$KEY" "$KEY_TYPE" \ + set_network psk wpa-psk +} + +##################################################################### +## formulate a usable configuration from interfaces(5) wpa- lines +# A series of wpa_cli commands corresponding to environment variables +# created as a result of wpa- lines in an interfaces stanza. +# +# NB: no-act when roaming daemon is used (to avoid prematurely +# attaching to ctrl_interface socket) +# +conf_wpa_supplicant () { + if [ -n "$WPA_ACTION_SCRIPT" ]; then + return 0 + fi + + if [ "$IF_WPA_DRIVER" = "wired" ]; then + IF_WPA_AP_SCAN="0" + wpa_msg verbose "forcing ap_scan=0 (required for wired IEEE8021X auth)" + fi + + if [ -n "$IF_WPA_ESSID" ]; then + # #403316, be similar to wireless tools + IF_WPA_SSID="$IF_WPA_ESSID" + fi + + wpa_cli_do "$IF_WPA_AP_SCAN" raw \ + ap_scan wpa-ap-scan + + wpa_cli_do "$IF_WPA_PREAUTHENTICATE" raw \ + preauthenticate wpa-preauthenticate + + if [ -n "$IF_WPA_SSID" ] || [ "$IF_WPA_DRIVER" = "wired" ]; then + + case "$IF_WPA_SSID" in + '"'*'"') + IF_WPA_SSID=$(echo -n "$IF_WPA_SSID" | sed 's/^"//;s/"$//') + ;; + *) + ;; + esac + + WPA_ID=$(wpa_cli add_network) + + wpa_msg verbose "configuring network block -- $WPA_ID" + + wpa_cli_do "$IF_WPA_SSID" ascii \ + set_network ssid wpa-ssid + + wpa_cli_do "$IF_WPA_PRIORITY" raw \ + set_network priority wpa-priority + + wpa_cli_do "$IF_WPA_BSSID" raw \ + set_network bssid wpa-bssid + + if [ -s "$IF_WPA_PSK_FILE" ]; then + IF_WPA_PSK=$(cat "$IF_WPA_PSK_FILE") + fi + + # remain compat with wpa-passphrase-file + if [ -s "$IF_WPA_PASSPHRASE_FILE" ]; then + IF_WPA_PSK=$(cat "$IF_WPA_PASSPHRASE_FILE") + fi + + # remain compat with wpa-passphrase + if [ -n "$IF_WPA_PASSPHRASE" ]; then + IF_WPA_PSK="$IF_WPA_PASSPHRASE" + fi + + if [ -n "$IF_WPA_PSK" ]; then + wpa_key_check_and_set "$IF_WPA_PSK" + fi + + wpa_cli_do "$IF_WPA_PAIRWISE" raw \ + set_network pairwise wpa-pairwise + + wpa_cli_do "$IF_WPA_GROUP" raw \ + set_network group wpa-group + + wpa_cli_do "$IF_WPA_MODE" raw \ + set_network mode wpa-mode + + wpa_cli_do "$IF_WPA_FREQUENCY" raw \ + set_network frequency wpa-frequency + + wpa_cli_do "$IF_WPA_KEY_MGMT" raw \ + set_network key_mgmt wpa-key-mgmt + + wpa_cli_do "$IF_WPA_PROTO" raw \ + set_network proto wpa-proto + + wpa_cli_do "$IF_WPA_AUTH_ALG" raw \ + set_network auth_alg wpa-auth-alg + + wpa_cli_do "$IF_WPA_SCAN_SSID" raw \ + set_network scan_ssid wpa-scan-ssid + + wpa_cli_do "$IF_WPA_IDENTITY" ascii \ + set_network identity wpa-identity + + wpa_cli_do "$IF_WPA_ANONYMOUS_IDENTITY" ascii \ + set_network anonymous_identity wpa-anonymous-identity + + wpa_cli_do "$IF_WPA_EAP" raw \ + set_network eap wpa-eap + + wpa_cli_do "$IF_WPA_EAPPSK" raw \ + set_network eappsk wpa-eappsk + + wpa_cli_do "$IF_WPA_NAI" ascii \ + set_network nai wpa-nai + + wpa_cli_do "$IF_WPA_PASSWORD" ascii \ + set_network password wpa-password + + wpa_cli_do "$IF_WPA_CA_CERT" ascii \ + set_network ca_cert wpa-ca-cert + + wpa_cli_do "$IF_WPA_CA_PATH" ascii \ + set_network ca_path wpa-ca-path + + wpa_cli_do "$IF_WPA_CLIENT_CERT" ascii \ + set_network client_cert wpa-client-cert + + wpa_cli_do "$IF_WPA_PRIVATE_KEY" ascii \ + set_network private_key wpa-private-key + + wpa_cli_do "$IF_WPA_PRIVATE_KEY_PASSWD" ascii \ + set_network private_key_passwd wpa-private-key-passwd + + wpa_cli_do "$IF_WPA_DH_FILE" ascii \ + set_network dh_file wpa-dh-file + + wpa_cli_do "$IF_WPA_SUBJECT_MATCH" ascii \ + set_network subject_match wpa-subject-match + + wpa_cli_do "$IF_WPA_ALTSUBJECT_MATCH" ascii \ + set_network altsubject_match wpa-altsubject-match + + wpa_cli_do "$IF_WPA_CA_CERT2" ascii \ + set_network ca_cert2 wpa-ca-cert2 + + wpa_cli_do "$IF_WPA_CA_PATH2" ascii \ + set_network ca_path2 wpa-ca-path2 + + wpa_cli_do "$IF_WPA_CLIENT_CERT2" ascii \ + set_network client_cert2 wpa-client-cert2 + + wpa_cli_do "$IF_WPA_PRIVATE_KEY2" ascii \ + set_network private_key2 wpa-private-key2 + + wpa_cli_do "$IF_WPA_PRIVATE_KEY_PASSWD2" ascii \ + set_network private_key_passwd2 wpa-private-key-passwd2 + + wpa_cli_do "$IF_WPA_DH_FILE2" ascii \ + set_network dh_file2 wpa-dh-file2 + + wpa_cli_do "$IF_WPA_SUBJECT_MATCH2" ascii \ + set_network subject_match2 wpa-subject-match2 + + wpa_cli_do "$IF_WPA_ALTSUBJECT_MATCH2" ascii \ + set_network altsubject_match2 wpa-altsubject-match2 + + wpa_cli_do "$IF_WPA_EAP_METHODS" raw \ + set_network eap_methods wpa-eap-methods + + wpa_cli_do "$IF_WPA_PHASE1" ascii \ + set_network phase1 wpa-phase1 + + wpa_cli_do "$IF_WPA_PHASE2" ascii \ + set_network phase2 wpa-phase2 + + wpa_cli_do "$IF_WPA_PCSC" raw \ + set_network pcsc wpa-pcsc + + wpa_cli_do "$IF_WPA_PIN" ascii \ + set_network pin wpa-pin + + wpa_cli_do "$IF_WPA_ENGINE" raw \ + set_network engine wpa-engine + + wpa_cli_do "$IF_WPA_ENGINE_ID" ascii \ + set_network engine_id wpa-engine-id + + wpa_cli_do "$IF_WPA_KEY_ID" ascii \ + set_network key_id wpa-key-id + + wpa_cli_do "$IF_WPA_EAPOL_FLAGS" raw \ + set_network eapol_flags wpa-eapol-flags + + wpa_cli_do "$IF_WPA_WEP_KEY0" raw \ + set_network wep_key0 wpa-wep-key0 + + wpa_cli_do "$IF_WPA_WEP_KEY1" raw \ + set_network wep_key1 wpa-wep-key1 + + wpa_cli_do "$IF_WPA_WEP_KEY2" raw \ + set_network wep_key2 wpa-wep-key2 + + wpa_cli_do "$IF_WPA_WEP_KEY3" raw \ + set_network wep_key3 wpa-wep-key3 + + wpa_cli_do "$IF_WPA_WEP_TX_KEYIDX" raw \ + set_network wep_tx_keyidx wpa-wep-tx-keyidx + + wpa_cli_do "$IF_WPA_PROACTIVE_KEY_CACHING" raw \ + set_network proactive_key_caching wpa-proactive-key-caching + + wpa_cli_do "$IF_WPA_PAC_FILE" ascii \ + set_network pac_file wpa-pac-file + + wpa_cli_do "$IF_WPA_MODE" raw \ + set_network mode wpa-mode + + wpa_cli_do "$IF_WPA_PEERKEY" raw \ + set_network peerkey wpa-peerkey + + wpa_cli_do "$IF_FRAGMENT_SIZE" raw \ + set_network fragment_size wpa-fragment-size + + wpa_cli_do "$IF_WPA_ID_STR" ascii \ + set_network id_str wpa-id-str + + wpa_cli_do "$WPA_ID" raw \ + enable_network "enabling network block" + fi +} + +##################################################################### +## wpa_action basic logging +# Log actions to file, test to see if it is writeable first +# +wpa_log_init () { + if touch "$WPA_CLI_LOGFILE" 2>/dev/null; then + exec >> "$WPA_CLI_LOGFILE" 2>&1 + fi +} + +# log timestamp and wpa_action arguments +wpa_log_action () { + echo "########## $(date +"%H:%M:%S %Y-%m-%d") ##########" + echo "IFACE=$WPA_IFACE ACTION=$WPA_ACTION" +} + +# log wpa_cli environment variables +wpa_log_environment () { + echo "WPA_ID=$WPA_ID WPA_ID_STR=$WPA_ID_STR" + echo "WPA_CTRL_DIR=$WPA_CTRL_DIR" +} + +##################################################################### +## hysteresis checking +# Networking tools such as dhcp clients used with ifupdown can +# synthesize artificial ACTION events, particuarly just after a +# DISCONNECTED/CONNECTED events are experienced in quick succession. +# This can lead to infinite event loops, and in extreme cases has the +# potential to cause system instability. +# +wpa_hysteresis_event () { + echo "$(date +%s)" > "$WPA_CLI_TIMESTAMP" +} + +wpa_hysteresis_check () { + if [ -f "$WPA_CLI_TIMESTAMP" ]; then + local TIME TIMESTAMP TIMEWAIT + TIME=$(date +%s) + # current time minus 4 second event buffer + TIMEWAIT=$(($TIME-4)) + # get time of last event + TIMESTAMP=$(cat $WPA_CLI_TIMESTAMP) + # compare values, allowing new action to be processed + # only if last action was more than 4 seconds ago + if [ "$TIMEWAIT" -le "$TIMESTAMP" ]; then + echo "Ignoring $WPA_ACTION event, too soon after previous event" + return 1 + fi + fi + + return 0 +} + +##################################################################### +## identify ifupdown files +# Identify ifupdown core files, so that state of the interface can be +# checked. This is the weakest part of the wpa_action roaming scheme, +# it would be _much_ better if stateless ifupdown capabilities were +# a reality. +# +ifupdown_check () { + if [ -e /etc/network/interfaces ]; then + INTERFACES_FILE="/etc/network/interfaces" + else + echo "Cannot locate ifupdown's \"interfaces\" file, $WPA_IFACE will not be configured" + return 1 + fi + + if [ -e /etc/network/run/ifstate ]; then + # debian's ifupdown + IFSTATE_FILE="/etc/network/run/ifstate" + elif [ -e /var/run/network/ifstate ]; then + # ubuntu's + IFSTATE_FILE="/var/run/network/ifstate" + else + echo "Cannot locate ifupdown's \"ifstate\" file, $WPA_IFACE will not be configured" + return 1 + fi + + return 0 +} + +##################################################################### +## apply mapping logic and ifup logical interface +# Apply mapping logic via id_str or external mapping script, check +# state of IFACE with respect to ifupdown and ifup logical interaface +# +ifup () { + local WPA_LOGICAL_IFACE + + if [ -z "$IF_WPA_MAPPING_SCRIPT_PRIORITY" ] && [ -n "$WPA_ID_STR" ]; then + WPA_LOGICAL_IFACE="$WPA_ID_STR" + echo "Mapping logical interface via id_str: $WPA_LOGICAL_IFACE" + fi + + if [ -z "$WPA_LOGICAL_IFACE" ] && [ -n "$IF_WPA_MAPPING_SCRIPT" ]; then + echo "Mapping logical interface via wpa-mapping-script: $IF_WPA_MAPPING_SCRIPT" + + local WPA_MAP_STDIN + + WPA_MAP_STDIN=$(set | sed --quiet 's/^\(IF_WPA_MAP[0-9]*\)=.*/echo \$\1/p') + + if [ -n "$WPA_MAP_STDIN" ]; then + WPA_LOGICAL_IFACE=$(eval "$WPA_MAP_STDIN" | "$IF_WPA_MAPPING_SCRIPT" "$WPA_IFACE") + else + WPA_LOGICAL_IFACE=$("$IF_WPA_MAPPING_SCRIPT" "$WPA_IFACE") + fi + + if [ -n "$WPA_LOGICAL_IFACE" ]; then + echo "Mapping script result: $WPA_LOGICAL_IFACE" + else + echo "Mapping script failed." + fi + fi + + if [ -z "$WPA_LOGICAL_IFACE" ]; then + if [ -n "$IF_WPA_ROAM_DEFAULT_IFACE" ]; then + WPA_LOGICAL_IFACE="$IF_WPA_ROAM_DEFAULT_IFACE" + echo "Using wpa-roam-default-iface: $WPA_LOGICAL_IFACE" + else + WPA_LOGICAL_IFACE="default" + echo "Using fallback logical interface: $WPA_LOGICAL_IFACE" + fi + fi + + if [ -n "$WPA_LOGICAL_IFACE" ]; then + if egrep -q "^iface[[:space:]]+$WPA_LOGICAL_IFACE[[:space:]]+inet" "$INTERFACES_FILE"; then + + echo "ifup $WPA_IFACE=$WPA_LOGICAL_IFACE" + + if grep --quiet "^$WPA_IFACE=$WPA_IFACE" "$IFSTATE_FILE"; then + # Force settings over the unconfigured "master" IFACE + /sbin/ifup --force "$WPA_IFACE=$WPA_LOGICAL_IFACE" + else + /sbin/ifup "$WPA_IFACE=$WPA_LOGICAL_IFACE" + fi + else + echo "No network defined for \"$WPA_LOGICAL_IFACE\" in \"$INTERFACES_FILE\"" + fi + else + echo "No suitable logical interface mapping for ifupdown to configure" + fi +} + +##################################################################### +## ifdown IFACE +# Check IFACE state and ifdown as requested. +# +ifdown () { + if grep --quiet "^$WPA_IFACE" "$IFSTATE_FILE"; then + echo "ifdown $WPA_IFACE" + /sbin/ifdown "$WPA_IFACE" + else + echo "Ignoring request to take \"$WPA_IFACE\" down, it is not up" + fi +} + +##################################################################### +## keep IFACE scanning +# After ifdown, the IFACE may be left "down", and inhibits +# wpa_supplicant's ability to continue roaming. +# +# NB: use iproute if present, flushing the IFACE first +# +if_post_down_up () { + if [ -x /sbin/ip ]; then + /sbin/ip addr flush dev "$WPA_IFACE" 2>/dev/null + /sbin/ip link set "$WPA_IFACE" up + else + /sbin/ifconfig "$WPA_IFACE" up + fi +} diff --git a/packages/wpa-supplicant/files/ifupdown.sh b/packages/wpa-supplicant/files/ifupdown.sh new file mode 100755 index 0000000000..71486f7648 --- /dev/null +++ b/packages/wpa-supplicant/files/ifupdown.sh @@ -0,0 +1,132 @@ +#!/bin/sh + +# Copyright (C) 2006 Debian/Ubuntu wpasupplicant Maintainers +# +# +# 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. +# +# On Debian GNU/Linux systems, the text of the GPL license can be +# found in /usr/share/common-licenses/GPL. + +if [ -n "$IF_WPA_MAINT_DEBUG" ]; then + set -x +fi + +# quit if we're called for the loopback +if [ "$IFACE" = lo ]; then + exit 0 +fi + +# allow wpa_supplicant interface to be specified via wpa-iface +# useful for starting wpa_supplicant on one interface of a bridge +if [ -n "$IF_WPA_IFACE" ]; then + WPA_IFACE="$IF_WPA_IFACE" +else + WPA_IFACE="$IFACE" +fi + +# source functions +if [ -f /etc/wpa_supplicant/functions.sh ]; then + . /etc/wpa_supplicant/functions.sh +else + exit 0 +fi + +# quit if executables are not installed +if [ ! -x "$WPA_SUP_BIN" ] || [ ! -x "$WPA_CLI_BIN" ]; then + exit 0 +fi + +# quit if wpa_action is active +if test_wpa_cli; then + exit 0 +fi + +#echo "Initial WPA Checks Pass" + +# preliminary sanity checks for roaming daemon +if [ -n "$IF_WPA_ROAM" ]; then + if [ "$METHOD" != "manual" ]; then + wpa_msg stderr "wpa-roam can only be used with the \"manual\" inet METHOD" + exit 1 + fi + if [ -n "$IF_WPA_MAPPING_SCRIPT" ]; then + if ! type "$IF_WPA_MAPPING_SCRIPT" >/dev/null; then + wpa_msg stderr "wpa-mapping-script \"$IF_WPA_MAPPING_SCRIPT\" is not valid" + exit 1 + fi + fi + if [ -n "$IF_WPA_MAPPING_SCRIPT_PRIORITY" ] && [ -z "$IF_WPA_MAPPING_SCRIPT" ]; then + wpa_msg stderr "\"wpa-mapping-script-priority 1\" is invalid without a wpa-mapping-script" + exit 1 + fi + IF_WPA_CONF="$IF_WPA_ROAM" + WPA_ACTION_SCRIPT="/sbin/wpa_action" +fi + +# master function; determines if ifupdown.sh should do something or not +if [ -n "$IF_WPA_CONF" ]; then + if [ ! -s "$IF_WPA_CONF" ]; then + wpa_msg stderr "cannot read contents of $IF_WPA_CONF" + exit 1 + fi + WPA_SUP_CONF_CTRL_DIR=$(sed --quiet \ + 's/[[:space:]]*#.*//g;s/[[:space:]]\+.*$//g;s/^\(ctrl_interface\|DIR\)=\(.*\)/\2/p' "$IF_WPA_CONF") + if [ -n "$WPA_SUP_CONF_CTRL_DIR" ]; then + WPA_CTRL_DIR="$WPA_SUP_CONF_CTRL_DIR" + fi + WPA_SUP_CONF="-c $IF_WPA_CONF -C $WPA_CTRL_DIR" +elif set | grep -q "^IF_WPA"; then + WPA_SUP_CONF="-C $WPA_CTRL_DIR" +else + exit 0 +fi + +case "$MODE" in + start) + PHASE="pre-up" + echo "WPA: Configuring Interface" + case "$PHASE" in + pre-up) + kill_wpa_supplicant + init_wpa_supplicant || echo "FAILED" + conf_wpa_supplicant || { kill_wpa_supplicant; exit 1; } + ;; + post-up) + init_wpa_cli || { kill_wpa_supplicant; exit 1; } + ;; + esac + ;; + + stop) + PHASE="post-down" + echo "WPA: Terminating" + case "$PHASE" in + pre-down) + kill_wpa_cli + ;; + post-down) + kill_wpa_supplicant + ;; + *) + wpa_msg stderr "unknown phase: \"$PHASE\"" + exit 1 + ;; + esac + ;; + + *) + wpa_msg stderr "unknown mode: \"$MODE\"" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/wpa-supplicant/wpa-supplicant-0.5.inc b/packages/wpa-supplicant/wpa-supplicant-0.5.inc index 28f355c612..b5e53e3f56 100644 --- a/packages/wpa-supplicant/wpa-supplicant-0.5.inc +++ b/packages/wpa-supplicant/wpa-supplicant-0.5.inc @@ -12,24 +12,18 @@ DEFAULT_PREFERENCE = "-2" SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \ file://defconfig-gnutls \ - file://init.sh \ file://gnutlsfix.patch;patch=1 \ - file://defaults-sane \ - file://wpa-supplicant.sh \ - file://wpa_supplicant.conf \ - file://wpa_supplicant.conf-sane" + file://ifupdown.sh \ + file://functions.sh" S = "${WORKDIR}/wpa_supplicant-${PV}" -PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " +PACKAGES_prepend = "wpa-supplicant-passphrase " FILES_wpa-supplicant-passphrase = "/usr/sbin/wpa_passphrase" -FILES_wpa-supplicant-cli = "/usr/sbin/wpa_cli" -RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" +RREPLACES = "wpa-supplicant-cli" -INITSCRIPT_NAME = "wpa" -INITSCRIPT_PARAMS = "defaults 10" -inherit update-rc.d +RRECOMMENDS_${PN} = "wpa-supplicant-passphrase" export HAS_PCI = "${@base_contains('COMBINED_FEATURES', 'pci', 1, 0,d)}" @@ -55,20 +49,16 @@ do_install () { install -d ${D}${localstatedir}/run/wpa_supplicant install -d ${D}${docdir}/wpa_supplicant - install -m 644 README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant - - install -d ${D}${sysconfdir}/init.d - install -m 700 ${WORKDIR}/init.sh ${D}${sysconfdir}/init.d/wpa - - install -d ${D}${sysconfdir}/default - install -m 600 ${WORKDIR}/defaults-sane ${D}${sysconfdir}/default/wpa - install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf + install -m 644 README ${D}${docdir}/wpa_supplicant install -d ${D}${sysconfdir}/network/if-pre-up.d/ install -d ${D}${sysconfdir}/network/if-post-down.d/ install -d ${D}${sysconfdir}/network/if-down.d/ - install -m 644 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir} - install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant - cd ${D}${sysconfdir}/network/ && \ - ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant + + install -d ${D}${sysconfdir}/wpa_supplicant + install -m 755 ${WORKDIR}/ifupdown.sh ${D}${sysconfdir}/wpa_supplicant/ + install -m 755 ${WORKDIR}/functions.sh ${D}${sysconfdir}/wpa_supplicant + + ln -s /etc/wpa_supplicant/ifupdown.sh ${D}${sysconfdir}/network/if-pre-up.d/wpasupplicant + ln -s /etc/wpa_supplicant/ifupdown.sh ${D}${sysconfdir}/network/if-post-down.d/wpasupplicant } diff --git a/packages/wpa-supplicant/wpa-supplicant_0.5.5.bb b/packages/wpa-supplicant/wpa-supplicant_0.5.5.bb index 67a5b99b0f..ce744b3fe7 100644 --- a/packages/wpa-supplicant/wpa-supplicant_0.5.5.bb +++ b/packages/wpa-supplicant/wpa-supplicant_0.5.5.bb @@ -1,3 +1,3 @@ require wpa-supplicant-0.5.inc -PR = "r1" +PR = "r3" diff --git a/packages/wpa-supplicant/wpa-supplicant_0.5.7.bb b/packages/wpa-supplicant/wpa-supplicant_0.5.7.bb index 6594bbfdbe..2aa871bb74 100644 --- a/packages/wpa-supplicant/wpa-supplicant_0.5.7.bb +++ b/packages/wpa-supplicant/wpa-supplicant_0.5.7.bb @@ -1 +1,3 @@ require wpa-supplicant-0.5.inc + +PR = "r1" \ No newline at end of file -- cgit v1.2.3 From e3c7fc17fa4021b82f32417639aec92d26b0c89e Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 3 Jun 2007 17:14:55 +0000 Subject: conf/checksums.ini: added checksum for qt 4.3.0 --- conf/checksums.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/checksums.ini b/conf/checksums.ini index a782557a35..1de88de9c5 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -1254,6 +1254,10 @@ sha256=a23860a7390bbbc87cf98833f8716cd03b88b1d6fce77e0624daba3150a177e9 md5=13f12bf58a32ebf15837fcd605cb3c99 sha256=c163e72cb002435d1d261a47acdcb23e59c10e4263f983a5f2c2d2ca40ede75b +[ftp://ftp.trolltech.com/pub/qt/source/qt-x11-opensource-src-4.3.0.tar.gz] +md5=8012acea71b35c18247bd92c4721589d +sha256=abc37774d327a9b1d1d35e223f014c7e92168cd6c7baf66156badca68f8f1440 + [ftp://ftp.trolltech.com/qt/source/qt-embedded-free-3.3.5.tar.bz2] md5=022d7a3c572b554f3c47b12cae71a8a4 sha256=a97656796c0ef8e87dd83e6138bc406e31830d08f9b213e039d8be39ea65c8e4 -- cgit v1.2.3 From e891c6323c81bccb49a0298949803a484ac8480f Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 3 Jun 2007 17:16:21 +0000 Subject: uicmoc4-native: bumped version to 4.3.0 --- packages/uicmoc/uicmoc4-native_4.3.0.bb | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/uicmoc/uicmoc4-native_4.3.0.bb diff --git a/packages/uicmoc/uicmoc4-native_4.3.0.bb b/packages/uicmoc/uicmoc4-native_4.3.0.bb new file mode 100644 index 0000000000..341b092e29 --- /dev/null +++ b/packages/uicmoc/uicmoc4-native_4.3.0.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "User-Interface-, Meta-Object-, and Resource Compiler for Qt/[X11|Mac|Embedded] version 4.x" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "GPL QPL" + +SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz" + +S = "${WORKDIR}/qt-x11-opensource-src-${PV}" + +inherit native + +EXTRA_OECONF = "-qt-libjpeg -qt-gif -system-zlib \ + -no-nis -no-cups -no-exceptions \ + -no-accessibility -no-libjpeg \ + -no-nas-sound -no-sm \ + -no-xshape -no-xinerama \ + -no-xcursor -no-xrandr \ + -no-xrender -no-fontconfig \ + -no-tablet -no-xkb \ + -no-libpng \ + -verbose -release -fast -static " +EXTRA_OEMAKE = " " + +do_configure() { + echo yes | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}" +} + +do_compile() { + unset CC CXX CFLAGS LFLAGS CXXFLAGS CPPFLAGS + cd ${S}/src/tools/moc && oe_runmake CC="${CC}" CXX="${CXX}" + cd ${S}/src/corelib && oe_runmake CC="${CC}" CXX="${CXX}" + cd ${S}/src/xml && oe_runmake CC="${CC}" CXX="${CXX}" + cd ${S}/src/tools/uic && oe_runmake CC="${CC}" CXX="${CXX}" + cd ${S}/src/tools/rcc && oe_runmake CC="${CC}" CXX="${CXX}" +} + +do_stage() { + install -m 0755 bin/moc ${STAGING_BINDIR}/moc4 + install -m 0755 bin/uic ${STAGING_BINDIR}/uic4 + install -m 0755 bin/rcc ${STAGING_BINDIR}/rcc4 +} -- cgit v1.2.3 From 09dabd90c1b97c0374e0134a2605a154bc122cf9 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 3 Jun 2007 17:20:10 +0000 Subject: qt4-x11: first attempt on 4.3 --- packages/qt/qt4-x11-free-4.3.0/.mtn2git_empty | 0 .../qt/qt4-x11-free-4.3.0/0001-cross-compile.patch | 174 +++++++++++++++++++++ .../0002-fix-resinit-declaration.patch | 25 +++ packages/qt/qt4-x11-free-4.3.0/0003-no-tools.patch | 25 +++ packages/qt/qt4-x11-free-4.3.0/0004-no-qmake.patch | 25 +++ .../qt/qt4-x11-free-4.3.0/0005-fix-mkspecs.patch | 123 +++++++++++++++ packages/qt/qt4-x11-free_4.3.0.bb | 168 ++++++++++++++++++++ 7 files changed, 540 insertions(+) create mode 100644 packages/qt/qt4-x11-free-4.3.0/.mtn2git_empty create mode 100644 packages/qt/qt4-x11-free-4.3.0/0001-cross-compile.patch create mode 100644 packages/qt/qt4-x11-free-4.3.0/0002-fix-resinit-declaration.patch create mode 100644 packages/qt/qt4-x11-free-4.3.0/0003-no-tools.patch create mode 100644 packages/qt/qt4-x11-free-4.3.0/0004-no-qmake.patch create mode 100644 packages/qt/qt4-x11-free-4.3.0/0005-fix-mkspecs.patch create mode 100644 packages/qt/qt4-x11-free_4.3.0.bb diff --git a/packages/qt/qt4-x11-free-4.3.0/.mtn2git_empty b/packages/qt/qt4-x11-free-4.3.0/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/qt/qt4-x11-free-4.3.0/0001-cross-compile.patch b/packages/qt/qt4-x11-free-4.3.0/0001-cross-compile.patch new file mode 100644 index 0000000000..42f7b5575c --- /dev/null +++ b/packages/qt/qt4-x11-free-4.3.0/0001-cross-compile.patch @@ -0,0 +1,174 @@ +From 64210fec17ab819f21769e3e82bb26e9f2ccfdb4 Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Sun, 3 Jun 2007 18:30:37 +0200 +Subject: [PATCH] cross compile + +--- + configure | 137 ++---------------------------------------------------------- + 1 files changed, 5 insertions(+), 132 deletions(-) + +diff --git a/configure b/configure +index 6b3ccd2..b3c2a52 100755 +--- a/configure ++++ b/configure +@@ -733,7 +733,7 @@ while [ "$#" -gt 0 ]; do + UNKNOWN_ARG=yes + fi + ;; +- -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-mysql_config) ++ -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-mysql_config|-crossarch) + VAR=`echo $1 | sed "s,^-\(.*\),\1,"` + shift + VAL="$1" +@@ -1109,6 +1109,9 @@ while [ "$#" -gt 0 ]; do + xplatform) + XPLATFORM="$VAL" + ;; ++ crossarch) ++ CROSSARCH="$VAL" ++ ;; + debug-and-release) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_DEBUG_RELEASE="$VAL" +@@ -2092,137 +2095,7 @@ if [ "$OPT_VERBOSE" = "yes" ]; then + echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)" + fi + +-if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then +- case "$CFG_EMBEDDED" in +- x86) +- ARCH=i386 +- ;; +- x86_64) +- ARCH=x86_64 +- ;; +- ipaq|sharp) +- ARCH=arm +- ;; +- *) +- ARCH="$CFG_EMBEDDED" +- ;; +- esac +-else +- case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in +- IRIX*:*:*) +- ARCH=`uname -p` +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " SGI ($ARCH)" +- fi +- ;; +- SunOS:5*:*) +- case "$UNAME_MACHINE" in +- sun4u*|sun4v*) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " Sun SPARC (sparc)" +- fi +- ARCH=sparc +- ;; +- i86pc) +- case "$PLATFORM" in +- *-64) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 64-bit AMD 80x86 (x86_64)" +- fi +- ARCH=x86_64 +- ;; +- *) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32-bit Intel 80x86 (i386)" +- fi +- ARCH=i386 +- ;; +- esac +- esac +- ;; +- Darwin:*:*) +- case "$UNAME_MACHINE" in +- Power?Macintosh) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32-bit Apple PowerPC (powerpc)" +- fi +- ;; +- x86) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32-bit Intel 80x86 (i386)" +- fi +- ;; +- esac +- ARCH=macosx +- ;; +- AIX:*:00????????00) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 64-bit IBM PowerPC (powerpc)" +- fi +- ARCH=powerpc +- ;; +- HP-UX:*:9000*) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " HP PA-RISC (parisc)" +- fi +- ARCH=parisc +- ;; +- *:*:i?86) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32-bit Intel 80x86 (i386)" +- fi +- ARCH=i386 +- ;; +- *:*:x86_64|*:*:amd64) +- if [ "$PLATFORM" = "linux-g++-32" ]; then +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32 bit on 64-bit AMD 80x86 (i386)" +- fi +- ARCH=i386 +- else +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 64-bit AMD 80x86 (x86_64)" +- fi +- ARCH=x86_64 +- fi +- ;; +- *:*:ppc) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 32-bit PowerPC (powerpc)" +- fi +- ARCH=powerpc +- ;; +- *:*:ppc64) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " 64-bit PowerPC (powerpc)" +- fi +- ARCH=powerpc +- ;; +- *:*:s390*) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " IBM S/390 (s390)" +- fi +- ARCH=s390 +- ;; +- *:*:*) +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " Trying '$UNAME_MACHINE'..." +- fi +- ARCH="$UNAME_MACHINE" +- ;; +- esac +-fi +- +-if [ -d "$relpath/src/corelib/arch/$ARCH" ]; then +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " '$ARCH' is supported" +- fi +-else +- if [ "$OPT_VERBOSE" = "yes" ]; then +- echo " '$ARCH' is unsupported, using 'generic'" +- fi +- ARCH=generic +-fi ++ARCH="$CROSSARCH" + + if [ "$OPT_VERBOSE" = "yes" ]; then + echo "System architecture: '$ARCH'" +-- +1.5.0.7 + diff --git a/packages/qt/qt4-x11-free-4.3.0/0002-fix-resinit-declaration.patch b/packages/qt/qt4-x11-free-4.3.0/0002-fix-resinit-declaration.patch new file mode 100644 index 0000000000..e479a64a2b --- /dev/null +++ b/packages/qt/qt4-x11-free-4.3.0/0002-fix-resinit-declaration.patch @@ -0,0 +1,25 @@ +From acfeb18aa94bad6b2066e91cd15570889baaa252 Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Sat, 2 Jun 2007 16:04:01 +0200 +Subject: [PATCH] fix resinit declaration + +--- + src/qt3support/network/q3dns.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/qt3support/network/q3dns.cpp b/src/qt3support/network/q3dns.cpp +index 9bc7b16..bfc333e 100644 +--- a/src/qt3support/network/q3dns.cpp ++++ b/src/qt3support/network/q3dns.cpp +@@ -30,7 +30,7 @@ + # include + # include + # include +-extern "C" int res_init(); ++extern "C" int res_init() throw(); + #endif + + // POSIX Large File Support redefines open -> open64 +-- +1.5.0.7 + diff --git a/packages/qt/qt4-x11-free-4.3.0/0003-no-tools.patch b/packages/qt/qt4-x11-free-4.3.0/0003-no-tools.patch new file mode 100644 index 0000000000..5412c90377 --- /dev/null +++ b/packages/qt/qt4-x11-free-4.3.0/0003-no-tools.patch @@ -0,0 +1,25 @@ +From 03cbda241413e4ae727b2a92ff452162aa7ad440 Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Sat, 2 Jun 2007 16:06:01 +0200 +Subject: [PATCH] no tools + +--- + src/src.pro | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/src.pro b/src/src.pro +index 6e08180..957d3dc 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -3,7 +3,7 @@ TEMPLATE = subdirs + # this order is important + unset(SRC_SUBDIRS) + win32:SRC_SUBDIRS += src_winmain +-SRC_SUBDIRS += src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_gui src_sql src_network src_svg src_script ++SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_svg src_script + contains(QT_CONFIG, opengl): SRC_SUBDIRS += src_opengl + contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support + !cross_compile { +-- +1.5.0.7 + diff --git a/packages/qt/qt4-x11-free-4.3.0/0004-no-qmake.patch b/packages/qt/qt4-x11-free-4.3.0/0004-no-qmake.patch new file mode 100644 index 0000000000..359f6df9d5 --- /dev/null +++ b/packages/qt/qt4-x11-free-4.3.0/0004-no-qmake.patch @@ -0,0 +1,25 @@ +From f5a73ce944240de9013cc23288c115e8213add5e Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Sat, 2 Jun 2007 16:06:59 +0200 +Subject: [PATCH] no qmake + +--- + configure | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure b/configure +index b3c2a52..1901e57 100755 +--- a/configure ++++ b/configure +@@ -3271,7 +3271,7 @@ END { + } + + # build qmake +-if true; then ###[ '!' -f "$outpath/bin/qmake" ]; ++if false; then ###[ '!' -f "$outpath/bin/qmake" ]; + echo "Creating qmake. Please wait..." + + OLD_QCONFIG_H= +-- +1.5.0.7 + diff --git a/packages/qt/qt4-x11-free-4.3.0/0005-fix-mkspecs.patch b/packages/qt/qt4-x11-free-4.3.0/0005-fix-mkspecs.patch new file mode 100644 index 0000000000..93692699dc --- /dev/null +++ b/packages/qt/qt4-x11-free-4.3.0/0005-fix-mkspecs.patch @@ -0,0 +1,123 @@ +From aa0377910cfd8d0fce6bdc9355994a4e267b1696 Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Sat, 2 Jun 2007 16:39:58 +0200 +Subject: [PATCH] fix mkspecs + +--- + mkspecs/common/g++.conf | 18 +++++++++--------- + mkspecs/common/linux.conf | 26 +++++++++++++------------- + 2 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf +index f5a5c8e..4007c7e 100644 +--- a/mkspecs/common/g++.conf ++++ b/mkspecs/common/g++.conf +@@ -2,12 +2,12 @@ + # qmake configuration for common gcc + # + +-QMAKE_CC = gcc +-QMAKE_CFLAGS += -pipe ++QMAKE_CC = $(OE_QMAKE_CC) ++QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS) + QMAKE_CFLAGS_DEPS += -M + QMAKE_CFLAGS_WARN_ON += -Wall -W + QMAKE_CFLAGS_WARN_OFF += -w +-QMAKE_CFLAGS_RELEASE += -O2 ++QMAKE_CFLAGS_RELEASE += -O2 + QMAKE_CFLAGS_DEBUG += -g + QMAKE_CFLAGS_SHLIB += -fPIC + QMAKE_CFLAGS_STATIC_LIB += -fPIC +@@ -16,8 +16,8 @@ QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden + QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} + QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} + +-QMAKE_CXX = g++ +-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS ++QMAKE_CXX = $(OE_QMAKE_CXX) ++QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS) + QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS + QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON + QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +@@ -30,9 +30,9 @@ QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden + QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} + QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +-QMAKE_LINK = g++ +-QMAKE_LINK_SHLIB = g++ +-QMAKE_LFLAGS += ++QMAKE_LINK = $(OE_QMAKE_LINK) ++QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK) ++QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) + QMAKE_LFLAGS_RELEASE += + QMAKE_LFLAGS_DEBUG += + QMAKE_LFLAGS_APP += +@@ -40,7 +40,7 @@ QMAKE_LFLAGS_SHLIB += -shared + QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB + QMAKE_LFLAGS_SONAME += -Wl,-soname, + QMAKE_LFLAGS_THREAD += +-QMAKE_RPATH = -Wl,-rpath, ++QMAKE_RPATH = -Wl,-rpath-link, + + QMAKE_PCH_OUTPUT_EXT = .gch + +diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf +index 3796a87..52acf16 100644 +--- a/mkspecs/common/linux.conf ++++ b/mkspecs/common/linux.conf +@@ -7,26 +7,26 @@ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + + QMAKE_INCDIR = + QMAKE_LIBDIR = +-QMAKE_INCDIR_X11 = /usr/X11R6/include +-QMAKE_LIBDIR_X11 = /usr/X11R6/lib +-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +-QMAKE_INCDIR_OPENGL = /usr/X11R6/include +-QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib ++QMAKE_INCDIR_X11 = ++QMAKE_LIBDIR_X11 = ++QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) ++QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) ++QMAKE_INCDIR_OPENGL = ++QMAKE_LIBDIR_OPENGL = + + QMAKE_LIBS = + QMAKE_LIBS_DYNLOAD = -ldl +-QMAKE_LIBS_X11 = -lXext -lX11 -lm +-QMAKE_LIBS_X11SM = -lSM -lICE ++QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) ++QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) + QMAKE_LIBS_NIS = -lnsl + QMAKE_LIBS_OPENGL = -lGLU -lGL + QMAKE_LIBS_OPENGL_QT = -lGL + QMAKE_LIBS_THREAD = -lpthread + +-QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +-QMAKE_UIC = $$[QT_INSTALL_BINS]/uic ++QMAKE_MOC = $(OE_QMAKE_MOC) ++QMAKE_UIC = $(OE_QMAKE_UIC) + +-QMAKE_AR = ar cqs ++QMAKE_AR = $(OE_QMAKE_AR) cqs + QMAKE_RANLIB = + + QMAKE_TAR = tar -cf +@@ -38,11 +38,11 @@ QMAKE_COPY_DIR = $(COPY) -r + QMAKE_MOVE = mv -f + QMAKE_DEL_FILE = rm -f + QMAKE_DEL_DIR = rmdir +-QMAKE_STRIP = strip ++QMAKE_STRIP = $(OE_QMAKE_STRIP) + QMAKE_STRIPFLAGS_LIB += --strip-unneeded + QMAKE_CHK_DIR_EXISTS = test -d + QMAKE_MKDIR = mkdir -p + QMAKE_INSTALL_FILE = install -m 644 -p + QMAKE_INSTALL_PROGRAM = install -m 755 -p + +-include(unix.conf) +\ No newline at end of file ++include(unix.conf) +-- +1.5.0.7 + diff --git a/packages/qt/qt4-x11-free_4.3.0.bb b/packages/qt/qt4-x11-free_4.3.0.bb new file mode 100644 index 0000000000..ee4f8e4d05 --- /dev/null +++ b/packages/qt/qt4-x11-free_4.3.0.bb @@ -0,0 +1,168 @@ +SECTION = "x11/libs" +PRIORITY = "optional" +HOMEPAGE = "http://www.trolltech.com" +LICENSE = "GPL QPL" +DEPENDS = "uicmoc4-native qmake2-native freetype jpeg virtual/libx11 xft libxext libxrender libxrandr libxcursor dbus" +PROVIDES = "qt4x11" + +SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0003-no-tools.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0005-fix-mkspecs.patch;patch=1" +S = "${WORKDIR}/qt-x11-opensource-src-${PV}" + +PARALLEL_MAKE = "" + +inherit qmake-base qt4x11 pkgconfig + +export QTDIR = "${S}" +STAGING_QT_DIR = "${STAGING_DIR}/${TARGET_SYS}/qt4" +EXTRA_OEMAKE = "-e" + +def qt_arch(d): + import bb, re + arch = bb.data.getVar('TARGET_ARCH', d, 1) + if re.match("^i.86$", arch): + arch = "x86" + elif re.match("^arm.*", arch): + arch = "arm" + elif arch == "x86_64": + arch = "x86" + elif arch == "mipsel": + arch = "mips" + return arch + +QT_ARCH := "${@qt_arch(d)}" + +# FIXME: +# * add missing options +QT_CONFIG_FLAGS = "-release -shared -qt-zlib -system-libjpeg -no-nas-sound -no-sm -no-libmng -qt-libpng -no-gif -no-xinerama \ + -no-tablet -no-xkb -no-nis -no-cups -no-opengl \ + -no-sse -no-sse2 -no-mmx -no-3dnow \ + -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \ + -qdbus \ + -verbose -stl -no-accessibility" + +EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after DEFINES+=QT_NO_XIM INCPATH+=${STAGING_INCDIR} \ + INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \ + QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \ + AR="${TARGET_PREFIX}ar cqs" \ + MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' + +do_configure() { + echo "DEFINES -= QT_NO_CAST_TO_ASCII" >>src/qbase.pri + echo "DEFINES += QT_NO_XIM" >>src/qbase.pri + unset QMAKESPEC + ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake + ln -sf ./linux-g++ mkspecs/linux-gnueabi-g++ + #export QMAKESPEC="linux-oe-g++" + #rm -rf ./mkspecs + #ln -sf ${QMAKE_MKSPEC_PATH} ./mkspecs + echo yes | ./configure -prefix / -platform ${TARGET_OS}-g++ -crossarch ${QT_ARCH} ${QT_CONFIG_FLAGS} -fast \ + -L${STAGING_LIBDIR} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/mysql +} + +# FIXME: Might want to compile the cross tools for the -dev packages as well... +do_compile() { + unset CFLAGS CXXFLAGS + install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc + install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc + install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic + + oe_runmake ${EXTRA_ENV} + + # FIXME: this is not the way to go, I think. + for pc in ${S}/lib/*.pc ; do + sed -i \ + -e 's,-L${S}/lib,,g' \ + -e 's,^moc_location=.*,^moc_location=${TARGING_BINDIR}/moc4,g' \ + -e 's,^uic_location=.*,^moc_location=${TARGING_BINDIR}/uic4,g' \ + $pc + done +} + +PARTS = "3Support AssistantClient Core DBus Designer DesignerComponents Gui Network Script Sql Svg Test Xml" + +do_stage() { + oe_runmake install INSTALL_ROOT=/ + install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${STAGING_QT_DIR}/bin/rcc + install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${STAGING_QT_DIR}/bin/moc + install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${STAGING_QT_DIR}/bin/uic +} + +# FIXME: Might want to call oe_runmake install INSTALL_ROOT=${D}/${prefix} as well... +# FIXME: Might want to install everything into ${libdir}/qt4/* to match the usual packing... +do_install() { + install -d ${D}${libdir} + install -d ${D}${bindir} + install -d ${D}${includedir} + for part in ${PARTS} + do + oe_libinstall -so -C lib libQt$part ${D}${libdir} + done + oe_libinstall -a -C lib libQtUiTools ${STAGING_QT_DIR} + cp -pPR include/* ${D}${includedir} + cp -pPR plugins ${D}${libdir} + cp -pPR bin/* ${D}${bindir} + + install -d ${D}${bindir}/qt4-examples + for binary in `find examples -perm 0755 -type f` + do + install -m 0755 $binary ${D}${bindir}/qt4-examples/ + done + install -d ${D}${bindir}/qt4-demos + for binary in `find demos -perm 0755 -type f` + do + install -m 0755 $binary ${D}${bindir}/qt4-demos/ + done +} + +QTPACKAGES = "libqtcore4 libqtgui4 libqtnetwork4 libqtsql4 libqtsvg4 libqttest4 libqtxml4 \ + libqtdesigner4 libqtdesignercomponents4 libqt3support4 \ + libqtassistantclient4 libqtscript4 libqtdbus4 \ + qt4-assistant qt4-common qt4-designer qt4-demos qt4-examples qt4-linguist \ + qt4-pixeltool qt4-dbus \ + qt4-plugins-accessible qt4-plugins-codecs qt4-plugins-designer qt4-plugins-imageformats qt4-plugins-sqldrivers \ + qt4-plugins-inputmethods qt4-plugins-iconengines" +PACKAGES += "${QTPACKAGES}" + +ALLOW_EMPTY = "1" +FILES_${PN} = "" +RDEPENDS_${PN} = "${QTPACKAGES}" + +FILES_libqtcore4 = "${libdir}/libQtCore.so.*" +FILES_libqtgui4 = "${libdir}/libQtGui.so.*" +FILES_libqtnetwork4 = "${libdir}/libQtNetwork.so.*" +FILES_libqtsql4 = "${libdir}/libQtSql.so.*" +FILES_libqtsvg4 = "${libdir}/libQtSvg.so.*" +FILES_libqttest4 = "${libdir}/libQtTest.so.*" +FILES_libqtxml4 = "${libdir}/libQtXml.so.*" +FILES_libqtdesigner4 = "${libdir}/libQtDesigner.so.*" +FILES_libqtdesignercomponents4 = "${libdir}/libQtDesignerComponents.so.*" +FILES_libqt3support4 = "${libdir}/libQt3Support.so.*" +FILES_libqtassistantclient4 = "${libdir}/libQtAssistantClient.so.*" +FILES_libqtscript4 = "${libdir}/libQtScript.so.*" +FILES_libqtdbus4 = "${libdir}/libQtDBus.so.*" + +FILES_qt4-plugins-accessible = "${libdir}/plugins/accessible/*.so" +FILES_qt4-plugins-codecs = "${libdir}/plugins/codecs/*.so" +FILES_qt4-plugins-designer = "${libdir}/plugins/designer/*.so" +FILES_qt4-plugins-imageformats = "${libdir}/plugins/imageformats/*.so" +FILES_qt4-plugins-sqldrivers = "${libdir}/plugins/sqldrivers/*.so" +FILES_qt4-plugins-inputmethods = "${libdir}/plugins/inputmethods/*.so" +FILES_qt4-plugins-iconengines = "${libdir}/plugins/iconengines/*.so" + +FILES_qt4-assistant = "${bindir}/*assistant*" +FILES_qt4-designer = "${bindir}/*designer*" +FILES_qt4-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/qm2ts" +FILES_qt4-pixeltool = "${bindir}/pixeltool" +FILES_qt4-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer" + +FILES_qt4-common = "${bindir}/qtconfig" +FILES_qt4-examples = "${bindir}/qt4-examples/*" +FILES_qt4-demos = "${bindir}/qtdemo ${bindir}/qt4-demos/*" + +FILES_${PN}-dev += "${bindir}/rcc ${bindir}/uic* ${bindir}/moc ${bindir}/qmake ${bindir}/syncqt \ + ${bindir}/qt3to4 ${bindir}/findtr" -- cgit v1.2.3 From 708b28e11eede1a8e5e8da8178bb695c01db83ba Mon Sep 17 00:00:00 2001 From: Mike Westerhof Date: Mon, 4 Jun 2007 01:49:53 +0000 Subject: turnup: updated to use the populate-volatile mechanism to manage /var when initializing a rootfs on disk, memstick, or nfs. --- packages/slugos-init/files/turnup | 132 ++++++++++++++++++++++++------- packages/slugos-init/slugos-init_0.10.bb | 2 +- 2 files changed, 106 insertions(+), 28 deletions(-) diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup index c852f911c8..10bccb8279 100644 --- a/packages/slugos-init/files/turnup +++ b/packages/slugos-init/files/turnup @@ -8,9 +8,93 @@ # configuration # The following variables control which directories in /var end # up on the rootfs and which end up in a temporary file system. -INRAM_MEMSTICK="/var/cache /var/lock /var/log /var/run /var/tmp /var/lib/ipkg" -INRAM_NFS="/var/cache /var/lock /var/run /var/tmp" -INRAM_DISK="" +INRAM_MEMSTICK="\ +### SlugOS from-memory-stick boot. +d root root 0755 /var/backups none +d root root 0755 /var/volatile/cache none +l root root 0755 /var/cache /var/volatile/cache +d root root 0755 /var/lib none +d root root 2755 /var/local none +d root root 1777 /var/volatile/lock none +l root root 1777 /var/lock /var/volatile/lock +d root root 0755 /var/volatile/log none +l root root 0755 /var/log /var/volatile/log +d root root 0755 /var/volatile/run none +l root root 0755 /var/run /var/volatile/run +d root root 0755 /var/spool none +d root root 1777 /var/volatile/tmp none +l root root 1777 /var/tmp /var/volatile/tmp +d root root 0755 /var/lock/subsys none +d root root 0755 /var/lib/dropbear none +d root root 0755 /var/lib/misc none +f root root 0664 /var/log/wtmp none +f root root 0664 /var/run/utmp none" + +INRAM_NFS="\ +### SlugOS from-NFS boot. +d root root 0755 /var/backups none +d root root 0755 /var/volatile/cache none +l root root 0755 /var/cache /var/volatile/cache +d root root 0755 /var/lib none +d root root 2755 /var/local none +d root root 1777 /var/volatile/lock none +l root root 1777 /var/lock /var/volatile/lock +d root root 0755 /var/log none +d root root 0755 /var/volatile/run none +l root root 0755 /var/run /var/volatile/run +d root root 0755 /var/spool none +d root root 1777 /var/volatile/tmp none +l root root 1777 /var/tmp /var/volatile/tmp +d root root 0755 /var/lock/subsys none +d root root 0755 /var/lib/dropbear none +d root root 0755 /var/lib/misc none +d root root 0755 /var/lib/ipkg none +f root root 0664 /var/log/wtmp none +f root root 0664 /var/run/utmp none" + +INRAM_DISK="\ +### SlugOS from-disk boot. +d root root 0755 /var/backups none +d root root 0755 /var/cache none +d root root 0755 /var/lib none +d root root 2755 /var/local none +d root root 1777 /var/lock none +d root root 0755 /var/log none +d root root 0755 /var/run none +d root root 0755 /var/spool none +d root root 1777 /var/tmp none +d root root 0755 /var/lock/subsys none +d root root 0755 /var/lib/dropbear none +d root root 0755 /var/lib/misc none +d root root 0755 /var/lib/ipkg none +f root root 0664 /var/log/wtmp none +f root root 0664 /var/run/utmp none" + +INRAM_HEADER="\ +# This configuration file lists filesystem objects that should get verified +# during startup and be created if missing. +# +# Every line must either be a comment starting with # +# or a definition of format: +# +# where the items are separated by whitespace ! +# +# : d|f|l : (d)irectory|(f)ile|(l)ink +# +# A linking example: +# l root root 0777 /var/test /tmp/testfile +# f root root 0644 /var/test none +# +# Understanding links: +# When populate-volatile is to verify/create a directory or file, it will first +# check it's existence. If a link is found to exist in the place of the target, +# the path of the target is replaced with the target the link points to. +# Thus, if a link is in the place to be verified, the object will be created +# in the place the link points to instead. +# This explains the order of \"link before object\" as in the example above, where +# a link will be created at /var/test pointing to /tmp/testfile and due to this +# link the file defined as /var/test will actually be created as /tmp/testfile. +#" # # force: override certain checks @@ -209,7 +293,6 @@ setup_bootdev() { # Removes the /var tmpfs entry from /etc/fstab. # Creates links from /var into /media/ram for NFS and Memstick. setup_var() { - local ram_targets directory test -n "$1" -a -d "$1"/var || { echo "turnup: setup_var($1,$2): expected a directory" >&2 @@ -220,35 +303,30 @@ setup_var() { *) echo "turnup: setup_var($1,$2): expected 'disk', 'nfs' or 'memstick'" >&2 return 1;; esac - # - # populate /var, there is a shell script to do this, but it uses - # absolute path names - chroot "$1" /bin/busybox sh /etc/init.d/populate-volatile.sh || { - echo "turnup: /var: could not populate directory" >&2 - return 1 - } + # populate /var. We just need to create the /var/volatile mount + # point, the populate-volatile script does the work at boot time. + echo "turnup: ensuring /var/volatile mountpoint exists" + test -d "$1"/var/volatile || mkdir "$1"/var/volatile + + # we need to put in place the correct configuration file for + # the populate-volatile script to use at boot time. The config + # file is already in place for the flash boot, and it's the same + # file for the ram boot. case "$2" in - disk) ram_targets="$INRAM_DISK";; - nfs) ram_targets="$INRAM_NFS";; - memstick) - ram_targets="$INRAM_MEMSTICK";; + disk) echo "$INRAM_HEADER" > "$1"/etc/default/volatiles/00_core + echo "$INRAM_DISK" >>"$1"/etc/default/volatiles/00_core;; + nfs) echo "$INRAM_HEADER" > "$1"/etc/default/volatiles/00_core + echo "$INRAM_NFS" >>"$1"/etc/default/volatiles/00_core;; + memstick) echo "$INRAM_HEADER" > "$1"/etc/default/volatiles/00_core + echo "$INRAM_MEMSTICK" >>"$1"/etc/default/volatiles/00_core;; esac - for directory in $ram_targets - do - rm -rf "$1/$directory" - ln -s "/media/ram/$directory" "$1/$directory" - done - # the startup link is left for the moment, this seems safer - #rm "$1"/etc/rc?.d/[KS]??populate-var.sh - # remove the /var tmpfs entry from the new /etc/fstab + # remove the /var tmpfs entry from the new /etc/fstab, if it is + # present in the first place. sed -i '\@[ ]/var[ ][ ]*tmpfs[ ]@d' "$1"/etc/fstab - echo "turnup: tmpfs will no longer be mounted on /var" >&2