diff options
author | John Klug <john.klug@multitech.com> | 2017-10-24 09:56:34 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-10-31 17:16:52 -0500 |
commit | 86f14126ab392a98879b631db6b877b8e0340630 (patch) | |
tree | 30d2ba49ab033ac4a260dd650afd9f584d359576 /recipes-support/dnsmasq/dnsmasq.inc | |
parent | 85241e6754cadf5d69bbce0d71036f08373998f5 (diff) | |
download | meta-mlinux-86f14126ab392a98879b631db6b877b8e0340630.tar.gz meta-mlinux-86f14126ab392a98879b631db6b877b8e0340630.tar.bz2 meta-mlinux-86f14126ab392a98879b631db6b877b8e0340630.zip |
New dnsmasq fixing CVE-2017-13704, 14491-14496
Diffstat (limited to 'recipes-support/dnsmasq/dnsmasq.inc')
-rw-r--r-- | recipes-support/dnsmasq/dnsmasq.inc | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/recipes-support/dnsmasq/dnsmasq.inc b/recipes-support/dnsmasq/dnsmasq.inc new file mode 100644 index 0000000..9ef54fe --- /dev/null +++ b/recipes-support/dnsmasq/dnsmasq.inc @@ -0,0 +1,83 @@ +SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server" +HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html" +SECTION = "net" +# GPLv3 was added in version 2.41 as license option +LICENSE = "GPLv2 | GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504" + +#at least versions 2.15 and prior are moved to the archive folder on the server +SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \ + file://init \ + file://dnsmasq.conf \ + file://dnsmasq-resolvconf.service \ + file://dnsmasq-noresolvconf.service \ +" + +inherit pkgconfig update-rc.d systemd + +INITSCRIPT_NAME = "dnsmasq" +INITSCRIPT_PARAMS = "defaults" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[dbus] = ",,dbus" +PACKAGECONFIG[idn] = ",,libidn" +PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack" +PACKAGECONFIG[lua] = ",,lua" +PACKAGECONFIG[resolvconf] = ",,,resolvconf" +EXTRA_OEMAKE = "\ + 'COPTS=${@bb.utils.contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \ + 'CFLAGS=${CFLAGS}' \ + 'LDFLAGS=${LDFLAGS}' \ +" + +SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}" + +do_compile_append() { + # build dhcp_release + cd ${S}/contrib/lease-tools + oe_runmake +} + +do_install () { + oe_runmake "PREFIX=${D}${prefix}" \ + "BINDIR=${D}${bindir}" \ + "MANDIR=${D}${mandir}" \ + install + install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d + install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq + + install -d ${D}${systemd_unitdir}/system + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'resolvconf', '', d)}" != "" ]; then + install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service + else + install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service + fi + + install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir} + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != "" ]; then + install -d ${D}${sysconfdir}/dbus-1/system.d + install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/ + fi + if [ "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'resolvconf', '', d)}" != "" ]; then + install -d ${D}${sysconfdir}/resolvconf/update.d/ + install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq + + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles + install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir} + fi +} + +CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "dnsmasq.service" |