diff options
author | 2020-03-30 09:24:26 +0900 | |
---|---|---|
committer | 2020-03-30 09:24:26 +0900 | |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-connectivity | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-connectivity')
121 files changed, 6649 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammu-smsdrc b/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammu-smsdrc new file mode 100644 index 00000000..da413c2d --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammurc b/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu/gammurc new file mode 100644 index 00000000..b55d739f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb new file mode 100644 index 00000000..44411751 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch new file mode 100644 index 00000000..5535a3c5 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch new file mode 100644 index 00000000..4e57bcaa --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch new file mode 100644 index 00000000..e39bbf63 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch new file mode 100644 index 00000000..51036251 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch new file mode 100644 index 00000000..b0e1df31 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch new file mode 100644 index 00000000..72c7d51e --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch new file mode 100644 index 00000000..d0978c79 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig new file mode 100644 index 00000000..27896401 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd-CVE-2018-14526.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd-CVE-2018-14526.patch new file mode 100644 index 00000000..522fc394 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd-CVE-2018-14526.patch @@ -0,0 +1,44 @@ +hostapd-2.6: Fix CVE-2018-14526 + +[No upstream tracking] -- https://w1.fi/security/2018-1/unauthenticated-eapol-key-decryption.txt + +wpa: Ignore unauthenticated encrypted EAPOL-Key data + +Ignore unauthenticated encrypted EAPOL-Key data in supplicant +processing. When using WPA2, these are frames that have the Encrypted +flag set, but not the MIC flag. + +When using WPA2, EAPOL-Key frames that had the Encrypted flag set but +not the MIC flag, had their data field decrypted without first verifying +the MIC. In case the data field was encrypted using RC4 (i.e., when +negotiating TKIP as the pairwise cipher), this meant that +unauthenticated but decrypted data would then be processed. An adversary +could abuse this as a decryption oracle to recover sensitive information +in the data field of EAPOL-Key messages (e.g., the group key). + +Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/src/rsn_supp/wpa.c?id=3e34cfdff6b192fe337c6fb3f487f73e96582961] +CVE: CVE-2018-14526 +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> + +diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c +index 3c47879..6bdf923 100644 +--- a/src/rsn_supp/wpa.c ++++ b/src/rsn_supp/wpa.c +@@ -2016,6 +2016,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, + + if ((sm->proto == WPA_PROTO_RSN || sm->proto == WPA_PROTO_OSEN) && + (key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) { ++ /* ++ * Only decrypt the Key Data field if the frame's authenticity ++ * was verified. When using AES-SIV (FILS), the MIC flag is not ++ * set, so this check should only be performed if mic_len != 0 ++ * which is the case in this code branch. ++ */ ++ if (!(key_info & WPA_KEY_INFO_MIC)) { ++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, ++ "WPA: Ignore EAPOL-Key with encrypted but unauthenticated data"); ++ goto out; ++ } + if (wpa_supplicant_decrypt_key_data(sm, key, ver, key_data, + &key_data_len)) + goto out; diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd.service b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/hostapd.service new file mode 100644 index 00000000..151c0504 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/init b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/init new file mode 100644 index 00000000..8ba4e079 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb new file mode 100644 index 00000000..42aae427 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb @@ -0,0 +1,59 @@ +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 \ + file://hostapd-CVE-2018-14526.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/external/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb new file mode 100644 index 00000000..10b04bb5 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch new file mode 100644 index 00000000..cbd5d71f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/crosscompile_nm.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/crosscompile_nm.patch new file mode 100644 index 00000000..d3e69375 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/debian-suppress-usr-lib-in-krb5-config.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/debian-suppress-usr-lib-in-krb5-config.patch new file mode 100644 index 00000000..f0182ee5 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server new file mode 100644 index 00000000..e097353c --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-kdc b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-kdc new file mode 100644 index 00000000..310bfcf8 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-admin-server b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-admin-server new file mode 100755 index 00000000..79238d4f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-kdc b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/init.d/krb5-kdc new file mode 100755 index 00000000..865d1b97 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service new file mode 100644 index 00000000..21939a1f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service new file mode 100644 index 00000000..bf37c45b --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.1.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.1.bb new file mode 100644 index 00000000..11748cbd --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.1.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=7f95bc3d8d0351aa481d56d5e9de20c3" +DEPENDS = "bison-native 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] = "848e9b80d6aaaa798e3f3df24b83c407" +SRC_URI[sha256sum] = "214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117" + +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/external/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb new file mode 100644 index 00000000..a5838d36 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libev/libev_4.24.bb @@ -0,0 +1,20 @@ +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" + +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/external/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch new file mode 100644 index 00000000..679a8b59 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb new file mode 100644 index 00000000..908b98d8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb @@ -0,0 +1,22 @@ +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 libusbmuxd libtasn1 gnutls libgcrypt" + +SRCREV = "fb71aeef10488ed7b0e60a1c8a553193301428c0" +PV = "1.2.0+git${SRCPV}" +SRC_URI = "\ + git://github.com/libimobiledevice/libimobiledevice;protocol=https \ + file://configure-fix-largefile.patch \ +" + +S = "${WORKDIR}/git" +inherit autotools pkgconfig + +EXTRA_OECONF = " --without-cython " diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim/clang.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim/clang.patch new file mode 100644 index 00000000..92e657c0 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.16.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.16.0.bb new file mode 100644 index 00000000..5260c0f1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.16.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] = "76ea4d8381989919b1d9b91c818fed80" +SRC_URI[sha256sum] = "c8ca50beeddd4b43309df5b698917268303bf176cea58fe4fe53d5bf0e93fac2" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch new file mode 100644 index 00000000..83c58061 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch @@ -0,0 +1,43 @@ +From 4e8eab047a43e48bd541f2887104299fcfb99b0d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Tue, 27 Nov 2018 12:03:20 +0100 +Subject: [PATCH] Use native mtp-hotplug +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + Makefile.am | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7b7e06b..083e1c6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -16,16 +16,16 @@ hwdb_DATA=69-libmtp.hwdb + noinst_DATA=libmtp.usermap libmtp.fdi + + libmtp.usermap: util/mtp-hotplug +- util/mtp-hotplug > libmtp.usermap ++ mtp-hotplug > libmtp.usermap + + @UDEV_RULES@: util/mtp-hotplug +- util/mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ ++ mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ + + libmtp.fdi: util/mtp-hotplug +- util/mtp-hotplug -H > libmtp.fdi ++ mtp-hotplug -H > libmtp.fdi + + $(hwdb_DATA): util/mtp-hotplug +- util/mtp-hotplug -w > $(hwdb_DATA) ++ mtp-hotplug -w > $(hwdb_DATA) + + CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi libmtp.hwdb + endif +-- +2.14.5 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.16.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.16.bb new file mode 100644 index 00000000..596e315b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.16.bb @@ -0,0 +1,50 @@ +# 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=303cc4422fd549ef8689aded20434a9a \ + file://examples/albums.c;beginline=5;endline=21;md5=84f4e55dfec49e898b7f68a828c15620 \ +" + +BBCLASSEXTEND = "native" + +DEPENDS = "libusb1 gettext-native" +DEPENDS_append_class-target = " ${BPN}-native" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" +SRC_URI_append_class-target = " file://0001-Use-native-mtp-hotplug.patch" + +SRC_URI[md5sum] = "7796179af46e90938dde1d0c4d1d1d4c" +SRC_URI[sha256sum] = "5b68f9dd1ed38de558de687f40e255a39e4d5e32ef3de601f0ac19dd5682bba0" + +inherit autotools pkgconfig lib_package + +EXTRA_OECONF += " \ + --disable-rpath \ + --with-udev=${nonarch_base_libdir}/udev \ +" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)}" +PACKAGECONFIG[doxygen] = "--enable-doxygen,--disable-doxygen" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile" +PACKAGECONFIG[mtpz] = "--enable-mtpz,--disable-mtpz,libgcrypt" + +PACKAGES =+ "${BPN}-common ${BPN}-runtime" + +RDEPENDS_${BPN} += "libmtp-common" +RRECOMMENDS_${BPN} += "libmtp-runtime ${PN}-bin" + +FILES_${BPN}-common = "${nonarch_base_libdir}/udev/rules.d/*" +SUMMARY_${BPN}-common = "The udev rules file for MTP devices" + +FILES_${BPN}-runtime = "${nonarch_base_libdir}/udev/mtp-probe" +RDEPENDS_${BPN}-runtime = "libmtp-common" +SUMMARY_${BPN}-runtime = "mtp-probe, used for the MTP udev rules" +DESCRIPTION_${BPN}-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/external/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb new file mode 100644 index 00000000..07a7a1d2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb @@ -0,0 +1,12 @@ +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 \ + " +# tag for v1.6 +SRCREV = "96674e7d4f4d569c2c961e865cc16152dfab5f09" +S = "${WORKDIR}/git" + +inherit autotools diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch new file mode 100644 index 00000000..98008dba --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb new file mode 100644 index 00000000..c9913444 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb @@ -0,0 +1,24 @@ +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" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libnet-dev/files/" +UPSTREAM_CHECK_REGEX = "libnet-(?P<pver>\d+(\.\d+)+-*[a-z]*\d*)\.tar" + +S = "${WORKDIR}/${BPN}-${PV}" + +inherit autotools binconfig + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch new file mode 100644 index 00000000..7a3429b9 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-qmi-network-Don-t-create-invalid-wds-start-network-w.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-qmi-network-Don-t-create-invalid-wds-start-network-w.patch new file mode 100644 index 00000000..d230d680 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-qmi-network-Don-t-create-invalid-wds-start-network-w.patch @@ -0,0 +1,41 @@ +From 8269f4d86927fbe19e78776a12736680fe9169b6 Mon Sep 17 00:00:00 2001 +From: Adrian Bunk <bunk@stusta.de> +Date: Mon, 1 Oct 2018 16:53:31 +0300 +Subject: [PATCH] qmi-network: Don't create invalid --wds-start-network when + APN is not set + +In 1.20.2 the warning for this was turned into an error. + +(cherry picked from commit 289d8ad6419895e2e1fba3d78a54a0db65da521d) +--- +Upstream-Status: Backport + + utils/qmi-network.in | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/utils/qmi-network.in b/utils/qmi-network.in +index bf7bed9..a9e5299 100755 +--- a/utils/qmi-network.in ++++ b/utils/qmi-network.in +@@ -334,11 +334,13 @@ start_network () + + setup_data_format + +- START_NETWORK_ARGS="apn='$APN'" +- if [ -n "$APN_USER" ]; then +- START_NETWORK_ARGS="${START_NETWORK_ARGS},username='$APN_USER'" +- if [ -n "$APN_PASS" ]; then +- START_NETWORK_ARGS="${START_NETWORK_ARGS},password='$APN_PASS'" ++ if [ -n "$APN" ]; then ++ START_NETWORK_ARGS="apn='$APN'" ++ if [ -n "$APN_USER" ]; then ++ START_NETWORK_ARGS="${START_NETWORK_ARGS},username='$APN_USER'" ++ if [ -n "$APN_PASS" ]; then ++ START_NETWORK_ARGS="${START_NETWORK_ARGS},password='$APN_PASS'" ++ fi + fi + fi + +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.2.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.2.bb new file mode 100644 index 00000000..f0bc81cc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.2.bb @@ -0,0 +1,23 @@ +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 glib-2.0-native" + +inherit autotools pkgconfig bash-completion + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \ + file://0001-qmi-network-Don-t-create-invalid-wds-start-network-w.patch \ + file://0001-Detect-clang.patch \ + " +SRC_URI[md5sum] = "584214476ab75c394160cb85fbccaa1d" +SRC_URI[sha256sum] = "c73459ca8bfe1213f8047858d4946fc1f58e164d4f488a7a6904edee25e2ca44" + +PACKAGECONFIG ??= "udev mbim" +PACKAGECONFIG[udev] = ",--without-udev,libgudev" +PACKAGECONFIG[mbim] = "--enable-mbim-qmux,--disable-mbim-qmux,libmbim" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-Define-64bit-atomic-helpers-for-ppc-32-bit.patch new file mode 100644 index 00000000..4d097971 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-implement-64bit-atomic-for-mips.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/0001-implement-64bit-atomic-for-mips.patch new file mode 100644 index 00000000..84e0772a --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch new file mode 100644 index 00000000..8d8867ae --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch @@ -0,0 +1,28 @@ +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: git/scripts/common.m4 +=================================================================== +--- git.orig/scripts/common.m4 ++++ git/scripts/common.m4 +@@ -153,7 +153,7 @@ dnl Need to fix this so that it uses t + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include <execinfo.h> + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ])], +@@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include <inttypes.h> + int main() { + char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb new file mode 100644 index 00000000..b2dffcdb --- /dev/null +++ b/external/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 = "074f6ec51a2e4bc5c6140b4dad13c9bb56f3f0dc" + +PV = "0.13.7+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/external/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.20.3.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.20.3.bb new file mode 100644 index 00000000..a11ff9d2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.20.3.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=a68902a430e32200263d182d44924d47" + +S = "${WORKDIR}/git" +SRCREV = "8cfd67e59195251dff793ee47c185c9d6a8f3818" +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/external/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_3.0.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_3.0.0.bb new file mode 100644 index 00000000..f3841486 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_3.0.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "Canonical libwebsockets.org websocket library" +HOMEPAGE = "https://libwebsockets.org/" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4ce87f3facb6f911c142c8bef9bfb380" + +DEPENDS = "zlib" + +S = "${WORKDIR}/git" +SRCREV = "eaa935a80adb38b5cc4d09ce06ec987b87dcddfa" +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}-testapps += "${datadir}/libwebsockets-test-server/*" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch new file mode 100644 index 00000000..96163f65 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch new file mode 100644 index 00000000..e6992751 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch new file mode 100644 index 00000000..b1d96ae5 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch new file mode 100644 index 00000000..02dbb234 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb new file mode 100644 index 00000000..c7b8b293 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles new file mode 100644 index 00000000..0b80e2e4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles @@ -0,0 +1 @@ +d /run/lirc 0755 root root - diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf new file mode 100644 index 00000000..d8ddedd8 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf new file mode 100644 index 00000000..29b03c72 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.init b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.init new file mode 100644 index 00000000..8b124af6 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.service b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircd.service new file mode 100644 index 00000000..c8661368 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init new file mode 100644 index 00000000..3a8c1a30 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file mode 100644 index 00000000..4feea803 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb new file mode 100644 index 00000000..b13163de --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/04-use-pkg-config-for-gnutls.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/04-use-pkg-config-for-gnutls.patch new file mode 100644 index 00000000..20f388e8 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/glib-2.32.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth-1.4.3/glib-2.32.patch new file mode 100644 index 00000000..b6c9422e --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth_1.4.3.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/loudmouth/loudmouth_1.4.3.bb new file mode 100644 index 00000000..4f1430b9 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch new file mode 100644 index 00000000..dcbe01d5 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Do-not-set-Wno-unused-but-set-variable.patch @@ -0,0 +1,30 @@ +From d4f73b037d11d20f080e74c05df28853fb833075 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Dec 2018 22:59:47 -0800 +Subject: [PATCH] Do not set Wno-unused-but-set-variable + +This is gcc specific warning, not implemented by pretending to be gcc +like compilers e.g. clang. + +We will pass this option from recipe + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + m4/compiler_warnings.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4 +index f498a28..e65e97f 100644 +--- a/m4/compiler_warnings.m4 ++++ b/m4/compiler_warnings.m4 +@@ -11,7 +11,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + -Wdeclaration-after-statement -Wstrict-prototypes \ + -Wno-unused-parameter -Wno-sign-compare \ + -Wno-deprecated-declarations \ +- -Wno-unused-but-set-variable -Wformat-security; do ++ -Wno-unused -Wformat-security; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb new file mode 100644 index 00000000..01c62144 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.8.2.bb @@ -0,0 +1,57 @@ +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://0001-Do-not-set-Wno-unused-but-set-variable.patch \ + " + +SRC_URI[md5sum] = "a49c9f73e46c7b89e5efedda250d22c0" +SRC_URI[sha256sum] = "96f2a5f0ed15532b4c4c185b756fdc0326e7c2027cea26a1264f91e098260f80" + +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,--with-mbim=no,libmbim" +# Support WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. +PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" + +EXTRA_OECONF = " \ + --with-udev-base-dir=${nonarch_base_libdir}/udev \ +" +CFLAGS_append_toolchain-gcc = " -Wno-unused-but-set-variable" + +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/external/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb new file mode 100644 index 00000000..9fc8435e --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server/obex-data-server-0.4.6-build-fixes-1.patch b/external/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 00000000..e2c4e9ff --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb new file mode 100644 index 00000000..715b0235 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb new file mode 100644 index 00000000..3fb8cb19 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "The Openobex project is an open source implementation of the \ +Object Exchange (OBEX) protocol." +HOMEPAGE = "http://openobex.triq.net" +SECTION = "libs" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ +" + +DEPENDS = "virtual/libusb0" +DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES','bluez5','bluez5','bluez4',d)}" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${PV}/${BP}-Source.tar.gz \ +" +SRC_URI[md5sum] = "f6e0b6cb7dcfd731460a7e9a91429a3a" +SRC_URI[sha256sum] = "158860aaea52f0fce0c8e4b64550daaae06df2689e05834697b7e8c7d73dd4fc" + +S = "${WORKDIR}/${BP}-Source" + +inherit cmake pkgconfig + +EXTRA_OECONF = " -DCMAKE_SKIP_RPATH=ON " +EXTRA_OECMAKE += "-DBUILD_DOCUMENTATION=OFF" + +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" +DEBIAN_NOAUTONAME_${PN}-apps = "1" + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/0001-apps-CMakeLists.txt-Explicitly-link-libbfb-and-libmu.patch new file mode 100644 index 00000000..1f6de87c --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/Remove_some_printf_in_obexftpd.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/Remove_some_printf_in_obexftpd.patch new file mode 100644 index 00000000..8b73af32 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/make_fuse_swig_optional.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp/make_fuse_swig_optional.patch new file mode 100644 index 00000000..84b143bf --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb new file mode 100644 index 00000000..b4a914d9 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/packagegroups/packagegroup-tools-bluetooth.bb new file mode 100644 index 00000000..f2a16dcf --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch new file mode 100644 index 00000000..a31bfaa7 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb new file mode 100644 index 00000000..a7a9b5a6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.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 = "09fe0744e02f317b907e96dd5afcc02224ddbb85" + +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/external/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils/0001-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..8bb7e5a1 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb new file mode 100644 index 00000000..3c599950 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.7.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.7.0.bb new file mode 100644 index 00000000..e9846fde --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/0001-rfkill-makefile-don-t-use-t-the-OE-install-wrapper-d.patch b/external/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 00000000..c6f60d0e --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill/dont.call.git.rev-parse.on.parent.dir.patch new file mode 100644 index 00000000..2b836891 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.5.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.5.bb new file mode 100644 index 00000000..3e644760 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch new file mode 100644 index 00000000..79d4f29f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb new file mode 100644 index 00000000..9bb81c40 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb @@ -0,0 +1,26 @@ +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 \ +" +# v0.9.7 +SRCREV = "327164f9d86aafcd2500a317d485374df32ea622" + +PV = "0.9.7+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/external/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.5.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.5.bb new file mode 100644 index 00000000..f64776c5 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_3.5.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] = "e10e7c8c97e5bade5e85ce6e89bdf1f4" +SRC_URI[sha256sum] = "ba9e1d60a89fd7ed075553b4a2074352902203f7fbd9b65b15048c05f0e3f3be" + +inherit autotools pkgconfig + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch new file mode 100644 index 00000000..49b4d1dd --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch new file mode 100644 index 00000000..e1d79d33 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb new file mode 100644 index 00000000..6e6413b4 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb new file mode 100644 index 00000000..01c6e378 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch new file mode 100644 index 00000000..2cd2c78c --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb new file mode 100644 index 00000000..ca09f6da --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch new file mode 100644 index 00000000..a77cd284 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-Forcibly-disable-check-for-Qt5.patch @@ -0,0 +1,25 @@ +From a5544d8e543436e413379422b702f6f56ac7eb8e 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) diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch b/external/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 00000000..182eacc0 --- /dev/null +++ b/external/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,108 @@ +From b8e254a2f4ba49412e541598c72159869a7770f8 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] 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}") diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch b/external/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 00000000..37715c28 --- /dev/null +++ b/external/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,38 @@ +From 7b05a74432f08ef34d0f8743dd6438ad012e3b5e 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] 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 7c425a9..7145ebb 100644 +--- a/test/cpp/src/TestClient.cpp ++++ b/test/cpp/src/TestClient.cpp +@@ -381,7 +381,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, +@@ -402,7 +402,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()); diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch new file mode 100644 index 00000000..500cfab6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch @@ -0,0 +1,41 @@ +From 5f2c7e50b99d72177250c44236c41b99bfc161b5 Mon Sep 17 00:00:00 2001 +From: Andrej Valek <andrej.valek@siemens.com> +Date: Thu, 7 Jun 2018 15:21:06 +0200 +Subject: [PATCH 4/6] %% original patch: + 0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch + +--- + lib/cpp/src/thrift/transport/TSSLSocket.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +index 98c5326..3da9e45 100644 +--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp ++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +@@ -39,6 +39,7 @@ + #include <thrift/transport/PlatformSocket.h> + + #define OPENSSL_VERSION_NO_THREAD_ID 0x10000000L ++#define OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2 0x10100000L + + using namespace std; + using namespace apache::thrift::concurrency; +@@ -143,10 +144,15 @@ SSLContext::SSLContext(const SSLProtocol& protocol) { + ctx_ = SSL_CTX_new(SSLv3_method()); + } else if (protocol == TLSv1_0) { + ctx_ = SSL_CTX_new(TLSv1_method()); ++#if (OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2) + } else if (protocol == TLSv1_1) { + ctx_ = SSL_CTX_new(TLSv1_1_method()); + } else if (protocol == TLSv1_2) { + ctx_ = SSL_CTX_new(TLSv1_2_method()); ++#else ++ //Support for this versions will end on 2016-12-31 ++ //https://www.openssl.org/about/releasestrat.html ++#endif + } else { + /// UNKNOWN PROTOCOL! + throw TSSLException("SSL_CTX_new: Unknown protocol"); +-- +2.19.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch new file mode 100644 index 00000000..f4482b10 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch @@ -0,0 +1,26 @@ +From 81f36e7174097a1f1f3e7f94a97574b2ec68577f Mon Sep 17 00:00:00 2001 +From: "James E. King, III" <jim.king@simplivity.com> +Date: Thu, 29 Sep 2016 15:04:09 -0400 +Subject: [PATCH] THRIFT-3878: fix interop with newer OpenSSL libraries + +--- + lib/cpp/src/thrift/transport/TSSLSocket.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +index 3da9e45..0a3a124 100644 +--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp ++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +@@ -97,7 +97,12 @@ void initializeOpenSSL() { + SSL_library_init(); + SSL_load_error_strings(); + // static locking ++ // newer versions of OpenSSL changed CRYPTO_num_locks - see THRIFT-3878 ++#ifdef CRYPTO_num_locks ++ mutexes = boost::shared_array<Mutex>(new Mutex[CRYPTO_num_locks()]); ++#else + mutexes = boost::shared_array<Mutex>(new Mutex[ ::CRYPTO_num_locks()]); ++#endif + if (mutexes == NULL) { + throw TTransportException(TTransportException::INTERNAL_ERROR, + "initializeOpenSSL() failed, " diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch new file mode 100644 index 00000000..dfaa2fbd --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch @@ -0,0 +1,46 @@ +From 4cd49f470ca983369451d1141acc80fe1115cab4 Mon Sep 17 00:00:00 2001 +From: Nobuaki Sukegawa <nsuke@apache.org> +Date: Sun, 13 Mar 2016 08:55:38 +0900 +Subject: [PATCH] THRIFT-3736 C++ library build fails if OpenSSL does not + + surrpot SSLv3 + +--- + lib/cpp/src/thrift/transport/TSSLSocket.cpp | 2 ++ + lib/cpp/test/SecurityTest.cpp | 8 ++++++++ + 2 files changed, 10 insertions(+) + +diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +index 0a3a124..3e79354 100644 +--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp ++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +@@ -145,8 +145,10 @@ static char uppercase(char c); + SSLContext::SSLContext(const SSLProtocol& protocol) { + if (protocol == SSLTLS) { + ctx_ = SSL_CTX_new(SSLv23_method()); ++#ifndef OPENSSL_NO_SSL3 + } else if (protocol == SSLv3) { + ctx_ = SSL_CTX_new(SSLv3_method()); ++#endif + } else if (protocol == TLSv1_0) { + ctx_ = SSL_CTX_new(TLSv1_method()); + #if (OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2) +diff --git a/lib/cpp/test/SecurityTest.cpp b/lib/cpp/test/SecurityTest.cpp +index 213efd4..08110e7 100644 +--- a/lib/cpp/test/SecurityTest.cpp ++++ b/lib/cpp/test/SecurityTest.cpp +@@ -239,6 +239,14 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix) + continue; + } + ++#ifdef OPENSSL_NO_SSL3 ++ if (si == 2 || ci == 2) ++ { ++ // Skip all SSLv3 cases - protocol not supported ++ continue; ++ } ++#endif ++ + boost::mutex::scoped_lock lock(mMutex); + + BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%") diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb new file mode 100644 index 00000000..7ab74026 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb @@ -0,0 +1,67 @@ +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 \ + file://0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch \ + file://0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch \ + file://0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.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/external/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb new file mode 100644 index 00000000..72842343 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb @@ -0,0 +1,21 @@ +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" + +DEPENDS = "udev libusb1 libplist" + +inherit autotools pkgconfig gitpkgv systemd + +PKGV = "${GITPKGVTAG}" + +SRCREV = "ee85938c21043ef5f7cd4dfbc7677f385814d4d8" +SRC_URI = "git://github.com/libimobiledevice/usbmuxd;protocol=https" + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "--without-preflight" + +FILES_${PN} += "${base_libdir}/udev/rules.d/" + +SYSTEMD_SERVICE_${PN} = "usbmuxd.service" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch new file mode 100644 index 00000000..eec5a5d6 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb new file mode 100644 index 00000000..51542081 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb @@ -0,0 +1,34 @@ +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 +} +# http://errors.yoctoproject.org/Errors/Details/186959/ +EXCLUDE_FROM_WORLD_libc-musl = "1" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch new file mode 100644 index 00000000..b092ba2f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch new file mode 100644 index 00000000..19a2e26f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch @@ -0,0 +1,557 @@ +From 0c35749891bf834c1f3c1c4c330266bd2f4733cc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 9 Sep 2018 10:40:09 -0700 +Subject: [PATCH] Forward port to OpenSSL 1.1.x + +* import patch from debian +https://sources.debian.org/src/wvstreams/4.6.1-14/debian/patches/wvstreams_openssl1.1.patch +Author: Reiner Herrmann <reiner@reiner-h.de> + +Upstream-Status: Submitted [https://github.com/apenwarr/wvstreams/pull/2] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + crypto/wvcrl.cc | 38 +++++++++++++------------------------- + crypto/wvdiffiehellman.cc | 30 +++++++++++++++++++----------- + crypto/wvdigest.cc | 16 ++++++++-------- + crypto/wvocsp.cc | 35 +++++++++-------------------------- + crypto/wvx509.cc | 31 ++++++++++++++++--------------- + crypto/wvx509mgr.cc | 27 ++++++++++++++++----------- + include/wvdiffiehellman.h | 2 +- + include/wvdigest.h | 14 ++++++-------- + include/wvtripledes.h | 10 +++++----- + 9 files changed, 93 insertions(+), 110 deletions(-) + +diff --git a/crypto/wvcrl.cc b/crypto/wvcrl.cc +index fa00c76..880ad85 100644 +--- a/crypto/wvcrl.cc ++++ b/crypto/wvcrl.cc +@@ -357,31 +357,19 @@ bool WvCRL::isrevoked(WvStringParm serial_number) const + ASN1_INTEGER *serial = serial_to_int(serial_number); + if (serial) + { +- X509_REVOKED mayberevoked; +- mayberevoked.serialNumber = serial; +- if (crl->crl->revoked) +- { +- int idx = sk_X509_REVOKED_find(crl->crl->revoked, +- &mayberevoked); +- ASN1_INTEGER_free(serial); +- if (idx >= 0) +- { +- debug("Certificate is revoked.\n"); +- return true; +- } +- else +- { +- debug("Certificate is not revoked.\n"); +- return false; +- } +- } +- else +- { +- ASN1_INTEGER_free(serial); +- debug("CRL does not have revoked list.\n"); +- return false; +- } +- ++ X509_REVOKED *revoked_entry = NULL; ++ int idx = X509_CRL_get0_by_serial(crl, &revoked_entry, serial); ++ ASN1_INTEGER_free(serial); ++ if (idx >= 1 || revoked_entry) ++ { ++ debug("Certificate is revoked.\n"); ++ return true; ++ } ++ else ++ { ++ debug("Certificate is not revoked.\n"); ++ return false; ++ } + } + else + debug(WvLog::Warning, "Can't convert serial number to ASN1 format. " +diff --git a/crypto/wvdiffiehellman.cc b/crypto/wvdiffiehellman.cc +index 7c0bf32..15cd104 100644 +--- a/crypto/wvdiffiehellman.cc ++++ b/crypto/wvdiffiehellman.cc +@@ -39,24 +39,25 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen, + { + int problems; + int check; +- { ++ + info = DH_new(); +- info->p = BN_bin2bn(_key, _keylen, NULL); ++ BIGNUM *p = BN_bin2bn(_key, _keylen, NULL); + // info->p->top = 0; + // info->p->dmax = _keylen * 8 / BN_BITS2; + // info->p->neg = 0; + // info->p->flags = 0; + +- info->g = BN_new(); +- BN_set_word(info->g, generator); ++ BIGNUM *g = BN_new(); ++ BN_set_word(g, generator); + // info->g->d = &generator; + // info->g->top = 0; + // info->g->dmax = 1; + // info->g->neg = 0; + // info->g->flags = 0; +- } + +- check = BN_mod_word(info->p, 24); ++ DH_set0_pqg(info, p, NULL, g); ++ ++ check = BN_mod_word(p, 24); + DH_check(info, &problems); + if (problems & DH_CHECK_P_NOT_PRIME) + log(WvLog::Error, "Using a composite number for authentication.\n"); +@@ -64,7 +65,7 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen, + log(WvLog::Error,"Using an unsafe prime number for authentication.\n"); + if (problems & DH_NOT_SUITABLE_GENERATOR) + log(WvLog::Error, "Can you just use 2 instead of %s (%s)!!\n", +- BN_bn2hex(info->g), check); ++ BN_bn2hex(g), check); + if (problems & DH_UNABLE_TO_CHECK_GENERATOR) + log(WvLog::Notice, "Using a strange argument for diffie-hellman.\n"); + DH_generate_key(info); +@@ -72,18 +73,23 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen, + + int WvDiffieHellman::pub_key_len() + { +- return BN_num_bytes(info->pub_key); ++ const BIGNUM *pub_key = NULL; ++ DH_get0_key(info, &pub_key, NULL); ++ return BN_num_bytes(pub_key); + } + + int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len) + { +- int key_len = BN_num_bytes(info->pub_key); ++ const BIGNUM *pub_key = NULL; ++ DH_get0_key(info, &pub_key, NULL); ++ ++ int key_len = BN_num_bytes(pub_key); + if (key_len < len) + len = key_len; + + // alloca is stack allocated, don't free it. + unsigned char *foo = (unsigned char*)alloca(key_len); +- BN_bn2bin(info->pub_key, foo); ++ BN_bn2bin(pub_key, foo); + outbuf.put(foo, len); + + return len; +@@ -91,8 +97,10 @@ int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len) + + bool WvDiffieHellman::create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf) + { ++ const BIGNUM *pub_key = NULL; ++ DH_get0_key(info, &pub_key, NULL); + unsigned char *foo = (unsigned char *)alloca(DH_size(info)); +- log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(info->pub_key), ++ log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(pub_key), + hexdump_buffer(inbuf.peek(0, in_len), in_len, false)); + int len = DH_compute_key (foo, BN_bin2bn(inbuf.get(in_len), in_len, NULL), + info); +diff --git a/crypto/wvdigest.cc b/crypto/wvdigest.cc +index 150edee..73ebb5d 100644 +--- a/crypto/wvdigest.cc ++++ b/crypto/wvdigest.cc +@@ -13,10 +13,10 @@ + + /***** WvEVPMDDigest *****/ + +-WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) : ++WvEVPMDDigest::WvEVPMDDigest(const EVP_MD*_evpmd) : + evpmd(_evpmd), active(false) + { +- evpctx = new EVP_MD_CTX; ++ evpctx = EVP_MD_CTX_new(); + _reset(); + } + +@@ -24,7 +24,7 @@ WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) : + WvEVPMDDigest::~WvEVPMDDigest() + { + cleanup(); +- delete evpctx; ++ EVP_MD_CTX_free(evpctx); + } + + +@@ -60,7 +60,7 @@ bool WvEVPMDDigest::_reset() + // the typecast is necessary for API compatibility with different + // versions of openssl. None of them *actually* change the contents of + // the pointer. +- EVP_DigestInit(evpctx, (env_md_st *)evpmd); ++ EVP_DigestInit(evpctx, evpmd); + active = true; + return true; + } +@@ -79,7 +79,7 @@ void WvEVPMDDigest::cleanup() + + size_t WvEVPMDDigest::digestsize() const + { +- return EVP_MD_size((env_md_st *)evpmd); ++ return EVP_MD_size(evpmd); + } + + +@@ -104,14 +104,14 @@ WvHMACDigest::WvHMACDigest(WvEVPMDDigest *_digest, + { + key = new unsigned char[keysize]; + memcpy(key, _key, keysize); +- hmacctx = new HMAC_CTX; ++ hmacctx = HMAC_CTX_new(); + _reset(); + } + + WvHMACDigest::~WvHMACDigest() + { + cleanup(); +- delete hmacctx; ++ HMAC_CTX_free(hmacctx); + deletev key; + delete digest; + } +@@ -145,7 +145,7 @@ bool WvHMACDigest::_finish(WvBuf &outbuf) + bool WvHMACDigest::_reset() + { + cleanup(); +- HMAC_Init(hmacctx, key, keysize, (env_md_st *)digest->getevpmd()); ++ HMAC_Init(hmacctx, key, keysize, digest->getevpmd()); + active = true; + return true; + } +diff --git a/crypto/wvocsp.cc b/crypto/wvocsp.cc +index ddb2de4..7d5da07 100644 +--- a/crypto/wvocsp.cc ++++ b/crypto/wvocsp.cc +@@ -118,9 +118,10 @@ bool WvOCSPResp::check_nonce(const WvOCSPReq &req) const + + bool WvOCSPResp::signedbycert(const WvX509 &cert) const + { +- EVP_PKEY *skey = X509_get_pubkey(cert.cert); +- int i = OCSP_BASICRESP_verify(bs, skey, 0); +- EVP_PKEY_free(skey); ++ STACK_OF(X509) *sk = sk_X509_new_null(); ++ sk_X509_push(sk, cert.cert); ++ int i = OCSP_basic_verify(bs, sk, NULL, OCSP_NOVERIFY); ++ sk_X509_free(sk); + + if(i > 0) + return true; +@@ -131,33 +132,15 @@ bool WvOCSPResp::signedbycert(const WvX509 &cert) const + + WvX509 WvOCSPResp::get_signing_cert() const + { +- if (!bs || !sk_X509_num(bs->certs)) ++ const STACK_OF(X509) *certs = OCSP_resp_get0_certs(bs); ++ if (!bs || !sk_X509_num(certs)) + return WvX509(); + +- // note: the following bit of code is taken almost verbatim from +- // ocsp_vfy.c in OpenSSL 0.9.8. Copyright and attribution should +- // properly belong to them +- +- OCSP_RESPID *id = bs->tbsResponseData->responderId; +- +- if (id->type == V_OCSP_RESPID_NAME) +- { +- X509 *x = X509_find_by_subject(bs->certs, id->value.byName); +- if (x) +- return WvX509(X509_dup(x)); ++ X509 *signer = NULL; ++ if (OCSP_resp_get0_signer(bs, &signer, NULL) == 1) { ++ return WvX509(X509_dup(signer)); + } + +- if (id->value.byKey->length != SHA_DIGEST_LENGTH) return NULL; +- unsigned char tmphash[SHA_DIGEST_LENGTH]; +- unsigned char *keyhash = id->value.byKey->data; +- for (int i = 0; i < sk_X509_num(bs->certs); i++) +- { +- X509 *x = sk_X509_value(bs->certs, i); +- X509_pubkey_digest(x, EVP_sha1(), tmphash, NULL); +- if(!memcmp(keyhash, tmphash, SHA_DIGEST_LENGTH)) +- return WvX509(X509_dup(x)); +- } +- + return WvX509(); + } + +diff --git a/crypto/wvx509.cc b/crypto/wvx509.cc +index e4925ce..984156c 100644 +--- a/crypto/wvx509.cc ++++ b/crypto/wvx509.cc +@@ -974,7 +974,7 @@ static void add_aia(WvStringParm type, WvString identifier, + sk_ACCESS_DESCRIPTION_push(ainfo, acc); + acc->method = OBJ_txt2obj(type.cstr(), 0); + acc->location->type = GEN_URI; +- acc->location->d.ia5 = M_ASN1_IA5STRING_new(); ++ acc->location->d.ia5 = ASN1_IA5STRING_new(); + unsigned char *cident + = reinterpret_cast<unsigned char *>(identifier.edit()); + ASN1_STRING_set(acc->location->d.ia5, cident, identifier.len()); +@@ -1059,7 +1059,7 @@ void WvX509::set_crl_urls(WvStringList &urls) + GENERAL_NAMES *uris = GENERAL_NAMES_new(); + GENERAL_NAME *uri = GENERAL_NAME_new(); + uri->type = GEN_URI; +- uri->d.ia5 = M_ASN1_IA5STRING_new(); ++ uri->d.ia5 = ASN1_IA5STRING_new(); + unsigned char *cident + = reinterpret_cast<unsigned char *>(i().edit()); + ASN1_STRING_set(uri->d.ia5, cident, i().len()); +@@ -1162,10 +1162,11 @@ WvString WvX509::get_extension(int nid) const + #else + X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); + #endif ++ ASN1_OCTET_STRING *ext_data_str = X509_EXTENSION_get_data(ext); + if (!method) + { + WvDynBuf buf; +- buf.put(ext->value->data, ext->value->length); ++ buf.put(ext_data_str->data, ext_data_str->length); + retval = buf.getstr(); + } + else +@@ -1176,21 +1177,21 @@ WvString WvX509::get_extension(int nid) const + // even though it's const (at least as of version 0.9.8e). + // gah. + #if OPENSSL_VERSION_NUMBER >= 0x0090800fL +- const unsigned char * ext_value_data = ext->value->data; ++ const unsigned char * ext_value_data = ext_data_str->data; + #else + unsigned char *ext_value_data = ext->value->data; + #endif + if (method->it) + { + ext_data = ASN1_item_d2i(NULL, &ext_value_data, +- ext->value->length, ++ ext_data_str->length, + ASN1_ITEM_ptr(method->it)); + TRACE("Applied generic conversion!\n"); + } + else + { + ext_data = method->d2i(NULL, &ext_value_data, +- ext->value->length); ++ ext_data_str->length); + TRACE("Applied method specific conversion!\n"); + } + +@@ -1325,13 +1326,13 @@ bool WvX509::verify(WvBuf &original, WvStringParm signature) const + return false; + + /* Verify the signature */ +- EVP_MD_CTX sig_ctx; +- EVP_VerifyInit(&sig_ctx, EVP_sha1()); +- EVP_VerifyUpdate(&sig_ctx, original.peek(0, original.used()), ++ EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new(); ++ EVP_VerifyInit(sig_ctx, EVP_sha1()); ++ EVP_VerifyUpdate(sig_ctx, original.peek(0, original.used()), + original.used()); +- int sig_err = EVP_VerifyFinal(&sig_ctx, sig_buf, sig_size, pk); ++ int sig_err = EVP_VerifyFinal(sig_ctx, sig_buf, sig_size, pk); + EVP_PKEY_free(pk); +- EVP_MD_CTX_cleanup(&sig_ctx); // Again, not my fault... ++ EVP_MD_CTX_free(sig_ctx); // Again, not my fault... + if (sig_err != 1) + { + debug("Verify failed!\n"); +@@ -1450,19 +1451,19 @@ void WvX509::set_ski() + { + CHECK_CERT_EXISTS_SET("ski"); + +- ASN1_OCTET_STRING *oct = M_ASN1_OCTET_STRING_new(); +- ASN1_BIT_STRING *pk = cert->cert_info->key->public_key; ++ ASN1_OCTET_STRING *oct = ASN1_OCTET_STRING_new(); ++ ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(cert); + unsigned char pkey_dig[EVP_MAX_MD_SIZE]; + unsigned int diglen; + + EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL); + +- M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen); ++ ASN1_OCTET_STRING_set(oct, pkey_dig, diglen); + X509_EXTENSION *ext = X509V3_EXT_i2d(NID_subject_key_identifier, 0, + oct); + X509_add_ext(cert, ext, -1); + X509_EXTENSION_free(ext); +- M_ASN1_OCTET_STRING_free(oct); ++ ASN1_OCTET_STRING_free(oct); + } + + +diff --git a/crypto/wvx509mgr.cc b/crypto/wvx509mgr.cc +index f249eec..156d3a4 100644 +--- a/crypto/wvx509mgr.cc ++++ b/crypto/wvx509mgr.cc +@@ -350,6 +350,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const + return false; + } + ++ uint32_t ex_flags = X509_get_extension_flags(cert); ++ uint32_t ex_kusage = X509_get_key_usage(cert); + if (cert == unsignedcert.cert) + { + debug("Self Signing!\n"); +@@ -362,8 +364,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const + return false; + } + #endif +- else if (!((cert->ex_flags & EXFLAG_KUSAGE) && +- (cert->ex_kusage & KU_KEY_CERT_SIGN))) ++ else if (!((ex_flags & EXFLAG_KUSAGE) && ++ (ex_kusage & KU_KEY_CERT_SIGN))) + { + debug("This Certificate is not allowed to sign certificates!\n"); + return false; +@@ -390,6 +392,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const + + bool WvX509Mgr::signcrl(WvCRL &crl) const + { ++ uint32_t ex_flags = X509_get_extension_flags(cert); ++ uint32_t ex_kusage = X509_get_key_usage(cert); + if (!isok() || !crl.isok()) + { + debug(WvLog::Warning, "Asked to sign CRL, but certificate or CRL (or " +@@ -403,12 +407,12 @@ bool WvX509Mgr::signcrl(WvCRL &crl) const + "CRLs!\n"); + return false; + } +- else if (!((cert->ex_flags & EXFLAG_KUSAGE) && +- (cert->ex_kusage & KU_CRL_SIGN))) ++ else if (!((ex_flags & EXFLAG_KUSAGE) && ++ (ex_kusage & KU_CRL_SIGN))) + { + debug("Certificate not allowed to sign CRLs! (%s %s)\n", +- (cert->ex_flags & EXFLAG_KUSAGE), +- (cert->ex_kusage & KU_CRL_SIGN)); ++ (ex_flags & EXFLAG_KUSAGE), ++ (ex_kusage & KU_CRL_SIGN)); + return false; + } + #endif +@@ -454,7 +458,6 @@ WvString WvX509Mgr::sign(WvBuf &data) const + { + assert(rsa); + +- EVP_MD_CTX sig_ctx; + unsigned char sig_buf[4096]; + + EVP_PKEY *pk = EVP_PKEY_new(); +@@ -467,20 +470,22 @@ WvString WvX509Mgr::sign(WvBuf &data) const + return WvString::null; + } + +- EVP_SignInit(&sig_ctx, EVP_sha1()); +- EVP_SignUpdate(&sig_ctx, data.peek(0, data.used()), data.used()); ++ EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new(); ++ EVP_SignInit(sig_ctx, EVP_sha1()); ++ EVP_SignUpdate(sig_ctx, data.peek(0, data.used()), data.used()); + unsigned int sig_len = sizeof(sig_buf); +- int sig_err = EVP_SignFinal(&sig_ctx, sig_buf, ++ int sig_err = EVP_SignFinal(sig_ctx, sig_buf, + &sig_len, pk); + if (sig_err != 1) + { + debug("Error while signing.\n"); + EVP_PKEY_free(pk); ++ EVP_MD_CTX_free(sig_ctx); + return WvString::null; + } + + EVP_PKEY_free(pk); +- EVP_MD_CTX_cleanup(&sig_ctx); // this isn't my fault :// ++ EVP_MD_CTX_free(sig_ctx); // this isn't my fault :// + WvDynBuf buf; + buf.put(sig_buf, sig_len); + debug("Signature size: %s\n", buf.used()); +diff --git a/include/wvdiffiehellman.h b/include/wvdiffiehellman.h +index af75ffa..a2d001f 100644 +--- a/include/wvdiffiehellman.h ++++ b/include/wvdiffiehellman.h +@@ -27,7 +27,7 @@ public: + bool create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf); + + protected: +- struct dh_st *info; ++ DH *info; + BN_ULONG generator; + + private: +diff --git a/include/wvdigest.h b/include/wvdigest.h +index fdc39bd..f2eed40 100644 +--- a/include/wvdigest.h ++++ b/include/wvdigest.h +@@ -9,10 +9,8 @@ + + #include "wvencoder.h" + #include <stdint.h> ++#include <openssl/evp.h> + +-struct env_md_st; +-struct env_md_ctx_st; +-struct hmac_ctx_st; + + /** + * Superclass for all message digests. +@@ -45,8 +43,8 @@ public: + class WvEVPMDDigest : public WvDigest + { + friend class WvHMACDigest; +- const env_md_st *evpmd; +- env_md_ctx_st *evpctx; ++ const EVP_MD *evpmd; ++ EVP_MD_CTX *evpctx; + bool active; + + public: +@@ -54,13 +52,13 @@ public: + virtual size_t digestsize() const; + + protected: +- WvEVPMDDigest(const env_md_st *_evpmd); ++ WvEVPMDDigest(const EVP_MD *_evpmd); + virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf, + bool flush); // consumes input + virtual bool _finish(WvBuf &outbuf); // outputs digest + virtual bool _reset(); // supported: resets digest value + +- const env_md_st *getevpmd() ++ const EVP_MD *getevpmd() + { return evpmd; } + + private: +@@ -104,7 +102,7 @@ class WvHMACDigest : public WvDigest + WvEVPMDDigest *digest; + unsigned char *key; + size_t keysize; +- hmac_ctx_st *hmacctx; ++ HMAC_CTX *hmacctx; + bool active; + + public: +diff --git a/include/wvtripledes.h b/include/wvtripledes.h +index 185fe8a..a442e7a 100644 +--- a/include/wvtripledes.h ++++ b/include/wvtripledes.h +@@ -70,11 +70,11 @@ protected: + + private: + Mode mode; +- des_cblock key; +- des_key_schedule deskey1; +- des_key_schedule deskey2; +- des_key_schedule deskey3; +- des_cblock ivec; // initialization vector ++ DES_cblock key; ++ DES_key_schedule deskey1; ++ DES_key_schedule deskey2; ++ DES_key_schedule deskey3; ++ DES_cblock ivec; // initialization vector + int ivecoff; // current offset into initvec + }; + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch new file mode 100644 index 00000000..6bc34331 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch new file mode 100644 index 00000000..59f70e38 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch new file mode 100644 index 00000000..232db9e6 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch b/external/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 00000000..f9304197 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch new file mode 100644 index 00000000..6f3fbffb --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch new file mode 100644 index 00000000..25e9ee23 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff new file mode 100644 index 00000000..5ab633bc --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff new file mode 100644 index 00000000..616843d4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff @@ -0,0 +1,28 @@ +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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff new file mode 100644 index 00000000..a75067a1 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff new file mode 100644 index 00000000..ec99dcd3 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch new file mode 100644 index 00000000..e8572136 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch new file mode 100644 index 00000000..b084887b --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch new file mode 100644 index 00000000..1c7005c2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch @@ -0,0 +1,16 @@ +Index: wvstreams-4.6.1/crypto/wvx509.cc +=================================================================== +--- wvstreams-4.6.1.orig/crypto/wvx509.cc ++++ wvstreams-4.6.1/crypto/wvx509.cc +@@ -1157,7 +1157,11 @@ WvString WvX509::get_extension(int nid) + + if (ext) + { ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++#else + X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++#endif + if (!method) + { + WvDynBuf buf; diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb new file mode 100644 index 00000000..b9f62da7 --- /dev/null +++ b/external/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 \ + file://openssl-buildfix.patch \ + file://0001-Forward-port-to-OpenSSL-1.1.x.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 " +PACKAGES_prepend = "uniconfd " +PACKAGES_prepend = "libwvstreams-base " +PACKAGES_prepend = "libwvstreams-extras " +PACKAGES_prepend = "${PN}-valgrind " + +RPROVIDES_${PN}-dbg += "libuniconf-dbg uniconfd-dbg libwvstreams-base-dbg libwvstreams-extras-dbg" + +FILES_libuniconf = "${libdir}/libuniconf.so.*" + +FILES_uniconfd = "${sbindir}/uniconfd ${sysconfdir}/uniconf.conf ${localstatedir}/uniconf" + +FILES_libwvstreams-base = "${libdir}/libwvutils.so.*" + +FILES_libwvstreams-extras = "${libdir}/libwvbase.so.* ${libdir}/libwvstreams.so.*" + +FILES_${PN}-valgrind = "${libdir}/valgrind/wvstreams.supp" +RDEPENDS_${PN} += "perl" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch new file mode 100644 index 00000000..af14a1a5 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service b/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service new file mode 100644 index 00000000..b18a96f8 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_3.0.9.bb new file mode 100644 index 00000000..bab5a6ae --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb new file mode 100644 index 00000000..9aff59c6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb @@ -0,0 +1,18 @@ +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" + +inherit cmake + +PACKAGES = "${PN}-dev" + +RDEPENDS_${PN}-dev = "zeromq-dev" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/files/run-ptest b/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/files/run-ptest new file mode 100755 index 00000000..48b9cd9f --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb new file mode 100644 index 00000000..356348b4 --- /dev/null +++ b/external/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 +} |