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 | |
parent | 0b05e87874108a22f9ffed069c0b98fa9e5f473c (diff) | |
download | meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.tar.gz meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.tar.bz2 meta-mlinux-atmel-1f8aaf8a9104af92b86dac7ac0c1d5c4ad73a224.zip |
Remove duplicate
130 files changed, 0 insertions, 9763 deletions
diff --git a/recipes-connectivity/bluez/bluez5.inc b/recipes-connectivity/bluez/bluez5.inc deleted file mode 100644 index 35ebd0c..0000000 --- a/recipes-connectivity/bluez/bluez5.inc +++ /dev/null @@ -1,159 +0,0 @@ -SUMMARY = "Linux Bluetooth Stack Userland V5" -PR = "m4" -DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." -HOMEPAGE = "http://www.bluez.org" -SECTION = "libs" -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ - file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" -DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline" -RDEPENDS_${PN}-pand += "bash python-dbus python-logging python-syslog python-subprocess python-argparse" -RDEPENDS_${PN}-rfcomm += "bash python-pygobject python-syslog python-logging python-dbus" -PROVIDES += "bluez-hcidump" -RPROVIDES_${PN} += "bluez-hcidump" - -RCONFLICTS_${PN} = "bluez4" - -PACKAGECONFIG ??= "obex-profiles" -PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical" -PACKAGECONFIG[experimental] = "--enable-experimental,--enable-experimental" - -SRC_URI = "\ - ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ - file://out-of-tree.patch \ - file://init \ - file://run-ptest \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ - file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ - file://default \ - file://main.conf \ - file://bt-pan/init \ - file://bt-pan/default \ - file://bt-pan/bt-pan \ - file://rfcomm/rfcomm.py \ - file://rfcomm/init \ - file://rfcomm/default \ -" -S = "${WORKDIR}/bluez-${PV}" - -inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest - -EXTRA_OECONF = "\ - --enable-tools \ - --disable-cups \ - --enable-test \ - --enable-datafiles \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \ - --enable-library \ - --enable-deprecated \ - --enable-experimental \ -" - -# bluez5 builds a large number of useful utilities but does not -# install them. Specify which ones we want put into ${PN}-noinst-tools. -NOINST_TOOLS_READLINE ??= "" -NOINST_TOOLS_EXPERIMENTAL ??= "" -NOINST_TOOLS = " \ - ${NOINST_TOOLS_READLINE} \ - ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \ -" - -DBTEXEC = "${D}${libexecdir}/bluetooth/" - -do_install_append() { - install -d ${D}${INIT_D_DIR} - install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth - install -m 0755 ${WORKDIR}/bt-pan/init ${D}${INIT_D_DIR}/bt-pan - install -m 0755 ${WORKDIR}/rfcomm/init ${D}${INIT_D_DIR}/rfcomm - install -d ${DBTEXEC} - install -m 0755 ${WORKDIR}/bt-pan/bt-pan ${DBTEXEC} - install -m 0755 ${WORKDIR}/rfcomm/rfcomm.py ${DBTEXEC}/rfcomm - - install -d ${D}${sysconfdir}/bluetooth/ - if [ -f ${S}/profiles/audio/audio.conf ]; then - install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/ - fi - if [ -f ${S}/profiles/network/network.conf ]; then - install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/ - fi - if [ -f ${S}/profiles/input/input.conf ]; then - install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/ - fi - - if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then - sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth - fi - - # Install desired tools that upstream leaves in build area - for f in ${NOINST_TOOLS} ; do - install -m 755 ${B}/$f ${D}/${bindir} - done - - # Patch python tools to use Python 3; they should be source compatible, but - # still refer to Python 2 in the shebang - sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/* - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/bluetooth - install -m 0644 ${WORKDIR}/bt-pan/default ${D}${sysconfdir}/default/bt-pan - install -m 0644 ${WORKDIR}/rfcomm/default ${D}${sysconfdir}/default/rfcomm - install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/bluetooth/ -} - -ALLOW_EMPTY_libasound-module-bluez = "1" -PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools ${PN}-pand ${PN}-rfcomm" - -FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa" -FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${systemd_unitdir}/ ${datadir}/dbus-1" -CONFFILES_${PN} += "${sysconfdir}/default/bluetooth ${sysconfdir}/bluetooth/main.conf ${sysconfdir}/bluetooth/input.conf ${sysconfdir}/bluetooth/network.conf" -FILES_${PN}-dev += "\ - ${libdir}/bluetooth/plugins/*.la \ - ${libdir}/alsa-lib/*.la \ -" - -FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \ - ${exec_prefix}/lib/systemd/user/obex.service \ - ${datadir}/dbus-1/services/org.bluez.obex.service \ - " - -FILES_${PN}-pand = "${libexecdir}/bluetooth/bt-pan ${sysconfdir}/default/bt-pan ${sysconfdir}/init.d/bt-pan" -FILES_${PN}-rfcomm = "${libexecdir}/bluetooth/bt-pan ${sysconfdir}/default/bt-pan ${sysconfdir}/init.d/bt-pan" -FILES_${PN}-rfcomm = "${libexecdir}/bluetooth/rfcomm ${sysconfdir}/default/rfcomm ${sysconfdir}/init.d/rfcomm" -CONFFILES_${PN}-pand = "${sysconfdir}/default/bt-pan" -CONFFILES_${PN}-rfcomm = "${sysconfdir}/default/rfcomm" -SYSTEMD_SERVICE_${PN}-obex = "obex.service" - -FILES_${PN}-testtools = "${libdir}/bluez/test/*" - -def get_noinst_tools_paths (d, bb, tools): - s = list() - bindir = d.getVar("bindir", True) - for bdp in tools.split(): - f = os.path.basename(bdp) - s.append("%s/%s" % (bindir, f)) - return "\n".join(s) - -FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}" - -RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject" - -SYSTEMD_SERVICE_${PN} = "bluetooth.service" -INITSCRIPT_PACKAGES = "${PN} ${PN}-pand ${PN}-rfcomm" -INITSCRIPT_NAME_${PN} = "bluetooth" -INITSCRIPT_NAME_${PN}-pand = "bt-pan" -INITSCRIPT_NAME_${PN}-rfcomm = "rfcomm" -INITSCRIPT_PARAMS_${PN} = "defaults 20 20" -INITSCRIPT_PARAMS_${PN}-pand = "defaults 22 22" -INITSCRIPT_PARAMS_${PN}-rfcomm = "defaults 22 22" - -EXCLUDE_FROM_WORLD = "1" - -do_compile_ptest() { - oe_runmake buildtests -} - -do_install_ptest() { - cp -r ${B}/unit/ ${D}${PTEST_PATH} - rm -f ${D}${PTEST_PATH}/unit/*.o -} diff --git a/recipes-connectivity/bluez/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/recipes-connectivity/bluez/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch deleted file mode 100644 index 2fde7bc..0000000 --- a/recipes-connectivity/bluez/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org> -Date: Sat, 12 Oct 2013 17:45:25 +0200 -Subject: [PATCH] Allow using obexd without systemd in the user session - -Not all sessions run systemd --user (actually, the majority -doesn't), so the dbus daemon must be able to spawn obexd -directly, and to do so it needs the full path of the daemon. - -Upstream-Status: Denied - -Not accepted by upstream maintainer for being a distro specific -configuration. See thread: - -http://thread.gmane.org/gmane.linux.bluez.kernel/38725/focus=38843 - -Signed-off-by: Javier Viguera <javier.viguera@digi.com> ---- - Makefile.obexd | 4 ++-- - obexd/src/org.bluez.obex.service | 4 ---- - obexd/src/org.bluez.obex.service.in | 4 ++++ - 3 files changed, 6 insertions(+), 6 deletions(-) - delete mode 100644 obexd/src/org.bluez.obex.service - create mode 100644 obexd/src/org.bluez.obex.service.in - -diff --git a/Makefile.obexd b/Makefile.obexd -index 2e33cbc72f2b..d5d858c857b4 100644 ---- a/Makefile.obexd -+++ b/Makefile.obexd -@@ -2,12 +2,12 @@ - if SYSTEMD - systemduserunitdir = @SYSTEMD_USERUNITDIR@ - systemduserunit_DATA = obexd/src/obex.service -+endif - - dbussessionbusdir = @DBUS_SESSIONBUSDIR@ - dbussessionbus_DATA = obexd/src/org.bluez.obex.service --endif - --EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service -+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in - - obex_plugindir = $(libdir)/obex/plugins - -diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service -deleted file mode 100644 -index a53808884554..000000000000 ---- a/obexd/src/org.bluez.obex.service -+++ /dev/null -@@ -1,4 +0,0 @@ --[D-BUS Service] --Name=org.bluez.obex --Exec=/bin/false --SystemdService=dbus-org.bluez.obex.service -diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in -new file mode 100644 -index 000000000000..9c815f246b77 ---- /dev/null -+++ b/obexd/src/org.bluez.obex.service.in -@@ -0,0 +1,4 @@ -+[D-BUS Service] -+Name=org.bluez.obex -+Exec=@libexecdir@/obexd -+SystemdService=dbus-org.bluez.obex.service diff --git a/recipes-connectivity/bluez/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch b/recipes-connectivity/bluez/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch deleted file mode 100644 index 24ddae6..0000000 --- a/recipes-connectivity/bluez/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 4bdf0f96dcaa945fd29f26d56e5b36d8c23e4c8b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 1 Apr 2016 17:07:34 +0300 -Subject: [PATCH] tests: add a target for building tests without running them - -Upstream-Status: Inappropriate [oe specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/Makefile.am b/Makefile.am -index 1a48a71..ba3b92f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -425,6 +425,9 @@ endif - TESTS = $(unit_tests) - AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69 - -+# This allows building tests without running them -+buildtests: $(TESTS) -+ - if DBUS_RUN_SESSION - AM_TESTS_ENVIRONMENT += dbus-run-session -- - endif --- -2.8.0.rc3 - diff --git a/recipes-connectivity/bluez/bluez5/CVE-2017-1000250.patch b/recipes-connectivity/bluez/bluez5/CVE-2017-1000250.patch deleted file mode 100644 index 05359da..0000000 --- a/recipes-connectivity/bluez/bluez5/CVE-2017-1000250.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> -Date: Wed, 13 Sep 2017 10:01:40 +0300 -Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function - -Check if there is enough data to continue otherwise return an error. ---- - src/sdpd-request.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sdpd-request.c b/src/sdpd-request.c -index 1eefdce..318d044 100644 ---- a/src/sdpd-request.c -+++ b/src/sdpd-request.c -@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf) - } else { - /* continuation State exists -> get from cache */ - sdp_buf_t *pCache = sdp_get_cached_rsp(cstate); -- if (pCache) { -+ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) { - uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent); - pResponse = pCache->data; - memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent); --- -cgit v1.1 - diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan deleted file mode 100755 index f142bb1..0000000 --- a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan +++ /dev/null @@ -1,422 +0,0 @@ -#!/usr/bin/env python2 -from __future__ import absolute_import, print_function - -import os, sys, time, types, subprocess, signal - -import dbus -import logging -import logging.handlers - -# cgitb is in python-misc and requires python-pkgutil and python-pydoc -# It is very usefull for analyzing exceptions. -# import cgitb - -# who am i -myscript = os.path.basename(__file__) - -# Log formating class -class flog: - # priority strings to be used - # with the __init__ function - priorities = { - 'debug': logging.DEBUG, - 'info': logging.INFO, - 'warn': logging.WARNING, - 'warning': logging.WARNING, - 'error': logging.ERROR, - 'critical': logging.CRITICAL, - } - - def __init__(self,myscript,facility,priority): - """ - Initialize for logging - - :param myscript: The name of the python program script - :param facility: The syslog facility, such as daemon or user - :param priority: The minimum priority to be printed to the log - :returns: Nothing - :raises TBD: logging class errors. - """ - name_len = str(len(myscript)) - self.myscript = myscript - self.log = logging.getLogger(myscript) - self.handler = logging.handlers.SysLogHandler(address=('/dev/log'),facility=facility) - self.default_fmt = ' %(levelname)-9s %(name)-' + name_len + 's %(message)s' - self.verbose_fmt1 = ' %(levelname)-9s %(name)-' + name_len + 's %(threadName)-14s ' - self.verbose_fmt2 = ' %(message)s' - formatter = logging.Formatter(self.default_fmt) - self.handler.setFormatter(formatter) - self.log.setLevel(self.priorities[priority]) # Minimum infolevel to log - self.log.addHandler(self.handler) - self.handler.createLock() - - def __default(self,func,*args): - self.handler.acquire() - formatter = logging.Formatter(self.default_fmt) - self.handler.setFormatter(formatter) - func(*args) - self.handler.release() - - def setThreshold(self,threshold): - """ - Change the syslog priority threshold - - :param priority: Character string corresponding to the threshold - """ - self.handler.acquire() - self.log.setLevel(self.priorities[threshold]) # Minimum infolevel to log - self.handler.release() - - def critical(self,*args): - """ - Prints a variable argument list at critical priority - - :returns: logging result - """ - self.__default(self.log.critical,*args) - - def error(self,*args): - """ - Prints a variable argument list at error priority - - :returns: logging result - """ - self.__default(self.log.error,*args) - - def warning(self,*args): - """ - Prints a variable argument list at warning priority - - :returns: logging result - """ - self.__default(self.log.warning,*args) - - # Python has no notice level! - - def info(self,*args): - """ - Prints a variable argument list at info priority - - :returns: logging result - """ - self.__default(self.log.info,*args) - - def debug(self,*args): - """ - Prints a variable argument list at debug priority - - Printing debug includes function name and line - number. - - :returns: logging result - """ - caller_frame = sys._getframe().f_back - callerfunc = caller_frame.f_code.co_name + '@' + str(caller_frame.f_lineno); - callerfunc = callerfunc.ljust(16) - self.handler.acquire() - log = logging.getLogger(self.myscript) - formatter = logging.Formatter(self.verbose_fmt1+callerfunc+self.verbose_fmt2) - self.handler.setFormatter(formatter) - log.debug(*args) - self.handler.release() - -# End of log handler - -### ~bluezutils.py - -iface_base = 'org.bluez' -iface_dev = '{}.Device1'.format(iface_base) -iface_adapter = '{}.Adapter1'.format(iface_base) -iface_props = 'org.freedesktop.DBus.Properties' -global lg - -# Will this write to syslog????? -class BTError(Exception): pass - -def get_bus(): - bus = getattr(get_bus, 'cached_obj', None) - if not bus: bus = get_bus.cached_obj = dbus.SystemBus() - return bus - -def get_manager(): - manager = getattr(get_manager, 'cached_obj', None) - if not manager: - try: - manager = get_manager.cached_obj = dbus.Interface( - get_bus().get_object(iface_base, '/'), - 'org.freedesktop.DBus.ObjectManager' ) - except dbus.exceptions.DBusException as e: - s="" - try: - s = e.__dict__["_dbus_error_name"] - except KeyError: - pass - unk = 'org.freedesktop.DBus.Error.ServiceUnknown' - cexit = 'org.freedesktop.DBus.Error.Spawn.ChildExited' - if (s == unk) or (s == cexit): - msg = 'Is bluetoothd running? Bluetooth tree missing from DBUS' - lg.error(msg) - print(msg) - exit(1) - else: - raise - return manager - -def prop_get(obj, k, iface=None): - if iface is None: iface = obj.dbus_interface - return obj.Get(iface, k, dbus_interface=iface_props) -def prop_set(obj, k, v, iface=None): - if iface is None: iface = obj.dbus_interface - return obj.Set(iface, k, v, dbus_interface=iface_props) - -msg='' -def find_adapter(pattern=None): - try: - adapter = find_adapter_in_objects(get_manager().GetManagedObjects(), pattern) - - # DBusException - # Original code: - # template = "An exception of type {0} occurred. Arguments:\n{1!r}" - # message = template.format(type(ex).__name__, ex.args) - # print message - # dbus.exceptions.DBusException: - # org.freedesktop.DBus.Error.AccessDenied: - except dbus.exceptions.DBusException as e: - s="" - try: - s = e.__dict__["_dbus_error_name"] - except KeyError: - pass - - if "org.freedesktop.DBus.Error.AccessDenied" == s: - rot="You do not have sufficient privilege to run bt-pan" - print(rot) - lg.error(rot) - exit(1) - else: - raise - return adapter - -def find_adapter_in_objects(objects, pattern=None): - bus, obj = get_bus(), None - for path, ifaces in objects.iteritems(): - adapter = ifaces.get(iface_adapter) - if adapter is None: continue - if not pattern or pattern == adapter['Address'] or path.endswith(pattern): - obj = bus.get_object(iface_base, path) - yield dbus.Interface(obj, iface_adapter) - if obj is None: - msg = 'Bluetooth adapter not found' - lg.error(msg) - raise BTError(msg) - -def find_device(device_address, adapter_pattern=None): - return find_device_in_objects(get_manager().GetManagedObjects(), device_address, adapter_pattern) - -def find_device_in_objects(objects, device_address, adapter_pattern=None): - bus = get_bus() - path_prefix = '' - if adapter_pattern: - if not isinstance(adapter_pattern, types.StringTypes): adapter = adapter_pattern - else: adapter = find_adapter_in_objects(objects, adapter_pattern) - path_prefix = adapter.object_path - for path, ifaces in objects.iteritems(): - device = ifaces.get(iface_dev) - if device is None: continue - if device['Address'] == device_address and path.startswith(path_prefix): - obj = bus.get_object(iface_base, path) - return dbus.Interface(obj, iface_dev) - msg = 'Bluetooth device not found' - lg.error(msg) - raise BTError(msg) - -pidPath = "" - -def writePidFile(device): - global pidPath - pid = str(os.getpid()) - pidPath = '/run/bt-pan.' + device + '.pid' - f = open(pidPath, 'w') - f.write(pid) - f.close() - -def hexdump(string): - return ":".join("{:02x}".format(ord(c)) for c in string) - -### bt-pan - -def main(args=None): - import argparse - global lg - - # Set up logging initially info and above - lg = flog(myscript,'daemon','info') - - # cgitb.enable(format='text') - - parser = argparse.ArgumentParser( - description='BlueZ bluetooth PAN network server/client.') - - parser.add_argument('-i', '--device', metavar='local-addr/pattern', - help='Local device address/pattern to use (if not default).') - parser.add_argument('-a', '--device-all', action='store_true', - help='Use all local hci devices, not just default one.' - ' Only valid with "server" mode, mutually exclusive with --device option.') - parser.add_argument('-u', '--uuid', - metavar='uuid_or_shortcut', default='nap', - help='Service UUID to use. Can be either full UUID' - ' or one of the shortcuts: gn, panu, nap. Default: %(default)s.') - parser.add_argument('--systemd', action='store_true', - help='Use systemd service' - ' notification/watchdog mechanisms in daemon modes, if available.') - parser.add_argument('--debug', - action='store_true', help='Verbose operation mode.') - - cmds = parser.add_subparsers( dest='call', - title='Supported operations (have their own suboptions as well)' ) - - cmd = cmds.add_parser('server', help='Run infinitely as a NAP network server.') - cmd.add_argument('iface_name', - help='Bridge interface name to which each link will be added by bluez.' - ' It must be created and configured before starting the server.') - - cmd = cmds.add_parser('client', help='Connect to a PAN network.') - cmd.add_argument('remote_addr', help='Remote device address to connect to.') - cmd.add_argument('-d', '--disconnect', action='store_true', - help='Instead of connecting (default action), disconnect' - ' (if connected) and exit. Overrides all other options for this command.') - cmd.add_argument('-w', '--wait', action='store_true', - help='Go into an endless wait-loop after connection, terminating it on exit.') - cmd.add_argument('-c', '--if-not-connected', action='store_true', - help='Dont raise error if connection is already established.') - cmd.add_argument('-r', '--reconnect', action='store_true', - help='Force reconnection if some connection is already established.') - - opts = parser.parse_args() - - if opts.debug: - lg.setThreshold('debug') - - if not opts.device_all: devs = [next(iter(find_adapter(opts.device)))] - else: - if opts.call != 'server': - parser.error('--device-all option is only valid with "server" mode.') - devs = list(find_adapter()) - devs = dict((prop_get(dev, 'Address'), dev) for dev in devs) - for dev_addr, dev in devs.viewitems(): - prop_set(dev, 'Powered', True) - lg.debug('Using local device (addr: %s): %s', dev_addr, dev.object_path) - - wait_iter_noop = 3600 - if opts.systemd: - from systemd import daemon - def wait_iter(): - if not wait_iter.sd_ready: - daemon.notify('READY=1') - daemon.notify('STATUS=Running in {} mode...'.format(opts.call)) - wait_iter.sd_ready = True - time.sleep(wait_iter.timeout) - if wait_iter.sd_wdt: daemon.notify('WATCHDOG=1') - wd_pid, wd_usec = (os.environ.get(k) for k in ['WATCHDOG_PID', 'WATCHDOG_USEC']) - if wd_pid and wd_pid.isdigit() and int(wd_pid) == os.getpid(): - wd_interval = float(wd_usec) / 2e6 # half of interval in seconds - assert wd_interval > 0, wd_interval - else: wd_interval = None - if wd_interval: - lg.debug('Initializing systemd watchdog pinger with interval: %ss', wd_interval) - wait_iter.sd_wdt, wait_iter.timeout = True, min(wd_interval, wait_iter_noop) - else: wait_iter.sd_wdt, wait_iter.timeout = False, wait_iter_noop - wait_iter.sd_ready = False - else: wait_iter = lambda: time.sleep(wait_iter_noop) - signal.signal(signal.SIGTERM, lambda sig,frm: sys.exit(0)) - - - if opts.call == 'server': - inm = opts.iface_name - brctl = subprocess.Popen( - ['brctl', 'show', inm], - stdout=open(os.devnull, 'wb'), stderr=subprocess.PIPE ) - brctl_stderr = brctl.stderr.read() - writePidFile(opts.iface_name) - if brctl.wait() or brctl_stderr: - lg.error('brctl check failed for interface (missing?): {}'.format(inm)) - lg.error('Bridge interface must be added and configured before starting server, e.g. with:') - lg.error(' brctl addbr {}'.format(inm)) - lg.error(' brctl setfd {} 0'.format(inm)) - lg.error(' brctl stp {} off'.format(inm)) - lg.error(' ip addr add 10.101.225.84/24 dev {}'.format(inm)) - lg.error(' ip link set {} up'.format(inm)) - return 1 - - servers = list() - try: - for dev_addr, dev in devs.viewitems(): - server = dbus.Interface(dev, 'org.bluez.NetworkServer1') - server.Unregister(opts.uuid) # in case already registered - server.Register(opts.uuid, opts.iface_name) - servers.append(server) - lg.debug( 'Registered uuid %r with' - ' bridge/dev: %s / %s', opts.uuid, opts.iface_name, dev_addr ) - while True: wait_iter() - except KeyboardInterrupt: pass - finally: - if servers: - for server in servers: server.Unregister(opts.uuid) - lg.debug('Unregistered server uuids') - - - elif opts.call == 'client': - dev_remote = find_device(opts.remote_addr, devs.values()[0]) - lg.debug( 'Using remote device (addr: %s): %s', - prop_get(dev_remote, 'Address'), dev_remote.object_path ) - try: dev_remote.ConnectProfile(opts.uuid) - except: pass # no idea why it fails sometimes, but still creates dbus interface - net = dbus.Interface(dev_remote, 'org.bluez.Network1') - - if opts.disconnect: - try: net.Disconnect() - except dbus.exceptions.DBusException as err: - if err.get_dbus_name() != 'org.bluez.Error.Failed': raise - connected = prop_get(net, 'Connected') - if connected: raise - lg.debug( - 'Disconnected from network' - ' (dev_remote: %s, addr: %s) uuid %r, by explicit command', - dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid ) - return - - for n in xrange(2): - try: iface = net.Connect(opts.uuid) - except dbus.exceptions.DBusException as err: - if err.get_dbus_name() != 'org.bluez.Error.Failed': raise - connected = prop_get(net, 'Connected') - if not connected: raise - if opts.reconnect: - lg.debug( 'Detected pre-established connection' - ' (iface: %s), reconnecting', prop_get(net, 'Interface') ) - net.Disconnect() - continue - if not opts.if_not_connected: raise - else: break - lg.debug( - 'Connected to network (dev_remote: %s, addr: %s) uuid %r with iface: %s', - dev_remote.object_path, prop_get(dev_remote, 'Address'), opts.uuid, iface ) - - if opts.wait: - try: - while True: wait_iter() - except KeyboardInterrupt: pass - finally: - net.Disconnect() - lg.debug('Disconnected from network') - - - else: raise ValueError(opts.call) - global pidPath - try: - os.remove(pidPath) - except OSError: - pass - lg.debug('Finished') - -if __name__ == '__main__': sys.exit(main()) diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/default b/recipes-connectivity/bluez/bluez5/bt-pan/default deleted file mode 100755 index c960298..0000000 --- a/recipes-connectivity/bluez/bluez5/bt-pan/default +++ /dev/null @@ -1,2 +0,0 @@ -ENABLED="no" -PANOPTS="--debug" diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/init b/recipes-connectivity/bluez/bluez5/bt-pan/init deleted file mode 100755 index 3f7062e..0000000 --- a/recipes-connectivity/bluez/bluez5/bt-pan/init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -NAME=bt-pan -SERVER=/usr/libexec/bluetooth/${NAME} -PYTHON=$(readlink -f /usr/bin/python2) -BRIDGE=pan0 -DNAME="${NAME}.${BRIDGE}" -PIDFILE="/run/${DNAME}.pid" - -ENABLED=yes -[ -f /etc/default/$NAME ] && . /etc/default/$NAME - -if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled in /etc/default" - exit -fi - -case $1 in - start) - echo "Starting ${DNAME}" - /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${PANOPTS} server $BRIDGE - ;; - - stop) - /usr/sbin/start-stop-daemon -K -p ${PIDFILE} -x ${PYTHON} - echo "Stopping ${DNAME}" - ;; - - restart) - $0 stop - $0 start - ;; - - *) - echo "Usage: $0 {start|stop|restart}" - exit 2 - ;; -esac - - diff --git a/recipes-connectivity/bluez/bluez5/default b/recipes-connectivity/bluez/bluez5/default deleted file mode 100644 index e912922..0000000 --- a/recipes-connectivity/bluez/bluez5/default +++ /dev/null @@ -1,8 +0,0 @@ -# Set to 1 to enable bluetooth daemon -BLUETOOTH_ENABLED=0 - -# Use the following to setup bluetooth usability -BLUETOOTHCTL_CMD="power on\ndiscoverable on\npairable on\n" - -#Compatilitity mode -#MOREOPTIONS="-C" diff --git a/recipes-connectivity/bluez/bluez5/init b/recipes-connectivity/bluez/bluez5/init deleted file mode 100755 index 4d84195..0000000 --- a/recipes-connectivity/bluez/bluez5/init +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DESC=bluetooth - -DAEMON=/usr/libexec/bluetooth/bluetoothd - -# If you want to be ignore error of "org.freedesktop.hostname1", -# please enable NOPLUGIN_OPTION. -# NOPLUGIN_OPTION="--noplugin=hostname" -NOPLUGIN_OPTION="" -SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- $NOPLUGIN_OPTION" - -test -f $DAEMON || exit 0 - -# FIXME: any of the sourced files may fail if/with syntax errors -test -f /etc/default/bluetooth && . /etc/default/bluetooth -test -f /etc/default/rcS && . /etc/default/rcS - -set -e - -case $1 in - start) - echo "Starting $DESC" - - if test "$BLUETOOTH_ENABLED" = 0; then - echo "disabled. see /etc/default/bluetooth" - exit 0 - fi - - start-stop-daemon --start --background $SSD_OPTIONS $MOREOPTIONS - sleep 1 - if [[ -n ${BLUETOOTHCTL_CMD} ]] ; then - echo -e "${BLUETOOTHCTL_CMD}" | /usr/bin/bluetoothctl 2>&1 | logger -t bluetoothctl -p daemon.info - fi - echo "${DAEMON##*/}" - - ;; - stop) - echo "Stopping $DESC" - if test "$BLUETOOTH_ENABLED" = 0; then - echo "disabled." - exit 0 - fi - start-stop-daemon --stop $SSD_OPTIONS - echo "${DAEMON}" - ;; - restart|force-reload) - $0 stop - sleep 1 - $0 start - ;; - status) - pidof ${DAEMON} >/dev/null - status=$? - if [ $status -eq 0 ]; then - echo "bluetooth is running." - else - echo "bluetooth is not running" - fi - exit $status - ;; - *) - N=/etc/init.d/bluetooth - echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 - -# vim:noet diff --git a/recipes-connectivity/bluez/bluez5/main.conf b/recipes-connectivity/bluez/bluez5/main.conf deleted file mode 100644 index 40ad113..0000000 --- a/recipes-connectivity/bluez/bluez5/main.conf +++ /dev/null @@ -1,108 +0,0 @@ -[General] - -# Default adapter name -# Defaults to 'BlueZ X.YZ' -Name = MTCDT-Bluez - -# Default device class. Only the major and minor device class bits are -# considered. Defaults to '0x000000'. -#Class = 0x000100 - -# How long to stay in discoverable mode before going back to non-discoverable -# The value is in seconds. Default is 180, i.e. 3 minutes. -# 0 = disable timer, i.e. stay discoverable forever -DiscoverableTimeout = 0 - -# How long to stay in pairable mode before going back to non-discoverable -# The value is in seconds. Default is 0. -# 0 = disable timer, i.e. stay pairable forever -#PairableTimeout = 0 - -# Automatic connection for bonded devices driven by platform/user events. -# If a platform plugin uses this mechanism, automatic connections will be -# enabled during the interval defined below. Initially, this feature -# intends to be used to establish connections to ATT channels. Default is 60. -AutoConnectTimeout = 0 - -# Use vendor id source (assigner), vendor, product and version information for -# DID profile support. The values are separated by ":" and assigner, VID, PID -# and version. -# Possible vendor id source values: bluetooth, usb (defaults to usb) -#DeviceID = bluetooth:1234:5678:abcd - -# Do reverse service discovery for previously unknown devices that connect to -# us. This option is really only needed for qualification since the BITE tester -# doesn't like us doing reverse SDP for some test cases (though there could in -# theory be other useful purposes for this too). Defaults to 'true'. -#ReverseServiceDiscovery = true - -# Enable name resolving after inquiry. Set it to 'false' if you don't need -# remote devices name and want shorter discovery cycle. Defaults to 'true'. -#NameResolving = true - -# Enable runtime persistency of debug link keys. Default is false which -# makes debug link keys valid only for the duration of the connection -# that they were created for. -#DebugKeys = false - -# Restricts all controllers to the specified transport. Default value -# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW). -# Possible values: "dual", "bredr", "le" -#ControllerMode = dual - -# Enables Multi Profile Specification support. This allows to specify if -# system supports only Multiple Profiles Single Device (MPSD) configuration -# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple -# Devices (MPMD) configurations. -# Possible values: "off", "single", "multiple" -#MultiProfile = off - -# Permanently enables the Fast Connectable setting for adapters that -# support it. When enabled other devices can connect faster to us, -# however the tradeoff is increased power consumptions. This feature -# will fully work only on kernel version 4.1 and newer. Defaults to -# 'false'. -#FastConnectable = false - -# Default privacy setting. -# Enables use of private address. -# Possible values: "off", "device", "network" -# "network" option not supported currently -# Defaults to "off" -# Privacy = off - -[GATT] -# GATT attribute cache. -# Possible values: -# always: Always cache attributes even for devices not paired, this is -# recommended as it is best for interoperability, with more consistent -# reconnection times and enables proper tracking of notifications for all -# devices. -# yes: Only cache attributes of paired devices. -# no: Never cache attributes -# Default: always -#Cache = always - -[Policy] -# -# The ReconnectUUIDs defines the set of remote services that should try -# to be reconnected to in case of a link loss (link supervision -# timeout). The policy plugin should contain a sane set of values by -# default, but this list can be overridden here. By setting the list to -# empty the reconnection feature gets disabled. -#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb - -# ReconnectAttempts define the number of attempts to reconnect after a link -# lost. Setting the value to 0 disables reconnecting feature. -#ReconnectAttempts=7 - -# ReconnectIntervals define the set of intervals in seconds to use in between -# attempts. -# If the number of attempts defined in ReconnectAttempts is bigger than the -# set of intervals the last interval is repeated until the last attempt. -#ReconnectIntervals=1,2,4,8,16,32,64 - -# AutoEnable defines option to enable all controllers when they are found. -# This includes adapters present on start as well as adapters that are plugged -# in later on. Defaults to 'false'. -AutoEnable=true diff --git a/recipes-connectivity/bluez/bluez5/out-of-tree.patch b/recipes-connectivity/bluez/bluez5/out-of-tree.patch deleted file mode 100644 index 3ee79d7..0000000 --- a/recipes-connectivity/bluez/bluez5/out-of-tree.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ed55b49a226ca3909f52416be2ae5ce1c5ca2cb2 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Fri, 22 Apr 2016 15:40:37 +0100 -Subject: [PATCH] Makefile.obexd: add missing mkdir in builtin.h generation - -In parallel out-of-tree builds it's possible that obexd/src/builtin.h is -generated before the target directory has been implicitly created. Solve this by -creating the directory before writing into it. - -Upstream-Status: Submitted -Signed-off-by: Ross Burton <ross.burton@intel.com> ---- - Makefile.obexd | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.obexd b/Makefile.obexd -index 2e33cbc..c8286f0 100644 ---- a/Makefile.obexd -+++ b/Makefile.obexd -@@ -105,2 +105,3 @@ obexd/src/plugin.$(OBJEXT): obexd/src/builtin.h - obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources) -+ $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)$(srcdir)/obexd/src/genbuiltin $(obexd_builtin_modules) > $@ --- -2.8.0.rc3 - diff --git a/recipes-connectivity/bluez/bluez5/rfcomm/default b/recipes-connectivity/bluez/bluez5/rfcomm/default deleted file mode 100755 index 613a72c..0000000 --- a/recipes-connectivity/bluez/bluez5/rfcomm/default +++ /dev/null @@ -1,2 +0,0 @@ -ENABLED="no" -RFCOMMOPTS="--debug --login" diff --git a/recipes-connectivity/bluez/bluez5/rfcomm/init b/recipes-connectivity/bluez/bluez5/rfcomm/init deleted file mode 100755 index 69455d8..0000000 --- a/recipes-connectivity/bluez/bluez5/rfcomm/init +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -NAME=rfcomm -SERVER=/usr/libexec/bluetooth/${NAME} -PYTHON=$(readlink -f /usr/bin/python2) -PIDFILE="/run/${NAME}.pid" - -ENABLED=yes -[ -f /etc/default/$NAME ] && . /etc/default/$NAME - -if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled in /etc/default" - exit -fi - -case $1 in - start) - echo "Starting ${NAME}" - echo /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${RFCOMMOPTS} - /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${RFCOMMOPTS} - ;; - - stop) - /usr/sbin/start-stop-daemon -K -p ${PIDFILE} -x ${PYTHON} - echo "Stopping ${DNAME}" - ;; - - restart) - $0 stop - $0 start - ;; - - *) - echo "Usage: $0 {start|stop|restart}" - exit 2 - ;; -esac - - diff --git a/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py b/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py deleted file mode 100644 index e8f2554..0000000 --- a/recipes-connectivity/bluez/bluez5/rfcomm/rfcomm.py +++ /dev/null @@ -1,650 +0,0 @@ -#!/usr/bin/env python2 -import thread -import os -import dbus -import dbus.service -import dbus.mainloop.glib -from gi.repository import GObject, GLib -import sys -import time -import threading -import socket -import logging -import logging.handlers -import syslog -import grp -import stat -import atexit -import re -import mmap -import subprocess -import threading -import struct -import fcntl -import termios -import signal -import time -import bluetooth - -# Do we need stty onlcr???? - -#SerialPortProfile = '00001101-0000-1000-8000-00805f9b34fb' - -global lg -global opts -global RFCOMMDIR -RFCOMMDIR = '/run/rfcomm' -SLAVEDIR='/dev/pts' -BLUEZLIB='/var/lib/bluetooth' - -global TTY_GID # Group-ID number of the TTY group -global doterm # If true, this python program is a terminal console. -global needpseudot # Login option and pseudoterminal option -needpseudot = False -global terminatenow -terminatenow = False - -myscript = os.path.basename(__file__) -class dopidfile(object): - pidPath = "/" - - def writePidFile(self): - global pidPath - pid = str(os.getpid()) - pidPath = '/run/rfcomm' + '.pid' - f = open(pidPath, 'w') - f.write(pid) - f.close() - - def rmPidFile(self): - try: - os.remove(pidPath) - except OSError: - pass - - -# Log formating class -class flog: - # priority strings to be used - # with the __init__ function - priorities = { - 'debug': logging.DEBUG, - 'info': logging.INFO, - 'warn': logging.WARNING, - 'warning': logging.WARNING, - 'error': logging.ERROR, - 'critical': logging.CRITICAL, - } - - def __init__(self,myscript,facility,priority): - """ - Initialize for logging - - :param myscript: The name of the python program script - :param facility: The syslog facility, such as daemon or user - :param priority: The minimum priority to be printed to the log - :returns: Nothing - :raises TBD: logging class errors. - """ - name_len = str(len(myscript)) - self.myscript = myscript - self.log = logging.getLogger(myscript) - self.handler = logging.handlers.SysLogHandler(address=('/dev/log'),facility=facility) - self.default_fmt = ' %(levelname)-9s %(name)-' + name_len + 's %(message)s' - self.verbose_fmt1 = ' %(levelname)-9s %(name)-' + name_len + 's %(threadName)-14s ' - self.verbose_fmt2 = ' %(message)s' - formatter = logging.Formatter(self.default_fmt) - self.handler.setFormatter(formatter) - self.log.setLevel(self.priorities[priority]) # Minimum infolevel to log - self.log.addHandler(self.handler) - self.handler.createLock() - - def __default(self,func,*args): - self.handler.acquire() - formatter = logging.Formatter(self.default_fmt) - self.handler.setFormatter(formatter) - func(*args) - self.handler.release() - - def setThreshold(self,threshold): - """ - Change the syslog priority threshold - - :param priority: Character string corresponding to the threshold - """ - self.handler.acquire() - self.log.setLevel(self.priorities[threshold]) # Minimum infolevel to log - self.handler.release() - - def critical(self,*args): - """ - Prints a variable argument list at critical priority - - :returns: logging result - """ - self.__default(self.log.critical,*args) - - def error(self,*args): - """ - Prints a variable argument list at error priority - - :returns: logging result - """ - self.__default(self.log.error,*args) - - def warning(self,*args): - """ - Prints a variable argument list at warning priority - - :returns: logging result - """ - self.__default(self.log.warning,*args) - - # Python has no notice level! - - def info(self,*args): - """ - Prints a variable argument list at info priority - - :returns: logging result - """ - self.__default(self.log.info,*args) - - def debug(self,*args): - """ - Prints a variable argument list at debug priority - - Printing debug includes function name and line - number. - - :returns: logging result - """ - caller_frame = sys._getframe().f_back - callerfunc = caller_frame.f_code.co_name + '@' + str(caller_frame.f_lineno); - callerfunc = callerfunc.ljust(16) - self.handler.acquire() - log = logging.getLogger(self.myscript) - formatter = logging.Formatter(self.verbose_fmt1+callerfunc+self.verbose_fmt2) - self.handler.setFormatter(formatter) - log.debug(*args) - self.handler.release() - -# End of log handler - - - -# Thread to create login process, with -# stdin, stdout, stderr matching the file descriptor -# This is because NewConnection cannot create threads or -# use a mutex. Workarounds are pipes, IPC semamphores, -# IPC messaging -class logins(object): - slavefd = -1 - - # Thread to wait on our children - def IgnoreWait(self,pid): - lg.debug("IgnoreWait: Waiting on process pid: %d" % (pid.pid)) - pid.wait() - lg.debug("login terminated: %d" % (pid.pid)) - - def StartLogin(self,rpipe,mainloop): - datafd='' - masters = [] - lg.debug("StartLogin enter: rpipe fd=%d" % (rpipe)) - while 1: - try: - datafd=os.read(rpipe,8) - except Exception as e: - lg.error('os.read error: %s' % (e)) - lg.debug('Done with StartLogin, calling quit') - for fd in masters: - os.close(fd) - os.kill(os.getpid(), signal.SIGINT) - thread.exit() - # Single integer. - (slavefd,masterfd) = struct.unpack("ii",bytearray(datafd)) - if masterfd > 0: - masters.append(masterfd) - lg.debug("StartLogin: slavefd %d" % (slavefd)) - if slavefd < 0: - lg.debug("Told to exit, so exiting StartLogin thread") - os.close(rpipe) - # We try to close all the masters, as it gets - # things wound down in a hurry. - for fd in masters: - lg.debug('StartLogin: Try to close fd %d' % (fd)) - try: - os.close(fd) - except Exception as e: - lg.debug('StartLogin (ignore error): OK: Did not close fd: %d %s' % (fd,e)) - sys.exc_clear() - os.kill(os.getpid(), signal.SIGINT) - thread.exit() - # Start login with fd, and close it. - Env = {'TERM': 'dumb'} - self.slavefd = slavefd - lg.debug('Popen slavefd: %d' % (slavefd)) - try: - # Mar 16 14:23:35 mtcdt daemon.err ERROR rfcomm.py Popen login: global name 's' is not defined - pid = subprocess.Popen(['/bin/login','--'],env=Env,preexec_fn = lambda: ( os.setsid(),fcntl.ioctl(0, termios.TIOCSCTTY, 0) ),stdin=slavefd,stdout=slavefd,stderr=slavefd,close_fds=True,cwd='/') - lg.debug('Start IgnoreWait thread') - try: - IgnoreWaitThread = threading.Thread(target=self.IgnoreWait,args=[pid]) - except Exception as e: - lg.error('IgnoreWaitThread: threading.Thread: %s' % (e)) - try: - IgnoreWaitThread.start() - except Exception as e: - lg.error('IgnoreWaitThread: start: %s' % (e)) - except Exception as e: - lg.error('Popen login: %s' % (e)) - os.close(slavefd) - -class Profile(dbus.service.Object): - fd = -1 - readThread = None - path = None - io_id = -1 - io_id2 = -1 - hup_id = -1 - hup_id2 = -1 - io_pty_master = -1 - io_pty_slave = -1 - slavePath = None - linkPath = None - w = -1 - # True False pseudonyms for making code readable (or not!) - exiting = True - notexiting = False - - @dbus.service.method('org.bluez.Profile1', - in_signature='', - out_signature='') - def Release(self): - lg.info('Release/quit') - mainloop.quit() - - @dbus.service.method("org.bluez.Profile1", - in_signature="", out_signature="") - def Cancel(self): - lg.info("Cancel") - - def removeLink(self,state): - lg.debug('removeLink: state: %r' % (state)) - path = self.linkPath - lg.debug('removeLink: path %s' % (path)) - if state == self.exiting: - lg.debug('Clearing out linkPath') - self.linkPath = None # Burn bridges, do it once. - if path and os.path.lexists(path): - try: - os.remove(path) - except Exception as e: - lg.error("os.remove(self.linkPath): Tried to remove %s" % (path)) - lg.error('%s' % (e)) - - - - # New Connection is called when a new Bluetooth - # is established - @dbus.service.method('org.bluez.Profile1', - in_signature='oha{sv}', - out_signature='') - def NewConnection(self, path, fd, properties): - dbus.mainloop.glib.threads_init() - self.fd = fd.take() # Extract File Descriptor from dbus UnixFD class. - self.path = path - - # Bluetooth address portion of the path - address = os.path.basename(self.path) - - numaddr = address[address.find("_")+1:] - # Replace _ with : - Name = bluetooth.lookup_name(numaddr.replace("_",":")) - - print('NewConnection(%s, %s, %s:%d)' % (path,Name,type(fd).__name__,self.fd)) - lg.info('NewConnection(%s, %s, %s:%d)' % (path,Name,type(fd).__name__,self.fd)) - atexit.register(self.RequestDisconnection,self.path) - lg.debug('Past atexit.register') - - # Get a pseudoterminal to provide an I/O driver for - # a program that needs a TTY. - if needpseudot: - (self.io_pty_master,self.io_pty_slave) = os.openpty() - slavestat = os.fstat(self.io_pty_slave) - self.minor = os.minor(slavestat.st_rdev) - lg.debug('pseudoterminal major and minor: (%d,%d)' % (os.major(slavestat.st_rdev),self.minor)) - if not os.path.isdir(RFCOMMDIR): - lg.debug('Before mkdir: RFCOMMDIR %s' % (RFCOMMDIR)) - os.mkdir(RFCOMMDIR,0755) - - - lg.debug('Address %s' % (address)) - self.linkPath = RFCOMMDIR + '/' + address + '_' + Name + '_pts' + str(self.minor) - self.slavePath = SLAVEDIR + '/' + str(self.minor) - lg.debug('termPath %s' % (self.linkPath)) - self.removeLink(self.notexiting) - # linkPath was removed - - lg.debug('os.symlink(%s,%s)' % (self.slavePath,self.linkPath)) - old = os.umask(002) - lg.debug('past umask') - try: - os.symlink(self.slavePath,self.linkPath) - try: - atexit.register(self.removeLink,self.exiting); - except Exception as e: - lg.error('Register atexit: %s' % (e)) - except Exception as e: - lg.error('symlink failed: %s' % (e)) - return False - lg.debug('Before umask') - os.umask(old) - lg.debug('After umask') - # os.chown(self.myPath,0,TTY_GID) - - # Completed pseudoterminal case to create device and node - - # + For loopback, we only monitor the RFCOMM line (self.fd). - # + For interactive (not pseudoterminal or loopback option, - # we monitor the stdin (0) and the RFCOMM line for input - # + For pseudoterminal, we monitor input on the RFCOMM line, - # and the slave pseudoterminal. - # Note that io_add_watch causes a poll to be done by the - # python GI library. The callback functions (io_term and io_cb) - # will be called when there is an event on the file descriptor - # being polled. - sys.stdout.flush() - if not opts.loopback: - if needpseudot: - local_fd = self.io_pty_master - lg.debug('NewConnection: master_fd: %d slave_fd: %d' % (local_fd,self.io_pty_slave)) #success to here. - else: - # stdin - local_fd = 0 - lg.debug('Ready to do io_add_watch on local_fd: %d' % (local_fd)) - try: - self.io_id2 = GObject.io_add_watch(local_fd, - GObject.PRIORITY_DEFAULT, - GObject.IO_IN | GObject.IO_PRI | GObject.IO_HUP | GObject.IO_ERR, - self.io_term) - except Exception as e: - lg.error('io_addwatch failed for local_fd %d: IO_IN, IO_PRI %s' % (local_fd,e)) - - if opts.login: - # Writing the slave file descriptor causes the login process to start. - lg.debug('opts.login is true slave fd: %d pipe: %d' % (self.io_pty_slave,self.w)) - try: - os.write(self.w,struct.pack('ii',self.io_pty_slave,self.io_pty_master)) - except Exception as e: - lg.error('os.write of slave fd:%d master fd: %d failed: %s' % (self.io_pty_slave,self.io_pty_slave,e)) - os.close(self.io_pty_slave) - self.io_pty_slave = -1 - return False - self.io_pty_slave = -1 - - if doterm: - lg.debug('Profile: Write the prompt') - os.write(1,'TTY> ') - - lg.debug('NewConnection: doterm: %s, io_add_watch is next' % doterm) - - self.io_id = GObject.io_add_watch(self.fd, - GObject.PRIORITY_DEFAULT, - GObject.IO_IN | GObject.IO_PRI | GObject.IO_HUP | GObject.IO_ERR, - self.io_cb) - lg.debug('io_id(remote input) = %d io_id2(local input) = %d' % (self.io_id,self.io_id2)) - - - # I/O read from Bluetooth remote to local application. - def io_cb(self, fd, conditions): - if terminatenow: - self.RequestDisconnection(self.path) - - if (conditions & GObject.IO_HUP or conditions & GObject.IO_ERR): - lg.debug('Found HUP on fd: %d, so terminate' % (fd)) - self.RequestDisconnection(self.path) - return False - # Read from remote - data = None - try: - data = os.read(fd, 1024) - except: - return True - lg.debug('io_cb: past read: doterm: %s' % doterm) - if opts.loopback: - toutput = fd # same as input - else: - toutput = self.io_pty_master - - if opts.loopback or needpseudot or opts.login: - if data: - start = 0 - remain = len(data) - result = 1 - lg.debug('remain is %d entering the loop' % (remain)) - while remain > 0 and result > 0: - try: - result = os.write(toutput,data) - except Exception as e: - lg.debug('os.write failed: %s' % (e)) - return True - lg.debug('os.write returned %d for %s remain: %d' % (result,data,remain)) - if remain != result and remain > 0: - remain -= result - lg.debug('remain is now %d result is %d' % (remain,result)) - data = data[-remain:] - lg.debug('remain to print %s' % (data)) - else: - remain = 0 - lg.debug('returning true to end this routing') - return True - - if data and len(data) > 0: - final = data[-1] - if data[-1] == '\n': - date = data[:-1] - if doterm: - print('\n'+data.decode('ascii')) - os.write(1,'TTY> ') - - return True - - # I/O written to bluetooth from local slave (application write to remote) - def io_term(self, fd0, conditions): - if terminatenow: - self.RequestDisconnection(self.path) - if (conditions & GObject.IO_HUP or conditions & GObject.IO_ERR): - lg.debug('Found HUP on fd0: %d, so terminate' % (fd0)) - self.RequestDisconnection(self.path) - return False - # Read from local (not used for loopback) - data = None - data = os.read(fd0, 1024) - lg.debug('io_term: fd0: %d len(data): %d' % (fd0,len(data))) - if not data: - # No Data == EOF - self.RequestDisconnection(self.path) - return True - #for character in data: - # print character, character.encode('hex') - try: - os.write(self.fd,data) - except Exception as e: - print '%s' % (e) - lg.error('%s' % (e)) - self.RequestDisconnection(self.path) - return True - if doterm: - os.write(fd0,'TTY> ') - return True - - @dbus.service.method('org.bluez.Profile1', - in_signature='o', - out_signature='') - def RequestDisconnection(self, path): - print('RequestDisconnection(%s)' % (path)) - lg.info('RequestDisconnection(%s)' % (path)) - if self.fd != -1: - lg.debug('closing fd: %s' % (self.fd)) - s = socket.fromfd(self.fd,socket.AF_INET,socket.SOCK_STREAM) - result = s.shutdown(socket.SHUT_RDWR) - lg.debug('After shutdown fd: %s %s %s' % (self.fd,' result:',result)) - result = os.close(self.fd) - lg.debug('After closing fd: %s %s %s' % (self.fd,' result:',result)) - self.fd = -1 - if self.io_id != -1: - lg.debug('remove id: %s' % (self.io_id)) - rmv = GObject.source_remove(self.io_id) - self.io_id = -1 - if self.io_id2 != -1: - lg.debug('closing id2: %s' % (self.io_id2)) - rmv = GObject.source_remove(self.io_id2) - lg.debug('removed id2: %s %s %s' % (self.io_id2,'result: ',rmv)) - self.io_id2 = -1 - if self.hup_id != -1: - lg.debug('closing hup_id: %s' % (self.hup_id)) - rmv = GObject.source_remove(self.hup_id) - lg.debug('removed id2: %s %s %s' % (self.hup_id,'result: ',rmv)) - self.hup_id = -1 - if self.hup_id2 != -1: - lg.debug('closing hup_id2: %s' % (self.hup_id2)) - rmv = GObject.source_remove(self.hup_id2) - lg.debug('removed id2: %s %s %s' % (self.hup_id2,'result: ',rmv)) - self.hup_id2 = -1 - if needpseudot: - if self.io_pty_slave != -1: - os.close(self.io_pty_slave) - self.io_pty_slave = -1 - if self.io_pty_master != -1: - try: - savefd = self.io_pty_master - self.io_pty_master = -1 - os.close(savefd) - except Exception as e: - lg.error("close(io_pty_master): Tried to close %d" % (savefd)) - lg.error('%s' % (e)) - - self.removeLink(self.exiting) - -def terminationHandler(mainloop): - lg.debug('SIGTERM: terminationHandler was called') - mainloop.quit() - - -if __name__ == '__main__': - import argparse - - doterm = False - TTY_GID = grp.getgrnam('tty').gr_gid - # Set up logging initially info and above - lg = flog(myscript,'daemon','info') - - parser = argparse.ArgumentParser( - description='BlueZ RFCOMM server.') - - parser.add_argument('-u', '--uuid', - metavar='uuid_or_shortcut', default='spp', - help='Service UUID to use. Can be either full UUID' - ' or one of the shortcuts: gn, panu, nap. Default: %(default)s.') - parser.add_argument('--pseudoterminal', action='store_true', - help='Create a pseudoterminal and put slave in /run/rfcomm' - ' Suitable for background operation.') - parser.add_argument('--loopback', action='store_true', - help='Echo data for testing (exclusive with pseudoterminal)') - parser.add_argument('--debug', - action='store_true', help='Verbose operation mode.') - parser.add_argument('--login', - action='store_true', help='Use RFCOMM to log into this device.') - opts = parser.parse_args() - - if opts.debug: - lg.setThreshold('debug') - - if opts.pseudoterminal and opts.loopback: - msg = 'Cannot have both pseudoterminal and loopback option' - print msg - lg.error(msg) - exit(1) - if not opts.pseudoterminal and not opts.loopback and not opts.login: - doterm = True - print "main: doterm is %s" % (str(doterm)) - - if opts.pseudoterminal or opts.login: - needpseudot = True - - - - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - bus = dbus.SystemBus() - - manager = dbus.Interface(bus.get_object('org.bluez', - '/org/bluez'), - 'org.bluez.ProfileManager1') - - mainloop = GObject.MainLoop() - - GLib.unix_signal_add(GLib.PRIORITY_HIGH,signal.SIGTERM,terminationHandler,mainloop) - mypidfile = dopidfile() - mypidfile.writePidFile() - - if opts.login: - # Need to create thead to exec logins. - rpipe,wpipe = os.pipe() - loginProcess = logins() - Profile.w = wpipe - lg.debug('Call threading next') - try: - StartLoginThread = threading.Thread(target=loginProcess.StartLogin,args=[rpipe,mainloop]) - except Exception as e: - lg.error('threading.Thread: StartLogin %s' % (e)) - try: - StartLoginThread.start() - except Exception as e: - lg.error('StartLogin.start: %s' % (e)) - - - profile_path = '/foo/bar/profile' - - SPP_opts = { - 'AutoConnect': True, - 'Role': 'server', - 'Name': 'SerialPort' - } - - print('Starting Serial Port Profile...') - lg.info('Starting Serial Port Profile...') - - profile = Profile(bus, profile_path) - - try: - manager.RegisterProfile(profile_path, opts.uuid, SPP_opts) - except dbus.exceptions.DBusException as inst: - print 'dbus exception:',inst._dbus_error_name - lg.error('dbus exception: %s',inst._dbus_error_name) - if inst._dbus_error_name == 'org.freedesktop.DBus.Error.AccessDenied': - print 'Try running as root' - exit(1) - - lg.debug('Completed Register Profile...') - dbus.mainloop.glib.threads_init() - lg.debug('Completed threads init... Now mainloop.run') - try: - mainloop.run() - except KeyboardInterrupt: - pass - except Exception as e: - lg.error('mainloop exception: %s' % (e)) - print '\nSerial Port Profile: ERROR Goodbye' - lg.error('Serial Port Profile: ERROR Goodbye') - data = struct.pack('i',-1) - os.write(wpipe,data) - mainloop.quit() - - lg.info('Serial Port Profile: Goodbye') - if opts.login: - data = struct.pack('ii',-1,-1) - os.write(wpipe,data) - mypidfile.rmPidFile() - mainloop.quit() diff --git a/recipes-connectivity/bluez/bluez5/run-ptest b/recipes-connectivity/bluez/bluez5/run-ptest deleted file mode 100644 index 21df00c..0000000 --- a/recipes-connectivity/bluez/bluez5/run-ptest +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh - -cd unit - -failed=0 -all=0 - -for f in test-*; do - "./$f" - case "$?" in - 0) - echo "PASS: $f" - all=$((all + 1)) - ;; - 77) - echo "SKIP: $f" - ;; - *) - echo "FAIL: $f" - failed=$((failed + 1)) - all=$((all + 1)) - ;; - esac -done - -if [ "$failed" -eq 0 ] ; then - echo "All $all tests passed" -else - echo "$failed of $all tests failed" -fi - diff --git a/recipes-connectivity/bluez/bluez5_%.bbappend b/recipes-connectivity/bluez/bluez5_%.bbappend deleted file mode 100644 index ab89900..0000000 --- a/recipes-connectivity/bluez/bluez5_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_OECONF += "--enable-deprecated --enable-experimental" - -RDEPENDS_${PN}-rfcomm += "python-pybluez" - diff --git a/recipes-connectivity/bluez/bluez5_5.47.bb b/recipes-connectivity/bluez/bluez5_5.47.bb deleted file mode 100644 index fb17add..0000000 --- a/recipes-connectivity/bluez/bluez5_5.47.bb +++ /dev/null @@ -1,55 +0,0 @@ -require bluez5.inc - -REQUIRED_DISTRO_FEATURES = "bluez5" - -SRC_URI[md5sum] = "783e15f65e70cdb8f721c659e140dd56" -SRC_URI[sha256sum] = "cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8" - -# noinst programs in Makefile.tools that are conditional on READLINE -# support -NOINST_TOOLS_READLINE ?= " \ - attrib/gatttool \ - tools/obex-client-tool \ - tools/obex-server-tool \ - tools/bluetooth-player \ - tools/obexctl \ - tools/btmgmt \ -" - -# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL -# support -NOINST_TOOLS_EXPERIMENTAL ?= " \ - emulator/btvirt \ - emulator/b1ee \ - emulator/hfp \ - tools/3dsp \ - tools/mgmt-tester \ - tools/gap-tester \ - tools/l2cap-tester \ - tools/sco-tester \ - tools/smp-tester \ - tools/hci-tester \ - tools/rfcomm-tester \ - tools/bdaddr \ - tools/avinfo \ - tools/avtest \ - tools/scotest \ - tools/amptest \ - tools/hwdb \ - tools/hcieventmask \ - tools/hcisecfilter \ - tools/btinfo \ - tools/btattach \ - tools/btsnoop \ - tools/btproxy \ - tools/btiotest \ - tools/mcaptest \ - tools/cltest \ - tools/oobtest \ - tools/seq2bseq \ - tools/ibeacon \ - tools/btgatt-client \ - tools/btgatt-server \ - tools/gatt-service \ - profiles/iap/iapd \ -" diff --git a/recipes-connectivity/bluez/python-gatt-server_1.0.bb b/recipes-connectivity/bluez/python-gatt-server_1.0.bb deleted file mode 100644 index 76069f6..0000000 --- a/recipes-connectivity/bluez/python-gatt-server_1.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -inherit allarch -HOMEPAGE = "https://github.com/Jumperr-labs/python-gatt-server" -SRCREV = "a39ef9773e9ba845f4303b1dfd2efddf24b02238" -PR = "r0" - -S = "${WORKDIR}/git" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c53d04442d1a229d62549856b7ec456a" - -SRC_URI = "git://github.com/Jumperr-labs/python-gatt-server.git;protocol=git" - -RDEPENDS_${PN} += "python-dbus python-pygobject" - -DBTEXEC = "${libexecdir}/bluetooth/" -DEST = "${D}${DBTEXEC}" - -FILES_${PN} = "${DBTEXEC}" - - -do_install_append() { - install -d ${DEST}/${PN} - install -m 0755 ${S}/*.py ${DEST}/${PN} -} diff --git a/recipes-connectivity/c-ares/c-ares_1.10.0.bb b/recipes-connectivity/c-ares/c-ares_1.10.0.bb deleted file mode 100644 index 0d1ef9d..0000000 --- a/recipes-connectivity/c-ares/c-ares_1.10.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "C library for asynchronous DNS requests (including name resolves)" -HOMEPAGE = "http://c-ares.haxx.se/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README;beginline=17;endline=23;md5=d08205a43bc63c12cf394ac1d2cce7c3" - -PR = "r0" - -SRC_URI = "http://c-ares.haxx.se/download/c-ares-${PV}.tar.gz" - -SRC_URI[md5sum] = "1196067641411a75d3cbebe074fd36d8" -SRC_URI[sha256sum] = "3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db" - -inherit autotools diff --git a/recipes-connectivity/lldpd/lldpd/lldpd.default b/recipes-connectivity/lldpd/lldpd/lldpd.default deleted file mode 100644 index b33facf..0000000 --- a/recipes-connectivity/lldpd/lldpd/lldpd.default +++ /dev/null @@ -1,3 +0,0 @@ -ENABLED="no" -# Uncomment to start SNMP subagent and enable CDP, SONMP and EDP protocol -#DAEMON_ARGS="-x -c -s -e" diff --git a/recipes-connectivity/lldpd/lldpd/lldpd.init.d b/recipes-connectivity/lldpd/lldpd/lldpd.init.d deleted file mode 100644 index d071e1b..0000000 --- a/recipes-connectivity/lldpd/lldpd/lldpd.init.d +++ /dev/null @@ -1,129 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: lldpd -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $network $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: LLDP daemon -# Description: lldpd is a 802.1AB implementation, a L2 network -# discovery protocol. It also supports CDP, EDP and -# various other protocols. -### END INIT INFO - -# Do NOT "set -e" - -log_daemon_msg() { - echo $* -} - -log_end_msg() { - if [ $1 -eq 0 ]; then - success $* - else - failure $* - fi -} - -log_failure_msg() { - echo $* -} - -log_success_msg() { - echo $* -} - - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="LLDP daemon" -NAME=lldpd -DAEMON=/usr/sbin/$NAME -DAEMON_ARGS="" -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -CHROOT=/var/run/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME -[ "$ENABLED" == "yes" ] || exit 0 - -# LSB log_* functions -. /etc/init.d/functions - -do_start() -{ - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 -} - -do_stop() -{ - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - rm -f $PIDFILE - return "$RETVAL" -} - -do_reload() { - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - reload) - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart|force-reload) - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - status) - status_of_proc $DAEMON $NAME -p $PIDFILE && exit 0 || exit $? - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 - exit 3 - ;; -esac - -: diff --git a/recipes-connectivity/lldpd/lldpd_%.bbappend b/recipes-connectivity/lldpd/lldpd_%.bbappend deleted file mode 100644 index 72d991c..0000000 --- a/recipes-connectivity/lldpd/lldpd_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/recipes-connectivity/mosquitto/mosquitto/config_mk.patch b/recipes-connectivity/mosquitto/mosquitto/config_mk.patch deleted file mode 100644 index 437022c..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/config_mk.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Naur old/config.mk new/config.mk ---- old/config.mk 2017-04-17 14:33:32.504351936 -0500 -+++ new/config.mk 2017-04-17 14:34:27.061557282 -0500 -@@ -83,9 +83,9 @@ - # Strip executables and shared libraries on install. - WITH_STRIP:=no - - # Build static libraries --WITH_STATIC_LIBRARIES:=no -+WITH_STATIC_LIBRARIES:=yes - - # Build with async dns lookup support for bridges (temporary). Requires glibc. - #WITH_ADNS:=yes - -@@ -272,7 +272,7 @@ - endif - - INSTALL?=install --prefix=/usr/local -+prefix=/usr - mandir=${prefix}/share/man - localedir=${prefix}/share/locale - STRIP?=strip - - - - diff --git a/recipes-connectivity/mosquitto/mosquitto/mosquitto.conf b/recipes-connectivity/mosquitto/mosquitto/mosquitto.conf deleted file mode 100644 index 25821b8..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/mosquitto.conf +++ /dev/null @@ -1,812 +0,0 @@ -# Config file for mosquitto -# -# See mosquitto.conf(5) for more information. -# -# Default values are shown, uncomment to change. -# -# Use the # character to indicate a comment, but only if it is the -# very first character on the line. - -# ================================================================= -# General configuration -# ================================================================= - -# Time in seconds to wait before resending an outgoing QoS=1 or -# QoS=2 message. -#retry_interval 20 - -# Time in seconds between updates of the $SYS tree. -# Set to 0 to disable the publishing of the $SYS tree. -#sys_interval 10 - -# Time in seconds between cleaning the internal message store of -# unreferenced messages. Lower values will result in lower memory -# usage but more processor time, higher values will have the -# opposite effect. -# Setting a value of 0 means the unreferenced messages will be -# disposed of as quickly as possible. -#store_clean_interval 10 - -# Write process id to a file. Default is a blank string which means -# a pid file shouldn't be written. -# This should be set to /var/run/mosquitto.pid if mosquitto is -# being run automatically on boot with an init script and -# start-stop-daemon or similar. -pid_file /var/run/mosquitto.pid - -# When run as root, drop privileges to this user and its primary -# group. -# Leave blank to stay as root, but this is not recommended. -# If run as a non-root user, this setting has no effect. -# Note that on Windows this has no effect and so mosquitto should -# be started by the user you wish it to run as. -user root - -# The maximum number of QoS 1 and 2 messages currently inflight per -# client. -# This includes messages that are partway through handshakes and -# those that are being retried. Defaults to 20. Set to 0 for no -# maximum. Setting to 1 will guarantee in-order delivery of QoS 1 -# and 2 messages. -#max_inflight_messages 20 - -# The maximum number of QoS 1 and 2 messages to hold in a queue -# above those that are currently in-flight. Defaults to 100. Set -# to 0 for no maximum (not recommended). -# See also queue_qos0_messages. -#max_queued_messages 100 - -# Set to true to queue messages with QoS 0 when a persistent client is -# disconnected. These messages are included in the limit imposed by -# max_queued_messages. -# Defaults to false. -# This is a non-standard option for the MQTT v3.1 spec but is allowed in -# v3.1.1. -#queue_qos0_messages false - -# This option sets the maximum publish payload size that the broker will allow. -# Received messages that exceed this size will not be accepted by the broker. -# The default value is 0, which means that all valid MQTT messages are -# accepted. MQTT imposes a maximum payload size of 268435455 bytes. -#message_size_limit 0 - -# This option controls whether a client is allowed to connect with a zero -# length client id or not. This option only affects clients using MQTT v3.1.1 -# and later. If set to false, clients connecting with a zero length client id -# are disconnected. If set to true, clients will be allocated a client id by -# the broker. This means it is only useful for clients with clean session set -# to true. -#allow_zero_length_clientid true - -# If allow_zero_length_clientid is true, this option allows you to set a prefix -# to automatically generated client ids to aid visibility in logs. -#auto_id_prefix - -# This option allows persistent clients (those with clean session set to false) -# to be removed if they do not reconnect within a certain time frame. -# -# This is a non-standard option in MQTT V3.1 but allowed in MQTT v3.1.1. -# -# Badly designed clients may set clean session to false whilst using a randomly -# generated client id. This leads to persistent clients that will never -# reconnect. This option allows these clients to be removed. -# -# The expiration period should be an integer followed by one of h d w m y for -# hour, day, week, month and year respectively. For example -# -# persistent_client_expiration 2m -# persistent_client_expiration 14d -# persistent_client_expiration 1y -# -# The default if not set is to never expire persistent clients. -#persistent_client_expiration - -# If a client is subscribed to multiple subscriptions that overlap, e.g. foo/# -# and foo/+/baz , then MQTT expects that when the broker receives a message on -# a topic that matches both subscriptions, such as foo/bar/baz, then the client -# should only receive the message once. -# Mosquitto keeps track of which clients a message has been sent to in order to -# meet this requirement. The allow_duplicate_messages option allows this -# behaviour to be disabled, which may be useful if you have a large number of -# clients subscribed to the same set of topics and are very concerned about -# minimising memory usage. -# It can be safely set to true if you know in advance that your clients will -# never have overlapping subscriptions, otherwise your clients must be able to -# correctly deal with duplicate messages even when then have QoS=2. -#allow_duplicate_messages false - -# The MQTT specification requires that the QoS of a message delivered to a -# subscriber is never upgraded to match the QoS of the subscription. Enabling -# this option changes this behaviour. If upgrade_outgoing_qos is set true, -# messages sent to a subscriber will always match the QoS of its subscription. -# This is a non-standard option explicitly disallowed by the spec. -#upgrade_outgoing_qos false - -# ================================================================= -# Default listener -# ================================================================= - -# IP address/hostname to bind the default listener to. If not -# given, the default listener will not be bound to a specific -# address and so will be accessible to all network interfaces. -# bind_address ip-address/host name -bind_address 127.0.0.1 - -# Port to use for the default listener. -port 1883 - -# The maximum number of client connections to allow. This is -# a per listener setting. -# Default is -1, which means unlimited connections. -# Note that other process limits mean that unlimited connections -# are not really possible. Typically the default maximum number of -# connections possible is around 1024. -#max_connections -1 - -# Choose the protocol to use when listening. -# This can be either mqtt or websockets. -# Websockets support is currently disabled by default at compile time. -# Certificate based TLS may be used with websockets, except that -# only the cafile, certfile, keyfile and ciphers options are supported. -protocol mqtt - -# When a listener is using the websockets protocol, it is possible to serve -# http data as well. Set http_dir to a directory which contains the files you -# wish to serve. If this option is not specified, then no normal http -# connections will be possible. -#http_dir - -# Set use_username_as_clientid to true to replace the clientid that a client -# connected with with its username. This allows authentication to be tied to -# the clientid, which means that it is possible to prevent one client -# disconnecting another by using the same clientid. -# If a client connects with no username it will be disconnected as not -# authorised when this option is set to true. -# Do not use in conjunction with clientid_prefixes. -# See also use_identity_as_username. -#use_username_as_clientid - -# ----------------------------------------------------------------- -# Certificate based SSL/TLS support -# ----------------------------------------------------------------- -# The following options can be used to enable SSL/TLS support for -# this listener. Note that the recommended port for MQTT over TLS -# is 8883, but this must be set manually. -# -# See also the mosquitto-tls man page. - -# At least one of cafile or capath must be defined. They both -# define methods of accessing the PEM encoded Certificate -# Authority certificates that have signed your server certificate -# and that you wish to trust. -# cafile defines the path to a file containing the CA certificates. -# capath defines a directory that will be searched for files -# containing the CA certificates. For capath to work correctly, the -# certificate files must have ".crt" as the file ending and you must run -# "c_rehash <path to capath>" each time you add/remove a certificate. -#cafile -#capath - -# Path to the PEM encoded server certificate. -#certfile - -# Path to the PEM encoded keyfile. -#keyfile - -# This option defines the version of the TLS protocol to use for this listener. -# The default value allows v1.2, v1.1 and v1.0, if they are all supported by -# the version of openssl that the broker was compiled against. For openssl >= -# 1.0.1 the valid values are tlsv1.2 tlsv1.1 and tlsv1. For openssl < 1.0.1 the -# valid values are tlsv1. -#tls_version - -# By default a TLS enabled listener will operate in a similar fashion to a -# https enabled web server, in that the server has a certificate signed by a CA -# and the client will verify that it is a trusted certificate. The overall aim -# is encryption of the network traffic. By setting require_certificate to true, -# the client must provide a valid certificate in order for the network -# connection to proceed. This allows access to the broker to be controlled -# outside of the mechanisms provided by MQTT. -#require_certificate false - -# If require_certificate is true, you may set use_identity_as_username to true -# to use the CN value from the client certificate as a username. If this is -# true, the password_file option will not be used for this listener. -#use_identity_as_username false - -# If you have require_certificate set to true, you can create a certificate -# revocation list file to revoke access to particular client certificates. If -# you have done this, use crlfile to point to the PEM encoded revocation file. -#crlfile - -# If you wish to control which encryption ciphers are used, use the ciphers -# option. The list of available ciphers can be optained using the "openssl -# ciphers" command and should be provided in the same format as the output of -# that command. -# If unset defaults to DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH -#ciphers DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH - -# ----------------------------------------------------------------- -# Pre-shared-key based SSL/TLS support -# ----------------------------------------------------------------- -# The following options can be used to enable PSK based SSL/TLS support for -# this listener. Note that the recommended port for MQTT over TLS is 8883, but -# this must be set manually. -# -# See also the mosquitto-tls man page and the "Certificate based SSL/TLS -# support" section. Only one of certificate or PSK encryption support can be -# enabled for any listener. - -# The psk_hint option enables pre-shared-key support for this listener and also -# acts as an identifier for this listener. The hint is sent to clients and may -# be used locally to aid authentication. The hint is a free form string that -# doesn't have much meaning in itself, so feel free to be creative. -# If this option is provided, see psk_file to define the pre-shared keys to be -# used or create a security plugin to handle them. -#psk_hint - -# Set use_identity_as_username to have the psk identity sent by the client used -# as its username. Authentication will be carried out using the PSK rather than -# the MQTT username/password and so password_file will not be used for this -# listener. -#use_identity_as_username false - -# When using PSK, the encryption ciphers used will be chosen from the list of -# available PSK ciphers. If you want to control which ciphers are available, -# use the "ciphers" option. The list of available ciphers can be optained -# using the "openssl ciphers" command and should be provided in the same format -# as the output of that command. -#ciphers - -# ================================================================= -# Extra listeners -# ================================================================= - -# Listen on a port/ip address combination. By using this variable -# multiple times, mosquitto can listen on more than one port. If -# this variable is used and neither bind_address nor port given, -# then the default listener will not be started. -# The port number to listen on must be given. Optionally, an ip -# address or host name may be supplied as a second argument. In -# this case, mosquitto will attempt to bind the listener to that -# address and so restrict access to the associated network and -# interface. By default, mosquitto will listen on all interfaces. -# listener port-number [ip address/host name] -#listener - -# The maximum number of client connections to allow. This is -# a per listener setting. -# Default is -1, which means unlimited connections. -# Note that other process limits mean that unlimited connections -# are not really possible. Typically the default maximum number of -# connections possible is around 1024. -#max_connections -1 - -# The listener can be restricted to operating within a topic hierarchy using -# the mount_point option. This is achieved be prefixing the mount_point string -# to all topics for any clients connected to this listener. This prefixing only -# happens internally to the broker; the client will not see the prefix. -#mount_point - -# Choose the protocol to use when listening. -# This can be either mqtt or websockets. -# Certificate based TLS may be used with websockets, except that only the -# cafile, certfile, keyfile and ciphers options are supported. -protocol mqtt - -# When a listener is using the websockets protocol, it is possible to serve -# http data as well. Set http_dir to a directory which contains the files you -# wish to serve. If this option is not specified, then no normal http -# connections will be possible. -#http_dir - -# Set use_username_as_clientid to true to replace the clientid that a client -# connected with with its username. This allows authentication to be tied to -# the clientid, which means that it is possible to prevent one client -# disconnecting another by using the same clientid. -# If a client connects with no username it will be disconnected as not -# authorised when this option is set to true. -# Do not use in conjunction with clientid_prefixes. -# See also use_identity_as_username. -#use_username_as_clientid - -# ----------------------------------------------------------------- -# Certificate based SSL/TLS support -# ----------------------------------------------------------------- -# The following options can be used to enable certificate based SSL/TLS support -# for this listener. Note that the recommended port for MQTT over TLS is 8883, -# but this must be set manually. -# -# See also the mosquitto-tls man page and the "Pre-shared-key based SSL/TLS -# support" section. Only one of certificate or PSK encryption support can be -# enabled for any listener. - -# At least one of cafile or capath must be defined to enable certificate based -# TLS encryption. They both define methods of accessing the PEM encoded -# Certificate Authority certificates that have signed your server certificate -# and that you wish to trust. -# cafile defines the path to a file containing the CA certificates. -# capath defines a directory that will be searched for files -# containing the CA certificates. For capath to work correctly, the -# certificate files must have ".crt" as the file ending and you must run -# "c_rehash <path to capath>" each time you add/remove a certificate. -#cafile -#capath - -# Path to the PEM encoded server certificate. -#certfile - -# Path to the PEM encoded keyfile. -#keyfile - -# By default an TLS enabled listener will operate in a similar fashion to a -# https enabled web server, in that the server has a certificate signed by a CA -# and the client will verify that it is a trusted certificate. The overall aim -# is encryption of the network traffic. By setting require_certificate to true, -# the client must provide a valid certificate in order for the network -# connection to proceed. This allows access to the broker to be controlled -# outside of the mechanisms provided by MQTT. -#require_certificate false - -# If require_certificate is true, you may set use_identity_as_username to true -# to use the CN value from the client certificate as a username. If this is -# true, the password_file option will not be used for this listener. -#use_identity_as_username false - -# If you have require_certificate set to true, you can create a certificate -# revocation list file to revoke access to particular client certificates. If -# you have done this, use crlfile to point to the PEM encoded revocation file. -#crlfile - -# If you wish to control which encryption ciphers are used, use the ciphers -# option. The list of available ciphers can be optained using the "openssl -# ciphers" command and should be provided in the same format as the output of -# that command. -#ciphers - -# ----------------------------------------------------------------- -# Pre-shared-key based SSL/TLS support -# ----------------------------------------------------------------- -# The following options can be used to enable PSK based SSL/TLS support for -# this listener. Note that the recommended port for MQTT over TLS is 8883, but -# this must be set manually. -# -# See also the mosquitto-tls man page and the "Certificate based SSL/TLS -# support" section. Only one of certificate or PSK encryption support can be -# enabled for any listener. - -# The psk_hint option enables pre-shared-key support for this listener and also -# acts as an identifier for this listener. The hint is sent to clients and may -# be used locally to aid authentication. The hint is a free form string that -# doesn't have much meaning in itself, so feel free to be creative. -# If this option is provided, see psk_file to define the pre-shared keys to be -# used or create a security plugin to handle them. -#psk_hint - -# Set use_identity_as_username to have the psk identity sent by the client used -# as its username. Authentication will be carried out using the PSK rather than -# the MQTT username/password and so password_file will not be used for this -# listener. -#use_identity_as_username false - -# When using PSK, the encryption ciphers used will be chosen from the list of -# available PSK ciphers. If you want to control which ciphers are available, -# use the "ciphers" option. The list of available ciphers can be optained -# using the "openssl ciphers" command and should be provided in the same format -# as the output of that command. -#ciphers - -# ================================================================= -# Persistence -# ================================================================= - -# If persistence is enabled, save the in-memory database to disk -# every autosave_interval seconds. If set to 0, the persistence -# database will only be written when mosquitto exits. See also -# autosave_on_changes. -# Note that writing of the persistence database can be forced by -# sending mosquitto a SIGUSR1 signal. -#autosave_interval 1800 - -# If true, mosquitto will count the number of subscription changes, retained -# messages received and queued messages and if the total exceeds -# autosave_interval then the in-memory database will be saved to disk. -# If false, mosquitto will save the in-memory database to disk by treating -# autosave_interval as a time in seconds. -#autosave_on_changes false - -# Save persistent message data to disk (true/false). -# This saves information about all messages, including -# subscriptions, currently in-flight messages and retained -# messages. -# retained_persistence is a synonym for this option. -#persistence false - -# The filename to use for the persistent database, not including -# the path. -#persistence_file mosquitto.db - -# Location for persistent database. Must include trailing / -# Default is an empty string (current directory). -# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or -# similar. -#persistence_location - -# ================================================================= -# Logging -# ================================================================= - -# Places to log to. Use multiple log_dest lines for multiple -# logging destinations. -# Possible destinations are: stdout stderr syslog topic file -# -# stdout and stderr log to the console on the named output. -# -# syslog uses the userspace syslog facility which usually ends up -# in /var/log/messages or similar. -# -# topic logs to the broker topic '$SYS/broker/log/<severity>', -# where severity is one of D, E, W, N, I, M which are debug, error, -# warning, notice, information and message. Message type severity is used by -# the subscribe/unsubscribe log_types and publishes log messages to -# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe. -# -# The file destination requires an additional parameter which is the file to be -# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be -# closed and reopened when the broker receives a HUP signal. Only a single file -# destination may be configured. -# -# Note that if the broker is running as a Windows service it will default to -# "log_dest none" and neither stdout nor stderr logging is available. -# Use "log_dest none" if you wish to disable logging. -log_dest file /var/log/mosquitto.log - -# If using syslog logging (not on Windows), messages will be logged to the -# "daemon" facility by default. Use the log_facility option to choose which of -# local0 to local7 to log to instead. The option value should be an integer -# value, e.g. "log_facility 5" to use local5. -#log_facility - -# Types of messages to log. Use multiple log_type lines for logging -# multiple types of messages. -# Possible types are: debug, error, warning, notice, information, -# none, subscribe, unsubscribe, websockets, all. -# Note that debug type messages are for decoding the incoming/outgoing -# network packets. They are not logged in "topics". -log_type error -log_type warning -log_type notice -log_type information - -# If set to true, client connection and disconnection messages will be included -# in the log. -connection_messages true - -# If set to true, add a timestamp value to each log message. -log_timestamp true - -# ================================================================= -# Security -# ================================================================= - -# If set, only clients that have a matching prefix on their -# clientid will be allowed to connect to the broker. By default, -# all clients may connect. -# For example, setting "secure-" here would mean a client "secure- -# client" could connect but another with clientid "mqtt" couldn't. -#clientid_prefixes - -# Boolean value that determines whether clients that connect -# without providing a username are allowed to connect. If set to -# false then a password file should be created (see the -# password_file option) to control authenticated client access. -# Defaults to true. -#allow_anonymous true - -# In addition to the clientid_prefixes, allow_anonymous and TLS -# authentication options, username based authentication is also -# possible. The default support is described in "Default -# authentication and topic access control" below. The auth_plugin -# allows another authentication method to be used. -# Specify the path to the loadable plugin and see the -# "Authentication and topic access plugin options" section below. -#auth_plugin - -# ----------------------------------------------------------------- -# Default authentication and topic access control -# ----------------------------------------------------------------- - -# Control access to the broker using a password file. This file can be -# generated using the mosquitto_passwd utility. If TLS support is not compiled -# into mosquitto (it is recommended that TLS support should be included) then -# plain text passwords are used, in which case the file should be a text file -# with lines in the format: -# username:password -# The password (and colon) may be omitted if desired, although this -# offers very little in the way of security. -# -# See the TLS client require_certificate and use_identity_as_username options -# for alternative authentication options. -#password_file - -# Access may also be controlled using a pre-shared-key file. This requires -# TLS-PSK support and a listener configured to use it. The file should be text -# lines in the format: -# identity:key -# The key should be in hexadecimal format without a leading "0x". -#psk_file - -# Control access to topics on the broker using an access control list -# file. If this parameter is defined then only the topics listed will -# have access. -# If the first character of a line of the ACL file is a # it is treated as a -# comment. -# Topic access is added with lines of the format: -# -# topic [read|write|readwrite] <topic> -# -# The access type is controlled using "read", "write" or "readwrite". This -# parameter is optional (unless <topic> contains a space character) - if not -# given then the access is read/write. <topic> can contain the + or # -# wildcards as in subscriptions. -# -# The first set of topics are applied to anonymous clients, assuming -# allow_anonymous is true. User specific topic ACLs are added after a -# user line as follows: -# -# user <username> -# -# The username referred to here is the same as in password_file. It is -# not the clientid. -# -# -# If is also possible to define ACLs based on pattern substitution within the -# topic. The patterns available for substition are: -# -# %c to match the client id of the client -# %u to match the username of the client -# -# The substitution pattern must be the only text for that level of hierarchy. -# -# The form is the same as for the topic keyword, but using pattern as the -# keyword. -# Pattern ACLs apply to all users even if the "user" keyword has previously -# been given. -# -# If using bridges with usernames and ACLs, connection messages can be allowed -# with the following pattern: -# pattern write $SYS/broker/connection/%c/state -# -# pattern [read|write|readwrite] <topic> -# -# Example: -# -# pattern write sensor/%u/data -# -#acl_file - -# ----------------------------------------------------------------- -# Authentication and topic access plugin options -# ----------------------------------------------------------------- - -# If the auth_plugin option above is used, define options to pass to the -# plugin here as described by the plugin instructions. All options named -# using the format auth_opt_* will be passed to the plugin, for example: -# -# auth_opt_db_host -# auth_opt_db_port -# auth_opt_db_username -# auth_opt_db_password - - -# ================================================================= -# Bridges -# ================================================================= - -# A bridge is a way of connecting multiple MQTT brokers together. -# Create a new bridge using the "connection" option as described below. Set -# options for the bridges using the remaining parameters. You must specify the -# address and at least one topic to subscribe to. -# Each connection must have a unique name. -# The address line may have multiple host address and ports specified. See -# below in the round_robin description for more details on bridge behaviour if -# multiple addresses are used. -# The direction that the topic will be shared can be chosen by -# specifying out, in or both, where the default value is out. -# The QoS level of the bridged communication can be specified with the next -# topic option. The default QoS level is 0, to change the QoS the topic -# direction must also be given. -# The local and remote prefix options allow a topic to be remapped when it is -# bridged to/from the remote broker. This provides the ability to place a topic -# tree in an appropriate location. -# For more details see the mosquitto.conf man page. -# Multiple topics can be specified per connection, but be careful -# not to create any loops. -# If you are using bridges with cleansession set to false (the default), then -# you may get unexpected behaviour from incoming topics if you change what -# topics you are subscribing to. This is because the remote broker keeps the -# subscription for the old topic. If you have this problem, connect your bridge -# with cleansession set to true, then reconnect with cleansession set to false -# as normal. -#connection <name> -#address <host>[:<port>] [<host>[:<port>]] -#topic <topic> [[[out | in | both] qos-level] local-prefix remote-prefix] - -# Set the version of the MQTT protocol to use with for this bridge. Can be one -# of mqttv31 or mqttv311. Defaults to mqttv31. -#bridge_protocol_version mqttv31 - -# If a bridge has topics that have "out" direction, the default behaviour is to -# send an unsubscribe request to the remote broker on that topic. This means -# that changing a topic direction from "in" to "out" will not keep receiving -# incoming messages. Sending these unsubscribe requests is not always -# desirable, setting bridge_attempt_unsubscribe to false will disable sending -# the unsubscribe request. -#bridge_attempt_unsubscribe true - -# If the bridge has more than one address given in the address/addresses -# configuration, the round_robin option defines the behaviour of the bridge on -# a failure of the bridge connection. If round_robin is false, the default -# value, then the first address is treated as the main bridge connection. If -# the connection fails, the other secondary addresses will be attempted in -# turn. Whilst connected to a secondary bridge, the bridge will periodically -# attempt to reconnect to the main bridge until successful. -# If round_robin is true, then all addresses are treated as equals. If a -# connection fails, the next address will be tried and if successful will -# remain connected until it fails -#round_robin false - -# Set the client id to use on the remote end of this bridge connection. If not -# defined, this defaults to 'name.hostname' where name is the connection name -# and hostname is the hostname of this computer. -# This replaces the old "clientid" option to avoid confusion. "clientid" -# remains valid for the time being. -#remote_clientid - -# Set the clientid to use on the local broker. If not defined, this defaults to -# 'local.<clientid>'. If you are bridging a broker to itself, it is important -# that local_clientid and clientid do not match. -#local_clientid - -# Set the clean session variable for this bridge. -# When set to true, when the bridge disconnects for any reason, all -# messages and subscriptions will be cleaned up on the remote -# broker. Note that with cleansession set to true, there may be a -# significant amount of retained messages sent when the bridge -# reconnects after losing its connection. -# When set to false, the subscriptions and messages are kept on the -# remote broker, and delivered when the bridge reconnects. -#cleansession false - -# If set to true, publish notification messages to the local and remote brokers -# giving information about the state of the bridge connection. Retained -# messages are published to the topic $SYS/broker/connection/<clientid>/state -# unless the notification_topic option is used. -# If the message is 1 then the connection is active, or 0 if the connection has -# failed. -#notifications true - -# Choose the topic on which notification messages for this bridge are -# published. If not set, messages are published on the topic -# $SYS/broker/connection/<clientid>/state -#notification_topic - -# Set the keepalive interval for this bridge connection, in -# seconds. -#keepalive_interval 60 - -# Set the start type of the bridge. This controls how the bridge starts and -# can be one of three types: automatic, lazy and once. Note that RSMB provides -# a fourth start type "manual" which isn't currently supported by mosquitto. -# -# "automatic" is the default start type and means that the bridge connection -# will be started automatically when the broker starts and also restarted -# after a short delay (30 seconds) if the connection fails. -# -# Bridges using the "lazy" start type will be started automatically when the -# number of queued messages exceeds the number set with the "threshold" -# parameter. It will be stopped automatically after the time set by the -# "idle_timeout" parameter. Use this start type if you wish the connection to -# only be active when it is needed. -# -# A bridge using the "once" start type will be started automatically when the -# broker starts but will not be restarted if the connection fails. -#start_type automatic - -# Set the amount of time a bridge using the automatic start type will wait -# until attempting to reconnect. Defaults to 30 seconds. -#restart_timeout 30 - -# Set the amount of time a bridge using the lazy start type must be idle before -# it will be stopped. Defaults to 60 seconds. -#idle_timeout 60 - -# Set the number of messages that need to be queued for a bridge with lazy -# start type to be restarted. Defaults to 10 messages. -# Must be less than max_queued_messages. -#threshold 10 - -# If try_private is set to true, the bridge will attempt to indicate to the -# remote broker that it is a bridge not an ordinary client. If successful, this -# means that loop detection will be more effective and that retained messages -# will be propagated correctly. Not all brokers support this feature so it may -# be necessary to set try_private to false if your bridge does not connect -# properly. -#try_private true - -# Set the username to use when connecting to a broker that requires -# authentication. -# This replaces the old "username" option to avoid confusion. "username" -# remains valid for the time being. -#remote_username - -# Set the password to use when connecting to a broker that requires -# authentication. This option is only used if remote_username is also set. -# This replaces the old "password" option to avoid confusion. "password" -# remains valid for the time being. -#remote_password - -# ----------------------------------------------------------------- -# Certificate based SSL/TLS support -# ----------------------------------------------------------------- -# Either bridge_cafile or bridge_capath must be defined to enable TLS support -# for this bridge. -# bridge_cafile defines the path to a file containing the -# Certificate Authority certificates that have signed the remote broker -# certificate. -# bridge_capath defines a directory that will be searched for files containing -# the CA certificates. For bridge_capath to work correctly, the certificate -# files must have ".crt" as the file ending and you must run "c_rehash <path to -# capath>" each time you add/remove a certificate. -#bridge_cafile -#bridge_capath - -# Path to the PEM encoded client certificate, if required by the remote broker. -#bridge_certfile - -# Path to the PEM encoded client private key, if required by the remote broker. -#bridge_keyfile - -# When using certificate based encryption, bridge_insecure disables -# verification of the server hostname in the server certificate. This can be -# useful when testing initial server configurations, but makes it possible for -# a malicious third party to impersonate your server through DNS spoofing, for -# example. Use this option in testing only. If you need to resort to using this -# option in a production environment, your setup is at fault and there is no -# point using encryption. -#bridge_insecure false - -# ----------------------------------------------------------------- -# PSK based SSL/TLS support -# ----------------------------------------------------------------- -# Pre-shared-key encryption provides an alternative to certificate based -# encryption. A bridge can be configured to use PSK with the bridge_identity -# and bridge_psk options. These are the client PSK identity, and pre-shared-key -# in hexadecimal format with no "0x". Only one of certificate and PSK based -# encryption can be used on one -# bridge at once. -#bridge_identity -#bridge_psk - - -# ================================================================= -# External config files -# ================================================================= - -# External configuration files may be included by using the -# include_dir option. This defines a directory that will be searched -# for config files. All files that end in '.conf' will be loaded as -# a configuration file. It is best to have this as the last option -# in the main file. This option will only be processed from the main -# configuration file. The directory specified must not contain the -# main configuration file. -#include_dir - -# ================================================================= -# rsmb options - unlikely to ever be supported -# ================================================================= - -#ffdc_output -#max_log_entries -#trace_level -#trace_output diff --git a/recipes-connectivity/mosquitto/mosquitto/mosquitto.default b/recipes-connectivity/mosquitto/mosquitto/mosquitto.default deleted file mode 100644 index be7dcd5..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/mosquitto.default +++ /dev/null @@ -1,2 +0,0 @@ -# set to "yes" or "no" to control starting on boot -ENABLED="yes" diff --git a/recipes-connectivity/mosquitto/mosquitto/mosquitto.init b/recipes-connectivity/mosquitto/mosquitto/mosquitto.init deleted file mode 100755 index 7b3e634..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/mosquitto.init +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# mosquitto Starts and stops Mosquitto -# mosquitto (MQTT 3.5 broker) -# -# chkconfig: - 58 74 -# description: mosquitto is a MQTT 3.5 broker. \ -# http://mosquitto.org/ - -### BEGIN INIT INFO -# Provides: mosquitto -# Required-Start: $network $local_fs -# Required-Stop: $network $local_fs -# Should-Start: $syslog $named -# Should-Stop: $syslog $named -# Short-Description: start and stop mosquitto -# Description: mosquitto is a MQTT 3.5 broker. -### END INIT INFO - -PIDFILE=/var/run/mosquitto.pid -DAEMON=/usr/sbin/mosquitto -ENABLED="yes" - -[ -f /etc/default/mosquitto ] && . /etc/default/mosquitto - -start() { - echo "Starting Mosquitto..." - start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- -d -c /etc/mosquitto/mosquitto.conf -} - -stop() { - echo "Stopping Mosquitto..." - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE -} - -[ "$ENABLED" = "yes" ] || exit - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - exit 2 -esac - diff --git a/recipes-connectivity/mosquitto/mosquitto/mosquitto.logrotate.conf b/recipes-connectivity/mosquitto/mosquitto/mosquitto.logrotate.conf deleted file mode 100644 index 5f4779b..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/mosquitto.logrotate.conf +++ /dev/null @@ -1,7 +0,0 @@ -/var/log/mosquitto.log { - size 512k - rotate 4 - compress - copytruncate - missingok -} diff --git a/recipes-connectivity/mosquitto/mosquitto/nostrip.patch b/recipes-connectivity/mosquitto/mosquitto/nostrip.patch deleted file mode 100644 index b36be35..0000000 --- a/recipes-connectivity/mosquitto/mosquitto/nostrip.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: mosquitto-1.4/client/Makefile -=================================================================== ---- mosquitto-1.4.orig/client/Makefile 2015-02-17 19:44:09.000000000 -0600 -+++ mosquitto-1.4/client/Makefile 2015-03-25 11:34:01.388614891 -0500 -@@ -24,8 +24,8 @@ - - install : all - $(INSTALL) -d ${DESTDIR}$(prefix)/bin -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub -+ $(INSTALL) mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub -+ $(INSTALL) mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub - - uninstall : - -rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub -Index: mosquitto-1.4/lib/Makefile -=================================================================== ---- mosquitto-1.4.orig/lib/Makefile 2015-02-17 19:44:09.000000000 -0600 -+++ mosquitto-1.4/lib/Makefile 2015-03-25 11:34:01.388614891 -0500 -@@ -25,7 +25,7 @@ - - install : all - $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION} -+ $(INSTALL) libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION} - ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so - $(INSTALL) -d ${DESTDIR}${prefix}/include/ - $(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h -Index: mosquitto-1.4/src/Makefile -=================================================================== ---- mosquitto-1.4.orig/src/Makefile 2015-02-17 19:44:09.000000000 -0600 -+++ mosquitto-1.4/src/Makefile 2015-03-25 11:34:01.388614891 -0500 -@@ -103,10 +103,10 @@ - - install : all - $(INSTALL) -d ${DESTDIR}$(prefix)/sbin -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto -+ $(INSTALL) mosquitto ${DESTDIR}${prefix}/sbin/mosquitto - $(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h - ifeq ($(WITH_TLS),yes) -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd -+ $(INSTALL) mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd - endif - - uninstall : -Index: mosquitto-1.4/lib/cpp/Makefile -=================================================================== ---- mosquitto-1.4.orig/lib/cpp/Makefile 2015-02-17 19:44:09.000000000 -0600 -+++ mosquitto-1.4/lib/cpp/Makefile 2015-03-25 11:34:25.984217051 -0500 -@@ -10,7 +10,7 @@ - - install : all - $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ -- $(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION} -+ $(INSTALL) libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION} - ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so - $(INSTALL) -d ${DESTDIR}${prefix}/include/ - $(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h diff --git a/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb b/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb deleted file mode 100644 index 947dcdf..0000000 --- a/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb +++ /dev/null @@ -1,81 +0,0 @@ -# This recipe was a merger of the Multitech Daisy 3.5 Recipe with the -# reciped found at: -# http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-iot-middleware/plain/recipes-connectivity/mosquitto/mosquitto_1.4.10.bb -inherit autotools-brokensep -SUMMARY = "Open source MQTT v3.5 implemention" -DESCRIPTION = "Mosquitto is an open source (BSD licensed) message broker that implements the MQ Telemetry Transport protocol version 3.5. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. " -HOMEPAGE = "http://mosquitto.org/" -SECTION = "console/network" -LICENSE = "EPL-1.0 & EDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20" - -# util-linux is needed to provide libuuid dependancy -DEPENDS = "c-ares openssl util-linux" - -PR = "r3" - -SRC_URI = "http://mosquitto.org/files/source/${PN}-${PV}.tar.gz \ - file://mosquitto.init \ - file://mosquitto.conf \ - file://mosquitto.default \ - file://mosquitto.logrotate.conf \ - file://config_mk.patch \ - " -SRC_URI[md5sum] = "f98c99998a36a234f3a9d9b402b991db" -SRC_URI[sha256sum] = "8557bc7ae34dfaf32a0fb56d2491b7a7f731269c88337227233013502df4d5b0" - -export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}" -inherit autotools update-rc.d - -INITSCRIPT_NAME = "mosquitto" -INITSCRIPT_PARAMS = "defaults 70 30" -do_compile() { - WITH_STATIC_LIBRARIES=1 oe_runmake PREFIX=/usr WITH_STATIC_LIBRARIES=1 -} -do_install() { - # oe_runmake DESTDIR=${D} prefix=/usr install - oe_runmake install DESTDIR=${D} - install -m 0755 -d ${D}/usr/lib - install -m 0644 lib/libmosquitto.a ${D}${libdir}/ - - install -d ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto - install -m 0644 ${WORKDIR}/mosquitto.conf ${D}${sysconfdir}/mosquitto/ - install -m 0644 ${WORKDIR}/mosquitto.default ${D}${sysconfdir}/default/mosquitto - - install -d ${D}${sysconfdir}/logrotate.d - install -m 0644 ${WORKDIR}/mosquitto.logrotate.conf ${D}${sysconfdir}/logrotate.d/mosquitto.conf -} - -do_rm_work() { - echo "skipping" -} - - -PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients ${PN}-python" - -CONFFILES_${PN} = "${sysconfdir}/mosquitto.conf ${sysconfdir}/default/mosquitto" -FILES_${PN} = "${sbindir}/mosquitto \ - ${bindir}/mosquitto_passwd \ - ${sysconfdir}/mosquitto \ - ${systemd_unitdir}/system/mosquitto.service \ - ${sysconfdir}/ \ -" - -FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" - -FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" - -FILES_${PN}-clients = "${bindir}/mosquitto_pub \ - ${bindir}/mosquitto_sub \ -" - -FILES_${PN}-staticdev += "${libdir}/libmosquitto.a" - -FILES_${PN}-python = "/usr/lib/python2.7/site-packages" - -inherit systemd - -SYSTEMD_SERVICE_${PN} = "mosquitto.service" - diff --git a/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch deleted file mode 100644 index 7e043a2..0000000 --- a/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001 -From: Yuanjie Huang <yuanjie.huang@windriver.com> -Date: Wed, 24 Aug 2016 03:15:43 +0000 -Subject: [PATCH] Fix potential signed overflow in pointer arithmatic - -Pointer arithmatic results in implementation defined signed integer -type, so that 's - src' in strlcpy and others may trigger signed overflow. -In case of compilation by gcc or clang with -ftrapv option, the overflow -would lead to program abort. - -Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608] - -Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> ---- - openbsd-compat/strlcat.c | 8 ++++++-- - openbsd-compat/strlcpy.c | 8 ++++++-- - openbsd-compat/strnlen.c | 8 ++++++-- - 3 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c -index bcc1b61..e758ebf 100644 ---- a/openbsd-compat/strlcat.c -+++ b/openbsd-compat/strlcat.c -@@ -23,6 +23,7 @@ - - #include <sys/types.h> - #include <string.h> -+#include <stdint.h> - - /* - * Appends src to string dst of size siz (unlike strncat, siz is the -@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz) - s++; - } - *d = '\0'; -- -- return(dlen + (s - src)); /* count does not include NUL */ -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */ - } - - #endif /* !HAVE_STRLCAT */ -diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c -index b4b1b60..b06f374 100644 ---- a/openbsd-compat/strlcpy.c -+++ b/openbsd-compat/strlcpy.c -@@ -23,6 +23,7 @@ - - #include <sys/types.h> - #include <string.h> -+#include <stdint.h> - - /* - * Copy src to string dst of size siz. At most siz-1 characters -@@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz) - while (*s++) - ; - } -- -- return(s - src - 1); /* count does not include NUL */ -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */ - } - - #endif /* !HAVE_STRLCPY */ -diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c -index 93d5155..9b8de5d 100644 ---- a/openbsd-compat/strnlen.c -+++ b/openbsd-compat/strnlen.c -@@ -23,6 +23,7 @@ - #include <sys/types.h> - - #include <string.h> -+#include <stdint.h> - - size_t - strnlen(const char *str, size_t maxlen) -@@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen) - - for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--) - ; -- -- return (size_t)(cp - str); -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return (size_t)((uintptr_t)cp - (uintptr_t)str); - } - #endif --- -1.9.1 - diff --git a/recipes-connectivity/openssh/openssh/init b/recipes-connectivity/openssh/openssh/init deleted file mode 100644 index 386628a..0000000 --- a/recipes-connectivity/openssh/openssh/init +++ /dev/null @@ -1,153 +0,0 @@ -#! /bin/sh -set -e - -PIDFILE=/var/run/sshd.pid - -# source function library -. /etc/init.d/functions - -# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon - -test -x /usr/sbin/sshd || exit 0 -( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 - -# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS -if test -f /etc/default/ssh; then - . /etc/default/ssh -fi - -[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh -mkdir -p $SYSCONFDIR - -parse_sshd_opts() { - set -- ${SSHD_OPTS} -- - sshd_config=/etc/ssh/sshd_config - while true ; do - case "$1" in - -f*) if [ "$1" = "-f" ] ; then - sshd_config="$2" - shift - else - sshd_config="${1#-f}" - fi - shift - ;; - --) shift; break;; - *) shift;; - esac - done -} - -check_for_no_start() { - # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists - if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then - echo "OpenBSD Secure Shell server not in use ($SYSCONFDIR/sshd_not_to_be_run)" - exit 0 - fi -} - -check_privsep_dir() { - # Create the PrivSep empty dir if necessary - if [ ! -d /var/run/sshd ]; then - mkdir /var/run/sshd - chmod 0755 /var/run/sshd - fi -} - -check_config() { - /usr/sbin/sshd -t $SSHD_OPTS || exit 1 -} - -check_keys() { - # parse location of keys - local HOST_KEY_RSA - local HOST_KEY_DSA - local HOST_KEY_ECDSA - local HOST_KEY_ED25519 - - parse_sshd_opts - HOST_KEY_RSA=$(grep ^HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$(grep HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key - HOST_KEY_DSA=$(grep ^HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$(grep HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key - HOST_KEY_ECDSA=$(grep ^HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$(grep HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key - HOST_KEY_ED25519=$(grep ^HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$(grep HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ') - [ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key - - # create keys if necessary - if [ ! -f $HOST_KEY_RSA ]; then - echo " generating ssh RSA key..." - mkdir -p $(dirname $HOST_KEY_RSA) - ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa - fi - if [ ! -f $HOST_KEY_ECDSA ]; then - echo " generating ssh ECDSA key..." - mkdir -p $(dirname $HOST_KEY_ECDSA) - ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa - fi - if [ ! -f $HOST_KEY_DSA ]; then - echo " generating ssh DSA key..." - mkdir -p $(dirname $HOST_KEY_DSA) - ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa - fi - if [ ! -f $HOST_KEY_ED25519 ]; then - echo " generating ssh ED25519 key..." - mkdir -p $(dirname $HOST_KEY_ED25519) - ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519 - fi -} - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -case "$1" in - start) - check_for_no_start - echo "Starting OpenBSD Secure Shell server: sshd" - check_keys - check_privsep_dir - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "done." - ;; - stop) - echo -n "Stopping OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd - echo "." - ;; - - reload|force-reload) - check_for_no_start - check_keys - check_config - echo -n "Reloading OpenBSD Secure Shell server's configuration" - start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd - echo "." - ;; - - restart) - check_keys - check_config - echo -n "Restarting OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd - check_for_no_start - check_privsep_dir - sleep 2 - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "." - ;; - - status) - status /usr/sbin/sshd - exit $? - ;; - - *) - echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}" - exit 1 -esac - -exit 0 diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch deleted file mode 100644 index d6fbd3b..0000000 --- a/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ruN a/regress/cipher-speed.sh b/regress/cipher-speed.sh ---- a/regress/cipher-speed.sh 2019-12-03 13:16:36.091896387 -0600 -+++ b/regress/cipher-speed.sh 2019-12-03 13:28:29.726275955 -0600 -@@ -17,7 +17,7 @@ - printf "%-60s" "$c/$m:" - ( ${SSH} -o 'compression no' \ - -F $OBJ/ssh_proxy -m $m -c $c somehost \ -- exec sh -c \'"dd of=/dev/null obs=32k"\' \ -+ exec sh -c \'"dd of=/dev/null bs=32k"\' \ - < ${DATA} ) 2>&1 | getbytes - - if [ $? -ne 0 ]; then -diff -ruN a/regress/key-options.sh b/regress/key-options.sh ---- a/regress/key-options.sh 2019-12-03 13:24:44.164243780 -0600 -+++ b/regress/key-options.sh 2019-12-03 13:33:14.447235791 -0600 -@@ -84,7 +84,7 @@ - fi - - sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys -- from=`head -1 $authkeys | cut -f1 -d ' '` -+ from=`head -n 1 $authkeys | cut -f1 -d ' '` - verbose "key option $from" - r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'` - if [ "$r" = "true" ]; then -diff -ruN a/regress/transfer.sh b/regress/transfer.sh ---- a/regress/transfer.sh 2019-12-03 13:16:58.342857354 -0600 -+++ b/regress/transfer.sh 2019-12-03 13:29:08.733267753 -0600 -@@ -13,7 +13,7 @@ - for s in 10 100 1k 32k 64k 128k 256k; do - trace "dd-size ${s}" - rm -f ${COPY} -- dd if=$DATA obs=${s} 2> /dev/null | \ -+ dd if=$DATA bs=${s} 2> /dev/null | \ - ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}" - if [ $? -ne 0 ]; then - fail "ssh cat $DATA failed" -diff -ruN a/regress/yes-head.sh b/regress/yes-head.sh ---- a/regress/yes-head.sh 2019-12-03 13:17:11.682259074 -0600 -+++ b/regress/yes-head.sh 2019-12-03 13:32:47.699869866 -0600 -@@ -3,7 +3,7 @@ - - tid="yes pipe head" - --lines=`${SSH} -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)` -+lines=`${SSH} -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)` - if [ $? -ne 0 ]; then - fail "yes|head test failed" - lines = 0; diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch deleted file mode 100644 index 507026c..0000000 --- a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/cipher.c 2019-12-03 12:46:22.282290586 -0600 -+++ b/cipher.c 2019-12-03 12:45:19.273805437 -0600 -@@ -158,8 +158,10 @@ - u_int - cipher_seclen(const struct sshcipher *c) - { -+#ifndef OPENSSL_NO_DES - if (strcmp("3des-cbc", c->name) == 0) - return 14; -+#endif - return cipher_keylen(c); - } - diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch deleted file mode 100644 index 46b60b5..0000000 --- a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/pkcs11.h 2019-12-03 12:52:10.920974412 -0600 -+++ b/pkcs11.h 2019-12-03 12:56:56.383171416 -0600 -@@ -342,9 +342,11 @@ - #define CKK_GENERIC_SECRET (0x10) - #define CKK_RC2 (0x11) - #define CKK_RC4 (0x12) -+#ifndef OPENSSL_NO_DES - #define CKK_DES (0x13) - #define CKK_DES2 (0x14) - #define CKK_DES3 (0x15) -+#endif /* OPENSSL_NO_DES */ - #define CKK_CAST (0x16) - #define CKK_CAST3 (0x17) - #define CKK_CAST128 (0x18) -@@ -512,6 +514,7 @@ - #define CKM_RC2_CBC_PAD (0x105) - #define CKM_RC4_KEY_GEN (0x110) - #define CKM_RC4 (0x111) -+#ifndef OPENSSL_NO_DES - #define CKM_DES_KEY_GEN (0x120) - #define CKM_DES_ECB (0x121) - #define CKM_DES_CBC (0x122) -@@ -525,6 +528,7 @@ - #define CKM_DES3_MAC (0x134) - #define CKM_DES3_MAC_GENERAL (0x135) - #define CKM_DES3_CBC_PAD (0x136) -+#endif /* OPENSSL_NO_DES */ - #define CKM_CDMF_KEY_GEN (0x140) - #define CKM_CDMF_ECB (0x141) - #define CKM_CDMF_CBC (0x142) -@@ -610,8 +614,10 @@ - #define CKM_MD5_KEY_DERIVATION (0x390) - #define CKM_MD2_KEY_DERIVATION (0x391) - #define CKM_SHA1_KEY_DERIVATION (0x392) -+#ifndef OPENSSL_NO_DES - #define CKM_PBE_MD2_DES_CBC (0x3a0) - #define CKM_PBE_MD5_DES_CBC (0x3a1) -+#endif /* OPENSSL_NO_DES */ - #define CKM_PBE_MD5_CAST_CBC (0x3a2) - #define CKM_PBE_MD5_CAST3_CBC (0x3a3) - #define CKM_PBE_MD5_CAST5_CBC (0x3a4) -@@ -620,8 +626,10 @@ - #define CKM_PBE_SHA1_CAST128_CBC (0x3a5) - #define CKM_PBE_SHA1_RC4_128 (0x3a6) - #define CKM_PBE_SHA1_RC4_40 (0x3a7) -+#ifndef OPENSSL_NO_DES - #define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8) - #define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9) -+#endif /* OPENSSL_NO_DES */ - #define CKM_PBE_SHA1_RC2_128_CBC (0x3aa) - #define CKM_PBE_SHA1_RC2_40_CBC (0x3ab) - #define CKM_PKCS5_PBKD2 (0x3b0) diff --git a/recipes-connectivity/openssh/openssh/run-ptest b/recipes-connectivity/openssh/openssh/run-ptest deleted file mode 100755 index 36a3d2a..0000000 --- a/recipes-connectivity/openssh/openssh/run-ptest +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -export TEST_SHELL=sh - -cd regress -sed -i "/\t\tagent-ptrace /d" Makefile -make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ - | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' - -SSHAGENT=`which ssh-agent` -GDB=`which gdb` - -if [ -z "${SSHAGENT}" -o -z "${GDB}" ]; then - echo "SKIP: agent-ptrace" - exit -fi - -useradd openssh-test - -eval `su -c "${SSHAGENT} -s" openssh-test` > /dev/null -r=$? -if [ $r -ne 0 ]; then - echo "FAIL: could not start ssh-agent: exit code $r" -else - su -c "gdb -p ${SSH_AGENT_PID}" openssh-test > /tmp/gdb.out 2>&1 << EOF - quit -EOF - r=$? - if [ $r -ne 0 ]; then - echo "gdb failed: exit code $r" - fi - egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null /tmp/gdb.out - r=$? - rm -f /tmp/gdb.out - if [ $r -ne 0 ]; then - echo "FAIL: ptrace agent" - else - echo "PASS: ptrace agent" - fi - - ${SSHAGENT} -k > /dev/null -fi -userdel openssh-test - diff --git a/recipes-connectivity/openssh/openssh/ssh.default b/recipes-connectivity/openssh/openssh/ssh.default deleted file mode 100644 index d5c0507..0000000 --- a/recipes-connectivity/openssh/openssh/ssh.default +++ /dev/null @@ -1,2 +0,0 @@ -# put keys here -SYSCONFDIR=/var/config/ssh diff --git a/recipes-connectivity/openssh/openssh/ssh_config b/recipes-connectivity/openssh/openssh/ssh_config deleted file mode 100644 index 9e91915..0000000 --- a/recipes-connectivity/openssh/openssh/ssh_config +++ /dev/null @@ -1,48 +0,0 @@ -# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $ - -# This is the ssh client system-wide configuration file. See -# ssh_config(5) for more information. This file provides defaults for -# users, and the values can be changed in per-user configuration files -# or on the command line. - -# Configuration data is parsed as follows: -# 1. command line options -# 2. user-specific file -# 3. system-wide file -# Any configuration value is only changed the first time it is set. -# Thus, host-specific definitions should be at the beginning of the -# configuration file, and defaults at the end. - -# Site-wide defaults for some commonly used options. For a comprehensive -# list of available options, their meanings and defaults, please see the -# ssh_config(5) man page. - -Host * - ForwardAgent yes - ForwardX11 yes -# RhostsRSAAuthentication no -# RSAAuthentication yes -# PasswordAuthentication yes -# HostbasedAuthentication no -# GSSAPIAuthentication no -# GSSAPIDelegateCredentials no -# BatchMode no -# CheckHostIP yes -# AddressFamily any -# ConnectTimeout 0 -# StrictHostKeyChecking ask -# IdentityFile ~/.ssh/identity -# IdentityFile ~/.ssh/id_rsa -# IdentityFile ~/.ssh/id_dsa -# Port 22 -# Protocol 2,1 -# Cipher 3des -# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc -# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160 -# EscapeChar ~ -# Tunnel no -# TunnelDevice any:any -# PermitLocalCommand no -# VisualHostKey no -# ProxyCommand ssh -q -W %h:%p gateway.example.com -# RekeyLimit 1G 1h diff --git a/recipes-connectivity/openssh/openssh/sshd b/recipes-connectivity/openssh/openssh/sshd deleted file mode 100644 index 182650b..0000000 --- a/recipes-connectivity/openssh/openssh/sshd +++ /dev/null @@ -1,11 +0,0 @@ -#%PAM-1.0 - -auth include common-auth -account required pam_nologin.so -account include common-account -password include common-password -session optional pam_keyinit.so force revoke -session optional pam_radauth.so -session include common-session -session required pam_loginuid.so - diff --git a/recipes-connectivity/openssh/openssh/sshd.socket b/recipes-connectivity/openssh/openssh/sshd.socket deleted file mode 100644 index 12c39b2..0000000 --- a/recipes-connectivity/openssh/openssh/sshd.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Conflicts=sshd.service - -[Socket] -ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd -ListenStream=22 -Accept=yes - -[Install] -WantedBy=sockets.target diff --git a/recipes-connectivity/openssh/openssh/sshd@.service b/recipes-connectivity/openssh/openssh/sshd@.service deleted file mode 100644 index 9d83dfb..0000000 --- a/recipes-connectivity/openssh/openssh/sshd@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=OpenSSH Per-Connection Daemon -Wants=sshdgenkeys.service -After=sshdgenkeys.service - -[Service] -Environment="SSHD_OPTS=" -EnvironmentFile=-/etc/default/ssh -ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS -ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID -StandardInput=socket -StandardError=syslog -KillMode=process diff --git a/recipes-connectivity/openssh/openssh/sshd_config b/recipes-connectivity/openssh/openssh/sshd_config deleted file mode 100644 index 31fe5d9..0000000 --- a/recipes-connectivity/openssh/openssh/sshd_config +++ /dev/null @@ -1,132 +0,0 @@ -# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -# The default requires explicit activation of protocol 1 -Protocol 2 - -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 1024 - -# Ciphers and keying -#RekeyLimit default none - -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#RSAAuthentication yes -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -ChallengeResponseAuthentication no - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -#PermitUserEnvironment no -Compression no -ClientAliveInterval 15 -ClientAliveCountMax 4 -#UseDNS yes -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/recipes-connectivity/openssh/openssh/sshdgenkeys.service deleted file mode 100644 index 148e6ad..0000000 --- a/recipes-connectivity/openssh/openssh/sshdgenkeys.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=OpenSSH Key Generation -RequiresMountsFor=/var /run -ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key -ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key -ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key -ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key -ConditionPathExists=!/etc/ssh/ssh_host_rsa_key -ConditionPathExists=!/etc/ssh/ssh_host_dsa_key -ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key -ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key - -[Service] -Environment="SYSCONFDIR=/etc/ssh" -EnvironmentFile=-/etc/default/ssh -ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519 -Type=oneshot -RemainAfterExit=yes diff --git a/recipes-connectivity/openssh/openssh/volatiles.99_sshd b/recipes-connectivity/openssh/openssh/volatiles.99_sshd deleted file mode 100644 index a0d2af3..0000000 --- a/recipes-connectivity/openssh/openssh/volatiles.99_sshd +++ /dev/null @@ -1,2 +0,0 @@ -d root root 0755 /var/run/sshd none -f root root 0644 /var/log/lastlog none diff --git a/recipes-connectivity/openssh/openssh_%.bbappend b/recipes-connectivity/openssh/openssh_%.bbappend deleted file mode 100644 index 53d3da1..0000000 --- a/recipes-connectivity/openssh/openssh_%.bbappend +++ /dev/null @@ -1,22 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://ssh.default" - -KEYFILES = "ssh_host_dsa_key \ -ssh_host_dsa_key.pub \ -ssh_host_ecdsa_key \ -ssh_host_ecdsa_key.pub \ -ssh_host_rsa_key \ -ssh_host_rsa_key.pub \ -ssh_host_ed25519_key \ -ssh_host_ed25519_key.pub \ -" - -do_install_append() { - install -d ${D}${sysconfdir}/default - install -m 644 ${WORKDIR}/ssh.default ${D}${sysconfdir}/default/ssh - for f in ${KEYFILES}; do - ln -sf /var/config/ssh/$f ${D}${sysconfdir}/ssh/$f - done -} -CONFFILES_${PN}-sshd += "${sysconfdir}/init.d/sshd" diff --git a/recipes-connectivity/openssh/openssh_8.1p1.bb b/recipes-connectivity/openssh/openssh_8.1p1.bb deleted file mode 100644 index 5bfd8e3..0000000 --- a/recipes-connectivity/openssh/openssh_8.1p1.bb +++ /dev/null @@ -1,160 +0,0 @@ -SUMMARY = "A suite of security-related network utilities based on \ -the SSH protocol including the ssh client and sshd server" -DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ -Ssh (Secure Shell) is a program for logging into a remote machine \ -and for executing commands on a remote machine." -HOMEPAGE = "http://www.openssh.com/" -SECTION = "console/network" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENCE;md5=18d9e5a8b3dd1790d73502f50426d4d3" - -DEPENDS = "zlib openssl" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" - -SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \ - file://sshd_config \ - file://ssh_config \ - file://init \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://sshd.socket \ - file://sshd@.service \ - file://sshdgenkeys.service \ - file://volatiles.99_sshd \ - file://openssh-8.1p1-add-test-support-for-busybox.patch \ - file://run-ptest \ - file://openssh-8.1p1-conditional-compile-des-in-cipher.patch \ - file://openssh-8.1p1-conditional-compile-des-in-pkcs11.patch \ - file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ - " - -PAM_SRC_URI = "file://sshd" - -SRC_URI[md5sum] = "513694343631a99841e815306806edf0" -SRC_URI[sha256sum] = "02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff" - -inherit useradd update-rc.d update-alternatives systemd - -USERADD_PACKAGES = "${PN}-sshd" -USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" -INITSCRIPT_PACKAGES = "${PN}-sshd" -INITSCRIPT_NAME_${PN}-sshd = "sshd" -INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" - -SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" - -inherit autotools-brokensep ptest - -# LFS support: -CFLAGS += "-D__FILE_OFFSET_BITS=64" - -# login path is hardcoded in sshd -EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ - --without-zlib-version-check \ - --with-privsep-path=/var/run/sshd \ - --sysconfdir=${sysconfdir}/ssh \ - --with-xauth=/usr/bin/xauth \ - --disable-strip \ - " - -# Since we do not depend on libbsd, we do not want configure to use it -# just because it finds libutil.h. But, specifying --disable-libutil -# causes compile errors, so... -CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no" - -# passwd path is hardcoded in sshd -CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd" - -# We don't want to depend on libblockfile -CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" - -do_configure_prepend () { - export LD="${CC}" - install -m 0644 ${WORKDIR}/sshd_config ${B}/ - install -m 0644 ${WORKDIR}/ssh_config ${B}/ - if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then - cp aclocal.m4 acinclude.m4 - fi -} - -do_compile_ptest() { - # skip regress/unittests/ binaries: this will silently skip - # unittests in run-ptests which is good because they are so slow. - oe_runmake regress/modpipe regress/setuid-allowed regress/netcat -} - -do_install_append () { - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd - sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config - fi - - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then - sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config - fi - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd - rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin - rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} - install -d ${D}/${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd - install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} - - # Create config files for read-only rootfs - install -d ${D}${sysconfdir}/ssh - install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly - sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - - install -d ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@BINDIR@,${bindir},g' \ - ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service -} - -do_install_ptest () { - sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh - cp -r regress ${D}${PTEST_PATH} -} - -ALLOW_EMPTY_${PN} = "1" - -PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" -FILES_${PN}-scp = "${bindir}/scp.${BPN}" -FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" -FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system" -FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" -FILES_${PN}-sftp = "${bindir}/sftp" -FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" -FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" -FILES_${PN}-keygen = "${bindir}/ssh-keygen" - -RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" -RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" -RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make" - -RPROVIDES_${PN}-ssh = "ssh" -RPROVIDES_${PN}-sshd = "sshd" - -RCONFLICTS_${PN} = "dropbear" -RCONFLICTS_${PN}-sshd = "dropbear" -RCONFLICTS_${PN}-keygen = "ssh-keygen" - -CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" -CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" - -ALTERNATIVE_PRIORITY = "90" -ALTERNATIVE_${PN}-scp = "scp" -ALTERNATIVE_${PN}-ssh = "ssh" - -do_rm_work () { -} diff --git a/recipes-connectivity/ppp/files/default b/recipes-connectivity/ppp/files/default deleted file mode 100644 index 6cc92df..0000000 --- a/recipes-connectivity/ppp/files/default +++ /dev/null @@ -1,8 +0,0 @@ -# Check to see if the SIM is registered before using ppp. -# Need this if using a cellular connection. -CHECKREGISTRATION=1 -# Note that boot will not complete until -# ppp completes, and the PPPTIMEOUT is the -# maximum wait time for the SIM to register -# for cellular PPP. -PPPTIMEOUT=60 diff --git a/recipes-connectivity/ppp/files/init.patch b/recipes-connectivity/ppp/files/init.patch deleted file mode 100644 index e74e981..0000000 --- a/recipes-connectivity/ppp/files/init.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -Naru old/init new/init ---- old/init 2017-09-05 19:07:19.810885424 -0500 -+++ new/init 2017-09-05 19:08:05.106884083 -0500 -@@ -8,11 +8,29 @@ - - test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 - if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi -- -+: ${PPPTIMEOUT:=60} -+logger timeout is $PPPTIMEOUT -+[ -f /etc/default/ppp ] && . /etc/default/ppp - case "$1" in - start) -+ t0=($(cat /proc/uptime)) -+ if (( CHECKREGISTRATION == 1 )) ; then while : ; do -+ REG=$(/usr/bin/radio-query --netreg) -+ [[ $REG == "REGISTERED" ]] && break -+ t1=($(cat /proc/uptime)) -+ diff=$(awk "BEGIN{print int($t1-$t0)}") -+ logger -s "Modem not ready. Waited $diff of $PPPTIMEOUT seconds" -+ if ((diff > PPPTIMEOUT)) ; then -+ logger -s "Timed out waiting for modem registration" -+ exit 1 -+ fi -+ sleep 1 -+ done ; fi -+ -+ logger "Starting up PPP link: pppd" - echo -n "Starting up PPP link: pppd" - if [ "$RUNFILE" = "1" ]; then -+ logger "ppp_on_boot" - /etc/ppp/ppp_on_boot - else - pppd call provider diff --git a/recipes-connectivity/ppp/files/poff.patch b/recipes-connectivity/ppp/files/poff.patch deleted file mode 100644 index 2385886..0000000 --- a/recipes-connectivity/ppp/files/poff.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naru old/poff new/poff ---- old/poff 2017-09-05 19:07:11.630885666 -0500 -+++ new/poff 2017-09-05 19:08:09.586883950 -0500 -@@ -1,7 +1,7 @@ - #!/bin/sh - - # Lets see how many pppds are running.... --set -- `cat /var/run/ppp*.pid 2>/dev/null` -+set -- `cat /var/run/ppp[0-9]*.pid 2>/dev/null` - - case $# in - 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd diff --git a/recipes-connectivity/ppp/ppp_%.bbappend b/recipes-connectivity/ppp/ppp_%.bbappend deleted file mode 100644 index 55c47df..0000000 --- a/recipes-connectivity/ppp/ppp_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -SRC_URI_append = "\ - file://init.patch;patchdir=.. \ - file://poff.patch;patchdir=.. \ - file://default" - -PR = "r9" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -FILES_${PN} += "/etc/default/ppp" - -# AEP compatibility -CONFFILES_${PN} += "${sysconfdir}/default/ppp ${sysconfdir}/init.d/ppp" - -do_install_append() { - install -d -m 0755 ${D}/${sysconfdir}/default/ - install -m 644 ${WORKDIR}/default ${D}/${sysconfdir}/default/ppp -} diff --git a/recipes-connectivity/usb-gadget-mode/files/usb-gadget b/recipes-connectivity/usb-gadget-mode/files/usb-gadget deleted file mode 100755 index 8da88ad..0000000 --- a/recipes-connectivity/usb-gadget-mode/files/usb-gadget +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges <devel@hentges.net> (c) 2007 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: usb-gadget -# Date: 20070606 (YMD) -# -################################################################################# -# -# 20070606 - v0.0.1 - Initial release -# 20070630 - v0.0.2 - Add forgotten host mode -# 20090529 - add support for all gadgets in 2.6.29 (koen) - -CONF_FILE="/etc/default/usb-gadget" - -die() { - echo "ERROR: $1" - exit 1 -} - -go() { - test -e "$CONF_FILE" && . "$CONF_FILE" - - case "$USB_MODE" in - networking) setup_usb g_ether ;; - zero) setup_usb g_zero ;; - midi) setup_usb g_midi ;; - printer) setup_usb g_printer ;; - gadgetfs) setup_usb gadgetfs ;; - composite) setup_usb g_cdc ;; - serial) setup_usb g_serial ;; - storage) setup_usb g_file_storage ;; - hostmode) unload_usb_gadgets - setup_usb ohci_hcd ;; - none) unload_usb_gadgets ;; - esac - -} - -setup_usb() { - - if ! ( lsmod | grep -q "$1" ) - then - unload_usb_gadgets - echo "Loading [$1]" - modprobe "$1" $MODULE_OPTIONS - else - echo "Already loaded: [$1]" - fi -} - -unload_usb_gadgets() { - KERNEL_VERSION="`uname -r`" - GADGET_MODULES="`find /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/gadget -name "*g_*"`" - - for module in $GADGET_MODULES - do - MODULE_NAME="`basename $module | sed "s/\.ko//"`" - - if ( lsmod | grep -q "$MODULE_NAME" ) - then - echo "Unloading [$MODULE_NAME]" - rmmod "$module" - fi - done -} - -go diff --git a/recipes-connectivity/usb-gadget-mode/files/usb-gadget.conf b/recipes-connectivity/usb-gadget-mode/files/usb-gadget.conf deleted file mode 100644 index f3a7a6b..0000000 --- a/recipes-connectivity/usb-gadget-mode/files/usb-gadget.conf +++ /dev/null @@ -1,6 +0,0 @@ -# set to "no" to disable usb-gadget -ENABLED="yes" - -USB_MODE="serial" -MODULE_OPTIONS="" - diff --git a/recipes-connectivity/usb-gadget-mode/files/usb-gadget.init b/recipes-connectivity/usb-gadget-mode/files/usb-gadget.init deleted file mode 100755 index 403fd23..0000000 --- a/recipes-connectivity/usb-gadget-mode/files/usb-gadget.init +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges <devel@hentges.net> (c) 2007 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: usb-gadget.init -# Date: 20070606 (YMD) -# -################################################################################# -# -# 20070606 - v0.0.1 - Initial release - -ENABLED="yes" - -[ -r /etc/default/usb-gadget ] && source /etc/default/usb-gadget -[ "$ENABLED" == "yes" ] || exit 0 - -case "$1" in -start) usb-gadget ;; -esac - diff --git a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb deleted file mode 100644 index 0f15830..0000000 --- a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright Matthias Hentges <devel@hentges.net> (c) 2007 -# License: MIT (see http://www.opensource.org/licenses/mit-license.php -# for a copy of the license) -# -# Filename: usb-gadget-mode.bb -# Date: 20070606 (YMD) - -DESCRIPTION = "Manage the default USB gadget mode" -SECTION = "console/network" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -PV = "0.0.2" -PR = "r3" - -SRC_URI = "\ - file://usb-gadget.conf \ - file://usb-gadget \ - file://usb-gadget.init \ -" - -do_install() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/init.d - install -d ${D}${bindir} - install -d ${D}${sysconfdir}/default - - install -m 0644 ${WORKDIR}/usb-gadget.conf ${D}${sysconfdir}/default/usb-gadget - install -m 0755 ${WORKDIR}/usb-gadget.init ${D}${sysconfdir}/init.d/usb-gadget - install -m 0755 ${WORKDIR}/usb-gadget ${D}${bindir} -} - -# disbale usb-gadget for mtcap hardware -do_install_append_mtcap() { - sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget -} - -pkg_postinst_${PN}() { - test -n "$D" && opt="-r $D" - update-rc.d $opt usb-gadget defaults 50 -} - -pkg_postrm_${PN}() { - update-rc.d -f usb-gadget remove -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -# disable usb-gadget on mtr -do_install_append_mtr() { - sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget -} - -# disable usb-gadget on mtrv1 -do_install_append_mtrv1() { - sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget -} 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 -} - diff --git a/recipes-devtools/node-red/node-red_0.15.3.bb b/recipes-devtools/node-red/node-red_0.15.3.bb deleted file mode 100644 index bacf9fd..0000000 --- a/recipes-devtools/node-red/node-red_0.15.3.bb +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "Node-RED" -HOMEPAGE = "http://nodered.org" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" -DEPENDS = "nodejs nodejs-native" -RDEPENDS_${PN} += "bash" -PR = "r0" - -inherit npm-base - - -S = "${WORKDIR}" - -do_install() { - - # npm install locally - oe_runnpm install --prefix ./ node-red@0.15.3 - - # npm install more stuff - oe_runnpm install --prefix./node_modules/node-red nodemailer - # Build patched serialport. - # Original is https://registry.npmjs.org/serialport/-/serialport-1.7.4.tgz - oe_runnpm install --prefix ./node_modules/node-red http://multitech.net/mlinux/sources/node-red-serialport-1.7.4-mt1.tgz - - # modules needed for loragw - oe_runnpm install --prefix ./node_modules/node-red extend dissolve node-constants - - # install m2x node - oe_runnpm install --prefix ./node_modules/node-red node-red-m2x - - # remove dupe deps - oe_runnpm dedupe - - # remove Raspberry PI node - rm ./node_modules/node-red/nodes/core/hardware/36-rpi-gpio.html - rm ./node_modules/node-red/nodes/core/hardware/36-rpi-gpio.js - rm ./node_modules/node-red/nodes/core/hardware/nrgpio - rm ./node_modules/node-red/nodes/core/hardware/nrgpio.py - - # remove x86_64 serialport 0.0.5 - rm -rf ./node_modules/node-red/node_modules/node-red-node-serialport - - # install node-red - install -d ${D}/opt/node-red - cp -r ./node_modules/node-red/* ${D}/opt/node-red/ -} -pkg_preinst_${PN}() { - if grep 'Application Execution Platform with mLinux' /etc/issue ; then - ((aep=1)) - fi - ls /etc/init.d >/tmp/init.txt - - if ((aep == 1)) ; then - logger -t opkg -s -p user.error 'Application Execution Platform detected in /etc/issue -- this node-red package is for mLinux not AEP' - exit 1 - fi -} - -FILES_${PN} += "/opt/node-red" diff --git a/recipes-devtools/nodejs/nodejs_10.16.2.bb b/recipes-devtools/nodejs/nodejs_10.16.2.bb deleted file mode 100644 index 40c1bd2..0000000 --- a/recipes-devtools/nodejs/nodejs_10.16.2.bb +++ /dev/null @@ -1,9 +0,0 @@ -require nodejs_10.inc - -INC_PR = "r1" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=be980eb7ccafe287cb438076a65e888c" - -SRC_URI[src.md5sum] = "d3dcf975970fe080b1d00221b8070944" -SRC_URI[src.sha256sum] = "5936ef12ab3f0ce5fbb6751c1bb41f626b6058f414a297b3d8c5eb418a27e8fe" - diff --git a/recipes-devtools/nodejs/nodejs_10.4.0.bb b/recipes-devtools/nodejs/nodejs_10.4.0.bb deleted file mode 100644 index 8a85cc2..0000000 --- a/recipes-devtools/nodejs/nodejs_10.4.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -require nodejs_10.inc - -INC_PR = "r1" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=b0267987d0755bce12779a100826ef97" - -SRC_URI[src.md5sum] = "db2fcfb40c4fe4049ad172cf3f99fd2f" -SRC_URI[src.sha256sum] = "88d9c8179bde19e057cd1d8b835b50726e4c94f8418c91472001e212da96d290" - diff --git a/recipes-devtools/nodejs/nodejs_10.inc b/recipes-devtools/nodejs/nodejs_10.inc deleted file mode 100644 index f8e36e9..0000000 --- a/recipes-devtools/nodejs/nodejs_10.inc +++ /dev/null @@ -1,98 +0,0 @@ -DESCRIPTION = "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE = "http://nodejs.org" - -LICENSE = "MIT" - -COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" -# COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" - -INC_PR = "r1" -PR = "${INC_PR}.4" - -PROVIDES = "node" -RPROVIDES_${PN} = "node" - -SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz;name=src \ - " - -S = "${WORKDIR}/node-v${PV}" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -inherit nodejs-arch - -ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -ARCHFLAGS ?= "" - -CROSSCONF = "--cross-compiling" -CROSSCONF_virtclass-native ="--no-cross-compiling" - -GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " - -PACKAGECONFIG ??= "zlib openssl" - -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib," -PACKAGECONFIG[openssl] = "--shared-openssl,,openssl," -PACKAGECONFIG[v8-inspector] = ",--without-inspector,," - -DISABLE_STATIC = "" - -export CXX_host = "${BUILD_CXX}" -export CC_host = "${BUILD_CC}" -export CXXFLAGS_host = "${BUILD_CXXFLAGS}" -export CFLAGS_host = "${BUILD_CFLAGS}" - -do_configure () { - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - ./configure --prefix="${prefix}" \ - --dest-cpu="${@nodejs_map_dest_cpu(d.getVar('TARGET_ARCH', True), d)}" \ - --dest-os=linux ${ARCHFLAGS} \ - --with-intl=none \ - ${CROSSCONF} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR="${D}" -} - -do_install_append_class-native() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -do_install_append_class-nativesdk() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js - sed "1s^.*^#\!/usr/bin/env python^g" -i ${D}${exec_prefix}/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples -} - -do_install_append_class-target() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -PACKAGES =+ "${PN}-npm" -FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm" -RDEPENDS_${PN}-npm = "bash python-compiler python-shell python-datetime python-subprocess python-multiprocessing python-crypt python-textutils python-netclient python-misc" - -PACKAGES =+ "${PN}-dtrace" -FILES_${PN}-dtrace = "${exec_prefix}/lib/dtrace" - -PACKAGES =+ "${PN}-systemtap" -FILES_${PN}-systemtap = "${datadir}/systemtap" - -INSANE_SKIP_${PN} += "file-rdeps" -INSANE_SKIP_${PN}-dbg += "host-user-contaminated" - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/nodejs/nodejs_12.8.0.bb b/recipes-devtools/nodejs/nodejs_12.8.0.bb deleted file mode 100644 index 422f88f..0000000 --- a/recipes-devtools/nodejs/nodejs_12.8.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -require nodejs_12.inc - -INC_PR = "r2" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=f8efc912ac094c0792011f180755f415" - -SRC_URI[src.md5sum] = "f0ddf2d0b6ed3de579a111b39ca08f01" -SRC_URI[src.sha256sum] = "6f4e4ee7bcb52f782dce5a51d6951ff87151d9504be129d68d7aff469c0f7f36" - diff --git a/recipes-devtools/nodejs/nodejs_12.inc b/recipes-devtools/nodejs/nodejs_12.inc deleted file mode 100644 index f8e36e9..0000000 --- a/recipes-devtools/nodejs/nodejs_12.inc +++ /dev/null @@ -1,98 +0,0 @@ -DESCRIPTION = "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE = "http://nodejs.org" - -LICENSE = "MIT" - -COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" -# COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" - -INC_PR = "r1" -PR = "${INC_PR}.4" - -PROVIDES = "node" -RPROVIDES_${PN} = "node" - -SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz;name=src \ - " - -S = "${WORKDIR}/node-v${PV}" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -inherit nodejs-arch - -ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -ARCHFLAGS ?= "" - -CROSSCONF = "--cross-compiling" -CROSSCONF_virtclass-native ="--no-cross-compiling" - -GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " - -PACKAGECONFIG ??= "zlib openssl" - -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib," -PACKAGECONFIG[openssl] = "--shared-openssl,,openssl," -PACKAGECONFIG[v8-inspector] = ",--without-inspector,," - -DISABLE_STATIC = "" - -export CXX_host = "${BUILD_CXX}" -export CC_host = "${BUILD_CC}" -export CXXFLAGS_host = "${BUILD_CXXFLAGS}" -export CFLAGS_host = "${BUILD_CFLAGS}" - -do_configure () { - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - ./configure --prefix="${prefix}" \ - --dest-cpu="${@nodejs_map_dest_cpu(d.getVar('TARGET_ARCH', True), d)}" \ - --dest-os=linux ${ARCHFLAGS} \ - --with-intl=none \ - ${CROSSCONF} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR="${D}" -} - -do_install_append_class-native() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -do_install_append_class-nativesdk() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js - sed "1s^.*^#\!/usr/bin/env python^g" -i ${D}${exec_prefix}/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples -} - -do_install_append_class-target() { - # make sure we use node from PATH instead of absolute path to sysroot - sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -PACKAGES =+ "${PN}-npm" -FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm" -RDEPENDS_${PN}-npm = "bash python-compiler python-shell python-datetime python-subprocess python-multiprocessing python-crypt python-textutils python-netclient python-misc" - -PACKAGES =+ "${PN}-dtrace" -FILES_${PN}-dtrace = "${exec_prefix}/lib/dtrace" - -PACKAGES =+ "${PN}-systemtap" -FILES_${PN}-systemtap = "${datadir}/systemtap" - -INSANE_SKIP_${PN} += "file-rdeps" -INSANE_SKIP_${PN}-dbg += "host-user-contaminated" - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/opkg/files/0003-opkg_conf-create-opkg.lock-in-run-lock-instead-of-run.patch b/recipes-devtools/opkg/files/0003-opkg_conf-create-opkg.lock-in-run-lock-instead-of-run.patch deleted file mode 100644 index 882bf54..0000000 --- a/recipes-devtools/opkg/files/0003-opkg_conf-create-opkg.lock-in-run-lock-instead-of-run.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naru old/libopkg/opkg_conf.h new/libopkg/opkg_conf.h ---- old/libopkg/opkg_conf.h 2019-07-25 15:03:02.900962077 -0500 -+++ new/libopkg/opkg_conf.h 2019-07-25 16:57:13.472759267 -0500 -@@ -40,7 +40,7 @@ - #define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status" - #define OPKG_CONF_DEFAULT_CACHE_DIR VARDIR "/cache/opkg" - #define OPKG_CONF_DEFAULT_CONF_FILE_DIR SYSCONFDIR "/opkg" --#define OPKG_CONF_DEFAULT_LOCK_FILE "/run/opkg.lock" -+#define OPKG_CONF_DEFAULT_LOCK_FILE "/run/lock/opkg.lock" - - /* In case the config file defines no dest */ - #define OPKG_CONF_DEFAULT_DEST_NAME "root" diff --git a/recipes-devtools/opkg/opkg_%.bbappend b/recipes-devtools/opkg/opkg_%.bbappend deleted file mode 100644 index 7b45903..0000000 --- a/recipes-devtools/opkg/opkg_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -PR .= ".mlinux1" - -SRC_URI += " file://0003-opkg_conf-create-opkg.lock-in-run-lock-instead-of-run.patch \ - " -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - - diff --git a/recipes-devtools/php/files/init.d.php-rpm.patch b/recipes-devtools/php/files/init.d.php-rpm.patch deleted file mode 100644 index 312f5d7..0000000 --- a/recipes-devtools/php/files/init.d.php-rpm.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -Naru old/sapi/fpm/init.d.php-fpm.in new/sapi/fpm/init.d.php-fpm.in ---- old/sapi/fpm/init.d.php-fpm.in 2017-08-14 16:30:30.551436717 -0500 -+++ new/sapi/fpm/init.d.php-fpm.in 2017-08-14 16:51:21.963399670 -0500 -@@ -10,12 +10,13 @@ - # Description: starts the PHP FastCGI Process Manager daemon - ### END INIT INFO - --prefix=@prefix@ --exec_prefix=@exec_prefix@ -- --php_fpm_BIN=@sbindir@/php-fpm --php_fpm_CONF=@sysconfdir@/php-fpm.conf --php_fpm_PID=@localstatedir@/run/php-fpm.pid -+NAME="php-fpm" -+prefix=/usr -+exec_prefix=/usr -+ -+php_fpm_BIN=/usr/sbin/php-fpm -+php_fpm_CONF=/etc/php-fpm.conf -+php_fpm_PID=/var/run/php-fpm.pid - - - php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID" -@@ -52,6 +53,12 @@ - - case "$1" in - start) -+ [[ -f /etc/default/$NAME ]] && . /etc/default/"$NAME" -+ if [[ $ENABLED != "yes" ]]; then -+ echo "$NAME: disabled in /etc/default" -+ exit -+ fi -+ - echo -n "Starting php-fpm " - - $php_fpm_BIN --daemonize $php_opts diff --git a/recipes-devtools/php/files/php-fpm.conf.patch b/recipes-devtools/php/files/php-fpm.conf.patch deleted file mode 100644 index 6125b67..0000000 --- a/recipes-devtools/php/files/php-fpm.conf.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naru old/php-fpm.conf new/php-fpm.conf ---- old/php-fpm.conf 2017-06-21 12:52:47.597947428 -0500 -+++ new/php-fpm.conf 2017-06-21 13:10:03.225916769 -0500 -@@ -22,7 +22,7 @@ - ; Pid file - ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ - ; Default Value: none --;pid = run/php-fpm.pid -+pid = run/php-fpm.pid - - ; Error log file - ; If it's set to "syslog", log is sent to syslogd instead of being written -@@ -161,7 +161,7 @@ - ; (IPv6 and IPv4-mapped) on a specific port; - ; '/path/to/unix/socket' - to listen on a unix socket. - ; Note: This value is mandatory. --listen = 127.0.0.1:9000 -+listen = /var/run/php-fpm.socket - - ; Set listen(2) backlog. - ; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -@@ -476,7 +476,7 @@ - ; Chdir to this directory at the start. - ; Note: relative path can be used. - ; Default Value: current directory or / when chroot --;chdir = /var/www -+;chdir = /www - - ; Redirect worker stdout and stderr into main error log. If not set, stdout and - ; stderr will be redirected to /dev/null according to FastCGI specs. diff --git a/recipes-devtools/php/files/php-fpm.default b/recipes-devtools/php/files/php-fpm.default deleted file mode 100644 index 0f92640..0000000 --- a/recipes-devtools/php/files/php-fpm.default +++ /dev/null @@ -1,2 +0,0 @@ -# set to "yes" or "no" to control starting on boot -ENABLED="no" diff --git a/recipes-devtools/php/php_%.bbappend b/recipes-devtools/php/php_%.bbappend deleted file mode 100644 index 004c0f8..0000000 --- a/recipes-devtools/php/php_%.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -SRC_URI_append_class-target += "file://php-fpm.conf.patch;patchdir=.. \ - file://init.d.php-rpm.patch \ - file://php-fpm.default \ - " - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -do_install_append_class-target() { - install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/php-fpm.default ${D}/${sysconfdir}/default/php-fpm -} - -FILES_${PN}-fpm += "${sysconfdir}/default"
\ No newline at end of file diff --git a/recipes-examples/multitech/helloworld-autotools_1.0.0.bb b/recipes-examples/multitech/helloworld-autotools_1.0.0.bb deleted file mode 100644 index 8b2eafb..0000000 --- a/recipes-examples/multitech/helloworld-autotools_1.0.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "Hello World Recipe using autotools" -HOMEPAGE = "http://www.multitech.net/" -SECTION = "console/utils" -PRIORITY = "optional" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PR = "r0" - -SRC_URI = "git://git.multitech.net/helloworld-autotools.git;protocol=git;tag=1.0.0" -S = "${WORKDIR}/git" - -inherit autotools - -PARALLEL_MAKE = "" diff --git a/recipes-extended/autossh/autossh_1.4c.bb b/recipes-extended/autossh/autossh_1.4c.bb deleted file mode 100644 index 8ba78f8..0000000 --- a/recipes-extended/autossh/autossh_1.4c.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "Keeps ssh tunnels alive" -HOMEPAGE = "http://www.harding.motd.ca/autossh" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://autossh.c;start_line=10;end_line=22;md5=60abb4e02db9c8a062426f574d2fccae" -SECTION = "console/utils" -PRIORITY = "optional" -inherit autotools-brokensep - -PR = "r1" - -SRC_URI = "http://www.harding.motd.ca/autossh/autossh-1.4c.tgz" -SRC_URI[md5sum] = "26520eea934f296be0783dabe7fcfd28" -SRC_URI[sha256sum] = "6fcaba6a409a46bdf832086736bb8f09d245ebce11027f41d39588a95dc7fd1d" - -TARGET_CC_ARCH += "${LDFLAGS}" - -inherit autotools - -do_install() { - install -d ${D}/${bindir} - install -m 755 ${S}/autossh ${D}/${bindir}/autossh -} diff --git a/recipes-extended/fatrace/fatrace_0.9.bb b/recipes-extended/fatrace/fatrace_0.9.bb deleted file mode 100644 index 866a801..0000000 --- a/recipes-extended/fatrace/fatrace_0.9.bb +++ /dev/null @@ -1,20 +0,0 @@ -inherit autotools-brokensep -DESCRIPTION = "Fatrace - report system wide file access events" -HOMEPAGE = "https://launchpad.net/fatrace" -LICENSE = "GPL-3.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "https://launchpad.net/fatrace/trunk/0.9/+download/fatrace-0.9.tar.bz2" - -SRC_URI[md5sum] = "17ac66f758f200af32f493263edc6b49" -SRC_URI[sha256sum] = "c028d822ffde68805e5d1f62c4e2d0f4b3d4ae565802cc9468c82b25b92e68cd" - -# install to /usr -export PREFIX = "/usr" - -inherit autotools - -# skip installing power-usage-report -do_install_append() { - rm -f ${D}${sbindir}/power-usage-report -} diff --git a/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch deleted file mode 100644 index 2e931a2..0000000 --- a/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Tue, 17 Feb 2015 21:08:07 -0800 -Subject: [PATCH] Act as the "mv" command when rotate log - -Act as the "mv" command when rotate log, first rename, if failed, then -read and write. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - logrotate.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 59 insertions(+), 12 deletions(-) - -diff --git a/logrotate.c b/logrotate.c -index d3deb6a..cf8bf2c 100644 ---- a/logrotate.c -+++ b/logrotate.c -@@ -1157,6 +1157,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) - return 0; - } - -+/* Act as the "mv" command, if rename failed, then read the old file and -+ * write to new file. The function which invokes the mvFile will use -+ * the strerror(errorno) to handle the error message, so we don't have -+ * to print the error message here */ -+ -+int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl) -+{ -+ struct stat sbprev; -+ int fd_old, fd_new, n; -+ char buf[BUFSIZ]; -+ -+ /* Do the rename first */ -+ if (!rename(oldName, newName)) -+ return 0; -+ -+ /* If the errno is EXDEV, then read old file, write newfile and -+ * remove the oldfile */ -+ if (errno == EXDEV) { -+ /* Open the old file to read */ -+ if ((fd_old = open(oldName, O_RDONLY)) < 0) -+ return 1; -+ -+ /* Create the file to write, keep the same attribute as the old file */ -+ if (stat(oldName, &sbprev)) -+ return 1; -+ else { -+ if ((fd_new = createOutputFile(newName, -+ O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 ) -+ return 1; -+ } -+ -+ /* Read and write */ -+ while ((n = read(fd_old, buf, BUFSIZ)) > 0) -+ if (write(fd_new, buf, n) != n) -+ return 1; -+ -+ if ((close(fd_old) < 0) || -+ removeLogFile(oldName, log) || -+ (close(fd_new) < 0)) -+ return 1; -+ -+ return 0; -+ } -+ -+ return 1; -+} -+ - int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - struct logNames *rotNames) - { -@@ -1523,15 +1570,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - } - - message(MESS_DEBUG, -- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", -+ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n", - oldName, newName, rotateCount, logStart, i); - -- if (!debug && rename(oldName, newName)) { -+ if (!debug && mvFile(oldName, newName, log, prev_acl)) { - if (errno == ENOENT) { - message(MESS_DEBUG, "old log %s does not exist\n", - oldName); - } else { -- message(MESS_ERROR, "error renaming %s to %s: %s\n", -+ message(MESS_ERROR, "error moving %s to %s: %s\n", - oldName, newName, strerror(errno)); - hasErrors = 1; - } -@@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - return 1; - } - -- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], -+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], - tmpFilename); -- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) { -- message(MESS_ERROR, "failed to rename %s to %s: %s\n", -+ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { -+ message(MESS_ERROR, "failed to move %s to %s: %s\n", - log->files[logNum], tmpFilename, - strerror(errno)); - hasErrors = 1; - } - } - else { -- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], -+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], - rotNames->finalName); - if (!debug && !hasErrors && -- rename(log->files[logNum], rotNames->finalName)) { -- message(MESS_ERROR, "failed to rename %s to %s: %s\n", -+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { -+ message(MESS_ERROR, "failed to move %s to %s: %s\n", - log->files[logNum], tmpFilename, - strerror(errno)); - hasErrors = 1; -@@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force) - return hasErrors; - } - --static int writeState(char *stateFilename) -+static int writeState(struct logInfo *log, char *stateFilename) - { - struct logState *p; - FILE *f; -@@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename) - fclose(f); - - if (error == 0) { -- if (rename(tmpFilename, stateFilename)) { -+ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { - unlink(tmpFilename); - error = 1; - message(MESS_ERROR, "error renaming temp state file %s\n", -@@ -2525,7 +2572,7 @@ int main(int argc, const char **argv) - rc |= rotateLogSet(log, force); - - if (!debug) -- rc |= writeState(stateFile); -+ rc |= writeState(log, stateFile); - - return (rc != 0); - } diff --git a/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch deleted file mode 100644 index 793d702..0000000 --- a/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch +++ /dev/null @@ -1,32 +0,0 @@ -Disable the check for different filesystems - -The logrotate supports rotate log across different filesystems now, so -disable the check for different filesystems. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - config.c | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/config.c b/config.c -index dbbf563..64e66f6 100644 ---- a/config.c -+++ b/config.c -@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) - goto error; - } - } -- -- if (sb.st_dev != sb2.st_dev -- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) { -- message(MESS_ERROR, -- "%s:%d olddir %s and log file %s " -- "are on different devices\n", configFile, -- lineNum, newlog->oldDir, newlog->files[i]); -- goto error; -- } - } - } - diff --git a/recipes-extended/logrotate/logrotate/logrotate.conf b/recipes-extended/logrotate/logrotate/logrotate.conf deleted file mode 100644 index 353d9d0..0000000 --- a/recipes-extended/logrotate/logrotate/logrotate.conf +++ /dev/null @@ -1,36 +0,0 @@ -# see "man logrotate" for details -# rotate log files weekly -weekly - -# keep 4 weeks worth of backlogs -rotate 4 - -# create new (empty) log files after rotating old ones -create - -# do not use date as a suffix of the rotated file -# this seems to prevent multiple rotations of logs per day -nodateext - -# uncomment this if you want your log files compressed -#compress - -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d - -# no packages own wtmp and btmp -- we'll rotate them here -/var/log/wtmp { - monthly - create 0664 root utmp - minsize 1M - rotate 1 -} - -/var/log/btmp { - missingok - monthly - create 0600 root utmp - rotate 1 -} - -# system-specific logs may be also be configured here. diff --git a/recipes-extended/logrotate/logrotate/update-the-manual.patch b/recipes-extended/logrotate/logrotate/update-the-manual.patch deleted file mode 100644 index 50d037d..0000000 --- a/recipes-extended/logrotate/logrotate/update-the-manual.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Tue, 17 Feb 2015 21:14:37 -0800 -Subject: [PATCH] Update the manual - -Update the manual for rotating on different filesystems. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - logrotate.8 | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/logrotate.8 b/logrotate.8 -index e4e5f48..84407d0 100644 ---- a/logrotate.8 -+++ b/logrotate.8 -@@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). - - .TP - \fBolddir \fIdirectory\fR --Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR must be --on the same physical device as the log file being rotated, unless \fBcopy\fR, --\fBcopytruncate\fR or \fBrenamecopy\fR option is used. The \fIdirectory\fR --is assumed to be relative to the directory holding the log file --unless an absolute path name is specified. When this option is used all --old versions of the log end up in \fIdirectory\fR. This option may be -+Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR -+is assumed to be relative to the directory holding the log file unless -+an absolute path name is specified. When this option is used all old -+versions of the log end up in \fIdirectory\fR. This option may be - overridden by the \fBnoolddir\fR option. - - .TP --- -1.7.9.5 - diff --git a/recipes-extended/logrotate/logrotate_%.bbappend b/recipes-extended/logrotate/logrotate_%.bbappend deleted file mode 100644 index c8adb80..0000000 --- a/recipes-extended/logrotate/logrotate_%.bbappend +++ /dev/null @@ -1,20 +0,0 @@ -PR .= ".mlinux2" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI[md5sum] = "8572b7c2cf9ade09a8a8e10098500fb3" -SRC_URI[sha256sum] = "5bf8e478c428e7744fefa465118f8296e7e771c981fb6dffb7527856a0ea3617" - - -SRC_URI += "file://logrotate.conf" - -# consider Systemd here someday. Also prevent logrotate from starting if it is already running -# use startdaemon? -do_install_append() { - # setup cron to run logrotate more often - rm -f ${D}${sysconfdir}/cron.daily/logrotate - install -d ${D}${sysconfdir}/cron.d - echo "*/5 * * * * root /usr/sbin/logrotate /etc/logrotate.conf" > ${D}${sysconfdir}/cron.d/logrotate - - install -m 0644 ${WORKDIR}/logrotate.conf ${D}${sysconfdir}/ -} - diff --git a/recipes-extended/logrotate/logrotate_3.9.1-mlinux1.bb b/recipes-extended/logrotate/logrotate_3.9.1-mlinux1.bb deleted file mode 100644 index ef26ce4..0000000 --- a/recipes-extended/logrotate/logrotate_3.9.1-mlinux1.bb +++ /dev/null @@ -1,73 +0,0 @@ -SUMMARY = "Rotates, compresses, removes and mails system log files" -SECTION = "console/utils" -HOMEPAGE = "https://github.com/logrotate/logrotate/issues" -LICENSE = "GPLv2" - -# TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it. -# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? - -DEPENDS="coreutils popt" - -LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" - -# When updating logrotate to latest upstream, SRC_URI should point to -# a proper release tarball from https://github.com/logrotate/logrotate/releases -# and we have to take the snapshot for now because there is no such -# tarball available for 3.9.1. - -S = "${WORKDIR}/${BPN}-r3-9-1" - -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" - -SRC_URI = "https://github.com/${BPN}/${BPN}/archive/r3-9-1.tar.gz;downloadfilename=${BP}.tar.gz\ - file://act-as-mv-when-rotate.patch \ - file://update-the-manual.patch \ - file://disable-check-different-filesystems.patch \ - " - -SRC_URI[md5sum] = "8572b7c2cf9ade09a8a8e10098500fb3" -SRC_URI[sha256sum] = "5bf8e478c428e7744fefa465118f8296e7e771c981fb6dffb7527856a0ea3617" - -# PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" -PACKAGECONFIG ?= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ -" - -PACKAGECONFIG[acl] = ",,acl" -PACKAGECONFIG[selinux] = ",,libselinux" - -CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ - ${sysconfdir}/logrotate.conf" - -# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our -# optimization variables, so use it rather than EXTRA_CFLAGS. -EXTRA_OEMAKE = "\ - LFS= \ - OS_NAME='${OS_NAME}' \ - 'CC=${CC}' \ - 'RPM_OPT_FLAGS=${CFLAGS}' \ - 'EXTRA_LDFLAGS=${LDFLAGS}' \ - ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ -" - -# OS_NAME in the makefile defaults to `uname -s`. The behavior for -# freebsd/netbsd is questionable, so leave it as Linux, which only sets -# INSTALL=install and BASEDIR=/usr. -OS_NAME = "Linux" - -do_compile_prepend() { - # Make sure the recompile is OK - rm -f ${B}/.depend -} - -do_install(){ - oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} - mkdir -p ${D}${sysconfdir}/logrotate.d - mkdir -p ${D}${sysconfdir}/cron.daily - mkdir -p ${D}${localstatedir}/lib - install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf - install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate - touch ${D}${localstatedir}/lib/logrotate.status -} diff --git a/recipes-extended/mii-diag/mii-diag-2.11/libmii.c b/recipes-extended/mii-diag/mii-diag-2.11/libmii.c deleted file mode 100644 index 96f0060..0000000 --- a/recipes-extended/mii-diag/mii-diag-2.11/libmii.c +++ /dev/null @@ -1,630 +0,0 @@ -/* libmii.c: MII diagnostic and setup library. - - Copyright 1997-2003 by Donald Becker. - This version released under the Gnu General Public License, - incorporated herein by reference. - This source code may be distributed without modification using the - existing notice. Any modification to this source code must include a - full notice as described in the GPL - Contact the author for use under other terms. - - The author may be reached as becker@scyld.com, or C/O - Scyld Computing Corporation - 914 Bay Ridge Road, Suite 220 - Annapolis MD 21403 - - References - http://www.scyld.com/expert/NWay.html - http://www.national.com/pf/DP/DP83840A.html -*/ - -static const char version_msg[] = -"libmii.c:v2.11 2/28/2005 Donald Becker (becker@scyld.com)\n" -" http://www.scyld.com/diag/index.html\n"; - -/* This library exports the following functions: - IOADDR: A token passed to the mdio_read() function. - PHY_ID: The MII transceiver address, passed uninterpreted to mdio_read(). -*/ -void show_mii_details(long ioaddr, int phy_id); -int monitor_mii(long ioaddr, int phy_id); - -/* This library expects to be able to call the following functions: */ -extern int mdio_read(long ioaddr, int phy_id, int mii_reg_num); - -#include <unistd.h> -#include <stdio.h> -#include <time.h> -#include <sys/time.h> - -#include <sys/types.h> -typedef u_int32_t u32; -typedef u_int16_t u16; -typedef u_int8_t u8; - -static const char *media_names[] = { - "10baseT", "10baseT-FD", "100baseTx", "100baseTx-FD", "100baseT4", - "Flow-control", 0, -}; - -static void ns83843(long ioaddr, int phy_id); -static void qs6612(long ioaddr, int phy_id); -static void smsc83c180(long ioaddr, int phy_id); -static void tdk78q2120(long ioaddr, int phy_id); -static void davicom_dm9101(long ioaddr, int phy_id); -static void intel_i553(long ioaddr, int phy_id); -static void enablesemi(long ioaddr, int phy_id); -static void amd_pna(long ioaddr, int phy_id); -static void amd_tx(long ioaddr, int phy_id); -static void admtek(long ioaddr, int phy_id); -static void lu3x31(long ioaddr, int phy_id); -static void myson981(long ioaddr, int phy_id); -static void via_tahoe(long ioaddr, int phy_id); -static void via_vt6103(long ioaddr, int phy_id); -static void via_vt6105(long ioaddr, int phy_id); -static void intel(long ioaddr, int phy_id); - -struct mii_partnum { - const char *vendor; /* Vendor name. */ - u16 phy_id0; /* Vendor ID (alternate ver. of ieee_oui[]) */ - u16 phy_id1; /* Vendor ID (alternate ver. of ieee_oui[]) */ - unsigned char ieee_oui[3]; /* IEEE-assigned organizationally unique ID */ - char flags; - void (*(func))(long xcvr_if, int phy_id);/* Function to emit more info. */ -} static oui_map[] = { - {"Unknown transceiver type", 0x0000, 0x0000, {0,}, 0, NULL,}, - {"National Semiconductor 83840A", 0x2000, 0x5c01, {0,}, 0, NULL,}, - {"National Semiconductor 83843", 0x2000, 0x5c10, {0,}, 0, ns83843, }, - {"Level One LXT970", 0x7810, 0x0000, {0,}, 0, NULL, }, - {"Level One LXT971", 0x7810, 0x0001, {0,}, 0, NULL, }, - {"Level One LXT971A",0x7810, 0x0003, {0,}, 0, NULL, }, - {"Level One (unknown type)", 0, 0, {0x1e,0x04,0x00}, 0, NULL, }, - {"Davicom DM9101", 0x0181, 0xB800, {0,}, 0, davicom_dm9101, }, - {"Davicom (unknown type)", 0, 0, {0x00, 0x60, 0x6e}, 0, davicom_dm9101, }, - {"Quality Semiconductor QS6612", 0x0181, 0x4410, {0,}, 0, qs6612}, - {"Quality Semiconductor (unknown type)", 0,0, {0x00, 0x60, 0x51}, 0, NULL}, - {"SMSC 83c180", 0x0282, 0x1C51, {0}, 0, smsc83c180, }, - {"TDK Semi 78Q2120 rev. 2", 0x0300, 0xE542, {0,}, 0, tdk78q2120, }, - {"TDK Semi 78Q2120 rev. 3", 0x0300, 0xE543, {0,}, 0, tdk78q2120, }, - {"TDK Semi 78Q2120 rev. 11", 0x0300, 0xE54B, {0,}, 0, tdk78q2120, }, - {"TDK transceiver (unknown type)", 0,0, {0x00, 0xc0, 0x39}, 0, tdk78q2120}, - {"Intel (unknown type)", 0,0, {0x00, 0xf8, 0x00}, 0, intel_i553}, - {"Enable Semiconductor EL40-331", 0x0043, 0x7411, {0,}, 0, enablesemi}, - {"AMD 79c901A.1 HomePNA", 0x0000, 0x6B91, {0,}, 0, amd_pna}, - {"AMD 79c901A.2 HomePNA", 0x0000, 0x6B92, {0,}, 0, amd_pna}, - {"AMD 79c901A.3 HomePNA", 0x0000, 0x6B93, {0,}, 0, amd_pna}, - {"AMD 79c901A.3 10baseT", 0x0000, 0x6B71, {0,}, 0, amd_tx}, - {"AdHoc Technology AH101LF", 0x0022, 0x561B, {0,}, 0, tdk78q2120}, - {"Altimata Communications AC101LF", 0x0022, 0x5523, {0,}, 0, tdk78q2120}, - {"Altimata Comm (unknown type)", 0, 0, {0x00,0x10,0xA9}, 0, tdk78q2120}, - {"ASIX (unknown type)", 0, 0, {0x00,0xC0,0xB4}, 0, tdk78q2120}, - {"ADMtek AN983 Comet", 0x0022, 0x5410, {0,}, 0, admtek}, - {"ADMtek AN985 Comet", 0x0022, 0x5513, {0,}, 0, admtek}, - {"ADMtek (unknown type)", 0, 0, {0x00,0xe0,0x92}, 0, admtek}, - {"Lucent LU6612", 0x0180, 0x7641, {0,}, 0, qs6612}, - {"Lucent LU3X31", 0x0043, 0x7411, {0,}, 0, lu3x31}, - {"LSI Logic (Seeq) 80225", 0, 0, {0x00,0xA0,0x7D}, 0, NULL}, - {"Myson MTD981", 0x0302, 0xD000, {0,}, 0, myson981}, - {"Myson (unknown type)", 0, 0, {0x00,0xC0,0xB4,}, 0, myson981}, - {"Alta/Kendin Sundance", 0x0022, 0x1720, {0,}, 0, NULL}, - {"Alta/Kendin Sundance", 0, 0, {0x00,0x08,0x85}, 0, NULL}, - {"VIA Tahoe VT6103", 0x0101, 0x8f20, {0,}, 0, via_vt6103}, - {"VIA Tahoe VT6104", 0x0101, 0x8f30, {0,}, 0, via_tahoe}, - {"VIA Rhine VT6105", 0x0101, 0x8f22, {0,}, 0, via_vt6105}, - {"Intel 82557 series", 0x02a8, 0x0150, {0,}, 0, intel}, - {"Intel 82555 rev 1", 0x02a8, 0x0151, {0,}, 0, intel}, - {"Intel 82559 transceiver", 0x02a8, 0x0154, {0,}, 0, intel}, - {"Intel 82555 series transceiver", 0,0, {0x00,0xaa,0x00}, 0, intel}, - {0, }, -}; - -static u16 mii_val[32]; - -void show_mii_details(long ioaddr, int phy_id) -{ - int mii_reg, i, vendor = 0; - u16 bmcr, bmsr, new_bmsr; - - /* This may not be omitted from the output. */ - printf("%s", version_msg); - printf(" MII PHY #%d transceiver registers:", phy_id); - for (mii_reg = 0; mii_reg < 32; mii_reg++) { - mii_val[mii_reg] = mdio_read(ioaddr, phy_id, mii_reg); - printf("%s %4.4x", (mii_reg % 8) == 0 ? "\n " : "", - mii_val[mii_reg]); - } - printf(".\n"); - if (mii_val[0] == 0xffff) { - printf(" No MII transceiver present!.\n"); - return; - } - bmcr = mii_val[0]; - bmsr = mii_val[1]; - printf(" Basic mode control register 0x%4.4x:", bmcr); - if (bmcr & 0x1000) - printf(" Auto-negotiation enabled.\n"); - else - printf(" Auto-negotiation disabled!\n" - " Speed fixed at 10%s mbps, %s-duplex.\n", - bmcr & 0x2000 ? "0" : "", - bmcr & 0x0100 ? "full":"half"); - if (bmcr & 0x8000) - printf(" Transceiver currently being reset!\n"); - if (bmcr & 0x4000) - printf(" Transceiver in loopback mode!\n"); - if (bmcr & 0x0800) - printf(" Transceiver powered down!\n"); - if (bmcr & 0x0400) - printf(" Transceiver isolated from the MII!\n"); - if (bmcr & 0x0200) - printf(" Restarted auto-negotiation in progress!\n"); - if (bmcr & 0x0080) - printf(" Internal Collision-Test enabled!\n"); - - new_bmsr = mdio_read(ioaddr, phy_id, 1); - printf(" Basic mode status register 0x%4.4x ... %4.4x.\n" - " Link status: %sestablished.\n" - " Capable of ", - bmsr, new_bmsr, - bmsr & 0x0004 ? "" : - (new_bmsr & 0x0004) ? "previously broken, but now re" : "not "); - if (bmsr & 0xF800) { - for (i = 15; i >= 11; i--) - if (bmsr & (1<<i)) - printf(" %s", media_names[i-11]); - } else - printf("<Warning! No media capabilities>"); - - printf(".\n" - " %s to perform Auto-negotiation, negotiation %scomplete.\n", - bmsr & 0x0008 ? "Able" : "Unable", - bmsr & 0x0020 ? "" : "not "); - - if (bmsr & 0x0010) - printf(" Remote fault detected!\n"); - if (bmsr & 0x0002) - printf(" *** Link Jabber! ***\n"); - - if (mii_val[2] ^ mii_val[3]) { /* Eliminate 0x0000 and 0xffff IDs. */ - unsigned char oui_0 = mii_val[2] >> 10; - unsigned char oui_1 = mii_val[2] >> 2; - unsigned char oui_2 = (mii_val[2] << 6) | (mii_val[3] >> 10); - - printf(" Vendor ID is %2.2x:%2.2x:%2.2x:--:--:--, model %d rev. %d.\n", - oui_0, oui_1, oui_2, - ((mii_val[3] >> 4) & 0x3f), mii_val[3] & 0x0f); - for ( i = 0; oui_map[i].vendor; i++) - /* We match either the Phy ID or the IEEE OUI. */ - if ((oui_map[i].phy_id0 == mii_val[2] && - oui_map[i].phy_id1 == mii_val[3]) || - (oui_map[i].ieee_oui[0] == oui_0 && - oui_map[i].ieee_oui[1] == oui_1 && - oui_map[i].ieee_oui[2] == oui_2)) { - printf(" Vendor/Part: %s.\n", oui_map[i].vendor); - vendor = i; - break; - } - if (oui_map[i].vendor == NULL) - printf(" No specific information is known about this transceiver" - " type.\n"); - } else - printf(" This transceiver has no vendor identification.\n"); - - { - int nway_advert = mii_val[4]; - int lkpar = mii_val[5]; - printf(" I'm advertising %4.4x:", nway_advert); - for (i = 10; i >= 5; i--) - if (nway_advert & (1<<i)) - printf(" %s", media_names[i-5]); - printf("\n Advertising %sadditional info pages.\n", - nway_advert & 0x8000 ? "" : "no "); - if ((nway_advert & 31) == 1) - printf(" IEEE 802.3 CSMA/CD protocol.\n"); - else - printf(" Using an unknown (non 802.3) encapsulation.\n"); - printf(" Link partner capability is %4.4x:", - lkpar); - for (i = 10; i >= 5; i--) - if (lkpar & (1<<i)) - printf(" %s", media_names[i-5]); - printf(".\n Negotiation %s.\n", - lkpar & 0x4000 ? " completed" : "did not complete"); - } - if (oui_map[vendor].func) - oui_map[vendor].func(ioaddr, phy_id); - -} - -int monitor_mii(long ioaddr, int phy_id) -{ - int i, last_event = 0; - unsigned short new_1, baseline_1 = mdio_read(ioaddr, phy_id, 1); - struct timeval tv, sleepval; - time_t cur_time; - char timebuf[12]; - - if (baseline_1 == 0xffff) { - fprintf(stderr, "No MII transceiver present to monitor.\n"); - return -1; - } - - gettimeofday(&tv, NULL); - cur_time = tv.tv_sec; - strftime(timebuf, sizeof(timebuf), "%H:%M:%S", localtime(&cur_time)); - - printf("Monitoring the MII transceiver status.\n" - "%s.%03d Baseline value of MII BMSR (basic mode status register)" - " is %4.4x.\n", timebuf, (int)tv.tv_usec/1000, baseline_1); - while (1) { - new_1 = mdio_read(ioaddr, phy_id, 1); - if (new_1 == 0xffff) { - fprintf(stderr, "The MII transceiver is no longer accessable!\n"); - return -1; - } - if (new_1 != baseline_1) { - gettimeofday(&tv, NULL); - cur_time = tv.tv_sec; - strftime(timebuf, sizeof(timebuf), "%H:%M:%S", - localtime(&cur_time)); - printf("%s.%03d MII BMSR now %4.4x: %4s link, NWay %s, " - "%3sJabber%s (%4.4x).\n", - timebuf, (int)tv.tv_usec/1000, new_1, - new_1 & 0x04 ? "Good" : "no", - new_1 & 0x20 ? "done" : "busy", - new_1 & 0x02 ? "" : "No ", - new_1 & 0x10 ? ", remote fault" : "", - mdio_read(ioaddr, phy_id, 5) - ); - if (!(baseline_1 & 0x20) && (new_1 & 0x20)) { - int lkpar = mdio_read(ioaddr, phy_id, 5); - printf(" New link partner capability is %4.4x %4.4x:", - lkpar, mdio_read(ioaddr, phy_id, 6)); - switch (lkpar) { - case 0x45e1: printf(" 10/100 switch w/ flow control"); break; - case 0x41e1: printf(" 10/100 HD+FD switch"); break; - case 0x40a1: printf(" 10/100 bridged repeater"); break; - case 0x4081: printf(" 100baseTx repeater w/autonegotation"); - break; - case 0x0081: printf(" 100baseTx (no autonegotation)"); break; - case 0x4021: printf(" 10baseT repeater w/autonegotation"); - break; - case 0x0021: printf(" 10baseT (no autonegotation)"); break; - default: - for (i = 9; i >= 5; i--) - if (lkpar & (1<<i)) - printf(" %s", media_names[i-5]); - } - printf(".\n"); - } - fflush(stdout); - baseline_1 = new_1; - last_event = 0; - } - sleepval.tv_sec = 0; - sleepval.tv_usec = last_event++ > 30 ? 200000 : 1000; - select(0, 0, 0, 0, &sleepval); /* Or just sleep(1); */ - } - printf(" Value of MII BMSR (basic mode status register) is %4.4x.\n", - mdio_read(ioaddr, phy_id, 1)); - return 0; -} - -/* Emit transceiver-specific info. */ - -struct msg_tbl { int bitmask; char *msg; }; - -static void msg_if_set(const int val, const struct msg_tbl msg_tbl[]) -{ - int i; - for (i = 0; msg_tbl[i].bitmask; i++) - if (msg_tbl[i].bitmask & val) - printf(" %s\n", msg_tbl[i].msg); -} - -static void msg_if_set_fmt(const int val, const struct msg_tbl msg_tbl[], - const char *fmt) -{ - int i; - for (i = 0; msg_tbl[i].bitmask; i++) - if (msg_tbl[i].bitmask & val) - printf(fmt, msg_tbl[i].msg); -} - -static void qs6612(long ioaddr, int phy_id) -{ - printf(" QS6612 extra registers: Mode %4.4x.\n" - " Interrupt source %4.4x, mask %4.4x.\n" - " PHY control %4.4x.\n", - mii_val[17], mii_val[29], mii_val[30], mii_val[31]); - return; -} - -static void ns83843(long ioaddr, int phy_id) -{ - printf(" NatSemi 83843 extra registers:\n" - " PHY status %4.4x\n" - " %s link, %d Mb/sec %s duplex\n" - " MII interrupts %sabled, %s pending.\n" - " Events since last read\n" - " Link disconnects %d\n" - " False carriers %d\n" - " Receive errors %d\n" - " Link beat is currently %sstable\n", - mii_val[0x10], - mii_val[10] & 0x0001 ? "Valid" : "Invalid", - mii_val[10] & 0x0002 ? 10 : 100, - mii_val[10] & 0x0004 ? "full" : "half", - mii_val[0x11] & 0x0002 ? "en":"dis", - mii_val[0x10] & 0x0100 ? "interrupt": "none", - mii_val[0x13], mii_val[0x14], mii_val[0x15], - mii_val[0x16] & 0x0010 ? "UN" : ""); - return; -} -static void smsc83c180(long ioaddr, int phy_id) -{ - int mii_reg25 = mii_val[25]; - printf(" SMSC 83c180 extra registers:\n" - " Auto-negotiation status 0x%4.4x.\n" - " 10baseT polarity is %s.\n" - " PHY address is %d.\n" - " Auto-negotiation %scomplete, 1%s0Mbps %s duplex.\n" - " Rx symbol errors since last read %d.\n", - mii_reg25, - mii_reg25 & 0x2000 ? "normal" : "reversed", - (mii_reg25>>8) & 0x1F, - mii_reg25 & 0x0080 ? "did not " : "", - mii_reg25 & 0x0020 ? "0" : "", - mii_reg25 & 0x0040 ? "full" : "half", - mdio_read(ioaddr, phy_id, 26)); - return; -} - -static const char *tdk_events[8] = { - "Jabber", "Rx error", "Negotiation page received", "Link detection fault", - "Link partner acknowledge", "Link status change", "Remote partner fault", - "Auto-Negotiation complete"}; - -static const struct msg_tbl tdk_reg16[] = { - {0x8000, " Transceiver is in repeater mode!"}, - {0x4000, " Interrupt pin set to active high."}, - {0x2000, " Reserved bit 12 is unexpectedly set."}, - {0x1000, " Transmit pins are internally disconnected."}, - {0x0800, " 10baseT signal quality test is disabled."}, - {0x0400, " 10baseT loopback mode."}, - {0, 0}, -}; - -static void tdk78q2120(long ioaddr, int phy_id) -{ - int mii_reg16 = mii_val[16]; - int mii_reg17 = mii_val[17]; - int mii_reg18 = mii_val[18]; - int i; - printf(" TDK format vendor-specific registers 16..18 are " - "0x%4.4x 0x%4.4x 0x%4.4x\n", mii_reg16, mii_reg17, mii_reg18); - printf(" Link polarity is %s %s.\n" - "%s%s" - " Auto-negotiation %s, 1%s0Mbps %s duplex.\n" - " Rx link in %s state, PLL %s.\n", - mii_reg16 & 0x0020 ? "OVERRIDDEN to" : "detected as", - mii_reg16 & 0x0010 ? "reversed" : "normal", - mii_reg16 & 0x0002 ? - " 100baseTx Coding and scrambling is disabled!\n":"", - mii_reg16 & 0x0001 ? " Rx_CLK power-save mode is enabled!\n":"", - mii_reg18 & 0x1000 ? "had no common media" : "complete", - mii_reg18 & 0x0400 ? "0" : "", - mii_reg18 & 0x0800 ? "full" : "half", - mii_reg18 & 0x0200 ? "pass" : "fail", - mii_reg18 & 0x0100 ? "slipped since last read" : "locked"); - - msg_if_set(mii_reg16, tdk_reg16); - if (mii_reg17 & 0x00ff) { - printf(" Events since last read:"); - for (i = 0; i < 8; i++) - if (mii_reg17 & (1 << i)) - printf(" %s", tdk_events[i]); - } else - printf(" No new link status events."); - - if (mii_reg17 & 0xff00) { - printf("\n Events that will raise an interrupt:"); - for (i = 0; i < 8; i++) - if (mii_reg17 & (0x100 << i)) - printf(" %s", tdk_events[i]); - } - printf("\n"); - return; -} - -static void davicom_dm9101(long ioaddr, int phy_id) -{ - printf(" Davicom vendor specific registers: 0x%4.4x 0x%4.4x 0x%4.4x.\n", - mii_val[16], mii_val[17], mii_val[18]); -} -static void intel_i553(long ioaddr, int phy_id) -{ - printf(" This transceiver is 100baseT4 only! Register 16 is %4.4x.\n", - mii_val[16]); -} -/* http://www.enablesemi.com/cgi-bin/byteserve/Products/Docs/3VCardBus.pdf */ -static void enablesemi(long ioaddr, int phy_id) -{ - printf(" Isolated %d times, %d false carrier events, %d Rx errors.\n", - mii_val[18], mii_val[19], mii_val[21]); - printf(" Cable polarity is %s, 100Mb PLL is %slocked.\n", - mii_val[28]&0x8000 ? "reversed" : "normal", - mii_val[27]&0x2000 ? "" : "un"); -} -/* The amd79c901 contains both PNA and 10/100 management registers. - http://www.amd.com/products/npd/techdocs/22304.pdf -*/ -static void amd_pna(long ioaddr, int phy_id) -{ - printf(" HomePNA transceiver in %s speed, %s power mode.\n", - mii_val[16] & 4 ? "high" : "low", - mii_val[16] & 2 ? "high" : "low"); - printf(" HomePNA noise level %d, peak power %d..\n", - mii_val[25] >> 8, mii_val[25] & 0xff); -} -static void amd_tx(long ioaddr, int phy_id) -{ - int mii_reg25 = mii_val[25]; - printf(" AMD vendor specific registers: 0x%4.4x 0x%4.4x 0x%4.4x.\n", - mii_val[16], mii_val[17], mii_val[18]); - printf(" The link is %s in 10%s %s duplex mode, autonegotiation state " - "has%s changed.\n", - mii_reg25 & 8 ? "up" : "down", - mii_reg25 & 1 ? "0baseTx" : "baseT", - mii_reg25 & 4 ? "full" : "half", - mii_reg25 & 2 ? "" : " not"); -} - -static const struct msg_tbl admtek_reg21[] = { - {0x4000, " Link test diabled: Ignoring lack of 10baseT link beat."}, - {0x2000, " Link forced up."}, - {0x1000, " Tx jabber check disabled."}, - {0x0080, " Transmitting 'Far End Fault'!"}, - {0x0040, " Rx error count full."}, - {0x0008, " Remote loop back enabled."}, - {0, 0}, -}; - -static void admtek(long ioaddr, int phy_id) -{ - - printf(" ADMtek vendor specific registers information:\n" - " Cable length is approximately %d meters.\n" - " The receiver has lost lock %d times since last check and " - "had %d error events.\n", - ((mii_val[20] & 0x00f0) >> 4)*10, - mii_val[23], mii_val[23]); - msg_if_set(mii_val[21], admtek_reg21); - tdk78q2120(ioaddr, phy_id); -} - -static void lu3x31(long ioaddr, int phy_id) -{ - printf(" Lucent vendor specific registers 17: 0x%4.4x" - " 29: 0x%4.4x 30: 0x%4.4x 31: 0x%4.4x.\n", - mii_val[17], mii_val[29], mii_val[30], mii_val[31]); -} - -static const struct msg_tbl myson_reg16[] = { - {0x0080, " Far end fault enabled."}, - {0x0040, " Transformer ratio 1.25:1."}, - {0x0020, " Polarity correction diabled."}, - {0x0010, " Link is forced up regardless of link beat."}, - {0x0004, " Bypass Jabber check."}, - {0x0001, " 100baseFx mode selected."}, - {0, 0}, -}; - -static void myson981(long ioaddr, int phy_id) -{ - int i, mii_reg17 = mii_val[17]; - - printf(" Myson mtd981 extra registers: %4.4x %4.4x %4.4x %4.4x.\n", - mii_val[16], mii_val[17], mii_val[18], mii_val[19]); - msg_if_set(mii_val[16] & 0xC800, tdk_reg16); - msg_if_set(mii_val[16], myson_reg16); - - if (mii_reg17 & 0x00ff) { - printf(" Events since last read:"); - for (i = 0; i < 8; i++) - if (mii_reg17 & (1 << i)) - printf(" %s", tdk_events[i]); - } else - printf(" No new link status events."); - if (mii_reg17 & 0xff00) { - printf("\n Events that will raise an interrupt:"); - for (i = 0; i < 8; i++) - if (mii_reg17 & (0x100 << i)) - printf(" %s", tdk_events[i]); - } - printf("\n"); - - return; -} - -/* These are much like the TDK events in reversed order. */ -static const struct msg_tbl via_reg17[] = { - {0x0001, "Auto-Negotiation complete"}, - {0x0002, "Remote fault detected"}, - {0x0004, "Link failure detected"}, - {0x0008, "Bad Start Stream detected"}, - {0x0010, "Parallel detection fault"}, - {0x0020, "Extended negotiation page received"}, - {0x0040, "5B/4B code error detected"}, - {0x0080, "Jabber detected"}, - {0, 0}, -}; - -static void via_tahoe(long ioaddr, int phy_id) -{ - int mii_reg16 = mii_val[16]; - int mii_reg17 = mii_val[17]; - int mii_reg18 = mii_val[18]; - - printf(" VIA Tahoe extended registers: 16 %4.4x #17 %4.4x #18 %4.4x.\n", - mii_reg16, mii_reg17, mii_reg18); - msg_if_set_fmt(mii_reg17, via_reg17, " %s\n"); - printf(" Link %s 10%s Mbps %s duplex\n", - mii_reg18 & 0x2000 ? "up" : "down", - mii_reg18 & 0x0400 ? "0" : "", - mii_reg18 & 0x0800 ? "full" : "half"); -} - -/* Information from - http://www.via.com.tw/en/datasheet/DS6103110.pdf -*/ - -static void via_vt6103(long ioaddr, int phy_id) -{ - printf(" VIA vt6103 error counts since the last check:\n" - " The link has failed %d times.\n" - " The receiver has lost lock %d times.\n" - " There have been %d false carrier/SQE error.\n", - mii_val[21], mii_val[22], mii_val[23]); -} - -/* Information from - http://www.via.com.tw/en/Networking/DS6105LOM100.pdf -*/ - -static void via_vt6105(long ioaddr, int phy_id) -{ - printf(" VIA vt6105 PHY status:\n" - " Duplex %s speed %s\n", - mii_val[20] & 0x0001 ? "full" : "half", - mii_val[20] & 0x0002 ? "100" : "10"); -} - -/* Information from - http://www.via.com.tw/en/Networking/DS6105LOM100.pdf -*/ -static void intel(long ioaddr, int phy_id) -{ - printf(" Intel 8255* PHY #%d extended management registers:\n" - " Error counts, cleared when read:\n" - " False carriers %d\n" - " Link disconnects %d\n" - " Receive errors %d\n" - " Rx symbol errors %d.\n" - " Rx 10Mbps Early End-Of-Frame errors %d.\n" - " Rx 100Mbps Early End-Of-Frame errors %d.\n" - " Tx jabber errors %d.\n", - mii_val[18], - mii_val[19], mii_val[20], mii_val[21], mii_val[22], mii_val[23], - mii_val[24], mii_val[25]); -} - - -/* - * Local variables: - * compile-command: "cc -O -Wall -c libmii.c" - * c-indent-level: 4 - * c-basic-offset: 4 - * tab-width: 4 - * End: - */ diff --git a/recipes-extended/mii-diag/mii-diag-2.11/mii-diag.c b/recipes-extended/mii-diag/mii-diag-2.11/mii-diag.c deleted file mode 100644 index 3c47e4a..0000000 --- a/recipes-extended/mii-diag/mii-diag-2.11/mii-diag.c +++ /dev/null @@ -1,648 +0,0 @@ -/* Mode: C; - * mii-diag.c: Examine and set the MII registers of a network interfaces. - - Usage: mii-diag [-vw] interface. - - This program reads and writes the Media Independent Interface (MII) - management registers on network transceivers. The registers control - and report network link settings and errors. Examples are link speed, - duplex, capabilities advertised to the link partner, status LED - indications and link error counters. - - Notes: - The compile-command is at the end of this source file. - This program works with drivers that implement MII ioctl() calls. - - Written/copyright 1997-2003 by Donald Becker <becker@scyld.com> - - This program is free software; you can redistribute it - and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation. - - The author may be reached as becker@scyld.com, or C/O - Scyld Computing Corporation - 914 Bay Ridge Road, Suite 220 - Annapolis MD 21403 - - References - http://scyld.com/expert/mii-status.html - http://scyld.com/expert/NWay.html - http://www.national.com/pf/DP/DP83840.html -*/ - -static char version[] = -"mii-diag.c:v2.11 3/21/2005 Donald Becker (becker@scyld.com)\n" -" http://www.scyld.com/diag/index.html\n"; - -static const char usage_msg[] = -"Usage: %s [--help] [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n"; -static const char long_usage_msg[] = -"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n" -"\n" -" This program configures and monitors the transceiver management registers\n" -" for network interfaces. It uses the Media Independent Interface (MII)\n" -" standard with additional Linux-specific controls to communicate with the\n" -" underlying device driver. The MII registers control and report network\n" -" link settings and errors. Examples are link speed, duplex, capabilities\n" -" advertised to the link partner, status LED indications and link error\n" -" counters.\n" -"\n" -" The common usage is\n" -" mii-diag eth0\n" -"\n" -" The default interface is \"eth0\".\n" -" Frequently used options are\n" -" -A --advertise <speed|setting>\n" -" -F --fixed-speed <speed>\n" -" Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD,\n" -" 10baseT, 10baseT-FD, 10baseT-HD\n" -" -s --status Return exit status 2 if there is no link beat.\n" -"\n" -" Less frequently used options are\n" -" -a --all-interfaces Show the status all interfaces\n" -" (Not recommended with options that change settings.)\n" -" -D --debug\n" -" -g --read-parameters Get driver-specific parameters.\n" -" -G --set-parameters PARMS Set driver-specific parameters.\n" -" Parameters are comma separated, missing elements retain existing value.\n" -" -M --msg-level LEVEL Set the driver message bit map.\n" -" -p --phy ADDR Set the PHY (MII address) to report.\n" -" -r --restart Restart the link autonegotiation.\n" -" -R --reset Reset the transceiver.\n" -" -v --verbose Report each action taken.\n" -" -V --version Emit version information.\n" -" -w --watch Continuously monitor the transceiver and report changes.\n" -"\n" -" This command returns success (zero) if the interface information can be\n" -" read. If the --status option is passed, a zero return means that the\n" -" interface has link beat.\n"; - -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <ctype.h> -#include <string.h> -#include <errno.h> -#include <fcntl.h> -#include <getopt.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/ioctl.h> -#include <net/if.h> -#ifdef use_linux_libc5 -#include <linux/if_arp.h> -#include <linux/if_ether.h> -#endif - -typedef u_int32_t u32; -typedef u_int16_t u16; -typedef u_int8_t u8; - -#if defined(SIOCGPARAMS) && SIOCGPARAMS != SIOCDEVPRIVATE+3 -#error Changed definition for SIOCGPARAMS -#else -#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters. */ -#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters. */ -#endif - -const char shortopts[] = "aA:C:DfF:gG:hmM:p:rRsvVw?"; -struct option longopts[] = { - /* { name has_arg *flag val } */ - {"all-interfaces", 0, 0, 'a'}, /* Show all interfaces. */ - {"advertise", 1, 0, 'A'}, /* Change the capabilities advertised. */ - {"BMCR", 1, 0, 'C'}, /* Set the control register. */ - {"debug", 0, 0, 'D'}, /* Increase the debug level. */ - {"force", 0, 0, 'f'}, /* Force the operation. */ - {"fixed-speed", 1, 0, 'F'}, /* Fixed speed name. */ - {"read-parameters", 0, 0, 'g'}, /* Show general settings values. */ - {"set-parameters", 1, 0, 'G'}, /* Write general settings values. */ - {"help", 0, 0, 'h'}, /* Print a long usage message. */ - {"monitor", 0, 0, 'm'}, /* Monitor status register. */ - {"msg-level", 1, 0, 'M'}, /* Set the driver message level. */ - {"phy", 1, 0, 'p'}, /* Set the PHY (MII address) to report. */ - {"restart", 0, 0, 'r'}, /* Restart the link negotiation */ - {"reset", 0, 0, 'R'}, /* Reset the transceiver. */ - {"status", 0, 0, 's'}, /* Non-zero exit status w/ no link beat. */ - {"verbose", 0, 0, 'v'}, /* Report each action taken. */ - {"version", 0, 0, 'V'}, /* Emit version information. */ - {"watch", 0, 0, 'w'}, /* Constantly monitor the port. */ - {"error", 0, 0, '?'}, /* Return the error message. */ - { 0, 0, 0, 0 } -}; - -/* Usually in libmii.c, but trivial substitions are below. */ -extern int show_mii_details(long ioaddr, int phy_id); -extern void monitor_mii(long ioaddr, int phy_id); -int show_mii_details(long ioaddr, int phy_id) __attribute__((weak)); -void monitor_mii(long ioaddr, int phy_id) __attribute__((weak)); - - -/* Command-line flags. */ -unsigned int opt_a = 0, /* Show-all-interfaces flag. */ - opt_f = 0, /* Force the operation. */ - opt_g = 0, - opt_G = 0, - verbose = 0, /* Verbose flag. */ - debug = 0, - opt_version = 0, - opt_restart = 0, - opt_reset = 0, - opt_status = 0, - opt_watch = 0; -static int msg_level = -1; -static int set_BMCR = -1; -static int nway_advertise = 0; -static int fixed_speed = -1; -static int override_phy = -1; -char *opt_G_string = NULL; - -/* Internal values. */ -int new_ioctl_nums; -int skfd = -1; /* AF_INET socket for ioctl() calls. */ -struct ifreq ifr; - -int do_one_xcvr(int skfd); -int show_basic_mii(long ioaddr, int phy_id); -int mdio_read(int skfd, int phy_id, int location); -void mdio_write(int skfd, int phy_id, int location, int value); -static int parse_advertise(const char *capabilities); -static void monitor_status(long ioaddr, int phy_id); - - -int -main(int argc, char **argv) -{ - int c, errflag = 0; - char **spp, *ifname; - char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0]; - - while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF) - switch (c) { - case 'a': opt_a++; break; - case 'A': nway_advertise |= parse_advertise(optarg); - if (nway_advertise == -1) errflag++; - break; - case 'C': set_BMCR = strtoul(optarg, NULL, 16); break; - case 'D': debug++; break; - case 'f': opt_f++; break; - case 'F': fixed_speed = parse_advertise(optarg); - if (fixed_speed == -1) errflag++; - break; - case 'g': opt_g++; break; - case 'G': opt_G++; opt_G_string = strdup(optarg); break; - case 'm': opt_watch++; opt_status++; break; - case 'M': msg_level = strtoul(optarg, NULL, 0); break; - case 'h': fprintf(stderr, long_usage_msg, progname); return 0; - case 'p': override_phy = atoi(optarg); break; - case 'r': opt_restart++; break; - case 'R': opt_reset++; break; - case 's': opt_status++; break; - case 'v': verbose++; break; - case 'V': opt_version++; break; - case 'w': opt_watch++; break; - case '?': errflag++; break; - } - if (errflag) { - fprintf(stderr, usage_msg, progname); - return 2; - } - - if (verbose || opt_version) - printf(version); - - /* Open a basic socket. */ - if ((skfd = socket(AF_INET, SOCK_DGRAM,0)) < 0) { - perror("socket"); - return 1; - } - - if (debug) - fprintf(stderr, "DEBUG: argc=%d, optind=%d and argv[optind] is %s.\n", - argc, optind, argv[optind]); - - /* No remaining args means show all interfaces. */ - if (optind == argc) { - ifname = "eth0"; - fprintf(stderr, "Using the default interface 'eth0'.\n"); - } else { - /* Copy the interface name. */ - spp = argv + optind; - ifname = *spp++; - } - - if (ifname == NULL) { - ifname = "eth0"; - fprintf(stderr, "Using the default interface 'eth0'.\n"); - } - - /* Verify that the interface supports the ioctl(), and if - it is using the new or old SIOCGMIIPHY value (grrr...). - */ - { - u16 *data = (u16 *)(&ifr.ifr_data); - - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - data[0] = 0; - - if (ioctl(skfd, 0x8947, &ifr) >= 0) { - new_ioctl_nums = 1; - } else if (ioctl(skfd, SIOCDEVPRIVATE, &ifr) >= 0) { - new_ioctl_nums = 0; - } else { - fprintf(stderr, "SIOCGMIIPHY on %s failed: %s\n", ifname, - strerror(errno)); - (void) close(skfd); - return 1; - } - if (verbose) - printf(" Using the %s SIOCGMIIPHY value on PHY %d " - "(BMCR 0x%4.4x).\n", - new_ioctl_nums ? "new" : "old", data[0], data[3]); - } - - do_one_xcvr(skfd); - - (void) close(skfd); - return 0; -} - -int do_one_xcvr(int skfd) -{ - u16 *data = (u16 *)(&ifr.ifr_data); - u32 *data32 = (u32 *)(&ifr.ifr_data); - unsigned phy_id = data[0]; - - if (override_phy >= 0) { - printf("Using the specified MII PHY index %d.\n", override_phy); - phy_id = override_phy; - } - - if (opt_g || opt_G || msg_level >= 0) { - if (ioctl(skfd, SIOCGPARAMS, &ifr) < 0) { - fprintf(stderr, "SIOCGPARAMS on %s failed: %s\n", ifr.ifr_name, - strerror(errno)); - return -1; - } - } - if (opt_g) { - int i; - printf("Driver general parameter settings:"); - for (i = 0; i*sizeof(u32) < sizeof(ifr.ifr_ifru); i++) { - printf(" %d", data32[i]); - } - printf(".\n"); - } - if (opt_G) { - /* Set up to four arbitrary driver parameters from the -G parameter. - The format is comma separated integers, with a missing element - retaining the previous value. - */ - char *str = opt_G_string; - int i; - for (i = 0; str && i < 4; i++) { - char *endstr; - u32 newval = strtol(str, &endstr, 0); - if (debug) - printf(" parse string '%s' value %d end '%s'.\n", - str, newval, endstr); - if (str == endstr) { - if (endstr[0] == ',') /* No parameter */ - str = endstr+1; - else { - fprintf(stderr, "Invalid driver parameter '%s'.\n", str); - str = index(str, ','); - } - } else if (endstr[0] == ',') { - data32[i] = newval; - str = endstr + 1; - } else if (endstr[0] == 0) { - data32[i] = newval; - break; - } - } - printf("Setting new driver general parameters:"); - for (i = 0; i*sizeof(u32) < sizeof(ifr.ifr_ifru); i++) { - printf(" %d", data32[i]); - } - printf(".\n"); - if (ioctl(skfd, SIOCSPARAMS, &ifr) < 0) { - fprintf(stderr, "SIOCSPARAMS on %s failed: %s\n", ifr.ifr_name, - strerror(errno)); - return -1; - } - } - if (msg_level >= 0) { - data32[0] = msg_level; - if (ioctl(skfd, SIOCSPARAMS, &ifr) < 0) { - fprintf(stderr, "SIOCSPARAMS on %s failed: %s\n", ifr.ifr_name, - strerror(errno)); - return -1; - } - } - - if (opt_reset) { - printf("Resetting the transceiver...\n"); - mdio_write(skfd, phy_id, 0, 0x8000); - } - /* Note: PHY addresses > 32 are pseudo-MII devices, usually built-in. */ - if (phy_id < 64 && nway_advertise > 0) { - printf(" Setting the media capability advertisement register of " - "PHY #%d to 0x%4.4x.\n", phy_id, nway_advertise | 1); - mdio_write(skfd, phy_id, 4, nway_advertise | 1); - mdio_write(skfd, phy_id, 0, 0x1000); - } - - if (opt_restart) { - printf("Restarting negotiation...\n"); - mdio_write(skfd, phy_id, 0, 0x0000); - mdio_write(skfd, phy_id, 0, 0x1200); - } - /* To force 100baseTx-HD do mdio_write(skfd, phy_id, 0, 0x2000); */ - if (fixed_speed >= 0) { - int reg0_val = 0; - if (fixed_speed & 0x0180) /* 100mpbs */ - reg0_val |= 0x2000; - if ((fixed_speed & 0x0140) && /* A full duplex type and */ - ! (fixed_speed & 0x0820)) /* no half duplex types. */ - reg0_val |= 0x0100; - printf("Setting the speed to \"fixed\", Control register %4.4x.\n", - reg0_val); - mdio_write(skfd, phy_id, 0, reg0_val); - } - if (set_BMCR >= 0) { - printf("Setting the Basic Mode Control Register to 0x%4.4x.\n", - set_BMCR); - mdio_write(skfd, phy_id, 0, set_BMCR); - } - - if (opt_watch && opt_status) - monitor_status(skfd, phy_id); - - show_basic_mii(skfd, phy_id); -#ifdef LIBMII - if (verbose) - show_mii_details(skfd, phy_id); -#else - if (verbose || debug) { - int mii_reg, mii_val; - printf(" MII PHY #%d transceiver registers:", phy_id); - for (mii_reg = 0; mii_reg < 32; mii_reg++) { - mii_val = mdio_read(skfd, phy_id, mii_reg); - printf("%s %4.4x", (mii_reg % 8) == 0 ? "\n " : "", - mii_val); - } - printf("\n"); - } -#endif - - if (opt_watch) - monitor_mii(skfd, phy_id); - if (opt_status && - (mdio_read(skfd, phy_id, 1) & 0x0004) == 0) - exit(2); - return 0; -} - -int mdio_read(int skfd, int phy_id, int location) -{ - u16 *data = (u16 *)(&ifr.ifr_data); - - data[0] = phy_id; - data[1] = location; - - if (ioctl(skfd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) < 0) { - fprintf(stderr, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name, - strerror(errno)); - return -1; - } - return data[3]; -} - -void mdio_write(int skfd, int phy_id, int location, int value) -{ - u16 *data = (u16 *)(&ifr.ifr_data); - - data[0] = phy_id; - data[1] = location; - data[2] = value; - - if (ioctl(skfd, new_ioctl_nums ? 0x8949 : SIOCDEVPRIVATE+2, &ifr) < 0) { - fprintf(stderr, "SIOCSMIIREG on %s failed: %s\n", ifr.ifr_name, - strerror(errno)); - } -} - -/* Parse the command line argument for advertised capabilities. */ -static int parse_advertise(const char *capabilities) -{ - const char *mtypes[] = { - "100baseT4", "100baseTx", "100baseTx-FD", "100baseTx-HD", - "10baseT", "10baseT-FD", "10baseT-HD", 0, - }; - char *endptr; - int cap_map[] = { 0x0200, 0x0180, 0x0100, 0x0080, 0x0060, 0x0040, 0x0020,}; - int i; - if ( ! capabilities) { - fprintf(stderr, "You passed -A 'NULL'. You must provide a media" - " list to advertise!\n"); - return -1; - } - if (debug) - fprintf(stderr, "Advertise string is '%s'.\n", capabilities); - for (i = 0; mtypes[i]; i++) - if (strcasecmp(mtypes[i], capabilities) == 0) - return cap_map[i]; - if ((i = strtol(capabilities, &endptr, 16)) <= 0xffff && endptr[0] == 0) - return i; - fprintf(stderr, "Invalid media advertisement value '%s'.\n" - " Either pass a numeric value or one of the following names:\n", - capabilities); - for (i = 0; mtypes[i]; i++) - fprintf(stderr, " %-14s %3.3x\n", mtypes[i], cap_map[i]); - return -1; -} - -/* Trivial versions if we don't link against libmii.c */ -static const char *media_names[] = { - "10baseT", "10baseT-FD", "100baseTx", "100baseTx-FD", "100baseT4", - "Flow-control", 0, -}; -/* Various non-good bits in the command register. */ -static const char *bmcr_bits[] = { - " Internal Collision-Test enabled!\n", "", /* 0x0080,0x0100 */ - " Restarted auto-negotiation in progress!\n", - " Transceiver isolated from the MII!\n", - " Transceiver powered down!\n", "", "", - " Transceiver in loopback mode!\n", - " Transceiver currently being reset!\n", -}; - -int show_basic_mii(long ioaddr, int phy_id) -{ - int mii_reg, i; - u16 mii_val[32]; - u16 bmcr, bmsr, new_bmsr, nway_advert, lkpar; - - for (mii_reg = 0; mii_reg < 8; mii_reg++) - mii_val[mii_reg] = mdio_read(ioaddr, phy_id, mii_reg); - if ( ! verbose) { - printf("Basic registers of MII PHY #%d: ", phy_id); - for (mii_reg = 0; mii_reg < 8; mii_reg++) - printf(" %4.4x", mii_val[mii_reg]); - printf(".\n"); - } - - if (mii_val[0] == 0xffff || mii_val[1] == 0x0000) { - printf(" No MII transceiver present!.\n"); - if (! opt_f) { - printf(" Use '--force' to view the information anyway.\n"); - return -1; - } - } - /* Descriptive rename. */ - bmcr = mii_val[0]; - bmsr = mii_val[1]; - nway_advert = mii_val[4]; - lkpar = mii_val[5]; - - if (lkpar & 0x4000) { - int negotiated = nway_advert & lkpar & 0x3e0; - int max_capability = 0; - /* Scan for the highest negotiated capability, highest priority - (100baseTx-FDX) to lowest (10baseT-HDX). */ - int media_priority[] = {8, 9, 7, 6, 5}; /* media_names[i-5] */ - printf(" The autonegotiated capability is %4.4x.\n", negotiated); - for (i = 0; media_priority[i]; i++) - if (negotiated & (1 << media_priority[i])) { - max_capability = media_priority[i]; - break; - } - if (max_capability) - printf("The autonegotiated media type is %s.\n", - media_names[max_capability - 5]); - else - printf("No common media type was autonegotiated!\n" - "This is extremely unusual and typically indicates a " - "configuration error.\n" "Perhaps the advertised " - "capability set was intentionally limited.\n"); - } - printf(" Basic mode control register 0x%4.4x:", bmcr); - if (bmcr & 0x1000) - printf(" Auto-negotiation enabled.\n"); - else - printf(" Auto-negotiation disabled, with\n" - " Speed fixed at 10%s mbps, %s-duplex.\n", - bmcr & 0x2000 ? "0" : "", - bmcr & 0x0100 ? "full":"half"); - for (i = 0; i < 9; i++) - if (bmcr & (0x0080<<i)) - printf(bmcr_bits[i]); - - new_bmsr = mdio_read(ioaddr, phy_id, 1); - if ((bmsr & 0x0016) == 0x0004) - printf( " You have link beat, and everything is working OK.\n"); - else - printf(" Basic mode status register 0x%4.4x ... %4.4x.\n" - " Link status: %sestablished.\n", - bmsr, new_bmsr, - bmsr & 0x0004 ? "" : - (new_bmsr & 0x0004) ? "previously broken, but now re" : "not "); - if (verbose) { - printf(" This transceiver is capable of "); - if (bmsr & 0xF800) { - for (i = 15; i >= 11; i--) - if (bmsr & (1<<i)) - printf(" %s", media_names[i-11]); - } else - printf("<Warning! No media capabilities>"); - printf(".\n"); - printf(" %s to perform Auto-negotiation, negotiation %scomplete.\n", - bmsr & 0x0008 ? "Able" : "Unable", - bmsr & 0x0020 ? "" : "not "); - } - - if (bmsr & 0x0010) - printf(" Remote fault detected!\n"); - if (bmsr & 0x0002) - printf(" *** Link Jabber! ***\n"); - - if (lkpar & 0x4000) { - printf(" Your link partner advertised %4.4x:", - lkpar); - for (i = 5; i >= 0; i--) - if (lkpar & (0x20<<i)) - printf(" %s", media_names[i]); - printf("%s.\n", lkpar & 0x0400 ? ", w/ 802.3X flow control" : ""); - } else if (lkpar & 0x00A0) - printf(" Your link partner is generating %s link beat (no" - " autonegotiation).\n", - lkpar & 0x0080 ? "100baseTx" : "10baseT"); - else if ( ! (bmcr & 0x1000)) - printf(" Link partner information is not exchanged when in" - " fixed speed mode.\n"); - else if ( ! (new_bmsr & 0x004)) - ; /* If no partner, do not report status. */ - else if (lkpar == 0x0001 || lkpar == 0x0000) { - printf(" Your link partner does not do autonegotiation, and this " - "transceiver type\n does not report the sensed link " - "speed.\n"); - } else - printf(" Your link partner is strange, status %4.4x.\n", lkpar); - - printf(" End of basic transceiver information.\n\n"); - return 0; -} - -static void monitor_status(long ioaddr, int phy_id) -{ - unsigned int baseline_1 = 0x55555555; /* Always show initial status. */ - - while (1) { - unsigned int new_1 = mdio_read(ioaddr, phy_id, 1); - if (new_1 != baseline_1) { - printf("%-12s 0x%4.4x 0x%4.4x\n", - new_1 & 0x04 ? (new_1==0xffff ? "unknown" : "up") : - new_1 & 0x20 ? "negotiating" : "down", - new_1, mdio_read(ioaddr, phy_id, 5)); - fflush(stdout); - baseline_1 = new_1; - } - sleep(1); - } -} - -int show_mii_details(long ioaddr, int phy_id) -{ - int mii_reg, mii_val; - printf(" MII PHY #%d transceiver registers:", phy_id); - for (mii_reg = 0; mii_reg < 32; mii_reg++) { - mii_val = mdio_read(skfd, phy_id, mii_reg); - printf("%s %4.4x", (mii_reg % 8) == 0 ? "\n " : "", - mii_val); - } - printf("\nThis version of 'mii-diag' has not been linked with " - "the libmii.c library.\n" - " That library provides extended transceiver status reports.\n"); - return 0; -} - -void monitor_mii(long ioaddr, int phy_id) -{ - fprintf(stderr, "\nThis version of 'mii-diag' has not been linked with " - "the libmii.c library \n" - " required for the media monitor option.\n"); -} - - - -/* - * Local variables: - * version-control: t - * kept-new-versions: 5 - * c-indent-level: 4 - * c-basic-offset: 4 - * tab-width: 4 - * compile-command: "gcc -Wall -Wstrict-prototypes -O mii-diag.c -DLIBMII libmii.c -o mii-diag" - * simple-compile-command: "gcc mii-diag.c -o mii-diag" - * End: - */ diff --git a/recipes-extended/mii-diag/mii-diag_2.11.bb b/recipes-extended/mii-diag/mii-diag_2.11.bb deleted file mode 100644 index 708789f..0000000 --- a/recipes-extended/mii-diag/mii-diag_2.11.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Examines and sets the MII registers of network cards." -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -SECTION = "console/network" -PRIORITY = "optional" -PR = "r0" - -S = "${WORKDIR}/" - -#PACKAGE_STRIP = "no" - -SRC_URI = "file://mii-diag.c \ - file://libmii.c" - -FILES_${PN} = "${base_sbindir}/mii-diag" - -do_compile() { -${CC} -O -c libmii.c -${CC} -O -DLIBMII mii-diag.c libmii.o -o mii-diag ${LDFLAGS} -} - -do_install() { - install -d ${D}/${base_sbindir} - install -m 0755 ${S}/mii-diag ${D}/${base_sbindir}/ -} diff --git a/recipes-extended/monit/monit/monit.default b/recipes-extended/monit/monit/monit.default deleted file mode 100644 index 0f92640..0000000 --- a/recipes-extended/monit/monit/monit.default +++ /dev/null @@ -1,2 +0,0 @@ -# set to "yes" or "no" to control starting on boot -ENABLED="no" diff --git a/recipes-extended/monit/monit/monit.init b/recipes-extended/monit/monit/monit.init deleted file mode 100755 index 0a3c2ea..0000000 --- a/recipes-extended/monit/monit/monit.init +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -NAME=monit - -ENABLED=yes -[ -f /etc/default/$NAME ] && . /etc/default/$NAME - -if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled in /etc/default" - exit -fi - -case $1 in - start) - echo "Starting monit" - monit - ;; - - stop) - echo "Stopping monit" - monit quit - ;; - - restart) - echo "Stopping monit" - monit quit - echo "Starting monit" - monit - ;; - - *) - echo "Usage: $0 {start|stop|restart}" - exit 2 - ;; -esac - - diff --git a/recipes-extended/monit/monit/monitrc b/recipes-extended/monit/monit/monitrc deleted file mode 100644 index d04b115..0000000 --- a/recipes-extended/monit/monit/monitrc +++ /dev/null @@ -1,272 +0,0 @@ -############################################################################### -## Monit control file -############################################################################### -## -## Comments begin with a '#' and extend through the end of the line. Keywords -## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. -## -## Below you will find examples of some frequently used statements. For -## information about the control file and a complete list of statements and -## options, please have a look in the Monit manual. -## -## -############################################################################### -## Global section -############################################################################### -## -## Start Monit in the background (run as a daemon): -# -set daemon 30 # check services at 30 seconds intervals -# with start delay 240 # optional: delay the first check by 4-minutes (by -# # default Monit check immediately after Monit start) -# -# -## Set syslog logging with the 'daemon' facility. If the FACILITY option is -## omitted, Monit will use 'user' facility by default. If you want to log to -## a standalone log file instead, specify the full path to the log file -# -set logfile syslog facility log_daemon -# -# -## Set the location of the Monit lock file which stores the process id of the -## running Monit instance. By default this file is stored in $HOME/.monit.pid -# -# set pidfile /var/run/monit.pid -# -## Set the location of the Monit id file which stores the unique id for the -## Monit instance. The id is generated and stored on first Monit start. By -## default the file is placed in $HOME/.monit.id. -# -# set idfile /var/.monit.id -# -## Set the location of the Monit state file which saves monitoring states -## on each cycle. By default the file is placed in $HOME/.monit.state. If -## the state file is stored on a persistent filesystem, Monit will recover -## the monitoring state across reboots. If it is on temporary filesystem, the -## state will be lost on reboot which may be convenient in some situations. -# -# set statefile /var/.monit.state -# -## Set the list of mail servers for alert delivery. Multiple servers may be -## specified using a comma separator. If the first mail server fails, Monit -# will use the second mail server in the list and so on. By default Monit uses -# port 25 - it is possible to override this with the PORT option. -# -# set mailserver mail.bar.baz, # primary mailserver -# backup.bar.baz port 10025, # backup mailserver on port 10025 -# localhost # fallback relay -# -# -## By default Monit will drop alert events if no mail servers are available. -## If you want to keep the alerts for later delivery retry, you can use the -## EVENTQUEUE statement. The base directory where undelivered alerts will be -## stored is specified by the BASEDIR option. You can limit the queue size -## by using the SLOTS option (if omitted, the queue is limited by space -## available in the back end filesystem). -# -# set eventqueue -# basedir /var/monit # set the base directory where events will be stored -# slots 100 # optionally limit the queue size -# -# -## Send status and events to M/Monit (for more informations about M/Monit -## see http://mmonit.com/). By default Monit registers credentials with -## M/Monit so M/Monit can smoothly communicate back to Monit and you don't -## have to register Monit credentials manually in M/Monit. It is possible to -## disable credential registration using the commented out option below. -## Though, if safety is a concern we recommend instead using https when -## communicating with M/Monit and send credentials encrypted. -# -# set mmonit http://monit:monit@192.168.1.10:8080/collector -# # and register without credentials # Don't register credentials -# -# -## Monit by default uses the following format for alerts if the the mail-format -## statement is missing:: -## --8<-- -## set mail-format { -## from: monit@$HOST -## subject: monit alert -- $EVENT $SERVICE -## message: $EVENT Service $SERVICE -## Date: $DATE -## Action: $ACTION -## Host: $HOST -## Description: $DESCRIPTION -## -## Your faithful employee, -## Monit -## } -## --8<-- -## -## You can override this message format or parts of it, such as subject -## or sender using the MAIL-FORMAT statement. Macros such as $DATE, etc. -## are expanded at runtime. For example, to override the sender, use: -# -# set mail-format { from: monit@foo.bar } -# -# -## You can set alert recipients whom will receive alerts if/when a -## service defined in this file has errors. Alerts may be restricted on -## events by using a filter as in the second example below. -# -# set alert sysadm@foo.bar # receive all alerts -# -## Do not alert when Monit starts, stops or performs a user initiated action. -## This filter is recommended to avoid getting alerts for trivial cases. -# -# set alert your-name@your.domain not on { instance, action } -# -# -## Monit has an embedded HTTP interface which can be used to view status of -## services monitored and manage services from a web interface. The HTTP -## interface is also required if you want to issue Monit commands from the -## command line, such as 'monit status' or 'monit restart service' The reason -## for this is that the Monit client uses the HTTP interface to send these -## commands to a running Monit daemon. See the Monit Wiki if you want to -## enable SSL for the HTTP interface. -# -set httpd port 2812 and - use address localhost # only accept connection from localhost - allow localhost # allow localhost to connect to the server and - allow admin:monit # require user 'admin' with password 'monit' - -############################################################################### -## Services -############################################################################### -## -## Check general system resources such as load average, cpu and memory -## usage. Each test specifies a resource, conditions and the action to be -## performed should a test fail. -# -# check system myhost.mydomain.tld -# if loadavg (1min) > 4 then alert -# if loadavg (5min) > 2 then alert -# if memory usage > 75% then alert -# if swap usage > 25% then alert -# if cpu usage (user) > 70% then alert -# if cpu usage (system) > 30% then alert -# if cpu usage (wait) > 20% then alert -# -# -## Check if a file exists, checksum, permissions, uid and gid. In addition -## to alert recipients in the global section, customized alert can be sent to -## additional recipients by specifying a local alert handler. The service may -## be grouped using the GROUP option. More than one group can be specified by -## repeating the 'group name' statement. -# -# check file apache_bin with path /usr/local/apache/bin/httpd -# if failed checksum and -# expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor -# if failed permission 755 then unmonitor -# if failed uid root then unmonitor -# if failed gid root then unmonitor -# alert security@foo.bar on { -# checksum, permission, uid, gid, unmonitor -# } with the mail-format { subject: Alarm! } -# group server -# -# -## Check that a process is running, in this case Apache, and that it respond -## to HTTP and HTTPS requests. Check its resource usage such as cpu and memory, -## and number of children. If the process is not running, Monit will restart -## it by default. In case the service is restarted very often and the -## problem remains, it is possible to disable monitoring using the TIMEOUT -## statement. This service depends on another service (apache_bin) which -## is defined above. -# -# check process apache with pidfile /usr/local/apache/logs/httpd.pid -# start program = "/etc/init.d/httpd start" with timeout 60 seconds -# stop program = "/etc/init.d/httpd stop" -# if cpu > 60% for 2 cycles then alert -# if cpu > 80% for 5 cycles then restart -# if totalmem > 200.0 MB for 5 cycles then restart -# if children > 250 then restart -# if loadavg(5min) greater than 10 for 8 cycles then stop -# if failed host www.tildeslash.com port 80 protocol http -# and request "/somefile.html" -# then restart -# if failed port 443 type tcpssl protocol http -# with timeout 15 seconds -# then restart -# if 3 restarts within 5 cycles then timeout -# depends on apache_bin -# group server -# -# -## Check filesystem permissions, uid, gid, space and inode usage. Other services, -## such as databases, may depend on this resource and an automatically graceful -## stop may be cascaded to them before the filesystem will become full and data -## lost. -# -# check filesystem datafs with path /dev/sdb1 -# start program = "/bin/mount /data" -# stop program = "/bin/umount /data" -# if failed permission 660 then unmonitor -# if failed uid root then unmonitor -# if failed gid disk then unmonitor -# if space usage > 80% for 5 times within 15 cycles then alert -# if space usage > 99% then stop -# if inode usage > 30000 then alert -# if inode usage > 99% then stop -# group server -# -# -## Check a file's timestamp. In this example, we test if a file is older -## than 15 minutes and assume something is wrong if its not updated. Also, -## if the file size exceed a given limit, execute a script -# -# check file database with path /data/mydatabase.db -# if failed permission 700 then alert -# if failed uid data then alert -# if failed gid data then alert -# if timestamp > 15 minutes then alert -# if size > 100 MB then exec "/my/cleanup/script" as uid dba and gid dba -# -# -## Check directory permission, uid and gid. An event is triggered if the -## directory does not belong to the user with uid 0 and gid 0. In addition, -## the permissions have to match the octal description of 755 (see chmod(1)). -# -# check directory bin with path /bin -# if failed permission 755 then unmonitor -# if failed uid 0 then unmonitor -# if failed gid 0 then unmonitor -# -# -## Check a remote host availability by issuing a ping test and check the -## content of a response from a web server. Up to three pings are sent and -## connection to a port and an application level network check is performed. -# -# check host myserver with address 192.168.1.1 -# if failed ping then alert -# if failed port 3306 protocol mysql with timeout 15 seconds then alert -# if failed port 80 protocol http -# and request /some/path with content = "a string" -# then alert -# -# -## Check a network link status (up/down), link capacity changes, saturation -## and bandwidth usage. -# -# check network public with interface eth0 -# if failed link then alert -# if changed link then alert -# if saturation > 90% then alert -# if download > 10 MB/s then alert -# if total upload > 1 GB in last hour then alert -# -# -## Check custom program status output. -# -# check program myscript with path /usr/local/bin/myscript.sh -# if status != 0 then alert -# -# -############################################################################### -## Includes -############################################################################### -## -## It is possible to include additional configuration parts from other files or -## directories. -# -include /etc/monit.d/* diff --git a/recipes-extended/monit/monit_5.22.0.bb b/recipes-extended/monit/monit_5.22.0.bb deleted file mode 100644 index 3ad3074..0000000 --- a/recipes-extended/monit/monit_5.22.0.bb +++ /dev/null @@ -1,51 +0,0 @@ -DESCRIPTION = "Monit" -HOMEPAGE = "http://mmonit.com/" -LICENSE = "AGPL-3.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51" -DEPENDS = "libpam zlib openssl" - -PR = "r0" - -SRC_URI = "http://mmonit.com/monit/dist/monit-5.22.0.tar.gz \ - file://monitrc \ - file://monit.init \ - file://monit.default \ - " - -SRC_URI[md5sum] = "768a637b8d23b6cbce271a8ff125c61f" -SRC_URI[sha256sum] = "9fc58b5e3caafd64f0b6fff3e65ae757239fab37d04fb33efce177da15176183" - -inherit autotools-brokensep - -EXTRA_OECONF += "--with-ssl-lib-dir=${STAGING_LIBDIR} \ - --with-ssl-incl-dir=${STAGING_INCDIR} \ - " - -# Regenerate autoconfig generated aclocal.m4/m4 contained in the tarball -EXTRA_AUTORECONF += " --force" - -do_configure_prepend() { - rm ${S}/aclocal.m4 - rm -Rf ${S}/m4 -} - -EXTRA_OECONF_append_arm = " libmonit_cv_setjmp_available=yes libmonit_cv_vsnprintf_c99_conformant=yes " - -inherit update-rc.d - -INITSCRIPT_NAME = "monit" -INITSCRIPT_PARAMS = "defaults 99 10" - -do_install_append() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/monit.d - install -m 0600 ${WORKDIR}/monitrc ${D}${sysconfdir}/ - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/monit.init ${D}${sysconfdir}/init.d/monit - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/monit.default ${D}${sysconfdir}/default/monit -} - -CONFFILES_${PN} += "${sysconfdir}/monitrc ${sysconfdir}/default/monit" diff --git a/recipes-extended/multitech/set-rs485/set-rs485.c b/recipes-extended/multitech/set-rs485/set-rs485.c deleted file mode 100644 index 1e53092..0000000 --- a/recipes-extended/multitech/set-rs485/set-rs485.c +++ /dev/null @@ -1,81 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <termios.h> -#include <unistd.h> -#include <sys/ioctl.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <linux/serial.h> - -int openserial(char *devicename) -{ - int fd; - - if ((fd = open(devicename, O_RDWR)) == -1) { - perror("openserial(): open()"); - return 0; - } - - return fd; -} - -int setRS485(int fd, int state) -{ - struct serial_rs485 rs485; - - if (ioctl(fd, TIOCGRS485, &rs485) == -1) { - perror("TIOCGRS485"); - return 0; - } - - //printf("Old RS485 flags %x\n", rs485.flags); - - if (state) - rs485.flags |= SER_RS485_ENABLED; - else - rs485.flags &= ~SER_RS485_ENABLED; - - if (ioctl(fd, TIOCSRS485, &rs485) == -1) { - perror("TIOCSRS485"); - return 0; - } - - //printf("New RS485 flags %x\n", rs485.flags); - - return 1; -} - -int main(int argc, char *argv[]) -{ - int fd; - - if (argc != 3) { - printf("Usage: set_rs485hd tty 0|1\n"); - return 1; - } - - char *serialdev = argv[1]; - char *state_str = argv[2]; - - int state = atoi(state_str); - - fd = openserial(serialdev); - if (!fd) { - fprintf(stderr, "Error while initializing %s.\n", serialdev); - return 1; - } - - printf("%s: setting RS485 to ", serialdev); - - if (state) - printf("%s\n", "enabled"); - else - printf("%s\n", "disabled"); - - if (setRS485(fd, state)) - return 0; - else - return 1; -} - diff --git a/recipes-extended/multitech/set-rs485_0.1.bb b/recipes-extended/multitech/set-rs485_0.1.bb deleted file mode 100644 index 09fe9f9..0000000 --- a/recipes-extended/multitech/set-rs485_0.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "Enables RS485 mode for a serial tty device" -HOMEPAGE = "http://www.multitech.net/" -PRIORITY = "optional" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -PR = "r0" - -SRC_URI = "file://set-rs485.c" -S = "${WORKDIR}" - -do_compile() { - ${CC} ${CFLAGS} ${LDFLAGS} -o set-rs485 set-rs485.c -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 set-rs485 ${D}${bindir}/ -} diff --git a/recipes-extended/multitech/sms-utils.inc b/recipes-extended/multitech/sms-utils.inc deleted file mode 100644 index 5a13eff..0000000 --- a/recipes-extended/multitech/sms-utils.inc +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "SMS Utilities" -HOMEPAGE = "http://www.multitech.net/" -SECTION = "console/utils" -PRIORITY = "optional" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -DEPENDS = "libesmtp libyaml" - -SRCREV = "${PV}" -SRC_URI = "git://git.multitech.net/sms-utils.git;protocol=git" -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -PARALLEL_MAKE = "" - -do_install_append() { - install -d ${D}${datadir}/${PN} - install -m 0644 src/sms.config.example ${D}${datadir}/${PN}/ -} - -FILES_${PN} += "${datadir}/${PN}/sms.config.example" diff --git a/recipes-extended/multitech/sms-utils_1.0.6.bb b/recipes-extended/multitech/sms-utils_1.0.6.bb deleted file mode 100644 index f796b24..0000000 --- a/recipes-extended/multitech/sms-utils_1.0.6.bb +++ /dev/null @@ -1,3 +0,0 @@ -require sms-utils.inc - -PR = "r0" diff --git a/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch b/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch deleted file mode 100644 index 41ce262..0000000 --- a/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 35e865bbe72085260bd48fdc65eba0887fe32360 Mon Sep 17 00:00:00 2001 -From: Serhii Voloshynov <serhii.voloshynov@globallogic.com> -Date: Thu, 3 Jan 2019 09:32:41 +0200 -Subject: [PATCH] fix setting of NMEA sentences intervals, add --quit parameter - ---- - src/venus_gps.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/venus_gps.c b/src/venus_gps.c -index 77c7e73..2f6bf44 100644 ---- a/src/venus_gps.c -+++ b/src/venus_gps.c -@@ -788,6 +788,8 @@ static void usage(FILE * out) - fprintf(out, " --gpzda 0-255 (default: 1) |\n"); - #endif - fprintf(out, " --gpvtg 0-255 (default: 1)\n"); -+ fprintf(out, "\n"); -+ fprintf(out, " --quit \n"); - fprintf(out, " }\n"); - fprintf(out, "\n"); - } -@@ -819,6 +821,7 @@ enum { - OPT_SERIAL_CLIENT, - OPT_ID_PREFIX, - OPT_ID, -+ OPT_QUIT - }; - - static char *short_options = "b:d:p:f"; -@@ -852,6 +855,7 @@ static struct option long_options[] = { - {"longitude", 1, 0, OPT_LONGITUDE}, - {"altitude", 1, 0, OPT_ALTITUDE}, - #endif -+ {"quit", 0, 0, OPT_QUIT}, - {"version", 0, NULL, OPT_VERSION}, - {"help", 0, NULL, OPT_HELP}, - {0, 0, 0, 0}, -@@ -864,6 +868,7 @@ int main(int argc, char *argv[]) - char *cp; - int option_index; - int tty; -+ int quit =0; - struct venus_msg msg; - - struct socket_client_args *sc; -@@ -883,6 +888,10 @@ int main(int argc, char *argv[]) - daemonize = 1; - break; - -+ case OPT_QUIT: -+ quit = 1; -+ break; -+ - case OPT_DEVICE: - device = optarg; - break; -@@ -1145,7 +1154,7 @@ int main(int argc, char *argv[]) - } - #endif - -- tmp = venus_conf_nmea(tty, 1, 1, 1, 1, 1, 1, 0, UPDATE_ATTR_SRAM); -+ tmp = venus_conf_nmea(tty, gpgga, gpgsa, gpgsv, gpgll, gprmc, gpvtg, 0, UPDATE_ATTR_SRAM); - if (tmp < 0) { - log_error("failed to configure nmea sentences"); - exit(1); -@@ -1158,6 +1167,9 @@ int main(int argc, char *argv[]) - } - - venus_close(tty); -+ if (quit) { -+ exit(0); -+ } - - sigset_t sigset; - sigemptyset(&sigset); --- -2.7.4 - diff --git a/recipes-extended/multitech/venus-gps_0.1.0.bb b/recipes-extended/multitech/venus-gps_0.1.0.bb deleted file mode 100644 index 55d7325..0000000 --- a/recipes-extended/multitech/venus-gps_0.1.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "SkyTraq Venus GPS Example" -HOMEPAGE = "http://www.multitech.net/" -SECTION = "console/network" -PRIORITY = "optional" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PR = "r1" - -SRC_URI = "git://git.multitech.net/venus-gps.git;protocol=git;tag=${PV} \ - file://fix_nmea_intervals.patch \ - " -S = "${WORKDIR}/git" - -inherit autotools - -PARALLEL_MAKE = "" diff --git a/recipes-extended/stressapptest/stressapptest_svn.bb b/recipes-extended/stressapptest/stressapptest_svn.bb deleted file mode 100644 index bba0077..0000000 --- a/recipes-extended/stressapptest/stressapptest_svn.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "Stressful Application Test" -HOMEPAGE = "https://code.google.com/p/stressapptest/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=55ea9d559f985fb4834317d8ed6b9e58" -#DEPENDS = "" - -SRCREV = "r48" -PV = "1.0.7+svn${SRCPV}" - -SRC_URI = "svn://stressapptest.googlecode.com/svn;module=trunk;protocol=http" -S = "${WORKDIR}/trunk" - -inherit autotools diff --git a/recipes-extended/sudo/files/sudo.pam b/recipes-extended/sudo/files/sudo.pam deleted file mode 100644 index 515eab0..0000000 --- a/recipes-extended/sudo/files/sudo.pam +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth include common-auth -account include common-account -password include common-password -session optional pam_keyinit.so revoke -session required pam_limits.so diff --git a/recipes-extended/sudo/sudo.inc b/recipes-extended/sudo/sudo.inc deleted file mode 100644 index 51748b1..0000000 --- a/recipes-extended/sudo/sudo.inc +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Provide limited super user privileges to specific users" -DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments." -HOMEPAGE = "http://www.sudo.ws" -BUGTRACKER = "http://www.sudo.ws/bugs/" -SECTION = "admin" -LICENSE = "ISC & BSD & Zlib" -LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=6c76b73603ac7763ab0516ebfbe67b42 \ - file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=4a162fc04b86b03f5632180fe6076cda \ - file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \ - file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ - file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ - file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ - file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \ - file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ - file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a \ - file://lib/util/arc4random.c;beginline=3;endline=20;md5=15bdc89c1b003fa4d7353e6296ebfd68 \ - file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=31e630ac814d692fd0ab7a942659b46f \ - file://lib/util/getentropy.c;beginline=1;endline=19;md5=9f1a275ecd44cc264a2a4d5e06a75292 \ - " - -inherit autotools - -PACKAGECONFIG ??= "" -PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" -PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel" - -CONFFILES_${PN} = "${sysconfdir}/sudoers" - -EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" - -EXTRA_OECONF_append_libc-musl = " --disable-hardening " - -# mksigname/mksiglist are used on build host to generate source files -do_compile_prepend () { - echo "JAK: Correct sudo.inc" - # Remove build host references from sudo_usage.h - sed -i \ - -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's,--build=${BUILD_SYS},,g' \ - -e 's,--host=${HOST_SYS},,g' \ - ${B}/src/sudo_usage.h - oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist -} - -# Explicitly create ${localstatedir}/lib before do_install to ensure -# the directory is accessible by all users. Otherwise the mkinstalldirs -# script (from sudo) will recursively create ${localstatedir}/lib/sudo -# and then chmod each directory with 0700 permissions, which isn't what -# we want (i.e, users would not be able to access /var/lib). -do_install_prepend (){ - mkdir -p ${D}/${localstatedir}/lib -} diff --git a/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch b/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch deleted file mode 100644 index eb36cd4..0000000 --- a/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 386e2c2fa2ab2e02ef71c268a57205139be329ab Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 31 Aug 2015 07:07:49 +0000 -Subject: [PATCH] Include sys/types.h for id_t definition - -/sudo_util.h:219:14: error: unknown type name 'id_t' - __dso_public id_t sudo_strtoid_v1(const char *str, const char *sep, - char **endp, const char **errstr); - ^ - make[1]: *** [preserve_fds.o] Error 1 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - include/sudo_util.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/sudo_util.h b/include/sudo_util.h -index 89c9f89..ac0855a 100644 ---- a/include/sudo_util.h -+++ b/include/sudo_util.h -@@ -17,6 +17,8 @@ - #ifndef SUDO_UTIL_H - #define SUDO_UTIL_H - -+#include <sys/types.h> -+ - #ifdef HAVE_STDBOOL_H - # include <stdbool.h> - #else --- -2.5.1 - diff --git a/recipes-extended/sudo/sudo/privacy b/recipes-extended/sudo/sudo/privacy deleted file mode 100644 index 7c03615..0000000 --- a/recipes-extended/sudo/sudo/privacy +++ /dev/null @@ -1 +0,0 @@ -Defaults lecture = never diff --git a/recipes-extended/sudo/sudo/sudoers.patch b/recipes-extended/sudo/sudo/sudoers.patch deleted file mode 100644 index aed0f10..0000000 --- a/recipes-extended/sudo/sudo/sudoers.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -uprN old/plugins/sudoers/sudoers.in new/plugins/sudoers/sudoers.in ---- old/plugins/sudoers/sudoers.in 2015-10-31 18:34:59.000000000 -0500 -+++ new/plugins/sudoers/sudoers.in 2017-04-20 10:32:19.530931283 -0500 -@@ -57,7 +57,7 @@ - # Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER" - ## - ## Uncomment to use a hard-coded PATH instead of the user's to find commands --# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -+Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - ## - ## Uncomment to send mail if the user does not enter the correct password. - # Defaults mail_badpass -@@ -85,7 +85,7 @@ root ALL=(ALL) ALL - # %wheel ALL=(ALL) NOPASSWD: ALL - - ## Uncomment to allow members of group sudo to execute any command --# %sudo ALL=(ALL) ALL -+%sudo ALL=(ALL) ALL - - ## Uncomment to allow any user to run sudo if they know the password - ## of the user they are running the command as (root by default). diff --git a/recipes-extended/sudo/sudo_%.bbappend b/recipes-extended/sudo/sudo_%.bbappend deleted file mode 100644 index a1e4b04..0000000 --- a/recipes-extended/sudo/sudo_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "file://sudoers.patch \ - file://privacy" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - - -CONFFILES_${PN} += "${sysconfdir}/sudoers.d/privacy" - -do_install_append() { - install -D -m 644 ${WORKDIR}/privacy ${D}/${sysconfdir}/sudoers.d -} - diff --git a/recipes-extended/sudo/sudo_1.8.27.bb b/recipes-extended/sudo/sudo_1.8.27.bb deleted file mode 100644 index 8f0a144..0000000 --- a/recipes-extended/sudo/sudo_1.8.27.bb +++ /dev/null @@ -1,45 +0,0 @@ -require sudo.inc - -SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://0001-Include-sys-types.h-for-id_t-definition.patch \ - " - -PAM_SRC_URI = "file://sudo.pam" - -SRC_URI[md5sum] = "b5c184b13b6b5de32af630af2fd013fd" -SRC_URI[sha256sum] = "7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0" - -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" - -EXTRA_OECONF += " \ - ac_cv_type_rsize_t=no \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ - " - -do_install_append () { - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo - fi - if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then - echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo - sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers - fi - - chmod 4111 ${D}${bindir}/sudo - chmod 0440 ${D}${sysconfdir}/sudoers - - # Explicitly remove the /run directory to avoid QA error - rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo -} - -FILES_${PN} += "${libdir}/tmpfiles.d" -FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \ - ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la" - - - - - diff --git a/recipes-extended/uvccapture/files/makefile.patch b/recipes-extended/uvccapture/files/makefile.patch deleted file mode 100644 index 4733154..0000000 --- a/recipes-extended/uvccapture/files/makefile.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: uvccapture-0.5/Makefile -=================================================================== ---- uvccapture-0.5.orig/Makefile 2011-08-18 14:02:17.757628553 -0500 -+++ uvccapture-0.5/Makefile 2011-08-18 14:10:09.627899608 -0500 -@@ -1,8 +1,8 @@ --CC=gcc --CPP=g++ -+#CC=gcc -+#CPP=g++ - APP_BINARY=uvccapture --VERSION = 0.4 --PREFIX=/usr/local/bin -+VERSION = 0.5 -+PREFIX=/usr/bin - - WARNINGS = -Wall - -@@ -20,8 +20,9 @@ - rm -f *.a *.o $(APP_BINARY) core *~ log errlog - - install: -- install $(APP_BINARY) $(PREFIX) -+ install -d $(DESTDIR)$(PREFIX) -+ install -m755 $(APP_BINARY) $(DESTDIR)$(PREFIX) - - # Applications: - uvccapture: $(OBJECTS) -- $(CC) $(OBJECTS) $(XPM_LIB) $(MATH_LIB) -ljpeg -o $(APP_BINARY) -+ $(CC) $(OBJECTS) $(XPM_LIB) $(MATH_LIB) -ljpeg $(LDFLAGS) -o $(APP_BINARY) diff --git a/recipes-extended/uvccapture/files/uvccapture_use_videodev2.patch b/recipes-extended/uvccapture/files/uvccapture_use_videodev2.patch deleted file mode 100644 index b6e4617..0000000 --- a/recipes-extended/uvccapture/files/uvccapture_use_videodev2.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/uvccapture.c 2008-08-03 22:02:38 +0000 -+++ b/uvccapture.c 2011-06-09 16:31:30 +0000 -@@ -31,7 +31,7 @@ - #include <unistd.h> - #include <jpeglib.h> - #include <time.h> --#include <linux/videodev.h> -+#include <linux/videodev2.h> - - #include "v4l2uvc.h" - - ---- a/v4l2uvc.c 2008-03-28 19:13:23 +0000 -+++ b/v4l2uvc.c 2011-06-09 16:31:30 +0000 -@@ -28,7 +28,7 @@ - #include <errno.h> - #include <unistd.h> - #include <fcntl.h> --#include <linux/videodev.h> -+#include <linux/videodev2.h> - #include <sys/mman.h> - #include <sys/ioctl.h> - #include "v4l2uvc.h" - diff --git a/recipes-extended/uvccapture/uvccapture_0.5.bb b/recipes-extended/uvccapture/uvccapture_0.5.bb deleted file mode 100644 index 92e781e..0000000 --- a/recipes-extended/uvccapture/uvccapture_0.5.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "Command-line tool to capture webcam images" -DEPENDS = "jpeg virtual/kernel" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM="file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PR = "r1" - -inherit autotools-brokensep - -SRC_URI = "http://staticwave.ca/source/uvccapture/${PN}-${PV}.tar.bz2 \ - file://uvccapture_use_videodev2.patch \ - file://makefile.patch \ - " - -SRC_URI[md5sum] = "2ac901069a35b8954c11b11f6e036989" -SRC_URI[sha256sum] = "b7c262d2428f23a4c64feddd2c37c43fb39ce4c92a5a6ae0dddf28e3adc5b60e" |