diff options
author | Andrii Pientsov <andrii.pientsov@globallogic.com> | 2020-05-21 08:44:40 +0300 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-21 13:05:31 +0300 |
commit | 1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224 (patch) | |
tree | a9cb671a859458b41c226d7812b7a096d3a7b2c9 /recipes-core | |
parent | 0b05e87874108a22f9ffed069c0b98fa9e5f473c (diff) | |
download | meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.tar.gz meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.tar.bz2 meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.zip |
Remove duplicate
Diffstat (limited to 'recipes-core')
32 files changed, 0 insertions, 2843 deletions
diff --git a/recipes-core/annex-client/annex-client-from-src.bb b/recipes-core/annex-client/annex-client-from-src.bb deleted file mode 100644 index 3534f23..0000000 --- a/recipes-core/annex-client/annex-client-from-src.bb +++ /dev/null @@ -1,28 +0,0 @@ -DESCRIPTION = "Provides the Multi-Tech MDM client" -SECTION = "remote-management" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -PROVIDES = "annex-client-from-src" -DEPENDS = "jsoncpp curl protobuf cyrus-sasl protobuf-native annex-proto mts-io" - -# IMPORTANT: if you change PR, you'll also want to change the url in annex-client.bb -PR = "r1" -SRCREV = "b954c83e155f95ecd68c14a890f9455331e19878" - -SRC_URI = "git://git@${MTS_INTERNAL_GIT}/multitech/annex-client.git;protocol=ssh;branch=master" - -S = "${WORKDIR}/git" - -do_compile() { - echo "directory: `pwd`" - mkdir -p annex_pb - cp ${STAGING_DIR_NATIVE}/annex.proto annex_pb/ - make all CFLAGS+="-DMLINUX_BUILD" -} - -# IMPORTANT NOTE: -# this recipe is only used for the annex-client Jenkin's job to build IPK. -# annex-client.bb is used to install the binary in an image -do_install() { - oe_runmake install DESTDIR=${D} SUBDIRS="src" -} diff --git a/recipes-core/annex-client/annex-client.bb b/recipes-core/annex-client/annex-client.bb deleted file mode 100644 index 83dd602..0000000 --- a/recipes-core/annex-client/annex-client.bb +++ /dev/null @@ -1,53 +0,0 @@ -DESCRIPTION = "Provides the Multi-Tech MDM client" -SECTION = "remote-management" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -PROVIDES = "annex-client" - -# NOTE: annex-client binary is built with Jenkin's job using annex-client-from-src.bb -# To update this, manually copy ipk from Jenkin's job to .net/downloads/ -PR = "r3" -ANNEX_PR = "r1" -SRC_URI = "http://multitech.net/downloads/annex-client-from-src_1.0-${ANNEX_PR}.0_${TUNE_PKGARCH}.ipk \ - file://annex-client.init \ - file://monitor-annexcd \ - file://call_home \ - file://call_home.init \ - file://config.json.sample \ - file://push_api_mdm_connected \ - file://push_api_mdm_status \ -" - -SRC_URI[md5sum] = "e180f4e569fbba2f5b9d524b5a9e944e" -SRC_URI[sha256sum] = "1e93c65005c630cf211615dc143eb64f177591efcdbed6952142c7bac0e95988" - -#inherit update-rc.d -# -#INITSCRIPT_NAME = "annex-client" -#INITSCRIPT_PARAMS = "defaults 95 1" -S = "${WORKDIR}" - -DHQ_DIR="/opt/devicehq" - -do_install() { - install -d ${D}${sbindir} - install -m 755 sbin/annexcd ${D}${sbindir} - - install -d ${D}/etc/ssl/certs - install -m 644 etc/ssl/certs/rootCA.pem ${D}/etc/ssl/certs - - install -d ${D}${base_sbindir} - install -m 755 ${WORKDIR}/monitor-annexcd ${D}${base_sbindir} - install -m 755 ${WORKDIR}/call_home ${D}${base_sbindir} - install -m 755 ${WORKDIR}/push_api_mdm_connected ${D}${base_sbindir} - install -m 755 ${WORKDIR}/push_api_mdm_status ${D}${base_sbindir} - - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/annex-client.init ${D}${sysconfdir}/init.d/annex-client - install -m 755 ${WORKDIR}/call_home.init ${D}${sysconfdir}/init.d/call_home - - install -d ${D}${DHQ_DIR} - install -m 644 ${WORKDIR}/config.json.sample ${D}${DHQ_DIR} -} - -FILES_${PN} += "${DHQ_DIR}" diff --git a/recipes-core/annex-client/annex-client/annex-client.init b/recipes-core/annex-client/annex-client/annex-client.init deleted file mode 100644 index 4a5dc4b..0000000 --- a/recipes-core/annex-client/annex-client/annex-client.init +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -MONITOR="/sbin/monitor-annexcd" -CLIENT="annexcd" - -start() { - if [[ $(pidof -x $MONITOR) ]]; then - echo "RM client is already running" - else - echo "Starting RM client" - $MONITOR & - fi -} - -stop() { - MONITOR_PID=$(pidof -x $MONITOR) - CLIENT_PID=$(pidof $CLIENT) - if [[ $MONITOR_PID ]]; then - echo "Stopping RM client" - kill $MONITOR_PID $CLIENT_PID - else - echo "RM client is not running" - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - *) - echo "Usage: /etc/init.d/annex-client {start|stop|restart}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/recipes-core/annex-client/annex-client/call_home b/recipes-core/annex-client/annex-client/call_home deleted file mode 100755 index 64887ec..0000000 --- a/recipes-core/annex-client/annex-client/call_home +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/bash -#Attempt to gain a WAN connection for MDM Registration to query for this device's MDM account ID -#PREREQ: Firewall allows outgoing DHCP requests and MDM Client connection - -CONFIG_FILE="/var/config/devicehq/config.json" -STATUS_FILE="/var/config/devicehq/status.json" - -if [ ! -f $CONFIG_FILE ]; then - logger -t callhome "Config file missing!" - logger -t callhome "Do: mkdir /var/config/devicehq" - logger -t callhome "Then: cp /opt/devicehq/config.json.sample /var/config/devicehq/config.json" - exit 1 -fi - -JSON=$(cat $CONFIG_FILE) -ENABLED=$( echo $JSON | jsparser -p /enabled ) -KEY=$( echo $JSON | jsparser -p /accountKey ) -MDM_URL=$( echo $JSON | jsparser -p /deviceHqUrl ) - -if [ "$ENABLED" != "true" ]; then - logger -t callhome "Not calling home because DeviceHQ is disabled in /var/config/devicehq/config..json." - exit 1 -fi - -UUID=$(mts-io-sysfs show uuid) -DEVID=$(mts-io-sysfs show device-id) - - -MDM_REG_URL="$MDM_URL/api/v1/register-device" -TMPFILE="/var/run/callhome" -DONE=false -FORCE=false -WAN_AVAILABLE=true -MAX_ATTEMPTS=0 #Infinite -INTERVAL_SECONDS=30 - -#Gather options from command line -# Reset in case getopts has been used previously in the shell. -OPTIND=1 - -function show_help() { - echo "Usage: $0 -k <ACCOUNT KEY> -a <MAX ATTEMPTS> -i <INTERVAL SECONDS>" -} - -while getopts "h?k:a:i:d:u:m:f" opt; do - case "$opt" in - h|\?) - show_help - exit 0 - ;; - k) KEY=$OPTARG - ;; - a) MAX_ATTEMPTS=$OPTARG - ;; - a) INTERVAL_SECONDS=$OPTARG - ;; - f) FORCE=true - ;; - d) DEVID=$OPTARG - ;; - u) UUID=$OPTARG - ;; - m) MDM_URL=$OPTARG - ;; - esac -done - -shift $((OPTIND-1)) - -[ "$1" = "--" ] && shift - -if [ "$FORCE" == "true" ]; then - DONE=false -fi - - -function checkCallHomeNeeded() { - if [ "$FORCE" != "true" ]; then - JSON=$(cat $CONFIG_FILE) - KEY=$( echo $JSON | jsparser -p /accountKey ) - - LAST_CONNECTED="unknown" - STATUS="" - if [ -f $STATUS_FILE ]; then - JSON=$(cat $STATUS_FILE) - LAST_CONNECTED=$( echo $JSON | jsparser -p /lastConnected ) - STATUS=$( echo $JSON | jsparser -p /status ) - fi - - if [ "$KEY" != "" ] && [ $LAST_CONNECTED != "unknown" ] && [ $STATUS == "idle" ]; then - echo "Found that Call-Home Not Needed" - exit 0 - fi - fi -} - -function saveConfigs() { - logger -t callhome "Saving accountKey" - - sed -i "s/\"accountKey\"\s*:\s*\".*\"/\"accountKey\": \"$KEY\"/" $CONFIG_FILE - - if [ $? != 0 ]; then - logger -t callhome "Failed to add account key [$KEY] to $CONFIG_FILE" - fi -} - -function checkForCheckIn() { - - i=0 - while [ $i -lt 10 ]; do - if [ -f $STATUS_FILE ]; then - JSON=$(cat $STATUS_FILE) - LAST_CONNECTED=$( echo $JSON | jsparser -p /lastConnected ) - STATUS=$( echo $JSON | jsparser -p /status ) - if [ "$LAST_CONNECTED" == "unknown" ] || [ $STATUS != "idle" ]; then - logger -t callhome "MDM client has not checked-in yet" - else - logger -t callhome "SUCCESS! MDM Client has checked-in." - DONE=true - return - fi - else - logger -t callhome "MDM client has not checked-in yet" - fi - - let i=i+1 - logger -t callhome "Sleeping for 30 seconds." - sleep 30 - done - -} - -function attemptMdmRegistration() { - - logger -t callhome "Attempting to register with MDM" - CODE=$( curl -m 20 -ks -o $TMPFILE -w "%{http_code}" -X POST -H "Content-Type: application/json" \ - -d '{ "device_id" : "'$DEVID'", "uuid" : "'$UUID'" }' \ - $MDM_REG_URL ) - - if [ $? == 0 ]; then - if [ "$CODE" == "200" ]; then - logger -t callhome "Registered with MDM. Checking for Account Key" - - #Request returned 200 - KEY=$( cat $TMPFILE | jsparser -p /account_key ) - if [ $? == 0 ]; then - if [ "$KEY" != "" ]; then - logger -t callhome "Received Account Key! [$KEY]" - saveConfigs - /etc/init.d/annex-client start - checkForCheckIn - else - logger -t callhome "Account Key not returned. This device may not be registered with a user account" - fi - else - RESULT=$(cat $TMPFILE) - logger -t callhome "Error: Unexpected MDM Registration Server response: $RESULT" - fi - else - RESULT=$(cat $TMPFILE) - logger -t callhome "Error: MDM Registration Failed with Device ID [$DEVID] and UUID [$UUID]" - logger -t callhome "Error: MDM Registration Server Response Header Code: $CODE" - logger -t callhome "Error: MDM Registration Server Response Body Content: $RESULT" - fi - else - logger -t callhome "Warning: Could not connect to MDM server: $MDM_REG_URL" - fi -} - -logger -t callhome "Setting Up Call-Home " -COUNT=0 - -while [ $DONE == false ]; do - logger -t callhome "Attempts: $COUNT" - - checkCallHomeNeeded - - attemptMdmRegistration - - COUNT=$(($COUNT+1)) - if [ $MAX_ATTEMPTS != 0 ] && [ $COUNT -gt $MAX_ATTEMPTS ]; then - DONE=true - logger -t callhome "Reached Maximum Attempts [$MAX_ATTEMPTS]" - fi - - if [ $DONE == false ]; then - logger -t callhome "Sleeping for $INTERVAL_SECONDS seconds before next attempt" - sleep $INTERVAL_SECONDS - fi - -done - diff --git a/recipes-core/annex-client/annex-client/call_home.init b/recipes-core/annex-client/annex-client/call_home.init deleted file mode 100755 index b874565..0000000 --- a/recipes-core/annex-client/annex-client/call_home.init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -CALLHOME="/sbin/call_home" - -start() { - if [[ $(pidof $CALLHOME) ]]; then - echo "Call-Home Service is already running" - else - echo "Starting Call-Home Service" - $CALLHOME & - fi -} - -stop() { - CALLHOME_PID=$(pidof -x $CALLHOME) - if [[ $CALLHOME_PID ]]; then - echo "Stopping Call-Home Service" - kill $CALLHOME_PID - else - echo "Call-Home Service is not running" - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - *) - echo "Usage: /etc/init.d/call_home {start|stop|restart}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/recipes-core/annex-client/annex-client/config.json.sample b/recipes-core/annex-client/annex-client/config.json.sample deleted file mode 100644 index 5e83c64..0000000 --- a/recipes-core/annex-client/annex-client/config.json.sample +++ /dev/null @@ -1,10 +0,0 @@ -{ - "enabled": true, - "accountKey": "", - "deviceHqUrl": "https://www.devicehq.com", - "deviceServerUrl": "ds.devicehq.com", - "checkInIntervalMins": 720, - "gpsDataIntervalMins": 720, - "allowFirmwareUpgrade": true, - "allowConfigUpgrade": false -} diff --git a/recipes-core/annex-client/annex-client/monitor-annexcd b/recipes-core/annex-client/annex-client/monitor-annexcd deleted file mode 100755 index 21d5a6b..0000000 --- a/recipes-core/annex-client/annex-client/monitor-annexcd +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFIG_FILE="/var/config/devicehq/config.json" - -if [ ! -f $CONFIG_FILE ]; then - logger -t monitor-annexcd "Config file missing!" - logger -t monitor-annexcd "Do: mkdir /var/config/devicehq" - logger -t monitor-annexcd "Then: cp /opt/devicehq/config.json.sample /var/config/devicehq/config.json" - logger -t monitor-annexcd "Exiting..." - exit 1 -fi - -DEVICE_ID=$(mts-io-sysfs show device-id) -PRODUCT_ID=$(mts-io-sysfs show product-id) - -get_args() { - JSON=$(cat $CONFIG_FILE) - - ENABLED=$( echo $JSON | jsparser -p enabled ) - KEY=$( echo $JSON | jsparser -p accountKey ) - SERVER=$( echo $JSON | jsparser -p deviceServerUrl ) - PORT=5798 - QUERY_INT=$( echo $JSON | jsparser -p checkInIntervalMins ) - GPS_INT=$( echo $JSON | jsparser -p gpsDataIntervalMins ) - FW_UPGRADE=$( echo $JSON | jsparser -p allowFirmwareUpgrade ) - CONFIG_UPGRADE=$(echo $JSON | jsparser -p allowConfigUpgrade ) -} - - -get_args - -if [ "$KEY" == "" ]; then - logger -t monitor-annexcd "Account key missing in $CONFIG_FILE" - logger -t monitor-annexcd "Exiting..." - exit 1 -fi - -MIN_TO_MS=60000 - -if [[ $ENABLED == "true" ]]; then - ANNEXCD="annexcd --account-key $KEY --host $SERVER --port $PORT --product-id $PRODUCT_ID --device-id $DEVICE_ID --rpd-interval $(( $QUERY_INT * $MIN_TO_MS )) --gps-interval $(( $GPS_INT * $MIN_TO_MS )) --net-interval $(( $QUERY_INT * $MIN_TO_MS )) --cell-interval $(( $QUERY_INT * $MIN_TO_MS )) --active-apps-interval $(( $QUERY_INT * $MIN_TO_MS )) --lora-interval $(( $QUERY_INT * $MIN_TO_MS )) --when-ppp-up on --firmware-upgrade $FW_UPGRADE --config-upgrade $CONFIG_UPGRADE --ssl-method ssl --ssl-ca-certificate /etc/ssl/certs/rootCA.pem --ssl-ca-strict --log-upto 7" - until $ANNEXCD; do - echo "annexcd exited with status $? - restarting..." >&2 - sleep 1 - done -fi diff --git a/recipes-core/annex-client/annex-client/push_api_mdm_connected b/recipes-core/annex-client/annex-client/push_api_mdm_connected deleted file mode 100755 index ec8a23d..0000000 --- a/recipes-core/annex-client/annex-client/push_api_mdm_connected +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# This script pushes the current time to the API's remote management -# to track last connected time - -STATUS_FILE="/var/config/devicehq/status.json" -DHQ_DIR="/var/config/devicehq" - -LAST_CONNECTED=$(date +%m/%d/%Y/%H:%M:%S) -INTERVAL="" - -# Reset in case getopts has been used previously in the shell. -OPTIND=1 - -function show_help() { - echo "Usage: $0 -t <TIME OF CONNECTION> -i <INTERVAL SECONDS>" -} - -while getopts "h?t:i:" opt; do - case "$opt" in - h|\?) - show_help - exit 0 - ;; - t) LAST_CONNECTED=$OPTARG - ;; - i) INTERVAL=$OPTARG - ;; - esac -done - -shift $((OPTIND-1)) -[ "$1" = "--" ] && shift - -if [ ! -f $STATUS_FILE ]; then - mkdir -p $DHQ_DIR - echo "{ - \"status\": \"unknown\", - \"lastConnected\": \"unknown\", - \"intervalSeconds\": \"10\" -}" > $STATUS_FILE -fi - - -sed -i "s~\"lastConnected\"\s*:\s*\".*\"~\"lastConnected\": \"$LAST_CONNECTED\"~" $STATUS_FILE - -if [ $? != 0 ]; then - logger -t push_api_mdm_connected "Failed to save lastConnected [$LAST_CONNECTED] to $STATUS_FILE" -fi - - -if [ "$INTERVAL" != "" ]; then - sed -i "s/\"intervalSeconds\"\s*:\s*\".*\"/\"intervalSeconds\": \"$INTERVAL\"/" $STATUS_FILE - - if [ $? != 0 ]; then - logger -t push_api_mdm_connected "Failed to save intervalSeconds [$INTERVAL] to $STATUS_FILE" - fi -fi - - diff --git a/recipes-core/annex-client/annex-client/push_api_mdm_status b/recipes-core/annex-client/annex-client/push_api_mdm_status deleted file mode 100755 index cf91eda..0000000 --- a/recipes-core/annex-client/annex-client/push_api_mdm_status +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# This script pushes the current time to the API's remote management -# to track last connected time - -STATUS_FILE="/var/config/devicehq/status.json" -DHQ_DIR="/var/config/devicehq" - -STATUS="$1" - -if [ "$STATUS" == "" ]; then - STATUS="HEARTBEAT: $(date)" -fi - -if [ ! -f $STATUS_FILE ]; then - mkdir -p $DHQ_DIR - echo "{ - \"status\": \"unknown\", - \"lastConnected\": \"unknown\", - \"intervalSeconds\": \"10\" -}" > $STATUS_FILE -fi - -sed -i "s~\"status\"\s*:\s*\".*\"~\"status\": \"$STATUS\"~" $STATUS_FILE - -if [ $? != 0 ]; then - logger -t push_api_mdm_status "Failed to save status [$STATUS] to $STATUS_FILE" -fi - - - diff --git a/recipes-core/annex-proto/annex-proto.bb b/recipes-core/annex-proto/annex-proto.bb deleted file mode 100644 index cbb6fb2..0000000 --- a/recipes-core/annex-proto/annex-proto.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Provides the Multi-Tech MDM client protobuffer definitions" -SECTION = "remote-management" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -PR = "r20" -PROVIDES = "annex_proto" -DEPENDS = "protobuf" -SRCREV = "7ad3f17a59d3fe564da099518310d61ad1304913" - -SRC_URI = "git://git@${MTS_INTERNAL_GIT}/annex/proto.git;protocol=ssh;branch=master \ -" -S = "${WORKDIR}/git" - -# don't use cli here -do_compile() { - echo "directory: `pwd`" -} - -do_install() { - install annex.proto ${STAGING_DIR_NATIVE} -} - - - diff --git a/recipes-core/eglibc/eglibc/cvs-gethostbyname4-memory-leak.patch b/recipes-core/eglibc/eglibc/cvs-gethostbyname4-memory-leak.patch deleted file mode 100644 index cd4e388..0000000 --- a/recipes-core/eglibc/eglibc/cvs-gethostbyname4-memory-leak.patch +++ /dev/null @@ -1,576 +0,0 @@ -diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/include/arpa/nameser_compat.h libc/include/arpa/nameser_compat.h
---- libc.orig/include/arpa/nameser_compat.h 2008-05-12 11:38:35.000000000 -0400
-+++ libc/include/arpa/nameser_compat.h 2017-04-06 16:34:20.413823000 -0400
-@@ -1,8 +1,8 @@
- #ifndef _ARPA_NAMESER_COMPAT_
- #include <resolv/arpa/nameser_compat.h>
-
--/* Picksome unused number to represent lookups of IPv4 and IPv6 (i.e.,
-- T_A and T_AAAA). */
--#define T_UNSPEC 62321
-+/* The number is outside the 16-bit RR type range and is used
-+ internally by the implementation. */
-+#define T_QUERY_A_AND_AAAA 439963904
-
- #endif
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/include/resolv.h libc/include/resolv.h
---- libc.orig/include/resolv.h 2013-09-05 18:41:05.000000000 -0400
-+++ libc/include/resolv.h 2017-04-06 16:33:09.853700600 -0400
-@@ -48,11 +48,11 @@
- libc_hidden_proto (__res_state)
-
- int __libc_res_nquery (res_state, const char *, int, int, u_char *, int,
-- u_char **, u_char **, int *, int *);
-+ u_char **, u_char **, int *, int *, int *);
- int __libc_res_nsearch (res_state, const char *, int, int, u_char *, int,
-- u_char **, u_char **, int *, int *);
-+ u_char **, u_char **, int *, int *, int *);
- int __libc_res_nsend (res_state, const u_char *, int, const u_char *, int,
-- u_char *, int, u_char **, u_char **, int *, int *)
-+ u_char *, int, u_char **, u_char **, int *, int *, int *)
- attribute_hidden;
-
- libresolv_hidden_proto (_sethtent)
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/gethnamaddr.c libc/resolv/gethnamaddr.c
---- libc.orig/resolv/gethnamaddr.c 2013-06-15 13:37:04.000000000 -0400
-+++ libc/resolv/gethnamaddr.c 2017-04-06 16:13:44.727609300 -0400
-@@ -621,7 +621,7 @@
- buf.buf = origbuf = (querybuf *) alloca (1024);
-
- if ((n = __libc_res_nsearch(&_res, name, C_IN, type, buf.buf->buf, 1024,
-- &buf.ptr, NULL, NULL, NULL)) < 0) {
-+ &buf.ptr, NULL, NULL, NULL, NULL)) < 0) {
- if (buf.buf != origbuf)
- free (buf.buf);
- Dprintf("res_nsearch failed (%d)\n", n);
-@@ -716,12 +716,12 @@
- buf.buf = orig_buf = (querybuf *) alloca (1024);
-
- n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf, 1024,
-- &buf.ptr, NULL, NULL, NULL);
-+ &buf.ptr, NULL, NULL, NULL, NULL);
- if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0) {
- strcpy(qp, "ip6.int");
- n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf,
- buf.buf != orig_buf ? MAXPACKET : 1024,
-- &buf.ptr, NULL, NULL, NULL);
-+ &buf.ptr, NULL, NULL, NULL, NULL);
- }
- if (n < 0) {
- if (buf.buf != orig_buf)
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/nss_dns/dns-canon.c libc/resolv/nss_dns/dns-canon.c
---- libc.orig/resolv/nss_dns/dns-canon.c 2014-01-03 12:51:28.000000000 -0500
-+++ libc/resolv/nss_dns/dns-canon.c 2017-04-06 16:11:49.654787500 -0400
-@@ -62,7 +62,7 @@
- {
- int r = __libc_res_nquery (&_res, name, ns_c_in, qtypes[i],
- buf, sizeof (buf), &ansp.ptr, NULL, NULL,
-- NULL);
-+ NULL, NULL);
- if (r > 0)
- {
- /* We need to decode the response. Just one question record.
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/nss_dns/dns-host.c libc/resolv/nss_dns/dns-host.c
---- libc.orig/resolv/nss_dns/dns-host.c 2017-04-06 14:03:55.000000000 -0400
-+++ libc/resolv/nss_dns/dns-host.c 2017-04-06 16:12:50.319551700 -0400
-@@ -190,7 +190,7 @@
- host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024);
-
- n = __libc_res_nsearch (&_res, name, C_IN, type, host_buffer.buf->buf,
-- 1024, &host_buffer.ptr, NULL, NULL, NULL);
-+ 1024, &host_buffer.ptr, NULL, NULL, NULL, NULL);
- if (n < 0)
- {
- switch (errno)
-@@ -225,7 +225,7 @@
- n = __libc_res_nsearch (&_res, name, C_IN, T_A, host_buffer.buf->buf,
- host_buffer.buf != orig_host_buffer
- ? MAXPACKET : 1024, &host_buffer.ptr,
-- NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL);
-
- if (n < 0)
- {
-@@ -308,12 +308,13 @@
- u_char *ans2p = NULL;
- int nans2p = 0;
- int resplen2 = 0;
-+ int ans2p_malloced = 0;
-
- int olderr = errno;
- enum nss_status status;
-- int n = __libc_res_nsearch (&_res, name, C_IN, T_UNSPEC,
-+ int n = __libc_res_nsearch (&_res, name, C_IN, T_QUERY_A_AND_AAAA,
- host_buffer.buf->buf, 2048, &host_buffer.ptr,
-- &ans2p, &nans2p, &resplen2);
-+ &ans2p, &nans2p, &resplen2, &ans2p_malloced);
- if (n < 0)
- {
- switch (errno)
-@@ -352,6 +353,10 @@
- resplen2, name, pat, buffer, buflen,
- errnop, herrnop, ttlp);
-
-+ /* Check whether ans2p was separately allocated. */
-+ if (ans2p_malloced)
-+ free (ans2p);
-+
- if (host_buffer.buf != orig_host_buffer)
- free (host_buffer.buf);
-
-@@ -460,7 +465,7 @@
- strcpy (qp, "].ip6.arpa");
- n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR,
- host_buffer.buf->buf, 1024, &host_buffer.ptr,
-- NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL);
- if (n >= 0)
- goto got_it_already;
- }
-@@ -481,14 +486,14 @@
- }
-
- n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
-- 1024, &host_buffer.ptr, NULL, NULL, NULL);
-+ 1024, &host_buffer.ptr, NULL, NULL, NULL, NULL);
- if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0)
- {
- strcpy (qp, "ip6.int");
- n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
- host_buffer.buf != orig_host_buffer
- ? MAXPACKET : 1024, &host_buffer.ptr,
-- NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL);
- }
- if (n < 0)
- {
-@@ -613,7 +618,8 @@
- int have_to_map = 0;
- uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
- buffer += pad;
-- if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
-+ buflen = buflen > pad ? buflen - pad : 0;
-+ if (__glibc_unlikely (buflen < sizeof (struct host_data)))
- {
- /* The buffer is too small. */
- too_small:
-
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/nss_dns/dns-network.c libc/resolv/nss_dns/dns-network.c
---- libc.orig/resolv/nss_dns/dns-network.c 2014-01-03 12:51:28.000000000 -0500
-+++ libc/resolv/nss_dns/dns-network.c 2017-04-06 16:13:18.561373600 -0400
-@@ -118,18 +118,15 @@
- } net_buffer;
- querybuf *orig_net_buffer;
- int anslen;
-- char *qbuf;
- enum nss_status status;
-
- if (__res_maybe_init (&_res, 0) == -1)
- return NSS_STATUS_UNAVAIL;
-
-- qbuf = strdupa (name);
--
- net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024);
-
-- anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf,
-- 1024, &net_buffer.ptr, NULL, NULL, NULL);
-+ anslen = __libc_res_nsearch (&_res, name, C_IN, T_PTR, net_buffer.buf->buf,
-+ 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL);
- if (anslen < 0)
- {
- /* Nothing found. */
-@@ -205,7 +202,7 @@
- net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024);
-
- anslen = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf,
-- 1024, &net_buffer.ptr, NULL, NULL, NULL);
-+ 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL);
- if (anslen < 0)
- {
- /* Nothing found. */
-@@ -398,8 +395,8 @@
-
- case BYNAME:
- {
-- char **ap = result->n_aliases++;
-- while (*ap != NULL)
-+ char **ap;
-+ for (ap = result->n_aliases; *ap != NULL; ++ap)
- {
- /* Check each alias name for being of the forms:
- 4.3.2.1.in-addr.arpa = net 1.2.3.4
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/res_mkquery.c libc/resolv/res_mkquery.c
---- libc.orig/resolv/res_mkquery.c 2013-09-05 18:41:05.000000000 -0400
-+++ libc/resolv/res_mkquery.c 2017-04-06 16:13:56.412597600 -0400
-@@ -110,6 +110,10 @@
- int n;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
-+ if (class < 0 || class > 65535
-+ || type < 0 || type > 65535)
-+ return -1;
-+
- #ifdef DEBUG
- if (statp->options & RES_DEBUG)
- printf(";; res_nmkquery(%s, %s, %s, %s)\n",
-diff -Naur '--exclude=.git' '--exclude=*.pyc' '--exclude=*.py' '--exclude=*.*~' libc.orig/resolv/res_query.c libc/resolv/res_query.c
---- libc.orig/resolv/res_query.c 2017-04-06 14:03:55.000000000 -0400
-+++ libc/resolv/res_query.c 2017-04-06 16:15:04.137842200 -0400
-@@ -98,7 +98,7 @@
- __libc_res_nquerydomain(res_state statp, const char *name, const char *domain,
- int class, int type, u_char *answer, int anslen,
- u_char **answerp, u_char **answerp2, int *nanswerp2,
-- int *resplen2);
-+ int *resplen2, int *answerp2_malloced);
-
- /*
- * Formulate a normal query, send, and await answer.
-@@ -119,14 +119,15 @@
- u_char **answerp, /* if buffer needs to be enlarged */
- u_char **answerp2,
- int *nanswerp2,
-- int *resplen2)
-+ int *resplen2,
-+ int *answerp2_malloced)
- {
- HEADER *hp = (HEADER *) answer;
- HEADER *hp2;
- int n, use_malloc = 0;
- u_int oflags = statp->_flags;
-
-- size_t bufsize = (type == T_UNSPEC ? 2 : 1) * QUERYSIZE;
-+ size_t bufsize = (type == T_QUERY_A_AND_AAAA ? 2 : 1) * QUERYSIZE;
- u_char *buf = alloca (bufsize);
- u_char *query1 = buf;
- int nquery1 = -1;
-@@ -141,7 +142,7 @@
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
- #endif
-
-- if (type == T_UNSPEC)
-+ if (type == T_QUERY_A_AND_AAAA)
- {
- n = res_nmkquery(statp, QUERY, name, class, T_A, NULL, 0, NULL,
- query1, bufsize);
-@@ -194,7 +195,7 @@
- if (__builtin_expect (n <= 0, 0) && !use_malloc) {
- /* Retry just in case res_nmkquery failed because of too
- short buffer. Shouldn't happen. */
-- bufsize = (type == T_UNSPEC ? 2 : 1) * MAXPACKET;
-+ bufsize = (type == T_QUERY_A_AND_AAAA ? 2 : 1) * MAXPACKET;
- buf = malloc (bufsize);
- if (buf != NULL) {
- query1 = buf;
-@@ -224,7 +225,8 @@
- }
- assert (answerp == NULL || (void *) *answerp == (void *) answer);
- n = __libc_res_nsend(statp, query1, nquery1, query2, nquery2, answer,
-- anslen, answerp, answerp2, nanswerp2, resplen2);
-+ anslen, answerp, answerp2, nanswerp2, resplen2,
-+ answerp2_malloced);
- if (use_malloc)
- free (buf);
- if (n < 0) {
-@@ -316,7 +318,7 @@
- int anslen) /* size of answer buffer */
- {
- return __libc_res_nquery(statp, name, class, type, answer, anslen,
-- NULL, NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL, NULL);
- }
- libresolv_hidden_def (res_nquery)
-
-@@ -335,7 +337,8 @@
- u_char **answerp,
- u_char **answerp2,
- int *nanswerp2,
-- int *resplen2)
-+ int *resplen2,
-+ int *answerp2_malloced)
- {
- const char *cp, * const *domain;
- HEADER *hp = (HEADER *) answer;
-@@ -360,7 +363,7 @@
- if (!dots && (cp = res_hostalias(statp, name, tmp, sizeof tmp))!= NULL)
- return (__libc_res_nquery(statp, cp, class, type, answer,
- anslen, answerp, answerp2,
-- nanswerp2, resplen2));
-+ nanswerp2, resplen2, answerp2_malloced));
-
- #ifdef DEBUG
- if (statp->options & RES_DEBUG)
-@@ -377,8 +380,9 @@
- if (dots >= statp->ndots || trailing_dot) {
- ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
- answer, anslen, answerp,
-- answerp2, nanswerp2, resplen2);
-- if (ret > 0 || trailing_dot)
-+ answerp2, nanswerp2, resplen2,
-+ answerp2_malloced);
-+ if (ret > 0 || (ret == 0 && *resplen2 > 0) || trailing_dot)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
-@@ -386,12 +390,12 @@
- answer = *answerp;
- anslen = MAXPACKET;
- }
-- if (answerp2
-- && (*answerp2 < answer || *answerp2 >= answer + anslen))
-+ if (answerp2 && *answerp2_malloced)
- {
- free (*answerp2);
- *answerp2 = NULL;
- *nanswerp2 = 0;
-+ *answerp2_malloced = 0;
- }
- }
-
-@@ -418,21 +422,20 @@
- class, type,
- answer, anslen, answerp,
- answerp2, nanswerp2,
-- resplen2);
-- if (ret > 0)
-+ resplen2, answerp2_malloced);
-+ if ((ret > 0) || (ret == 0 && *resplen2 > 0))
- return (ret);
-
- if (answerp && *answerp != answer) {
- answer = *answerp;
- anslen = MAXPACKET;
- }
-- if (answerp2
-- && (*answerp2 < answer
-- || *answerp2 >= answer + anslen))
-+ if (answerp2 && *answerp2_malloced)
- {
- free (*answerp2);
- *answerp2 = NULL;
- *nanswerp2 = 0;
-+ *answerp2_malloced = 0;
- }
-
- /*
-@@ -488,8 +491,9 @@
- && !(tried_as_is || root_on_list)) {
- ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
- answer, anslen, answerp,
-- answerp2, nanswerp2, resplen2);
-- if (ret > 0)
-+ answerp2, nanswerp2, resplen2,
-+ answerp2_malloced);
-+ if ((ret > 0) || (ret == 0 && *resplen2 > 0))
- return (ret);
- }
-
-@@ -500,11 +504,12 @@
- * else send back meaningless H_ERRNO, that being the one from
- * the last DNSRCH we did.
- */
-- if (answerp2 && (*answerp2 < answer || *answerp2 >= answer + anslen))
-+ if (answerp2 && *answerp2_malloced)
- {
- free (*answerp2);
- *answerp2 = NULL;
- *nanswerp2 = 0;
-+ *answerp2_malloced = 0;
- }
- if (saved_herrno != -1)
- RES_SET_H_ERRNO(statp, saved_herrno);
-@@ -524,7 +529,7 @@
- int anslen) /* size of answer */
- {
- return __libc_res_nsearch(statp, name, class, type, answer,
-- anslen, NULL, NULL, NULL, NULL);
-+ anslen, NULL, NULL, NULL, NULL, NULL);
- }
- libresolv_hidden_def (res_nsearch)
-
-@@ -542,7 +547,8 @@
- u_char **answerp,
- u_char **answerp2,
- int *nanswerp2,
-- int *resplen2)
-+ int *resplen2,
-+ int *answerp2_malloced)
- {
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
-@@ -584,7 +590,7 @@
- }
- return (__libc_res_nquery(statp, longname, class, type, answer,
- anslen, answerp, answerp2, nanswerp2,
-- resplen2));
-+ resplen2, answerp2_malloced));
- }
-
- int
-@@ -596,7 +602,8 @@
- int anslen) /* size of answer */
- {
- return __libc_res_nquerydomain(statp, name, domain, class, type,
-- answer, anslen, NULL, NULL, NULL, NULL);
-+ answer, anslen, NULL, NULL, NULL, NULL,
-+ NULL);
- }
- libresolv_hidden_def (res_nquerydomain)
-
-diff -Naur libc.orig/resolv/res_send.c libc/resolv/res_send.c
---- libc.orig/resolv/res_send.c 2017-04-21 17:26:25.089490339 -0500
-+++ libc/resolv/res_send.c 2017-04-21 17:30:47.397482573 -0500
-@@ -120,13 +120,13 @@
- #define MAXPACKET 65536
- #endif
-
--
-+#ifdef SOCK_NONBLOCK
- #ifndef __ASSUME_SOCK_CLOEXEC
- static int __have_o_nonblock;
- #else
- # define __have_o_nonblock 0
- #endif
--
-+#endif
-
- /* From ev_streams.c. */
-
-@@ -203,12 +203,12 @@
- static int send_vc(res_state, const u_char *, int,
- const u_char *, int,
- u_char **, int *, int *, int, u_char **,
-- u_char **, int *, int *);
-+ u_char **, int *, int *, int *);
- static int send_dg(res_state, const u_char *, int,
- const u_char *, int,
- u_char **, int *, int *, int,
- int *, int *, u_char **,
-- u_char **, int *, int *);
-+ u_char **, int *, int *, int *);
- #ifdef DEBUG
- static void Aerror(const res_state, FILE *, const char *, int,
- const struct sockaddr *);
-@@ -360,7 +360,7 @@
- __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
- const u_char *buf2, int buflen2,
- u_char *ans, int anssiz, u_char **ansp, u_char **ansp2,
-- int *nansp2, int *resplen2)
-+ int *nansp2, int *resplen2, int *ansp2_malloced)
- {
- int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
-
-@@ -565,7 +565,8 @@
- try = statp->retry;
- n = send_vc(statp, buf, buflen, buf2, buflen2,
- &ans, &anssiz, &terrno,
-- ns, ansp, ansp2, nansp2, resplen2);
-+ ns, ansp, ansp2, nansp2, resplen2,
-+ ansp2_malloced);
- if (n < 0)
- return (-1);
- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
-@@ -575,7 +576,7 @@
- n = send_dg(statp, buf, buflen, buf2, buflen2,
- &ans, &anssiz, &terrno,
- ns, &v_circuit, &gotsomewhere, ansp,
-- ansp2, nansp2, resplen2);
-+ ansp2, nansp2, resplen2, ansp2_malloced);
- if (n < 0)
- return (-1);
- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
-@@ -665,7 +666,7 @@
- const u_char *buf, int buflen, u_char *ans, int anssiz)
- {
- return __libc_res_nsend(statp, buf, buflen, NULL, 0, ans, anssiz,
-- NULL, NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL, NULL);
- }
- libresolv_hidden_def (res_nsend)
-
-@@ -747,7 +748,7 @@
- const u_char *buf, int buflen, const u_char *buf2, int buflen2,
- u_char **ansp, int *anssizp,
- int *terrno, int ns, u_char **anscp, u_char **ansp2, int *anssizp2,
-- int *resplen2)
-+ int *resplen2, int *ansp2_malloced)
- {
- const HEADER *hp = (HEADER *) buf;
- const HEADER *hp2 = (HEADER *) buf2;
-@@ -896,6 +897,8 @@
- }
- *thisanssizp = MAXPACKET;
- *thisansp = newp;
-+ if (thisansp == ansp2)
-+ *ansp2_malloced = 1;
- anhp = (HEADER *) newp;
- /* A uint16_t can't be larger than MAXPACKET
- thus it's safe to allocate MAXPACKET but
-@@ -993,6 +996,7 @@
-
- /* only try IPv6 if IPv6 NS and if not failed before */
- if (nsap->sa_family == AF_INET6 && !statp->ipv6_unavail) {
-+#ifdef SOCK_NONBLOCK
- if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
- EXT(statp).nssocks[ns] =
- socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK,
-@@ -1005,12 +1009,14 @@
- #endif
- }
- if (__builtin_expect (__have_o_nonblock < 0, 0))
-+#endif
- EXT(statp).nssocks[ns] =
- socket(PF_INET6, SOCK_DGRAM, 0);
- if (EXT(statp).nssocks[ns] < 0)
- statp->ipv6_unavail = errno == EAFNOSUPPORT;
- slen = sizeof (struct sockaddr_in6);
- } else if (nsap->sa_family == AF_INET) {
-+#ifdef SOCK_NONBLOCK
- if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
- EXT(statp).nssocks[ns]
- = socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK,
-@@ -1023,6 +1029,7 @@
- #endif
- }
- if (__builtin_expect (__have_o_nonblock < 0, 0))
-+#endif
- EXT(statp).nssocks[ns]
- = socket(PF_INET, SOCK_DGRAM, 0);
- slen = sizeof (struct sockaddr_in);
-@@ -1049,7 +1056,11 @@
- __res_iclose(statp, false);
- return (0);
- }
-+#ifdef SOCK_NONBLOCK
- if (__builtin_expect (__have_o_nonblock < 0, 0)) {
-+#else
-+ {
-+#endif
- /* Make socket non-blocking. */
- int fl = __fcntl (EXT(statp).nssocks[ns], F_GETFL);
- if (fl != -1)
-@@ -1128,7 +1139,7 @@
- const u_char *buf, int buflen, const u_char *buf2, int buflen2,
- u_char **ansp, int *anssizp,
- int *terrno, int ns, int *v_circuit, int *gotsomewhere, u_char **anscp,
-- u_char **ansp2, int *anssizp2, int *resplen2)
-+ u_char **ansp2, int *anssizp2, int *resplen2, int *ansp2_malloced)
- {
- const HEADER *hp = (HEADER *) buf;
- const HEADER *hp2 = (HEADER *) buf2;
-@@ -1359,6 +1370,8 @@
- if (newp != NULL) {
- *thisanssizp = MAXPACKET;
- *thisansp = newp;
-+ if (thisansp == ansp2)
-+ *ansp2_malloced = 1;
- }
- }
- /* We could end up with truncation if anscp was NULL
-@@ -1542,6 +1555,7 @@
- retval = reopen (statp, terrno, ns);
- if (retval <= 0)
- return retval;
-+ pfd[0].fd = EXT(statp).nssocks[ns];
- }
- }
- goto wait;
diff --git a/recipes-core/eglibc/eglibc_%.bbappend.obsolete b/recipes-core/eglibc/eglibc_%.bbappend.obsolete deleted file mode 100644 index 68af86e..0000000 --- a/recipes-core/eglibc/eglibc_%.bbappend.obsolete +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}" -SRC_URI += "file://cvs-gethostbyname4-memory-leak.patch" -PR = "r2" diff --git a/recipes-core/file-magic-db-images/file-magic-db-images_0.1.bb b/recipes-core/file-magic-db-images/file-magic-db-images_0.1.bb deleted file mode 100644 index 43d3052..0000000 --- a/recipes-core/file-magic-db-images/file-magic-db-images_0.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "Stripped MIME detection database for file(1) with definition of images" -HOMEPAGE = "http://www.darwinsys.com/file/" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188" -DEPENDS = "file-native" -FILES_${PN} = "${datadir}/misc/magic-images.mgc" - -PV = "0.1" -PR = "r5" - -SRC_URI = "file://COPYING \ - file://Magdir/images \ - file://Magdir/jpeg \ - file://Magdir/msdos \ - file://Magdir/sgml" - -S = "${WORKDIR}" - -do_compile() { - ${STAGING_BINDIR_NATIVE}/file-native/file -v - ${STAGING_BINDIR_NATIVE}/file-native/file -C -m ${S}/Magdir -} - -do_install() { - install -d ${D}/${datadir}/misc/ - install -m 0644 ${WORKDIR}/Magdir.mgc ${D}/${datadir}/misc/magic-images.mgc -} diff --git a/recipes-core/file-magic-db-images/files/COPYING b/recipes-core/file-magic-db-images/files/COPYING deleted file mode 100644 index 68148e2..0000000 --- a/recipes-core/file-magic-db-images/files/COPYING +++ /dev/null @@ -1,29 +0,0 @@ -$File: LEGAL.NOTICE,v 1.15 2006/05/03 18:48:33 christos Exp $ -Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. -Software written by Ian F. Darwin and others; -maintained 1994- Christos Zoulas. - -This software is not subject to any export provision of the United States -Department of Commerce, and may be exported to any country or planet. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice immediately at the beginning of the file, without modification, - this list of conditions, and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/recipes-core/file-magic-db-images/files/Magdir/images b/recipes-core/file-magic-db-images/files/Magdir/images deleted file mode 100644 index 493027f..0000000 --- a/recipes-core/file-magic-db-images/files/Magdir/images +++ /dev/null @@ -1,78 +0,0 @@ -# PNG [Portable Network Graphics, or "PNG's Not GIF"] images -# (Greg Roelofs, newt@uchicago.edu) -# (Albert Cahalan, acahalan@cs.uml.edu) -# -# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... -# -0 string \x89PNG\x0d\x0a\x1a\x0a PNG image data -!:mime image/png ->16 belong x \b, %d x ->20 belong x %d, ->24 byte x %d-bit ->25 byte 0 grayscale, ->25 byte 2 \b/color RGB, ->25 byte 3 colormap, ->25 byte 4 gray+alpha, ->25 byte 6 \b/color RGBA, -#>26 byte 0 deflate/32K, ->28 byte 0 non-interlaced ->28 byte 1 interlaced - -# GIF -0 string GIF8 GIF image data -!:mime image/gif -!:apple 8BIMGIFf ->4 string 7a \b, version 8%s, ->4 string 9a \b, version 8%s, ->6 leshort >0 %d x ->8 leshort >0 %d -#>10 byte &0x80 color mapped, -#>10 byte&0x07 =0x00 2 colors -#>10 byte&0x07 =0x01 4 colors -#>10 byte&0x07 =0x02 8 colors -#>10 byte&0x07 =0x03 16 colors -#>10 byte&0x07 =0x04 32 colors -#>10 byte&0x07 =0x05 64 colors -#>10 byte&0x07 =0x06 128 colors -#>10 byte&0x07 =0x07 256 colors - -# PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) -# http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\ -# 28bitmap_information_header.29 -0 string BM ->14 leshort 12 PC bitmap, OS/2 1.x format -!:mime image/x-ms-bmp ->>18 leshort x \b, %d x ->>20 leshort x %d ->14 leshort 64 PC bitmap, OS/2 2.x format -!:mime image/x-ms-bmp ->>18 leshort x \b, %d x ->>20 leshort x %d ->14 leshort 40 PC bitmap, Windows 3.x format -!:mime image/x-ms-bmp ->>18 lelong x \b, %d x ->>22 lelong x %d x ->>28 leshort x %d ->14 leshort 124 PC bitmap, Windows 98/2000 and newer format -!:mime image/x-ms-bmp ->>18 lelong x \b, %d x ->>22 lelong x %d x ->>28 leshort x %d ->14 leshort 108 PC bitmap, Windows 95/NT4 and newer format -!:mime image/x-ms-bmp ->>18 lelong x \b, %d x ->>22 lelong x %d x ->>28 leshort x %d ->14 leshort 128 PC bitmap, Windows NT/2000 format -!:mime image/x-ms-bmp ->>18 lelong x \b, %d x ->>22 lelong x %d x ->>28 leshort x %d -# Too simple - MPi -#0 string IC PC icon data -#0 string PI PC pointer image data -#0 string CI PC color icon data -#0 string CP PC color pointer image data -# Conflicts with other entries [BABYL] -#0 string BA PC bitmap array data - diff --git a/recipes-core/file-magic-db-images/files/Magdir/jpeg b/recipes-core/file-magic-db-images/files/Magdir/jpeg deleted file mode 100644 index e6a4ffa..0000000 --- a/recipes-core/file-magic-db-images/files/Magdir/jpeg +++ /dev/null @@ -1,119 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: jpeg,v 1.28 2015/04/09 20:01:40 christos Exp $ -# JPEG images -# SunOS 5.5.1 had -# -# 0 string \377\330\377\340 JPEG file -# 0 string \377\330\377\356 JPG file -# -# both of which turn into "JPEG image data" here. -# -0 beshort 0xffd8 JPEG image data -!:mime image/jpeg -!:apple 8BIMJPEG -!:strength *3 -!:ext jpeg/jpg/jpe/jfif ->6 string JFIF \b, JFIF standard -# The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06 -# in a vain attempt to add image size reporting for JFIF. Note that these -# tests are not fool-proof since some perfectly valid JPEGs are currently -# impossible to specify in magic(4) format. -# First, a little JFIF version info: ->>11 byte x \b %d. ->>12 byte x \b%02d -# Next, the resolution or aspect ratio of the image: ->>13 byte 0 \b, aspect ratio ->>13 byte 1 \b, resolution (DPI) ->>13 byte 2 \b, resolution (DPCM) ->>14 beshort x \b, density %dx ->>16 beshort x \b%d ->>4 beshort x \b, segment length %d -# Next, show thumbnail info, if it exists: ->>18 byte !0 \b, thumbnail %dx ->>>19 byte x \b%d ->6 string Exif \b, Exif standard: [ ->>12 indirect/r x ->>12 string x \b] - -# Jump to the first segment ->(4.S+4) use jpeg_segment - -# This uses recursion... -0 name jpeg_segment ->0 beshort 0xFFFE -# Recursion handled by FFE0 -#>>(2.S+2) use jpeg_segment ->>2 pstring/HJ x \b, comment: "%s" - ->0 beshort 0xFFC0 ->>(2.S+2) use jpeg_segment ->>4 byte x \b, baseline, precision %d ->>7 beshort x \b, %dx ->>5 beshort x \b%d ->>9 byte x \b, frames %d - ->0 beshort 0xFFC1 ->>(2.S+2) use jpeg_segment ->>4 byte x \b, extended sequential, precision %d ->>7 beshort x \b, %dx ->>5 beshort x \b%d ->>9 byte x \b, frames %d - ->0 beshort 0xFFC2 ->>(2.S+2) use jpeg_segment ->>4 byte x \b, progressive, precision %d ->>7 beshort x \b, %dx ->>5 beshort x \b%d ->>9 byte x \b, frames %d - -# Define Huffman Tables ->0 beshort 0xFFC4 ->>(2.S+2) use jpeg_segment - ->0 beshort 0xFFE1 -# Recursion handled by FFE0 -#>>(2.S+2) use jpeg_segment ->>4 string Exif \b, Exif Standard: [ ->>>10 indirect/r x ->>>10 string x \b] - -# Application specific markers ->0 beshort&0xFFE0 =0xFFE0 ->>(2.S+2) use jpeg_segment - -# DB: Define Quantization tables -# DD: Define Restart interval [XXX: wrong here, it is 4 bytes] -# D8: Start of image -# D9: End of image -# Dn: Restart ->0 beshort&0xFFD0 =0xFFD0 ->>0 beshort&0xFFE0 !0xFFE0 ->>>(2.S+2) use jpeg_segment - -#>0 beshort x unknown 0x%x -#>>(2.S+2) use jpeg_segment - -# HSI is Handmade Software's proprietary JPEG encoding scheme -0 string hsi1 JPEG image data, HSI proprietary - -# From: David Santinoli <david@santinoli.com> -0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000 -# From: Johan van der Knijff <johan.vanderknijff@kb.nl> -# Added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes -# https://github.com/bitsgalore/jp2kMagic -# -# Now read value of 'Brand' field, which yields a few possibilities: ->20 string \x6a\x70\x32\x20 Part 1 (JP2) -!:mime image/jp2 ->20 string \x6a\x70\x78\x20 Part 2 (JPX) -!:mime image/jpx ->20 string \x6a\x70\x6d\x20 Part 6 (JPM) -!:mime image/jpm ->20 string \x6d\x6a\x70\x32 Part 3 (MJ2) -!:mime video/mj2 - -# Type: JPEG 2000 codesream -# From: Mathieu Malaterre <mathieu.malaterre@gmail.com> -0 belong 0xff4fff51 JPEG 2000 codestream -45 beshort 0xff52 diff --git a/recipes-core/file-magic-db-images/files/Magdir/msdos b/recipes-core/file-magic-db-images/files/Magdir/msdos deleted file mode 100644 index 7b1330e..0000000 --- a/recipes-core/file-magic-db-images/files/Magdir/msdos +++ /dev/null @@ -1,29 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: msdos,v 1.105 2016/03/03 18:58:14 christos Exp $ -# msdos: file(1) magic for MS-DOS files -# - -# Windows icons -# Update: Joerg Jenderek -# URL: https://en.wikipedia.org/wiki/CUR_(file_format) -# Note: similiar to Windows CURsor. container for BMP (only DIB part) or PNG -0 belong 0x00000100 ->9 byte 0 ->>0 byte x ->>0 use cur-ico-dir ->9 ubyte 0xff ->>0 byte x ->>0 use cur-ico-dir -# displays number of icons and information for icon or cursor -0 name cur-ico-dir -# skip some Lotus 1-2-3 worksheets, CYCLE.PIC and keep Windows cursors with -# 1st data offset = dir header size + n * dir entry size = 6 + n * 10h = ?6h ->18 ulelong &0x00000006 -# skip remaining worksheets, because valid only for DIB image (40) or PNG image (\x89PNG) ->>(18.l) ulelong x MS Windows ->>>0 ubelong 0x00000100 icon resource -#!:mime image/vnd.microsoft.icon -!:mime image/x-icon -!:ext ico - diff --git a/recipes-core/file-magic-db-images/files/Magdir/sgml b/recipes-core/file-magic-db-images/files/Magdir/sgml deleted file mode 100644 index 79abe8c..0000000 --- a/recipes-core/file-magic-db-images/files/Magdir/sgml +++ /dev/null @@ -1,8 +0,0 @@ -#------------------------------------------------------------------------------ # $File: sgml,v 1.32 2015/07/11 15:08:53 christos Exp $ -# Type: SVG Vectorial Graphics -# From: Noel Torres <tecnico@ejerciciosresueltos.com> -0 string \<?xml\ version=" ->15 string >\0 ->>19 search/4096 \<svg SVG Scalable Vector Graphics image -!:mime image/svg+xml - diff --git a/recipes-core/initscripts/initscripts-1.0/umountfs b/recipes-core/initscripts/initscripts-1.0/umountfs deleted file mode 100644 index 9c36bd3..0000000 --- a/recipes-core/initscripts/initscripts-1.0/umountfs +++ /dev/null @@ -1,346 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: umountfs -# Required-Start: -# Required-Stop: -# Default-Start: -# Default-Stop: 0 6 -# Short-Description: Turn off swap and unmount all local file systems. -# Description: -### END INIT INFO - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -upgrade_fname="/var/volatile/do_flash_upgrade" - -umount_all() { - echo "Deactivating swap..." - swapoff -a - - # We leave /proc mounted. - echo "Unmounting local filesystems..." - grep -q /mnt/ram /proc/mounts && mount -o remount,ro /mnt/ram - umount -f -a -r > /dev/null 2>&1 - - mount -o remount,ro / -} - -blink_leds() { - led_dir=/sys/class/leds - # blink all programmable LEDs except status - leds=$(ls $led_dir/ | grep -v status) - nleds=$(echo "$leds" | wc -w) - - # turn LEDs off - for led in $leds; do - echo "timer" > $led_dir/$led/trigger - echo 0 > $led_dir/$led/delay_off - done - - int=200 - total=$(( int * (nleds+1) )) - on=$(( total - int )) - off=$(( total - on )) - - # make a pattern - for led in $leds; do - echo "$on" > $led_dir/$led/delay_on - echo "$off" > $led_dir/$led/delay_off - on=$(( on - int )) - off=$(( total - on )) - done -} - -err_leds() { - led_dir=/sys/class/leds - # blink all programmable LEDs except status - leds=$(ls $led_dir/ | grep -v status) - nleds=$(echo "$leds" | wc -w) - - # turn LEDs off - for led in $leds; do - echo "timer" > $led_dir/$led/trigger - echo 0 > $led_dir/$led/delay_off - done - - int=200 - total=$(( int * (nleds+1) )) - on=$(( total - int )) - off=$(( total - on )) - - # make a pattern - for led in $leds; do - echo "$on" > $led_dir/$led/delay_on - echo "$off" > $led_dir/$led/delay_off - done - sleep 5 -} - - - -flash_upgrade() { - if [ $# -ne 1 ]; then - echo "need to specify flash-root" - return - fi - # flash_root must be a mountpoint that is not the rootfs and be mounted rw - # External mount may be on symlink. - local flash_root=$(readlink -f ${1}) - - local flash_dir=${flash_root}/flash-upgrade - local upgrade_file=${flash_dir}/upgrade.bin - local kernel_solo_file=${flash_dir}/uImage.bin - local rootfs_solo_file=${flash_dir}/rootfs.jffs2 - local uboot_solo_file=${flash_dir}/u-boot.bin - - local reboot_cmd=/usr/sbin/upgrade-reboot - local nandwrite_cmd=/usr/bin/nandwrite.static - local mode= - local bootstrap_mtd= - local config_mtd= - local oem_mtd= - local rootfs_mtd= - local kernel_mtd= - local uboot_mtd= - local bootstrap_file=bstrap.bin - local config_file=config.jffs2 - local oem_file=oem.jffs2 - local rootfs_file=rootfs.jffs2 - local kernel_file=uImage.bin - local uboot_file=uboot.bin - local install_file=install.sh - - if [ ! -d "${flash_dir}" ]; then - echo "${flash_dir} not present, skipping" - return - fi - - if ! mountpoint -q "${flash_root}"; then - echo "${flash_root} is not a mountpoint" - return - fi - - mode=$(grep "${flash_root}" /proc/mounts | cut -d ' ' -f 4 | cut -d ',' -f 1) - if [ "${mode}" != "rw" ]; then - echo "${flash_root} is not mounted rw" - return - fi - - if [ ! -x "${reboot_cmd}" ]; then - echo "${reboot_cmd} is not installed" - return - fi - - if [ ! -x "${nandwrite_cmd}" ]; then - echo "${nandwrite_cmd} is not installed" - return - fi - - bootstrap_mtd="/dev/$(cat /proc/mtd | grep '\"at91bootstrap\"' | cut -d : -f 1)" - if [ ! -c "${bootstrap_mtd}" ]; then - echo "No valid MTD partition is labeled at91bootstrap" - return - fi - - config_mtd="/dev/$(cat /proc/mtd | grep '\"Config\"' | cut -d : -f 1)" - if [ ! -c "${config_mtd}" ]; then - echo "No valid MTD partition is labeled Config" - return - fi - - oem_mtd="/dev/$(cat /proc/mtd | grep '\"OEM Config\"' | cut -d : -f 1)" - if [ ! -c "${oem_mtd}" ]; then - echo "No valid MTD partition is labeled OEM Config" - return - fi - - kernel_mtd="/dev/$(cat /proc/mtd | grep '\"uImage\"' | cut -d : -f 1)" - if [ ! -c "${kernel_mtd}" ]; then - echo "No valid MTD partition is labeled uImage" - return - fi - - uboot_mtd="/dev/$(cat /proc/mtd | grep '\"u-Boot\"' | cut -d : -f 1)" - if [ ! -c "${uboot_mtd}" ]; then - echo "No valid MTD partition is labeled u-Boot" - return - fi - - rootfs_mtd="/dev/$(cat /proc/mtd | grep '\"Rootfs\"' | cut -d : -f 1)" - if [ ! -c "${rootfs_mtd}" ]; then - echo "No valid MTD partition is labeled Rootfs" - return - fi - - cd /var/volatile - - # rootfs should always be flashed last, so always keep it last here - local files=(${bootstrap_file} ${uboot_file} ${config_file} ${oem_file} ${kernel_file} ${rootfs_file} ${install_file}) - local devs=(${bootstrap_mtd} ${uboot_mtd} ${config_mtd} ${oem_mtd} ${kernel_mtd} ${rootfs_mtd}) - - if [ -f "${upgrade_file}" ]; then - echo "Found ${upgrade_file}" - # make sure firmware is for this device - shopt -s nocasematch - local hw_version=$(cat /sys/devices/platform/mts-io/hw-version) - local firmware_model=$(tar -xO -f ${upgrade_file} model) - # Do case insensity character match. - shopt -s nocasematch - if [[ ! "${hw_version}" =~ ^(${firmware_model})- ]]; then - echo "Wrong firmware for this hardware" - echo "hw version: ${hw_version}" - echo "firmware model: ${firmware_model}" - return - fi - shopt -u nocasematch - - echo "Checking MD5s" - ((upgrade_script=0)) - # check md5sum - for (( i = 0; i < ${#files[@]}; i++ )); do - local file=${files[i]} - if tar -t -f ${upgrade_file} | grep -F -q "${file}"; then - if ! tar -x -f ${upgrade_file} ${file}.md5; then - echo "MD5 not found for ${file}" - return - fi - if ! tar -xO -f ${upgrade_file} ${file} | md5sum -c ${file}.md5; then - echo "MD5 check failed for ${file}" - return - fi - if [[ ${file} == ${install_file} ]] ; then - ((upgrade_script=1)) - fi - fi - done - fi - - echo "" - if [ -f "${upgrade_file}" ]; then - echo "Starting flash upgrade from ${upgrade_file}..." - elif [ -f "${kernel_solo_file}" ] || [ -f "${rootfs_solo_file}" ] || [ -f "${uboot_solo_file}" ] ; then - echo "Starting flash upgrade from ${flash_dir}..." - else - return - fi - - blink_leds - - if [[ ${flash_root} == /var/volatile ]] ; then - oldIFS="${IFS}" - IFS=$'\n' rmlist=($(find ${flash_root} -xdev -maxdepth 1 -print | egrep -v "^${flash_root}$|^${flash_dir}$|^${flash_dir}/")) - IFS="${oldIFS}" - ((i=0)) - while((i < ${#rmlist[@]})) ; do - rm -rf "${rmlist[$i]}" - ((i++)) - done - fi - - if ! cp ${reboot_cmd} ${flash_dir}/upgrade-reboot ; then - echo "Aborting upgrade. Failed \"cp ${reboot_cmd} ${flash_dir}/upgrade-reboot\"" - err_leds - return 1 - fi - if ! cp ${nandwrite_cmd} ${flash_dir}/nandwrite.static ; then - echo "Aborting upgrade. Failed \"cp ${nandwrite_cmd} ${flash_dir}/nandwrite.static\"" - err_leds - return 1 - fi - - # Run the upgrade script, if it exists, before we change - # flash-root to read-only - if ((upgrade_script == 1)) ; then - if (cd ${flash_dir};tar -xf ${upgrade_file}) ; then - exec ${flash_dir}/${install_file} ${flash_root} - else - echo "Extraction of ${upgrade_file} failed" - echo "Upgrade aborted" - umount_all - fi - fi - sync - sleep 2 - mount -o remount,ro ${flash_root} - - # flash_root is not going to be umounted - sed -i -e "\\|${flash_root}| d" /etc/mtab - - umount_all - - if [ -f "${upgrade_file}" ]; then - for (( i = 0; i < ${#files[@]}; i++ )); do - local file=${files[i]} - local dev=${devs[i]} - if tar -t -f ${upgrade_file} | grep -F -q "${file}"; then - if [ "${file}" == "${bootstrap_file}" ] || [ "${file}" == "${uboot_file}" ]; then - local file_size=$(tar -xO -f ${upgrade_file} ${file} | wc -c) - if dd if=${dev} bs=${file_size} count=1 | md5sum -c ${file}.md5; then - echo "Found ${file} in upgrade but it is the same as current. Continuing..." - continue - fi - fi - echo "Flashing ${dev} with ${file}..." - - flash_erase -j ${dev} 0 0 - tar -xO -f ${upgrade_file} ${file} | ${flash_dir}/nandwrite.static -p ${dev} - fi - done - else - if [ -f ${uboot_solo_file} ]; then - echo "Flashing ${uboot_mtd} (u-boot) with ${uboot_solo_file}..." - - flash_erase ${uboot_mtd} 0 0 - ${flash_dir}/nandwrite.static -p ${uboot_mtd} ${uboot_solo_file} - else - echo "u-boot file ${uboot_solo_file} not found" - fi - - if [ -f ${kernel_solo_file} ]; then - echo "Flashing ${kernel_mtd} (uImage) with ${kernel_solo_file}..." - - flash_erase ${kernel_mtd} 0 0 - ${flash_dir}/nandwrite.static -p ${kernel_mtd} ${kernel_solo_file} - else - echo "uImage file ${kernel_solo_file} not found" - fi - - if [ -f ${rootfs_solo_file} ]; then - echo "Flashing ${rootfs_mtd} (rootfs) with ${rootfs_solo_file}..." - - flash_erase -j ${rootfs_mtd} 0 0 - ${flash_dir}/nandwrite.static -p ${rootfs_mtd} ${rootfs_solo_file} - else - echo "rootfs file ${rootfs_solo_file} not found" - fi - fi - - echo "Rebooting..." - - ${flash_dir}/upgrade-reboot - - # Should not get here normally - echo "upgrade-reboot failed" - exit 1 -} - -# do flash on reboot if do_flash_upgrade exists -# and is owned by root -if [[ -f ${upgrade_fname} ]] ; then - owner=$(stat -c%u "${upgrade_fname}") - if ((${#owner} > 0)) && ((owner == 0)) ; then - flash_upgrade /var/volatile - flash_upgrade /media/card - # Look for upgrade on external media besides - # SD card. - cd /run/media - # See if there is a USB driver - last=$(dirname $(ls -d */flash-upgrade)) - if ((${#last} > 0)) ; then - flash_upgrade "/run/media/${last}" - fi - fi -fi - -umount_all - -: exit 0 diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend deleted file mode 100644 index af7b258..0000000 --- a/recipes-core/initscripts/initscripts_1.0.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -# flash on reboot/umountfs needs regular umount (not busybox) -RDEPENDS_${PN} += "util-linux-umount util-linux-mount bash" - -PR .= ".43" diff --git a/recipes-core/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/recipes-core/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch deleted file mode 100644 index b88440d..0000000 --- a/recipes-core/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 340f911f9e3f4ff6b01682c5341c959060782af2 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 2 Apr 2015 19:18:45 -0700 -Subject: [PATCH] usb.h: Include sys/types.h - -We need the definitions for things like u_intX_t - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libusb/usb.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libusb/usb.h b/libusb/usb.h -index 84e730f..caffae2 100644 ---- a/libusb/usb.h -+++ b/libusb/usb.h -@@ -31,6 +31,8 @@ - - #include <dirent.h> - -+#include <sys/types.h> -+ - /* - * USB spec information - * --- -2.1.4 - diff --git a/recipes-core/libusb/libusb1/no-dll.patch b/recipes-core/libusb/libusb1/no-dll.patch deleted file mode 100644 index 6e6bb83..0000000 --- a/recipes-core/libusb/libusb1/no-dll.patch +++ /dev/null @@ -1,19 +0,0 @@ -As all invokes all-recursive which uses sub-makes to invoke all-am, the -resulting makefile wants to build libusb-1.0.la twice. In non-parallel builds -the second attempt is skipped as the target already exists, but in highly -parallel builds it's likely that two makes will be building libusb-1.0.la at the -same time. - -Solve this by removing the explicit all target, which as libusb-1.0.dll isn't -built under Linux is redundant anyway. - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/libusb/Makefile.am b/libusb/Makefile.am -index 0cab0a0..c880213 100644 ---- a/libusb/Makefile.am -+++ b/libusb/Makefile.am -@@ -1,2 +0,0 @@ --all: libusb-1.0.la libusb-1.0.dll -- diff --git a/recipes-core/libusb/libusb1_1.0.21.bb b/recipes-core/libusb/libusb1_1.0.21.bb deleted file mode 100644 index 1fefd14..0000000 --- a/recipes-core/libusb/libusb1_1.0.21.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Userspace library to access USB (version 1.0)" -HOMEPAGE = "http://libusb.sf.net" -BUGTRACKER = "http://www.libusb.org/report" -SECTION = "libs" - -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \ - file://no-dll.patch \ - " - -SRC_URI[md5sum] = "1da9ea3c27b3858fa85c5f4466003e44" -SRC_URI[sha256sum] = "7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b" - -S = "${WORKDIR}/libusb-${PV}" - -inherit autotools pkgconfig - -# Don't configure udev by default since it will cause a circular -# dependecy with udev package, which depends on libusb -EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev" - -do_install_append() { - install -d ${D}${libdir} - if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then - mv ${D}${base_libdir}/pkgconfig ${D}${libdir} - fi -} - -FILES_${PN} += "${base_libdir}/*.so.*" - -FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" diff --git a/recipes-core/lighttpd/files/0001-lighttpd-pcre-use-pkg-config.patch b/recipes-core/lighttpd/files/0001-lighttpd-pcre-use-pkg-config.patch deleted file mode 100644 index 48be920..0000000 --- a/recipes-core/lighttpd/files/0001-lighttpd-pcre-use-pkg-config.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 26 Aug 2016 18:20:32 +0300 -Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script. - -RP 2014/5/22 -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - configure.ac | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5383cec..c29a902 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre], - ) - AC_MSG_RESULT([$WITH_PCRE]) - --if test "$WITH_PCRE" != no; then -- if test "$WITH_PCRE" != yes; then -- PCRE_LIB="-L$WITH_PCRE/lib -lpcre" -- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include" -+if test "$WITH_PCRE" != "no"; then -+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [ -+ PCRE_LIB=${PCREPKG_LIBS} -+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" -+ ], [ -+ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre]) -+ ]) -+ -+ if test x"$PCRE_LIB" != x; then -+ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) -+ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) -+ AC_SUBST(PCRE_LIB) - else - AC_PATH_PROG([PCRECONFIG], [pcre-config]) - if test -n "$PCRECONFIG"; then --- -2.15.0 diff --git a/recipes-core/lighttpd/files/0002_extended_tls_conf.patch b/recipes-core/lighttpd/files/0002_extended_tls_conf.patch deleted file mode 100644 index 1a216dd..0000000 --- a/recipes-core/lighttpd/files/0002_extended_tls_conf.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base.h b/src/base.h -index 134fc41..f2d849e 100644 ---- a/src/base.h -+++ b/src/base.h -@@ -289,6 +289,9 @@ typedef struct { - unsigned short ssl_empty_fragments; /* whether to not set SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS */ - unsigned short ssl_use_sslv2; - unsigned short ssl_use_sslv3; -+ unsigned short ssl_use_tlsv1; -+ unsigned short ssl_use_tlsv1_1; -+ unsigned short ssl_use_tlsv1_2; - unsigned short ssl_verifyclient; - unsigned short ssl_verifyclient_enforce; - unsigned short ssl_verifyclient_depth; -diff --git a/src/configfile.c b/src/configfile.c -index bba6925..bbedd77 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -146,6 +146,10 @@ static int config_insert(server *srv) { - { "server.max-request-field-size", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_SERVER }, /* 78 */ - { "ssl.read-ahead", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 79 */ - -+ { "ssl.use-tlsv1", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 80 */ -+ { "ssl.use-tlsv1_1", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 81 */ -+ { "ssl.use-tlsv1_2", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 82 */ -+ - { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET } - }; - -@@ -226,6 +230,9 @@ static int config_insert(server *srv) { - s->ssl_empty_fragments = 0; - s->ssl_use_sslv2 = 0; - s->ssl_use_sslv3 = 0; -+ s->ssl_use_tlsv1 = 0; -+ s->ssl_use_tlsv1_1 = 0; -+ s->ssl_use_tlsv1_2 = 1; - s->use_ipv6 = (i == 0) ? 0 : srv->config_storage[0]->use_ipv6; - s->set_v6only = (i == 0) ? 1 : srv->config_storage[0]->set_v6only; - s->defer_accept = (i == 0) ? 0 : srv->config_storage[0]->defer_accept; -@@ -318,6 +325,9 @@ static int config_insert(server *srv) { - cv[76].destination = &(s->stream_request_body); - cv[77].destination = &(s->stream_response_body); - cv[79].destination = &(s->ssl_read_ahead); -+ cv[80].destination = &(s->ssl_use_tlsv1); -+ cv[81].destination = &(s->ssl_use_tlsv1_1); -+ cv[82].destination = &(s->ssl_use_tlsv1_2); - - srv->config_storage[i] = s; - -@@ -536,6 +546,9 @@ int config_setup_connection(server *srv, connection *con) { - PATCH(ssl_empty_fragments); - PATCH(ssl_use_sslv2); - PATCH(ssl_use_sslv3); -+ PATCH(ssl_use_tlsv1); -+ PATCH(ssl_use_tlsv1_1); -+ PATCH(ssl_use_tlsv1_2); - PATCH(etag_use_inode); - PATCH(etag_use_mtime); - PATCH(etag_use_size); -@@ -615,6 +628,12 @@ int config_patch_connection(server *srv, connection *con) { - PATCH(ssl_use_sslv2); - } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.use-sslv3"))) { - PATCH(ssl_use_sslv3); -+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.use-tlsv1"))) { -+ PATCH(ssl_use_tlsv1); -+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.use-tlsv1_1"))) { -+ PATCH(ssl_use_tlsv1_1); -+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.use-tlsv1_2"))) { -+ PATCH(ssl_use_tlsv1_2); - } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.cipher-list"))) { - PATCH(ssl_cipher_list); - } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("ssl.engine"))) { -diff --git a/src/network.c b/src/network.c -index 4295fe9..a3f9ec3 100644 ---- a/src/network.c -+++ b/src/network.c -@@ -859,6 +859,33 @@ int network_init(server *srv) { - } - } - -+ if (!s->ssl_use_tlsv1) { -+ /* disable TLSv1 */ -+ if (!(SSL_OP_NO_TLSv1 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_TLSv1))) { -+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", -+ ERR_error_string(ERR_get_error(), NULL)); -+ return -1; -+ } -+ } -+ -+ if (!s->ssl_use_tlsv1_1) { -+ /* disable TLSv1.1 */ -+ if (!(SSL_OP_NO_TLSv1_1 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_TLSv1_1))) { -+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", -+ ERR_error_string(ERR_get_error(), NULL)); -+ return -1; -+ } -+ } -+ -+ if (!s->ssl_use_tlsv1_2) { -+ /* disable TLSv1.2 */ -+ if (!(SSL_OP_NO_TLSv1_2 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_TLSv1_2))) { -+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", -+ ERR_error_string(ERR_get_error(), NULL)); -+ return -1; -+ } -+ } -+ - if (!buffer_string_is_empty(s->ssl_cipher_list)) { - /* Disable support for low encryption ciphers */ - if (SSL_CTX_set_cipher_list(s->ssl_ctx, s->ssl_cipher_list->ptr) != 1) { diff --git a/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch b/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch deleted file mode 100644 index c265066..0000000 --- a/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch +++ /dev/null @@ -1,57 +0,0 @@ -From bdfb7f9c6ab29d2de3576f8bd845fa871bb44ead Mon Sep 17 00:00:00 2001 -From: Serhii Voloshynov <serhii.voloshynov@globallogic.com> -Date: Tue, 6 Nov 2018 13:50:04 +0200 -Subject: [PATCH] patch - ---- - src/http-header-glue.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/src/http-header-glue.c b/src/http-header-glue.c -index 1916ca6..d4f42ad 100644 ---- a/src/http-header-glue.c -+++ b/src/http-header-glue.c -@@ -1457,6 +1457,8 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg - rc |= cb(vdata, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on")); - } - -+ if (srv_sock->addr.plain.sa_family != AF_UNIX) { -+ - addr = &srv_sock->addr; - li_utostrn(buf, sizeof(buf), sock_addr_get_port(addr)); - rc |= cb(vdata, CONST_STR_LEN("SERVER_PORT"), buf, strlen(buf)); -@@ -1482,6 +1484,7 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg - } - force_assert(s); - rc |= cb(vdata, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s)); -+ } - - if (!buffer_string_is_empty(con->server_name)) { - size_t len = buffer_string_length(con->server_name); -@@ -1497,15 +1500,23 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg - rc |= cb(vdata, CONST_STR_LEN("SERVER_NAME"), - con->server_name->ptr, len); - } else { -+ if (srv_sock->addr.plain.sa_family != AF_UNIX) { - /* set to be same as SERVER_ADDR (above) */ - rc |= cb(vdata, CONST_STR_LEN("SERVER_NAME"), s, strlen(s)); - } -+ } -+ if (srv_sock->addr.plain.sa_family == AF_UNIX) { -+ rc |= cb(vdata, CONST_STR_LEN("SERVER_IPC"), CONST_STR_LEN("yes")); -+ } -+ -+ if (srv_sock->addr.plain.sa_family != AF_UNIX) { - - rc |= cb(vdata, CONST_STR_LEN("REMOTE_ADDR"), - CONST_BUF_LEN(con->dst_addr_buf)); - - li_utostrn(buf, sizeof(buf), sock_addr_get_port(&con->dst_addr)); - rc |= cb(vdata, CONST_STR_LEN("REMOTE_PORT"), buf, strlen(buf)); -+ } - - for (n = 0; n < con->request.headers->used; n++) { - data_string *ds = (data_string *)con->request.headers->data[n]; --- -2.7.4 - diff --git a/recipes-core/lighttpd/files/lighttpd.conf b/recipes-core/lighttpd/files/lighttpd.conf deleted file mode 100644 index a3e02da..0000000 --- a/recipes-core/lighttpd/files/lighttpd.conf +++ /dev/null @@ -1,209 +0,0 @@ -# lighttpd configuration file for the rcell -# include config file (/var/run/config/lighttpd_port.conf) generated at start up -# -# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ - -#IMPORT PORT SETTINGS -include "/var/run/config/lighttpd_port.conf" - -## local access from startup scripts and apps -$SERVER["socket"] == "/var/run/api/http.sock" { } - -## modules -server.modules = ( - "mod_rewrite", - "mod_redirect", - "mod_proxy", - "mod_alias", - "mod_access", - "mod_fastcgi", - "mod_accesslog", - "mod_openssl", - "mod_setenv") - - -## static document-root -server.document-root = "/var/www/" -setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*", - "Content-Security-Policy" => "default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' 'self'; style-src 'unsafe-inline' https://fonts.googleapis.com 'self'; font-src https://fonts.gstatic.com 'self'; connect-src 'self'; img-src 'self' data:", - "X-Frame-Options" =>"SAMEORIGIN", - "X-XSS-Protection" => "1; mode=block", - "X-Content-Type-Options" => "nosniff", - "Referrer-Policy" => "strict-origin-when-cross-origin", - "Feature-Policy" => "accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; payment 'none'; usb 'none'", - "Strict-Transport-Security" => "max-age=31536000", - "Cache-Control" => "no-cache" -) -server.socket-perms = "0760" - -## where to send error-messages to -#server.errorlog = "/var/log/lighttpd.error.log" -server.errorlog-use-syslog = "enable" - -# disable stat cache -server.stat-cache-engine = "disable" - -## where to send access log -#accesslog.filename = "/var/log/lighttpd.access.log" -accesslog.use-syslog = "enable" - -## enable debugging -#debug.log-request-header = "enable" -#debug.log-response-header = "enable" -#debug.log-request-handling = "enable" -#debug.log-file-not-found = "enable" -#debug.log-condition-handling = "enable" - -## where to upload files -server.upload-dirs = ( "/var/volatile/tmp" ) - -# files to check for if .../ is requested -index-file.names = ( "index.php", "index.html", - "index.htm", "default.htm" ) - -# mimetype mapping -mimetype.assign = ( - ".pdf" => "application/pdf", - ".sig" => "application/pgp-signature", - ".spl" => "application/futuresplash", - ".class" => "application/octet-stream", - ".ps" => "application/postscript", - ".torrent" => "application/x-bittorrent", - ".dvi" => "application/x-dvi", - ".pac" => "application/x-ns-proxy-autoconfig", - ".swf" => "application/x-shockwave-flash", - ".tar.gz" => "application/x-tgz", - ".tgz" => "application/x-tgz", - ".tar" => "application/x-tar", - ".xhtml" => "application/xhtml+xml", - ".xht" => "application/xhtml+xml", - ".zip" => "application/zip", - ".mp3" => "audio/mpeg", - ".m3u" => "audio/x-mpegurl", - ".wma" => "audio/x-ms-wma", - ".wax" => "audio/x-ms-wax", - ".ogg" => "application/ogg", - ".wav" => "audio/x-wav", - ".gif" => "image/gif", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".png" => "image/png", - ".svg" => "image/svg+xml", - ".ico" => "image/x-icon", - ".xbm" => "image/x-xbitmap", - ".xpm" => "image/x-xpixmap", - ".xwd" => "image/x-xwindowdump", - ".css" => "text/css", - ".html" => "text/html", - ".htm" => "text/html", - ".asc" => "text/plain", - ".c" => "text/plain", - ".cpp" => "text/plain", - ".log" => "text/plain", - ".conf" => "text/plain", - ".text" => "text/plain", - ".txt" => "text/plain", - ".dtd" => "text/xml", - ".xml" => "text/xml", - ".mpeg" => "video/mpeg", - ".mpg" => "video/mpeg", - ".mov" => "video/quicktime", - ".qt" => "video/quicktime", - ".avi" => "video/x-msvideo", - ".asf" => "video/x-ms-asf", - ".asx" => "video/x-ms-asf", - ".wmv" => "video/x-ms-wmv", - ".bz2" => "application/x-bzip", - ".tbz" => "application/x-bzip-compressed-tar", - ".tar.bz2" => "application/x-bzip-compressed-tar", - ".mib" => "application/text", - ".js" => "application/javascript" - ) - -## deny access the file-extensions -url.access-deny = ( "~", ".inc" ) - -# send a different Server: header -server.tag = "" - -#server.error-handler-404 = "/index.html" - -#Range request are requests of one or more sub-ranges of a file. -#Range requests are very helpful for resuming interrupted downloads and fetching small portions of huge files. -#Note: Adobe Acrobat Reader can crash when it tries to open a PDF file if range requests are enabled. -$HTTP["url"] =~ "\.pdf$" { - server.range-requests = "disable" -} - -## -# which extensions should not be handle via static-file transfer -# -# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi -static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) - -## to help the rc.scripts -server.pid-file = "/var/run/lighttpd.pid" - -# Restrict server process to non priveleged user -server.username = "www" -server.groupname = "www" - -# server limit POST size in kilobytes (60MB for firmware update) -server.max-request-size = 113246 - -# server limits -server.max-keep-alive-requests = 16 -server.max-keep-alive-idle = 15 -server.max-read-idle = 60 -server.max-write-idle = 360 - -## -## Format: <errorfile-prefix><status-code>.html -## -> ..../status-404.html for 'File not found' -server.errorfile-prefix = "/var/www/errors/status-" - -## virtual directory listings -#dir-listing.activate = "enable" - -#IMPORTED CONFIGS WILL HANDLE SETTING HTTP/HTTPS - -#### fastcgi module -fastcgi.server = ( "/" => - ( "authorizer" => - ( - "mode" => "authorizer", - "check-local" => "disable", - "socket" => "/var/run/api/rcell_api.sock", - "docroot" => "/var/www" - ) - ) -) - - -$HTTP["url"] =~ "/static/js" { - setenv.add-response-header = ( "Content-Encoding" => "gzip") - mimetype.assign = ("" => "text/javascript" ) - } else $HTTP["url"] =~ "/help/template/scripts" { - setenv.add-response-header = ( "Content-Encoding" => "gzip") - mimetype.assign = ("" => "text/javascript" ) - } else $HTTP["url"] =~ "/help/whxdata/" { - setenv.add-response-header = ( "Content-Encoding" => "gzip") - mimetype.assign = ("" => "text/javascript" ) - } else $HTTP["url"] =~ "/help/template/Azure_Blue_MTS_1/layout.css" { - setenv.add-response-header = ( "Content-Encoding" => "gzip") - mimetype.assign = ("" => "text/css" ) - } else $HTTP["url"] =~ "^/api" { - fastcgi.server = ( "/api" => - ( "api" => - ( - "mode" => "responder", - "check-local" => "disable", - "socket" => "/var/run/api/rcell_api.sock" - ) - ) - ) -} - -#INCLUDE DIPSERVICE SETTINGS -include "/var/run/config/lighttpd_dipservice.conf" -include "/var/run/config/lighttpd_custom_images.conf" diff --git a/recipes-core/lighttpd/files/lighttpd.init b/recipes-core/lighttpd/files/lighttpd.init deleted file mode 100644 index 39860d3..0000000 --- a/recipes-core/lighttpd/files/lighttpd.init +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh - -enable -f libjsonget.so jsonget - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/lighttpd -NAME=lighttpd -ANGEL=/sbin/lighttpd-angel -DESC="Lighttpd Web Server" -# Web UI -OPTS="-D -f /etc/lighttpd.conf" -# Node-RED stub -OPTS_NRS="-f /etc/lighttpd_nrs.conf" - -CAPA_NODE_RED=$(jsonget "$(< /var/run/config/device_info.json)" /capabilities/nodeRed) - -CONF_DIR=/var/config -RUN_CONF_DIR=/var/run/config - -true2enable() { - if [[ "$1" == "true" ]]; then - echo "enable" - else - echo "disable" - fi -} - -#Generates additional lighttpd configuration files -#1) Enables HTTPS -#2) Allows port configurations for HTTP and HTTPS -#3) Enables dipservice -#4) Allows port configurations for dipservice -generate_config() { - FILE="$RUN_CONF_DIR/lighttpd_port.conf" - FILE_DIP="$RUN_CONF_DIR/lighttpd_dipservice.conf" - - #Pull Webserver Ports - RMA=$(jsonget "$(< "/var/config/db.json")" /remoteAccess) - HTTP_ENABLED=$(jsonget "$RMA" /http/enabled) - HTTP_PORT=$(jsonget "$RMA" /http/port) - HTTPS_REDIRECT=$(jsonget "$RMA" /http/redirectToHttps) - HTTPS_ENABLED=$(jsonget "$RMA" /https/enabled) - HTTPS_PORT=$(jsonget "$RMA" /https/port) - - # Advanced secure protocol settings - ADVANCED_SEC_VALID="false" - ADVANCED_SEC=$(jsonget "$(< "/var/config/db.json")" /secureProtocols/2) - - if [[ "0" == "$?" ]]; then - ADVANCED_SEC_NAME=$(jsonget "$ADVANCED_SEC" /name) - if [[ "$ADVANCED_SEC_NAME" == "lighttpd" ]]; then - ADVANCED_SEC_VALID="true" - HTTPS_SSL3=$(true2enable "false") # $(true2enable $(jsonget "$ADVANCED_SEC" /protocol/ssl3)) - HTTPS_TLS1=$(true2enable "false") # $(true2enable $(jsonget "$ADVANCED_SEC" /protocol/tls1)) - HTTPS_TLS1_1=$(true2enable $(jsonget "$ADVANCED_SEC" /protocol/tls1_1)) - HTTPS_TLS1_2=$(true2enable $(jsonget "$ADVANCED_SEC" /protocol/tls1_2)) - HTTPS_CIPHER=$(jsonget "$ADVANCED_SEC" /cipherSuite) - if [[ -z $HTTPS_CIPHER && -f /etc/ssl/allowed_ciphersuites ]]; then - HTTPS_CIPHER=$( cat /etc/ssl/allowed_ciphersuites | tr "\n" ":" ) - fi - CLIENT_VERIFY=$(jsonget "$ADVANCED_SEC" /client/verify ) - fi - fi - - if [[ "$ADVANCED_SEC_VALID" != "true" ]]; then - echo "API init. Using default SSL security settings" - # In case of invalid Advanced Security section - start with default parameters - HTTPS_SSL3=$(true2enable "false") - HTTPS_TLS1=$(true2enable "false") - HTTPS_TLS1_1=$(true2enable "false") - HTTPS_TLS1_2=$(true2enable "true") - HTTPS_CIPHER="" - CLIENT_VERIFY="false" - fi - - #("Protocol" => "-ALL, TLSv1.2") - HTTPS_SSL_CONF='("Protocol" => "-ALL' - - if [[ "$HTTPS_TLS1" == "enable" ]]; then - HTTPS_SSL_CONF+=', TLSv1' - fi - if [[ "$HTTPS_TLS1_1" == "enable" ]]; then - HTTPS_SSL_CONF+=', TLSv1.1' - fi - if [[ "$HTTPS_TLS1_2" == "enable" ]]; then - HTTPS_SSL_CONF+=', TLSv1.2' - fi - HTTPS_SSL_CONF+='")' - - #Generate Lighttpd dipservice config - DIP=$(jsonget "$(< "$CONF_DIR/db.json")" /customDiagnostic || echo '{ "enabled": false, "port":8080 }') - DIP_ENABLED=$(jsonget "$DIP" /enabled) - DIP_PORT=$(jsonget "$DIP" /port) - - echo "Generating $FILE_DIP" - > "$FILE_DIP" - - #Generate Lighttpd Port Config - echo "Generating $FILE" - > "$FILE" - - if [[ "$DIP_ENABLED" == "true" ]]; then - cat >> $FILE_DIP <<END -\$SERVER["socket"] == "0.0.0.0:$DIP_PORT" { - fastcgi.server = ( - "/" => ( - ( - "host" => "127.0.0.1", - "port" => 9009, - "check-local" => "disable", - "bin-path" => "/sbin/dipservice -d /var/config/dipdata", - "max-procs" => 1, - "docroot" => "/var/config/dipdata" - ) - ) - ) -} -END - fi - - cat >> $FILE <<END -#AUTO-GENERATED LIGHTTPD HTTP/HTTPS CONFIGURATIONS -#DO NOT CHANGE THIS FILE -> CHANGE $0 -END - -#Explicitly set the default listening port to HTTP port. -cat >> $FILE <<END - -# listen to ipv4 -server.bind = "0.0.0.0" -server.port = "$HTTP_PORT" -END - - if [ "$HTTPS_ENABLED" = "true" ]; then - # Enable HTTPS for ipv4/ipv6 - # See (https://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config#Recommended-IPv6-setup) - - HTTPS_SSL_ENGINE_CONFIG="ssl.engine = \"enable\" - ssl.use-sslv3 = \"$HTTPS_SSL3\" - ssl.openssl.ssl-conf-cmd = $HTTPS_SSL_CONF - ssl.pemfile = \"$CONF_DIR/server.pem\"" - - if [ "$CLIENT_VERIFY" = "true" ]; then - HTTPS_SSL_ENGINE_CONFIG+="ssl.ca-file = \"/etc/ssl/certs/ca-certificates.crt\" - ssl.verifyclient.activate = \"enable\" - ssl.verifyclient.enforce = \"enable\"" - fi - - if [ -n "$HTTPS_CIPHER" ]; then - HTTPS_SSL_ENGINE_CONFIG+=" - ssl.cipher-list = \"$HTTPS_CIPHER\"" - fi - - cat >> $FILE <<END - -# ipv4 socket -\$SERVER["socket"] == "0.0.0.0:$HTTPS_PORT" { - $HTTPS_SSL_ENGINE_CONFIG -} - -# ipv6 socket -\$SERVER["socket"] == "[::]:$HTTPS_PORT" { - $HTTPS_SSL_ENGINE_CONFIG -} - -END - - fi - - - # Ensure that loopback can always access port 80 - if [ "$HTTP_PORT" != 80 ]; then - echo "\$SERVER[\"socket\"] == \"127.0.0.1:80\" { }" >> $FILE - fi - - # Enable redirect from HTTP to HTTPS if enabled - if [ "$HTTPS_REDIRECT" == "true" ]; then - HTTPS_REDIRECT_CONFIG="\$SERVER[\"socket\"] == \":$HTTP_PORT\" { - \$HTTP[\"host\"] =~ \"^([^:^/]*)(:\d*)?(.*)\" { - url.redirect = ( \"^/(.*)\" => \"https://%1:$HTTPS_PORT/\$1\" ) - } - } else " - fi - - HTTPX_REWRITE_URL='url.rewrite-once = ( "^/(?!static|api|tmp|help)(.+)/?$" => "/index.html" )' - - #BREAKDOWN - # LINE 1: CHECK: REMOTE IP IS NOT 127.0.0.1 (LOOPBACK) - # LINE 2: CHECK: DEST PORT IS THE HTTP PORT LIGHTTPD IS LISTENING ON - # LINE 3: CHECK: HOST ADDRESS (ex: 192.168.2.1:81/whatever) MATCHES THE REGEX [DOMAIN][PORT (optional)][URI] - # THE REGEX FROM LINE 3 CAN BE ACCESSED IN LINE 4 WITH '%#' (ex: %1 == DOMAIN, %2 == PORT, %3 == URI) - # LINE 4: FUNCTION: REGEX THE URI ([MATCH ALL]) AND BUILD THE REDIRECT URL - # THE REGEX FROM LINE 4 CAN BE ACCESSED IN THE REDIRECT CONSTRUCTION WITH '$#' (ex: $1 == THE ENTIRE URI) - - cat >> $FILE <<END -\$HTTP["remoteip"] != "127.0.0.1" { - $HTTPS_REDIRECT_CONFIG \$HTTP["host"] =~ "^([^:^/]*)(:\d*)?(.*)" { - \$SERVER["socket"] == "[::]:$HTTPS_PORT" { - $HTTPX_REWRITE_URL - } - \$SERVER["socket"] == ":$HTTPS_PORT" { - $HTTPX_REWRITE_URL - } - \$SERVER["socket"] == ":$HTTP_PORT" { - $HTTPX_REWRITE_URL - } - } -} -END -} - -populate_www_images() { - local CONFIGIMAGES="/var/config/images" - local OEMIMAGES="/var/oem/images" - local WWWIMAGES="/var/volatile/www/images" - local WWWIMAGES_RO="/var/www/images_ro" - - # Populate images only once per boot - if [ ! -d $WWWIMAGES ]; then - - # Copy from oem partition to config partition - if [ ! -d $CONFIGIMAGES ]; then - if [ -d $OEMIMAGES ]; then - echo "Copying oem images" - mkdir -p $CONFIGIMAGES - cp -rf $OEMIMAGES/* $CONFIGIMAGES - fi - fi - - # Copy from root partition to RAM - mkdir -p $WWWIMAGES - cp -rf $WWWIMAGES_RO/* $WWWIMAGES - - # Overwrite with /var/config/images - if [ -d $CONFIGIMAGES ]; then - cp -rf $CONFIGIMAGES/* $WWWIMAGES - fi - fi -} - -wait_ready() { - # wait api - local retry=0 - local MAX=30 - sleep 1 - while [ $retry -lt $MAX ]; do - if [ "200" == "$(curl -s --unix-socket /var/run/api/http.sock -I -o /dev/null -w "%{http_code}" http://localhost/api/system)" ]; then - return - fi - retry=$(( $retry + 1 )) - echo "Waiting for API ($retry/$MAX)..." - sleep 1 - done - echo "Failed waiting API!" -} - -start() { - mkdir -p /var/volatile/www/tmp - lighttpd_custom_images_setup # detect mime types for UI Customization images and generate Lighttpd config fragment - - generate_config - - start-stop-daemon --start --background --exec $ANGEL -- $DAEMON $OPTS - - if [ "$CAPA_NODE_RED" = "true" ]; then - start-stop-daemon --start -x "$DAEMON" -p /var/run/lighttpd_nrs.pid -- $OPTS_NRS - fi - - wait_ready -} - -stop() { - start-stop-daemon --stop --exec $ANGEL - - if [ "$CAPA_NODE_RED" = "true" ]; then - start-stop-daemon --stop -x "$DAEMON" -p /var/run/lighttpd_nrs.pid - rm -f /var/run/lighttpd_nrs.pid - fi - - rm -f /var/run/config/lighttpd_* -} - -populate_www_images - -case "$1" in - start) - echo -n "Starting $DESC: " - start - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - stop - echo "$NAME." - ;; - restart|force-reload) - echo -n "Restarting $DESC: " - stop - sleep 1 - start - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/recipes-core/lighttpd/files/lighttpd_custom_images_setup b/recipes-core/lighttpd/files/lighttpd_custom_images_setup deleted file mode 100644 index ecd5f46..0000000 --- a/recipes-core/lighttpd/files/lighttpd_custom_images_setup +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# Detects mime types for UI Customization images and generates according Lighttpd config fragment - -CONFIG_PATH="/var/run/config/lighttpd_custom_images.conf" -IMAGE_PATH="/var/www/static/images/" -MAGIC_DB_PATH="/usr/share/misc/magic-images.mgc" -shopt -s nullglob - -echoerr() { - echo "$@" 1>&2 -} - -generate_mime_assign() { - local IMAGE="$1" - local OUTPUT=$(file -ib "$IMAGE" --magic-file "$MAGIC_DB_PATH") - local CONTENT_TYPE - - if [ "$?" -ne "0" ] || [[ "$OUTPUT" == "" ]] || [[ "$OUTPUT" == *"cannot open"* ]]; then - echoerr "Failed to run file(1): ${?}; ${OUTPUT}" - return 1 - fi - - CONTENT_TYPE="$OUTPUT" - cat <<END -\$HTTP["url"] =~ "/static/images/$IMAGE" { - mimetype.assign = ("" => "$CONTENT_TYPE") - } -END -} - -process_files() { - local INDENT=" " - local ELSE_STRING="" - local FRAGMENT - - for IMAGE in custom_*; do - INDENT=" " - - FRAGMENT=$(generate_mime_assign $IMAGE) - if [ "$?" -eq "0" ]; then - echo "${INDENT}${ELSE_STRING}${FRAGMENT}" >> "$CONFIG_PATH" - ELSE_STRING="else " - fi - done -} - -echo "Generating $CONFIG_PATH" - -# truncate and write head -cat > "$CONFIG_PATH" <<END -\$HTTP["url"] =~ "/static/images/custom_" { -END - -cd "$IMAGE_PATH" && process_files - -# write tail (closing brace) -echo "}" >> "$CONFIG_PATH" diff --git a/recipes-core/lighttpd/files/lighttpd_nrs.conf b/recipes-core/lighttpd/files/lighttpd_nrs.conf deleted file mode 100644 index 8c23747..0000000 --- a/recipes-core/lighttpd/files/lighttpd_nrs.conf +++ /dev/null @@ -1,66 +0,0 @@ -server.modules = ( "mod_expire" ) -server.bind = "127.0.0.1" -server.port = 1882 -server.document-root = "/var/www/node-red/node-red-stub" -server.max-keep-alive-requests = 0 -expire.url = ( "/" => "access 0 days" ) -server.errorlog-use-syslog = "enable" -server.upload-dirs = ( "/var/volatile/tmp" ) -index-file.names = ( "index.html" ) -server.pid-file = "/var/run/lighttpd_nrs.pid" -server.errorfile-prefix = "/var/www/node-red/node-red-errors/status-" -mimetype.assign = ( - ".pdf" => "application/pdf", - ".sig" => "application/pgp-signature", - ".spl" => "application/futuresplash", - ".class" => "application/octet-stream", - ".ps" => "application/postscript", - ".torrent" => "application/x-bittorrent", - ".dvi" => "application/x-dvi", - ".gz" => "application/x-gzip", - ".pac" => "application/x-ns-proxy-autoconfig", - ".swf" => "application/x-shockwave-flash", - ".tar.gz" => "application/x-tgz", - ".tgz" => "application/x-tgz", - ".tar" => "application/x-tar", - ".xhtml" => "application/xhtml+xml", - ".xht" => "application/xhtml+xml", - ".zip" => "application/zip", - ".mp3" => "audio/mpeg", - ".m3u" => "audio/x-mpegurl", - ".wma" => "audio/x-ms-wma", - ".wax" => "audio/x-ms-wax", - ".ogg" => "application/ogg", - ".wav" => "audio/x-wav", - ".gif" => "image/gif", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".png" => "image/png", - ".xbm" => "image/x-xbitmap", - ".xpm" => "image/x-xpixmap", - ".xwd" => "image/x-xwindowdump", - ".css" => "text/css", - ".html" => "text/html", - ".htm" => "text/html", - ".js" => "text/javascript", - ".asc" => "text/plain", - ".c" => "text/plain", - ".cpp" => "text/plain", - ".log" => "text/plain", - ".conf" => "text/plain", - ".text" => "text/plain", - ".txt" => "text/plain", - ".dtd" => "text/xml", - ".xml" => "text/xml", - ".mpeg" => "video/mpeg", - ".mpg" => "video/mpeg", - ".mov" => "video/quicktime", - ".qt" => "video/quicktime", - ".avi" => "video/x-msvideo", - ".asf" => "video/x-ms-asf", - ".asx" => "video/x-ms-asf", - ".wmv" => "video/x-ms-wmv", - ".bz2" => "application/x-bzip", - ".tbz" => "application/x-bzip-compressed-tar", - ".tar.bz2" => "application/x-bzip-compressed-tar" -) diff --git a/recipes-core/lighttpd/lighttpd_1.4.48.bb b/recipes-core/lighttpd/lighttpd_1.4.48.bb deleted file mode 100644 index 0b9897a..0000000 --- a/recipes-core/lighttpd/lighttpd_1.4.48.bb +++ /dev/null @@ -1,100 +0,0 @@ -SUMMARY = "Lightweight high-performance web server" -HOMEPAGE = "http://www.lighttpd.net/" -BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" - -PR .= ".mts21" - -SECTION = "net" -DEPENDS = "zlib libpcre openssl" -RDEPENDS_${PN} += " \ - lighttpd-module-access \ - lighttpd-module-accesslog \ - lighttpd-module-fastcgi \ - lighttpd-module-rewrite \ - lighttpd-module-redirect \ - lighttpd-module-alias \ - lighttpd-module-setenv \ - lighttpd-module-expire \ - lighttpd-module-openssl \ -" -RDEPENDS_${PN} += " openssl" -# for lighttpd_custom_images_setup script -RDEPENDS_${PN} += "bash file file-magic-db-images" - - -SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.gz \ - file://lighttpd.conf \ - file://lighttpd_nrs.conf \ - file://lighttpd.init \ - file://lighttpd_custom_images_setup \ - file://0001-lighttpd-pcre-use-pkg-config.patch;apply=true \ - file://0004_fastcgi_env_with_unixsocket.patch;apply=true \ -" - - -SRC_URI[md5sum] = "fe9ea4dccacd9738be03245c364bc055" -SRC_URI[sha256sum] = "fc36f82877284eb506356aa80f483f133a9e17ec7cb79acd7e5b7733768538ef" - -EXTRA_OECONF = " \ - --without-bzip2 \ - --without-ldap \ - --without-lua \ - --without-memcached \ - --with-pcre \ - --without-webdav-props \ - --without-webdav-locks \ - --with-openssl \ - --with-openssl-libs=${STAGING_LIBDIR} \ - --with-zlib \ - --disable-static \ -" - -inherit useradd autotools pkgconfig update-rc.d gettext systemd - -INITSCRIPT_NAME = "lighttpd" -INITSCRIPT_PARAMS = "defaults 60 40" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system --gid 667 www" -USERADD_PARAM_${PN} = "--system --gid 667 --uid 667 --groups 667 --no-create-home --home-dir /var/www --shell /bin/false --no-user-group www" - -do_install_append() { - install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav - install -d 0644 ${D}${sysconfdir}/ssl - install -m 0755 --group www -d ${D}${localstatedir}/www - install -m 0755 ${WORKDIR}/lighttpd.init ${D}${sysconfdir}/init.d/lighttpd - install -m 0644 --group www ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} - install -m 0644 --group www ${WORKDIR}/lighttpd_nrs.conf ${D}${sysconfdir} - - #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data - ln -sf ${localstatedir}/log ${D}/www/logs - ln -sf ${localstatedir}/tmp ${D}/www/var - ln -snf ../volatile/www/tmp ${D}${localstatedir}/www/tmp - - install -d ${D}/${base_sbindir} - install -m 755 ${WORKDIR}/lighttpd_custom_images_setup ${D}/${base_sbindir}/lighttpd_custom_images_setup -} - -do_install_append_mtr() { - sed -i 's/^server.max-request-size.*/server.max-request-size = 60000/g' ${D}${sysconfdir}/lighttpd.conf -} - -do_install_append_mtrv1() { - sed -i 's/^server.max-request-size.*/server.max-request-size = 60000/g' ${D}${sysconfdir}/lighttpd.conf -} - -FILES_${PN} += "${sysconfdir} /www" - -CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf \ - ${sysconfdir}/lighttpd_nrs.conf \ - " - -PACKAGES_DYNAMIC += "^lighttpd-module-.*" - -python populate_packages_prepend () { - lighttpd_libdir = d.expand('${libdir}') - do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') -} diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb deleted file mode 100644 index 29d6508..0000000 --- a/recipes-core/useradd/useradd.bb +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY = "Add mtadm user" -DESCRIPTION = "Add mtadm user for security purposes" -SECTION = "mtadm" -PR = "r4" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -S = "${WORKDIR}" -user = "mtadm" -home = "/home/${user}" -FILES_${PN} = "${home}/.ssh" -inherit useradd - -# You must set USERADD_PACKAGES when you inherit useradd. This -# lists which output packages will include the user/group -# creation code. -#USERADD_PACKAGES = "${PN} ${PN}-user3" -USERADD_PACKAGES = "${PN}" - -# You must also set USERADD_PARAM and/or GROUPADD_PARAM when -# you inherit useradd. - -# GROUPADD_PARAM works the same way, which you set to the options -# you'd normally pass to the groupadd command. This will create -# groups group1 and group2: -GROUPADD_PARAM_${PN} = "-r -g 27 sudo" - -# USERADD_PARAM specifies command line options to pass to the -# useradd command. Multiple users can be created by separating -# the commands with a semicolon. Here we'll create two users, -# user1 and user2: -USERADD_PARAM_${PN} = "-u 50 -G sudo,disk,dialout -m -r -s /bin/bash ${user}" - -do_install () { - # If the recipe doesn't have a file, the ipk - # is deleted, and it does nothing. - # Create a .ssh directory for mtadm. - install -d 0700 ${D}/${FILES_${PN}} - chown mtadm:mtadm ${D}/${home} - chown mtadm:mtadm ${D}/${FILES_${PN}} -} - -# Prevents do_package failures with: -# debugsources.list: No such file or directory: -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -pkg_postinst_${PN} () { - profile=${home}/.profile - if ! grep 'sbin' ${profile} ; then - Sub='${PA' - Sub=${Sub}'TH}:/sbin:/usr/sbin' - echo 'PATH='${Sub} >>$D/${home}/.profile - echo 'export PATH' >>$D/${home}/.profile - fi - # If doing an update, we need to add mtadm to dialout. - # If the admin has been changed, then the user must - # do something himself. - if [[ -z $D ]] ; then - sudo groupmems -a mtadm -g dialout || true - fi -} - |