diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-connectivity')
129 files changed, 8605 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammu-smsdrc b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammu-smsdrc new file mode 100644 index 000000000..da413c2d3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammu-smsdrc @@ -0,0 +1,80 @@ +# This is a sample Gammu SMSD configuration file. It's required for gammu-smsd, +# see gammu-smsdrc(5) for documentation. + +# Gammu configuration, this section is like section "gammu" in "gammurc" file, +# see gammurc(5) for documentation. +[gammu] +device = /dev/ttyUSB0 +model = at115200 +#connection = dlr3 +#synchronizetime = yes +#logfile = gammulog # this is not used at all in SMSD mode +#logformat = textall +#use_locking = yes +#gammuloc = gammu.us +#startinfo = yes + +# When uncomment this section and insert numbers here, smsd will process +# incoming sms only from numbers written here (incoming sms from all other +# numbers will be deleted) +#[include_numbers] +#number1 = 1234 + +# When uncomment this section and insert numbers here, smsd will process +# incoming sms from all numbers not written here (incoming sms from numbers +# written here will be deleted). This is "black" list. +# Note: after using "include_numbers" section this one will be ignored +#[exclude_numbers] +#number1 = 1234 + +# General SMSD settings, see gammu-smsdrc(5) for detailed description. +[smsd] +# SMSD service to use, one of FILES, MYSQL, PGSQL, DBI +service = files +# PIN for SIM card +PIN = 0000 +# File (or stderr, syslog, eventlog) where information will be logged +logfile = smsdlog +# Amount of information being logged, each bit mean one level +debuglevel = 0 +# Configuration for using more phones on same database +#phoneid = MyPhone1 +# Script to be executed when new message has been received +#runonreceive = /some/script +# Commication frequency settings +commtimeout = 30 +sendtimeout = 30 +#receivefrequency = 0 + +# Phone communication settings +#checksecurity = 1 +#resetfrequency = 0 + +# Delivery report configuration +#deliveryreport = no +#deliveryreportdelay = 10 + +# Ignoring broken SMSC +#skipsmscnumber = +48602123456 + +# Database backends congfiguration +user = gammu +password = gammupassword +pc = localhost +# pc can also contain port or socket path after colon (eg. localhost:/path/to/socket) +database = sms + +# DBI configuration +driver = sqlite +# driverspath = /usr/lib/dbd/ +# Database directory for sqlite +# dbdir = /var/lib/smsd + +# Files backend configuration +inboxpath = /var/spool/sms/inbox/ +outboxpath = /var/spool/sms/outbox/ +sentsmspath = /var/spool/sms/sent/ +errorsmspath = /var/spool/sms/error/ +inboxformat = detail +transmitformat = auto +outboxformat = detail diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammurc b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammurc new file mode 100644 index 000000000..b55d739fa --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammurc @@ -0,0 +1,173 @@ +; This is a sample ~/.gammurc file. +; In Unix/Linux copy it into your home directory and name it .gammurc +; or into /etc and name it gammurc +; In Win32 copy it into directory with Gammu.exe and name gammurc +; More about parameters later +; Anything behind ; or # is comment. +; ----------------------------------------------------------------------------- + +[gammu] + +device = /dev/ttyUSB0 +connection = at115200 +; Do not use model configuration unless you really need it +;model = 6110 +;synchronizetime = yes +;logfile = gammulog +;logformat = textall +;use_locking = yes +;gammuloc = locfile +;startinfo = yes +;gammucoding = utf8 +;usephonedb = yes + +;[gammu1] + +;device = com8: +;model = 6110 +;connection = fbusblue +;synchronizetime = yes +;logfile = gammulog +;logformat = textall +;use_locking = yes +;gammuloc = locfile +;startinfo = yes +;gammucoding = utf8 + +; Step 1. Please find required Connection parameter and look into assigned +; with it device type. With some Connection you must set concrete model + +; ================================================================ cables ===== +; New Nokia protocol for FBUS/DAU9P +; Connection "fbus", device type serial +; New Nokia protocol for DLR3/DLR3P +; Connection "fbusdlr3"/"dlr3", device type serial +; New Nokia protocol for DKU2 (and phone with USB converter on phone mainboard +; like 6230) +; Connection "dku2phonet"/"dku2", device type dku2 on Windows +; Connection "fbususb" on Linux +; New Nokia protocol for DKU5 (and phone without USB converter on phone +; mainboard like 5100) +; Connection "dku5fbus"/"dku5", device type dku5 +; New Nokia protocol for PL2303 USB cable (and phone without USB converter +; on phone mainboard like 5100) +; Connection "fbuspl2303", device type usb +; Old Nokia protocol for MBUS/DAU9P +; Connection "mbus", device type serial +; Variants: +; You can modify a bit behaviour of connection using additional flags +; specified just after connection name like connection-variant. +; If you're using ARK3116 cable (or any other which does not like dtr +; handling), you might need -nodtr variant of connection, eg. dlr3-nodtr. +; If cable you use is not powered over DTR/RTS, try using -nopower variant of +; connection, eg. fbus-nopower. +; ----------------------------------------------------------------------------- +; AT commands for DLR3, DKU5 or other AT compatible cable (8 bits, None +; parity, no flow control, 1 stop bit). Used with Nokia, Alcatel, Siemens, etc. +; Connection "at19200"/"at115200"/.., device type serial +; AT commands for DKU2 cable +; Connection "dku2at", device type dku2 +; ============================================================== infrared ===== +; Nokia protocol for infrared with Nokia 6110/6130/6150 +; Connection "fbusirda"/"infrared", device type serial +; Nokia protocol for infrared with other Nokia models +; Connection "irdaphonet"/"irda", device type irda +; ----------------------------------------------------------------------------- +; AT commands for infrared. Used with Nokia, Alcatel, Siemens, etc. +; Connection "irdaat", device type irda +; ----------------------------------------------------------------------------- +; OBEX for infrared +; Connection "irdaobex", device type irda. +; ============================================================= Bluetooth ===== +; Nokia protocol with serial device set in BT stack (WidComm, other) from +; adequate service and Nokia 6210 +; Connection "fbusblue", device type serial +; Nokia protocol with serial device set in BT stack (WidComm, other) from +; adequate service and other Nokia models +; Connection "phonetblue", device type serial +; ----------------------------------------------------------------------------- +; Nokia protocol for Bluetooth stack with Nokia 6210 +; Connection "bluerffbus", device type BT +; Nokia protocol for Bluetooth stack with DCT4 Nokia models, which don't inform +; about services correctly (6310, 6310i with firmware lower than 5.50, 8910,..) +; Connection "bluerfphonet", device type BT +; Nokia protocol for Bluetooth stack with other DCT4 Nokia models +; Connection "bluephonet", device type BT +; ----------------------------------------------------------------------------- +; AT commands for Bluetooth stack and 6210 / DCT4 Nokia models, which don't +; inform about BT services correctly (6310, 6310i with firmware lower +; than 5.50, 8910,..) +; Connection "bluerfat", device type BT +; AT commands for Bluetooth stack with other phones (Siemens, other Nokia,etc.) +; Connection "blueat", device type BT +; ----------------------------------------------------------------------------- +; OBEX for Bluetooth stack with DCT4 Nokia models, which don't inform about +; BT services correctly (6310, 6310i with firmware lower than 5.50, 8910,...) +; Connection "bluerfobex", device type BT +; OBEX for Bluetooth stack with other phones (Siemens, other Nokia, etc.) +; Connection "blueobex", device type BT. +; ----------------------------------------------------------------------------- +; Connection "bluerfgnapbus", device type BT, model "gnap" +; Connection "irdagnapbus", device type irda, model "gnap" + +; Step2. According to device type from Step1 and used OS set Port parameter + +; ----------------------------------------------------------------------------- +; Port type | "Port" parameter in Windows/DOS | "Port" parameter in Linux/Unix +; ----------|---------------------------------|-------------------------------- +; serial | "com*:" | "/dev/ttyS*" +; | (example "com1:") | (example "/dev/ttyS1") +; | | or "/dev/tts/**" (with DevFS) +; | | virtual serial ports like +; | | "/dev/ircomm*" or "/dev/rfcomm*" +; ----------|---------------------------------|-------------------------------- +; irda | ignored (can be empty) | ignored (can be empty) +; ----------|---------------------------------|-------------------------------- +; BT | Bluetooth device address (example "00:11:22:33:44:55"). +; | Optionally you can also include channel after slash +; | (example "00:11:22:33:44:55/12"). Can be also empty. +; ----------|---------------------------------|-------------------------------- +; dku2 | ignored (can be empty) | /dev/ttyUSB* or /dev/ttyACM* +; ----------|---------------------------------|-------------------------------- +; dku5 | ignored (can be empty) | connection with it not possible +; ----------|---------------------------------|-------------------------------- +; usb | connection with it not possible | "/dev/ttyUSB*" + +; Step3. Set other config parameters + +; ----------------------------------------------------------------------------- +; Parameter name | Description +; ----------------|------------------------------------------------------------ +; Model | Should not be used unless you have a good reason to do so. +; | If Gammu doesn't recognize your phone model, put it here. +; | Example values: "6110", "6150", "6210", "8210" +; SynchronizeTime | if you want to set time from computer to phone during +; | starting connection. Do not rather use this option when +; | when to reset phone during connection (in some phones need +; | to set time again after restart) +; GammuLoc | name of localisation file +; StartInfo | this option allow to set, that you want (setting "yes") +; | to see message on the phone screen or phone should enable +; | light for a moment during starting connection. Phone +; | WON'T beep during starting connection with this option. +; GammuCoding | forces using specified codepage (in win32 - for example +; | "1250" will force CP1250) or UTF8 (in Linux - "utf8") +; ----------------|------------------------------------------------------------ +; Logfile | Use, when want to have logfile from communication. +; Logformat | What debug info and format should be used: +; | "nothing" - no debug level (default) +; | "text" - transmission dump in text format +; | "textall" - all possible info in text format +; | "errors" - errors in text format +; | "binary" - transmission dump in binary format +; ----------------|------------------------------------------------------------ +; Features | Custom features for phone. This can be used as override +; | when values coded in common/gsmphones.c are bad or +; | missing. Consult include/gammu-info.h for possible values +; | (all Feature values without leading F_ prefix). +; | Please report correct values to Gammu authors. +; ----------------|------------------------------------------------------------ +; Use_Locking | under Unix/Linux use "yes", if want to lock used device +; | to prevent using it by other applications. In win32 ignored + +; vim: et ts=4 sw=4 sts=4 tw=78 spell spelllang=en_us diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb new file mode 100644 index 000000000..44411751e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb @@ -0,0 +1,68 @@ +SUMMARY = "GNU All Mobile Managment Utilities" +SECTION = "console/network" +DEPENDS = "cmake-native virtual/libiconv libdbi mysql5 glib-2.0 udev libgudev unixodbc" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=a17cb0a873d252440acfdf9b3d0e7fbf" +HOMEPAGE = "http://www.gammu.org/" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${PV}/${BP}.tar.bz2 \ + file://gammurc \ + file://gammu-smsdrc \ +" + +SRC_URI[md5sum] = "8ea16c6b3cc48097a8e62311fe0e25b9" +SRC_URI[sha256sum] = "de67caa102aa4c8fbed5300e5a0262e40411c4cc79f4379a8d34eed797968fc3" + +inherit distutils cmake gettext + +do_install_append() { + # these files seem to only be used by symbian and trigger QA warnings + rm -rf ${D}/usr/share/gammu + #install default configuration files + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/gammurc ${D}${sysconfdir}/gammurc + install -m 0644 ${WORKDIR}/gammu-smsdrc ${D}${sysconfdir}/gammu-smsdrc +} + +EXTRA_OECONF = " \ + --enable-shared \ + --enable-backup \ + --enable-protection \ +" + +EXTRA_OECMAKE = " \ + -DWITH_CURL=OFF \ + -DWITH_BLUETOOTH=OFF \ + -DWITH_NOKIA_SUPPORT=OFF \ + -DWITH_IRDA=OFF \ + -DWITH_PYTHON=OFF \ + -DWITH_MySQL=ON \ + -DWITH_Postgres=OFF \ +" + +PACKAGES =+ "${PN}-smsd libgammu libgsmsd python-${PN}" + +FILES_${PN} = "${bindir}/gammu ${bindir}/jadmaker ${sysconfdir}/bash_completion.d/gammu \ + ${bindir}/gammu-detect ${sysconfdir}/gammurc" +CONFFILES_${PN} = "${sysconfdir}/gammurc" +FILES_${PN}-smsd = "${bindir}/gammu-smsd* ${sysconfdir}/gammu-smsdrc" +CONFFILES_${PN}-smsd = "${sysconfdir}/gammu-smsdrc" +FILES_${PN}-dev += "${bindir}/gammu-config ${libdir}/*.so" +FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug ${PYTHON_SITEPACKAGES_DIR}/gammu/.debug" +FILES_libgammu = "${libdir}/libGammu.so.*" +FILES_libgsmsd = "${libdir}/libgsmsd.so.*" +FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}/gammu/*.??" + +RDEPENDS_${PN} += "bash" +RDEPENDS_${PN}-dev += "bash" + +# Fails to build with thumb-1 (qemuarm) +# gammu-1.32.0/libgammu/service/sms/gsmems.c:542:1: internal compiler error: in patch_jump_insn, at cfgrtl.c:1275 +# | } +# | ^ +# | Please submit a full bug report, +# | with preprocessed source if appropriate. +# | See <http://gcc.gnu.org/bugs.html> for instructions. +# | make[2]: *** [libgammu/CMakeFiles/libGammu.dir/service/sms/gsmems.o] Error 1 +# | make[2]: *** Waiting for unfinished jobs.... +ARM_INSTRUCTION_SET = "arm" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch new file mode 100644 index 000000000..5535a3c5a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch @@ -0,0 +1,177 @@ +From 044ae35c5694c39a4aca2a33502cc3897e88f79e Mon Sep 17 00:00:00 2001 +From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> +Date: Fri, 14 Jul 2017 15:15:35 +0200 +Subject: [PATCH 1/7] hostapd: Avoid key reinstallation in FT handshake + +Do not reinstall TK to the driver during Reassociation Response frame +processing if the first attempt of setting the TK succeeded. This avoids +issues related to clearing the TX/RX PN that could result in reusing +same PN values for transmitted frames (e.g., due to CCM nonce reuse and +also hitting replay protection on the receiver) and accepting replayed +frames on RX side. + +This issue was introduced by the commit +0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in +authenticator') which allowed wpa_ft_install_ptk() to be called multiple +times with the same PTK. While the second configuration attempt is +needed with some drivers, it must be done only if the first attempt +failed. + +Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/ap/ieee802_11.c | 16 +++++++++++++--- + src/ap/wpa_auth.c | 11 +++++++++++ + src/ap/wpa_auth.h | 3 ++- + src/ap/wpa_auth_ft.c | 10 ++++++++++ + src/ap/wpa_auth_i.h | 1 + + 5 files changed, 37 insertions(+), 4 deletions(-) + +diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c +index 4e04169..333035f 100644 +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd, + { + struct ieee80211_ht_capabilities ht_cap; + struct ieee80211_vht_capabilities vht_cap; ++ int set = 1; + + /* + * Remove the STA entry to ensure the STA PS state gets cleared and +@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd, + * FT-over-the-DS, where a station re-associates back to the same AP but + * skips the authentication flow, or if working with a driver that + * does not support full AP client state. ++ * ++ * Skip this if the STA has already completed FT reassociation and the ++ * TK has been configured since the TX/RX PN must not be reset to 0 for ++ * the same key. + */ +- if (!sta->added_unassoc) ++ if (!sta->added_unassoc && ++ (!(sta->flags & WLAN_STA_AUTHORIZED) || ++ !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) { + hostapd_drv_sta_remove(hapd, sta->addr); ++ wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED); ++ set = 0; ++ } + + #ifdef CONFIG_IEEE80211N + if (sta->flags & WLAN_STA_HT) +@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd, + sta->flags & WLAN_STA_VHT ? &vht_cap : NULL, + sta->flags | WLAN_STA_ASSOC, sta->qosinfo, + sta->vht_opmode, sta->p2p_ie ? 1 : 0, +- sta->added_unassoc)) { ++ set)) { + hostapd_logger(hapd, sta->addr, + HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE, + "Could not %s STA to kernel driver", +- sta->added_unassoc ? "set" : "add"); ++ set ? "set" : "add"); + + if (sta->added_unassoc) { + hostapd_drv_sta_remove(hapd, sta->addr); +diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c +index 3587086..707971d 100644 +--- a/src/ap/wpa_auth.c ++++ b/src/ap/wpa_auth.c +@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event) + #else /* CONFIG_IEEE80211R */ + break; + #endif /* CONFIG_IEEE80211R */ ++ case WPA_DRV_STA_REMOVED: ++ sm->tk_already_set = FALSE; ++ return 0; + } + + #ifdef CONFIG_IEEE80211R +@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm) + } + + ++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm) ++{ ++ if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt)) ++ return 0; ++ return sm->tk_already_set; ++} ++ ++ + int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, + struct rsn_pmksa_cache_entry *entry) + { +diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h +index 0de8d97..97461b0 100644 +--- a/src/ap/wpa_auth.h ++++ b/src/ap/wpa_auth.h +@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth, + u8 *data, size_t data_len); + enum wpa_event { + WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, +- WPA_REAUTH_EAPOL, WPA_ASSOC_FT ++ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED + }; + void wpa_remove_ptk(struct wpa_state_machine *sm); + int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event); +@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm); + int wpa_auth_get_pairwise(struct wpa_state_machine *sm); + int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); + int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); ++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm); + int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, + struct rsn_pmksa_cache_entry *entry); + struct rsn_pmksa_cache_entry * +diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c +index 42242a5..e63b99a 100644 +--- a/src/ap/wpa_auth_ft.c ++++ b/src/ap/wpa_auth_ft.c +@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) + return; + } + ++ if (sm->tk_already_set) { ++ /* Must avoid TK reconfiguration to prevent clearing of TX/RX ++ * PN in the driver */ ++ wpa_printf(MSG_DEBUG, ++ "FT: Do not re-install same PTK to the driver"); ++ return; ++ } ++ + /* FIX: add STA entry to kernel/driver here? The set_key will fail + * most likely without this.. At the moment, STA entry is added only + * after association has been completed. This function will be called +@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) + + /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */ + sm->pairwise_set = TRUE; ++ sm->tk_already_set = TRUE; + } + + +@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm, + + sm->pairwise = pairwise; + sm->PTK_valid = TRUE; ++ sm->tk_already_set = FALSE; + wpa_ft_install_ptk(sm); + + buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + +diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h +index 72b7eb3..7fd8f05 100644 +--- a/src/ap/wpa_auth_i.h ++++ b/src/ap/wpa_auth_i.h +@@ -65,6 +65,7 @@ struct wpa_state_machine { + struct wpa_ptk PTK; + Boolean PTK_valid; + Boolean pairwise_set; ++ Boolean tk_already_set; + int keycount; + Boolean Pair; + struct wpa_key_replay_counter { +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch new file mode 100644 index 000000000..4e57bcaa5 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch @@ -0,0 +1,253 @@ +From c623cc973de525f7411dffe438e957ba86ef4733 Mon Sep 17 00:00:00 2001 +From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> +Date: Wed, 12 Jul 2017 16:03:24 +0200 +Subject: [PATCH 2/7] Prevent reinstallation of an already in-use group key + +Track the current GTK and IGTK that is in use and when receiving a +(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do +not install the given key if it is already in use. This prevents an +attacker from trying to trick the client into resetting or lowering the +sequence counter associated to the group key. + +Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/common/wpa_common.h | 11 +++++ + src/rsn_supp/wpa.c | 116 ++++++++++++++++++++++++++++++------------------ + src/rsn_supp/wpa_i.h | 4 ++ + 3 files changed, 87 insertions(+), 44 deletions(-) + +diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h +index af1d0f0..d200285 100644 +--- a/src/common/wpa_common.h ++++ b/src/common/wpa_common.h +@@ -217,6 +217,17 @@ struct wpa_ptk { + size_t tk_len; + }; + ++struct wpa_gtk { ++ u8 gtk[WPA_GTK_MAX_LEN]; ++ size_t gtk_len; ++}; ++ ++#ifdef CONFIG_IEEE80211W ++struct wpa_igtk { ++ u8 igtk[WPA_IGTK_MAX_LEN]; ++ size_t igtk_len; ++}; ++#endif /* CONFIG_IEEE80211W */ + + /* WPA IE version 1 + * 00-50-f2:1 (OUI:OUI type) +diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c +index 3c47879..95bd7be 100644 +--- a/src/rsn_supp/wpa.c ++++ b/src/rsn_supp/wpa.c +@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, + const u8 *_gtk = gd->gtk; + u8 gtk_buf[32]; + ++ /* Detect possible key reinstallation */ ++ if (sm->gtk.gtk_len == (size_t) gd->gtk_len && ++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) { ++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, ++ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)", ++ gd->keyidx, gd->tx, gd->gtk_len); ++ return 0; ++ } ++ + wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)", +@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, + } + os_memset(gtk_buf, 0, sizeof(gtk_buf)); + ++ sm->gtk.gtk_len = gd->gtk_len; ++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); ++ + return 0; + } + +@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, + } + + ++#ifdef CONFIG_IEEE80211W ++static int wpa_supplicant_install_igtk(struct wpa_sm *sm, ++ const struct wpa_igtk_kde *igtk) ++{ ++ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher); ++ u16 keyidx = WPA_GET_LE16(igtk->keyid); ++ ++ /* Detect possible key reinstallation */ ++ if (sm->igtk.igtk_len == len && ++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) { ++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, ++ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)", ++ keyidx); ++ return 0; ++ } ++ ++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, ++ "WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x", ++ keyidx, MAC2STR(igtk->pn)); ++ wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len); ++ if (keyidx > 4095) { ++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, ++ "WPA: Invalid IGTK KeyID %d", keyidx); ++ return -1; ++ } ++ if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), ++ broadcast_ether_addr, ++ keyidx, 0, igtk->pn, sizeof(igtk->pn), ++ igtk->igtk, len) < 0) { ++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, ++ "WPA: Failed to configure IGTK to the driver"); ++ return -1; ++ } ++ ++ sm->igtk.igtk_len = len; ++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); ++ ++ return 0; ++} ++#endif /* CONFIG_IEEE80211W */ ++ ++ + static int ieee80211w_set_keys(struct wpa_sm *sm, + struct wpa_eapol_ie_parse *ie) + { +@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, + if (ie->igtk) { + size_t len; + const struct wpa_igtk_kde *igtk; +- u16 keyidx; ++ + len = wpa_cipher_key_len(sm->mgmt_group_cipher); + if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len) + return -1; ++ + igtk = (const struct wpa_igtk_kde *) ie->igtk; +- keyidx = WPA_GET_LE16(igtk->keyid); +- wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d " +- "pn %02x%02x%02x%02x%02x%02x", +- keyidx, MAC2STR(igtk->pn)); +- wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", +- igtk->igtk, len); +- if (keyidx > 4095) { +- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, +- "WPA: Invalid IGTK KeyID %d", keyidx); +- return -1; +- } +- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), +- broadcast_ether_addr, +- keyidx, 0, igtk->pn, sizeof(igtk->pn), +- igtk->igtk, len) < 0) { +- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, +- "WPA: Failed to configure IGTK to the driver"); ++ if (wpa_supplicant_install_igtk(sm, igtk) < 0) + return -1; +- } + } + + return 0; +@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm) + */ + void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) + { +- int clear_ptk = 1; ++ int clear_keys = 1; + + if (sm == NULL) + return; +@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) + /* Prepare for the next transition */ + wpa_ft_prepare_auth_request(sm, NULL); + +- clear_ptk = 0; ++ clear_keys = 0; + } + #endif /* CONFIG_IEEE80211R */ + +- if (clear_ptk) { ++ if (clear_keys) { + /* + * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if + * this is not part of a Fast BSS Transition. +@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) + os_memset(&sm->ptk, 0, sizeof(sm->ptk)); + sm->tptk_set = 0; + os_memset(&sm->tptk, 0, sizeof(sm->tptk)); ++ os_memset(&sm->gtk, 0, sizeof(sm->gtk)); ++#ifdef CONFIG_IEEE80211W ++ os_memset(&sm->igtk, 0, sizeof(sm->igtk)); ++#endif /* CONFIG_IEEE80211W */ + } + + #ifdef CONFIG_TDLS +@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) + os_memset(sm->pmk, 0, sizeof(sm->pmk)); + os_memset(&sm->ptk, 0, sizeof(sm->ptk)); + os_memset(&sm->tptk, 0, sizeof(sm->tptk)); ++ os_memset(&sm->gtk, 0, sizeof(sm->gtk)); ++#ifdef CONFIG_IEEE80211W ++ os_memset(&sm->igtk, 0, sizeof(sm->igtk)); ++#endif /* CONFIG_IEEE80211W */ + #ifdef CONFIG_IEEE80211R + os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); + os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0)); +@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) + os_memset(&gd, 0, sizeof(gd)); + #ifdef CONFIG_IEEE80211W + } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) { +- struct wpa_igtk_kde igd; +- u16 keyidx; +- +- os_memset(&igd, 0, sizeof(igd)); +- keylen = wpa_cipher_key_len(sm->mgmt_group_cipher); +- os_memcpy(igd.keyid, buf + 2, 2); +- os_memcpy(igd.pn, buf + 4, 6); +- +- keyidx = WPA_GET_LE16(igd.keyid); +- os_memcpy(igd.igtk, buf + 10, keylen); +- +- wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)", +- igd.igtk, keylen); +- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), +- broadcast_ether_addr, +- keyidx, 0, igd.pn, sizeof(igd.pn), +- igd.igtk, keylen) < 0) { +- wpa_printf(MSG_DEBUG, "Failed to install the IGTK in " +- "WNM mode"); +- os_memset(&igd, 0, sizeof(igd)); ++ const struct wpa_igtk_kde *igtk; ++ ++ igtk = (const struct wpa_igtk_kde *) (buf + 2); ++ if (wpa_supplicant_install_igtk(sm, igtk) < 0) + return -1; +- } +- os_memset(&igd, 0, sizeof(igd)); + #endif /* CONFIG_IEEE80211W */ + } else { + wpa_printf(MSG_DEBUG, "Unknown element id"); +diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h +index f653ba6..afc9e37 100644 +--- a/src/rsn_supp/wpa_i.h ++++ b/src/rsn_supp/wpa_i.h +@@ -31,6 +31,10 @@ struct wpa_sm { + u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN]; + int rx_replay_counter_set; + u8 request_counter[WPA_REPLAY_COUNTER_LEN]; ++ struct wpa_gtk gtk; ++#ifdef CONFIG_IEEE80211W ++ struct wpa_igtk igtk; ++#endif /* CONFIG_IEEE80211W */ + + struct eapol_sm *eapol; /* EAPOL state machine from upper level code */ + +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch new file mode 100644 index 000000000..e39bbf63d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch @@ -0,0 +1,187 @@ +From a6caab8060ab60876e233306f5c586451169eba1 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sun, 1 Oct 2017 12:12:24 +0300 +Subject: [PATCH 3/7] Extend protection of GTK/IGTK reinstallation of WNM-Sleep + Mode cases + +This extends the protection to track last configured GTK/IGTK value +separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a +corner case where these two different mechanisms may get used when the +GTK/IGTK has changed and tracking a single value is not sufficient to +detect a possible key reconfiguration. + +Signed-off-by: Jouni Malinen <j@w1.fi> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/rsn_supp/wpa.c | 53 +++++++++++++++++++++++++++++++++++++--------------- + src/rsn_supp/wpa_i.h | 2 ++ + 2 files changed, 40 insertions(+), 15 deletions(-) + +diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c +index 95bd7be..7a2c68d 100644 +--- a/src/rsn_supp/wpa.c ++++ b/src/rsn_supp/wpa.c +@@ -709,14 +709,17 @@ struct wpa_gtk_data { + + static int wpa_supplicant_install_gtk(struct wpa_sm *sm, + const struct wpa_gtk_data *gd, +- const u8 *key_rsc) ++ const u8 *key_rsc, int wnm_sleep) + { + const u8 *_gtk = gd->gtk; + u8 gtk_buf[32]; + + /* Detect possible key reinstallation */ +- if (sm->gtk.gtk_len == (size_t) gd->gtk_len && +- os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) { ++ if ((sm->gtk.gtk_len == (size_t) gd->gtk_len && ++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) || ++ (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len && ++ os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk, ++ sm->gtk_wnm_sleep.gtk_len) == 0)) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)", + gd->keyidx, gd->tx, gd->gtk_len); +@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, + } + os_memset(gtk_buf, 0, sizeof(gtk_buf)); + +- sm->gtk.gtk_len = gd->gtk_len; +- os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); ++ if (wnm_sleep) { ++ sm->gtk_wnm_sleep.gtk_len = gd->gtk_len; ++ os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk, ++ sm->gtk_wnm_sleep.gtk_len); ++ } else { ++ sm->gtk.gtk_len = gd->gtk_len; ++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); ++ } + + return 0; + } +@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, + (wpa_supplicant_check_group_cipher(sm, sm->group_cipher, + gtk_len, gtk_len, + &gd.key_rsc_len, &gd.alg) || +- wpa_supplicant_install_gtk(sm, &gd, key_rsc))) { ++ wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "RSN: Failed to install GTK"); + os_memset(&gd, 0, sizeof(gd)); +@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, + + #ifdef CONFIG_IEEE80211W + static int wpa_supplicant_install_igtk(struct wpa_sm *sm, +- const struct wpa_igtk_kde *igtk) ++ const struct wpa_igtk_kde *igtk, ++ int wnm_sleep) + { + size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher); + u16 keyidx = WPA_GET_LE16(igtk->keyid); + + /* Detect possible key reinstallation */ +- if (sm->igtk.igtk_len == len && +- os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) { ++ if ((sm->igtk.igtk_len == len && ++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) || ++ (sm->igtk_wnm_sleep.igtk_len == len && ++ os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk, ++ sm->igtk_wnm_sleep.igtk_len) == 0)) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)", + keyidx); +@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm, + return -1; + } + +- sm->igtk.igtk_len = len; +- os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); ++ if (wnm_sleep) { ++ sm->igtk_wnm_sleep.igtk_len = len; ++ os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk, ++ sm->igtk_wnm_sleep.igtk_len); ++ } else { ++ sm->igtk.igtk_len = len; ++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); ++ } + + return 0; + } +@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, + return -1; + + igtk = (const struct wpa_igtk_kde *) ie->igtk; +- if (wpa_supplicant_install_igtk(sm, igtk) < 0) ++ if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0) + return -1; + } + +@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm, + if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc)) + key_rsc = null_rsc; + +- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) || ++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) || + wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0) + goto failed; + os_memset(&gd, 0, sizeof(gd)); +@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) + sm->tptk_set = 0; + os_memset(&sm->tptk, 0, sizeof(sm->tptk)); + os_memset(&sm->gtk, 0, sizeof(sm->gtk)); ++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); + #ifdef CONFIG_IEEE80211W + os_memset(&sm->igtk, 0, sizeof(sm->igtk)); ++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); + #endif /* CONFIG_IEEE80211W */ + } + +@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) + os_memset(&sm->ptk, 0, sizeof(sm->ptk)); + os_memset(&sm->tptk, 0, sizeof(sm->tptk)); + os_memset(&sm->gtk, 0, sizeof(sm->gtk)); ++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); + #ifdef CONFIG_IEEE80211W + os_memset(&sm->igtk, 0, sizeof(sm->igtk)); ++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); + #endif /* CONFIG_IEEE80211W */ + #ifdef CONFIG_IEEE80211R + os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); +@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) + + wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)", + gd.gtk, gd.gtk_len); +- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) { ++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) { + os_memset(&gd, 0, sizeof(gd)); + wpa_printf(MSG_DEBUG, "Failed to install the GTK in " + "WNM mode"); +@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) + const struct wpa_igtk_kde *igtk; + + igtk = (const struct wpa_igtk_kde *) (buf + 2); +- if (wpa_supplicant_install_igtk(sm, igtk) < 0) ++ if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0) + return -1; + #endif /* CONFIG_IEEE80211W */ + } else { +diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h +index afc9e37..9a54631 100644 +--- a/src/rsn_supp/wpa_i.h ++++ b/src/rsn_supp/wpa_i.h +@@ -32,8 +32,10 @@ struct wpa_sm { + int rx_replay_counter_set; + u8 request_counter[WPA_REPLAY_COUNTER_LEN]; + struct wpa_gtk gtk; ++ struct wpa_gtk gtk_wnm_sleep; + #ifdef CONFIG_IEEE80211W + struct wpa_igtk igtk; ++ struct wpa_igtk igtk_wnm_sleep; + #endif /* CONFIG_IEEE80211W */ + + struct eapol_sm *eapol; /* EAPOL state machine from upper level code */ +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch new file mode 100644 index 000000000..510362510 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch @@ -0,0 +1,82 @@ +From abf941647f2dc33b0b59612f525e1b292331cc9f Mon Sep 17 00:00:00 2001 +From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> +Date: Fri, 29 Sep 2017 04:22:51 +0200 +Subject: [PATCH 4/7] Prevent installation of an all-zero TK + +Properly track whether a PTK has already been installed to the driver +and the TK part cleared from memory. This prevents an attacker from +trying to trick the client into installing an all-zero TK. + +This fixes the earlier fix in commit +ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the +driver in EAPOL-Key 3/4 retry case') which did not take into account +possibility of an extra message 1/4 showing up between retries of +message 3/4. + +Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/common/wpa_common.h | 1 + + src/rsn_supp/wpa.c | 5 ++--- + src/rsn_supp/wpa_i.h | 1 - + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h +index d200285..1021ccb 100644 +--- a/src/common/wpa_common.h ++++ b/src/common/wpa_common.h +@@ -215,6 +215,7 @@ struct wpa_ptk { + size_t kck_len; + size_t kek_len; + size_t tk_len; ++ int installed; /* 1 if key has already been installed to driver */ + }; + + struct wpa_gtk { +diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c +index 7a2c68d..0550a41 100644 +--- a/src/rsn_supp/wpa.c ++++ b/src/rsn_supp/wpa.c +@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm, + os_memset(buf, 0, sizeof(buf)); + } + sm->tptk_set = 1; +- sm->tk_to_set = 1; + + kde = sm->assoc_wpa_ie; + kde_len = sm->assoc_wpa_ie_len; +@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, + enum wpa_alg alg; + const u8 *key_rsc; + +- if (!sm->tk_to_set) { ++ if (sm->ptk.installed) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Do not re-install same PTK to the driver"); + return 0; +@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, + + /* TK is not needed anymore in supplicant */ + os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); +- sm->tk_to_set = 0; ++ sm->ptk.installed = 1; + + if (sm->wpa_ptk_rekey) { + eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL); +diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h +index 9a54631..41f371f 100644 +--- a/src/rsn_supp/wpa_i.h ++++ b/src/rsn_supp/wpa_i.h +@@ -24,7 +24,6 @@ struct wpa_sm { + struct wpa_ptk ptk, tptk; + int ptk_set, tptk_set; + unsigned int msg_3_of_4_ok:1; +- unsigned int tk_to_set:1; + u8 snonce[WPA_NONCE_LEN]; + u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */ + int renew_snonce; +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch new file mode 100644 index 000000000..b0e1df314 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch @@ -0,0 +1,67 @@ +From 804b9d72808cddd822e7dcec4d60f40c1aceda82 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sun, 1 Oct 2017 12:32:57 +0300 +Subject: [PATCH 5/7] Fix PTK rekeying to generate a new ANonce + +The Authenticator state machine path for PTK rekeying ended up bypassing +the AUTHENTICATION2 state where a new ANonce is generated when going +directly to the PTKSTART state since there is no need to try to +determine the PMK again in such a case. This is far from ideal since the +new PTK would depend on a new nonce only from the supplicant. + +Fix this by generating a new ANonce when moving to the PTKSTART state +for the purpose of starting new 4-way handshake to rekey PTK. + +Signed-off-by: Jouni Malinen <j@w1.fi> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/ap/wpa_auth.c | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c +index 707971d..bf10cc1 100644 +--- a/src/ap/wpa_auth.c ++++ b/src/ap/wpa_auth.c +@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2) + } + + ++static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm) ++{ ++ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) { ++ wpa_printf(MSG_ERROR, ++ "WPA: Failed to get random data for ANonce"); ++ sm->Disconnect = TRUE; ++ return -1; ++ } ++ wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce, ++ WPA_NONCE_LEN); ++ sm->TimeoutCtr = 0; ++ return 0; ++} ++ ++ + SM_STATE(WPA_PTK, INITPMK) + { + u8 msk[2 * PMK_LEN]; +@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK) + SM_ENTER(WPA_PTK, AUTHENTICATION); + else if (sm->ReAuthenticationRequest) + SM_ENTER(WPA_PTK, AUTHENTICATION2); +- else if (sm->PTKRequest) +- SM_ENTER(WPA_PTK, PTKSTART); +- else switch (sm->wpa_ptk_state) { ++ else if (sm->PTKRequest) { ++ if (wpa_auth_sm_ptk_update(sm) < 0) ++ SM_ENTER(WPA_PTK, DISCONNECTED); ++ else ++ SM_ENTER(WPA_PTK, PTKSTART); ++ } else switch (sm->wpa_ptk_state) { + case WPA_PTK_INITIALIZE: + break; + case WPA_PTK_DISCONNECT: +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch new file mode 100644 index 000000000..72c7d51e1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch @@ -0,0 +1,135 @@ +From 7fd26db2d8147ed662db192c41d7bc15752a601d Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 22 Sep 2017 11:03:15 +0300 +Subject: [PATCH 6/7] TDLS: Reject TPK-TK reconfiguration + +Do not try to reconfigure the same TPK-TK to the driver after it has +been successfully configured. This is an explicit check to avoid issues +related to resetting the TX/RX packet number. There was already a check +for this for TPK M2 (retries of that message are ignored completely), so +that behavior does not get modified. + +For TPK M3, the TPK-TK could have been reconfigured, but that was +followed by immediate teardown of the link due to an issue in updating +the STA entry. Furthermore, for TDLS with any real security (i.e., +ignoring open/WEP), the TPK message exchange is protected on the AP path +and simple replay attacks are not feasible. + +As an additional corner case, make sure the local nonce gets updated if +the peer uses a very unlikely "random nonce" of all zeros. + +Signed-off-by: Jouni Malinen <j@w1.fi> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++-- + 1 file changed, 36 insertions(+), 2 deletions(-) + +diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c +index e424168..9eb9738 100644 +--- a/src/rsn_supp/tdls.c ++++ b/src/rsn_supp/tdls.c +@@ -112,6 +112,7 @@ struct wpa_tdls_peer { + u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */ + } tpk; + int tpk_set; ++ int tk_set; /* TPK-TK configured to the driver */ + int tpk_success; + int tpk_in_progress; + +@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) + u8 rsc[6]; + enum wpa_alg alg; + ++ if (peer->tk_set) { ++ /* ++ * This same TPK-TK has already been configured to the driver ++ * and this new configuration attempt (likely due to an ++ * unexpected retransmitted frame) would result in clearing ++ * the TX/RX sequence number which can break security, so must ++ * not allow that to happen. ++ */ ++ wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR ++ " has already been configured to the driver - do not reconfigure", ++ MAC2STR(peer->addr)); ++ return -1; ++ } ++ + os_memset(rsc, 0, 6); + + switch (peer->cipher) { +@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) + return -1; + } + ++ wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR, ++ MAC2STR(peer->addr)); + if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1, + rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) { + wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the " + "driver"); + return -1; + } ++ peer->tk_set = 1; + return 0; + } + +@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer) + peer->cipher = 0; + peer->qos_info = 0; + peer->wmm_capable = 0; +- peer->tpk_set = peer->tpk_success = 0; ++ peer->tk_set = peer->tpk_set = peer->tpk_success = 0; + peer->chan_switch_enabled = 0; + os_memset(&peer->tpk, 0, sizeof(peer->tpk)); + os_memset(peer->inonce, 0, WPA_NONCE_LEN); +@@ -1159,6 +1177,7 @@ skip_rsnie: + wpa_tdls_peer_free(sm, peer); + return -1; + } ++ peer->tk_set = 0; /* A new nonce results in a new TK */ + wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake", + peer->inonce, WPA_NONCE_LEN); + os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN); +@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer, + } + + ++static int tdls_nonce_set(const u8 *nonce) ++{ ++ int i; ++ ++ for (i = 0; i < WPA_NONCE_LEN; i++) { ++ if (nonce[i]) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ + static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr, + const u8 *buf, size_t len) + { +@@ -2004,7 +2036,8 @@ skip_rsn: + peer->rsnie_i_len = kde.rsn_ie_len; + peer->cipher = cipher; + +- if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) { ++ if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 || ++ !tdls_nonce_set(peer->inonce)) { + /* + * There is no point in updating the RNonce for every obtained + * TPK M1 frame (e.g., retransmission due to timeout) with the +@@ -2020,6 +2053,7 @@ skip_rsn: + "TDLS: Failed to get random data for responder nonce"); + goto error; + } ++ peer->tk_set = 0; /* A new nonce results in a new TK */ + } + + #if 0 +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch new file mode 100644 index 000000000..d0978c797 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch @@ -0,0 +1,85 @@ +From a42eb67c42f845faf266b0633d52e17f2a82f511 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 22 Sep 2017 12:06:37 +0300 +Subject: [PATCH 7/7] FT: Do not allow multiple Reassociation Response frames + +The driver is expected to not report a second association event without +the station having explicitly request a new association. As such, this +case should not be reachable. However, since reconfiguring the same +pairwise or group keys to the driver could result in nonce reuse issues, +be extra careful here and do an additional state check to avoid this +even if the local driver ends up somehow accepting an unexpected +Reassociation Response frame. + +Signed-off-by: Jouni Malinen <j@w1.fi> + +Upstream-Status: Backport +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> +--- + src/rsn_supp/wpa.c | 3 +++ + src/rsn_supp/wpa_ft.c | 8 ++++++++ + src/rsn_supp/wpa_i.h | 1 + + 3 files changed, 12 insertions(+) + +diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c +index 0550a41..2a53c6f 100644 +--- a/src/rsn_supp/wpa.c ++++ b/src/rsn_supp/wpa.c +@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm) + #ifdef CONFIG_TDLS + wpa_tdls_disassoc(sm); + #endif /* CONFIG_TDLS */ ++#ifdef CONFIG_IEEE80211R ++ sm->ft_reassoc_completed = 0; ++#endif /* CONFIG_IEEE80211R */ + + /* Keys are not needed in the WPA state machine anymore */ + wpa_sm_drop_sa(sm); +diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c +index 205793e..d45bb45 100644 +--- a/src/rsn_supp/wpa_ft.c ++++ b/src/rsn_supp/wpa_ft.c +@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len, + u16 capab; + + sm->ft_completed = 0; ++ sm->ft_reassoc_completed = 0; + + buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + + 2 + sm->r0kh_id_len + ric_ies_len + 100; +@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, + return -1; + } + ++ if (sm->ft_reassoc_completed) { ++ wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission"); ++ return 0; ++ } ++ + if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) { + wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs"); + return -1; +@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, + return -1; + } + ++ sm->ft_reassoc_completed = 1; ++ + if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0) + return -1; + +diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h +index 41f371f..56f88dc 100644 +--- a/src/rsn_supp/wpa_i.h ++++ b/src/rsn_supp/wpa_i.h +@@ -128,6 +128,7 @@ struct wpa_sm { + size_t r0kh_id_len; + u8 r1kh_id[FT_R1KH_ID_LEN]; + int ft_completed; ++ int ft_reassoc_completed; + int over_the_ds_in_progress; + u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */ + int set_ptk_after_assoc; +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig new file mode 100644 index 000000000..278964017 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig @@ -0,0 +1,145 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +CONFIG_DRIVER_WIRED=y + +# Driver interface for madwifi driver +#CONFIG_DRIVER_MADWIFI=y +#CFLAGS += -I../../madwifi # change to the madwifi source directory + +# Driver interface for Prism54 driver +CONFIG_DRIVER_PRISM54=y + +# Driver interface for drivers using the nl80211 kernel interface +CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL32=y +# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +# shipped with your distribution yet. If that is the case, you need to build +# newer libnl version and point the hostapd build to use it. +#LIBNL=/usr/src/libnl +#CFLAGS += -I$(LIBNL)/include +#LIBS += -L$(LIBNL)/lib + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib + +# Driver interface for no driver (e.g., RADIUS server only) +#CONFIG_DRIVER_NONE=y + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +#CONFIG_IEEE80211W=y + +# Integrated EAP server +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP server +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP server +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP server +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP server +CONFIG_EAP_PEAP=y + +# EAP-GTC for the integrated EAP server +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP server +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP server +#CONFIG_EAP_SIM=y + +# EAP-AKA for the integrated EAP server +#CONFIG_EAP_AKA=y + +# EAP-AKA' for the integrated EAP server +# This requires CONFIG_EAP_AKA to be enabled, too. +#CONFIG_EAP_AKA_PRIME=y + +# EAP-PAX for the integrated EAP server +#CONFIG_EAP_PAX=y + +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) +#CONFIG_EAP_PSK=y + +# EAP-SAKE for the integrated EAP server +#CONFIG_EAP_SAKE=y + +# EAP-GPSK for the integrated EAP server +#CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +#CONFIG_EAP_GPSK_SHA256=y + +# EAP-FAST for the integrated EAP server +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y + +# Wi-Fi Protected Setup (WPS) +CONFIG_WPS=y +# Enable UPnP support for external WPS Registrars +#CONFIG_WPS_UPNP=y + +# EAP-IKEv2 +#CONFIG_EAP_IKEV2=y + +# Trusted Network Connect (EAP-TNC) +#CONFIG_EAP_TNC=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# server from external hosts using RADIUS. +CONFIG_RADIUS_SERVER=y + +# Build IPv6 support for RADIUS operations +CONFIG_IPV6=y + +# IEEE Std 802.11r-2008 (Fast BSS Transition) +#CONFIG_IEEE80211R=y + +# Use the hostapd's IEEE 802.11 authentication (ACL), but without +# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) +CONFIG_DRIVER_RADIUS_ACL=y + +# IEEE 802.11n (High Throughput) support +CONFIG_IEEE80211N=y + +# Remove debugging code that is printing out debug messages to stdout. +# This can be used to reduce the size of the hostapd considerably if debugging +# code is not needed. +#CONFIG_NO_STDOUT_DEBUG=y diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd.service b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd.service new file mode 100644 index 000000000..151c0504f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator +After=network.target + +[Service] +Type=forking +PIDFile=/run/hostapd.pid +ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd.conf -P /run/hostapd.pid -B + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/init b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/init new file mode 100644 index 000000000..8ba4e0794 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/init @@ -0,0 +1,58 @@ +#!/bin/sh +DAEMON=/usr/sbin/hostapd +NAME=hostapd +DESC="HOSTAP Daemon" +ARGS="/etc/hostapd.conf -B" + +test -f $DAEMON || exit 0 + +set -e + +# source function library +. /etc/init.d/functions + +delay_stop() { + count=0 + while [ $count -lt 9 ] ; do + if pidof $DAEMON >/dev/null; then + sleep 1 + else + return 0 + fi + count=`expr $count + 1` + done + echo "Failed to stop $DESC." + return 1 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K --oknodo -x $DAEMON + echo "$NAME." + ;; + restart) + $0 stop + delay_stop && $0 start + ;; + reload) + echo -n "Reloading $DESC: " + killall -HUP $(basename ${DAEMON}) + echo "$NAME." + ;; + status) + status $DAEMON + exit $? + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb new file mode 100644 index 000000000..250add875 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb @@ -0,0 +1,58 @@ +SUMMARY = "User space daemon for extended IEEE 802.11 management" +HOMEPAGE = "http://w1.fi/hostapd/" +SECTION = "kernel/userland" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://hostapd/README;md5=8aa4e8c78b59b12016c4cb2d0a8db350" + +DEPENDS = "libnl openssl" + +SRC_URI = " \ + http://w1.fi/releases/hostapd-${PV}.tar.gz \ + file://defconfig \ + file://init \ + file://hostapd.service \ + file://0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch \ + file://0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch \ + file://0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch \ + file://0004-Prevent-installation-of-an-all-zero-TK.patch \ + file://0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch \ + file://0006-TDLS-Reject-TPK-TK-reconfiguration.patch \ + file://0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch \ +" + +SRC_URI[md5sum] = "eaa56dce9bd8f1d195eb62596eab34c7" +SRC_URI[sha256sum] = "01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d" + +S = "${WORKDIR}/hostapd-${PV}" +B = "${WORKDIR}/hostapd-${PV}/hostapd" + +inherit update-rc.d systemd pkgconfig distro_features_check + +CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers" + +INITSCRIPT_NAME = "hostapd" + +SYSTEMD_SERVICE_${PN} = "hostapd.service" +SYSTEMD_AUTO_ENABLE_${PN} = "disable" + +do_configure_append() { + install -m 0644 ${WORKDIR}/defconfig ${B}/.config +} + +do_compile() { + export CFLAGS="-MMD -O2 -Wall -g" + export EXTRA_CFLAGS="${CFLAGS}" + make V=1 +} + +do_install() { + install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/ + install -m 0644 ${B}/hostapd.conf ${D}${sysconfdir} + install -m 0755 ${B}/hostapd ${D}${sbindir} + install -m 0755 ${B}/hostapd_cli ${D}${sbindir} + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd + install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service +} + +CONFFILES_${PN} += "${sysconfdir}/hostapd.conf" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb b/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb new file mode 100644 index 000000000..10b04bb52 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb @@ -0,0 +1,18 @@ +SUMMARY = "ncurses IRC client" +DESCRIPTION = "Irssi is an ncurses IRC client" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=55fdc1113306167d6ea2561404ce02f8" + +DEPENDS = "glib-2.0 ncurses openssl" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz" +SRC_URI[md5sum] = "46d4ac2a7ab472e5dc800e5d7bd9a879" +SRC_URI[sha256sum] = "b85c07dbafe178213eccdc69f5f8f0ac024dea01c67244668f91ec1c06b986ca" + +inherit autotools pkgconfig + +EXTRA_OECONF += "--with-textui \ + --with-proxy \ + --with-bot \ + --with-perl=no \ + --enable-true-color" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch new file mode 100644 index 000000000..cbd5d71fd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch @@ -0,0 +1,32 @@ +From a9e4057bfda190ad365b503af058b460ab8c7616 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 1 Oct 2013 22:22:57 +0200 +Subject: [PATCH] aclocal: Add parameter to disable keyutils detection + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- + aclocal.m4 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/aclocal.m4 b/aclocal.m4 +index d6d1279..80ce604 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1679,12 +1679,16 @@ fi + dnl + dnl If libkeyutils exists (on Linux) include it and use keyring ccache + AC_DEFUN(KRB5_AC_KEYRING_CCACHE,[ ++AC_ARG_ENABLE([keyutils], ++AC_HELP_STRING([--disable-keyutils],don't enable using keyutils for keyring ccache @<:@enabled@:>@), , enable_keyutils=yes) ++if test "$enable_keyutils" = yes; then + AC_CHECK_HEADERS([keyutils.h], + AC_CHECK_LIB(keyutils, add_key, + [dnl Pre-reqs were found + AC_DEFINE(USE_KEYRING_CCACHE, 1, [Define if the keyring ccache should be enabled]) + LIBS="-lkeyutils $LIBS" + ])) ++fi + ])dnl + dnl + dnl If libkeyutils supports persistent keyrings, use them diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/crosscompile_nm.patch b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/crosscompile_nm.patch new file mode 100644 index 000000000..d3e693751 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/crosscompile_nm.patch @@ -0,0 +1,29 @@ +Modifies export-check.pl to use look for $ENV{'NM'} before +defaulting to using 'nm' + +Upstream-Status: Pending + +Signed-off-by: Amy Fong <amy.fong@windriver.com> +--- + + export-check.pl | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +Index: src/util/export-check.pl +=================================================================== +--- src.orig/util/export-check.pl ++++ src/util/export-check.pl +@@ -38,7 +38,12 @@ + my($exfile, $libfile) = @ARGV; + + @missing = (); +-open NM, "nm -Dg --defined-only $libfile |" || die "can't run nm on $libfile: $!"; ++if (defined($ENV{'NM'})) { ++ $nm = $ENV{'NM'}; ++} else { ++ $nm = "nm"; ++} ++open NM, "$nm -Dg --defined-only $libfile |" || die "can't run nm on $libfile: $!"; + open EXPORT, "< $exfile" || die "can't read $exfile: $!"; + + @export = <EXPORT>; diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/debian-suppress-usr-lib-in-krb5-config.patch b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/debian-suppress-usr-lib-in-krb5-config.patch new file mode 100644 index 000000000..f0182ee5d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/debian-suppress-usr-lib-in-krb5-config.patch @@ -0,0 +1,48 @@ +Subject: [PATCH] debian: suppress /usr/lib in krb5-config + +Upstream-Status: Pending + +Handel multi-arch suppressions + +The patch is from debian. + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + src/build-tools/krb5-config.in | 14 +++++++++----- + 1 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/src/build-tools/krb5-config.in b/src/build-tools/krb5-config.in +index f6184da..637bad7 100755 +--- a/src/build-tools/krb5-config.in ++++ b/src/build-tools/krb5-config.in +@@ -138,6 +138,7 @@ if test -n "$do_help"; then + echo " [--defktname] Show built-in default keytab name" + echo " [--defcktname] Show built-in default client keytab name" + echo " [--cflags] Compile time CFLAGS" ++ echo " [--deps] Include dependent libraries" + echo " [--libs] List libraries required to link [LIBRARIES]" + echo "Libraries:" + echo " krb5 Kerberos 5 application" +@@ -209,11 +210,14 @@ fi + + if test -n "$do_libs"; then + # Assumes /usr/lib is the standard library directory everywhere... +- if test "$libdir" = /usr/lib; then +- libdirarg= +- else +- libdirarg="-L$libdir" +- fi ++ case $libdir in ++ /usr/lib*) ++ libdirarg= ++ ;; ++ *) ++ libdirarg="-L$libdir" ++ ;; ++ esac + # Ugly gross hack for our build tree + lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \ + -e 's/\$(PURE)//' \ +-- +1.7.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server new file mode 100644 index 000000000..e097353c2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server @@ -0,0 +1,4 @@ +# Automatically generated. If you change anything in this file other than the +# values of DAEMON_ARGS, first run dpkg-reconfigure +# krb5-admin-server and disable managing the kadmin configuration with +# debconf. Otherwise, changes will be overwritten. diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-kdc b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-kdc new file mode 100644 index 000000000..310bfcf8a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-kdc @@ -0,0 +1,5 @@ +# Automatically generated. Only the value of DAEMON_ARGS will be preserved. +# If you change anything in this file other than DAEMON_ARGS, first run +# dpkg-reconfigure krb5-kdc and disable managing the KDC configuration with +# debconf. Otherwise, changes will be overwritten. + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-admin-server b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-admin-server new file mode 100755 index 000000000..79238d4f4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-admin-server @@ -0,0 +1,140 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: krb5-admin-server +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Should-Start: krb5-kdc +# Should-Stop: krb5-kdc +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: MIT Kerberos KDC administrative daemon +# Description: Starts, stops, or restarts the MIT Kerberos KDC +# administrative daemon (kadmind). This daemon answers +# requests from kadmin clients and allows administrators +# to create, delete, and modify principals in the KDC +# database. +### END INIT INFO + +# Author: Sam Hartman <hartmans@mit.edu> +# Author: Russ Allbery <rra@debian.org> +# +# Based on the /etc/init.d/skeleton template as found in initscripts version +# 2.86.ds1-15. + +# June, 2012: Adopted for yocto <amy.fong@windriver.com> + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Kerberos administrative servers" +NAME=kadmind +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="" +SCRIPTNAME=/etc/init.d/krb5-admin-server +DEFAULT=/etc/default/krb5-admin-server + +# Exit if the package is not installed. +[ -x "$DAEMON" ] || exit 0 + +# Read configuration if it is present. +[ -r "$DEFAULT" ] && . "$DEFAULT" + +# Get the setting of VERBOSE and other rcS variables. +[ -f /etc/default/rcS ] && . /etc/default/rcS + +. /etc/init.d/functions + +ADMIN_SERVER_LOG=/var/log/kadmind.log +[ -f $ADMIN_SERVER_LOG ] && (test ! -x /sbin/restorecon \ + || /sbin/restorecon -F $ADMIN_SERVER_LOG) + +# Return +# 0 if daemon has been started +# 1 if daemon was already running +# 2 if daemon could not be started +do_start() +{ + start-stop-daemon --start --quiet --startas $DAEMON --name $NAME --test \ + > /dev/null || return 1 + start-stop-daemon --start --quiet --startas $DAEMON --name $NAME \ + -- $DAEMON_ARGS || return 2 +} + +# Return +# 0 if daemon has been stopped +# 1 if daemon was already stopped +# 2 if daemon could not be stopped +# other if a failure occurred +do_stop() +{ + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + return "$RETVAL" +} + + +case "$1" in + start) + if [ "$RUN_KADMIND" = false ] ; then + if [ "$VERBOSE" != no ] ; then + echo "Not starting $DESC per configuration" + fi + exit 0 + fi + [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + + stop) + [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + + restart|force-reload) + if [ "$RUN_KADMIND" = false ] ; then + if [ "$VERBOSE" != no ] ; then + echo "Not restarting $DESC per configuration" + fi + exit 0 + fi + echo "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) [ "$VERBOSE" != no ] && echo 0 ;; + *) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + *) + echo 1 + ;; + esac + ;; + + status) + pidofproc "$DAEMON" >/dev/null + status=$? + if [ $status -eq 0 ]; then + echo "$NAME is running." + else + echo "$NAME is not running." + fi + exit $status + ;; + + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 + exit 3 + ;; +esac + +: diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-kdc b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-kdc new file mode 100755 index 000000000..865d1b970 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-kdc @@ -0,0 +1,133 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: krb5-kdc +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# X-Start-Before: $x-display-manager +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: MIT Kerberos KDC +# Description: Starts, stops, or restarts the MIT Kerberos KDC. This +# daemon responds to ticket requests from Kerberos +# clients. +### END INIT INFO + +# Author: Sam Hartman <hartmans@mit.edu> +# Author: Russ Allbery <rra@debian.org> +# +# Based on the /etc/init.d/skeleton template as found in initscripts version +# 2.86.ds1-15. + +# June, 2012: Adopted for yocto <amy.fong@windriver.com> + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="Kerberos KDC" +NAME=krb5kdc +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="" +SCRIPTNAME=/etc/init.d/krb5-kdc + +# Exit if the package is not installed. +[ -x "$DAEMON" ] || exit 0 + +# Read configuration if it is present. +[ -r /etc/default/krb5-kdc ] && . /etc/default/krb5-kdc + +# Get the setting of VERBOSE and other rcS variables. +[ -f /etc/default/rcS ] && . /etc/default/rcS + +. /etc/init.d/functions + +# Return +# 0 if daemon has been started +# 1 if daemon was already running +# 2 if daemon could not be started +do_start_kdc() +{ + start-stop-daemon --start --quiet --startas $DAEMON --name $NAME --test \ + > /dev/null || return 1 + start-stop-daemon --start --quiet --startas $DAEMON --name $NAME \ + -- $DAEMON_ARGS || return 2 +} + + +# Return +# 0 if daemon has been stopped +# 1 if daemon was already stopped +# 2 if daemon could not be stopped +# other if a failure occurred +do_stop_kdc() +{ + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + return "$RETVAL" +} + + +case "$1" in + start) + [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" + do_start_kdc + case "$?" in + 0|1) + [ "$VERBOSE" != no ] && echo 0 + ;; + 2) + [ "$VERBOSE" != no ] && echo 1 + ;; + esac + ;; + + stop) + [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" + do_stop_kdc + case "$?" in + 0|1) + [ "$VERBOSE" != no ] && echo "krb524d" + ;; + 2) + [ "$VERBOSE" != no ] && echo 1 + ;; + esac + ;; + + restart|force-reload) + echo "Restarting $DESC" "$NAME" + do_stop_kdc + case "$?" in + 0|1) + do_start_kdc + case "$?" in + 0) + echo 0 + ;; + 1|2) + echo 1 + ;; + esac + ;; + *) + echo 1 + ;; + esac + ;; + + status) + pidofproc "$DAEMON" >/dev/null + status=$? + if [ $status -eq 0 ]; then + echo "$NAME is running." + else + echo "$NAME is not running." + fi + exit $status + ;; + + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 + exit 3 + ;; +esac + +: diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service new file mode 100644 index 000000000..21939a1f0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service @@ -0,0 +1,15 @@ +[Unit] +Description=MIT Kerberos KDC administrative daemon +After=syslog.target network.target +ConditionPathExists=/etc/krb5.conf + +[Service] +Type=forking +ExecStartPre=/bin/sh -c "test ! -f /var/log/kadmind.log || test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log/kadmind.log" +ExecStart=/usr/sbin/kadmind +EnvironmentFile=-/etc/default/krb5-admin-server +SuccessExitStatus=1 2 SIGKILL +TimeoutStopSec=30 + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service new file mode 100644 index 000000000..bf37c45ba --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service @@ -0,0 +1,14 @@ +[Unit] +Description=MIT Kerberos KDC +After=syslog.target network.target +ConditionPathExists=/etc/krb5.conf + +[Service] +Type=forking +ExecStart=/usr/sbin/krb5kdc +EnvironmentFile=-/etc/default/krb5-kdc +SuccessExitStatus=1 2 SIGKILL +TimeoutStopSec=30 + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb new file mode 100644 index 000000000..f95240f54 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb @@ -0,0 +1,188 @@ +SUMMARY = "A network authentication protocol" +DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \ + Kerberos is a trusted third-party service. That means that there is a \ + third party (the Kerberos server) that is trusted by all the entities on \ + the network (users and services, usually called "principals"). \ + . \ + This is the MIT reference implementation of Kerberos V5. \ + . \ + This package contains the Kerberos key server (KDC). The KDC manages all \ + authentication credentials for a Kerberos realm, holds the master keys \ + for the realm, and responds to authentication requests. This package \ + should be installed on both master and slave KDCs." + +HOMEPAGE = "http://web.mit.edu/Kerberos/" +SECTION = "console/network" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=59b8da652f07186b44782a8454574f30" +DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native openssl" + +inherit autotools-brokensep binconfig perlnative systemd update-rc.d + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" +SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ + file://0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch \ + file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ + file://crosscompile_nm.patch \ + file://etc/init.d/krb5-kdc \ + file://etc/init.d/krb5-admin-server \ + file://etc/default/krb5-kdc \ + file://etc/default/krb5-admin-server \ + file://krb5-kdc.service \ + file://krb5-admin-server.service \ +" +SRC_URI[md5sum] = "23c5e9f07642db4a67f7a5b6168b1319" +SRC_URI[sha256sum] = "faeb125f83b0fb4cdb2f99f088140631bb47d975982de0956d18c85842969e08" + +CVE_PRODUCT = "kerberos" + +S = "${WORKDIR}/${BP}/src" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" +PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl" +PACKAGECONFIG[keyutils] = "--enable-keyutils,--disable-keyutils,keyutils" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" + +EXTRA_OECONF += " --without-tcl --with-system-et --disable-rpath" +CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \ + ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ + ac_cv_file__etc_TIMEZONE=no" + +CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" +CFLAGS_append_riscv64 = " -D_REENTRANT -pthread" +LDFLAGS_append = " -pthread" + +do_configure() { + gnu-configize --force + autoreconf + oe_runconf +} + +do_install_append() { + rm -rf ${D}/${localstatedir}/run + rm -f ${D}${bindir}/sclient + rm -f ${D}${bindir}/sim_client + rm -f ${D}${bindir}/uuclient + rm -f ${D}${sbindir}/krb5-send-pr + rm -f ${D}${sbindir}/sim_server + rm -f ${D}${sbindir}/sserver + rm -f ${D}${sbindir}/uuserver + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default + install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + + mkdir -p ${D}/${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ + > ${D}${sysconfdir}/default/volatiles/87_krb5 + + echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/krb5kdc - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/krb5.conf + + mkdir -p ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} + fi +} + +PACKAGES =+ "${PN}-admin-server \ + ${PN}-gss-samples \ + ${PN}-k5tls \ + ${PN}-kdc \ + ${PN}-kdc-ldap \ + ${PN}-kpropd \ + ${PN}-otp \ + ${PN}-pkinit \ + ${PN}-user \ + libgssapi-krb5 \ + libgssrpc \ + libk5crypto \ + libkadm5clnt-mit \ + libkadm5srv-mit \ + libkdb5 \ + libkrad \ + libkrb5 \ + libkrb5support \ + libverto" + +FILES_${PN} = "${libdir}/krb5/plugins/preauth/test.so" +FILES_${PN}-doc += "${datadir}/examples" +FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" + +FILES_${PN}-admin-server = "${sbindir}/kadmin.local \ + ${sbindir}/kadmind \ + ${sbindir}/kprop \ + ${sysconfdir}/default/krb5-admin-server \ + ${sysconfdir}/init.d/krb5-admin-server \ + ${systemd_system_unitdir}/krb5-admin-server.service" + +FILES_${PN}-gss-samples = "${bindir}/gss-client \ + ${sbindir}/gss-server" + +FILES_${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" + +FILES_${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ + ${localstatedir}/krb5kdc \ + ${sbindir}/kdb5_util \ + ${sbindir}/kproplog \ + ${sbindir}/krb5kdc \ + ${sysconfdir}/default/krb5-kdc \ + ${sysconfdir}/default/volatiles/87_krb5 \ + ${sysconfdir}/init.d/krb5-kdc \ + ${sysconfdir}/tmpfiles.d/krb5.conf \ + ${systemd_system_unitdir}/krb5-kdc.service" + +FILES_${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \ + ${libdir}/krb5/plugins/kdb/kldap.so \ + ${sbindir}/kdb5_ldap_util" + +FILES_${PN}-kpropd = "${sbindir}/kpropd" +FILES_${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" +FILES_${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" +FILES_${PN}-user = "${bindir}/k*" + +FILES_libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" +FILES_libgssrpc = "${libdir}/libgssrpc${SOLIBS}" +FILES_libk5crypto = "${libdir}/libk5crypto${SOLIBS}" +FILES_libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" +FILES_libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" +FILES_libkdb5 = "${libdir}/libkdb5${SOLIBS}" +FILES_libkrad = "${libdir}/libkrad${SOLIBS}" +FILES_libkrb5 = "${libdir}/libkrb5${SOLIBS} \ + ${libdir}/krb5/plugins/authdata \ + ${libdir}/krb5/plugins/libkrb5" +FILES_libkrb5support = "${libdir}/libkrb5support${SOLIBS}" +FILES_libverto = "${libdir}/libverto${SOLIBS}" + +RDEPENDS_${PN}-kadmin-server = "${PN}-kdc" +RDEPENDS_${PN}-kpropd = "${PN}-kdc" + +INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" +INITSCRIPT_NAME_${PN}-admin-server = "krb5-admin-server" +INITSCRIPT_NAME_${PN}-kdc = "krb5-kdc" + +SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" +SYSTEMD_SERVICE_${PN}-admin-server = "krb5-admin-server.service" +SYSTEMD_SERVICE_${PN}-kdc = "krb5-kdc.service" + +pkg_postinst_${PN}-kdc () { + if [ -z "$D" ]; then + if command -v systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb b/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb new file mode 100644 index 000000000..5e0f3a5ed --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb @@ -0,0 +1,22 @@ +SUMMARY = "A full-featured and high-performance event loop that is loosely \ +modelled after libevent." +HOMEPAGE = "http://software.schmorp.de/pkg/libev.html" +LICENSE = "BSD-2-Clause | GPL-2.0+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d6ad416afd040c90698edcdf1cbee347" + +SRC_URI = "http://dist.schmorp.de/libev/Attic/${BP}.tar.gz" + +SRC_URI[md5sum] = "94459a5a22db041dec6f98424d6efe54" +SRC_URI[sha256sum] = "973593d3479abdf657674a55afe5f78624b0e440614e2b8cb3a07f16d4d7f821" + +S = "${WORKDIR}/${PN}-${PV}" + +inherit autotools + +EXTRA_OECONF += "--with-pic" + +do_install_append() { + # Avoid conflicting with libevent. The provided compatibility layer is + # still basic so drop it for now. + rm ${D}${includedir}/event.h +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch new file mode 100644 index 000000000..679a8b597 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch @@ -0,0 +1,38 @@ +Fix configure error in large file checks on 64-bit architectures + + configure:17888: checking for native large file support + configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': + configure:17893: error: cannot run test program while cross compiling + +configure.ac was using AC_SYS_LARGEFILE macro as is typical, but then +there was an extra runtime check added beyond that: +check if off_t is 8 bytes (64 bits) long. +If that runtime check passed, _FILE_OFFSET_BITS was defined as 64. + +Runtime checks need to go away for cross compiling, and luckily this extra +check was not serving any useful purpose. Note that off_t was *already* +64 bits, *without* setting _FILE_OFFSET_BITS, which makes _FILE_OFFSET_BITS +unneeded for large file support. + +If AC_SYS_LARGEFILE macro sets ac_cv_sys_file_offset_bits=no, +just leave _FILE_OFFSET_BITS undefined! + +--- libimobiledevice-1.1.4/configure.ac.old 2015-07-15 01:38:50.900143927 -0700 ++++ libimobiledevice-1.1.4/configure.ac 2015-07-15 01:39:13.300144430 -0700 +@@ -174,16 +174,6 @@ + if test "$enable_largefile" != no; then + if test "$ac_cv_sys_file_offset_bits" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +- else +- AC_MSG_CHECKING(for native large file support) +- AC_RUN_IFELSE([AC_LANG_SOURCE([#include <unistd.h> +- int main (int argc, char **argv) +- { +- exit(!(sizeof(off_t) == 8)); +- }])], +- [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) +- AC_MSG_RESULT(yes)], +- [AC_MSG_RESULT(no)]) + fi + if test "$ac_cv_sys_large_files" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch new file mode 100644 index 000000000..9a7895fd4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch @@ -0,0 +1,31 @@ +Fix link error with gcc 5 toolchains + + afc.c:258: error: undefined reference to 'debug_buffer' + collect2: error: ld returned 1 exit status + +debug.h header was declaring things inline without providing a definition. +Files that included this header then failed to link against the corresponding +external symbol in debug.c, because the linker took the 'inline' keyword +seriously rather than ignoring it. + +--- libimobiledevice-1.1.4/src/debug.h.orig 2015-10-03 16:24:08.758740386 -0700 ++++ libimobiledevice-1.1.4/src/debug.h 2015-10-03 16:24:22.706740355 -0700 +@@ -44,14 +44,14 @@ + #define debug_plist(a) + #endif + +-LIBIMOBILEDEVICE_INTERNAL inline void debug_info_real(const char *func, ++LIBIMOBILEDEVICE_INTERNAL void debug_info_real(const char *func, + const char *file, + int line, + const char *format, ...); + +-LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(const char *data, const int length); +-LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer_to_file(const char *file, const char *data, const int length); +-LIBIMOBILEDEVICE_INTERNAL inline void debug_plist_real(const char *func, ++LIBIMOBILEDEVICE_INTERNAL void debug_buffer(const char *data, const int length); ++LIBIMOBILEDEVICE_INTERNAL void debug_buffer_to_file(const char *file, const char *data, const int length); ++LIBIMOBILEDEVICE_INTERNAL void debug_plist_real(const char *func, + const char *file, + int line, + plist_t plist); diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb new file mode 100644 index 000000000..32aca96fd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb @@ -0,0 +1,23 @@ +SUMMARY = "A protocol library to access an iPhone or iPod Touch in Linux" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \ + file://COPYING.LESSER;md5=6ab17b41640564434dda85c06b7124f7 \ +" + +HOMEPAGE ="http://www.libimobiledevice.org/" + +DEPENDS = "libplist usbmuxd libtasn1 gnutls libgcrypt" + +SRC_URI = " \ + http://www.libimobiledevice.org/downloads/libimobiledevice-${PV}.tar.bz2 \ + file://configure-fix-largefile.patch \ + file://inline-without-definition.patch \ +" + +SRC_URI[md5sum] = "3f28cbc6a2e30d34685049c0abde5183" +SRC_URI[sha256sum] = "67499cfaa6172f566ee6b0783605acffe484fb7ddc3b09881ab7ac58667ee5b8" + +inherit autotools pkgconfig + +EXTRA_OECONF = " --without-cython " diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim/clang.patch b/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim/clang.patch new file mode 100644 index 000000000..92e657c00 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim/clang.patch @@ -0,0 +1,73 @@ +Check for clang compiler since we need to disable +unused-function warning for clang, at same time +pass werror when checking for compiler options if +werror is enabled so spurious options do not get +enabled. Only the ones that are supported by given +compiler are accepted. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +Index: libmbim-1.14.0/m4/compiler-warnings.m4 +=================================================================== +--- libmbim-1.14.0.orig/m4/compiler-warnings.m4 ++++ libmbim-1.14.0/m4/compiler-warnings.m4 +@@ -2,10 +2,30 @@ AC_DEFUN([LIBMBIM_COMPILER_WARNINGS], + [AC_ARG_ENABLE(more-warnings, + AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]), + set_more_warnings="$enableval",set_more_warnings=error) ++ ++# Clang throws a lot of warnings when it does not understand a flag. Disable ++# this warning for now so other warnings are visible. ++AC_MSG_CHECKING([if compiling with clang]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ ++#ifndef __clang__ ++ not clang ++#endif ++ ]])], ++ [CLANG=yes], ++ [CLANG=no] ++) ++AC_MSG_RESULT([$CLANG]) ++AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function]) ++CFLAGS="$CFLAGS $CLANG_FLAGS" ++LDFLAGS="$LDFLAGS $CLANG_FLAGS" ++ + AC_MSG_CHECKING(for more warnings) + if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + AC_MSG_RESULT(yes) + CFLAGS="-Wall -std=gnu89 $CFLAGS" ++ if test "x$set_more_warnings" = xerror; then ++ WERROR="-Werror" ++ fi + + for option in -Wmissing-declarations -Wmissing-prototypes \ + -Wdeclaration-after-statement -Wstrict-prototypes \ +@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_war + -Wmissing-include-dirs -Waggregate-return \ + -Wformat-security; do + SAVE_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $option" ++ CFLAGS="$CFLAGS $option $WERROR" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_TRY_COMPILE([], [], + has_option=yes, + has_option=no,) + if test $has_option = no; then + CFLAGS="$SAVE_CFLAGS" ++ else ++ CFLAGS="$SAVE_CFLAGS $option" + fi + AC_MSG_RESULT($has_option) + unset has_option + unset SAVE_CFLAGS + done ++ CFLAGS="$CFLAGS $WERROR" + unset option +- if test "x$set_more_warnings" = xerror; then +- CFLAGS="$CFLAGS -Werror" +- fi ++ unset WERROR + else + AC_MSG_RESULT(no) + fi diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.14.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.14.0.bb new file mode 100644 index 000000000..f89ef9d57 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.14.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "libmbim is library for talking to WWAN devices by MBIM protocol" +DESCRIPTION = "libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libmbim/" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = "glib-2.0 glib-2.0-native libgudev" + +inherit autotools pkgconfig bash-completion + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \ + file://clang.patch \ +" +SRC_URI[md5sum] = "2ed809e65c85353d3ab59e372890e549" +SRC_URI[sha256sum] = "ca8d52a95a18cbabae8f15f83f1572316e888b6504f946e6645d24405127ab5b" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/69-libmtp.rules b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/69-libmtp.rules new file mode 100644 index 000000000..4cd27c762 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/69-libmtp.rules @@ -0,0 +1,999 @@ +# UDEV-style hotplug map for libmtp +# Put this file in /etc/udev/rules.d + +ACTION!="add", GOTO="libmtp_rules_end" +ENV{MAJOR}!="?*", GOTO="libmtp_rules_end" +SUBSYSTEM=="usb", GOTO="libmtp_usb_rules" +GOTO="libmtp_rules_end" + +LABEL="libmtp_usb_rules" + +# Some sensitive devices we surely don't wanna probe +# Color instruments +ATTR{idVendor}=="0670", GOTO="libmtp_rules_end" +ATTR{idVendor}=="0765", GOTO="libmtp_rules_end" +ATTR{idVendor}=="085c", GOTO="libmtp_rules_end" +ATTR{idVendor}=="0971", GOTO="libmtp_rules_end" +# Canon scanners that look like MTP devices (PID 0x22nn) +ATTR{idVendor}=="04a9", ATTR{idProduct}=="22*", GOTO="libmtp_rules_end" +# Canon digital camera (EOS 3D) that looks like MTP device (PID 0x3113) +ATTR{idVendor}=="04a9", ATTR{idProduct}=="3113", GOTO="libmtp_rules_end" +# Sensitive Atheros devices that look like MTP devices +ATTR{idVendor}=="0cf3", GOTO="libmtp_rules_end" +# Sensitive Atmel JTAG programmers +ATTR{idVendor}=="03eb", GOTO="libmtp_rules_end" +# Creative ZEN Vision +ATTR{idVendor}=="041e", ATTR{idProduct}=="411f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative Portable Media Center +ATTR{idVendor}=="041e", ATTR{idProduct}=="4123", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Xtra (MTP mode) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4128", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Dell DJ (2nd generation) +ATTR{idVendor}=="041e", ATTR{idProduct}=="412f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Micro (MTP mode) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4130", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Touch (MTP mode) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4131", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Dell Dell Pocket DJ (MTP mode) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4132", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN MicroPhoto (alternate version) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4133", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Sleek (MTP mode) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4137", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN MicroPhoto +ATTR{idVendor}=="041e", ATTR{idProduct}=="413c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Sleek Photo +ATTR{idVendor}=="041e", ATTR{idProduct}=="413d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Vision:M +ATTR{idVendor}=="041e", ATTR{idProduct}=="413e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN V +ATTR{idVendor}=="041e", ATTR{idProduct}=="4150", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Vision:M (DVP-HD0004) +ATTR{idVendor}=="041e", ATTR{idProduct}=="4151", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN V Plus +ATTR{idVendor}=="041e", ATTR{idProduct}=="4152", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Vision W +ATTR{idVendor}=="041e", ATTR{idProduct}=="4153", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN +ATTR{idVendor}=="041e", ATTR{idProduct}=="4157", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN V 2GB +ATTR{idVendor}=="041e", ATTR{idProduct}=="4158", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN Mozaic +ATTR{idVendor}=="041e", ATTR{idProduct}=="4161", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN X-Fi +ATTR{idVendor}=="041e", ATTR{idProduct}=="4162", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Creative ZEN X-Fi 3 +ATTR{idVendor}=="041e", ATTR{idProduct}=="4169", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# ZiiLABS Zii EGG +ATTR{idVendor}=="041e", ATTR{idProduct}=="6000", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-900 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="0409", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung I550W Phone +ATTR{idVendor}=="04e8", ATTR{idProduct}=="04a4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Jet S8000 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="4f1f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-920 (501d) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="501d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-920 (5022) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5022", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-925GS +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5024", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-820 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="502e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-925(-GS) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="502f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-J70J +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5033", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-Z5 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="503c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-T7J +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5047", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-U2J (YP-U2JXB/XAA) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5054", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-F2J +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5057", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-K5 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="505a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-U3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="507d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-T9 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="507f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-K3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5081", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-P2 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5083", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-T10 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="508a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-S5 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="508b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-S3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5091", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-U4 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5093", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-R1 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="510f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-Q1 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5115", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-M1 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5118", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-P3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="511a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-Q2 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="511d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-U5 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5121", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-R0 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5125", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-Q3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5130", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YP-Z3 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5137", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung YH-999 Portable Media Center/SGH-A707/SGH-L760V/SGH-U900/Verizon Intensity/Fascinate +ATTR{idVendor}=="04e8", ATTR{idProduct}=="5a0f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung M7600 Beat/GT-S8300T/SGH-F490/S8300 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6642", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung X830 Mobile Phone +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6702", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung U600 Mobile Phone +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6709", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung F250 Mobile Phone +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6727", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Juke (SCH-U470) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6734", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung GT-B2700 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6752", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung SAMSUNG Trance +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6763", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung GT-S8500 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6819", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Galaxy models (MTP+ADB) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="685c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Galaxy Y +ATTR{idVendor}=="04e8", ATTR{idProduct}=="685e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Galaxy models (MTP) +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Galaxy models Kies mode +ATTR{idVendor}=="04e8", ATTR{idProduct}=="6877", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung Vibrant SGH-T959/Captivate/Media player mode +ATTR{idVendor}=="04e8", ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung GT-B2710/Xcover 271 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="68af", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Samsung GT-S5230 +ATTR{idVendor}=="04e8", ATTR{idProduct}=="e20c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft/Intel Bandon Portable Media Center +ATTR{idVendor}=="045e", ATTR{idProduct}=="00c9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft Windows Phone +ATTR{idVendor}=="045e", ATTR{idProduct}=="04ec", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft Windows MTP Simulator +ATTR{idVendor}=="045e", ATTR{idProduct}=="0622", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft Zune HD +ATTR{idVendor}=="045e", ATTR{idProduct}=="063e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft Kin 1 +ATTR{idVendor}=="045e", ATTR{idProduct}=="0640", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft/Sharp/nVidia Kin TwoM +ATTR{idVendor}=="045e", ATTR{idProduct}=="0641", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Microsoft Zune +ATTR{idVendor}=="045e", ATTR{idProduct}=="0710", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# JVC Alneo XA-HD500 +ATTR{idVendor}=="04f1", ATTR{idProduct}=="6105", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips HDD6320/00 or HDD6330/17 +ATTR{idVendor}=="0471", ATTR{idProduct}=="014b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips HDD14XX,HDD1620 or HDD1630/17 +ATTR{idVendor}=="0471", ATTR{idProduct}=="014c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips HDD085/00 or HDD082/17 +ATTR{idVendor}=="0471", ATTR{idProduct}=="014d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA9200 +ATTR{idVendor}=="0471", ATTR{idProduct}=="014f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips SA1115/55 +ATTR{idVendor}=="0471", ATTR{idProduct}=="0164", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear Audio +ATTR{idVendor}=="0471", ATTR{idProduct}=="0165", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips Shoqbox +ATTR{idVendor}=="0471", ATTR{idProduct}=="0172", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips PSA610 +ATTR{idVendor}=="0471", ATTR{idProduct}=="0181", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips HDD6320 +ATTR{idVendor}=="0471", ATTR{idProduct}=="01eb", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA6014/SA6015/SA6024/SA6025/SA6044/SA6045 +ATTR{idVendor}=="0471", ATTR{idProduct}=="084e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA5145 +ATTR{idVendor}=="0471", ATTR{idProduct}=="0857", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA6125/SA6145/SA6185 +ATTR{idVendor}=="0471", ATTR{idProduct}=="2002", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA3345 +ATTR{idVendor}=="0471", ATTR{idProduct}=="2004", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips SA5285 +ATTR{idVendor}=="0471", ATTR{idProduct}=="2022", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear ViBE SA1VBE04 +ATTR{idVendor}=="0471", ATTR{idProduct}=="2075", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear Muse +ATTR{idVendor}=="0471", ATTR{idProduct}=="2077", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear ViBE SA1VBE04/08 +ATTR{idVendor}=="0471", ATTR{idProduct}=="207b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear Aria +ATTR{idVendor}=="0471", ATTR{idProduct}=="207c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear SA1VBE08KX/78 +ATTR{idVendor}=="0471", ATTR{idProduct}=="208e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear VIBE SA2VBE[08|16]K/02 +ATTR{idVendor}=="0471", ATTR{idProduct}=="20b7", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear Ariaz +ATTR{idVendor}=="0471", ATTR{idProduct}=="20b9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips GoGear Vibe/02 +ATTR{idVendor}=="0471", ATTR{idProduct}=="20e5", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Philips PSA235 +ATTR{idVendor}=="0471", ATTR{idProduct}=="7e01", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A500 (ID1) +ATTR{idVendor}=="0502", ATTR{idProduct}=="3325", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A500 (ID2) +ATTR{idVendor}=="0502", ATTR{idProduct}=="3341", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A501 +ATTR{idVendor}=="0502", ATTR{idProduct}=="3344", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A100 (ID1) +ATTR{idVendor}=="0502", ATTR{idProduct}=="3348", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A100 (ID2) +ATTR{idVendor}=="0502", ATTR{idProduct}=="3349", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A700 +ATTR{idVendor}=="0502", ATTR{idProduct}=="3378", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A200 (ID1) +ATTR{idVendor}=="0502", ATTR{idProduct}=="337c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A200 (ID2) +ATTR{idVendor}=="0502", ATTR{idProduct}=="337d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer Iconia TAB A510 +ATTR{idVendor}=="0502", ATTR{idProduct}=="338a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Acer E350 Liquid Gallant Duo +ATTR{idVendor}=="0502", ATTR{idProduct}=="33c3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa m230/m240 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7400", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa m200-tcc (MTP mode) +ATTR{idVendor}=="0781", ATTR{idProduct}=="7401", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa c150 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7410", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa e200/e250/e260/e270/e280 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7420", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa e260/e280 v2 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7422", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa m240/m250 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7430", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Clip +ATTR{idVendor}=="0781", ATTR{idProduct}=="7432", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Clip v2 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7434", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa c240/c250 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7450", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa c250 v2 +ATTR{idVendor}=="0781", ATTR{idProduct}=="7452", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Express +ATTR{idVendor}=="0781", ATTR{idProduct}=="7460", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Connect +ATTR{idVendor}=="0781", ATTR{idProduct}=="7480", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa View +ATTR{idVendor}=="0781", ATTR{idProduct}=="74b0", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Fuze +ATTR{idVendor}=="0781", ATTR{idProduct}=="74c0", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Fuze v2 +ATTR{idVendor}=="0781", ATTR{idProduct}=="74c2", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Clip+ +ATTR{idVendor}=="0781", ATTR{idProduct}=="74d0", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Fuze+ +ATTR{idVendor}=="0781", ATTR{idProduct}=="74e0", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SanDisk Sansa Clip Zip +ATTR{idVendor}=="0781", ATTR{idProduct}=="74e4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver H300 Series MTP +ATTR{idVendor}=="1006", ATTR{idProduct}=="3004", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver Portable Media Center +ATTR{idVendor}=="1006", ATTR{idProduct}=="4002", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver Portable Media Center +ATTR{idVendor}=="1006", ATTR{idProduct}=="4003", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T7 Volcano +ATTR{idVendor}=="1042", ATTR{idProduct}=="1143", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver iFP-880 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1008", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T10 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1113", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T20 FM +ATTR{idVendor}=="4102", ATTR{idProduct}=="1114", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T20 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1115", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver U10 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1116", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T10a +ATTR{idVendor}=="4102", ATTR{idProduct}=="1117", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T20 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1118", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T30 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1119", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T10 2GB +ATTR{idVendor}=="4102", ATTR{idProduct}=="1120", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver N12 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1122", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver Clix2 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1126", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver Clix +ATTR{idVendor}=="4102", ATTR{idProduct}=="112a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver X20 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1132", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T60 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1134", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver E100 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1141", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver E100 v2/Lplayer +ATTR{idVendor}=="4102", ATTR{idProduct}=="1142", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver Spinn +ATTR{idVendor}=="4102", ATTR{idProduct}=="1147", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver E50 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1151", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver T5 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1153", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver E30 +ATTR{idVendor}=="4102", ATTR{idProduct}=="1167", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver H10 20GB +ATTR{idVendor}=="4102", ATTR{idProduct}=="2101", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver H10 5GB +ATTR{idVendor}=="4102", ATTR{idProduct}=="2102", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# iRiver H10 5.6GB +ATTR{idVendor}=="4102", ATTR{idProduct}=="2105", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Dell, Inc DJ Itty +ATTR{idVendor}=="413c", ATTR{idProduct}=="4500", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Dell, Inc Dell Streak 7 +ATTR{idVendor}=="413c", ATTR{idProduct}=="b10b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat MEGF-40 +ATTR{idVendor}=="0930", ATTR{idProduct}=="0009", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat +ATTR{idVendor}=="0930", ATTR{idProduct}=="000c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat P20 +ATTR{idVendor}=="0930", ATTR{idProduct}=="000f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat S +ATTR{idVendor}=="0930", ATTR{idProduct}=="0010", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat P10 +ATTR{idVendor}=="0930", ATTR{idProduct}=="0011", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat V30 +ATTR{idVendor}=="0930", ATTR{idProduct}=="0014", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat U +ATTR{idVendor}=="0930", ATTR{idProduct}=="0016", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat MEU202 +ATTR{idVendor}=="0930", ATTR{idProduct}=="0018", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat T +ATTR{idVendor}=="0930", ATTR{idProduct}=="0019", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat MEU201 +ATTR{idVendor}=="0930", ATTR{idProduct}=="001a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Gigabeat MET401 +ATTR{idVendor}=="0930", ATTR{idProduct}=="001d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Excite AT300 +ATTR{idVendor}=="0930", ATTR{idProduct}=="0963", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Toshiba Thrive AT100/AT105 +ATTR{idVendor}=="0930", ATTR{idProduct}=="7100", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos Gmini XS100 +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1207", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos XS202 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1208", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 104 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="120a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 204 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="120c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 404 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1301", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 404CAM (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1303", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 504 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1307", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 604 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1309", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 604WIFI (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="130b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 704 mobile dvr +ATTR{idVendor}=="0e79", ATTR{idProduct}=="130d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 704TV (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="130f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 405 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1311", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 605 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1313", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 605F (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1315", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 705 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1319", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos TV+ (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="131b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 105 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="131d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 405HDD (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1321", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 5 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1331", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 5 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1333", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 7 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1335", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos SPOD (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1341", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 5S IT (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1351", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 5H IT (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1357", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos Arnova Childpad +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1458", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 8o G9 (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1508", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 8o G9 Turbo (MTP mode) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1509", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 80G9 +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1518", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 101 G9 +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1528", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 101 G9 (v2) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1529", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 101 G9 Turbo 250 HD +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1538", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 101 G9 Turbo +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1539", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 70it2 (mode 1) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1568", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Archos 70it2 (mode 2) +ATTR{idVendor}=="0e79", ATTR{idProduct}=="1569", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Dunlop MP3 player 1GB / EGOMAN MD223AFD +ATTR{idVendor}=="10d6", ATTR{idProduct}=="2200", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Memorex or iRiver MMP 8585/8586 or iRiver E200 +ATTR{idVendor}=="10d6", ATTR{idProduct}=="2300", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sirius Stiletto +ATTR{idVendor}=="18f6", ATTR{idProduct}=="0102", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sirius Stiletto 2 +ATTR{idVendor}=="18f6", ATTR{idProduct}=="0110", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Canon Ixus Digital 700 (PTP/MTP mode) +ATTR{idVendor}=="04a9", ATTR{idProduct}=="30f2", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Canon PowerShot A640 (PTP/MTP mode) +ATTR{idVendor}=="04a9", ATTR{idProduct}=="3139", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Canon PowerShot SX20IS (PTP/MTP mode) +ATTR{idVendor}=="04a9", ATTR{idProduct}=="31e4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N81 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="000a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 6120c Classic Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="002e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N96 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0039", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 6500c Classic Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="003c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 3110c Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="005f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 3109c Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0065", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5310 XpressMusic +ATTR{idVendor}=="0421", ATTR{idProduct}=="006c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N95 Mobile Phone 8GB +ATTR{idVendor}=="0421", ATTR{idProduct}=="006e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N82 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0074", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N78 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0079", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 6220 Classic +ATTR{idVendor}=="0421", ATTR{idProduct}=="008d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N85 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0092", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 6210 Navigator +ATTR{idVendor}=="0421", ATTR{idProduct}=="0098", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E71 +ATTR{idVendor}=="0421", ATTR{idProduct}=="00e4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E66 +ATTR{idVendor}=="0421", ATTR{idProduct}=="00e5", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5320 XpressMusic +ATTR{idVendor}=="0421", ATTR{idProduct}=="00ea", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5800 XpressMusic +ATTR{idVendor}=="0421", ATTR{idProduct}=="0154", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5800 XpressMusic v2 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0155", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5800 XpressMusic v3 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0159", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E63 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0179", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N79 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0186", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E71x +ATTR{idVendor}=="0421", ATTR{idProduct}=="01a1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E52 +ATTR{idVendor}=="0421", ATTR{idProduct}=="01cf", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 3710 +ATTR{idVendor}=="0421", ATTR{idProduct}=="01ee", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N97-1 +ATTR{idVendor}=="0421", ATTR{idProduct}=="01f4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N97 +ATTR{idVendor}=="0421", ATTR{idProduct}=="01f5", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5130 XpressMusic +ATTR{idVendor}=="0421", ATTR{idProduct}=="0209", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E72 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0221", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5530 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0229", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N97 mini +ATTR{idVendor}=="0421", ATTR{idProduct}=="026b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia X6 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0274", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 6600i +ATTR{idVendor}=="0421", ATTR{idProduct}=="0297", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 2710 +ATTR{idVendor}=="0421", ATTR{idProduct}=="02c1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5230 +ATTR{idVendor}=="0421", ATTR{idProduct}=="02e2", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N8 +ATTR{idVendor}=="0421", ATTR{idProduct}=="02fe", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N8 (Ovi mode) +ATTR{idVendor}=="0421", ATTR{idProduct}=="0302", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E7 +ATTR{idVendor}=="0421", ATTR{idProduct}=="0334", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia E7 (Ovi mode) +ATTR{idVendor}=="0421", ATTR{idProduct}=="0335", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia C7 +ATTR{idVendor}=="0421", ATTR{idProduct}=="03c1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia C7 (ID2) +ATTR{idVendor}=="0421", ATTR{idProduct}=="03cd", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N950 +ATTR{idVendor}=="0421", ATTR{idProduct}=="03d2", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 3250 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0462", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N93 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0478", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5500 Sport Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="047e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N91 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="0485", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5700 XpressMusic Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04b4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5300 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04ba", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5200 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04be", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N73 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04d1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N75 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04e1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N93i Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04e5", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N95 Mobile Phone +ATTR{idVendor}=="0421", ATTR{idProduct}=="04ef", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N80 Internet Edition (Media Player) +ATTR{idVendor}=="0421", ATTR{idProduct}=="04f1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia N9 +ATTR{idVendor}=="0421", ATTR{idProduct}=="051a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia 5530 Xpressmusic +ATTR{idVendor}=="05c6", ATTR{idProduct}=="0229", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nokia/Verizon 6205 Balboa/Verizon Music Phone +ATTR{idVendor}=="05c6", ATTR{idProduct}=="3196", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Logik LOG DAX MP3 and DAB Player +ATTR{idVendor}=="13d1", ATTR{idProduct}=="7002", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Technika MP-709 +ATTR{idVendor}=="13d1", ATTR{idProduct}=="7017", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson EM28 Series +ATTR{idVendor}=="069b", ATTR{idProduct}=="0774", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson / RCA Opal / Lyra MC4002 +ATTR{idVendor}=="069b", ATTR{idProduct}=="0777", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson Lyra MC5104B (M51 Series) +ATTR{idVendor}=="069b", ATTR{idProduct}=="077c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson RCA H106 +ATTR{idVendor}=="069b", ATTR{idProduct}=="301a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson scenium E308 +ATTR{idVendor}=="069b", ATTR{idProduct}=="3028", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Thomson / RCA Lyra HC308A +ATTR{idVendor}=="069b", ATTR{idProduct}=="3035", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# FOMA F903iX HIGH-SPEED +ATTR{idVendor}=="04c5", ATTR{idProduct}=="1140", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# NormSoft, Inc. Pocket Tunes +ATTR{idVendor}=="1703", ATTR{idProduct}=="0001", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# NormSoft, Inc. Pocket Tunes 4 +ATTR{idVendor}=="1703", ATTR{idProduct}=="0002", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# TrekStor Vibez 8/12GB +ATTR{idVendor}=="066f", ATTR{idProduct}=="842a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Medion MD8333 +ATTR{idVendor}=="066f", ATTR{idProduct}=="8550", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Medion MD8333 +ATTR{idVendor}=="066f", ATTR{idProduct}=="8588", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Medion MD99000 (P9514)/Olivetti Olipad 110 +ATTR{idVendor}=="0408", ATTR{idProduct}=="b009", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Medion Lifetab P9514 +ATTR{idVendor}=="0408", ATTR{idProduct}=="b00a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Maxfield G-Flash NG 1GB +ATTR{idVendor}=="066f", ATTR{idProduct}=="846c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SigmaTel Inc. MTPMSCN Audio Player +ATTR{idVendor}=="066f", ATTR{idProduct}=="a010", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# TrekStor i.Beat Sweez FM +ATTR{idVendor}=="0402", ATTR{idProduct}=="0611", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# TrekStor i.Beat Organix 2.0 +ATTR{idVendor}=="1e68", ATTR{idProduct}=="0002", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Disney MixMax +ATTR{idVendor}=="0aa6", ATTR{idProduct}=="6021", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Tevion MD 81488 +ATTR{idVendor}=="0aa6", ATTR{idProduct}=="3011", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# MyMusix PD-6070 +ATTR{idVendor}=="0aa6", ATTR{idProduct}=="9601", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio U3 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0701", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio 6 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0711", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio 7 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0751", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio U5 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0761", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio D2 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0801", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio D2+ FW 2.x (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0861", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio D2+ DAB FW 4.x (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0871", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio D2+ FW 3.x (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0881", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio D2+ DMB FW 1.x (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0891", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio S9 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0901", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio 9 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0911", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio J3 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0921", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio X7 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0931", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio C2 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0941", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Cowon iAudio 10 (MTP mode) +ATTR{idVendor}=="0e21", ATTR{idProduct}=="0952", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Insignia NS-DV45 +ATTR{idVendor}=="19ff", ATTR{idProduct}=="0303", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Insignia Sport Player +ATTR{idVendor}=="19ff", ATTR{idProduct}=="0307", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Insignia Pilot 4GB +ATTR{idVendor}=="19ff", ATTR{idProduct}=="0309", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. T54 +ATTR{idVendor}=="043e", ATTR{idProduct}=="7040", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. UP3 +ATTR{idVendor}=="043e", ATTR{idProduct}=="70b1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. VX8550 V CAST Mobile Phone +ATTR{idVendor}=="1004", ATTR{idProduct}=="6010", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. KC910 Renoir Mobile Phone +ATTR{idVendor}=="1004", ATTR{idProduct}=="608f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. GR-500 Music Player +ATTR{idVendor}=="1004", ATTR{idProduct}=="611b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. KM900 +ATTR{idVendor}=="1004", ATTR{idProduct}=="6132", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. LG8575 +ATTR{idVendor}=="1004", ATTR{idProduct}=="619a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. V909 G-Slate +ATTR{idVendor}=="1004", ATTR{idProduct}=="61f9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# LG Electronics Inc. LG-E617G/P700 +ATTR{idVendor}=="1004", ATTR{idProduct}=="631c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-A815/NWZ-A818 +ATTR{idVendor}=="054c", ATTR{idProduct}=="0325", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S516 +ATTR{idVendor}=="054c", ATTR{idProduct}=="0326", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S615F/NWZ-S616F/NWZ-S618F +ATTR{idVendor}=="054c", ATTR{idProduct}=="0327", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S716F +ATTR{idVendor}=="054c", ATTR{idProduct}=="035a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-A826/NWZ-A828/NWZ-A829 +ATTR{idVendor}=="054c", ATTR{idProduct}=="035b", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-A726/NWZ-A728/NWZ-A768 +ATTR{idVendor}=="054c", ATTR{idProduct}=="035c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-B135 +ATTR{idVendor}=="054c", ATTR{idProduct}=="036e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-E436F +ATTR{idVendor}=="054c", ATTR{idProduct}=="0385", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-W202 +ATTR{idVendor}=="054c", ATTR{idProduct}=="0388", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S739F +ATTR{idVendor}=="054c", ATTR{idProduct}=="038c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S638F +ATTR{idVendor}=="054c", ATTR{idProduct}=="038e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-X1050B/NWZ-X1060B +ATTR{idVendor}=="054c", ATTR{idProduct}=="0397", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-X1051/NWZ-X1061 +ATTR{idVendor}=="054c", ATTR{idProduct}=="0398", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-B142F +ATTR{idVendor}=="054c", ATTR{idProduct}=="03d8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-E344 +ATTR{idVendor}=="054c", ATTR{idProduct}=="03fc", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-E445 +ATTR{idVendor}=="054c", ATTR{idProduct}=="03fd", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S545 +ATTR{idVendor}=="054c", ATTR{idProduct}=="03fe", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-A845 +ATTR{idVendor}=="054c", ATTR{idProduct}=="0404", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-W252B +ATTR{idVendor}=="054c", ATTR{idProduct}=="04bb", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-B153F +ATTR{idVendor}=="054c", ATTR{idProduct}=="04be", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-E354 +ATTR{idVendor}=="054c", ATTR{idProduct}=="04cb", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-S754 +ATTR{idVendor}=="054c", ATTR{idProduct}=="04cc", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony NWZ-B163F +ATTR{idVendor}=="054c", ATTR{idProduct}=="059a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Walkman NWZ-E464 +ATTR{idVendor}=="054c", ATTR{idProduct}=="05a6", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony NWZ-S765 +ATTR{idVendor}=="054c", ATTR{idProduct}=="05a8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Sony Tablet S +ATTR{idVendor}=="054c", ATTR{idProduct}=="05b3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony Sony Tablet S1 +ATTR{idVendor}=="054c", ATTR{idProduct}=="05b4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Sony DCR-SR75 +ATTR{idVendor}=="054c", ATTR{idProduct}=="1294", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson K850i +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0075", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W910 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0076", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W890i +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00b3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W760i +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00c6", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson C902 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00d4", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson C702 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00d9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W980 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00da", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson C905 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00ef", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W595 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00f3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W902 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00f5", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson T700 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="00fb", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W705/W715 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0105", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W995 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0112", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson U5 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0133", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson U8i +ATTR{idVendor}=="0fce", ATTR{idProduct}=="013a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson j10i2 (Elm) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0144", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson j108i (Cedar) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="014e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson W302 +ATTR{idVendor}=="0fce", ATTR{idProduct}=="10c8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson j10i (Elm) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="d144", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson K550i +ATTR{idVendor}=="0fce", ATTR{idProduct}=="e000", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson LT15i (Xperia arc S) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="014f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson MT11i Xperia Neo +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0156", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson MK16i Xperia +ATTR{idVendor}=="0fce", ATTR{idProduct}=="015a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST18a Xperia Ray +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0161", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson SK17i Xperia Mini Pro +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0166", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST15i Xperia Mini +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0167", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST17i Xperia Active +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0168", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26i Xperia S +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0169", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY WT19i Live Walkman +ATTR{idVendor}=="0fce", ATTR{idProduct}=="016d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST21i Xperia Tipo +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0170", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST15i Xperia U +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0171", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT22i Xperia P +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0172", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26w Xperia Acro S +ATTR{idVendor}=="0fce", ATTR{idProduct}=="0176", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST17i Xperia Active (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4168", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26i Xperia S (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4169", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST21i Xperia Tipo (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4170", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST25i Xperia U (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4171", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT22i Xperia P (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4172", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26w Xperia Acro S (MTP+UMS mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="4176", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson LT15i Xperia Arc (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="514f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson MT11i Xperia Neo (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5156", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST17i Xperia Active (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5168", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26i Xperia S (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5169", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson MK16i Xperia (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="515a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST18i Xperia Ray (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5161", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson SK17i Xperia Mini Pro (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5166", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson ST15i Xperia Mini (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5167", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SonyEricsson SK17i Xperia Mini Pro (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="516d", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST21i Xperia Tipo (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5170", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST25i Xperia U (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5171", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT22i Xperia P (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5172", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY LT26w Xperia Acro S (MTP+ADB mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="5176", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY MT27i Xperia Sola (MTP+UMS+? mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="a173", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# SONY ST27i Xperia Go (MTP+UMS+? mode) +ATTR{idVendor}=="0fce", ATTR{idProduct}=="a17e", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola V3m/V750 verizon +ATTR{idVendor}=="22b8", ATTR{idProduct}=="2a65", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Xoom 2 Media Edition (ID2) +ATTR{idVendor}=="22b8", ATTR{idProduct}=="41cf", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Droid X/MB525 (Defy) +ATTR{idVendor}=="22b8", ATTR{idProduct}=="41d6", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Milestone / Verizon Droid +ATTR{idVendor}=="22b8", ATTR{idProduct}=="41dc", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola DROID2 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="42a7", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Xoom 2 Media Edition +ATTR{idVendor}=="22b8", ATTR{idProduct}=="4311", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola XT912/XT928 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="4362", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola DROID4 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="437f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola IdeaPad K1 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="4811", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola A1200 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="60ca", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola MTP Test Command Interface +ATTR{idVendor}=="22b8", ATTR{idProduct}=="6413", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola RAZR2 V8/U9/Z6 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="6415", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Xoom (Factory test) +ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Xoom (MTP) +ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Xoom (MTP+ADB) +ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Motorola Milestone X2 +ATTR{idVendor}=="22b8", ATTR{idProduct}=="70ca", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Sony) S1 +ATTR{idVendor}=="18d1", ATTR{idProduct}=="05b3", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Barnes & Noble) Nook Color +ATTR{idVendor}=="18d1", ATTR{idProduct}=="2d02", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Asus) TF101 Transformer +ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e0f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Samsung) Nexus S +ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e21", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Asus) Nexus 7 (MTP) +ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e41", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Asus) Nexus 7 (MTP+ADB) +ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Motorola) Xoom (MZ604) +ATTR{idVendor}=="18d1", ATTR{idProduct}=="70a8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Toshiba) Thrive 7/AT105 +ATTR{idVendor}=="18d1", ATTR{idProduct}=="7102", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Lenovo) Ideapad K1 +ATTR{idVendor}=="18d1", ATTR{idProduct}=="740a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for Medion) MD99000 (P9514) +ATTR{idVendor}=="18d1", ATTR{idProduct}=="b00a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for LG Electronics) P990/Optimus (Cyanogen) +ATTR{idVendor}=="18d1", ATTR{idProduct}=="d109", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Google Inc (for LG Electronics) P990/Optimus +ATTR{idVendor}=="18d1", ATTR{idProduct}=="d10a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Kenwood Media Keg HD10GB7 Sport Player +ATTR{idVendor}=="0b28", ATTR{idProduct}=="100c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Micro-Star International P610/Model MS-5557 +ATTR{idVendor}=="0db0", ATTR{idProduct}=="5572", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# FOMA D905i +ATTR{idVendor}=="06d3", ATTR{idProduct}=="21ba", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Haier Ibiza Rhapsody +ATTR{idVendor}=="1302", ATTR{idProduct}=="1016", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Haier Ibiza Rhapsody +ATTR{idVendor}=="1302", ATTR{idProduct}=="1017", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Panasonic P905i +ATTR{idVendor}=="04da", ATTR{idProduct}=="2145", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Panasonic P906i +ATTR{idVendor}=="04da", ATTR{idProduct}=="2158", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Polaroid Freescape/MPU-433158 +ATTR{idVendor}=="0546", ATTR{idProduct}=="2035", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Pioneer XMP3 +ATTR{idVendor}=="08e4", ATTR{idProduct}=="0148", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Slacker Inc. Slacker Portable Media Player +ATTR{idVendor}=="1bdc", ATTR{idProduct}=="fabf", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Conceptronic CMTD2 +ATTR{idVendor}=="1e53", ATTR{idProduct}=="0005", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# O2 Sistemas ZoltarTV +ATTR{idVendor}=="1e53", ATTR{idProduct}=="0006", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Wyplay Wyplayer +ATTR{idVendor}=="1e53", ATTR{idProduct}=="0007", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Perception Digital, Ltd Gigaware GX400 +ATTR{idVendor}=="0aa6", ATTR{idProduct}=="9702", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# RIM BlackBerry Storm/9650 +ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Nextar MA715A-8R +ATTR{idVendor}=="0402", ATTR{idProduct}=="5668", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Coby COBY MP705 +ATTR{idVendor}=="1e74", ATTR{idProduct}=="6512", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPhone +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1290", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPod Touch 1st Gen +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1291", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPhone 3G +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1292", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPod Touch 2nd Gen +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1293", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPhone 3GS +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1294", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple 0x1296 +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1296", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple 0x1297 +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1297", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple 0x1298 +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1298", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPod Touch 3rd Gen +ATTR{idVendor}=="05ac", ATTR{idProduct}=="1299", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Apple iPad +ATTR{idVendor}=="05ac", ATTR{idProduct}=="129a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Curitel Communications, Inc. Verizon Wireless Device +ATTR{idVendor}=="106c", ATTR{idProduct}=="3215", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Pantech Crux +ATTR{idVendor}=="106c", ATTR{idProduct}=="f003", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF300 Transformer +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4c80", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF300 Transformer (USB debug mode) +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4c81", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF700 Transformer +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4c90", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF201 Transformer Prime (keyboard dock) +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4d00", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF201 Transformer Prime (tablet only) +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4d01", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TFXXX Transformer Prime (unknown version) +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4d04", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF101 Eeepad Slider +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4e01", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF101 Eeepad Transformer +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4e0f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Asus TF101 Eeepad Transformer (debug mode) +ATTR{idVendor}=="0b05", ATTR{idProduct}=="4e1f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Lenovo K1 +ATTR{idVendor}=="17ef", ATTR{idProduct}=="740a", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Lenovo ThinkPad Tablet +ATTR{idVendor}=="17ef", ATTR{idProduct}=="741c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Lenovo P700 +ATTR{idVendor}=="17ef", ATTR{idProduct}=="7497", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Lenovo Lifetab S9512 +ATTR{idVendor}=="17ef", ATTR{idProduct}=="74cc", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Huawei Honor U8860 +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1051", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Huawei Mediapad (mode 0) +ATTR{idVendor}=="12d1", ATTR{idProduct}=="360f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Huawei Mediapad (mode 1) +ATTR{idVendor}=="12d1", ATTR{idProduct}=="361f", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# ZTE V55 ID 1 +ATTR{idVendor}=="19d2", ATTR{idProduct}=="0244", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# ZTE V55 ID 2 +ATTR{idVendor}=="19d2", ATTR{idProduct}=="0245", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# HTC Zopo ZP100 (ID1) +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# HTC EVO 4G LTE +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c93", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# HTC EVO 4G LTE (second ID) +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0ca8", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Hewlett-Packard HP Touchpad +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="685c", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Hewlett-Packard HP Touchpad (debug mode) +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# HTC Zopo ZP100 (ID2) +ATTR{idVendor}=="0bb4", ATTR{idProduct}=="2008", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# NEC FOMA N01A +ATTR{idVendor}=="0409", ATTR{idProduct}=="0242", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# nVidia CM9-Adam +ATTR{idVendor}=="0955", ATTR{idProduct}=="70a9", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Vizio VTAB1008 +ATTR{idVendor}=="0489", ATTR{idProduct}=="e040", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Various Viewpia DR/bq Kepler +ATTR{idVendor}=="2207", ATTR{idProduct}=="0001", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Isabella Her Prototype +ATTR{idVendor}=="0b20", ATTR{idProduct}=="ddee", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" + +# Autoprobe vendor-specific, communication and PTP devices +ENV{ID_MTP_DEVICE}!="1", ENV{MTP_NO_PROBE}!="1", ENV{COLOR_MEASUREMENT_DEVICE}!="1", ENV{libsane_matched}!="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", PROGRAM="mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}", RESULT=="1", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" + +LABEL="libmtp_rules_end" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/glibc-2.20.patch b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/glibc-2.20.patch new file mode 100644 index 000000000..38b45c2a9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp-1.1.5/glibc-2.20.patch @@ -0,0 +1,36 @@ + +Include config.h so we get the defines available for subsequent +include files + +Fixes errors like + +| In file included from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/beaglebone/usr/include/string.h:634:0, +| from /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-oe-linux-gnueabi/libmtp/1.1.5-r0/libmtp-1.1.5/src/util.c:36: +| /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-oe-linux-gnueabi/libmtp/1.1.5-r0/libmtp-1.1.5/src/util.h:29:7: error: expected identifier or '(' before '__extension +__' +| char *strndup (const char *s, size_t n); +| ^ +| /home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-oe-linux-gnueabi/libmtp/1.1.5-r0/libmtp-1.1.5/src/util.c:111:7: error: expected identifier or '(' before '__extensio +n__' +| char *strndup (const char *s, size_t n) +| ^ +| make[2]: *** [libmtp_la-util.lo] Error 1 + + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending + +Index: libmtp-1.1.5/src/util.c +=================================================================== +--- libmtp-1.1.5.orig/src/util.c 2011-01-10 05:37:21.000000000 -0800 ++++ libmtp-1.1.5/src/util.c 2014-09-03 23:50:44.703563888 -0700 +@@ -22,6 +22,8 @@ + * Boston, MA 02111-1307, USA. + */ + ++#include "config.h" ++ + /* MSVC does not have these */ + #ifndef _MSC_VER + #include <sys/time.h> diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb new file mode 100644 index 000000000..798b1707d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.5.bb @@ -0,0 +1,58 @@ +# TODO: include debian's mtp-tools man page (needs xsltproc-native and +# docbook-xsl-native, or we pregenerate it), add support for doxygen +# generation fully with -natives +DESCRIPTION = "libmtp is an Initiator implementation of the Media Transfer \ +Protocol (MTP) in the form of a library suitable primarily for POSIX \ +compliant operating systems" +SUMMARY = "libmtp is an Initiator implementation of the Media Transfer Protocol (MTP)" +HOMEPAGE = "http://libmtp.sourceforge.net/" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=0448d3676bc0de00406af227d341a4d1 \ + file://src/ptp.c;beginline=3;endline=22;md5=dafe6cfd1782f56471bb94ab06624c1f \ + file://examples/albums.c;beginline=5;endline=21;md5=84f4e55dfec49e898b7f68a828c15620 \ +" + +DEPENDS += "libusb1 gettext-native" + +SCM_URI = "git://git.code.sf.net/p/libmtp/code" +SRC_URI = "\ + ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ + file://69-libmtp.rules \ + file://glibc-2.20.patch \ +" +SRC_URI[md5sum] = "f80e45c0e6e5798c434bb1c26a7b602d" +SRC_URI[sha256sum] = "787679171baf8b3cf2fcc03196c705ab4d7cbc969bd71f9d3696be1ce7f1c63a" + +# Currently we use a pregenerated rules file produced by mtp-hotplug, rather +# than having to depend upon libmtp-native or run mtp-hotplug in a postinst. +do_unpack[vardeps] += "skip_udev_rules_generation" +do_unpack[postfuncs] += "skip_udev_rules_generation" + +skip_udev_rules_generation () { + sed -i -e '/^noinst_DATA=/,/util\/mtp-hotplug -H/d' ${S}/Makefile.am + cp ${WORKDIR}/69-libmtp.rules ${S}/ +} + +inherit autotools pkgconfig lib_package + +EXTRA_OECONF += "--disable-rpath" + +PACKAGECONFIG ?= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'largefile$', 'largefile', '', d)} \ +" +PACKAGECONFIG[doxygen] = "--enable-doxygen,--disable-doxygen" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile" +PACKAGECONFIG[mtpz] = "--enable-mtpz,--disable-mtpz,libgcrypt" + +PACKAGES =+ "libmtp-common libmtp-runtime" + +RDEPENDS_${PN} += "libmtp-common" +RRECOMMENDS_${PN} += "libmtp-runtime ${PN}-bin" +FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*" +FILES_libmtp-common = "${nonarch_base_libdir}/udev/rules.d/*" +SUMMARY_libmtp-common = "The udev rules file for MTP devices" +FILES_libmtp-runtime = "${nonarch_base_libdir}/udev/mtp-probe" +DEPENDS_libmtp-runtime = "libmtp-common" +SUMMARY_libmtp-runtime = "mtp-probe, used for the MTP udev rules" +DESCRIPTION_libmtp-runtime = "This package provides mtp-probe, a program to probe newly connected device interfaces from userspace to determine if they are MTP devices, used for udev rules." diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-include-sys-select.h-for-fd_-definitions.patch b/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-include-sys-select.h-for-fd_-definitions.patch new file mode 100644 index 000000000..15aa94e2c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp/0001-include-sys-select.h-for-fd_-definitions.patch @@ -0,0 +1,25 @@ +From 94e9a082d76414f82794b0c9817d0c24e3868275 Mon Sep 17 00:00:00 2001 +From: Kylie McClain <somasis@exherbo.org> +Date: Sat, 21 May 2016 21:24:36 -0400 +Subject: [PATCH] ndptool: Fix compilation on musl libc + +FD_ZERO, fd_set, etc are defined within sys/select.h on musl. + +Signed-off-by: Kylie McClain <somasis@exherbo.org> +Signed-off-by: Jiri Pirko <jiri@mellanox.com> +--- + utils/ndptool.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/utils/ndptool.c b/utils/ndptool.c +index 1d96f4c..96479fa 100644 +--- a/utils/ndptool.c ++++ b/utils/ndptool.c +@@ -28,6 +28,7 @@ + #include <arpa/inet.h> + #include <errno.h> + #include <ndp.h> ++#include <sys/select.h> + + enum verbosity_level { + VERB1, diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb b/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb new file mode 100644 index 000000000..5148798ab --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.6.bb @@ -0,0 +1,13 @@ +SUMMARY = "Library for IPv6 Neighbor Discovery Protocol" +HOMEPAGE = "http://libndp.org/" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/jpirko/libndp \ + file://0001-include-sys-select.h-for-fd_-definitions.patch \ + " +# tag for v1.6 +SRCREV = "2f721c4ff519f38f46695a60d9f9d88f35bf3c1d" +S = "${WORKDIR}/git" + +inherit autotools diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch b/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch new file mode 100644 index 000000000..98008dba9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch @@ -0,0 +1,58 @@ +From ffd7fab744a9ad2893169a8fb6244074604d5d0d Mon Sep 17 00:00:00 2001 +From: rofl0r <retnyg@gmx.net> +Date: Tue, 12 Aug 2014 21:51:39 +0200 +Subject: [PATCH] Support musl libc, remove support for glibc < 2.1 + +Upstream-Status: Backport + +The workarounds for glibc < 2.1 (was released february 1999) break the +build with musl libc. + +It is very unlikely that 2.0 or earlier is still in use, and if so, +1) that's a big security hole +2) code wouldnt compile anyway since noone tested build in the last decade +3) user of it wouldn't expect anyway to get bleeding edge sw built on it, + so he would just use the latest version that works for him. + +Closes #52 + +Signed-off-by: rofl0r <retnyg@gmx.net> +Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> +--- + libnet/src/libnet_link_linux.c | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/src/libnet_link_linux.c b/src/libnet_link_linux.c +index 054458d..3c6df3c 100644 +--- a/src/libnet_link_linux.c ++++ b/src/libnet_link_linux.c +@@ -30,26 +30,15 @@ + #include <sys/time.h> + + #include <net/if.h> +-#if (__GLIBC__) + #include <netinet/if_ether.h> + #include <net/if_arp.h> +-#else +-#include <linux/if_arp.h> +-#include <linux/if_ether.h> +-#endif + + #if (HAVE_PACKET_SOCKET) + #ifndef SOL_PACKET + #define SOL_PACKET 263 + #endif /* SOL_PACKET */ +-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 + #include <netpacket/packet.h> + #include <net/ethernet.h> /* the L2 protocols */ +-#else +-#include <asm/types.h> +-#include <linux/if_packet.h> +-#include <linux/if_ether.h> /* The L2 protocols */ +-#endif + #endif /* HAVE_PACKET_SOCKET */ + + #include "../include/libnet.h" +-- +1.9.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb b/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb new file mode 100644 index 000000000..dfc204960 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb @@ -0,0 +1,21 @@ +SUMMARY = "A packet dissection and creation library" +# libnet at packetfactory.net is dead +HOMEPAGE = "https://github.com/sam-github/libnet" +SECTION = "libs" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=3ec839e00408b484d33b472a86b7c266" +DEPENDS = "libpcap" +# There are major API changes beween libnet v1.0 and libnet v1.1 +PROVIDES = "libnet-1.2rc2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/libnet-dev/${BPN}-${PV}.tar.gz \ + file://0001-Support-musl-libc-remove-support-for-glibc-2.1.patch \ + " + +SRC_URI[md5sum] = "f051e6e5bdecddb90f77c701c2ca1804" +SRC_URI[sha256sum] = "72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63" + +S = "${WORKDIR}/${BPN}-${PV}" + +inherit autotools binconfig + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch b/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch new file mode 100644 index 000000000..7a3429b9d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch @@ -0,0 +1,85 @@ +From 4cfb728804157e8f3c69e11ba4df449d8f76388f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Oct 2016 04:42:26 +0000 +Subject: [PATCH] Detect clang + +Check for clang compiler since we need to disable +unused-function warning for clang, at same time +pass werror when checking for compiler options if +werror is enabled so spurious options do not get +enabled. Only the ones that are supported by given +compiler are accepted. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +--- + m4/compiler-warnings.m4 | 29 +++++++++++++++++++++++++---- + 1 file changed, 25 insertions(+), 4 deletions(-) + +diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4 +index de4a8b0..e4ba718 100644 +--- a/m4/compiler-warnings.m4 ++++ b/m4/compiler-warnings.m4 +@@ -2,10 +2,30 @@ AC_DEFUN([LIBQMI_COMPILER_WARNINGS], + [AC_ARG_ENABLE(more-warnings, + AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]), + set_more_warnings="$enableval",set_more_warnings=error) ++ ++# Clang throws a lot of warnings when it does not understand a flag. Disable ++# this warning for now so other warnings are visible. ++AC_MSG_CHECKING([if compiling with clang]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ ++#ifndef __clang__ ++ not clang ++#endif ++ ]])], ++ [CLANG=yes], ++ [CLANG=no] ++) ++AC_MSG_RESULT([$CLANG]) ++AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function]) ++CFLAGS="$CFLAGS $CLANG_FLAGS" ++LDFLAGS="$LDFLAGS $CLANG_FLAGS" ++ + AC_MSG_CHECKING(for more warnings) + if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + AC_MSG_RESULT(yes) + CFLAGS="-Wall -std=gnu89 $CFLAGS" ++ if test "x$set_more_warnings" = xerror; then ++ WERROR="-Werror" ++ fi + + for option in -Wmissing-declarations -Wmissing-prototypes \ + -Wdeclaration-after-statement -Wstrict-prototypes \ +@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + -Wmissing-include-dirs -Waggregate-return \ + -Wformat-security -Wtype-limits; do + SAVE_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $option" ++ CFLAGS="$CFLAGS $option $WERROR" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_TRY_COMPILE([], [], + has_option=yes, + has_option=no,) + if test $has_option = no; then + CFLAGS="$SAVE_CFLAGS" ++ else ++ CFLAGS="$SAVE_CFLAGS $option" + fi + AC_MSG_RESULT($has_option) + unset has_option + unset SAVE_CFLAGS + done ++ CFLAGS="$CFLAGS $WERROR" + unset option +- if test "x$set_more_warnings" = xerror; then +- CFLAGS="$CFLAGS -Werror" +- fi ++ unset WERROR + else + AC_MSG_RESULT(no) + fi +-- +1.9.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb new file mode 100644 index 000000000..9301cbd5e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol" +DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = "glib-2.0 libgudev libmbim glib-2.0-native" + +inherit autotools pkgconfig bash-completion + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \ + file://0001-Detect-clang.patch \ + " +SRC_URI[md5sum] = "797e365521df76b77b067e6317618b41" +SRC_URI[sha256sum] = "21428cd3749c56246565123f707fee51238651a22c60bdc85ebce97388626eb4" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch new file mode 100644 index 000000000..4d0979710 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch @@ -0,0 +1,30 @@ +From c9859a38a58996b8767a30e14febc03845f66f95 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 1 Jul 2017 13:10:53 -0700 +Subject: [PATCH] Define 64bit atomic helpers for ppc 32-bit + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/atomic64.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/atomic64.c b/src/atomic64.c +index f841b39b..35c7c9d8 100644 +--- a/src/atomic64.c ++++ b/src/atomic64.c +@@ -18,10 +18,10 @@ + #include <stdbool.h> + + /* +- * only need these on MIPS, since it lacks hardware 64-bit atomics, ++ * only need these on MIPS & PPC32, since it lacks hardware 64-bit atomics, + * unlike x86 and ARM. + */ +-#if defined(__mips__) || defined(__mipsel__) ++#if defined(__mips__) || defined(__mipsel__) || defined(__powerpc__) + + static void __spin_lock(volatile int *lock) { + while (__sync_lock_test_and_set(lock, 1)) +-- +2.13.2 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-implement-64bit-atomic-for-mips.patch b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-implement-64bit-atomic-for-mips.patch new file mode 100644 index 000000000..84e0772a7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-implement-64bit-atomic-for-mips.patch @@ -0,0 +1,263 @@ +From d7b6df5808e7bef5930b61a82e880699a9f9e208 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 29 Jun 2017 15:39:19 -0700 +Subject: [PATCH] implement 64bit atomic for mips + +GCC does not provide 64bit atomics for mips32 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/Makefile.am | 1 + + src/atomic64.c | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 229 insertions(+) + create mode 100644 src/atomic64.c + +diff --git a/src/Makefile.am b/src/Makefile.am +index 99aaace0..cbbbbee9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -27,6 +27,7 @@ libtorrent_la_LIBADD = \ + utils/libsub_utils.la + + libtorrent_la_SOURCES = \ ++ atomic64.c \ + globals.cc \ + globals.h \ + manager.cc \ +diff --git a/src/atomic64.c b/src/atomic64.c +new file mode 100644 +index 00000000..f841b39b +--- /dev/null ++++ b/src/atomic64.c +@@ -0,0 +1,228 @@ ++/*===----- atomic64.c - Support functions for 64-bit atomic operations.-----=== ++ * ++ * The LLVM Compiler Infrastructure ++ * ++ * This file is dual licensed under the MIT and the University of Illinois Open ++ * Source Licenses. See LICENSE.TXT for details. ++ * ++ *===-----------------------------------------------------------------------=== ++ * ++ * atomic64.c defines a set of functions for performing atomic accesses on ++ * 64-bit memory locations. It also implements spinlock synchronization ++ * operations. ++ * ++ *===-----------------------------------------------------------------------=== ++ */ ++ ++#include <stdint.h> ++#include <stdbool.h> ++ ++/* ++ * only need these on MIPS, since it lacks hardware 64-bit atomics, ++ * unlike x86 and ARM. ++ */ ++#if defined(__mips__) || defined(__mipsel__) ++ ++static void __spin_lock(volatile int *lock) { ++ while (__sync_lock_test_and_set(lock, 1)) ++ while (*lock) {} ++} ++ ++static void __spin_unlock(volatile int *lock) { ++ __sync_lock_release(lock); ++} ++ ++/* ++ * Make sure the lock is on its own cache line to prevent false sharing. ++ * Put it inside a struct that is aligned and padded to the typical MIPS ++ * cacheline which is 32 bytes. ++ */ ++static struct { ++ int lock; ++ char pad[32 - sizeof(int)]; ++} __attribute__((aligned (32))) lock = { 0 }; ++ ++ ++uint64_t __sync_fetch_and_add_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = ret + val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_fetch_and_sub_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = ret - val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_fetch_and_and_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = ret & val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_fetch_and_or_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = ret | val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_fetch_and_xor_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = ret ^ val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_add_and_fetch_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr + val; ++ *ptr = ret; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_sub_and_fetch_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr - val; ++ *ptr = ret; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_and_and_fetch_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr & val; ++ *ptr = ret; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_or_and_fetch_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr | val; ++ *ptr = ret; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_xor_and_fetch_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr ^ val; ++ *ptr = ret; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++bool __sync_bool_compare_and_swap_8(volatile uint64_t *ptr, ++ uint64_t oldval, uint64_t newval) { ++ bool ret = false; ++ ++ __spin_lock(&lock.lock); ++ ++ if (*ptr == oldval) { ++ *ptr = newval; ++ ret = true; ++ } ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_val_compare_and_swap_8(volatile uint64_t *ptr, ++ uint64_t oldval, uint64_t newval) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ if (ret == oldval) ++ *ptr = newval; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++uint64_t __sync_lock_test_and_set_8(volatile uint64_t *ptr, uint64_t val) { ++ uint64_t ret; ++ ++ __spin_lock(&lock.lock); ++ ++ ret = *ptr; ++ *ptr = val; ++ ++ __spin_unlock(&lock.lock); ++ ++ return ret; ++} ++ ++void __sync_lock_release_8(volatile uint64_t *ptr) { ++ __spin_lock(&lock.lock); ++ ++ *ptr = 0; ++ ++ __spin_unlock(&lock.lock); ++} ++ ++#endif +-- +2.13.2 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch new file mode 100644 index 000000000..79d4f29fa --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch @@ -0,0 +1,94 @@ +Using AC_RUN_IFELSE prevent people from configuring package for +cross-compiling. Don't run code while configuring package. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +Index: libtorrent-0.13.3/scripts/checks.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2013-02-10 15:28:37.414445524 +0200 +@@ -95,40 +95,6 @@ + + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <fcntl.h> +- #include <stdlib.h> +- #include <unistd.h> +- #include <sys/event.h> +- #include <sys/time.h> +- int main() { +- struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@; +- struct timespec ts = { 0, 0 }; +- int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n; +- char buffer@<:@9001@:>@; +- if (pipe(pfd) == -1) return 1; +- if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2; +- while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer)); +- if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3; +- if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4; +- EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL); +- EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL); +- if ((kfd = kqueue()) == -1) return 5; +- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6; +- if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7; +- if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8; +- read(pfd@<:@0@:>@, buffer, sizeof(buffer)); +- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(yes) +- ], [ +- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.) +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_WITH_KQUEUE], [ +Index: libtorrent-0.13.3/scripts/common.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/common.m4 2013-02-10 15:27:55.874446741 +0200 +@@ -222,38 +222,10 @@ + + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <execinfo.h> +- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} +- ])], +- [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h) +- ], [ +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <inttypes.h> +- int main() { +- char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +- int i; +- for (i = 1; i < 4; ++i) +- if (*(uint32_t*)(buf + i) == 0) return -1; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(none needed) +- ], [ +- AC_DEFINE(USE_ALIGNED, 1, Require byte alignment) +- AC_MSG_RESULT(required) +- ]) + ]) + + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb new file mode 100644 index 000000000..92e65289a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "libTorrent is a BitTorrent library written in C++ for *nix, \ +with a focus on high performance and good code." +HOMEPAGE = "http://libtorrent.rakshasa.no/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" + +DEPENDS = "zlib libsigc++-2.0 openssl cppunit" + +SRC_URI = "git://github.com/rakshasa/libtorrent \ + file://don-t-run-code-while-configuring-package.patch \ + file://0001-implement-64bit-atomic-for-mips.patch \ + file://0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch \ + " +SRCREV = "c167c5a9e0bcf0df23ae5efd91396aae0e37eb87" + +PV = "0.13.6+git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--with-zlib=${STAGING_EXECPREFIXDIR}" + +do_configure_prepend() { + (cd ${S}; ./autogen.sh; cd -) +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb new file mode 100644 index 000000000..ca4685ab3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "A multi-platform support library with a focus on asynchronous I/O" +HOMEPAGE = "https://github.com/libuv/libuv" +BUGTRACKER = "https://github.com/libuv/libuv/issues" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bb5ea0d651f4c3519327171906045775" + +S = "${WORKDIR}/git" +SRCREV = "7452ef4e06a4f99ee26b694c65476401534f2725" +BRANCH = "v1.x" +SRC_URI = "git://github.com/libuv/libuv.git;protocol=https;branch=${BRANCH};" + +inherit autotools + +do_configure() { + ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh" + oe_runconf +} + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb new file mode 100644 index 000000000..100f3a354 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "Canonical libwebsockets.org websocket library" +HOMEPAGE = "https://libwebsockets.org/" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3393a657830d4a118c5a6ed35ba53d0" + +DEPENDS = "zlib" + +S = "${WORKDIR}/git" +SRCREV = "73557509bd15f95a1ad081a6f4fab48ff7743215" +SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;" + +inherit cmake pkgconfig + +PACKAGECONFIG ?= "libuv client server http2 ssl" +PACKAGECONFIG[client] = "-DLWS_WITHOUT_CLIENT=OFF,-DLWS_WITHOUT_CLIENT=ON," +PACKAGECONFIG[http2] = "-DLWS_WITH_HTTP2=ON,-DLWS_WITH_HTTP2=OFF," +PACKAGECONFIG[ipv6] = "-DLWS_IPV6=ON,-DLWS_IPV6=OFF," +PACKAGECONFIG[libev] = "-DLWS_WITH_LIBEV=ON,-DLWS_WITH_LIBEV=OFF,libev" +PACKAGECONFIG[libuv] = "-DLWS_WITH_LIBUV=ON,-DLWS_WITH_LIBUV=OFF,libuv" +PACKAGECONFIG[server] = "-DLWS_WITHOUT_SERVER=OFF,-DLWS_WITHOUT_SERVER=ON," +PACKAGECONFIG[ssl] = "-DLWS_WITH_SSL=ON,-DLWS_WITH_SSL=OFF,openssl" +PACKAGECONFIG[testapps] = "-DLWS_WITHOUT_TESTAPPS=OFF,-DLWS_WITHOUT_TESTAPPS=ON," + +PACKAGES =+ "${PN}-testapps" + +FILES_${PN}-dev += "${libdir}/cmake" +FILES_${PN}-testapps += "${datadir}/libwebsockets-test-server/*" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch new file mode 100644 index 000000000..96163f654 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch @@ -0,0 +1,26 @@ +From b36cafdbcbe2193f5b669e703c608e19e23f80a3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 15 Jul 2017 11:16:42 -0700 +Subject: [PATCH 3/4] include missing time.h for time_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + util.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util.h b/util.h +index e912f19..3c634c1 100644 +--- a/util.h ++++ b/util.h +@@ -22,7 +22,7 @@ + + #include "ddt.h" + #include "ether.h" +- ++#include <time.h> + /** + * Table of human readable strings, one for each port state. + */ +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch new file mode 100644 index 000000000..e69927514 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch @@ -0,0 +1,36 @@ +From 3cd28aa771934d9165ff0d7e19932cde65de3e52 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 15 Jul 2017 11:16:57 -0700 +Subject: [PATCH 4/4] Adjust include header sequence to avoid duplicate + definitions on musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + raw.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/raw.c b/raw.c +index f51c829..494ea7f 100644 +--- a/raw.c ++++ b/raw.c +@@ -18,8 +18,6 @@ + */ + #include <errno.h> + #include <fcntl.h> +-#include <linux/filter.h> +-#include <linux/if_ether.h> + #include <net/ethernet.h> + #include <net/if.h> + #include <netinet/in.h> +@@ -32,6 +30,8 @@ + #include <sys/types.h> + #include <unistd.h> + ++#include <linux/filter.h> ++#include <linux/if_ether.h> + #include <linux/errqueue.h> + #include <linux/net_tstamp.h> + #include <linux/sockios.h> +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch new file mode 100644 index 000000000..b1d96ae5a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch @@ -0,0 +1,37 @@ +From af485c638c61fa883212ea424e676fbf90bee594 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador <otavio@ossystems.com.br> +Date: Tue, 1 Jul 2014 17:37:31 -0300 +Subject: [PATCH] build: Allow CC and prefix to be overriden + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +--- + makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/makefile b/makefile +index 22e7d0d..809cc8f 100644 +--- a/makefile ++++ b/makefile +@@ -18,7 +18,7 @@ + KBUILD_OUTPUT = + + DEBUG = +-CC = $(CROSS_COMPILE)gcc ++CC ?= $(CROSS_COMPILE)gcc + VER = -DVER=$(version) + CFLAGS = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS) + LDLIBS = -lm -lrt $(EXTRA_LDFLAGS) +@@ -35,7 +35,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh) + version := $(shell $(srcdir)/version.sh $(srcdir)) + VPATH = $(srcdir) + +-prefix = /usr/local ++prefix ?= /usr/local + sbindir = $(prefix)/sbin + mandir = $(prefix)/man + man8dir = $(mandir)/man8 +-- +1.7.10.4 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch new file mode 100644 index 000000000..02dbb2346 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch @@ -0,0 +1,29 @@ +From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001 +From: Marcel Ziswiler <marcel.ziswiler@toradex.com> +Date: Fri, 23 Dec 2016 18:12:29 +0100 +Subject: [PATCH] linuxptp: no incdefs using host headers + +Avoid using host headers via incdefs.sh shell script. + +Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> +--- + + makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makefile b/makefile +index 8cdbd15..85174b8 100644 +--- a/makefile ++++ b/makefile +@@ -33,7 +33,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o pmc.o pmc_common.o \ + SRC = $(OBJECTS:.o=.c) + DEPEND = $(OBJECTS:.o=.d) + srcdir := $(dir $(lastword $(MAKEFILE_LIST))) +-incdefs := $(shell $(srcdir)/incdefs.sh) ++#incdefs := $(shell $(srcdir)/incdefs.sh) + version := $(shell $(srcdir)/version.sh $(srcdir)) + VPATH = $(srcdir) + +-- +2.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb new file mode 100644 index 000000000..c7b8b2933 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \ + file://build-Allow-CC-and-prefix-to-be-overriden.patch \ + file://no-incdefs-using-host-headers.patch \ + file://0003-include-missing-time.h-for-time_t.patch \ + file://0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch \ + " + +SRC_URI[md5sum] = "5688cdfe57932273e1dbf35b3b97b9a0" +SRC_URI[sha256sum] = "fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165" + +EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \ + EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'" + +do_install () { + install -d ${D}/${bindir} + install -p ${S}/ptp4l ${D}/${bindir} + install -p ${S}/pmc ${D}/${bindir} + install -p ${S}/phc2sys ${D}/${bindir} + install -p ${S}/hwstamp_ctl ${D}/${bindir} +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles new file mode 100644 index 000000000..0b80e2e47 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles @@ -0,0 +1 @@ +d /run/lirc 0755 root root - diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf new file mode 100644 index 000000000..d8ddedd8f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf @@ -0,0 +1,24 @@ +# These are the default options to lircd, if installed as +# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8) +# manpages for info on the different options. + +[lircd] +nodaemon = False +permission = 666 +driver = default +device = /dev/lirc0 +output = /var/run/lirc/lircd +pidfile = /var/run/lirc/lircd.pid +plugindir = /usr/lib/lirc/plugins +allow-simulate = No +repeat-max = 600 +#listen = [address:]port +#connect = host[:port] +#debug = 5 +#uinput = ... +#release = ... +#logfile = ... + +[lircmd] +uinput = False +nodeamon = False diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf new file mode 100644 index 000000000..29b03c72a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf @@ -0,0 +1,315 @@ +# contributed by angelo castello +# +# note: this config file has been deduced starting from the +# raw codes provided to run mode2 utility. +# +# brand: futarque + +begin remote + name futarque + bits 8 + flags SPACE_ENC|CONST_LENGTH + eps 30 + aeps 100 + + header 8048 3898 + one 555 1436 + zero 555 439 + gap 113123 + ptrail 555 + pre_data_bits 8 + pre_data 0x54 + pre 570 3890 + + begin codes + MUTE 0x70 + EXIT 0xA8 + POWER 0xF0 + CHANNEL_UP 0x50 + CHANNEL_DOWN 0xD0 + VOLUME_UP 0x30 + VOLUME_DOWN 0xB0 + OK 0x98 + FAVORITES 0x04 + TEXT 0x68 + EPG 0xC8 + BACK 0x48 + MENU 0x88 + 1 0x00 + 2 0x80 + 3 0x40 + 4 0xC0 + 5 0x20 + 6 0xA0 + 7 0x60 + 8 0xE0 + 9 0x10 + 0 0x90 + PAUSE 0x84 + INFO 0x38 + RED 0xE8 + GREEN 0x08 + YELLOW 0x28 + BLUE 0x78 + UP 0xD8 + DOWN 0xB8 + REWIND 0x44 + FASTFORWARD 0x24 + PLAYPAUSE 0xC4 + STOP 0x64 + RECORD 0xA4 + AUDIO 0xE4 + TAPE 0x14 + DVD 0x94 + CAPITAL_A 0xF8 + CAPITAL_B 0x54 + end codes + +end remote + +# brand: STM PVR-1 + +begin remote + name stm_pvr_1 + bits 16 + flags SPACE_ENC|CONST_LENGTH + eps 30 + aeps 150 + + header 9000 4500 + one 572 1700 + zero 572 572 + ptrail 572 + repeat 9000 2200 + pre_data_bits 16 + pre_data 0xFE + gap 100000 + + begin codes + POWER 0x00ff + FAVORITES 0x7887 + MUTE 0x28d7 + 0 0x708F + 1 0xc03f + 2 0x40bf + 3 0x807f + 4 0xe01f + 5 0x609f + 6 0xa05f + 7 0xd02f + 8 0x50af + 9 0x906f + INFO 0x38c7 + SUBTITLE 0xe817 + MENU 0x9867 + EXIT 0x20df + EPG 0xa857 + BACK 0x48b7 + CURSOR_UP 0x58a7 + CURSOR_DOWN 0xd827 + CURSOR_LEFT 0x8877 + CURSOR_RIGHT 0xb04f + OK 0x10ef + VOLUME_UP 0x22dd + VOLUME_DOWN 0x8a75 + CHANNEL_UP 0x12ed + CHANNEL_DOWN 0x4ab5 + TEXT 0xf00f + RADIO 0x926d + ZOOM 0x6897 + AUDIO 0x08f7 + RED 0x42bd + GREEN 0xa25d + YELLOW 0x827d + BLUE 0x02fd + CUSTOM0 0x52ad + CUSTOM1 0x30cf + PLAY 0x629d + PAUSE 0xb24d + PREVIOUS 0xc837 + NEXT 0xf807 + REWIND 0x32cd + FASTFORWARD 0x0af5 + AUX 0x7a85 + CUSTOM3 0xb847 + PIP 0x3ac5 + SWAP 0xba45 + end codes + +end remote + +# brand: STM DTV-2 + +begin remote + + name stm_dtv_2 + flags SHIFT_ENC|CONST_LENGTH + bits 13 + aeps 150 + + one 850 850 + zero 850 850 + plead 850 + gap 67800 + toggle_bit 2 + + begin codes + POWER 0x100C + FAVORITES 0x1015 + AUX 0x1038 + 1 0x1001 + 2 0x1002 + 3 0x1003 + 4 0x1004 + 5 0x1005 + 6 0x1006 + 7 0x1007 + 8 0x1008 + 9 0x1009 + PERIOD 0x1024 + 0 0x103E + BACK 0x1023 + MENU 0x1016 + INFO 0x100F + EPG 0x101E + EXIT 0x1018 + CURSOR_UP 0x1017 + CURSOR_DOWN 0x101D + CURSOR_LEFT 0x1019 + CURSOR_RIGHT 0x101B + OK 0x101A + VOLUME_UP 0x1010 + VOLUME_DOWN 0x1011 + CHANNEL_UP 0x1020 + CHANNEL_DOWN 0x1021 + TEXT 0x102E + SUBTITLE 0x103C + FREEZE 0x1014 + ZOOM 0x102B + RED 0x1028 + GREEN 0x102A + YELLOW 0x102F + BLUE 0x1030 + CUSTOM10 0x1022 + INTERNET 0x1027 + CUSTOM11 0x102C + AUDIO 0x1025 + RECORD 0x102D + PLAYPAUSE 0x1029 + STOP 0x1026 + CUSTOM1 0x101C + MUTE 0x100d + CUSTOM12 0x101F + PIP 0x100B + SWAP 0x100E + end codes + +end remote + +# brand: Comcast +# model no. of remote control: XR2 +# 32 bits for the pre-date (should be value 0x170F443E) +# width between pre_bits and data: 12900 microseconds +# +# 24 bits for the data (key code) +# To get key REPEAT, XOR 0x088 with KEY value +# There are 8 post bits (both should be zero) +# +# Gap between keys: 8100 microseconds +begin remote + + name Xfinity-XR2 + bits 24 + flags XMP + eps 20 + aeps 300 + + one 0 137 + zero 250 710 + ptrail 250 + pre_data_bits 32 + pre_data 0x170F443E + post_data_bits 8 + post_data 0x0 + pre 250 12921 + gap 81698 + toggle_bit_mask 0x0 + + begin codes + 1 0x1E0001 + 1_repeat 0x168001 + 2 0x1D0002 + 2_repeat 0x158002 + 3 0x1C0003 + 3_repeat 0x148003 + 4 0x1B0004 + 4_repeat 0x138004 + 5 0x1A0005 + 5_repeat 0x128005 + 6 0x190006 + 6_repeat 0x118006 + 7 0x180007 + 7_repeat 0x108007 + 8 0x170008 + 8_repeat 0x1F8008 + 9 0x160009 + 9_repeat 0x1E8009 + 0 0x1F0000 + 0_repeat 0x178000 + OK 0x180025 + OK_repeat 0x108025 + POWER 0x10000F + POWER_repeat 0x18800F + UP 0x1C0021 + UP_repeat 0x148021 + DOWN 0x1B0022 + DOWN_repeat 0x138022 + LEFT 0x1A0023 + LEFT_repeat 0x128023 + RIGHT 0x190024 + RIGHT_repeat 0x118024 + REWIND 0x190033 + REWIND_repeat 0x118033 + PLAY 0x1C0030 + PLAY_repeat 0x148030 + FASTFORWARD 0x180034 + FASTFORWARD_repeat 0x108034 + RECORD 0x170035 + RECORD_repeat 0x1F8035 + REPLAY 0x170053 + REPLAY_repeat 0x1F8053 + A 0x190060 + A_repeat 0x118060 + B 0x180061 + B_repeat 0x108061 + C 0x170062 + C_repeat 0x1F8062 + D 0x160063 + D_repeat 0x1E8063 + PAGE_UP 0x150028 + PAGE_UP_repeat 0x1D8028 + PAGE_DOWN 0x140029 + PAGE_DOWN_repeat 0x1C8029 + GUIDE 0x160027 + GUIDE_repeat 0x1E8027 + MENU 0x1D0020 + MENU_repeat 0x158020 + EXIT 0x13002A + EXIT_repeat 0x1B802A + INFO 0x170026 + INFO_repeat 0x1F8026 + LAST 0x190051 + LAST_repeat 0x118051 + VOLUME_UP 0x15000A + VOLUME_UP_repeat 0x1D800A + CHANNEL_UP 0x12000D + CHANNEL_UP_repeat 0x1A800D + VOLUME_DOWN 0x14000B + VOLUME_DOWN_repeat 0x1C800B + CHANNEL_DOWN 0x11000E + CHANNEL_DOWN_repeat 0x19800E + MUTE 0x13000C + MUTE_repeat 0x1B800D + end codes + +end remote diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.init b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.init new file mode 100644 index 000000000..8b124af6f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.init @@ -0,0 +1,40 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircd and type +# > update-rc.d lircd defaults 20 +# + + +test -f /usr/sbin/lircd || exit 0 +test -f /etc/lircd.conf || exit 0 + +case "$1" in + start) + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 + echo "." + ;; + stop) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + echo "." + ;; + reload|force-reload) + start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd + ;; + restart) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + sleep 1 + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.service b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.service new file mode 100644 index 000000000..c8661368b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.service @@ -0,0 +1,20 @@ +[Unit] +Description=LIRC Infrared Signal Decoder +After=network.target + +[Service] +Type=forking +EnvironmentFile=/etc/lirc/lircd.conf +PIDFile=/run/lirc/lircd.pid +ExecStartPre=/bin/mkdir -p /run/lirc +ExecStartPre=/bin/rm -f /dev/lircd +ExecStartPre=/bin/rm -f /run/lirc/lircd +ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd + +ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid --device=/dev/lirc0 + +ExecStopPost=/bin/rm -f /dev/lircd +ExecStopPost=/bin/rm -fR /run/lirc + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init new file mode 100644 index 000000000..3a8c1a306 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init @@ -0,0 +1,37 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircexecd and type +# > update-rc.d lircexecd defaults 20 +# It must be started after lircd (and it does alphabetically :-) +# irexec reads /etc/lircrc by default + + +test -f /usr/bin/irexec || exit 0 +test -f /etc/lircrc || exit 0 + +case "$1" in + start) + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + stop) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + echo "." + ;; + restart|force-restart) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + sleep 1 + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}" + exit 1 +esac + +exit 0 diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file mode 100644 index 000000000..4feea8034 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch @@ -0,0 +1,101 @@ +Index: lirc-0.9.4d/daemons/lircrcd.cpp +=================================================================== +--- lirc-0.9.4d.orig/daemons/lircrcd.cpp ++++ lirc-0.9.4d/daemons/lircrcd.cpp +@@ -29,10 +29,12 @@ + #include <sys/un.h> + #include <sys/stat.h> + #include <sys/types.h> ++#include <poll.h> + #include <syslog.h> + + #include "lirc_client.h" + #include "lirc/lirc_log.h" ++#include "lirc/curl_poll.h" + + #define MAX_CLIENTS 100 + #define WHITE_SPACE " \t" +Index: lirc-0.9.4d/lib/curl_poll.c +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.c ++++ lirc-0.9.4d/lib/curl_poll.c +@@ -36,6 +36,7 @@ + #include <stdlib.h> + #include <sys/time.h> + #include <sys/types.h> ++#include <sys/poll.h> + + #include "lirc_log.h" + #include "curl_poll.h" +@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L + + #ifdef HAVE_POLL_FINE + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + return poll(ufds, nfds, timeout_ms); + } +@@ -112,7 +113,7 @@ static int verify_sock(int s) + } + + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + struct timeval pending_tv; + struct timeval* ptimeout; +Index: lirc-0.9.4d/lib/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.h ++++ lirc-0.9.4d/lib/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIB_CURL_POLL_H ++#define _LIB_CURL_POLL_H + /*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include <sys/poll.h> +-#else + #include <poll.h> +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + } +Index: lirc-0.9.4d/lib/lirc/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h ++++ lirc-0.9.4d/lib/lirc/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIRC_CURL_POLL_H ++#define _LIRC_CURL_POLL_H + /*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include <sys/poll.h> +-#else + #include <poll.h> +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + } diff --git a/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb new file mode 100644 index 000000000..b13163deb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb @@ -0,0 +1,87 @@ +DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls." +DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools." +DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals." +DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes." +DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2." +HOMEPAGE = "http://www.lirc.org" +SECTION = "console/network" +LICENSE = "GPLv2" +DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19" + + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ + file://pollfd.patch \ + file://lircd.service \ + file://lircd.init \ + file://lircexec.init \ + file://lircd.conf \ + file://lirc_options.conf \ + file://lirc.tmpfiles \ +" +SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" +SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab" + +SYSTEMD_PACKAGES = "lirc lirc-exec" +SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service" +SYSTEMD_SERVICE_${PN}-exec = "irexec.service" +SYSTEMD_AUTO_ENABLE_lirc = "enable" +SYSTEMD_AUTO_ENABLE_lirc-exec = "enable" + +inherit autotools pkgconfig systemd python3native + +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd" +PACKAGECONFIG[x11] = "--with-x,--with-x=no,libx11," + +PACKAGECONFIG ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \ +" +CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" + +#EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' +do_install_append() { + install -m 0755 -d ${D}${sysconfdir} + install -m 0755 -d ${D}${sysconfdir}/lirc + install -m 0755 -d ${D}${systemd_unitdir}/system + install -m 0755 -d ${D}${libdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/ + install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf + rm -rf ${D}${libdir}/lirc/plugins/*.la + rmdir ${D}/var/run/lirc ${D}/var/run + chown -R root:root ${D}${datadir}/lirc/contrib +} + +PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python" + +RDEPENDS_${PN} = "bash" +RDEPENDS_${PN}-exec = "${PN}" +RDEPENDS_${PN}-python = "python" + +RRECOMMENDS_lirc = "${PN}-exec ${PN}-plugins" + +FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs" +FILES_${PN}-contrib = "${datadir}/lirc/contrib" +FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service" +FILES_${PN} += "${systemd_unitdir}/system/lircexec.init" +FILES_${PN} += "${systemd_unitdir}/system/lircd.service" +FILES_${PN} += "${systemd_unitdir}/system/lircd.socket" +FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf" +FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug" +FILES_${PN}-python += "${libdir}/python*/site-packages" + + +INITSCRIPT_PACKAGES = "lirc lirc-exec" +INITSCRIPT_NAME_lirc-exec = "lircexec" +INITSCRIPT_PARAMS_lirc-exec = "defaults 21" + +# this is for distributions that don't use udev +pkg_postinst_${PN}_append() { + if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi +} + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/04-use-pkg-config-for-gnutls.patch b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/04-use-pkg-config-for-gnutls.patch new file mode 100644 index 000000000..20f388e89 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/04-use-pkg-config-for-gnutls.patch @@ -0,0 +1,23 @@ +Description: use pkg-config to detect gnutls +Debian: http://bugs.debian.org/529835 +Origin: http://groups.google.com/group/loudmouth-dev/browse_thread/thread/3f78255837048daf# + +--- a/configure.ac.orig 2009-08-16 20:29:36.000000000 +0200 ++++ b/configure.ac 2009-08-16 20:30:43.000000000 +0200 +@@ -146,10 +146,12 @@ AC_ARG_WITH(openssl-libs, + enable_ssl=no + if test "x$ac_ssl" = "xgnutls"; then + dnl Look for GnuTLS +- AM_PATH_LM_LIBGNUTLS($GNUTLS_REQUIRED, have_libgnutls=yes, have_libgnutls=no) +- if test "x$have_libgnutls" = "xyes"; then +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" ++ PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED, have_gnutls=yes, have_gnutls=no) ++ if test "x$have_gnutls" = "xyes"; then ++ AC_SUBST(ASYNCNS_CFLAGS) ++ AC_SUBST(ASYNCNS_LIBS) ++ CFLAGS="$CFLAGS $GNUTLS_CFLAGS" ++ LIBS="$LIBS $GNUTLS_LIBS" + AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.]) + enable_ssl=GnuTLS + else diff --git a/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/glib-2.32.patch b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/glib-2.32.patch new file mode 100644 index 000000000..b6c9422e8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/glib-2.32.patch @@ -0,0 +1,10 @@ +--- loudmouth-1.4.3.orig/loudmouth/lm-error.c 2008-10-29 21:48:15.000000000 +0100 ++++ loudmouth-1.4.3/loudmouth/lm-error.c 2012-05-06 08:27:07.455739440 +0200 +@@ -19,7 +19,6 @@ + */ + + #include <config.h> +-#include <glib/gerror.h> + #include "lm-error.h" + + /** diff --git a/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth_1.4.3.bb b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth_1.4.3.bb new file mode 100644 index 000000000..4f1430b9e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth_1.4.3.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Loudmouth is a lightweight and easy-to-use C library for programming with the Jabber protocol." +HOMEPAGE = "http://www.loudmouth-project.org/" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=c4f38aef94828f6b280e00d1173be689" + +DEPENDS = "glib-2.0 libcheck openssl libidn" + +inherit gnomebase gtk-doc + +PR = "r2" + +SRC_URI += "file://04-use-pkg-config-for-gnutls.patch \ + file://glib-2.32.patch" + +SRC_URI[archive.md5sum] = "55339ca42494690c3942ee1465a96937" +SRC_URI[archive.sha256sum] = "95a93f5d009b71ea8193d994aa11f311bc330a3efe1b7cd74dc48f11c7f929e3" +GNOME_COMPRESS_TYPE="bz2" + +EXTRA_OECONF = "--with-ssl=openssl" + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/enum-conversion.patch b/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/enum-conversion.patch new file mode 100644 index 000000000..a3fb0f3eb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/enum-conversion.patch @@ -0,0 +1,21 @@ +Fixes errors found bt Clang + +| ../../ModemManager-1.6.4/src/mm-bearer-qmi.c:774:50: error: implicit conversion from enumeration type 'MMBearerStatus' to different enumeration type 'MMBearerConnectionStatus' [-Werror,-Wenum-conversion] +| MMBearerConnectionStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self)); +| ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| 1 error generated. + + +Index: ModemManager-1.6.4/src/mm-bearer-qmi.c +=================================================================== +--- ModemManager-1.6.4.orig/src/mm-bearer-qmi.c ++++ ModemManager-1.6.4/src/mm-bearer-qmi.c +@@ -771,7 +771,7 @@ packet_service_status_indication_cb (Qmi + &connection_status, + NULL, + NULL)) { +- MMBearerConnectionStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self)); ++ MMBearerConnectionStatus bearer_status = (MMBearerConnectionStatus)mm_base_bearer_get_status (MM_BASE_BEARER (self)); + + if (connection_status == QMI_WDS_CONNECTION_STATUS_DISCONNECTED && + bearer_status != MM_BEARER_CONNECTION_STATUS_DISCONNECTED && diff --git a/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.6.4.bb b/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.6.4.bb new file mode 100644 index 000000000..e60cd4b74 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.6.4.bb @@ -0,0 +1,51 @@ +SUMMARY = "ModemManager is a daemon controlling broadband devices/connections" +DESCRIPTION = "ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ModemManager/" +LICENSE = "GPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +inherit gnomebase gettext systemd vala gobject-introspection bash-completion + +DEPENDS = "glib-2.0 libgudev dbus-glib intltool-native" + +SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \ + file://enum-conversion.patch \ +" +SRC_URI[md5sum] = "06488186c7dd53f8104183b86f7a1568" +SRC_URI[sha256sum] = "cdd5b4cb1e4d7643643a28ccbfc4bb354bfa9cb89a77ea160ebdf7926171c668" + +S = "${WORKDIR}/ModemManager-${PV}" + +PACKAGECONFIG ??= "mbim qmi polkit \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,," +PACKAGECONFIG[polkit] = "--with-polkit=yes,--with-polkit=no,polkit" +# Support WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol. +PACKAGECONFIG[mbim] = "--with-mbim,--enable-mbim=no,libmbim" +# Support WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. +PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" + +FILES_${PN} += " \ + ${datadir}/icons \ + ${datadir}/polkit-1 \ + ${datadir}/dbus-1 \ + ${libdir}/ModemManager \ + ${systemd_unitdir}/system \ +" + +FILES_${PN}-dev += " \ + ${libdir}/ModemManager/*.la \ +" + +FILES_${PN}-staticdev += " \ + ${libdir}/ModemManager/*.a \ +" + +FILES_${PN}-dbg += "${libdir}/ModemManager/.debug" + +SYSTEMD_SERVICE_${PN} = "ModemManager.service" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb new file mode 100644 index 000000000..9fc8435ee --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb @@ -0,0 +1,46 @@ +# NOTE: mosh-server requires a UTF-8 locale, but there's no way to add +# an explicit dependency for this so you need to ensure this is in your +# image yourself when you install mosh-server. + +SUMMARY = "Remote shell supporting roaming and high-latency connections" +DESCRIPTION = "Remote terminal application that allows roaming, supports \ +intermittent connectivity, and provides intelligent local echo and line \ +editing of user keystrokes. Mosh is a replacement for SSH. It's more \ +robust and responsive, especially over Wi-Fi, cellular, and \ +long-distance links." +HOMEPAGE = "http://mosh.mit.edu" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter" + +SRC_URI = "http://mosh.mit.edu/mosh-${PV}.tar.gz" +SRC_URI[md5sum] = "d961276995936953bf2d5a794068b076" +SRC_URI[sha256sum] = "320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376" + +inherit autotools pkgconfig + +PACKAGE_BEFORE_PN += "${PN}-server" +FILES_${PN}-server = "${bindir}/mosh-server" + +NEEDED_PERL_MODULES = "\ + perl-module-socket \ + perl-module-getopt-long \ + perl-module-errno \ + perl-module-io-socket-inet \ + perl-module-posix \ +" + +# mosh uses SSH to authenticate and the client uses OpenSSH-specific features +RDEPENDS_${PN} += "openssh-ssh ${NEEDED_PERL_MODULES}" +# The server seemed not to work with dropbear either +RDEPENDS_${PN}-server += "openssh-sshd ${NEEDED_PERL_MODULES}" + +# Fails to build with thumb-1 (qemuarm) +#| {standard input}: Assembler messages: +#| {standard input}:2100: Error: instruction not supported in Thumb16 mode -- `adds r4,r4,r4' +#| {standard input}:2101: Error: instruction not supported in Thumb16 mode -- `adcs r5,r5,r5' +#| {standard input}:2102: Error: instruction not supported in Thumb16 mode -- `adcs r6,r6,r6' +#| {standard input}:2103: Error: instruction not supported in Thumb16 mode -- `adcs r7,r7,r7' +#| {standard input}:2104: Error: selected processor does not support Thumb mode `it cs' +ARM_INSTRUCTION_SET = "arm" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch new file mode 100644 index 000000000..a5aa277a0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch @@ -0,0 +1,35 @@ +From 0be38301249d797ec1f59071cc868ceda6d4720a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> +Date: Tue, 12 Apr 2016 12:50:32 +0100 +Subject: [PATCH 1/2] config.mk: allow prefix / mandir / localedir from + environment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We want to control them using OE environment variables. + +Upstream-Status: Inappropriate [embedded-specific] +Signed-off-by: André Draszik <andre.draszik@jci.com> +--- + config.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.mk b/config.mk +index 71f17e5..81d9702 100644 +--- a/config.mk ++++ b/config.mk +@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes) + endif + + INSTALL?=install +-prefix=/usr/local +-mandir=${prefix}/share/man +-localedir=${prefix}/share/locale ++prefix?=/usr/local ++mandir?=${prefix}/share/man ++localedir?=${prefix}/share/locale + STRIP?=strip +-- +2.15.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch new file mode 100644 index 000000000..c89dfe6be --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch @@ -0,0 +1,975 @@ +From d9aeef8d95a325942cc92f4d72415771d75d904c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> +Date: Tue, 12 Apr 2016 13:05:10 +0100 +Subject: [PATCH 2/2] uthash: remove in-tree version +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We don't need it as we want to use the version provided by +meta-oe instead. + +Upstream-Status: Inappropriate [embedded-specific] +Signed-off-by: André Draszik <andre.draszik@jci.com> +--- + src/uthash.h | 948 ----------------------------------------------------------- + 1 file changed, 948 deletions(-) + delete mode 100644 src/uthash.h + +diff --git a/src/uthash.h b/src/uthash.h +deleted file mode 100644 +index 915a825..0000000 +--- a/src/uthash.h ++++ /dev/null +@@ -1,948 +0,0 @@ +-/* +-Copyright (c) 2003-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ +-All rights reserved. +- +-Redistribution and use in source and binary forms, with or without +-modification, are permitted provided that the following conditions are met: +- +- * Redistributions of source code must retain the above copyright +- notice, this list of conditions and the following disclaimer. +- +-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-*/ +- +-#ifndef UTHASH_H +-#define UTHASH_H +- +-#include <string.h> /* memcmp,strlen */ +-#include <stddef.h> /* ptrdiff_t */ +-#include <stdlib.h> /* exit() */ +- +-/* These macros use decltype or the earlier __typeof GNU extension. +- As decltype is only available in newer compilers (VS2010 or gcc 4.3+ +- when compiling c++ source) this code uses whatever method is needed +- or, for VS2008 where neither is available, uses casting workarounds. */ +-#ifdef _MSC_VER /* MS compiler */ +-#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +-#define DECLTYPE(x) (decltype(x)) +-#else /* VS2008 or older (or VS2010 in C mode) */ +-#define NO_DECLTYPE +-#define DECLTYPE(x) +-#endif +-#else /* GNU, Sun and other compilers */ +-#define DECLTYPE(x) (__typeof(x)) +-#endif +- +-#ifdef NO_DECLTYPE +-#define DECLTYPE_ASSIGN(dst,src) \ +-do { \ +- char **_da_dst = (char**)(&(dst)); \ +- *_da_dst = (char*)(src); \ +-} while(0) +-#else +-#define DECLTYPE_ASSIGN(dst,src) \ +-do { \ +- (dst) = DECLTYPE(dst)(src); \ +-} while(0) +-#endif +- +-/* a number of the hash function use uint32_t which isn't defined on win32 */ +-#ifdef _MSC_VER +-typedef unsigned int uint32_t; +-typedef unsigned char uint8_t; +-#else +-#include <inttypes.h> /* uint32_t */ +-#endif +- +-#define UTHASH_VERSION 1.9.8 +- +-#ifndef uthash_fatal +-#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +-#endif +-#ifndef uthash_malloc +-#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ +-#endif +-#ifndef uthash_free +-#define uthash_free(ptr,sz) free(ptr) /* free fcn */ +-#endif +- +-#ifndef uthash_noexpand_fyi +-#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ +-#endif +-#ifndef uthash_expand_fyi +-#define uthash_expand_fyi(tbl) /* can be defined to log expands */ +-#endif +- +-/* initial number of buckets */ +-#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ +-#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ +-#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ +- +-/* calculate the element whose hash handle address is hhe */ +-#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) +- +-#define HASH_FIND(hh,head,keyptr,keylen,out) \ +-do { \ +- unsigned _hf_bkt,_hf_hashv; \ +- out=NULL; \ +- if (head) { \ +- HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ +- if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ +- HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ +- keyptr,keylen,out); \ +- } \ +- } \ +-} while (0) +- +-#ifdef HASH_BLOOM +-#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) +-#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) +-#define HASH_BLOOM_MAKE(tbl) \ +-do { \ +- (tbl)->bloom_nbits = HASH_BLOOM; \ +- (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ +- if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ +- memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ +- (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ +-} while (0) +- +-#define HASH_BLOOM_FREE(tbl) \ +-do { \ +- uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ +-} while (0) +- +-#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) +-#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) +- +-#define HASH_BLOOM_ADD(tbl,hashv) \ +- HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) +- +-#define HASH_BLOOM_TEST(tbl,hashv) \ +- HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) +- +-#else +-#define HASH_BLOOM_MAKE(tbl) +-#define HASH_BLOOM_FREE(tbl) +-#define HASH_BLOOM_ADD(tbl,hashv) +-#define HASH_BLOOM_TEST(tbl,hashv) (1) +-#define HASH_BLOOM_BYTELEN 0 +-#endif +- +-#define HASH_MAKE_TABLE(hh,head) \ +-do { \ +- (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ +- sizeof(UT_hash_table)); \ +- if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ +- memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ +- (head)->hh.tbl->tail = &((head)->hh); \ +- (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ +- (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ +- (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ +- (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ +- HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ +- if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ +- memset((head)->hh.tbl->buckets, 0, \ +- HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ +- HASH_BLOOM_MAKE((head)->hh.tbl); \ +- (head)->hh.tbl->signature = HASH_SIGNATURE; \ +-} while(0) +- +-#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ +- HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) +- +-#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ +-do { \ +- replaced=NULL; \ +- HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ +- if (replaced!=NULL) { \ +- HASH_DELETE(hh,head,replaced); \ +- }; \ +- HASH_ADD(hh,head,fieldname,keylen_in,add); \ +-} while(0) +- +-#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ +-do { \ +- unsigned _ha_bkt; \ +- (add)->hh.next = NULL; \ +- (add)->hh.key = (char*)keyptr; \ +- (add)->hh.keylen = (unsigned)keylen_in; \ +- if (!(head)) { \ +- head = (add); \ +- (head)->hh.prev = NULL; \ +- HASH_MAKE_TABLE(hh,head); \ +- } else { \ +- (head)->hh.tbl->tail->next = (add); \ +- (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ +- (head)->hh.tbl->tail = &((add)->hh); \ +- } \ +- (head)->hh.tbl->num_items++; \ +- (add)->hh.tbl = (head)->hh.tbl; \ +- HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ +- (add)->hh.hashv, _ha_bkt); \ +- HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ +- HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ +- HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ +- HASH_FSCK(hh,head); \ +-} while(0) +- +-#define HASH_TO_BKT( hashv, num_bkts, bkt ) \ +-do { \ +- bkt = ((hashv) & ((num_bkts) - 1)); \ +-} while(0) +- +-/* delete "delptr" from the hash table. +- * "the usual" patch-up process for the app-order doubly-linked-list. +- * The use of _hd_hh_del below deserves special explanation. +- * These used to be expressed using (delptr) but that led to a bug +- * if someone used the same symbol for the head and deletee, like +- * HASH_DELETE(hh,users,users); +- * We want that to work, but by changing the head (users) below +- * we were forfeiting our ability to further refer to the deletee (users) +- * in the patch-up process. Solution: use scratch space to +- * copy the deletee pointer, then the latter references are via that +- * scratch pointer rather than through the repointed (users) symbol. +- */ +-#define HASH_DELETE(hh,head,delptr) \ +-do { \ +- unsigned _hd_bkt; \ +- struct UT_hash_handle *_hd_hh_del; \ +- if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ +- uthash_free((head)->hh.tbl->buckets, \ +- (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ +- HASH_BLOOM_FREE((head)->hh.tbl); \ +- uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ +- head = NULL; \ +- } else { \ +- _hd_hh_del = &((delptr)->hh); \ +- if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ +- (head)->hh.tbl->tail = \ +- (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ +- (head)->hh.tbl->hho); \ +- } \ +- if ((delptr)->hh.prev) { \ +- ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ +- (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ +- } else { \ +- DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ +- } \ +- if (_hd_hh_del->next) { \ +- ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ +- (head)->hh.tbl->hho))->prev = \ +- _hd_hh_del->prev; \ +- } \ +- HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ +- HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ +- (head)->hh.tbl->num_items--; \ +- } \ +- HASH_FSCK(hh,head); \ +-} while (0) +- +- +-/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ +-#define HASH_FIND_STR(head,findstr,out) \ +- HASH_FIND(hh,head,findstr,strlen(findstr),out) +-#define HASH_ADD_STR(head,strfield,add) \ +- HASH_ADD(hh,head,strfield,strlen(add->strfield),add) +-#define HASH_REPLACE_STR(head,strfield,add,replaced) \ +- HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) +-#define HASH_FIND_INT(head,findint,out) \ +- HASH_FIND(hh,head,findint,sizeof(int),out) +-#define HASH_ADD_INT(head,intfield,add) \ +- HASH_ADD(hh,head,intfield,sizeof(int),add) +-#define HASH_REPLACE_INT(head,intfield,add,replaced) \ +- HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) +-#define HASH_FIND_PTR(head,findptr,out) \ +- HASH_FIND(hh,head,findptr,sizeof(void *),out) +-#define HASH_ADD_PTR(head,ptrfield,add) \ +- HASH_ADD(hh,head,ptrfield,sizeof(void *),add) +-#define HASH_REPLACE_PTR(head,ptrfield,add) \ +- HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) +-#define HASH_DEL(head,delptr) \ +- HASH_DELETE(hh,head,delptr) +- +-/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. +- * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. +- */ +-#ifdef HASH_DEBUG +-#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +-#define HASH_FSCK(hh,head) \ +-do { \ +- unsigned _bkt_i; \ +- unsigned _count, _bkt_count; \ +- char *_prev; \ +- struct UT_hash_handle *_thh; \ +- if (head) { \ +- _count = 0; \ +- for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ +- _bkt_count = 0; \ +- _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ +- _prev = NULL; \ +- while (_thh) { \ +- if (_prev != (char*)(_thh->hh_prev)) { \ +- HASH_OOPS("invalid hh_prev %p, actual %p\n", \ +- _thh->hh_prev, _prev ); \ +- } \ +- _bkt_count++; \ +- _prev = (char*)(_thh); \ +- _thh = _thh->hh_next; \ +- } \ +- _count += _bkt_count; \ +- if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ +- HASH_OOPS("invalid bucket count %d, actual %d\n", \ +- (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ +- } \ +- } \ +- if (_count != (head)->hh.tbl->num_items) { \ +- HASH_OOPS("invalid hh item count %d, actual %d\n", \ +- (head)->hh.tbl->num_items, _count ); \ +- } \ +- /* traverse hh in app order; check next/prev integrity, count */ \ +- _count = 0; \ +- _prev = NULL; \ +- _thh = &(head)->hh; \ +- while (_thh) { \ +- _count++; \ +- if (_prev !=(char*)(_thh->prev)) { \ +- HASH_OOPS("invalid prev %p, actual %p\n", \ +- _thh->prev, _prev ); \ +- } \ +- _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ +- _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ +- (head)->hh.tbl->hho) : NULL ); \ +- } \ +- if (_count != (head)->hh.tbl->num_items) { \ +- HASH_OOPS("invalid app item count %d, actual %d\n", \ +- (head)->hh.tbl->num_items, _count ); \ +- } \ +- } \ +-} while (0) +-#else +-#define HASH_FSCK(hh,head) +-#endif +- +-/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to +- * the descriptor to which this macro is defined for tuning the hash function. +- * The app can #include <unistd.h> to get the prototype for write(2). */ +-#ifdef HASH_EMIT_KEYS +-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ +-do { \ +- unsigned _klen = fieldlen; \ +- write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ +- write(HASH_EMIT_KEYS, keyptr, fieldlen); \ +-} while (0) +-#else +-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +-#endif +- +-/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ +-#ifdef HASH_FUNCTION +-#define HASH_FCN HASH_FUNCTION +-#else +-#define HASH_FCN HASH_JEN +-#endif +- +-/* The Bernstein hash function, used in Perl prior to v5.6 */ +-#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _hb_keylen=keylen; \ +- char *_hb_key=(char*)(key); \ +- (hashv) = 0; \ +- while (_hb_keylen--) { (hashv) = ((hashv) * 33) + *_hb_key++; } \ +- bkt = (hashv) & (num_bkts-1); \ +-} while (0) +- +- +-/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at +- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ +-#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _sx_i; \ +- char *_hs_key=(char*)(key); \ +- hashv = 0; \ +- for(_sx_i=0; _sx_i < keylen; _sx_i++) \ +- hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ +- bkt = hashv & (num_bkts-1); \ +-} while (0) +- +-#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _fn_i; \ +- char *_hf_key=(char*)(key); \ +- hashv = 2166136261UL; \ +- for(_fn_i=0; _fn_i < keylen; _fn_i++) \ +- hashv = (hashv * 16777619) ^ _hf_key[_fn_i]; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _ho_i; \ +- char *_ho_key=(char*)(key); \ +- hashv = 0; \ +- for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ +- hashv += _ho_key[_ho_i]; \ +- hashv += (hashv << 10); \ +- hashv ^= (hashv >> 6); \ +- } \ +- hashv += (hashv << 3); \ +- hashv ^= (hashv >> 11); \ +- hashv += (hashv << 15); \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#define HASH_JEN_MIX(a,b,c) \ +-do { \ +- a -= b; a -= c; a ^= ( c >> 13 ); \ +- b -= c; b -= a; b ^= ( a << 8 ); \ +- c -= a; c -= b; c ^= ( b >> 13 ); \ +- a -= b; a -= c; a ^= ( c >> 12 ); \ +- b -= c; b -= a; b ^= ( a << 16 ); \ +- c -= a; c -= b; c ^= ( b >> 5 ); \ +- a -= b; a -= c; a ^= ( c >> 3 ); \ +- b -= c; b -= a; b ^= ( a << 10 ); \ +- c -= a; c -= b; c ^= ( b >> 15 ); \ +-} while (0) +- +-#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _hj_i,_hj_j,_hj_k; \ +- unsigned char *_hj_key=(unsigned char*)(key); \ +- hashv = 0xfeedbeef; \ +- _hj_i = _hj_j = 0x9e3779b9; \ +- _hj_k = (unsigned)keylen; \ +- while (_hj_k >= 12) { \ +- _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ +- + ( (unsigned)_hj_key[2] << 16 ) \ +- + ( (unsigned)_hj_key[3] << 24 ) ); \ +- _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ +- + ( (unsigned)_hj_key[6] << 16 ) \ +- + ( (unsigned)_hj_key[7] << 24 ) ); \ +- hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ +- + ( (unsigned)_hj_key[10] << 16 ) \ +- + ( (unsigned)_hj_key[11] << 24 ) ); \ +- \ +- HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ +- \ +- _hj_key += 12; \ +- _hj_k -= 12; \ +- } \ +- hashv += keylen; \ +- switch ( _hj_k ) { \ +- case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ +- case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ +- case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ +- case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ +- case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ +- case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ +- case 5: _hj_j += _hj_key[4]; \ +- case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ +- case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ +- case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ +- case 1: _hj_i += _hj_key[0]; \ +- } \ +- HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-/* The Paul Hsieh hash function */ +-#undef get16bits +-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ +- || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) +-#define get16bits(d) (*((const uint16_t *) (d))) +-#endif +- +-#if !defined (get16bits) +-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ +- +(uint32_t)(((const uint8_t *)(d))[0]) ) +-#endif +-#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned char *_sfh_key=(unsigned char*)(key); \ +- uint32_t _sfh_tmp, _sfh_len = keylen; \ +- \ +- int _sfh_rem = _sfh_len & 3; \ +- _sfh_len >>= 2; \ +- hashv = 0xcafebabe; \ +- \ +- /* Main loop */ \ +- for (;_sfh_len > 0; _sfh_len--) { \ +- hashv += get16bits (_sfh_key); \ +- _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \ +- hashv = (hashv << 16) ^ _sfh_tmp; \ +- _sfh_key += 2*sizeof (uint16_t); \ +- hashv += hashv >> 11; \ +- } \ +- \ +- /* Handle end cases */ \ +- switch (_sfh_rem) { \ +- case 3: hashv += get16bits (_sfh_key); \ +- hashv ^= hashv << 16; \ +- hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \ +- hashv += hashv >> 11; \ +- break; \ +- case 2: hashv += get16bits (_sfh_key); \ +- hashv ^= hashv << 11; \ +- hashv += hashv >> 17; \ +- break; \ +- case 1: hashv += *_sfh_key; \ +- hashv ^= hashv << 10; \ +- hashv += hashv >> 1; \ +- } \ +- \ +- /* Force "avalanching" of final 127 bits */ \ +- hashv ^= hashv << 3; \ +- hashv += hashv >> 5; \ +- hashv ^= hashv << 4; \ +- hashv += hashv >> 17; \ +- hashv ^= hashv << 25; \ +- hashv += hashv >> 6; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#ifdef HASH_USING_NO_STRICT_ALIASING +-/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. +- * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. +- * MurmurHash uses the faster approach only on CPU's where we know it's safe. +- * +- * Note the preprocessor built-in defines can be emitted using: +- * +- * gcc -m64 -dM -E - < /dev/null (on gcc) +- * cc -## a.c (where a.c is a simple test file) (Sun Studio) +- */ +-#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) +-#define MUR_GETBLOCK(p,i) p[i] +-#else /* non intel */ +-#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0) +-#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1) +-#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2) +-#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3) +-#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) +-#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) +-#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) +-#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) +-#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) +-#else /* assume little endian non-intel */ +-#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) +-#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) +-#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) +-#endif +-#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ +- (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ +- (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ +- MUR_ONE_THREE(p)))) +-#endif +-#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +-#define MUR_FMIX(_h) \ +-do { \ +- _h ^= _h >> 16; \ +- _h *= 0x85ebca6b; \ +- _h ^= _h >> 13; \ +- _h *= 0xc2b2ae35l; \ +- _h ^= _h >> 16; \ +-} while(0) +- +-#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- const uint8_t *_mur_data = (const uint8_t*)(key); \ +- const int _mur_nblocks = (keylen) / 4; \ +- uint32_t _mur_h1 = 0xf88D5353; \ +- uint32_t _mur_c1 = 0xcc9e2d51; \ +- uint32_t _mur_c2 = 0x1b873593; \ +- uint32_t _mur_k1 = 0; \ +- const uint8_t *_mur_tail; \ +- const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \ +- int _mur_i; \ +- for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \ +- _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ +- _mur_k1 *= _mur_c1; \ +- _mur_k1 = MUR_ROTL32(_mur_k1,15); \ +- _mur_k1 *= _mur_c2; \ +- \ +- _mur_h1 ^= _mur_k1; \ +- _mur_h1 = MUR_ROTL32(_mur_h1,13); \ +- _mur_h1 = _mur_h1*5+0xe6546b64; \ +- } \ +- _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \ +- _mur_k1=0; \ +- switch((keylen) & 3) { \ +- case 3: _mur_k1 ^= _mur_tail[2] << 16; \ +- case 2: _mur_k1 ^= _mur_tail[1] << 8; \ +- case 1: _mur_k1 ^= _mur_tail[0]; \ +- _mur_k1 *= _mur_c1; \ +- _mur_k1 = MUR_ROTL32(_mur_k1,15); \ +- _mur_k1 *= _mur_c2; \ +- _mur_h1 ^= _mur_k1; \ +- } \ +- _mur_h1 ^= (keylen); \ +- MUR_FMIX(_mur_h1); \ +- hashv = _mur_h1; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +-#endif /* HASH_USING_NO_STRICT_ALIASING */ +- +-/* key comparison function; return 0 if keys equal */ +-#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) +- +-/* iterate over items in a known bucket to find desired item */ +-#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ +-do { \ +- if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \ +- else out=NULL; \ +- while (out) { \ +- if ((out)->hh.keylen == keylen_in) { \ +- if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ +- } \ +- if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ +- else out = NULL; \ +- } \ +-} while(0) +- +-/* add an item to a bucket */ +-#define HASH_ADD_TO_BKT(head,addhh) \ +-do { \ +- head.count++; \ +- (addhh)->hh_next = head.hh_head; \ +- (addhh)->hh_prev = NULL; \ +- if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ +- (head).hh_head=addhh; \ +- if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ +- && (addhh)->tbl->noexpand != 1) { \ +- HASH_EXPAND_BUCKETS((addhh)->tbl); \ +- } \ +-} while(0) +- +-/* remove an item from a given bucket */ +-#define HASH_DEL_IN_BKT(hh,head,hh_del) \ +- (head).count--; \ +- if ((head).hh_head == hh_del) { \ +- (head).hh_head = hh_del->hh_next; \ +- } \ +- if (hh_del->hh_prev) { \ +- hh_del->hh_prev->hh_next = hh_del->hh_next; \ +- } \ +- if (hh_del->hh_next) { \ +- hh_del->hh_next->hh_prev = hh_del->hh_prev; \ +- } +- +-/* Bucket expansion has the effect of doubling the number of buckets +- * and redistributing the items into the new buckets. Ideally the +- * items will distribute more or less evenly into the new buckets +- * (the extent to which this is true is a measure of the quality of +- * the hash function as it applies to the key domain). +- * +- * With the items distributed into more buckets, the chain length +- * (item count) in each bucket is reduced. Thus by expanding buckets +- * the hash keeps a bound on the chain length. This bounded chain +- * length is the essence of how a hash provides constant time lookup. +- * +- * The calculation of tbl->ideal_chain_maxlen below deserves some +- * explanation. First, keep in mind that we're calculating the ideal +- * maximum chain length based on the *new* (doubled) bucket count. +- * In fractions this is just n/b (n=number of items,b=new num buckets). +- * Since the ideal chain length is an integer, we want to calculate +- * ceil(n/b). We don't depend on floating point arithmetic in this +- * hash, so to calculate ceil(n/b) with integers we could write +- * +- * ceil(n/b) = (n/b) + ((n%b)?1:0) +- * +- * and in fact a previous version of this hash did just that. +- * But now we have improved things a bit by recognizing that b is +- * always a power of two. We keep its base 2 log handy (call it lb), +- * so now we can write this with a bit shift and logical AND: +- * +- * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) +- * +- */ +-#define HASH_EXPAND_BUCKETS(tbl) \ +-do { \ +- unsigned _he_bkt; \ +- unsigned _he_bkt_i; \ +- struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ +- UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ +- _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ +- 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ +- if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ +- memset(_he_new_buckets, 0, \ +- 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ +- tbl->ideal_chain_maxlen = \ +- (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ +- ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ +- tbl->nonideal_items = 0; \ +- for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ +- { \ +- _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ +- while (_he_thh) { \ +- _he_hh_nxt = _he_thh->hh_next; \ +- HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ +- _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ +- if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ +- tbl->nonideal_items++; \ +- _he_newbkt->expand_mult = _he_newbkt->count / \ +- tbl->ideal_chain_maxlen; \ +- } \ +- _he_thh->hh_prev = NULL; \ +- _he_thh->hh_next = _he_newbkt->hh_head; \ +- if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ +- _he_thh; \ +- _he_newbkt->hh_head = _he_thh; \ +- _he_thh = _he_hh_nxt; \ +- } \ +- } \ +- uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ +- tbl->num_buckets *= 2; \ +- tbl->log2_num_buckets++; \ +- tbl->buckets = _he_new_buckets; \ +- tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ +- (tbl->ineff_expands+1) : 0; \ +- if (tbl->ineff_expands > 1) { \ +- tbl->noexpand=1; \ +- uthash_noexpand_fyi(tbl); \ +- } \ +- uthash_expand_fyi(tbl); \ +-} while(0) +- +- +-/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ +-/* Note that HASH_SORT assumes the hash handle name to be hh. +- * HASH_SRT was added to allow the hash handle name to be passed in. */ +-#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) +-#define HASH_SRT(hh,head,cmpfcn) \ +-do { \ +- unsigned _hs_i; \ +- unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ +- struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ +- if (head) { \ +- _hs_insize = 1; \ +- _hs_looping = 1; \ +- _hs_list = &((head)->hh); \ +- while (_hs_looping) { \ +- _hs_p = _hs_list; \ +- _hs_list = NULL; \ +- _hs_tail = NULL; \ +- _hs_nmerges = 0; \ +- while (_hs_p) { \ +- _hs_nmerges++; \ +- _hs_q = _hs_p; \ +- _hs_psize = 0; \ +- for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ +- _hs_psize++; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- if (! (_hs_q) ) break; \ +- } \ +- _hs_qsize = _hs_insize; \ +- while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ +- if (_hs_psize == 0) { \ +- _hs_e = _hs_q; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- _hs_qsize--; \ +- } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ +- _hs_e = _hs_p; \ +- if (_hs_p){ \ +- _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ +- ((void*)((char*)(_hs_p->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- } \ +- _hs_psize--; \ +- } else if (( \ +- cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ +- DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ +- ) <= 0) { \ +- _hs_e = _hs_p; \ +- if (_hs_p){ \ +- _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ +- ((void*)((char*)(_hs_p->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- } \ +- _hs_psize--; \ +- } else { \ +- _hs_e = _hs_q; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- _hs_qsize--; \ +- } \ +- if ( _hs_tail ) { \ +- _hs_tail->next = ((_hs_e) ? \ +- ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ +- } else { \ +- _hs_list = _hs_e; \ +- } \ +- if (_hs_e) { \ +- _hs_e->prev = ((_hs_tail) ? \ +- ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ +- } \ +- _hs_tail = _hs_e; \ +- } \ +- _hs_p = _hs_q; \ +- } \ +- if (_hs_tail){ \ +- _hs_tail->next = NULL; \ +- } \ +- if ( _hs_nmerges <= 1 ) { \ +- _hs_looping=0; \ +- (head)->hh.tbl->tail = _hs_tail; \ +- DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ +- } \ +- _hs_insize *= 2; \ +- } \ +- HASH_FSCK(hh,head); \ +- } \ +-} while (0) +- +-/* This function selects items from one hash into another hash. +- * The end result is that the selected items have dual presence +- * in both hashes. There is no copy of the items made; rather +- * they are added into the new hash through a secondary hash +- * hash handle that must be present in the structure. */ +-#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ +-do { \ +- unsigned _src_bkt, _dst_bkt; \ +- void *_last_elt=NULL, *_elt; \ +- UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ +- ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ +- if (src) { \ +- for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ +- for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ +- _src_hh; \ +- _src_hh = _src_hh->hh_next) { \ +- _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ +- if (cond(_elt)) { \ +- _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ +- _dst_hh->key = _src_hh->key; \ +- _dst_hh->keylen = _src_hh->keylen; \ +- _dst_hh->hashv = _src_hh->hashv; \ +- _dst_hh->prev = _last_elt; \ +- _dst_hh->next = NULL; \ +- if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ +- if (!dst) { \ +- DECLTYPE_ASSIGN(dst,_elt); \ +- HASH_MAKE_TABLE(hh_dst,dst); \ +- } else { \ +- _dst_hh->tbl = (dst)->hh_dst.tbl; \ +- } \ +- HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ +- HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ +- (dst)->hh_dst.tbl->num_items++; \ +- _last_elt = _elt; \ +- _last_elt_hh = _dst_hh; \ +- } \ +- } \ +- } \ +- } \ +- HASH_FSCK(hh_dst,dst); \ +-} while (0) +- +-#define HASH_CLEAR(hh,head) \ +-do { \ +- if (head) { \ +- uthash_free((head)->hh.tbl->buckets, \ +- (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ +- HASH_BLOOM_FREE((head)->hh.tbl); \ +- uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ +- (head)=NULL; \ +- } \ +-} while(0) +- +-#define HASH_OVERHEAD(hh,head) \ +- (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ +- ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ +- (sizeof(UT_hash_table)) + \ +- (HASH_BLOOM_BYTELEN))) +- +-#ifdef NO_DECLTYPE +-#define HASH_ITER(hh,head,el,tmp) \ +-for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ +- el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) +-#else +-#define HASH_ITER(hh,head,el,tmp) \ +-for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ +- el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) +-#endif +- +-/* obtain a count of items in the hash */ +-#define HASH_COUNT(head) HASH_CNT(hh,head) +-#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) +- +-typedef struct UT_hash_bucket { +- struct UT_hash_handle *hh_head; +- unsigned count; +- +- /* expand_mult is normally set to 0. In this situation, the max chain length +- * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If +- * the bucket's chain exceeds this length, bucket expansion is triggered). +- * However, setting expand_mult to a non-zero value delays bucket expansion +- * (that would be triggered by additions to this particular bucket) +- * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. +- * (The multiplier is simply expand_mult+1). The whole idea of this +- * multiplier is to reduce bucket expansions, since they are expensive, in +- * situations where we know that a particular bucket tends to be overused. +- * It is better to let its chain length grow to a longer yet-still-bounded +- * value, than to do an O(n) bucket expansion too often. +- */ +- unsigned expand_mult; +- +-} UT_hash_bucket; +- +-/* random signature used only to find hash tables in external analysis */ +-#define HASH_SIGNATURE 0xa0111fe1 +-#define HASH_BLOOM_SIGNATURE 0xb12220f2 +- +-typedef struct UT_hash_table { +- UT_hash_bucket *buckets; +- unsigned num_buckets, log2_num_buckets; +- unsigned num_items; +- struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ +- ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ +- +- /* in an ideal situation (all buckets used equally), no bucket would have +- * more than ceil(#items/#buckets) items. that's the ideal chain length. */ +- unsigned ideal_chain_maxlen; +- +- /* nonideal_items is the number of items in the hash whose chain position +- * exceeds the ideal chain maxlen. these items pay the penalty for an uneven +- * hash distribution; reaching them in a chain traversal takes >ideal steps */ +- unsigned nonideal_items; +- +- /* ineffective expands occur when a bucket doubling was performed, but +- * afterward, more than half the items in the hash had nonideal chain +- * positions. If this happens on two consecutive expansions we inhibit any +- * further expansion, as it's not helping; this happens when the hash +- * function isn't a good fit for the key domain. When expansion is inhibited +- * the hash will still work, albeit no longer in constant time. */ +- unsigned ineff_expands, noexpand; +- +- uint32_t signature; /* used only to find hash tables in external analysis */ +-#ifdef HASH_BLOOM +- uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ +- uint8_t *bloom_bv; +- char bloom_nbits; +-#endif +- +-} UT_hash_table; +- +-typedef struct UT_hash_handle { +- struct UT_hash_table *tbl; +- void *prev; /* prev element in app order */ +- void *next; /* next element in app order */ +- struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ +- struct UT_hash_handle *hh_next; /* next hh in bucket order */ +- void *key; /* ptr to enclosing struct's key */ +- unsigned keylen; /* enclosing struct's key len */ +- unsigned hashv; /* result of hash-fcn(key) */ +-} UT_hash_handle; +- +-#endif /* UTHASH_H */ +-- +2.15.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init new file mode 100644 index 000000000..d2a27b273 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.init @@ -0,0 +1,89 @@ +#! /bin/sh + +# Based on the Debian initscript for mosquitto + +### BEGIN INIT INFO +# Provides: mosquitto +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: mosquitto MQTT v3.1 message broker +# Description: +# This is a message broker that supports version 3.1 of the MQ Telemetry +# Transport (MQTT) protocol. +# +# MQTT provides a method of carrying out messaging using a publish/subscribe +# model. It is lightweight, both in terms of bandwidth usage and ease of +# implementation. This makes it particularly useful at the edge of the network +# where a sensor or other simple device may be implemented using an arduino for +# example. +### END INIT INFO + +set -e + +PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid +DAEMON=@SBINDIR@/mosquitto + +# start and stop the mosquitto MQTT message broker + +test -x ${DAEMON} || exit 0 + +umask 022 + +. @SYSCONFDIR@/init.d/functions + +export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@" + +case "$1" in + start) + echo "Starting Mosquitto message broker" "mosquitto" + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} ; then + exit 0 + else + exit 1 + fi + ;; + stop) + echo "Stopping Mosquitto message broker" "mosquitto" + if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then + rm -f ${PIDFILE} + exit 0 + else + exit 1 + fi + ;; + + + reload|force-reload) + if [ -f ${PIDFILE} ] ; then + echo "Reloading configuration for mosquitto" + pid=`cat ${PIDFILE}` + kill -HUP $pid + else + echo "mosquitto does not seem to be running" + fi + ;; + + restart) + echo "Restarting Mosquitto message broker" "mosquitto" + if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then + rm -f ${PIDFILE} + fi + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then + exit 0 + else + exit 1 + fi + ;; + + status) + status ${DAEMON} && exit 0 || exit $? + ;; + + *) + echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" + exit 1 +esac + +exit 0 diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service new file mode 100644 index 000000000..25f68fae0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/mosquitto.service @@ -0,0 +1,15 @@ +[Unit] +Description=Mosquitto - lightweight server implementation of the MQTT and MQTT-SN protocols +ConditionPathExists=/etc/mosquitto/mosquitto.conf +After=network.target + +[Service] +Type=simple +ExecStartPre=/bin/rm -f /var/run/mosquitto.pid +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/mosquitto.pid +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb new file mode 100644 index 000000000..13ce3811d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb @@ -0,0 +1,83 @@ +SUMMARY = "Open source MQTT v3.1/3.1.1 implemention" +DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. " +HOMEPAGE = "http://mosquitto.org/" +SECTION = "console/network" +LICENSE = "EPL-1.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \ + file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ + file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ + file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \ +" +DEPENDS = "uthash" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch \ + file://0002-uthash-remove-in-tree-version.patch \ + file://mosquitto.service \ + file://mosquitto.init \ +" + +SRC_URI[md5sum] = "6b0966e93f118bc71ad7b61600a6c2d3" +SRC_URI[sha256sum] = "156b1fa731d12baad4b8b22f7b6a8af50ba881fc711b81e9919ec103cf2942d1" + +inherit systemd update-rc.d useradd + +PACKAGECONFIG ??= "ssl uuid" + +PACKAGECONFIG[dns-srv] = ",,c-ares" +PACKAGECONFIG[ssl] = ",,openssl" +PACKAGECONFIG[uuid] = ",,util-linux" +EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \ + STRIP=/bin/true \ + WITH_DOCS=no \ + ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}" + +export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}" + +do_compile() { + oe_runmake PREFIX=${prefix} +} + +do_install() { + oe_runmake install DESTDIR=${D} + install -d ${D}${libdir} + install -m 0644 lib/libmosquitto.a ${D}${libdir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/mosquitto.service ${D}${systemd_unitdir}/system/ + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${sysconfdir}/init.d/mosquitto +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" + +FILES_${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${sysconfdir}/mosquitto \ + ${sysconfdir}/init.d \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" + +FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" + +FILES_${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ +" + +SYSTEMD_SERVICE_${PN} = "mosquitto.service" + +INITSCRIPT_NAME = "mosquitto" +INITSCRIPT_PARAMS = "defaults 30" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \ + --user-group mosquitto" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch b/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch new file mode 100644 index 000000000..e2c4e9ff6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch @@ -0,0 +1,20 @@ +Submitted By: Armin K. <krejzi at email dot com> +Date: 2012-07-06 +Initial Package Version: 0.4.6 +Upstream Status: Unknown +Origin: Self +Description: Some build fixes. + +Index: obex-data-server-0.4.6/src/ods-obex.c +=================================================================== +--- obex-data-server-0.4.6.orig/src/ods-obex.c ++++ obex-data-server-0.4.6/src/ods-obex.c +@@ -412,7 +412,7 @@ ods_obex_setup_usbtransport (OdsObexCont + goto err; + } + +- interfaces_num = OBEX_FindInterfaces(obex_context->obex_handle, &obex_intf); ++ interfaces_num = OBEX_EnumerateInterfaces(obex_context->obex_handle); + if (intf_num >= interfaces_num) { + g_set_error (error, ODS_ERROR, ODS_ERROR_FAILED, "Invalid interface number"); + goto err; diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb b/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb new file mode 100644 index 000000000..715b02352 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "obex-data-server is a D-Bus service providing high-level OBEX client and server side functionality" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "gtk+ dbus-glib dbus-glib-native imagemagick openobex" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES','bluez5','bluez5','bluez4',d)}" + +SRC_URI = "http://tadas.dailyda.com/software/obex-data-server-${PV}.tar.gz \ + file://obex-data-server-0.4.6-build-fixes-1.patch \ +" +SRC_URI[md5sum] = "961ca5db6fe9c97024e133cc6203cc4d" +SRC_URI[sha256sum] = "b399465ddbd6d0217abedd9411d9d74a820effa0a6a142adc448268d3920094f" + +inherit distro_features_check autotools-brokensep pkgconfig + +REQUIRED_DISTRO_FEATURES = "x11" + +FILES_${PN} += "${datadir}/dbus-1/" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb b/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb new file mode 100644 index 000000000..1b56685c5 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "The Openobex project is an open source implementation of the \ +Object Exchange (OBEX) protocol." +HOMEPAGE = "http://openobex.triq.net" +SECTION = "libs" +DEPENDS = "virtual/libusb0" +DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES','bluez5','bluez5','bluez4',d)}" + +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ +" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${PV}/${BP}-Source.tar.gz \ +" + +SRC_URI[md5sum] = "f6e0b6cb7dcfd731460a7e9a91429a3a" +SRC_URI[sha256sum] = "158860aaea52f0fce0c8e4b64550daaae06df2689e05834697b7e8c7d73dd4fc" + +inherit cmake pkgconfig + +S = "${WORKDIR}/${BP}-Source" + +EXTRA_OECONF = " -DCMAKE_SKIP_RPATH=ON " +EXTRA_OECMAKE += "-DBUILD_DOCUMENTATION=OFF" + +#--enable-apps --enable-syslog + +ASNEEDED = "" + +do_install_append () { + rmdir ${D}${bindir} +} + +PACKAGES =+ "openobex-apps" +FILES_${PN}-apps = "${bindir}/*" +FILES_${PN} += "${libdir}/lib*.so.*" +FILES_${PN}-dev += "${bindir}/openobex-config ${libdir}/cmake" +DEBIAN_NOAUTONAME_${PN}-apps = "1" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch new file mode 100644 index 000000000..1f6de87c8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch @@ -0,0 +1,66 @@ +From b8dc608dad7d9fc3a4c16acd0327d97b81c23b95 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 15 Nov 2016 01:32:31 +0000 +Subject: [PATCH] apps/CMakeLists.txt: Explicitly link libbfb and libmulticobex + +Transitive linking is disabled now for multicobex and +obexftp, This ends up with linking errors for apps, therefore +they are required to be added to link line explicitly. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + apps/CMakeLists.txt | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +Index: obexftp-0.24.2-Source/apps/CMakeLists.txt +=================================================================== +--- obexftp-0.24.2-Source.orig/apps/CMakeLists.txt ++++ obexftp-0.24.2-Source/apps/CMakeLists.txt +@@ -5,14 +5,23 @@ add_definitions( -DVERSION="${obexftp_VE + add_definitions ( -DHAVE_USB ) + + add_executable ( obexftp_app obexftp.c ) +-target_link_libraries ( obexftp_app obexftp ) ++target_link_libraries ( obexftp_app ++ PRIVATE multicobex ++ PRIVATE bfb ++ obexftp ++) + set_target_properties ( obexftp_app PROPERTIES + OUTPUT_NAME obexftp + ) + + + add_executable ( obexftpd_app obexftpd.c ) +-target_link_libraries ( obexftpd_app obexftp openobex ) ++target_link_libraries ( obexftpd_app ++ PRIVATE multicobex ++ PRIVATE bfb ++ obexftp ++ openobex ++) + set_target_properties ( obexftpd_app PROPERTIES + OUTPUT_NAME obexftpd + ) +Index: obexftp-0.24.2-Source/fuse/CMakeLists.txt +=================================================================== +--- obexftp-0.24.2-Source.orig/fuse/CMakeLists.txt ++++ obexftp-0.24.2-Source/fuse/CMakeLists.txt +@@ -13,6 +13,8 @@ if ( Fuse_FOUND ) + ) + + target_link_libraries ( obexfs ++ PRIVATE multicobex ++ PRIVATE bfb + obexftp + ${Fuse_LIBRARIES} + ${EXPAT_LIBRARIES} +@@ -23,6 +25,8 @@ if ( Fuse_FOUND ) + ) + + target_link_libraries ( obexautofs ++ PRIVATE multicobex ++ PRIVATE bfb + obexftp + ${Fuse_LIBRARIES} + ) diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/Remove_some_printf_in_obexftpd.patch b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/Remove_some_printf_in_obexftpd.patch new file mode 100644 index 000000000..8b73af32e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/Remove_some_printf_in_obexftpd.patch @@ -0,0 +1,34 @@ +Signed-off-by: Jun Zhu <R01007@freescale.com> + +Upstream-Status: Not applicable + +diff -Nru obexftp-0.23/apps.orig/obexftpd.c obexftp-0.23/apps/obexftpd.c +--- obexftp-0.23/apps.orig/obexftpd.c 2013-11-08 10:42:20.816631583 +0800 ++++ obexftp-0.23/apps/obexftpd.c 2013-11-08 10:44:18.628634893 +0800 +@@ -639,7 +639,7 @@ + struct stat statbuf; + //char *namebuf = NULL; + +- fprintf(stderr, "put_done>>>\n"); ++ //fprintf(stderr, "put_done>>>\n"); + while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) { + switch(hi) { + case OBEX_HDR_BODY: +@@ -671,7 +671,7 @@ + } + } + if(!body) { +- printf("Got a PUT without a body\n"); ++ //printf("Got a PUT without a body\n"); + OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS); + } + if(!name) { +@@ -807,7 +807,7 @@ + + switch(obex_cmd) { + case OBEX_CMD_PUT: +- fprintf(stderr, "obex_ev_progress: obex_cmd_put\n"); ++ //fprintf(stderr, "obex_ev_progress: obex_cmd_put\n"); + put_done(handle, obj, 0); + break; + default: diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/make_fuse_swig_optional.patch b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/make_fuse_swig_optional.patch new file mode 100644 index 000000000..84b143bf5 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/make_fuse_swig_optional.patch @@ -0,0 +1,24 @@ +Index: obexftp-0.24.2-Source/CMakeLists.txt +=================================================================== +--- obexftp-0.24.2-Source.orig/CMakeLists.txt ++++ obexftp-0.24.2-Source/CMakeLists.txt +@@ -58,9 +58,17 @@ add_subdirectory ( bfb ) + add_subdirectory ( multicobex ) + add_subdirectory ( obexftp ) + add_subdirectory ( apps ) +-add_subdirectory ( fuse ) +-add_subdirectory ( swig ) + add_subdirectory ( doc ) ++ ++option ( ENABLE_FUSE "Build the obexftp fuse module" OFF ) ++if ( ENABLE_FUSE ) ++ add_subdirectory ( fuse ) ++endif ( ENABLE_FUSE ) ++ ++option ( ENABLE_SWIG "Build the obexftp swig module" OFF ) ++if ( ENABLE_SWIG ) ++ add_subdirectory ( swig ) ++endif ( ENABLE_SWIG ) + #examples + + set ( prefix "${CMAKE_INSTALL_PREFIX}" ) diff --git a/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb new file mode 100644 index 000000000..b4a914d92 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "A tool for transfer files to/from any OBEX enabled device" +LICENSE = "GPLv2 & PD & LGPLv2.1" +LIC_FILES_CHKSUM = "file://LGPL-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ + file://GPL-2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://License.txt;md5=fcbddc3c1debed80dd80da2d3e5f0dc1 \ + " + +DEPENDS += "openobex obexftp-native" +SRC_URI = "http://downloads.sourceforge.net/openobex/${BP}-Source.tar.gz \ + file://Remove_some_printf_in_obexftpd.patch \ + file://0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch \ + file://make_fuse_swig_optional.patch \ +" +SRC_URI[md5sum] = "157a9d1b2ed220203f7084db906de73c" +SRC_URI[sha256sum] = "d40fb48e0a0eea997b3e582774b29f793919a625d54b87182e31a3f3d1c989a3" + +inherit cmake pkgconfig + +OECMAKE_GENERATOR = "Unix Makefiles" + +PACKAGECONFIG ?= "" +# fuse support will need meta-filesystems layer +PACKAGECONFIG[fuse] = "-DENABLE_FUSE=ON,-DENABLE_FUSE=OFF,fuse" +PACKAGECONFIG[swig] = "-DENABLE_SWIG=ON,-DENABLE_SWIG=OFF,swig" + +DEPENDS_remove_class-native = "fuse-native" + +S = "${WORKDIR}/${BP}-Source" + +EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=ON \ + -DENABLE_PERL=OFF -DENABLE_PYTHON=OFF \ + -DENABLE_RUBY=OFF -DENABLE_TCL=OFF \ +" + +do_compile_class-native () { + oe_runmake crctable +} + +do_install_class-native () { + install -D -m 0755 ${B}/bfb/crctable ${D}${bindir}/crctable +} + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb b/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb new file mode 100644 index 000000000..f2a16dcf7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb @@ -0,0 +1,37 @@ +# Copyright (C) 2014-2015 Freescale Semiconductor +# Released under the MIT license (see COPYING.MIT for the terms) + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SUMMARY = "Set of Bluetooth related tools for inclusion in images" +DESCRIPTION = "Includes bluetooth specific tools for this version of BlueZ.\ +These tools are used at runtime. \ +Supports BlueZ4 and BlueZ5." + +inherit packagegroup +inherit bluetooth + +RDEPENDS_bluez4 = " \ + obexftp \ + ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'libasound-module-bluez', '', d)} \ +" + +RDEPENDS_bluez5 = " \ + bluez5-noinst-tools \ + bluez5-obex \ + bluez5-testtools \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', \ + 'pulseaudio-module-bluetooth-discover \ + pulseaudio-module-bluetooth-policy \ + pulseaudio-module-bluez5-discover \ + pulseaudio-module-bluez5-device \ + pulseaudio-module-switch-on-connect \ + pulseaudio-module-loopback', \ + '', d)} \ +" + +# Install bluez4 tools or bluez5 tools depending on what is specified in the distro. +# Otherwise install nothing. +RDEPENDS_${PN} = "${RDEPENDS_${BLUEZ}}" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch new file mode 100644 index 000000000..a31bfaa74 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch @@ -0,0 +1,25 @@ +Disable building some things we don't need + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 33bd2d0..84262bd 100644 +--- a/Makefile ++++ b/Makefile +@@ -115,7 +115,8 @@ LDFLAGS_AS = -shared -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -lpthread + + all: build + +-build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS} ++build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ++#${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS} + + clean: + rm -rf ${blddir}/* +-- diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb new file mode 100644 index 000000000..fec380ce6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.0.bb @@ -0,0 +1,35 @@ +SUMMARY = "Paho MQTT - C libraries for the MQTT and MQTT-SN protocols" +DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." +HOMEPAGE = "http://www.eclipse.org/paho/" +SECTION = "console/network" +LICENSE = "EPL-1.0 | EDL-1.0" + +LIC_FILES_CHKSUM = " \ + file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ + file://epl-v10;md5=659c8e92a40b6df1d9e3dccf5ae45a08 \ + file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \ + file://about.html;md5=dcde438d73cf42393da9d40fabc0c9bc \ +" + +SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http" + +SRCREV = "e8d34da24ad807f5e698b327d67591fd4b4bfa7e" + +DEPENDS = "openssl" + +S = "${WORKDIR}/git" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install() { + install -d ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3a ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3as ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3c ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3cs ${D}${libdir} + install -d ${D}${includedir} + install -m 644 src/MQTTAsync.h ${D}${includedir} + install -m 644 src/MQTTClient.h ${D}${includedir} + install -m 644 src/MQTTClientPersistence.h ${D}${includedir} +} + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch b/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 000000000..8bb7e5a18 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,25 @@ +From f7ad9a4471cee2324f216a0d82ba8097ec746c56 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 15 Jul 2017 11:48:12 -0700 +Subject: [PATCH] Include limits.h for PATH_MAX + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/pnstat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pnstat.c b/src/pnstat.c +index 661a5bc..76068e6 100644 +--- a/src/pnstat.c ++++ b/src/pnstat.c +@@ -35,6 +35,7 @@ + #include <dirent.h> + #include <unistd.h> + #include <netinet/tcp.h> ++#include <limits.h> + + struct fd + { +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb new file mode 100644 index 000000000..3c599950f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "This small package provides a few command line tools for Linux Phonet" +HOMEPAGE = "" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +SRC_URI = "git://gitorious.org/meego-cellular/phonet-utils.git;branch=master \ + file://0001-Include-limits.h-for-PATH_MAX.patch \ + " +PR = "r2" +S = "${WORKDIR}/git" +SRCREV = "4acfa720fd37d178a048fc2be17180137d4a70ea" +PV = "0.0.0+gitr${SRCPV}" + +inherit autotools-brokensep + +FILES_${PN} += "${base_libdir}/udev/rules.d/85-phonet-utils.rules" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.7.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.7.0.bb new file mode 100644 index 000000000..e9846fdea --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.7.0.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker" +HOMEPAGE = "https://github.com/alanxz/rabbitmq-c" +LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=6b7424f9db80cfb11fdd5c980b583f53" +LICENSE = "MIT" + +SRC_URI = "git://github.com/alanxz/rabbitmq-c.git" +SRCREV = "4dde30ce8d984edda540349f57eb7995a87ba9de" + +S = "${WORKDIR}/git" + +DEPENDS = "popt openssl" + +EXTRA_OECONF = "--disable-examples --enable-tools --disable-docs" + +inherit autotools pkgconfig + +PACKAGE_BEFORE_PN += "${PN}-tools" +FILES_${PN}-tools = "${bindir}" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch new file mode 100644 index 000000000..c6f60d0ed --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch @@ -0,0 +1,30 @@ +From db764080e54f8f998c28ef8dab78da8b8d1d1420 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Fri, 11 Feb 2011 10:35:40 +0100 +Subject: [PATCH] rfkill makefile: don't use -t, the OE install wrapper dislikes it + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + Makefile | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 8d6c700..3652690 100644 +--- a/Makefile ++++ b/Makefile +@@ -53,10 +53,10 @@ check: + install: rfkill rfkill.8.gz + @$(NQ) ' INST rfkill' + $(Q)$(MKDIR) $(DESTDIR)$(SBINDIR) +- $(Q)$(INSTALL) -m 755 -t $(DESTDIR)$(SBINDIR) rfkill ++ $(Q)$(INSTALL) -m 755 rfkill $(DESTDIR)$(SBINDIR) + @$(NQ) ' INST rfkill.8' + $(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/ +- $(Q)$(INSTALL) -m 644 -t $(DESTDIR)$(MANDIR)/man8/ rfkill.8.gz ++ $(Q)$(INSTALL) -m 644 rfkill.8.gz $(DESTDIR)$(MANDIR)/man8/ + + clean: + $(Q)rm -f rfkill *.o *~ *.gz version.c *-stamp +-- +1.6.6.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch new file mode 100644 index 000000000..2b8368912 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch @@ -0,0 +1,31 @@ +When WORKDIR is included in some other git checkout, version.sh calls git rev-parse +and it returns some description from that upper git checkout even when rfkill is +being built from release tarball. + +When returned description doesn't match with expected v0.4, version.sh exits +without creating version.c + # on git builds check that the version number above + # is correct... + [ "${descr%%-*}" = "v$VERSION" ] || exit 2 + +and build fails a bit later: + | NOTE: make -j 32 -e MAKEFLAGS= + | CC rfkill.o + | GEN version.c + | make: *** [version.c] Error 2 + | make: *** Waiting for unfinished jobs.... + | ERROR: oe_runmake failed + +Don't try git rev-parse, if there isn't .git in ${S}. + +--- a/version.sh 2013-11-15 03:43:12.587744366 -0800 ++++ b/version.sh 2013-11-15 03:42:40.699743320 -0800 +@@ -12,7 +12,7 @@ + + if test "x$SUFFIX" != 'x'; then + v="$VERSION$SUFFIX" +-elif head=`git rev-parse --verify HEAD 2>/dev/null`; then ++elif test -d .git && head=`git rev-parse --verify HEAD 2>/dev/null`; then + git update-index --refresh --unmerged > /dev/null + descr=$(git describe 2>/dev/null || echo "v$VERSION") + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.5.bb b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.5.bb new file mode 100644 index 000000000..3e644760c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.5.bb @@ -0,0 +1,27 @@ +SUMMARY = "Radio enable/disable command line utility" +HOMEPAGE = "http://linuxwireless.org/en/users/Documentation/rfkill" +SECTION = "base" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=c6036d0eb7edbfced28c4160e5d3fa94" + +SRC_URI = "http://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.bz2 \ + file://0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch \ + file://dont.call.git.rev-parse.on.parent.dir.patch" + +SRC_URI[md5sum] = "b957713a6cfbcd8ac0e94420aeddcf1a" +SRC_URI[sha256sum] = "3e160cca504a53679f2b3254f31c53a4fb38a021bc50fed8eb57a436d33dfa07" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake DESTDIR=${D} install +} + +inherit update-alternatives + +ALTERNATIVE_${PN} = "rfkill" +ALTERNATIVE_PRIORITY = "60" +ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch b/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch new file mode 100644 index 000000000..79d4f29fa --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch @@ -0,0 +1,94 @@ +Using AC_RUN_IFELSE prevent people from configuring package for +cross-compiling. Don't run code while configuring package. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> + +Index: libtorrent-0.13.3/scripts/checks.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2013-02-10 15:28:37.414445524 +0200 +@@ -95,40 +95,6 @@ + + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <fcntl.h> +- #include <stdlib.h> +- #include <unistd.h> +- #include <sys/event.h> +- #include <sys/time.h> +- int main() { +- struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@; +- struct timespec ts = { 0, 0 }; +- int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n; +- char buffer@<:@9001@:>@; +- if (pipe(pfd) == -1) return 1; +- if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2; +- while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer)); +- if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3; +- if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4; +- EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL); +- EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL); +- if ((kfd = kqueue()) == -1) return 5; +- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6; +- if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7; +- if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8; +- read(pfd@<:@0@:>@, buffer, sizeof(buffer)); +- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(yes) +- ], [ +- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.) +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_WITH_KQUEUE], [ +Index: libtorrent-0.13.3/scripts/common.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/common.m4 2013-02-10 15:27:55.874446741 +0200 +@@ -222,38 +222,10 @@ + + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <execinfo.h> +- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} +- ])], +- [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h) +- ], [ +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <inttypes.h> +- int main() { +- char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +- int i; +- for (i = 1; i < 4; ++i) +- if (*(uint32_t*)(buf + i) == 0) return -1; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(none needed) +- ], [ +- AC_DEFINE(USE_ALIGNED, 1, Require byte alignment) +- AC_MSG_RESULT(required) +- ]) + ]) + + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb new file mode 100644 index 000000000..c731cf707 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Torrent client" +HOMEPAGE = "http://libtorrent.rakshasa.no/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "libsigc++-2.0 curl cppunit libtorrent ncurses" + +SRC_URI = "git://github.com/rakshasa/rtorrent \ + file://don-t-run-code-while-configuring-package.patch \ +" +SRCREV = "226e670decf92e7adaa845a6982aca4f164ea740" + +PV = "0.9.6+git${SRCPV}" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" + +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +inherit autotools pkgconfig + +do_configure_prepend() { + (cd ${S}; ./autogen.sh; cd -) +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb new file mode 100644 index 000000000..708650fb9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.4.bb @@ -0,0 +1,15 @@ +SUMMARY = "A serial to network proxy" +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/ser2net/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bae3019b4c6dc4138c217864bd04331f" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz" + +SRC_URI[md5sum] = "562274d783534276a9feac913b7d8c4e" +SRC_URI[sha256sum] = "d846066e27c3072565990745d030357aa0c278f96b7d1d4f59023347c1db8824" + +inherit autotools pkgconfig + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch new file mode 100644 index 000000000..49b4d1dda --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch @@ -0,0 +1,51 @@ +From 85602c3e531d39e89dc8cee0c4a592f85006a064 Mon Sep 17 00:00:00 2001 +From: Bill Randle <bill.randle@gmail.com> +Date: Sun, 31 Dec 2017 09:08:23 -0800 + +--- + scripts/sendsms | 2 +- + scripts/sms2html | 2 +- + scripts/sms2unicode | 2 +- + scripts/unicode2sms | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/scripts/sendsms b/scripts/sendsms +index 512026d..bb56856 100755 +--- a/scripts/sendsms ++++ b/scripts/sendsms +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # This script send a text sms at the command line by creating + # a sms file in the outgoing queue. + +diff --git a/scripts/sms2html b/scripts/sms2html +index ff253e3..946185e 100755 +--- a/scripts/sms2html ++++ b/scripts/sms2html +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # This script converts a received sms file into a html file. + +diff --git a/scripts/sms2unicode b/scripts/sms2unicode +index 46e2756..2826dc1 100755 +--- a/scripts/sms2unicode ++++ b/scripts/sms2unicode +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # This script converts a received sms file into a pure unicode text file. + +diff --git a/scripts/unicode2sms b/scripts/unicode2sms +index 2ae86dc..3fccf0d 100755 +--- a/scripts/unicode2sms ++++ b/scripts/unicode2sms +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # This script converts a pure unicode text file into an sms file for sending. + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch new file mode 100644 index 000000000..e1d79d332 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch @@ -0,0 +1,24 @@ +From 9a4a872dca78ca9cb6bdc228be61f5a4c2d68b1f Mon Sep 17 00:00:00 2001 +From: Kai Ulrich <kaiu@gmx.de> +Date: Wed, 18 Mar 2015 11:20:53 +0100 + +--- + scripts/sms3 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/sms3 b/scripts/sms3 +index 6b990bf..09c063b 100755 +--- a/scripts/sms3 ++++ b/scripts/sms3 +@@ -24,9 +24,9 @@ INFOFILE="/var/run/smsd.working" + # Logfile can also be defined in here: + LOGFILE="/var/log/smsd.log" + +-DAEMON=/usr/local/bin/smsd ++DAEMON=/usr/bin/smsd + # A program which turns power off for couple of seconds: +-RESETMODEMS=/usr/local/bin/smsd_resetmodems ++RESETMODEMS=/usr/bin/smsd_resetmodems + NAME=smsd + PSOPT="-e" + ECHO=echo diff --git a/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb new file mode 100644 index 000000000..6e6413b4b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb @@ -0,0 +1,47 @@ +SUMMARY = "SMS Gateway software" +DESCRIPTION = "The SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones." +SECTION = "console/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4d21efa1bb2a186360dde4035f860682" +HOMEPAGE = "http://smstools3.kekekasvi.com" + +SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \ + file://sms_binpath.patch \ + file://scripts_no_bash.patch" + +SRC_URI[md5sum] = "6a9f038fb38a49cc3a4f8f14a88fb8af" +SRC_URI[sha256sum] = "a26ba4c02b16f6cf13177bffca6c9230dc5fefaeba8e3030cd4e4905f6a92084" + + +S = "${WORKDIR}/${BPN}" + +EXTRA_OEMAKE += "LFLAGS='${LDFLAGS}'" + +INITSCRIPT_NAME = "sms3" +INITSCRIPT_PARAMS = "defaults" + +inherit update-rc.d + +do_install () { + + install -d ${D}${bindir} + install -m 755 ${S}/src/smsd "${D}${bindir}/smsd" + + install -m 755 ${S}/scripts/sendsms "${D}${bindir}/sendsms" + install -m 755 ${S}/scripts/sms2html "${D}${bindir}/sms2html" + install -m 755 ${S}/scripts/sms2unicode "${D}${bindir}/sms2unicode" + install -m 755 ${S}/scripts/unicode2sms "${D}${bindir}/unicode2sms" + + install -d ${D}${sysconfdir} + install -m 644 ${S}/examples/smsd.conf.easy "${D}${sysconfdir}/smsd.conf" + + install -d "${D}${localstatedir}/spool" + install -d "${D}${localstatedir}/spool/sms" + install -d "${D}${localstatedir}/spool/sms/incoming" + install -d "${D}${localstatedir}/spool/sms/outgoing" + install -d "${D}${localstatedir}/spool/sms/checked" + + install -d ${D}${sysconfdir}/init.d + install -m 755 ${S}/scripts/sms3 "${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}" + +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb new file mode 100644 index 000000000..01c6e3781 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Telepathy Framework glib-base helper library" +DESCRIPTION = "Telepathy Framework: GLib-based helper library for connection managers" +HOMEPAGE = "http://telepathy.freedesktop.org/wiki/" +DEPENDS = "glib-2.0 dbus hostpython-runtime-native dbus-native dbus-glib libxslt-native" +LICENSE = "LGPLv2.1+" + +SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-glib/${BP}.tar.gz" +SRC_URI[md5sum] = "93c429e37750b25dcf8de86bb514664f" +SRC_URI[sha256sum] = "ae0002134991217f42e503c43dea7817853afc18863b913744d51ffa029818cf" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e413d83db6ee8f2c8e6055719096a48e" + +inherit autotools pkgconfig gettext gobject-introspection + +FILES_${PN} += "${datadir}/telepathy \ + ${datadir}/dbus-1" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch new file mode 100644 index 000000000..2cd2c78c3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch @@ -0,0 +1,15 @@ +Upstream-Status: Pending + +Signed-off-by: Constantin Musca <constantinx.musca@intel.com> +--- a/extensions/Makefile.am ++++ b/extensions/Makefile.am +@@ -37,8 +37,8 @@ _gen/all.xml: all.xml $(wildcard $(srcdi + --xinclude $(tools_dir)/identity.xsl \ + $< > $@ + +-extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl ++extensions.html _gen/svc-gtk-doc.h: _gen/all.xml $(tools_dir)/doc-generator.xsl + $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ + $(tools_dir)/doc-generator.xsl \ + $< > $@ + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb new file mode 100644 index 000000000..ca09f6daf --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "Telepathy IRC connection manager" +DESCRIPTION = "Telepathy implementation of the Internet Relay Chat protocols." +HOMEPAGE = "http://telepathy.freedesktop.org/wiki/" +DEPENDS = "glib-2.0 dbus telepathy-glib openssl libxslt-native" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://src/idle.c;beginline=1;endline=19;md5=b06b1e2594423111a1a7910b0eefc7f9" + +SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ + file://fix-svc-gtk-doc.h-target.patch" +SRC_URI[md5sum] = "92a2de5198284cbd3c430b0d1a971a86" +SRC_URI[sha256sum] = "3013ad4b38d14ee630b8cc8ada5e95ccaa849b9a6fe15d2eaf6d0717d76f2fab" + +inherit autotools pkgconfig pythonnative + +FILES_${PN} += "${datadir}/telepathy \ + ${datadir}/dbus-1" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch new file mode 100644 index 000000000..fcc2f0821 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch @@ -0,0 +1,27 @@ +From b3da0d8677b7e8467367a303c18551c56ed20e15 Mon Sep 17 00:00:00 2001 +From: Philip Balister <philip@balister.org> +Date: Tue, 12 Apr 2016 17:30:15 -0400 +Subject: [PATCH] Forcibly disable check for Qt5. + +Signed-off-by: Philip Balister <philip@balister.org> +--- + build/cmake/DefineOptions.cmake | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake +index 62e240f..f8b4493 100644 +--- a/build/cmake/DefineOptions.cmake ++++ b/build/cmake/DefineOptions.cmake +@@ -52,9 +52,6 @@ CMAKE_DEPENDENT_OPTION(WITH_LIBEVENT "Build with libevent support" ON + find_package(Qt4 QUIET COMPONENTS QtCore QtNetwork) + CMAKE_DEPENDENT_OPTION(WITH_QT4 "Build with Qt4 support" ON + "QT4_FOUND" OFF) +-find_package(Qt5 QUIET COMPONENTS Core Network) +-CMAKE_DEPENDENT_OPTION(WITH_QT5 "Build with Qt5 support" ON +- "Qt5_FOUND" OFF) + if(${WITH_QT4} AND ${WITH_QT5} AND ${CMAKE_MAJOR_VERSION} LESS 3) + # cmake < 3.0.0 causes conflict when building both Qt4 and Qt5 + set(WITH_QT4 OFF) +-- +2.5.5 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch new file mode 100644 index 000000000..7cc8d1739 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch @@ -0,0 +1,110 @@ +From bc577820ad25795543b31f123e309cdaebc7d6c6 Mon Sep 17 00:00:00 2001 +From: Cody P Schafer <dev@codyps.com> +Date: Mon, 16 May 2016 15:21:10 -0400 +Subject: [PATCH 1/2] THRIFT-3828 In cmake avoid use of both quoted paths and + SYSTEM with include_directories() + +This allows us to avoid issues where there are no paths to be added to +the include path (include_directories() errors when given an empty +string). + +Specifically, gcc-6 requires that libraries stop passing paths like +'/usr/include' (or they will get libstdc++ build errors), so these paths +will be empty more often in the future. +--- + lib/cpp/CMakeLists.txt | 8 ++++---- + lib/cpp/test/CMakeLists.txt | 2 +- + test/cpp/CMakeLists.txt | 6 +++--- + tutorial/cpp/CMakeLists.txt | 2 +- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index 4c7caeb..a716ac3 100755 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -24,7 +24,7 @@ else() + find_package(Boost 1.53.0 REQUIRED) + endif() + +-include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") ++include_directories(${Boost_INCLUDE_DIRS}) + include_directories(src) + + # SYSLIBS contains libraries that need to be linked to all lib targets +@@ -104,7 +104,7 @@ if(OPENSSL_FOUND AND WITH_OPENSSL) + src/thrift/transport/TSSLSocket.cpp + src/thrift/transport/TSSLServerSocket.cpp + ) +- include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") ++ include_directories(${OPENSSL_INCLUDE_DIR}) + list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}") + endif() + +@@ -162,7 +162,7 @@ TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS}) + + if(WITH_LIBEVENT) + find_package(Libevent REQUIRED) # Libevent comes with CMake support form upstream +- include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS}) ++ include_directories(${LIBEVENT_INCLUDE_DIRS}) + + ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES}) + TARGET_LINK_LIBRARIES_THRIFT(thriftnb ${SYSLIBS} ${LIBEVENT_LIBRARIES}) +@@ -171,7 +171,7 @@ endif() + + if(WITH_ZLIB) + find_package(ZLIB REQUIRED) +- include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS}) ++ include_directories(${ZLIB_INCLUDE_DIRS}) + + ADD_LIBRARY_THRIFT(thriftz ${thriftcppz_SOURCES}) + TARGET_LINK_LIBRARIES_THRIFT(thriftz ${SYSLIBS} ${ZLIB_LIBRARIES}) +diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt +index 5de9fc4..c956c38 100644 +--- a/lib/cpp/test/CMakeLists.txt ++++ b/lib/cpp/test/CMakeLists.txt +@@ -20,7 +20,7 @@ + # Find required packages + set(Boost_USE_STATIC_LIBS ON) # Force the use of static boost test framework + find_package(Boost 1.53.0 REQUIRED COMPONENTS chrono filesystem system thread unit_test_framework) +-include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") ++include_directories(${Boost_INCLUDE_DIRS}) + + #Make sure gen-cpp files can be included + include_directories("${CMAKE_CURRENT_BINARY_DIR}") +diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt +index 2d75f2e..b1409de 100755 +--- a/test/cpp/CMakeLists.txt ++++ b/test/cpp/CMakeLists.txt +@@ -22,13 +22,13 @@ include(ThriftMacros) + + set(Boost_USE_STATIC_LIBS ON) + find_package(Boost 1.53.0 REQUIRED COMPONENTS program_options system filesystem) +-include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") ++include_directories(${Boost_INCLUDE_DIRS}) + + find_package(OpenSSL REQUIRED) +-include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") ++include_directories(${OPENSSL_INCLUDE_DIR}) + + find_package(Libevent REQUIRED) # Libevent comes with CMake support from upstream +-include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS}) ++include_directories(${LIBEVENT_INCLUDE_DIRS}) + + #Make sure gen-cpp files can be included + include_directories("${CMAKE_CURRENT_BINARY_DIR}") +diff --git a/tutorial/cpp/CMakeLists.txt b/tutorial/cpp/CMakeLists.txt +index 2b0c143..5ecae17 100644 +--- a/tutorial/cpp/CMakeLists.txt ++++ b/tutorial/cpp/CMakeLists.txt +@@ -18,7 +18,7 @@ + # + + find_package(Boost 1.53.0 REQUIRED) +-include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") ++include_directories(${Boost_INCLUDE_DIRS}) + + #Make sure gen-cpp files can be included + include_directories("${CMAKE_CURRENT_BINARY_DIR}") +-- +2.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch new file mode 100644 index 000000000..f13adbb6b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch @@ -0,0 +1,40 @@ +From f6cad0580e5391c37af7f60adddb71bf1a403dc4 Mon Sep 17 00:00:00 2001 +From: Cody P Schafer <dev@codyps.com> +Date: Fri, 9 Sep 2016 15:50:26 -0400 +Subject: [PATCH 2/2] THRIFT-3831 in test/cpp explicitly use `signed char` + +`char`'s signed-ness is implimentation dependent, and in the case where +`char` was not signed, we previously recieved errors like + + thrift/0.9.3-r0/git/test/cpp/src/TestClient.cpp:404:15: error: narrowing conversion of '-127' from 'int' to 'char' inside { } [-Wnarrowing] + +(This example from gcc-6 on arm) +--- + test/cpp/src/TestClient.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp +index e709899..4a961f8 100644 +--- a/test/cpp/src/TestClient.cpp ++++ b/test/cpp/src/TestClient.cpp +@@ -383,7 +383,7 @@ int main(int argc, char** argv) { + * BINARY TEST + */ + printf("testBinary([-128..127]) = {"); +- const char bin_data[256] ++ const signed char bin_data[256] + = {-128, -127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, + -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, + -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, +@@ -404,7 +404,7 @@ int main(int argc, char** argv) { + 127}; + try { + string bin_result; +- testClient.testBinary(bin_result, string(bin_data, 256)); ++ testClient.testBinary(bin_result, string(reinterpret_cast<const char *>(bin_data), 256)); + if (bin_result.size() != 256) { + printf("}\n*** FAILED ***\n"); + printf("invalid length: %lu\n", bin_result.size()); +-- +2.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb new file mode 100644 index 000000000..aa9328371 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb @@ -0,0 +1,64 @@ +SUMMARY = "Apache Thrift" +DESCRIPTION = "A software framework, for scalable cross-language services development" +HOMEPAGE = "https://thrift.apache.org/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e4ed21f679b2aafef26eac82ab0c2cbf \ + file://NOTICE;md5=115f49498b66b494b0472658f2bfe80b" + +DEPENDS = "thrift-native boost flex-native bison-native openssl" + +SRC_URI = "http://mirror.switch.ch/mirror/apache/dist/thrift/${PV}/${BPN}-${PV}.tar.gz \ + file://0001-Forcibly-disable-check-for-Qt5.patch \ + file://0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch \ + file://0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch \ +" + +SRC_URI[md5sum] = "88d667a8ae870d5adeca8cb7d6795442" +SRC_URI[sha256sum] = "b0740a070ac09adde04d43e852ce4c320564a292f26521c46b78e0641564969e" + +BBCLASSEXTEND = "native nativesdk" + +inherit pkgconfig cmake pythonnative + +export STAGING_INCDIR +export STAGING_LIBDIR +export BUILD_SYS +export HOST_SYS + +EXTRA_OECMAKE = " \ + -DBUILD_LIBRARIES=ON \ + -DBUILD_COMPILER=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TUTORIALS=OFF \ + -DWITH_CPP=ON \ + -DWITH_JAVA=OFF \ + -DWITH_STATIC_LIB=ON \ + -DWITH_SHARED_LIB=ON \ + -DWITH_OPENSSL=ON \ + -DWITH_QT4=OFF \ + -DWITH_QT5=OFF \ +" + +PACKAGECONFIG ??= "libevent glib python" +PACKAGECONFIG[libevent] = "-DWITH_LIBEVENT=ON,-DWITH_LIBEVENT=OFF,libevent," +PACKAGECONFIG[python] = "-DWITH_PYTHON=ON,-DWITH_PYTHON=OFF,python," +PACKAGECONFIG[glib] = "-DWITH_C_GLIB=ON,-DWITH_C_GLIB=OFF,glib-2.0 ," + +do_install_append () { + ln -sf thrift ${D}/${bindir}/thrift-compiler +} + +LEAD_SONAME = "libthrift.so.${PV}" + +# thrift packages +PACKAGE_BEFORE_PN = "${PN}-compiler lib${BPN}" +FILES_lib${BPN} = "${libdir}/*.so.*" +FILES_${PN}-compiler = "${bindir}/*" + +# The thrift packages just pulls in some default dependencies but is otherwise empty +RRECOMMENDS_${PN} = "${PN}-compiler lib${BPN}" +ALLOW_EMPTY_${PN} = "1" +RRECOMMENDS_${PN}_class-native = "" +RRECOMMENDS_${PN}_class-nativesdk = "" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-Add-format-string-to-fprintf-call.patch b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-Add-format-string-to-fprintf-call.patch new file mode 100644 index 000000000..8e5f4da36 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-Add-format-string-to-fprintf-call.patch @@ -0,0 +1,26 @@ +From a0ad5128d14b022239445e251cf4a9826e86aa96 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 27 Jun 2017 07:48:31 -0700 +Subject: [PATCH] Add format string to fprintf() call + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/vt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vt.c b/src/vt.c +index 795d393..a533d3d 100644 +--- a/src/vt.c ++++ b/src/vt.c +@@ -499,7 +499,7 @@ static int vt_cmd_dump_candidates(const struct vt_handle *vh, + } + llen += cmdlen; + +- ret = fprintf(vh->vh_stream, e->cmd); ++ ret = fprintf(vh->vh_stream, "%s", e->cmd); + if (ret < 0) + return ret; + +-- +2.13.2 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch new file mode 100644 index 000000000..8192056d1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch @@ -0,0 +1,49 @@ +From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 4 Mar 2018 22:30:30 -0800 +Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h + +Fixes +main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'? + signal(SIGCLD, sig_child); + ^~~~~~ + SIGCHLD + +main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration] + umask(0); + ^~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/main.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 3cf4072..cd34196 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -31,6 +31,7 @@ + #include <sys/ioctl.h> + #include <sys/wait.h> + #include <sys/param.h> ++#include <sys/types.h> + #include <pthread.h> + #include <fcntl.h> + #include <unistd.h> +@@ -126,9 +127,9 @@ static void daemon_start(int ignsigcld) + + if (ignsigcld) { + #ifdef SIGTSTP +- signal(SIGCLD, sig_child); ++ signal(SIGCHLD, sig_child); + #else +- signal(SIGCLD, SIG_IGN); ++ signal(SIGCHLD, SIG_IGN); + #endif + } + } +-- +2.16.2 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch new file mode 100644 index 000000000..90d12da14 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch @@ -0,0 +1,143 @@ +From 19b6cf8099e1974b5fc39086fc54103b0cbc2658 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 4 Mar 2018 23:01:25 -0800 +Subject: [PATCH 2/2] replace PTHREAD_MUTEX_FAST_NP with PTHREAD_MUTEX_NORMAL + +PTHREAD_MUTEX_FAST_NP is not available on non-posix systems +e.g. musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/ha.c | 2 +- + src/icmp6.c | 2 +- + src/mh.c | 2 +- + src/mn.c | 2 +- + src/movement.c | 2 +- + src/mpdisc_ha.c | 2 +- + src/mpdisc_mn.c | 2 +- + src/tqueue.c | 2 +- + src/tunnelctl.c | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/ha.c b/src/ha.c +index fbdcff0..b2f811e 100644 +--- a/src/ha.c ++++ b/src/ha.c +@@ -1246,7 +1246,7 @@ int ha_init(void) + { + pthread_mutexattr_t mattrs; + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&bu_worker_mutex, &mattrs) || + pthread_cond_init(&cond, NULL)) + return -1; +diff --git a/src/icmp6.c b/src/icmp6.c +index 3695135..6460634 100644 +--- a/src/icmp6.c ++++ b/src/icmp6.c +@@ -243,7 +243,7 @@ int icmp6_init(void) + return -1; + /* create ICMP listener thread */ + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&icmp6_sock.send_mutex, &mattrs) || + pthread_rwlock_init(&handler_lock, NULL) || + pthread_create(&icmp6_listener, NULL, icmp6_listen, NULL)) +diff --git a/src/mh.c b/src/mh.c +index 60e345e..7928f4c 100644 +--- a/src/mh.c ++++ b/src/mh.c +@@ -204,7 +204,7 @@ int mh_init(void) + return -1; + + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&mh_sock.send_mutex, &mattrs) || + pthread_rwlock_init(&handler_lock, NULL) || + pthread_create(&mh_listener, NULL, mh_listen, NULL)) +diff --git a/src/mn.c b/src/mn.c +index 092cfcb..8f7f448 100644 +--- a/src/mn.c ++++ b/src/mn.c +@@ -1478,7 +1478,7 @@ static struct home_addr_info *hai_copy(struct home_addr_info *conf_hai) + if (hai != NULL) { + pthread_mutexattr_t mattrs; + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + + memcpy(hai, conf_hai, sizeof(struct home_addr_info)); + +diff --git a/src/movement.c b/src/movement.c +index d985937..6400448 100644 +--- a/src/movement.c ++++ b/src/movement.c +@@ -2013,7 +2013,7 @@ int md_init(void) + int val; + + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&iface_lock, &mattrs)) + return -1; + +diff --git a/src/mpdisc_ha.c b/src/mpdisc_ha.c +index 40ba05f..fd7a90d 100644 +--- a/src/mpdisc_ha.c ++++ b/src/mpdisc_ha.c +@@ -559,7 +559,7 @@ int mpd_ha_init(void) + { + pthread_mutexattr_t mattrs; + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&mpa_lock, &mattrs) || + pthread_rwlock_init(&prefix_lock, NULL) || + hash_init(&mpa_hash, DOUBLE_ADDR, MPA_BUCKETS) < 0) +diff --git a/src/mpdisc_mn.c b/src/mpdisc_mn.c +index 4873bd6..ada02bd 100644 +--- a/src/mpdisc_mn.c ++++ b/src/mpdisc_mn.c +@@ -267,7 +267,7 @@ int mpd_mn_init(void) + { + pthread_mutexattr_t mattrs; + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&mps_lock, &mattrs)) + return -1; + if (hash_init(&mps_hash, DOUBLE_ADDR, MPS_BUCKETS) < 0) +diff --git a/src/tqueue.c b/src/tqueue.c +index 2f7aa0b..9c185b8 100644 +--- a/src/tqueue.c ++++ b/src/tqueue.c +@@ -65,7 +65,7 @@ int taskqueue_init(void) + { + pthread_mutexattr_t mattrs; + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&mutex, &mattrs) || + pthread_cond_init(&cond, NULL) || + pthread_create(&tq_runner, NULL, runner, NULL)) +diff --git a/src/tunnelctl.c b/src/tunnelctl.c +index 23fc20b..813b8ec 100644 +--- a/src/tunnelctl.c ++++ b/src/tunnelctl.c +@@ -433,7 +433,7 @@ int tunnelctl_init(void) + return -1; + + pthread_mutexattr_init(&mattrs); +- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); ++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); + if (pthread_mutex_init(&tnl_lock, &mattrs)) + return -1; + +-- +2.16.2 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch new file mode 100644 index 000000000..dbf008264 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch @@ -0,0 +1,23 @@ +When "make -j10", the compilation will fail, +because scan.c has included gram.h, but gram.h was produced +after scan.c was compiled + +So add this dependency to ensure that gram.h is produced +before scan.c is produced. + +Upstream-Status: Inappropriate [upstream is not active] + +Signed-off-by: Roy.Li <RongQing.Li@windriver.com> +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + src/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -81,3 +81,5 @@ CLEANFILES = gram.c gram.h \ + + DISTCLEANFILES = $(BUILT_SOURCES) + MAINTAINERCLEANFILES = Makefile.in ++ ++scan.c: gram.h diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d new file mode 100755 index 000000000..ebd70a6cc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d @@ -0,0 +1,112 @@ +#!/bin/sh +# +# mip6d Start script for the Mobile IPv6 daemon +# +# chkconfig: - 55 25 +# description: The mobile IPv6 daemon allows nodes to remain \ +# reachable while moving around in the IPv6 Internet. +# processname: mip6d +# config: /etc/mip6d.conf +# config: /etc/sysconfig/mip6d +# +### BEGIN INIT INFO +# Provides: mipv6-daemon +# Required-Start: $local_fs $remote_fs $network $named +# Required-Stop: $local_fs $remote_fs $network +# Should-Start: $syslog +# Should-Stop: $network $syslog +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: Start and stop Mobile IPV6 daemon +# Description: The mobile IPv6 daemon allows nodes to remain +# reachable while moving around in the IPv6 Internet. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +if [ -f /etc/sysconfig/mip6d ]; then + . /etc/sysconfig/mip6d +fi + +mip6d=/usr/sbin/mip6d +prog="mip6d" +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $mip6d ] || exit 5 + echo -n $"Starting $prog: " + start-stop-daemon -S -x ${mip6d} && success || failure + retval=$? + echo + [ $retval -eq 0 ] && touch ${lockfile} + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + start-stop-daemon -K -x $mip6d + retval=$? + echo + [ $retval -eq 0 ] && rm -f ${lockfile} + return $retval +} + +restart() { + stop + start +} + +reload() +{ + echo -n $"Reloading $prog configuration: " + killproc $mip6d -HUP + retval=$? + echo + return $retval +} + +force_reload() { + restart +} + +rh_status() { + status $prog +} + +rh_status_q() { + rh_status > /dev/null 2>&1 +} + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $prog {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d.service b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d.service new file mode 100644 index 000000000..2b5a5b9f1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/files/mip6d.service @@ -0,0 +1,10 @@ +[Unit] +Description=MIPL Mobile IPv6 +After=network.target + +[Service] +EnvironmentFile=-@SYSCONFDIR@/sysconfig/mip6d +ExecStart=@SBINDIR@/mip6d $ARGS + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb b/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb new file mode 100644 index 000000000..0c120bfd8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb @@ -0,0 +1,42 @@ +SUMMARY = "Mobile IPv6 and NEMO for Linux" +DESCRIPTION = "UMIP is an open source implementation of Mobile IPv6 and NEMO \ +Basic Support for Linux. It is released under the GPLv2 license. It supports \ +the following IETF RFC: RFC6275 (Mobile IPv6), RFC3963 (NEMO), RFC3776 and \ +RFC4877 (IPsec and IKEv2)." +HOMEPAGE = "http://umip.org/" +SECTION = "System Environment/Base" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33" +DEPENDS = "rpm indent-native" + +SRC_URI = "git://github.com/jlanza/umip \ + file://add-dependency-to-support-parallel-compilation.patch \ + file://mip6d \ + file://mip6d.service \ + file://0001-Add-format-string-to-fprintf-call.patch \ + file://0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch \ + file://0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch \ + " +SRCREV = "7d67209cd1bba2dd0e183a0fa07eeef07964dd14" + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--enable-vt" + +inherit autotools-brokensep systemd update-rc.d + +INITSCRIPT_NAME = "mip6d" +INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." + +SYSTEMD_SERVICE_${PN} = "mip6d.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append() { + install -D -m 0755 ${WORKDIR}/mip6d ${D}${sysconfdir}/init.d/mip6d + install -D -m 0644 ${WORKDIR}/mip6d.service ${D}${systemd_system_unitdir}/mip6d.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_system_unitdir}/mip6d.service +} + +RRECOMMENDS_${PN} = "kernel-module-mip6 kernel-module-ipv6" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb new file mode 100644 index 000000000..4365aa4bc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "This daemon is in charge of multiplexing connections over USB to an iPhone or iPod touch." +LICENSE = "GPLv3 & GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=ebb5c50ab7cab4baeffba14977030c07 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=6ab17b41640564434dda85c06b7124f7" + +DEPENDS = "udev libusb1" + +inherit cmake pkgconfig gitpkgv + +PKGV = "${GITPKGVTAG}" + +SRCREV = "919587580c5e77f3936f3432115d2e10c7bac7c5" +SRC_URI = "git://git.sukimashita.com/usbmuxd.git;protocol=http" + +S = "${WORKDIR}/git" + +FILES_${PN} += "${base_libdir}/udev/rules.d/" + +# fix usbmuxd installing files to /usr/lib64 on 64bit hosts: +EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[plist] = "-DWANT_PLIST=1,-DWANT_PLIST=0,libplist" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch new file mode 100644 index 000000000..eec5a5d64 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch @@ -0,0 +1,20 @@ +Remove warnings found by lintian +Last-Update: 2011-01-09 +Index: wvdial-1.61/pon.wvdial.1 +=================================================================== +--- wvdial-1.61.orig/pon.wvdial.1 2011-01-09 21:33:03.000000000 +0300 ++++ wvdial-1.61/pon.wvdial.1 2011-01-09 21:33:15.000000000 +0300 +@@ -8,13 +8,11 @@ + .SH DESCRIPTION + .B pon.wvdial + .br +-.TR + .B poff.wvdial + .br + .RS + Replacement scripts for pon and poff. + .RE +-\." + .SH SEE ALSO + .BR wvdial (1), + .BR pon (1), diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb new file mode 100644 index 000000000..3a71fb979 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb @@ -0,0 +1,32 @@ +HOMEPAGE = "http://www.alumnit.ca/wiki/?WvDial" +DESCRIPTION = "WvDial is a program that makes it easy to connect your Linux workstation to the Internet." + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" + +inherit pkgconfig + +DEPENDS = "wvstreams" +RDEPENDS_${PN} = "ppp" + +SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.bz2 \ + file://typo_pon.wvdial.1.patch \ + " + +SRC_URI[md5sum] = "37e9a2d664effe4efd44c0e1a20136de" +SRC_URI[sha256sum] = "99906d9560cbdbc97e1855e7b0a7169f1e11983be3ac539140423f09debced82" + +EXTRA_OEMAKE = "" +export WVLINK="${LD}" + +PARALLEL_MAKE = "" + +BUILD_CPPFLAGS += "-I${STAGING_INCDIR}/wvstreams" + +do_configure() { + sed -i 's/LDFLAGS+=-luniconf/LIBS+=-luniconf/' ${S}/Makefile +} + +do_install() { + oe_runmake prefix=${D}/usr PPPDIR=${D}/etc/ppp/peers install +} diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch new file mode 100644 index 000000000..b092ba2fc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch @@ -0,0 +1,26 @@ +From 7deaf836d1f1b9e4426818584b4267f8c4a095aa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:04:07 -0700 +Subject: [PATCH 1/5] Check for limits.h during configure + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index fe0fa2b..188adfe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -139,6 +139,8 @@ int main() + [Compiler warning on deprecated functions])]) + CPPFLAGS="$CPPFLAGS_save" + ++AC_CHECK_HEADERS(limits.h) ++ + # argp + USE_WVSTREAMS_ARGP=0 + AC_CHECK_HEADERS(argp.h) +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch new file mode 100644 index 000000000..6bc34331d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch @@ -0,0 +1,76 @@ +From 90de630f21ac744a37b3adac1bd84654471744ff Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Aug 2017 22:30:01 -0700 +Subject: [PATCH 1/2] build: fix parallel make + +Imported from Gentoo + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 15 +++++++++++++-- + wvrules-posix.mk | 7 +++++-- + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 72c8bef..5a4cfb2 100644 +--- a/Makefile ++++ b/Makefile +@@ -131,12 +131,19 @@ utils/tests/%: PRELIBS+=$(LIBWVSTREAMS) + # libwvstreams: stream/event handling library + # + TARGETS += libwvstreams.so +-TARGETS += crypto/tests/ssltest ipstreams/tests/unixtest ++TARGETS += crypto/tests/ssltest ++crypto/tests/ssltest: $(LIBWVSTREAMS) ++ ++TARGETS += ipstreams/tests/unixtest ++ipstreams/tests/unixtest: $(LIBWVSTREAMS) ++ + TARGETS += crypto/tests/printcert ++crypto/tests/printcert: $(LIBWVSTREAMS) + + ifndef _MACOS + ifneq ("$(with_readline)", "no") + TARGETS += ipstreams/tests/wsd ++ ipstreams/tests/wsd: $(LIBWVSTREAMS) + ipstreams/tests/wsd-LIBS += -lreadline + else + TEST_SKIP_OBJS += ipstreams/tests/wsd +@@ -179,7 +186,11 @@ uniconf/tests/%: PRELIBS+=$(LIBUNICONF) + # + ifneq ("$(with_dbus)", "no") + TARGETS += libwvdbus.so +- TARGETS += dbus/tests/wvdbus dbus/tests/wvdbusd ++ TARGETS += dbus/tests/wvdbus ++ dbus/tests/wvdbus: $(LIBWVDBUS) ++ ++ TARGETS += dbus/tests/wvdbusd ++ dbus/tests/wvdbusd: $(LIBWVDBUS) + TESTS += $(call tests_cc,dbus/tests) + libwvdbus_OBJS += $(call objects,dbus) + libwvdbus.so: $(libwvdbus_OBJS) $(LIBWVSTREAMS) +diff --git a/wvrules-posix.mk b/wvrules-posix.mk +index f94d2cd..2e99f36 100644 +--- a/wvrules-posix.mk ++++ b/wvrules-posix.mk +@@ -80,12 +80,15 @@ define wvlink_ar + $(AR) s $1 + endef + +-CC: FORCE ++CC: + @CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS)/gen-cc CC c + +-CXX: FORCE ++CXX: + @CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS)/gen-cc CXX cc + ++#All files must depend on the above two rules. This is a godawful hack. ++$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX ++ + wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS) +-- +2.14.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch new file mode 100644 index 000000000..59f70e380 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch @@ -0,0 +1,29 @@ +From 4afff42714a15cb796d3589d87c6fac4558b2c95 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Aug 2017 22:33:32 -0700 +Subject: [PATCH 2/2] wvrules.mk: Use _DEFAULT_SOURCE + +Fixes warnings with newer glibc +warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + wvrules.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wvrules.mk b/wvrules.mk +index 877f700..124bffd 100644 +--- a/wvrules.mk ++++ b/wvrules.mk +@@ -83,7 +83,7 @@ runtests: + + INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH)) + CPPFLAGS+=$(INCFLAGS) \ +- -D_BSD_SOURCE -D_GNU_SOURCE $(OSDEFINE) \ ++ -D_DEFAULT_SOURCE $(OSDEFINE) \ + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ + -DUNSTABLE + +-- +2.14.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch new file mode 100644 index 000000000..232db9e63 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch @@ -0,0 +1,135 @@ +From 0e054339c1422168a7f4a9dcf090268053a33b1f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:05:37 -0700 +Subject: [PATCH 2/5] wvtask: Dont use ucontext on non-glibc systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvtask.cc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/utils/wvtask.cc b/utils/wvtask.cc +index cdcd544..c0bff7d 100644 +--- a/utils/wvtask.cc ++++ b/utils/wvtask.cc +@@ -199,7 +199,9 @@ WvTaskMan::WvTaskMan() + stacktop = (char *)alloca(0); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&get_stack_return) == 0); ++#endif + if (context_return == 0) + { + // initial setup - start the stackmaster() task (never returns!) +@@ -265,13 +267,17 @@ int WvTaskMan::run(WvTask &task, int val) + state = &old_task->mystate; + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(state) == 0); ++#endif + int newval = context_return; + if (newval == 0) + { + // saved the state, now run the task. + context_return = val; ++#ifdef __GLIBC__ + setcontext(&task.mystate); ++#endif + return -1; + } + else +@@ -319,13 +325,17 @@ int WvTaskMan::yield(int val) + #endif + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(¤t_task->mystate) == 0); ++#endif + int newval = context_return; + if (newval == 0) + { + // saved the task state; now yield to the toplevel. + context_return = val; ++#ifdef __GLIBC__ + setcontext(&toplevel); ++#endif + return -1; + } + else +@@ -341,7 +351,9 @@ int WvTaskMan::yield(int val) + void WvTaskMan::get_stack(WvTask &task, size_t size) + { + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&get_stack_return) == 0); ++#endif + if (context_return == 0) + { + assert(magic_number == -WVTASK_MAGIC); +@@ -371,7 +383,9 @@ void WvTaskMan::get_stack(WvTask &task, size_t size) + // initial setup + stack_target = &task; + context_return = size/1024 + (size%1024 > 0); ++#ifdef __GLIBC__ + setcontext(&stackmaster_task); ++#endif + } + else + { +@@ -409,7 +423,9 @@ void WvTaskMan::_stackmaster() + assert(magic_number == -WVTASK_MAGIC); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&stackmaster_task) == 0); ++#endif + val = context_return; + if (val == 0) + { +@@ -419,7 +435,9 @@ void WvTaskMan::_stackmaster() + // all current stack allocations) and go back to get_stack + // (or the constructor, if that's what called us) + context_return = 1; ++#ifdef __GLIBC__ + setcontext(&get_stack_return); ++#endif + } + else + { +@@ -474,7 +492,9 @@ void WvTaskMan::do_task() + + // back here from longjmp; someone wants stack space. + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&task->mystate) == 0); ++#endif + if (context_return == 0) + { + // done the setjmp; that means the target task now has +@@ -510,7 +530,9 @@ void WvTaskMan::do_task() + } + else + { ++#ifdef __GLIBC__ + assert(getcontext(&task->func_call) == 0); ++#endif + task->func_call.uc_stack.ss_size = task->stacksize; + task->func_call.uc_stack.ss_sp = task->stack; + task->func_call.uc_stack.ss_flags = 0; +@@ -521,9 +543,11 @@ void WvTaskMan::do_task() + (void (*)(void))call_func, 1, task); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&task->func_return) == 0); + if (context_return == 0) + setcontext(&task->func_call); ++#endif + } + + // the task's function terminated. +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch new file mode 100644 index 000000000..f9304197a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch @@ -0,0 +1,27 @@ +From f1fc9f4d523dd8b773a4535176547b0619ec05c6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:08:57 -0700 +Subject: [PATCH 3/5] wvtask: Check for HAVE_LIBC_STACK_END only on glibc + systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvtask.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/wvtask.cc b/utils/wvtask.cc +index c0bff7d..716344b 100644 +--- a/utils/wvtask.cc ++++ b/utils/wvtask.cc +@@ -563,7 +563,7 @@ void WvTaskMan::do_task() + + const void *WvTaskMan::current_top_of_stack() + { +-#ifdef HAVE_LIBC_STACK_END ++#if defined(HAVE_LIBC_STACK_END) && defined(__GLIBC__) + extern const void *__libc_stack_end; + if (use_shared_stack() || current_task == NULL) + return __libc_stack_end; +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch new file mode 100644 index 000000000..6f3fbffbd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch @@ -0,0 +1,28 @@ +From bfe68126693f9159f7ac66a69217e0b5f43e5781 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:11:21 -0700 +Subject: [PATCH 4/5] wvcrash: Replace use of basename API + +musl does not have this API + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvcrash.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/wvcrash.cc b/utils/wvcrash.cc +index 0417759..3d160b7 100644 +--- a/utils/wvcrash.cc ++++ b/utils/wvcrash.cc +@@ -404,7 +404,7 @@ extern void __wvcrash_init_buffers(const char *program_name); + void wvcrash_setup(const char *_argv0, const char *_desc) + { + if (_argv0) +- argv0 = basename(_argv0); ++ argv0 = strrchr(_argv0, '/') ? strrchr(_argv0, '/')+1 : _argv0; + __wvcrash_init_buffers(argv0); + if (_desc) + { +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch new file mode 100644 index 000000000..25e9ee236 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch @@ -0,0 +1,30 @@ +From fd9515f08dcdafea6ae03413fbe5a43a6438fe3e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:25:48 -0700 +Subject: [PATCH 5/5] check for libexecinfo during configure + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 188adfe..1ab4d3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -159,6 +159,12 @@ AC_SEARCH_LIBS([argp_parse], [argp c], [], [ + USE_WVSTREAMS_ARGP=1 + fi + ]) ++ ++USE_LIBEXECINFO=0 ++AC_SEARCH_LIBS([backtrace], [execinfo], [], [ ++USE_LIBEXECINFO=1 ++]) ++ + # Function checks + AC_HEADER_DIRENT + +-- +2.13.3 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff new file mode 100644 index 000000000..5ab633bc3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff @@ -0,0 +1,13 @@ +Index: wvstreams-4.6/crypto/wvx509.cc +=================================================================== +--- wvstreams-4.6.orig/crypto/wvx509.cc 2009-07-29 11:58:16.000000000 -0400 ++++ wvstreams-4.6/crypto/wvx509.cc 2009-07-29 11:58:43.000000000 -0400 +@@ -325,7 +325,7 @@ + } + + int verify_result = X509_REQ_verify(certreq, pk); +- if (verify_result == 0) ++ if (verify_result == 0 || verify_result == -1) + { + debug(WvLog::Warning, "Self signed request failed"); + X509_REQ_free(certreq); diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff new file mode 100644 index 000000000..8e4fd0329 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff @@ -0,0 +1,41 @@ +Index: wvstreams-4.6.1/crypto/wvx509.cc +=================================================================== +--- wvstreams-4.6.1.orig/crypto/wvx509.cc 2011-05-20 00:02:38.119136584 +0200 ++++ wvstreams-4.6.1/crypto/wvx509.cc 2011-05-20 00:02:26.035136589 +0200 +@@ -1157,7 +1157,7 @@ + + if (ext) + { +- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++ X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext); + if (!method) + { + WvDynBuf buf; +Index: wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc +=================================================================== +--- wvstreams-4.6.1.orig/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:38.391136584 +0200 ++++ wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:35.283136585 +0200 +@@ -1,8 +1,6 @@ + #include "wvunixdgsocket.h" +-#ifdef MACOS + #include <sys/types.h> + #include <sys/stat.h> +-#endif + + WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms) + : socketfile(filename) +Index: wvstreams-4.6.1/streams/wvatomicfile.cc +=================================================================== +--- wvstreams-4.6.1.orig/streams/wvatomicfile.cc 2011-05-20 00:02:38.223136584 +0200 ++++ wvstreams-4.6.1/streams/wvatomicfile.cc 2011-05-20 00:02:31.619136587 +0200 +@@ -10,10 +10,7 @@ + #include "wvatomicfile.h" + #include "wvfileutils.h" + #include "wvstrutils.h" +- +-#ifdef MACOS + #include <sys/stat.h> +-#endif + + WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode) + : tmp_file(WvString::null) diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff new file mode 100644 index 000000000..a75067a10 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff @@ -0,0 +1,18 @@ +Description: Fix FTBFS with gcc-4.7 + Small header include change. This is borderlinde cosmetic, but still needed + to prevent the FTBFS. +Author: Paul Tagliamonte <paultag@ubuntu.com> +Origin: vendor +Bug-Debian: http://bugs.debian.org/667418 +Last-Update: 2012-04-13 + +--- wvstreams-4.6.1.orig/utils/wvuid.cc ++++ wvstreams-4.6.1/utils/wvuid.cc +@@ -33,6 +33,7 @@ wvuid_t wvgetuid() + + #else // not WIN32 + ++#include <unistd.h> + + WvString wv_username_from_uid(wvuid_t uid) + { diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff new file mode 100644 index 000000000..ec99dcd36 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff @@ -0,0 +1,32 @@ +Index: b/gen-cc +=================================================================== +--- a/gen-cc ++++ b/gen-cc +@@ -15,6 +15,11 @@ + shift + shift + ++ echo $CC \$MODE -o \$BASE.o \$BASE.$EXT \\ ++ -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\ ++ $CPPFLAGS \\ ++ $CFLAGS \\ ++ "\$@" + $CC \$MODE -o \$BASE.o \$BASE.$EXT \\ + -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\ + $CPPFLAGS \\ +Index: b/wvrules-posix.mk +=================================================================== +--- a/wvrules-posix.mk ++++ b/wvrules-posix.mk +@@ -35,11 +35,6 @@ + # Default compiler we use for linking + WVLINK_CC = $(CXX) + +-ifneq ("$(enable_optimization)", "no") +- CXXFLAGS+=-O2 +- CFLAGS+=-O2 +-endif +- + ifneq ("$(enable_warnings)", "no") + CXXFLAGS+=-Wall -Woverloaded-virtual + CFLAGS+=-Wall diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch new file mode 100644 index 000000000..e85721363 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch @@ -0,0 +1,37 @@ +Check for argp_parse in libargp and then in libc before using internal version + +Index: wvstreams-4.6.1/configure.ac +=================================================================== +--- wvstreams-4.6.1.orig/configure.ac ++++ wvstreams-4.6.1/configure.ac +@@ -142,20 +142,21 @@ CPPFLAGS="$CPPFLAGS_save" + # argp + USE_WVSTREAMS_ARGP=0 + AC_CHECK_HEADERS(argp.h) +-AC_CHECK_FUNC(argp_parse) +-if test "$ac_cv_func_argp_parse" != yes \ +- -o "$ac_cv_header_argp_h" != yes ; then +- ( +- echo ++AC_SEARCH_LIBS([argp_parse], [argp c], [], [ ++ ++ if test "$ac_cv_func_argp_parse" != yes \ ++ -o "$ac_cv_header_argp_h" != yes ; then ++ ( ++ echo + echo 'configuring argp...' + cd argp + ./configure --host=$host_cpu-$host_os || exit $? + echo 'argp configured.' + echo +- ) || exit $? +- USE_WVSTREAMS_ARGP=1 +-fi +- ++ ) || exit $? ++ USE_WVSTREAMS_ARGP=1 ++ fi ++]) + # Function checks + AC_HEADER_DIRENT + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch new file mode 100644 index 000000000..b084887ba --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch @@ -0,0 +1,42 @@ +Description: Fix compilation with gcc-6 +Author: Gert Wollny <gw.fossdev@gmail.com> +Last-Updated: 2016-07-26 +Forwarded: No +Bug-Debian: https://bugs.debian.org/811659 +Bug-Debian: https://bugs.debian.org/831146 + +--- a/streams/wvstream.cc ++++ b/streams/wvstream.cc +@@ -907,9 +907,9 @@ + + if (forceable) + { +- si.wants.readable = readcb; +- si.wants.writable = writecb; +- si.wants.isexception = exceptcb; ++ si.wants.readable = static_cast<bool>(readcb); ++ si.wants.writable = static_cast<bool>(writecb); ++ si.wants.isexception = static_cast<bool>(exceptcb); + } + else + { +@@ -1019,7 +1019,8 @@ + + IWvStream::SelectRequest WvStream::get_select_request() + { +- return IWvStream::SelectRequest(readcb, writecb, exceptcb); ++ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb), ++ static_cast<bool>(exceptcb)); + } + + +@@ -1107,7 +1108,8 @@ + // inefficient, because if the alarm was expired then pre_select() + // returned true anyway and short-circuited the previous select(). + TRACE("hello-%p\n", this); +- return !alarm_was_ticking || select(0, readcb, writecb, exceptcb); ++ return !alarm_was_ticking || select(0, static_cast<bool>(readcb), ++ static_cast<bool>(writecb), static_cast<bool>(exceptcb)); + } + + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb new file mode 100644 index 000000000..e3d5e7d20 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb @@ -0,0 +1,56 @@ +HOMEPAGE = "http://alumnit.ca/wiki/index.php?page=WvStreams" +SUMMARY = "WvStreams is a network programming library in C++" + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" + +DEPENDS = "zlib openssl (>= 0.9.8) dbus readline" +DEPENDS_append_libc-musl = " argp-standalone libexecinfo" + +SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz \ + file://04_signed_request.diff \ + file://05_gcc.diff \ + file://06_gcc-4.7.diff \ + file://07_buildflags.diff \ + file://gcc-6.patch \ + file://argp.patch \ + file://0001-Check-for-limits.h-during-configure.patch \ + file://0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch \ + file://0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch \ + file://0004-wvcrash-Replace-use-of-basename-API.patch \ + file://0005-check-for-libexecinfo-during-configure.patch \ + file://0001-build-fix-parallel-make.patch \ + file://0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch \ + " + +SRC_URI[md5sum] = "2760dac31a43d452a19a3147bfde571c" +SRC_URI[sha256sum] = "8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633" + +inherit autotools-brokensep pkgconfig + +TARGET_CFLAGS_append = " -fno-tree-dce -fno-optimize-sibling-calls" + +LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib" + +EXTRA_OECONF = " --without-tcl --without-qt --without-pam --without-valgrind" + +PACKAGES_prepend = "libuniconf libuniconf-dbg " +PACKAGES_prepend = "uniconfd uniconfd-dbg " +PACKAGES_prepend = "libwvstreams-base libwvstreams-base-dbg " +PACKAGES_prepend = "libwvstreams-extras libwvstreams-extras-dbg " +PACKAGES_prepend = "${PN}-valgrind " + +FILES_libuniconf = "${libdir}/libuniconf.so.*" +FILES_libuniconf-dbg = "${libdir}/.debug/libuniconf.so.*" + +FILES_uniconfd = "${sbindir}/uniconfd ${sysconfdir}/uniconf.conf ${localstatedir}/uniconf" +FILES_uniconfd-dbg = "${sbindir}/.debug/uniconfd" + +FILES_libwvstreams-base = "${libdir}/libwvutils.so.*" +FILES_libwvstreams-base-dbg = "${libdir}/.debug/libwvutils.so.*" + +FILES_libwvstreams-extras = "${libdir}/libwvbase.so.* ${libdir}/libwvstreams.so.*" +FILES_libwvstreams-extras-dbg = "${libdir}/.debug/libwvbase.so.* ${libdir}/.debug/libwvstreams.so.*" + +FILES_${PN}-valgrind = "${libdir}/valgrind/wvstreams.supp" +RDEPENDS_${PN} += "perl" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch new file mode 100644 index 000000000..af14a1a56 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch @@ -0,0 +1,23 @@ +uname can not get version of kernel correctly while cross compile + +Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 523899b..4e6ae0d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -924,7 +924,7 @@ AC_MSG_RESULT([$ARCH ($host_os)]) + if test "x$ARCH" = "xlinux"; then + AC_MSG_CHECKING([for the linux kernel version]) + +- kernel=`uname -r` ++ kernel="${KERNEL_VERSION}" + + case "${kernel}" in + 2.6.*) +-- +1.8.3.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service new file mode 100644 index 000000000..b18a96f8b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service @@ -0,0 +1,12 @@ +[Unit] +Description=Zabbix Monitor Agent +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/zabbix_agentd +RemainAfterExit=yes +User=zabbix + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb new file mode 100644 index 000000000..bab5a6ae6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb @@ -0,0 +1,75 @@ +SUMMARY = "Open-source monitoring solution for your IT infrastructure" +DESCRIPTION = "\ +ZABBIX is software that monitors numerous parameters of a network and the \ +health and integrity of servers. ZABBIX uses a flexible notification \ +mechanism that allows users to configure e-mail based alerts for virtually \ +any event. This allows a fast reaction to server problems. ZABBIX offers \ +excellent reporting and data visualisation features based on the stored \ +data. This makes ZABBIX ideal for capacity planning. \ +\ +ZABBIX supports both polling and trapping. All ZABBIX reports and \ +statistics, as well as configuration parameters are accessed through a \ +web-based front end. A web-based front end ensures that the status of \ +your network and the health of your servers can be assessed from any \ +location. Properly configured, ZABBIX can play an important role in \ +monitoring IT infrastructure. This is equally true for small \ +organisations with a few servers and for large companies with a \ +multitude of servers." +HOMEPAGE = "http://www.zabbix.com/" +SECTION = "Applications/Internet" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=300e938ad303147fede2294ed78fe02e" +DEPENDS = "openldap virtual/libiconv" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${BPN}-${PV}.tar.gz \ + file://0001-Fix-configure.ac.patch \ + file://zabbix-agent.service \ +" + +SRC_URI[md5sum] = "489d21b464277c0d412155c7e5611a8f" +SRC_URI[sha256sum] = "4445f26c025009681c29c9b350aa6c4ee7b124ddcaf1609ae36c55997bcb8cf2" + +inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "zabbix-agent.service" +SYSTEMD_AUTO_ENABLE = "enable" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-r zabbix" +USERADD_PARAM_${PN} = "-r -g zabbix -d /var/lib/zabbix \ + -s /sbin/nologin -c \"Zabbix Monitoring System\" zabbix \ +" + +KERNEL_VERSION = "${@get_kernelversion_headers('${STAGING_KERNEL_DIR}')}" + +EXTRA_OECONF = " \ + --enable-dependency-tracking \ + --enable-agent \ + --enable-ipv6 \ + --with-net-snmp \ + --with-ldap=${STAGING_EXECPREFIXDIR} \ + --with-jabber \ + --with-unixodbc \ + --with-ssh2 \ + --with-sqlite3 \ +" +CFLAGS_append = " -lldap -llber" + +do_configure_prepend() { + export KERNEL_VERSION="${KERNEL_VERSION}" +} + +do_install_append() { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/ + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service + fi +} + +FILES_${PN} += "${libdir}" + +RDEPENDS_${PN} = "logrotate" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb new file mode 100644 index 000000000..4920bce8c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "C++ bindings for ZeroMQ" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=db174eaf7b55a34a7c89551197f66e94" +DEPENDS = "zeromq" + +SRCREV = "6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6" +PV = "4.2.3+git${SRCPV}" + +SRC_URI = "git://github.com/zeromq/cppzmq.git" + +S = "${WORKDIR}/git" + +do_install () { + install -d ${D}/usr/include + install -m 0755 ${S}/zmq.hpp ${D}/usr/include/ +} + +PACKAGES = "${PN}-dev" + +RDEPENDS_${PN}-dev = "zeromq-dev" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zeromq/files/run-ptest b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/files/run-ptest new file mode 100755 index 000000000..48b9cd9fc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd tests +for i in `ls *`; do + if [ ./$i ] ; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb new file mode 100644 index 000000000..356348b43 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=d5311495d952062e0e4fbba39cbf3de1" + +PACKAGECONFIG ??= "libsodium" +PACKAGECONFIG[libsodium] = "--with-libsodium, --without-libsodium, libsodium" + +SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV}.tar.gz \ + file://run-ptest \ +" +SRC_URI[md5sum] = "a1c95b34384257e986842f4d006957b8" +SRC_URI[sha256sum] = "cc9090ba35713d59bb2f7d7965f877036c49c5558ea0c290b0dcc6f2a17e489f" + +S = "${WORKDIR}/zeromq-${PV}" + +#Uncomment to choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select +#EXTRA_OECONF += "--with-poller=kqueue" +#CFLAGS_append = " -O0" +#CXXFLAGS_append = " -O0" + +inherit autotools ptest pkgconfig + +do_compile_ptest () { + echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${B}/Makefile + oe_runmake buildtest-TESTS +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/tests/.libs/test_* ${D}${PTEST_PATH}/tests +} |