Initial commit
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
SUMMARY = "Avahi IPv4LL network address configuration daemon"
|
||||
DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
|
||||
allows programs to publish and discover services and hosts running on a local network \
|
||||
with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
|
||||
IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
|
||||
configuration from the link-local 169.254.0.0/16 range without the need for a central \
|
||||
server.'
|
||||
AUTHOR = "Lennart Poettering <lennart@poettering.net>"
|
||||
HOMEPAGE = "http://avahi.org"
|
||||
BUGTRACKER = "https://github.com/lathiat/avahi/issues"
|
||||
SECTION = "network"
|
||||
|
||||
# major part is under LGPL-2.1-or-later, but several .dtd, .xsl, initscripts and
|
||||
# python scripts are under GPL-2.0-or-later
|
||||
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
|
||||
file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
|
||||
file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
|
||||
file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
|
||||
file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
|
||||
|
||||
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \
|
||||
file://00avahi-autoipd \
|
||||
file://99avahi-autoipd \
|
||||
file://initscript.patch \
|
||||
file://0001-Fix-opening-etc-resolv.conf-error.patch \
|
||||
file://handle-hup.patch \
|
||||
file://local-ping.patch \
|
||||
"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/lathiat/avahi/releases/"
|
||||
SRC_URI[md5sum] = "229c6aa30674fc43c202b22c5f8c2be7"
|
||||
SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda"
|
||||
|
||||
CVE_STATUS[CVE-2021-26720] = "not-applicable-platform: Issue only affects Debian/SUSE"
|
||||
|
||||
DEPENDS = "expat libcap libdaemon glib-2.0 glib-2.0-native"
|
||||
|
||||
# For gtk related PACKAGECONFIGs: gtk, gtk3
|
||||
AVAHI_GTK ?= ""
|
||||
|
||||
PACKAGECONFIG ??= "dbus ${@bb.utils.contains_any('DISTRO_FEATURES','x11 wayland','${AVAHI_GTK}','',d)}"
|
||||
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
|
||||
PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
|
||||
PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
|
||||
PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus"
|
||||
PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent"
|
||||
PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase"
|
||||
|
||||
inherit autotools pkgconfig gettext gobject-introspection github-releases
|
||||
|
||||
EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
|
||||
--disable-stack-protector \
|
||||
--disable-gdbm \
|
||||
--disable-dbm \
|
||||
--disable-mono \
|
||||
--disable-monodoc \
|
||||
--disable-qt3 \
|
||||
--disable-qt4 \
|
||||
--disable-python \
|
||||
--disable-doxygen-doc \
|
||||
--enable-manpages \
|
||||
${EXTRA_OECONF_SYSVINIT} \
|
||||
${EXTRA_OECONF_SYSTEMD} \
|
||||
"
|
||||
|
||||
# The distro choice determines what init scripts are installed
|
||||
EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
|
||||
EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_system_unitdir}/','--without-systemdsystemunitdir',d)}"
|
||||
|
||||
do_configure:prepend() {
|
||||
# This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
|
||||
rm "${S}/common/introspection.m4" || true
|
||||
}
|
||||
|
||||
do_compile:prepend() {
|
||||
export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
|
||||
}
|
||||
|
||||
RRECOMMENDS:${PN}:append:libc-glibc = " libnss-mdns"
|
||||
|
||||
do_install() {
|
||||
autotools_do_install
|
||||
rm -rf ${D}/run
|
||||
test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
|
||||
rm -rf ${D}${libdir}/avahi
|
||||
|
||||
# Move example service files out of /etc/avahi/services so we don't
|
||||
# advertise ssh & sftp-ssh by default
|
||||
install -d ${D}${docdir}/avahi
|
||||
mv ${D}${sysconfdir}/avahi/services/* ${D}${docdir}/avahi
|
||||
}
|
||||
|
||||
PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}"
|
||||
|
||||
FILES:libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*"
|
||||
|
||||
RPROVIDES:libavahi-compat-libdnssd = "libdns-sd"
|
||||
|
||||
inherit update-rc.d systemd useradd
|
||||
|
||||
PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui"
|
||||
|
||||
FILES:avahi-ui = "${libdir}/libavahi-ui*.so.*"
|
||||
FILES:avahi-discover = "${datadir}/applications/avahi-discover.desktop \
|
||||
${datadir}/avahi/interfaces/avahi-discover.ui \
|
||||
${bindir}/avahi-discover-standalone \
|
||||
"
|
||||
|
||||
LICENSE:libavahi-gobject = "LGPL-2.1-or-later"
|
||||
LICENSE:avahi-daemon = "LGPL-2.1-or-later"
|
||||
LICENSE:libavahi-common = "LGPL-2.1-or-later"
|
||||
LICENSE:libavahi-core = "LGPL-2.1-or-later"
|
||||
LICENSE:libavahi-client = "LGPL-2.1-or-later"
|
||||
LICENSE:avahi-dnsconfd = "LGPL-2.1-or-later"
|
||||
LICENSE:libavahi-glib = "LGPL-2.1-or-later"
|
||||
LICENSE:avahi-autoipd = "LGPL-2.1-or-later"
|
||||
LICENSE:avahi-utils = "LGPL-2.1-or-later"
|
||||
|
||||
# As avahi doesn't put any files into PN, clear the files list to avoid problems
|
||||
# if extra libraries appear.
|
||||
FILES:${PN} = ""
|
||||
FILES:avahi-autoipd = "${sbindir}/avahi-autoipd \
|
||||
${sysconfdir}/avahi/avahi-autoipd.action \
|
||||
${sysconfdir}/dhcp/*/avahi-autoipd \
|
||||
${sysconfdir}/udhcpc.d/00avahi-autoipd \
|
||||
${sysconfdir}/udhcpc.d/99avahi-autoipd"
|
||||
FILES:libavahi-common = "${libdir}/libavahi-common.so.*"
|
||||
FILES:libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
|
||||
FILES:avahi-daemon = "${sbindir}/avahi-daemon \
|
||||
${sysconfdir}/avahi/avahi-daemon.conf \
|
||||
${sysconfdir}/avahi/hosts \
|
||||
${sysconfdir}/avahi/services \
|
||||
${sysconfdir}/dbus-1 \
|
||||
${sysconfdir}/init.d/avahi-daemon \
|
||||
${datadir}/dbus-1/interfaces \
|
||||
${datadir}/avahi/avahi-service.dtd \
|
||||
${datadir}/avahi/service-types \
|
||||
${datadir}/dbus-1/system-services"
|
||||
FILES:libavahi-client = "${libdir}/libavahi-client.so.*"
|
||||
FILES:avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
|
||||
${sysconfdir}/avahi/avahi-dnsconfd.action \
|
||||
${sysconfdir}/init.d/avahi-dnsconfd"
|
||||
FILES:libavahi-glib = "${libdir}/libavahi-glib.so.*"
|
||||
FILES:libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
|
||||
FILES:avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*"
|
||||
|
||||
DEV_PKG_DEPENDENCY = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})"
|
||||
DEV_PKG_DEPENDENCY += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}"
|
||||
RDEPENDS:${PN}-dnsconfd = "${PN}-daemon"
|
||||
|
||||
RRECOMMENDS:avahi-daemon:append:libc-glibc = " libnss-mdns"
|
||||
|
||||
CONFFILES:avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
|
||||
|
||||
USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
|
||||
USERADD_PARAM:avahi-daemon = "--system --home /run/avahi-daemon \
|
||||
--no-create-home --shell /bin/false \
|
||||
--user-group avahi"
|
||||
|
||||
USERADD_PARAM:avahi-autoipd = "--system --home /run/avahi-autoipd \
|
||||
--no-create-home --shell /bin/false \
|
||||
--user-group \
|
||||
-c \"Avahi autoip daemon\" \
|
||||
avahi-autoipd"
|
||||
|
||||
INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
|
||||
INITSCRIPT_NAME:avahi-daemon = "avahi-daemon"
|
||||
INITSCRIPT_PARAMS:avahi-daemon = "defaults 21 19"
|
||||
INITSCRIPT_NAME:avahi-dnsconfd = "avahi-dnsconfd"
|
||||
INITSCRIPT_PARAMS:avahi-dnsconfd = "defaults 22 19"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
|
||||
SYSTEMD_SERVICE:${PN}-daemon = "avahi-daemon.service"
|
||||
SYSTEMD_SERVICE:${PN}-dnsconfd = "avahi-dnsconfd.service"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${sysconfdir}/udhcpc.d
|
||||
install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
|
||||
install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
|
||||
}
|
||||
|
||||
# At the time the postinst runs, dbus might not be setup so only restart if running
|
||||
# Don't exit early, because update-rc.d needs to run subsequently.
|
||||
pkg_postinst:avahi-daemon () {
|
||||
if [ -z "$D" ]; then
|
||||
killall -q -HUP dbus-daemon || true
|
||||
fi
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From 78967814f5c37ed67f4cf64d70c9f76a03ee89bc Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Wed, 20 Jun 2018 13:57:35 +0800
|
||||
Subject: [PATCH] Fix opening /etc/resolv.conf error
|
||||
|
||||
Fix to start avahi-daemon after systemd-resolved.service. This is because
|
||||
/etc/resolv.conf is a link to /etc/resolv-conf.systemd which in turn is
|
||||
a symlink to /run/systemd/resolve/resolv.conf. And /run/systemd/resolve/resolv.conf
|
||||
is created by systemd-resolved.service by default in current OE's systemd
|
||||
based systems.
|
||||
|
||||
This fixes errro like below.
|
||||
|
||||
Failed to open /etc/resolv.conf: Invalid argument
|
||||
|
||||
In fact, handling of /etc/resolv.conf is quite distro specific. So this patch
|
||||
is marked as OE specific.
|
||||
|
||||
Upstream-Status: Inappropriate [OE Specific]
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
|
||||
When connman installed to image, /etc/resolv.conf is link to
|
||||
/etc/resolv-conf.connman. So launch avahi-daemon after connman too.
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
avahi-daemon/avahi-daemon.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/avahi-daemon/avahi-daemon.service.in b/avahi-daemon/avahi-daemon.service.in
|
||||
index 548c834..63e28e4 100644
|
||||
--- a/avahi-daemon/avahi-daemon.service.in
|
||||
+++ b/avahi-daemon/avahi-daemon.service.in
|
||||
@@ -18,6 +18,7 @@
|
||||
[Unit]
|
||||
Description=Avahi mDNS/DNS-SD Stack
|
||||
Requires=avahi-daemon.socket
|
||||
+After=systemd-resolved.service connman.service
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||
|
||||
case "$1" in
|
||||
|
||||
deconfig|renew|bound)
|
||||
/usr/sbin/avahi-autoipd -k $interface 2> /dev/null
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||
|
||||
case "$1" in
|
||||
|
||||
leasefail)
|
||||
/usr/sbin/avahi-autoipd -wD $interface 2> /dev/null
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,41 @@
|
||||
CVE: CVE-2021-3468
|
||||
Upstream-Status: Submitted [https://github.com/lathiat/avahi/pull/330]
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From 447affe29991ee99c6b9732fc5f2c1048a611d3b Mon Sep 17 00:00:00 2001
|
||||
From: Riccardo Schirone <sirmy15@gmail.com>
|
||||
Date: Fri, 26 Mar 2021 11:50:24 +0100
|
||||
Subject: [PATCH] Avoid infinite-loop in avahi-daemon by handling HUP event in
|
||||
client_work
|
||||
|
||||
If a client fills the input buffer, client_work() disables the
|
||||
AVAHI_WATCH_IN event, thus preventing the function from executing the
|
||||
`read` syscall the next times it is called. However, if the client then
|
||||
terminates the connection, the socket file descriptor receives a HUP
|
||||
event, which is not handled, thus the kernel keeps marking the HUP event
|
||||
as occurring. While iterating over the file descriptors that triggered
|
||||
an event, the client file descriptor will keep having the HUP event and
|
||||
the client_work() function is always called with AVAHI_WATCH_HUP but
|
||||
without nothing being done, thus entering an infinite loop.
|
||||
|
||||
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984938
|
||||
---
|
||||
avahi-daemon/simple-protocol.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/avahi-daemon/simple-protocol.c b/avahi-daemon/simple-protocol.c
|
||||
index 3e0ebb11..6c0274d6 100644
|
||||
--- a/avahi-daemon/simple-protocol.c
|
||||
+++ b/avahi-daemon/simple-protocol.c
|
||||
@@ -424,6 +424,11 @@ static void client_work(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEv
|
||||
}
|
||||
}
|
||||
|
||||
+ if (events & AVAHI_WATCH_HUP) {
|
||||
+ client_free(c);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
c->server->poll_api->watch_update(
|
||||
watch,
|
||||
(c->outbuf_length > 0 ? AVAHI_WATCH_OUT : 0) |
|
||||
@@ -0,0 +1,47 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
Index: avahi-0.7/initscript/debian/avahi-daemon.in
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/initscript/debian/avahi-daemon.in
|
||||
+++ avahi-0.7/initscript/debian/avahi-daemon.in
|
||||
@@ -1,5 +1,17 @@
|
||||
#!/bin/sh
|
||||
-
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: avahi
|
||||
+# Required-Start: $remote_fs dbus
|
||||
+# Required-Stop: $remote_fs dbus
|
||||
+# Should-Start: $syslog
|
||||
+# Should-Stop: $syslog
|
||||
+# Default-Start: 2 3 4 5
|
||||
+# Default-Stop: 0 1 6
|
||||
+# Short-Description: Avahi mDNS/DNS-SD Daemon
|
||||
+# Description: Zeroconf daemon for configuring your network
|
||||
+# automatically
|
||||
+### END INIT INFO
|
||||
+#
|
||||
# This file is part of avahi.
|
||||
#
|
||||
# avahi is free software; you can redistribute it and/or modify it
|
||||
Index: avahi-0.7/initscript/debian/avahi-dnsconfd.in
|
||||
===================================================================
|
||||
--- avahi-0.7.orig/initscript/debian/avahi-dnsconfd.in
|
||||
+++ avahi-0.7/initscript/debian/avahi-dnsconfd.in
|
||||
@@ -1,4 +1,17 @@
|
||||
#!/bin/sh
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: avahi-dnsconfd
|
||||
+# Required-Start: $remote_fs avahi
|
||||
+# Required-Stop: $remote_fs avahi
|
||||
+# Should-Start: $syslog
|
||||
+# Should-Stop: $syslog
|
||||
+# Default-Start: 2 3 4 5
|
||||
+# Default-Stop: 0 1 6
|
||||
+# Short-Description: Avahi mDNS/DNS-SD DNS configuration
|
||||
+# Description: Zeroconf daemon for configuring your network
|
||||
+# automatically
|
||||
+### END INIT INFO
|
||||
+#
|
||||
|
||||
# This file is part of avahi.
|
||||
#
|
||||
@@ -0,0 +1,153 @@
|
||||
CVE: CVE-2021-36217
|
||||
CVE: CVE-2021-3502
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From 9d31939e55280a733d930b15ac9e4dda4497680c Mon Sep 17 00:00:00 2001
|
||||
From: Tommi Rantala <tommi.t.rantala@nokia.com>
|
||||
Date: Mon, 8 Feb 2021 11:04:43 +0200
|
||||
Subject: [PATCH] Fix NULL pointer crashes from #175
|
||||
|
||||
avahi-daemon is crashing when running "ping .local".
|
||||
The crash is due to failing assertion from NULL pointer.
|
||||
Add missing NULL pointer checks to fix it.
|
||||
|
||||
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
|
||||
---
|
||||
avahi-core/browse-dns-server.c | 5 ++++-
|
||||
avahi-core/browse-domain.c | 5 ++++-
|
||||
avahi-core/browse-service-type.c | 3 +++
|
||||
avahi-core/browse-service.c | 3 +++
|
||||
avahi-core/browse.c | 3 +++
|
||||
avahi-core/resolve-address.c | 5 ++++-
|
||||
avahi-core/resolve-host-name.c | 5 ++++-
|
||||
avahi-core/resolve-service.c | 5 ++++-
|
||||
8 files changed, 29 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c
|
||||
index 049752e9..c2d914fa 100644
|
||||
--- a/avahi-core/browse-dns-server.c
|
||||
+++ b/avahi-core/browse-dns-server.c
|
||||
@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
|
||||
AvahiSDNSServerBrowser* b;
|
||||
|
||||
b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_dns_server_browser_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c
|
||||
index f145d56a..06fa70c0 100644
|
||||
--- a/avahi-core/browse-domain.c
|
||||
+++ b/avahi-core/browse-domain.c
|
||||
@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new(
|
||||
AvahiSDomainBrowser *b;
|
||||
|
||||
b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_domain_browser_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/browse-service-type.c b/avahi-core/browse-service-type.c
|
||||
index fdd22dcd..b1fc7af8 100644
|
||||
--- a/avahi-core/browse-service-type.c
|
||||
+++ b/avahi-core/browse-service-type.c
|
||||
@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
|
||||
AvahiSServiceTypeBrowser *b;
|
||||
|
||||
b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_type_browser_start(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c
|
||||
index 5531360c..63e0275a 100644
|
||||
--- a/avahi-core/browse-service.c
|
||||
+++ b/avahi-core/browse-service.c
|
||||
@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new(
|
||||
AvahiSServiceBrowser *b;
|
||||
|
||||
b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_browser_start(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index 2941e579..e8a915e9 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new(
|
||||
AvahiSRecordBrowser *b;
|
||||
|
||||
b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_record_browser_start_query(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c
|
||||
index ac0b29b1..e61dd242 100644
|
||||
--- a/avahi-core/resolve-address.c
|
||||
+++ b/avahi-core/resolve-address.c
|
||||
@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new(
|
||||
AvahiSAddressResolver *b;
|
||||
|
||||
b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_address_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c
|
||||
index 808b0e72..4e8e5973 100644
|
||||
--- a/avahi-core/resolve-host-name.c
|
||||
+++ b/avahi-core/resolve-host-name.c
|
||||
@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
|
||||
AvahiSHostNameResolver *b;
|
||||
|
||||
b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_host_name_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c
|
||||
index 66bf3cae..43771763 100644
|
||||
--- a/avahi-core/resolve-service.c
|
||||
+++ b/avahi-core/resolve-service.c
|
||||
@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new(
|
||||
AvahiSServiceResolver *b;
|
||||
|
||||
b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
From 31dde3562f287429eea94b77250d184818b49063 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Mon, 15 Oct 2018 16:55:09 +0800
|
||||
Subject: [PATCH] avoid start failure with bind user
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
init.d | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/init.d b/init.d
|
||||
index b2eec60..6e03936 100644
|
||||
--- a/init.d
|
||||
+++ b/init.d
|
||||
@@ -57,6 +57,7 @@ case "$1" in
|
||||
modprobe capability >/dev/null 2>&1 || true
|
||||
if [ ! -f /etc/bind/rndc.key ]; then
|
||||
/usr/sbin/rndc-confgen -a -b 512
|
||||
+ chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true
|
||||
chmod 0640 /etc/bind/rndc.key
|
||||
fi
|
||||
if [ -f /var/run/named/named.pid ]; then
|
||||
--
|
||||
2.7.4
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 4e83392e840fa7b05e778710b8c202d102477a13 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Mon, 27 Aug 2018 21:24:20 +0800
|
||||
Subject: [PATCH] `named/lwresd -V' and start log hide build options
|
||||
|
||||
The build options expose build path directories, so hide them.
|
||||
[snip]
|
||||
$ named -V
|
||||
|built by make with *** (options are hidden)
|
||||
[snip]
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
|
||||
Refreshed for 9.16.0
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bf20690..c5d330f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -35,7 +35,7 @@ AC_DEFINE([PACKAGE_VERSION_EXTRA], ["][bind_VERSION_EXTRA]["], [BIND 9 Extra par
|
||||
AC_DEFINE([PACKAGE_DESCRIPTION], [m4_ifnblank(bind_DESCRIPTION, [" ]bind_DESCRIPTION["], [])], [An extra string to print after PACKAGE_STRING])
|
||||
AC_DEFINE([PACKAGE_SRCID], ["][bind_SRCID]["], [A short hash from git])
|
||||
|
||||
-bind_CONFIGARGS="${ac_configure_args:-default}"
|
||||
+bind_CONFIGARGS="(removed for reproducibility)"
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_CONFIGARGS], ["$bind_CONFIGARGS"], [Either 'defaults' or used ./configure options])
|
||||
|
||||
AC_DEFINE([PACKAGE_BUILDER], ["make"], [make or Visual Studio])
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
From 246087f89e9434b726c7884e4c0964f71084f091 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||||
Date: Tue, 9 Jun 2015 11:22:00 -0400
|
||||
Subject: [PATCH] bind: ensure searching for json headers searches sysroot
|
||||
|
||||
Bind can fail configure by detecting headers w/o libs[1], or
|
||||
it can fail the host contamination check as per below:
|
||||
|
||||
ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
|
||||
Rerun configure task after fixing this. The path was 'build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/build'
|
||||
ERROR: Function failed: do_qa_configure
|
||||
ERROR: Logfile of failure stored in: build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/temp/log.do_configure.5242
|
||||
ERROR: Task 5 (meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure) failed with exit code '1'
|
||||
NOTE: Tasks Summary: Attempted 773 tasks of which 768 didn't need to be rerun and 1 failed.
|
||||
No currently running tasks (773 of 781)
|
||||
|
||||
Summary: 1 task failed:
|
||||
/meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure
|
||||
|
||||
One way to fix it would be to unconditionally disable json in bind
|
||||
configure[2] but here we fix it by using the path to where we would
|
||||
put the header if we had json in the sysroot, in case someone wants
|
||||
to make use of the combination some day.
|
||||
|
||||
[1] https://trac.macports.org/ticket/45305
|
||||
[2] https://trac.macports.org/changeset/126406
|
||||
|
||||
Upstream-Status: Inappropriate [OE Specific]
|
||||
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 10e8bf6..bf20690 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -814,7 +814,7 @@ AS_CASE([$with_lmdb],
|
||||
[no],[],
|
||||
[auto|yes], [PKG_CHECK_MODULES([LMDB], [lmdb],
|
||||
[ac_lib_lmdb_found=yes],
|
||||
- [for ac_lib_lmdb_path in /usr /usr/local /opt /opt/local; do
|
||||
+ [for ac_lib_lmdb_path in "${STAGING_INCDIR}"; do
|
||||
AX_LIB_LMDB([$ac_lib_lmdb_path],
|
||||
[ac_lib_lmdb_found=yes
|
||||
break])
|
||||
@@ -0,0 +1,2 @@
|
||||
# startup options for the server
|
||||
OPTIONS="-u bind"
|
||||
@@ -0,0 +1,330 @@
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
the patch is imported from openembedded project
|
||||
|
||||
11/30/2010 - Qing He <qing.he@intel.com>
|
||||
|
||||
diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0
|
||||
--- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+;
|
||||
+; BIND reverse data file for broadcast zone
|
||||
+;
|
||||
+$TTL 604800
|
||||
+@ IN SOA localhost. root.localhost. (
|
||||
+ 1 ; Serial
|
||||
+ 604800 ; Refresh
|
||||
+ 86400 ; Retry
|
||||
+ 2419200 ; Expire
|
||||
+ 604800 ) ; Negative Cache TTL
|
||||
+;
|
||||
+@ IN NS localhost.
|
||||
diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127
|
||||
--- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,13 @@
|
||||
+;
|
||||
+; BIND reverse data file for local loopback interface
|
||||
+;
|
||||
+$TTL 604800
|
||||
+@ IN SOA localhost. root.localhost. (
|
||||
+ 1 ; Serial
|
||||
+ 604800 ; Refresh
|
||||
+ 86400 ; Retry
|
||||
+ 2419200 ; Expire
|
||||
+ 604800 ) ; Negative Cache TTL
|
||||
+;
|
||||
+@ IN NS localhost.
|
||||
+1.0.0 IN PTR localhost.
|
||||
diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
|
||||
--- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,14 @@
|
||||
+; BIND reverse data file for empty rfc1918 zone
|
||||
+;
|
||||
+; DO NOT EDIT THIS FILE - it is used for multiple zones.
|
||||
+; Instead, copy it, edit named.conf, and use that copy.
|
||||
+;
|
||||
+$TTL 86400
|
||||
+@ IN SOA localhost. root.localhost. (
|
||||
+ 1 ; Serial
|
||||
+ 604800 ; Refresh
|
||||
+ 86400 ; Retry
|
||||
+ 2419200 ; Expire
|
||||
+ 86400 ) ; Negative Cache TTL
|
||||
+;
|
||||
+@ IN NS localhost.
|
||||
diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255
|
||||
--- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+;
|
||||
+; BIND reserve data file for broadcast zone
|
||||
+;
|
||||
+$TTL 604800
|
||||
+@ IN SOA localhost. root.localhost. (
|
||||
+ 1 ; Serial
|
||||
+ 604800 ; Refresh
|
||||
+ 86400 ; Retry
|
||||
+ 2419200 ; Expire
|
||||
+ 604800 ) ; Negative Cache TTL
|
||||
+;
|
||||
+@ IN NS localhost.
|
||||
diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
|
||||
--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,13 @@
|
||||
+;
|
||||
+; BIND data file for local loopback interface
|
||||
+;
|
||||
+$TTL 604800
|
||||
+@ IN SOA localhost. root.localhost. (
|
||||
+ 1 ; Serial
|
||||
+ 604800 ; Refresh
|
||||
+ 86400 ; Retry
|
||||
+ 2419200 ; Expire
|
||||
+ 604800 ) ; Negative Cache TTL
|
||||
+;
|
||||
+@ IN NS localhost.
|
||||
+@ IN A 127.0.0.1
|
||||
diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root
|
||||
--- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200
|
||||
@@ -0,0 +1,45 @@
|
||||
+
|
||||
+; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
|
||||
+;; global options: printcmd
|
||||
+;; Got answer:
|
||||
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
|
||||
+;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
|
||||
+
|
||||
+;; QUESTION SECTION:
|
||||
+;. IN NS
|
||||
+
|
||||
+;; ANSWER SECTION:
|
||||
+. 518400 IN NS A.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS B.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS C.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS D.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS E.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS F.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS G.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS H.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS I.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS J.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS K.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS L.ROOT-SERVERS.NET.
|
||||
+. 518400 IN NS M.ROOT-SERVERS.NET.
|
||||
+
|
||||
+;; ADDITIONAL SECTION:
|
||||
+A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
|
||||
+B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
|
||||
+C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
|
||||
+D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
|
||||
+E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
|
||||
+F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
|
||||
+G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
|
||||
+H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
|
||||
+I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
|
||||
+J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
|
||||
+K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
|
||||
+L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
|
||||
+M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
|
||||
+
|
||||
+;; Query time: 81 msec
|
||||
+;; SERVER: 198.41.0.4#53(a.root-servers.net.)
|
||||
+;; WHEN: Sun Feb 1 11:27:14 2004
|
||||
+;; MSG SIZE rcvd: 436
|
||||
+
|
||||
diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf
|
||||
--- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200
|
||||
@@ -0,0 +1,49 @@
|
||||
+// This is the primary configuration file for the BIND DNS server named.
|
||||
+//
|
||||
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
|
||||
+
|
||||
+include "/etc/bind/named.conf.options";
|
||||
+
|
||||
+// prime the server with knowledge of the root servers
|
||||
+zone "." {
|
||||
+ type hint;
|
||||
+ file "/etc/bind/db.root";
|
||||
+};
|
||||
+
|
||||
+// be authoritative for the localhost forward and reverse zones, and for
|
||||
+// broadcast zones as per RFC 1912
|
||||
+
|
||||
+zone "localhost" {
|
||||
+ type master;
|
||||
+ file "/etc/bind/db.local";
|
||||
+};
|
||||
+
|
||||
+zone "127.in-addr.arpa" {
|
||||
+ type master;
|
||||
+ file "/etc/bind/db.127";
|
||||
+};
|
||||
+
|
||||
+zone "0.in-addr.arpa" {
|
||||
+ type master;
|
||||
+ file "/etc/bind/db.0";
|
||||
+};
|
||||
+
|
||||
+zone "255.in-addr.arpa" {
|
||||
+ type master;
|
||||
+ file "/etc/bind/db.255";
|
||||
+};
|
||||
+
|
||||
+// zone "com" { type delegation-only; };
|
||||
+// zone "net" { type delegation-only; };
|
||||
+
|
||||
+// From the release notes:
|
||||
+// Because many of our users are uncomfortable receiving undelegated answers
|
||||
+// from root or top level domains, other than a few for whom that behaviour
|
||||
+// has been trusted and expected for quite some length of time, we have now
|
||||
+// introduced the "root-delegations-only" feature which applies delegation-only
|
||||
+// logic to all top level domains, and to the root domain. An exception list
|
||||
+// should be specified, including "MUSEUM" and "DE", and any other top level
|
||||
+// domains from whom undelegated responses are expected and trusted.
|
||||
+// root-delegation-only exclude { "DE"; "MUSEUM"; };
|
||||
+
|
||||
+include "/etc/bind/named.conf.local";
|
||||
diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local
|
||||
--- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+//
|
||||
+// Do any local configuration here
|
||||
+//
|
||||
+
|
||||
+// Consider adding the 1918 zones here, if they are not used in your
|
||||
+// organization
|
||||
+//include "/etc/bind/zones.rfc1918";
|
||||
+
|
||||
diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options
|
||||
--- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200
|
||||
@@ -0,0 +1,24 @@
|
||||
+options {
|
||||
+ directory "/var/cache/bind";
|
||||
+
|
||||
+ // If there is a firewall between you and nameservers you want
|
||||
+ // to talk to, you might need to uncomment the query-source
|
||||
+ // directive below. Previous versions of BIND always asked
|
||||
+ // questions using port 53, but BIND 8.1 and later use an unprivileged
|
||||
+ // port by default.
|
||||
+
|
||||
+ // query-source address * port 53;
|
||||
+
|
||||
+ // If your ISP provided one or more IP addresses for stable
|
||||
+ // nameservers, you probably want to use them as forwarders.
|
||||
+ // Uncomment the following block, and insert the addresses replacing
|
||||
+ // the all-0's placeholder.
|
||||
+
|
||||
+ // forwarders {
|
||||
+ // 0.0.0.0;
|
||||
+ // };
|
||||
+
|
||||
+ auth-nxdomain no; # conform to RFC1035
|
||||
+
|
||||
+};
|
||||
+
|
||||
diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918
|
||||
--- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200
|
||||
@@ -0,0 +1,20 @@
|
||||
+zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+
|
||||
+zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
+
|
||||
+zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||
diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
|
||||
--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200
|
||||
@@ -0,0 +1,70 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
+
|
||||
+# for a chrooted server: "-u bind -t /var/lib/named"
|
||||
+# Don't modify this line, change or create /etc/default/bind9.
|
||||
+OPTIONS=""
|
||||
+
|
||||
+test -f /etc/default/bind9 && . /etc/default/bind9
|
||||
+
|
||||
+test -x /usr/sbin/rndc || exit 0
|
||||
+
|
||||
+case "$1" in
|
||||
+ start)
|
||||
+ echo -n "Starting domain name service: named"
|
||||
+
|
||||
+ modprobe capability >/dev/null 2>&1 || true
|
||||
+ if [ ! -f /etc/bind/rndc.key ]; then
|
||||
+ /usr/sbin/rndc-confgen -a -b 512
|
||||
+ chmod 0640 /etc/bind/rndc.key
|
||||
+ fi
|
||||
+ if [ -f /var/run/named/named.pid ]; then
|
||||
+ ps `cat /var/run/named/named.pid` > /dev/null && exit 1
|
||||
+ fi
|
||||
+
|
||||
+ # dirs under /var/run can go away on reboots.
|
||||
+ mkdir -p /var/run/named
|
||||
+ mkdir -p /var/cache/bind
|
||||
+ chmod 775 /var/run/named
|
||||
+ chown root:bind /var/run/named >/dev/null 2>&1 || true
|
||||
+
|
||||
+ if [ ! -x /usr/sbin/named ]; then
|
||||
+ echo "named binary missing - not starting"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
|
||||
+ --pidfile /var/run/named/named.pid -- $OPTIONS; then
|
||||
+ if [ -x /sbin/resolvconf ] ; then
|
||||
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
|
||||
+ fi
|
||||
+ fi
|
||||
+ echo "."
|
||||
+ ;;
|
||||
+
|
||||
+ stop)
|
||||
+ echo -n "Stopping domain name service: named"
|
||||
+ if [ -x /sbin/resolvconf ]; then
|
||||
+ /sbin/resolvconf -d lo
|
||||
+ fi
|
||||
+ /usr/sbin/rndc stop >/dev/null 2>&1
|
||||
+ echo "."
|
||||
+ ;;
|
||||
+
|
||||
+ reload)
|
||||
+ /usr/sbin/rndc reload
|
||||
+ ;;
|
||||
+
|
||||
+ restart|force-reload)
|
||||
+ $0 stop
|
||||
+ sleep 2
|
||||
+ $0 start
|
||||
+ ;;
|
||||
+
|
||||
+ *)
|
||||
+ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
|
||||
+ exit 1
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+exit 0
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -s /etc/bind/rndc.key ]; then
|
||||
echo -n "Generating /etc/bind/rndc.key:"
|
||||
/usr/sbin/rndc-confgen -a -b 512
|
||||
chown root:bind /etc/bind/rndc.key
|
||||
chmod 0640 /etc/bind/rndc.key
|
||||
fi
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
Subject: init.d: add support for read-only rootfs
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
init.d | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/init.d b/init.d
|
||||
index 0111ed4..24677c8 100644
|
||||
--- a/init.d
|
||||
+++ b/init.d
|
||||
@@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
# Don't modify this line, change or create /etc/default/bind9.
|
||||
OPTIONS=""
|
||||
|
||||
+test -f /etc/default/rcS && . /etc/default/rcS
|
||||
test -f /etc/default/bind9 && . /etc/default/bind9
|
||||
|
||||
+# This function is here because it's possible that /var and / are on different partitions.
|
||||
+is_on_read_only_partition () {
|
||||
+ DIRECTORY=$1
|
||||
+ dir=`readlink -f $DIRECTORY`
|
||||
+ while true; do
|
||||
+ if [ ! -d "$dir" ]; then
|
||||
+ echo "ERROR: $dir is not a directory"
|
||||
+ exit 1
|
||||
+ else
|
||||
+ for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \
|
||||
+ END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do
|
||||
+ [ "$flag" = "FOUND" ] && partition="read-write"
|
||||
+ [ "$flag" = "ro" ] && { partition="read-only"; break; }
|
||||
+ done
|
||||
+ if [ "$dir" = "/" -o -n "$partition" ]; then
|
||||
+ break
|
||||
+ else
|
||||
+ dir=`dirname $dir`
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
+ [ "$partition" = "read-only" ] && echo "yes" || echo "no"
|
||||
+}
|
||||
+
|
||||
+bind_mount () {
|
||||
+ olddir=$1
|
||||
+ newdir=$2
|
||||
+ mkdir -p $olddir
|
||||
+ cp -a $newdir/* $olddir
|
||||
+ mount --bind $olddir $newdir
|
||||
+}
|
||||
+
|
||||
+# Deal with read-only rootfs
|
||||
+if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
|
||||
+ [ "$VERBOSE" != "no" ] && echo "WARN: start bind service in read-only rootfs"
|
||||
+ [ `is_on_read_only_partition /etc/bind` = "yes" ] && bind_mount /var/volatile/bind/etc /etc/bind
|
||||
+ [ `is_on_read_only_partition /var/named` = "yes" ] && bind_mount /var/volatile/bind/named /var/named
|
||||
+fi
|
||||
+
|
||||
test -x /usr/sbin/rndc || exit 0
|
||||
|
||||
case "$1" in
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
bind: make "/etc/init.d/bind stop" work
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Add some configurations, make rndc command be able to controls
|
||||
the named daemon.
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
---
|
||||
conf/named.conf | 5 +++++
|
||||
conf/rndc.conf | 5 +++++
|
||||
2 files changed, 10 insertions(+), 0 deletions(-)
|
||||
create mode 100644 conf/rndc.conf
|
||||
|
||||
diff --git a/conf/named.conf b/conf/named.conf
|
||||
index 95829cf..c8899e7 100644
|
||||
--- a/conf/named.conf
|
||||
+++ b/conf/named.conf
|
||||
@@ -47,3 +47,8 @@ zone "255.in-addr.arpa" {
|
||||
// root-delegation-only exclude { "DE"; "MUSEUM"; };
|
||||
|
||||
include "/etc/bind/named.conf.local";
|
||||
+include "/etc/bind/rndc.key" ;
|
||||
+controls {
|
||||
+ inet 127.0.0.1 allow { localhost; }
|
||||
+ keys { rndc-key; };
|
||||
+};
|
||||
diff --git a/conf/rndc.conf b/conf/rndc.conf
|
||||
new file mode 100644
|
||||
index 0000000..a0b481d
|
||||
--- /dev/null
|
||||
+++ b/conf/rndc.conf
|
||||
@@ -0,0 +1,5 @@
|
||||
+include "/etc/bind/rndc.key";
|
||||
+options {
|
||||
+ default-server localhost;
|
||||
+ default-key rndc-key;
|
||||
+};
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Berkeley Internet Name Domain (DNS)
|
||||
Wants=nss-lookup.target
|
||||
Before=nss-lookup.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/default/bind9
|
||||
PIDFile=/run/named/named.pid
|
||||
|
||||
ExecStartPre=@SBINDIR@/generate-rndc-key.sh
|
||||
ExecStart=@SBINDIR@/named $OPTIONS
|
||||
|
||||
ExecReload=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc reload > /dev/null 2>&1 || @BASE_BINDIR@/kill -HUP $MAINPID'
|
||||
|
||||
ExecStop=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc stop > /dev/null 2>&1 || @BASE_BINDIR@/kill -TERM $MAINPID'
|
||||
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,113 @@
|
||||
SUMMARY = "ISC Internet Domain Name Server"
|
||||
HOMEPAGE = "https://www.isc.org/bind/"
|
||||
DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system"
|
||||
SECTION = "console/network"
|
||||
|
||||
LICENSE = "MPL-2.0"
|
||||
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d8cf7bd9c4fd5471a588e7e66e672408"
|
||||
|
||||
DEPENDS = "openssl libcap zlib libuv"
|
||||
|
||||
SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://conf.patch \
|
||||
file://named.service \
|
||||
file://bind9 \
|
||||
file://generate-rndc-key.sh \
|
||||
file://make-etc-initd-bind-stop-work.patch \
|
||||
file://init.d-add-support-for-read-only-rootfs.patch \
|
||||
file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
|
||||
file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
|
||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "c88234fe07ee75c3c8a9e59152fee64b714643de8e22cf98da3db4d0b57e0775"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
||||
# follow the ESV versions divisible by 2
|
||||
UPSTREAM_CHECK_REGEX = "(?P<pver>9.(\d*[02468])+(\.\d+)+(-P\d+)*)/"
|
||||
|
||||
# Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore
|
||||
# so the issue doesn't affect us.
|
||||
CVE_STATUS[CVE-2019-6470] = "not-applicable-config: Issue only affects dhcpd with recent bind versions and we don't ship dhcpd anymore."
|
||||
|
||||
inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives
|
||||
|
||||
# PACKAGECONFIGs readline and libedit should NOT be set at same time
|
||||
PACKAGECONFIG ?= "readline"
|
||||
PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
|
||||
PACKAGECONFIG[readline] = "--with-readline=readline,,readline"
|
||||
PACKAGECONFIG[libedit] = "--with-readline=libedit,,libedit"
|
||||
PACKAGECONFIG[dns-over-http] = "--enable-doh,--disable-doh,nghttp2"
|
||||
|
||||
EXTRA_OECONF = " --disable-auto-validation \
|
||||
--with-gssapi=no --with-lmdb=no --with-zlib \
|
||||
--sysconfdir=${sysconfdir}/bind \
|
||||
--with-openssl=${STAGING_DIR_HOST}${prefix} \
|
||||
"
|
||||
LDFLAGS:append = " -lz"
|
||||
|
||||
# dhcp needs .la so keep them
|
||||
REMOVE_LIBTOOL_LA = "0"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
|
||||
--user-group bind"
|
||||
|
||||
INITSCRIPT_NAME = "bind"
|
||||
INITSCRIPT_PARAMS = "defaults"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "named.service"
|
||||
|
||||
do_install:append() {
|
||||
|
||||
install -d -o bind "${D}${localstatedir}/cache/bind"
|
||||
install -d "${D}${sysconfdir}/bind"
|
||||
install -d "${D}${sysconfdir}/init.d"
|
||||
install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
|
||||
install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
|
||||
|
||||
# Install systemd related files
|
||||
install -d ${D}${sbindir}
|
||||
install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/named.service ${D}${systemd_system_unitdir}
|
||||
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
|
||||
-e 's,@SBINDIR@,${sbindir},g' \
|
||||
${D}${systemd_system_unitdir}/named.service
|
||||
|
||||
install -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
|
||||
fi
|
||||
}
|
||||
|
||||
CONFFILES:${PN} = " \
|
||||
${sysconfdir}/bind/named.conf \
|
||||
${sysconfdir}/bind/named.conf.local \
|
||||
${sysconfdir}/bind/named.conf.options \
|
||||
${sysconfdir}/bind/db.0 \
|
||||
${sysconfdir}/bind/db.127 \
|
||||
${sysconfdir}/bind/db.empty \
|
||||
${sysconfdir}/bind/db.local \
|
||||
${sysconfdir}/bind/db.root \
|
||||
"
|
||||
|
||||
ALTERNATIVE:${PN}-utils = "nslookup"
|
||||
ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup"
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
PACKAGE_BEFORE_PN += "${PN}-utils"
|
||||
FILES:${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate"
|
||||
FILES:${PN}-dev += "${bindir}/isc-config.h"
|
||||
FILES:${PN} += "${sbindir}/generate-rndc-key.sh"
|
||||
|
||||
PACKAGE_BEFORE_PN += "${PN}-libs"
|
||||
# special arrangement below due to
|
||||
# https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88
|
||||
FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so"
|
||||
FILES:${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so"
|
||||
|
||||
DEV_PKG_DEPENDENCY = ""
|
||||
@@ -0,0 +1,161 @@
|
||||
SUMMARY = "Linux Bluetooth Stack Userland V5"
|
||||
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 = "GPL-2.0-or-later & LGPL-2.1-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
|
||||
file://src/main.c;beginline=1;endline=24;md5=0ad83ca0dc37ab08af448777c581e7ac"
|
||||
DEPENDS = "dbus glib-2.0"
|
||||
RDEPENDS:${PN} += "dbus"
|
||||
PROVIDES += "bluez-hcidump"
|
||||
RPROVIDES:${PN} += "bluez-hcidump"
|
||||
|
||||
RCONFLICTS:${PN} = "bluez4"
|
||||
|
||||
PACKAGECONFIG ??= "obex-profiles \
|
||||
readline \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
|
||||
a2dp-profiles \
|
||||
avrcp-profiles \
|
||||
network-profiles \
|
||||
hid-profiles \
|
||||
hog-profiles \
|
||||
tools \
|
||||
deprecated \
|
||||
udev \
|
||||
"
|
||||
PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
|
||||
PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline,"
|
||||
PACKAGECONFIG[testing] = "--enable-testing,--disable-testing"
|
||||
PACKAGECONFIG[midi] = "--enable-midi,--disable-midi,alsa-lib"
|
||||
PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd"
|
||||
PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,,cups"
|
||||
PACKAGECONFIG[nfc] = "--enable-nfc,--disable-nfc"
|
||||
PACKAGECONFIG[sap-profiles] = "--enable-sap,--disable-sap"
|
||||
PACKAGECONFIG[a2dp-profiles] = "--enable-a2dp,--disable-a2dp"
|
||||
PACKAGECONFIG[avrcp-profiles] = "--enable-avrcp,--disable-avrcp"
|
||||
PACKAGECONFIG[network-profiles] = "--enable-network,--disable-network"
|
||||
PACKAGECONFIG[hid-profiles] = "--enable-hid,--disable-hid"
|
||||
PACKAGECONFIG[hog-profiles] = "--enable-hog,--disable-hog"
|
||||
PACKAGECONFIG[health-profiles] = "--enable-health,--disable-health"
|
||||
PACKAGECONFIG[sixaxis] = "--enable-sixaxis,--disable-sixaxis"
|
||||
PACKAGECONFIG[tools] = "--enable-tools,--disable-tools"
|
||||
PACKAGECONFIG[threads] = "--enable-threads,--disable-threads"
|
||||
PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
|
||||
PACKAGECONFIG[mesh] = "--enable-mesh --enable-external-ell,--disable-mesh, json-c ell"
|
||||
PACKAGECONFIG[btpclient] = "--enable-btpclient --enable-external-ell,--disable-btpclient, ell"
|
||||
PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
|
||||
PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,python3-docutils-native"
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
|
||||
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://0001-test-gatt-Fix-hung-issue.patch \
|
||||
file://0004-src-shared-util.c-include-linux-limits.h.patch \
|
||||
file://fix-check-ell-path.patch \
|
||||
"
|
||||
S = "${WORKDIR}/bluez-${PV}"
|
||||
|
||||
CVE_PRODUCT = "bluez"
|
||||
|
||||
inherit autotools pkgconfig systemd update-rc.d ptest gobject-introspection-data
|
||||
|
||||
EXTRA_OECONF = "\
|
||||
--enable-test \
|
||||
--enable-datafiles \
|
||||
--enable-library \
|
||||
--enable-pie \
|
||||
--without-zsh-completion-dir \
|
||||
"
|
||||
|
||||
CFLAGS += "-DFIRMWARE_DIR=\\"${nonarch_base_libdir}/firmware\\""
|
||||
|
||||
# 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_TESTING ??= ""
|
||||
NOINST_TOOLS_BT ??= ""
|
||||
NOINST_TOOLS = " \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'readline', '${NOINST_TOOLS_READLINE}', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'testing', '${NOINST_TOOLS_TESTING}', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'tools', '${NOINST_TOOLS_BT}', '', d)} \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${INIT_D_DIR}
|
||||
install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
|
||||
|
||||
install -d ${D}${sysconfdir}/bluetooth/
|
||||
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/*
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
|
||||
|
||||
FILES:${PN} += " \
|
||||
${libdir}/bluetooth/plugins/*.so \
|
||||
${systemd_unitdir}/ ${datadir}/dbus-1 \
|
||||
${libdir}/cups \
|
||||
"
|
||||
FILES:${PN}-dev += " \
|
||||
${libdir}/bluetooth/plugins/*.la \
|
||||
"
|
||||
|
||||
FILES:${PN}-obex = "${libexecdir}/bluetooth/obexd \
|
||||
${exec_prefix}/lib/systemd/user/obex.service \
|
||||
${systemd_system_unitdir}/obex.service \
|
||||
${sysconfdir}/systemd/system/multi-user.target.wants/obex.service \
|
||||
${datadir}/dbus-1/services/org.bluez.obex.service \
|
||||
${sysconfdir}/dbus-1/system.d/obexd.conf \
|
||||
"
|
||||
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")
|
||||
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'))}"
|
||||
|
||||
RDEPENDS:${PN}-testtools += "python3-core python3-dbus"
|
||||
RDEPENDS:${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
|
||||
INITSCRIPT_PACKAGES = "${PN}"
|
||||
INITSCRIPT_NAME:${PN} = "bluetooth"
|
||||
|
||||
do_compile_ptest() {
|
||||
oe_runmake buildtests
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
cp -r ${B}/unit/ ${D}${PTEST_PATH}
|
||||
rm -f ${D}${PTEST_PATH}/unit/*.o
|
||||
}
|
||||
|
||||
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-utf-16"
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
From f74eb97c9fb3c0ee2895742e773ac6a3c41c999c Mon Sep 17 00:00:00 2001
|
||||
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 ++--
|
||||
.../src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (76%)
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index de59d29..73004a3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -1,12 +1,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
|
||||
|
||||
if OBEX
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service.in
|
||||
similarity index 76%
|
||||
rename from obexd/src/org.bluez.obex.service
|
||||
rename to obexd/src/org.bluez.obex.service.in
|
||||
index a538088..9c815f2 100644
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -1,4 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
+Exec=@libexecdir@/obexd
|
||||
SystemdService=dbus-org.bluez.obex.service
|
||||
@@ -0,0 +1,41 @@
|
||||
From 7dcc5f46a31ac4eaa67c0ab3aaae38005db7458f Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <Mingli.Yu@windriver.com>
|
||||
Date: Fri, 24 Aug 2018 12:04:03 +0800
|
||||
Subject: [PATCH] test-gatt: Fix hung issue
|
||||
|
||||
The below test hangs infinitely
|
||||
$ unit/test-gatt -p /robustness/unkown-request -d
|
||||
/robustness/unkown-request - init
|
||||
/robustness/unkown-request - setup
|
||||
/robustness/unkown-request - setup complete
|
||||
/robustness/unkown-request - run
|
||||
GATT: < 02 17 00 ...
|
||||
bt_gatt_server:MTU exchange complete, with MTU: 23
|
||||
GATT: > 03 00 02 ...
|
||||
PDU: = 03 00 02 ...
|
||||
GATT: < bf 00
|
||||
|
||||
Actually, the /robustness/unkown-request test does
|
||||
no action.
|
||||
|
||||
Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=153508881804635&w=2]
|
||||
|
||||
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
|
||||
|
||||
---
|
||||
unit/test-gatt.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
|
||||
index f92d860..a5f7117 100644
|
||||
--- a/unit/test-gatt.c
|
||||
+++ b/unit/test-gatt.c
|
||||
@@ -4479,7 +4479,7 @@ int main(int argc, char *argv[])
|
||||
test_server, service_db_1, NULL,
|
||||
raw_pdu(0x03, 0x00, 0x02),
|
||||
raw_pdu(0xbf, 0x00),
|
||||
- raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));
|
||||
+ raw_pdu());
|
||||
|
||||
define_test_server("/robustness/unkown-command",
|
||||
test_server, service_db_1, NULL,
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
From a657fddd13a2e756b0af315301f1c44081e2f668 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 7041f8e..25966cd 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -594,6 +594,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
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
From 51584158b9a2e58f3790f8a7387b5cf167eca88b Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Mon, 12 Dec 2022 13:10:19 +0100
|
||||
Subject: [PATCH] src/shared/util.c: include linux/limits.h
|
||||
|
||||
MAX_INPUT is defined in that file. This matters on non-glibc
|
||||
systems such as those using musl.
|
||||
|
||||
Upstream-Status: Submitted [to linux-bluetooth@vger.kernel.org,luiz.von.dentz@intel.com,frederic.danis@collabora.com]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
src/shared/util.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 0a0308c..1f61314 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
+#include <linux/limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_RANDOM_H
|
||||
@@ -0,0 +1,39 @@
|
||||
Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=168818474411163&w=2]
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
|
||||
From linux-bluetooth Sat Jul 01 04:12:52 2023
|
||||
From: Rudi Heitbaum <rudi () heitbaum ! com>
|
||||
Date: Sat, 01 Jul 2023 04:12:52 +0000
|
||||
To: linux-bluetooth
|
||||
Subject: [PATCH] configure: Fix check ell path for cross compiling
|
||||
Message-Id: <20230701041252.139338-1-rudi () heitbaum ! com>
|
||||
X-MARC-Message: https://marc.info/?l=linux-bluetooth&m=168818474411163
|
||||
|
||||
Use of AC_CHECK_FILE prevents cross compilation.
|
||||
Instead use test to support cross compiling.
|
||||
|
||||
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
|
||||
---
|
||||
configure.ac | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index eff297960..bc7edfcd3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -298,9 +298,10 @@ if (test "${enable_external_ell}" = "yes"); then
|
||||
AC_SUBST(ELL_LIBS)
|
||||
fi
|
||||
if (test "${enable_external_ell}" != "yes"); then
|
||||
- AC_CHECK_FILE(${srcdir}/ell/ell.h, dummy=yes,
|
||||
- AC_CHECK_FILE(${srcdir}/../ell/ell/ell.h, dummy=yes,
|
||||
- AC_MSG_ERROR(ELL source is required or use --enable-external-ell)))
|
||||
+ if (test ! -f ${srcdir}/ell/ell.h) &&
|
||||
+ (test ! -f ${srcdir}/../ell/ell/ell.h); then
|
||||
+ AC_MSG_ERROR(ELL source is required or use --enable-external-ell)
|
||||
+ fi
|
||||
fi
|
||||
AM_CONDITIONAL(EXTERNAL_ELL, test "${enable_external_ell}" = "yes" ||
|
||||
(test "${enable_btpclient}" != "yes" &&
|
||||
--
|
||||
2.34.1
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC=bluetooth
|
||||
|
||||
DAEMON=@LIBEXECDIR@/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 -n "Starting $DESC: "
|
||||
if test "$BLUETOOTH_ENABLED" = 0; then
|
||||
echo "disabled (see /etc/default/bluetooth)."
|
||||
exit 0
|
||||
fi
|
||||
start-stop-daemon --start --background $SSD_OPTIONS
|
||||
echo "${DAEMON##*/}."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
if test "$BLUETOOTH_ENABLED" = 0; then
|
||||
echo "disabled (see /etc/default/bluetooth)."
|
||||
exit 0
|
||||
fi
|
||||
start-stop-daemon --stop $SSD_OPTIONS
|
||||
echo "${DAEMON##*/}."
|
||||
;;
|
||||
restart|force-reload)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
status ${DAEMON} || exit $?
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/bluetooth
|
||||
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# vim:noet
|
||||
@@ -0,0 +1,31 @@
|
||||
#! /bin/sh
|
||||
|
||||
cd unit
|
||||
|
||||
failed=0
|
||||
all=0
|
||||
|
||||
for f in test-*; do
|
||||
"./$f" -q
|
||||
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
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
require bluez5.inc
|
||||
|
||||
SRC_URI[sha256sum] = "fc505e6445cb579a55cacee6821fe70d633921522043d322b696de0a175ff933"
|
||||
|
||||
CVE_STATUS[CVE-2022-3563] = "cpe-incorrect: This issues have kernel fixes rather than bluez fixes"
|
||||
CVE_STATUS[CVE-2022-3637] = "cpe-incorrect: This issues have kernel fixes rather than bluez fixes"
|
||||
|
||||
# noinst programs in Makefile.tools that are conditional on READLINE
|
||||
# support
|
||||
NOINST_TOOLS_READLINE ?= " \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
|
||||
tools/obex-client-tool \
|
||||
tools/obex-server-tool \
|
||||
tools/bluetooth-player \
|
||||
tools/obexctl \
|
||||
tools/btmgmt \
|
||||
"
|
||||
|
||||
# noinst programs in Makefile.tools that are conditional on TESTING
|
||||
# support
|
||||
NOINST_TOOLS_TESTING ?= " \
|
||||
emulator/btvirt \
|
||||
emulator/b1ee \
|
||||
emulator/hfp \
|
||||
peripheral/btsensor \
|
||||
tools/3dsp \
|
||||
tools/mgmt-tester \
|
||||
tools/gap-tester \
|
||||
tools/l2cap-tester \
|
||||
tools/sco-tester \
|
||||
tools/smp-tester \
|
||||
tools/hci-tester \
|
||||
tools/rfcomm-tester \
|
||||
tools/bnep-tester \
|
||||
tools/userchan-tester \
|
||||
"
|
||||
|
||||
# noinst programs in Makefile.tools that are conditional on TOOLS
|
||||
# support
|
||||
NOINST_TOOLS_BT ?= " \
|
||||
tools/bdaddr \
|
||||
tools/avinfo \
|
||||
tools/avtest \
|
||||
tools/scotest \
|
||||
tools/amptest \
|
||||
tools/hwdb \
|
||||
tools/hcieventmask \
|
||||
tools/hcisecfilter \
|
||||
tools/btinfo \
|
||||
tools/btsnoop \
|
||||
tools/btproxy \
|
||||
tools/btiotest \
|
||||
tools/bneptest \
|
||||
tools/mcaptest \
|
||||
tools/cltest \
|
||||
tools/oobtest \
|
||||
tools/advtest \
|
||||
tools/seq2bseq \
|
||||
tools/nokfw \
|
||||
tools/create-image \
|
||||
tools/eddystone \
|
||||
tools/ibeacon \
|
||||
tools/btgatt-client \
|
||||
tools/btgatt-server \
|
||||
tools/test-runner \
|
||||
tools/check-selftest \
|
||||
tools/gatt-service \
|
||||
profiles/iap/iapd \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient', '', d)} \
|
||||
"
|
||||
@@ -0,0 +1,22 @@
|
||||
SUMMARY = "Connman config to ignore wired interface on qemu machines"
|
||||
DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \
|
||||
network interface inside qemu machines."
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
|
||||
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = "file://main.conf \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/*"
|
||||
|
||||
# Kernel IP-Config is perfectly capable of setting up networking passed in via ip=
|
||||
do_install:append:qemuall() {
|
||||
mkdir -p ${D}${sysconfdir}/connman
|
||||
cp ${S}/main.conf ${D}${sysconfdir}/connman/main.conf
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
[General]
|
||||
NetworkInterfaceBlacklist = eth0
|
||||
@@ -0,0 +1,277 @@
|
||||
From a59b0fac02e74a971ac3f08bf28c17ce361a9526 Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
Date: Wed, 2 Mar 2016 15:47:49 +0200
|
||||
Subject: [PATCH] Port to Gtk3
|
||||
|
||||
Some unused (or not useful) code was removed, functionality should stay
|
||||
the same.
|
||||
|
||||
Code still contains quite a few uses of deprecated API.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
---
|
||||
applet/agent.c | 3 +--
|
||||
applet/main.c | 43 -------------------------------------------
|
||||
applet/status.c | 8 --------
|
||||
configure.ac | 3 +--
|
||||
properties/ethernet.c | 14 +++++++-------
|
||||
properties/main.c | 2 +-
|
||||
properties/wifi.c | 12 ++++++------
|
||||
7 files changed, 16 insertions(+), 69 deletions(-)
|
||||
|
||||
diff --git a/applet/agent.c b/applet/agent.c
|
||||
index 65bed08..04fe86a 100644
|
||||
--- a/applet/agent.c
|
||||
+++ b/applet/agent.c
|
||||
@@ -126,7 +126,6 @@ static void request_input_dialog(GHashTable *request,
|
||||
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
|
||||
gtk_window_set_urgency_hint(GTK_WINDOW(dialog), TRUE);
|
||||
- gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
|
||||
input->dialog = dialog;
|
||||
|
||||
gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
@@ -139,7 +138,7 @@ static void request_input_dialog(GHashTable *request,
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 4);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 20);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(table), 12);
|
||||
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table);
|
||||
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area (GTK_DIALOG(dialog))), table);
|
||||
|
||||
label = gtk_label_new(_("Please provide some network information:"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index f12d371..cd16285 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -157,46 +157,6 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
|
||||
}
|
||||
}
|
||||
|
||||
-static void open_uri(GtkWindow *parent, const char *uri)
|
||||
-{
|
||||
- GtkWidget *dialog;
|
||||
- GdkScreen *screen;
|
||||
- GError *error = NULL;
|
||||
- gchar *cmdline;
|
||||
-
|
||||
- screen = gtk_window_get_screen(parent);
|
||||
-
|
||||
- cmdline = g_strconcat("xdg-open ", uri, NULL);
|
||||
-
|
||||
- if (gdk_spawn_command_line_on_screen(screen,
|
||||
- cmdline, &error) == FALSE) {
|
||||
- dialog = gtk_message_dialog_new(parent,
|
||||
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
|
||||
- GTK_BUTTONS_CLOSE, "%s", error->message);
|
||||
- gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
- gtk_widget_destroy(dialog);
|
||||
- g_error_free(error);
|
||||
- }
|
||||
-
|
||||
- g_free(cmdline);
|
||||
-}
|
||||
-
|
||||
-static void about_url_hook(GtkAboutDialog *dialog,
|
||||
- const gchar *url, gpointer data)
|
||||
-{
|
||||
- open_uri(GTK_WINDOW(dialog), url);
|
||||
-}
|
||||
-
|
||||
-static void about_email_hook(GtkAboutDialog *dialog,
|
||||
- const gchar *email, gpointer data)
|
||||
-{
|
||||
- gchar *uri;
|
||||
-
|
||||
- uri = g_strconcat("mailto:", email, NULL);
|
||||
- open_uri(GTK_WINDOW(dialog), uri);
|
||||
- g_free(uri);
|
||||
-}
|
||||
-
|
||||
static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
{
|
||||
const gchar *authors[] = {
|
||||
@@ -204,9 +164,6 @@ static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
NULL
|
||||
};
|
||||
|
||||
- gtk_about_dialog_set_url_hook(about_url_hook, NULL, NULL);
|
||||
- gtk_about_dialog_set_email_hook(about_email_hook, NULL, NULL);
|
||||
-
|
||||
gtk_show_about_dialog(NULL, "version", VERSION,
|
||||
"copyright", "Copyright \xc2\xa9 2008 Intel Corporation",
|
||||
"comments", _("A connection manager for the GNOME desktop"),
|
||||
diff --git a/applet/status.c b/applet/status.c
|
||||
index aed6f1e..015ff29 100644
|
||||
--- a/applet/status.c
|
||||
+++ b/applet/status.c
|
||||
@@ -102,8 +102,6 @@ static void icon_animation_start(IconAnimation *animation,
|
||||
{
|
||||
available = TRUE;
|
||||
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
-
|
||||
animation->start = start;
|
||||
animation->end = (end == 0) ? animation->count - 1 : end;
|
||||
|
||||
@@ -120,8 +118,6 @@ static void icon_animation_stop(IconAnimation *animation)
|
||||
{
|
||||
available = TRUE;
|
||||
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
-
|
||||
if (animation->id > 0)
|
||||
g_source_remove(animation->id);
|
||||
|
||||
@@ -251,8 +247,6 @@ void status_unavailable(void)
|
||||
available = FALSE;
|
||||
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_notifier);
|
||||
- gtk_status_icon_set_tooltip(statusicon,
|
||||
- "Connection Manager daemon is not running");
|
||||
|
||||
gtk_status_icon_set_visible(statusicon, TRUE);
|
||||
}
|
||||
@@ -299,7 +293,6 @@ static void set_ready(gint signal)
|
||||
|
||||
if (signal < 0) {
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_wired);
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,7 +304,6 @@ static void set_ready(gint signal)
|
||||
index = 4;
|
||||
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_signal[index]);
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
}
|
||||
|
||||
struct timeout_data {
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b972e07..a4dad5d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -55,8 +55,7 @@ AC_SUBST(DBUS_LIBS)
|
||||
DBUS_BINDING_TOOL="dbus-binding-tool"
|
||||
AC_SUBST(DBUS_BINDING_TOOL)
|
||||
|
||||
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8, dummy=yes,
|
||||
- AC_MSG_ERROR(gtk+ >= 2.8 is required))
|
||||
+PKG_CHECK_MODULES(GTK, gtk+-3.0)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
diff --git a/properties/ethernet.c b/properties/ethernet.c
|
||||
index 31db7a0..0b6b423 100644
|
||||
--- a/properties/ethernet.c
|
||||
+++ b/properties/ethernet.c
|
||||
@@ -82,7 +82,7 @@ void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(1, 1, TRUE);
|
||||
+ table = gtk_table_new(1, 1, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -136,7 +136,7 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(5, 5, TRUE);
|
||||
+ table = gtk_table_new(5, 5, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -144,9 +144,9 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
|
||||
label = gtk_label_new(_("Configuration:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 0, 1);
|
||||
|
||||
- combo = gtk_combo_box_new_text();
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "MANUAL");
|
||||
+ combo = gtk_combo_box_text_new();
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "MANUAL");
|
||||
gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
|
||||
separator_function, NULL, NULL);
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), combo, 2, 4, 0, 1);
|
||||
@@ -219,7 +219,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_DHCP:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
|
||||
gtk_widget_set_sensitive(entry[i], 0);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry[i]), _(""));
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_MANUAL:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
|
||||
gtk_widget_set_sensitive(entry[i], 1);
|
||||
}
|
||||
break;
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index c05f443..6f76361 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -429,7 +429,7 @@ static GtkWidget *create_interfaces(GtkWidget *window)
|
||||
|
||||
scrolled = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
|
||||
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
|
||||
GTK_SHADOW_OUT);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), scrolled, FALSE, TRUE, 0);
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index bd325ef..a5827e0 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -125,7 +125,7 @@ void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(1, 1, TRUE);
|
||||
+ table = gtk_table_new(1, 1, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -185,9 +185,9 @@ static void wifi_ipconfig(GtkWidget *table, struct config_data *data, GtkTreeIte
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 3, 4);
|
||||
data->ipv4.label[0] = label;
|
||||
|
||||
- combo = gtk_combo_box_new_text();
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Manual");
|
||||
+ combo = gtk_combo_box_text_new();
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Manual");
|
||||
|
||||
gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
|
||||
separator_function, NULL, NULL);
|
||||
@@ -335,14 +335,14 @@ void update_wifi_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_DHCP:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
|
||||
gtk_widget_set_sensitive(entry[i], 0);
|
||||
}
|
||||
break;
|
||||
case CONNMAN_POLICY_MANUAL:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
|
||||
gtk_widget_set_sensitive(entry[i], 1);
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.8.1
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 5907a23ad2f49702960a33f9e2039552673eabc7 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
Date: Mon, 17 Dec 2012 14:01:18 +0200
|
||||
Subject: [PATCH] Removed icon from connman-gnome "about" applet
|
||||
|
||||
The connman-gnome "about" applet showed a picture that
|
||||
can not be displayed. There is no designated picture
|
||||
in connman-gnome to be used in the about section, so
|
||||
it was removed.
|
||||
|
||||
[OE-Core #2509]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
---
|
||||
applet/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index f12d371..c7b3c7f 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -212,7 +212,7 @@ static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
"comments", _("A connection manager for the GNOME desktop"),
|
||||
"authors", authors,
|
||||
"translator-credits", _("translator-credits"),
|
||||
- "logo-icon-name", "network-wireless", NULL);
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
static void settings_callback(GtkWidget *item, gpointer user_data)
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
connman-gnome: fix dbus interface name
|
||||
|
||||
This patch resolves following error:
|
||||
|
||||
"connman-dbus.xml": "connman" is not a valid D-Bus interface name
|
||||
|
||||
https://502552.bugs.gentoo.org/attachment.cgi?id=380652
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
common/connman-client.c | 24 ++++++++++++------------
|
||||
common/connman-client.h | 4 ++--
|
||||
common/connman-dbus.c | 6 +++---
|
||||
common/connman-dbus.xml | 2 +-
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index c55e25c..9d818b2 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -289,7 +289,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
|
||||
g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
|
||||
g_value_set_boxed(&value, ipv4);
|
||||
- ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
+ ret = net_connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -317,7 +317,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
g_value_set_boolean(&value, powered);
|
||||
|
||||
error = NULL;
|
||||
- connman_set_property(proxy, "Powered", &value, &error);
|
||||
+ net_connman_set_property(proxy, "Powered", &value, &error);
|
||||
if( error )
|
||||
fprintf (stderr, "error: %s\n", error->message);
|
||||
|
||||
@@ -325,7 +325,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
}
|
||||
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data)
|
||||
+ net_connman_scan_reply callback, gpointer user_data)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -339,7 +339,7 @@ void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_scan_async(proxy, callback, user_data);
|
||||
+ net_connman_scan_async(proxy, callback, user_data);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -353,7 +353,7 @@ gboolean connman_client_get_offline_status(ConnmanClient *client)
|
||||
|
||||
DBG("client %p", client);
|
||||
|
||||
- ret = connman_get_properties(priv->manager, &hash, NULL);
|
||||
+ ret = net_connman_get_properties(priv->manager, &hash, NULL);
|
||||
|
||||
if (ret == FALSE)
|
||||
goto done;
|
||||
@@ -375,7 +375,7 @@ void connman_client_set_offlinemode(ConnmanClient *client, gboolean status)
|
||||
g_value_init(&value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean(&value, status);
|
||||
|
||||
- connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
+ net_connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
}
|
||||
|
||||
static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
@@ -398,7 +398,7 @@ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
return TRUE;
|
||||
|
||||
if (type == CONNMAN_TYPE_WIFI)
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -422,13 +422,13 @@ void connman_client_connect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_connect(proxy, NULL);
|
||||
+ net_connman_connect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata)
|
||||
+ net_connman_connect_reply callback, gpointer userdata)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -446,7 +446,7 @@ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
if (proxy == NULL)
|
||||
goto done;
|
||||
|
||||
- connman_connect_async(proxy, callback, userdata);
|
||||
+ net_connman_connect_async(proxy, callback, userdata);
|
||||
|
||||
done:
|
||||
return;
|
||||
@@ -476,7 +476,7 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -532,7 +532,7 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_remove(proxy, NULL);
|
||||
+ net_connman_remove(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 9e2e6d5..98241de 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -70,13 +70,13 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config);
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data);
|
||||
+ net_connman_scan_reply callback, gpointer user_data);
|
||||
|
||||
void connman_client_connect(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_disconnect(ConnmanClient *client, const gchar *network);
|
||||
gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata);
|
||||
+ net_connman_connect_reply callback, gpointer userdata);
|
||||
void connman_client_set_remember(ConnmanClient *client, const gchar *network,
|
||||
gboolean remember);
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index b82b3e1..543eb43 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -655,15 +655,15 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
|
||||
DBG("getting manager properties");
|
||||
|
||||
- connman_get_properties_async(proxy, manager_properties, store);
|
||||
+ net_connman_get_properties_async(proxy, manager_properties, store);
|
||||
|
||||
DBG("getting technologies");
|
||||
|
||||
- connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
+ net_connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
|
||||
DBG("getting services");
|
||||
|
||||
- connman_get_services_async(proxy, manager_services, store);
|
||||
+ net_connman_get_services_async(proxy, manager_services, store);
|
||||
|
||||
return proxy;
|
||||
}
|
||||
diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
|
||||
index 56b9582..0199d52 100644
|
||||
--- a/common/connman-dbus.xml
|
||||
+++ b/common/connman-dbus.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<node name="/">
|
||||
- <interface name="connman">
|
||||
+ <interface name="net.connman">
|
||||
<method name="GetProperties">
|
||||
<arg type="a{sv}" direction="out"/>
|
||||
</method>
|
||||
--
|
||||
1.9.1
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
Binary file not shown.
|
After Width: | Height: | Size: 496 B |
Binary file not shown.
|
After Width: | Height: | Size: 492 B |
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
Binary file not shown.
|
After Width: | Height: | Size: 419 B |
@@ -0,0 +1,36 @@
|
||||
In networks that don't have a DHCP server configured, ipv4 address
|
||||
allocation fails and the ipv4 structure doesn't get populated. When
|
||||
the GUI is trying to read the ipv4_config.method field to see whether
|
||||
it contains "dhcp" string, a segmentation fault is generated.
|
||||
|
||||
Ethernet manual configuration behavior remains unchanged after this fix.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
|
||||
Index: git/properties/ethernet.c
|
||||
===================================================================
|
||||
--- git.orig/properties/ethernet.c
|
||||
+++ git/properties/ethernet.c
|
||||
@@ -194,7 +194,7 @@ void add_ethernet_service(GtkWidget *mai
|
||||
|
||||
data->button = button;
|
||||
|
||||
- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
update_ethernet_ipv4(data, CONNMAN_POLICY_DHCP);
|
||||
else
|
||||
update_ethernet_ipv4(data, CONNMAN_POLICY_MANUAL);
|
||||
Index: git/properties/wifi.c
|
||||
===================================================================
|
||||
--- git.orig/properties/wifi.c
|
||||
+++ git/properties/wifi.c
|
||||
@@ -230,7 +230,7 @@ static void wifi_ipconfig(GtkWidget *tab
|
||||
|
||||
data->ipv4_config = ipv4_config;
|
||||
|
||||
- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
update_wifi_ipv4(data, CONNMAN_POLICY_DHCP);
|
||||
else
|
||||
update_wifi_ipv4(data, CONNMAN_POLICY_MANUAL);
|
||||
@@ -0,0 +1,30 @@
|
||||
SUMMARY = "GTK+ frontend for the ConnMan network connection manager"
|
||||
HOMEPAGE = "http://connman.net/"
|
||||
SECTION = "libs/network"
|
||||
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \
|
||||
file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a"
|
||||
|
||||
DEPENDS = "gtk+3 dbus-glib dbus-glib-native intltool-native gettext-native"
|
||||
|
||||
# 0.7 tag
|
||||
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
|
||||
SRC_URI = "git://github.com/connectivity/connman-gnome.git;branch=master;protocol=https \
|
||||
file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
|
||||
file://null_check_for_ipv4_config.patch \
|
||||
file://images/ \
|
||||
file://connman-gnome-fix-dbus-interface-name.patch \
|
||||
file://0001-Port-to-Gtk3.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep gtk-icon-cache pkgconfig features_check
|
||||
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
|
||||
|
||||
RDEPENDS:${PN} = "connman"
|
||||
|
||||
do_install:append() {
|
||||
install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
SUMMARY = "A daemon for managing internet connections within embedded devices"
|
||||
DESCRIPTION = "The ConnMan project provides a daemon for managing \
|
||||
internet connections within embedded devices running the Linux \
|
||||
operating system. The Connection Manager is designed to be slim and \
|
||||
to use as few resources as possible, so it can be easily integrated. \
|
||||
It is a fully modular system that can be extended, through plug-ins, \
|
||||
to support all kinds of wired or wireless technologies. Also, \
|
||||
configuration methods, like DHCP and domain name resolving, are \
|
||||
implemented using plug-ins."
|
||||
HOMEPAGE = "http://connman.net/"
|
||||
BUGTRACKER = "https://01.org/jira/browse/CM"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
|
||||
|
||||
inherit autotools pkgconfig systemd update-rc.d update-alternatives
|
||||
|
||||
CVE_PRODUCT = "connman connection_manager"
|
||||
|
||||
DEPENDS = "dbus glib-2.0 ppp"
|
||||
|
||||
EXTRA_OECONF += "\
|
||||
ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
|
||||
ac_cv_path_PPPD=${sbindir}/pppd \
|
||||
--enable-debug \
|
||||
--enable-loopback \
|
||||
--enable-ethernet \
|
||||
--enable-tools \
|
||||
--disable-polkit \
|
||||
--runstatedir=/run \
|
||||
"
|
||||
# For smooth operation it would be best to start only one wireless daemon at a time.
|
||||
# If wpa-supplicant is running, connman will use it preferentially.
|
||||
# Select either wpa-supplicant or iwd
|
||||
WIRELESS_DAEMON ??= "wpa-supplicant"
|
||||
|
||||
PACKAGECONFIG ??= "wispr iptables client\
|
||||
${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
|
||||
"
|
||||
|
||||
# If you want ConnMan to support VPN, add following statement into
|
||||
# local.conf or distro config
|
||||
# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
|
||||
|
||||
PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
|
||||
PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
|
||||
PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
|
||||
PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
|
||||
PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
|
||||
PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
|
||||
PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
|
||||
PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
|
||||
PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
|
||||
PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
|
||||
PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
|
||||
# WISPr support for logging into hotspots, requires TLS
|
||||
PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
|
||||
PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
|
||||
PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
|
||||
PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
|
||||
PACKAGECONFIG[client] = "--enable-client,--disable-client,readline"
|
||||
PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl"
|
||||
|
||||
INITSCRIPT_NAME = "connman"
|
||||
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
|
||||
|
||||
python __anonymous () {
|
||||
systemd_packages = "${PN} ${PN}-wait-online"
|
||||
pkgconfig = d.getVar('PACKAGECONFIG')
|
||||
if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
|
||||
systemd_packages += " ${PN}-vpn"
|
||||
d.setVar('SYSTEMD_PACKAGES', systemd_packages)
|
||||
}
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "connman.service"
|
||||
SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
|
||||
SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
|
||||
ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
|
||||
ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
|
||||
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
|
||||
sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman
|
||||
fi
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/tools/*-test ${D}${bindir}
|
||||
if [ -e ${B}/tools/wispr ]; then
|
||||
install -m 0755 ${B}/tools/wispr ${D}${bindir}
|
||||
fi
|
||||
|
||||
# We don't need to package an empty directory
|
||||
rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts
|
||||
|
||||
# Automake 1.12 won't install empty directories, but we need the
|
||||
# plugins directory to be present for ownership
|
||||
mkdir -p ${D}${libdir}/connman/plugins
|
||||
|
||||
# For read-only filesystem, do not create links during bootup
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
|
||||
fi
|
||||
}
|
||||
|
||||
# These used to be plugins, but now they are core
|
||||
RPROVIDES:${PN} = "\
|
||||
connman-plugin-loopback \
|
||||
connman-plugin-ethernet \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} = "\
|
||||
dbus \
|
||||
"
|
||||
|
||||
PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
|
||||
|
||||
def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
|
||||
plugintype = pkg.split( '-' )[-1]
|
||||
if plugintype in depmap:
|
||||
rdepends = map(lambda x: multilib_prefix + x, \
|
||||
depmap[plugintype].split())
|
||||
d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
|
||||
if add_insane_skip:
|
||||
d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
|
||||
|
||||
python populate_packages:prepend() {
|
||||
depmap = dict(pppd="ppp")
|
||||
multilib_prefix = (d.getVar("MLPREFIX") or "")
|
||||
|
||||
hook = lambda file,pkg,x,y,z: \
|
||||
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
|
||||
plugin_dir = d.expand('${libdir}/connman/plugins/')
|
||||
plugin_name = d.expand('${PN}-plugin-%s')
|
||||
do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
|
||||
'${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
|
||||
|
||||
hook = lambda file,pkg,x,y,z: \
|
||||
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
|
||||
plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
|
||||
plugin_name = d.expand('${PN}-plugin-vpn-%s')
|
||||
do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
|
||||
'${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
|
||||
|
||||
FILES:${PN}-tools = "${bindir}/wispr"
|
||||
RDEPENDS:${PN}-tools ="${PN}"
|
||||
|
||||
FILES:${PN}-tests = "${bindir}/*-test"
|
||||
|
||||
FILES:${PN}-client = "${bindir}/connmanctl"
|
||||
RDEPENDS:${PN}-client ="${PN}"
|
||||
|
||||
FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
|
||||
${libdir}/connman/plugins \
|
||||
${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
|
||||
${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
|
||||
${datadir}/dbus-1/system-services/* \
|
||||
${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
|
||||
|
||||
FILES:${PN}-dev += "${libdir}/connman/*/*.la"
|
||||
|
||||
PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
|
||||
|
||||
SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
|
||||
DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
|
||||
managing VPN connections within embedded devices running the Linux \
|
||||
operating system. The connman-vpnd handles all the VPN connections \
|
||||
and starts/stops VPN client processes when necessary. The connman-vpnd \
|
||||
provides a DBus API for managing VPN connections. All the different \
|
||||
VPN technogies are implemented using plug-ins."
|
||||
FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
|
||||
${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
|
||||
${datadir}/dbus-1/system-services/net.connman.vpn.service \
|
||||
${systemd_system_unitdir}/connman-vpn.service"
|
||||
|
||||
SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
|
||||
DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
|
||||
the system waits until a network connection is established."
|
||||
FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
|
||||
${systemd_system_unitdir}/connman-wait-online.service"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
|
||||
to create a VPN connection to OpenVPN server."
|
||||
FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
|
||||
${libdir}/connman/plugins-vpn/openvpn.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
|
||||
to create a VPN connection to Cisco3000 VPN Concentrator."
|
||||
FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
|
||||
${libdir}/connman/plugins-vpn/vpnc.so \
|
||||
${libdir}/connman/scripts/vpn-script"
|
||||
RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
|
||||
to create a VPN connection to L2TP server."
|
||||
FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
|
||||
${libdir}/connman/plugins-vpn/l2tp.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
|
||||
to create a VPN connection to PPTP server."
|
||||
FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
|
||||
${libdir}/connman/plugins-vpn/pptp.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001
|
||||
From: "Maxin B. John" <maxin.john@intel.com>
|
||||
Date: Mon, 12 Jun 2017 16:52:39 +0300
|
||||
Subject: [PATCH] connman.service: stop systemd-resolved when we use connman
|
||||
|
||||
Stop systemd-resolved service when we use connman as network manager.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
---
|
||||
src/connman.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/connman.service.in b/src/connman.service.in
|
||||
index 9f5c10f..dab48bc 100644
|
||||
--- a/src/connman.service.in
|
||||
+++ b/src/connman.service.in
|
||||
@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman
|
||||
After=dbus.service network-pre.target systemd-sysusers.service
|
||||
Before=network.target multi-user.target shutdown.target
|
||||
Wants=network.target
|
||||
+Conflicts=systemd-resolved.service
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
--
|
||||
2.4.0
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 11 Apr 2023 08:12:56 +0200
|
||||
Subject: [PATCH] gdhcp: Verify and sanitize packet length first
|
||||
|
||||
Avoid overwriting the read packet length after the initial test. Thus
|
||||
move all the length checks which depends on the total length first
|
||||
and do not use the total lenght from the IP packet afterwards.
|
||||
|
||||
Fixes CVE-2023-28488
|
||||
|
||||
Reported by Polina Smirnova <moe.hwr@gmail.com>
|
||||
|
||||
CVE: CVE-2023-28488
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
---
|
||||
gdhcp/client.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
||||
index 7efa7e45..82017692 100644
|
||||
--- a/gdhcp/client.c
|
||||
+++ b/gdhcp/client.c
|
||||
@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet *packet, int bytes)
|
||||
static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
struct sockaddr_in *dst_addr)
|
||||
{
|
||||
- int bytes;
|
||||
struct ip_udp_dhcp_packet packet;
|
||||
uint16_t check;
|
||||
+ int bytes, tot_len;
|
||||
|
||||
memset(&packet, 0, sizeof(packet));
|
||||
|
||||
@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
if (bytes < 0)
|
||||
return -1;
|
||||
|
||||
- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
- return -1;
|
||||
-
|
||||
- if (bytes < ntohs(packet.ip.tot_len))
|
||||
+ tot_len = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes > tot_len) {
|
||||
+ /* ignore any extra garbage bytes */
|
||||
+ bytes = tot_len;
|
||||
+ } else if (bytes < tot_len) {
|
||||
/* packet is bigger than sizeof(packet), we did partial read */
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
- /* ignore any extra garbage bytes */
|
||||
- bytes = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
+ return -1;
|
||||
|
||||
if (!sanity_check(&packet, bytes))
|
||||
return -1;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 7 Apr 2012 18:52:12 -0700
|
||||
Subject: [PATCH] plugin.h: Change visibility to default for debug symbols
|
||||
|
||||
gold refuses to link in undefined weak symbols which
|
||||
have hidden visibility
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
include/plugin.h | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/plugin.h b/include/plugin.h
|
||||
index 692a4e5..a9361c3 100644
|
||||
--- a/include/plugin.h
|
||||
+++ b/include/plugin.h
|
||||
@@ -89,9 +89,9 @@ struct connman_plugin_desc {
|
||||
#else
|
||||
#define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
|
||||
extern struct connman_debug_desc __start___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_debug_desc __stop___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_plugin_desc connman_plugin_desc \
|
||||
__attribute__ ((visibility("default"))); \
|
||||
struct connman_plugin_desc connman_plugin_desc = { \
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
From 5f373f373f5baccc282dce257b7b16c8bb4a82c4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
|
||||
Date: Sat, 25 Mar 2023 20:51:52 +0000
|
||||
Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release
|
||||
|
||||
The API has gone through a significant overhaul, and this change fixes any compile issues.
|
||||
1) Fixes to configure.ac itself
|
||||
2) Cleanup in pppd plugin itself
|
||||
|
||||
Adding a libppp-compat.h file to mask for any differences in the version.
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f]
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
---
|
||||
configure.ac | 42 ++++++++-----
|
||||
scripts/libppp-compat.h | 127 ++++++++++++++++++++++++++++++++++++++++
|
||||
scripts/libppp-plugin.c | 15 +++--
|
||||
3 files changed, 161 insertions(+), 23 deletions(-)
|
||||
create mode 100644 scripts/libppp-compat.h
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a573cef..f34bb38 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -135,14 +135,6 @@ AC_ARG_ENABLE(l2tp,
|
||||
AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
|
||||
[enable_l2tp=${enableval}], [enable_l2tp="no"])
|
||||
if (test "${enable_l2tp}" != "no"); then
|
||||
- if (test -z "${path_pppd}"); then
|
||||
- AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
|
||||
- else
|
||||
- PPPD="${path_pppd}"
|
||||
- AC_SUBST(PPPD)
|
||||
- fi
|
||||
- AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
|
||||
- AC_MSG_ERROR(ppp header files are required))
|
||||
if (test -z "${path_l2tp}"); then
|
||||
AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
|
||||
else
|
||||
@@ -160,6 +152,18 @@ AC_ARG_ENABLE(pptp,
|
||||
AC_HELP_STRING([--enable-pptp], [enable pptp support]),
|
||||
[enable_pptp=${enableval}], [enable_pptp="no"])
|
||||
if (test "${enable_pptp}" != "no"); then
|
||||
+ if (test -z "${path_pptp}"); then
|
||||
+ AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
|
||||
+ else
|
||||
+ PPTP="${path_pptp}"
|
||||
+ AC_SUBST(PPTP)
|
||||
+ fi
|
||||
+fi
|
||||
+AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
|
||||
+AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
|
||||
+
|
||||
+if (test "${enable_pptp}" != "no" || test "${enable_l2tp}" != "no"); then
|
||||
+
|
||||
if (test -z "${path_pppd}"); then
|
||||
AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
|
||||
else
|
||||
@@ -168,15 +172,23 @@ if (test "${enable_pptp}" != "no"); then
|
||||
fi
|
||||
AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
|
||||
AC_MSG_ERROR(ppp header files are required))
|
||||
- if (test -z "${path_pptp}"); then
|
||||
- AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
|
||||
- else
|
||||
- PPTP="${path_pptp}"
|
||||
- AC_SUBST(PPTP)
|
||||
+ AC_CHECK_HEADERS([pppd/chap.h pppd/chap-new.h pppd/chap_ms.h])
|
||||
+
|
||||
+ PKG_CHECK_EXISTS([pppd],
|
||||
+ [AS_VAR_SET([pppd_pkgconfig_support],[yes])])
|
||||
+
|
||||
+ PPPD_VERSION=2.4.9
|
||||
+ if test x"$pppd_pkgconfig_support" = xyes; then
|
||||
+ PPPD_VERSION=`$PKG_CONFIG --modversion pppd`
|
||||
fi
|
||||
+
|
||||
+ AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)],
|
||||
+ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)],
|
||||
+ [Macro to help determine the particular version of pppd])
|
||||
+ PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g")
|
||||
+ AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION),
|
||||
+ [The real version of pppd represented as an int])
|
||||
fi
|
||||
-AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
|
||||
-AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
|
||||
|
||||
AC_CHECK_HEADERS(resolv.h, dummy=yes,
|
||||
AC_MSG_ERROR(resolver header files are required))
|
||||
diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h
|
||||
new file mode 100644
|
||||
index 0000000..eee1d09
|
||||
--- /dev/null
|
||||
+++ b/scripts/libppp-compat.h
|
||||
@@ -0,0 +1,127 @@
|
||||
+/* Copyright (C) Eivind Naess, eivnaes@yahoo.com */
|
||||
+/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
+
|
||||
+#ifndef __LIBPPP_COMPAT_H__
|
||||
+#define __LIBPPP_COMPAT_H__
|
||||
+
|
||||
+/* Define USE_EAPTLS compile with EAP TLS support against older pppd headers,
|
||||
+ * pppd >= 2.5.0 use PPP_WITH_EAPTLS and is defined in pppdconf.h */
|
||||
+#define USE_EAPTLS 1
|
||||
+
|
||||
+/* Define INET6 to compile with IPv6 support against older pppd headers,
|
||||
+ * pppd >= 2.5.0 use PPP_WITH_IPV6CP and is defined in pppdconf.h */
|
||||
+#define INET6 1
|
||||
+
|
||||
+/* PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define.
|
||||
+ * this silly macro magic is to work around that. */
|
||||
+#undef VERSION
|
||||
+#include <pppd/pppd.h>
|
||||
+
|
||||
+#ifndef PPPD_VERSION
|
||||
+#define PPPD_VERSION VERSION
|
||||
+#endif
|
||||
+
|
||||
+#include <pppd/fsm.h>
|
||||
+#include <pppd/ccp.h>
|
||||
+#include <pppd/eui64.h>
|
||||
+#include <pppd/ipcp.h>
|
||||
+#include <pppd/ipv6cp.h>
|
||||
+#include <pppd/eap.h>
|
||||
+#include <pppd/upap.h>
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_H
|
||||
+#include <pppd/chap.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_NEW_H
|
||||
+#include <pppd/chap-new.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_MS_H
|
||||
+#include <pppd/chap_ms.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_CHAP
|
||||
+#define PPP_PROTO_CHAP 0xc223
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_EAP
|
||||
+#define PPP_PROTO_EAP 0xc227
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
|
||||
+
|
||||
+static inline bool
|
||||
+debug_on (void)
|
||||
+{
|
||||
+ return debug;
|
||||
+}
|
||||
+
|
||||
+static inline const char
|
||||
+*ppp_ipparam (void)
|
||||
+{
|
||||
+ return ipparam;
|
||||
+}
|
||||
+
|
||||
+static inline int
|
||||
+ppp_ifunit (void)
|
||||
+{
|
||||
+ return ifunit;
|
||||
+}
|
||||
+
|
||||
+static inline const char *
|
||||
+ppp_ifname (void)
|
||||
+{
|
||||
+ return ifname;
|
||||
+}
|
||||
+
|
||||
+static inline int
|
||||
+ppp_get_mtu (int idx)
|
||||
+{
|
||||
+ return netif_get_mtu(idx);
|
||||
+}
|
||||
+
|
||||
+typedef enum ppp_notify
|
||||
+{
|
||||
+ NF_PID_CHANGE,
|
||||
+ NF_PHASE_CHANGE,
|
||||
+ NF_EXIT,
|
||||
+ NF_SIGNALED,
|
||||
+ NF_IP_UP,
|
||||
+ NF_IP_DOWN,
|
||||
+ NF_IPV6_UP,
|
||||
+ NF_IPV6_DOWN,
|
||||
+ NF_AUTH_UP,
|
||||
+ NF_LINK_DOWN,
|
||||
+ NF_FORK,
|
||||
+ NF_MAX_NOTIFY
|
||||
+} ppp_notify_t;
|
||||
+
|
||||
+typedef void (ppp_notify_fn) (void *ctx, int arg);
|
||||
+
|
||||
+static inline void
|
||||
+ppp_add_notify (ppp_notify_t type, ppp_notify_fn *func, void *ctx)
|
||||
+{
|
||||
+ struct notifier **list[NF_MAX_NOTIFY] = {
|
||||
+ [NF_PID_CHANGE ] = &pidchange,
|
||||
+ [NF_PHASE_CHANGE] = &phasechange,
|
||||
+ [NF_EXIT ] = &exitnotify,
|
||||
+ [NF_SIGNALED ] = &sigreceived,
|
||||
+ [NF_IP_UP ] = &ip_up_notifier,
|
||||
+ [NF_IP_DOWN ] = &ip_down_notifier,
|
||||
+ [NF_IPV6_UP ] = &ipv6_up_notifier,
|
||||
+ [NF_IPV6_DOWN ] = &ipv6_down_notifier,
|
||||
+ [NF_AUTH_UP ] = &auth_up_notifier,
|
||||
+ [NF_LINK_DOWN ] = &link_down_notifier,
|
||||
+ [NF_FORK ] = &fork_notifier,
|
||||
+ };
|
||||
+
|
||||
+ struct notifier **notify = list[type];
|
||||
+ if (notify) {
|
||||
+ add_notifier(notify, func, ctx);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#endif /* #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) */
|
||||
+#endif /* #if__LIBPPP_COMPAT_H__ */
|
||||
diff --git a/scripts/libppp-plugin.c b/scripts/libppp-plugin.c
|
||||
index 0dd8b47..61641b5 100644
|
||||
--- a/scripts/libppp-plugin.c
|
||||
+++ b/scripts/libppp-plugin.c
|
||||
@@ -29,14 +29,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
-#include <pppd/pppd.h>
|
||||
-#include <pppd/fsm.h>
|
||||
-#include <pppd/ipcp.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
+#include "libppp-compat.h"
|
||||
+
|
||||
#define INET_ADDRES_LEN (INET_ADDRSTRLEN + 5)
|
||||
#define INET_DNS_LEN (2*INET_ADDRSTRLEN + 9)
|
||||
|
||||
@@ -47,7 +46,7 @@ static char *path;
|
||||
static DBusConnection *connection;
|
||||
static int prev_phase;
|
||||
|
||||
-char pppd_version[] = VERSION;
|
||||
+char pppd_version[] = PPPD_VERSION;
|
||||
|
||||
int plugin_init(void);
|
||||
|
||||
@@ -170,7 +169,7 @@ static void ppp_up(void *data, int arg)
|
||||
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING
|
||||
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
|
||||
|
||||
- append(&dict, "INTERNAL_IFNAME", ifname);
|
||||
+ append(&dict, "INTERNAL_IFNAME", ppp_ifname());
|
||||
|
||||
inet_ntop(AF_INET, &ipcp_gotoptions[0].ouraddr, buf, INET_ADDRSTRLEN);
|
||||
append(&dict, "INTERNAL_IP4_ADDRESS", buf);
|
||||
@@ -309,9 +308,9 @@ int plugin_init(void)
|
||||
chap_check_hook = ppp_have_secret;
|
||||
pap_check_hook = ppp_have_secret;
|
||||
|
||||
- add_notifier(&ip_up_notifier, ppp_up, NULL);
|
||||
- add_notifier(&phasechange, ppp_phase_change, NULL);
|
||||
- add_notifier(&exitnotify, ppp_exit, connection);
|
||||
+ ppp_add_notify(NF_IP_UP, ppp_up, NULL);
|
||||
+ ppp_add_notify(NF_PHASE_CHANGE, ppp_phase_change, NULL);
|
||||
+ ppp_add_notify(NF_EXIT, ppp_exit, connection);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
From 01974865e4d331eeaf25248bee1bb96539c450d9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 6 Apr 2015 23:02:21 -0700
|
||||
Subject: [PATCH] resolve: musl does not implement res_ninit
|
||||
|
||||
ported from
|
||||
http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
gweb/gresolv.c | 34 +++++++++++++---------------------
|
||||
1 file changed, 13 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gweb/gresolv.c b/gweb/gresolv.c
|
||||
index 954e7cf..2a9bc51 100644
|
||||
--- a/gweb/gresolv.c
|
||||
+++ b/gweb/gresolv.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <net/if.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "gresolv.h"
|
||||
|
||||
@@ -878,8 +879,6 @@ GResolv *g_resolv_new(int index)
|
||||
resolv->index = index;
|
||||
resolv->nameserver_list = NULL;
|
||||
|
||||
- res_ninit(&resolv->res);
|
||||
-
|
||||
return resolv;
|
||||
}
|
||||
|
||||
@@ -919,8 +918,6 @@ void g_resolv_unref(GResolv *resolv)
|
||||
|
||||
flush_nameservers(resolv);
|
||||
|
||||
- res_nclose(&resolv->res);
|
||||
-
|
||||
g_free(resolv);
|
||||
}
|
||||
|
||||
@@ -1023,24 +1020,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
|
||||
debug(resolv, "hostname %s", hostname);
|
||||
|
||||
if (!resolv->nameserver_list) {
|
||||
- int i;
|
||||
-
|
||||
- for (i = 0; i < resolv->res.nscount; i++) {
|
||||
- char buf[100];
|
||||
- int family = resolv->res.nsaddr_list[i].sin_family;
|
||||
- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
|
||||
-
|
||||
- if (family != AF_INET &&
|
||||
- resolv->res._u._ext.nsaddrs[i]) {
|
||||
- family = AF_INET6;
|
||||
- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
|
||||
+ FILE *f = fopen("/etc/resolv.conf", "r");
|
||||
+ if (f) {
|
||||
+ char line[256], *s;
|
||||
+ int i;
|
||||
+ while (fgets(line, sizeof(line), f)) {
|
||||
+ if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
|
||||
+ continue;
|
||||
+ for (s = &line[11]; isspace(s[0]); s++);
|
||||
+ for (i = 0; s[i] && !isspace(s[i]); i++);
|
||||
+ s[i] = 0;
|
||||
+ g_resolv_add_nameserver(resolv, s, 53, 0);
|
||||
}
|
||||
-
|
||||
- if (family != AF_INET && family != AF_INET6)
|
||||
- continue;
|
||||
-
|
||||
- if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
|
||||
- g_resolv_add_nameserver(resolv, buf, 53, 0);
|
||||
+ fclose(f);
|
||||
}
|
||||
|
||||
if (!resolv->nameserver_list)
|
||||
@@ -0,0 +1,37 @@
|
||||
From d1a5ede5d255bde8ef707f8441b997563b9312bd Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Crandall <ncrandall@tesla.com>
|
||||
Date: Tue, 12 Jul 2022 08:56:34 +0200
|
||||
Subject: gweb: Fix OOB write in received_data()
|
||||
|
||||
There is a mismatch of handling binary vs. C-string data with memchr
|
||||
and strlen, resulting in pos, count, and bytes_read to become out of
|
||||
sync and result in a heap overflow. Instead, do not treat the buffer
|
||||
as an ASCII C-string. We calculate the count based on the return value
|
||||
of memchr, instead of strlen.
|
||||
|
||||
Fixes: CVE-2022-32292
|
||||
|
||||
CVE: CVE-2022-32292
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d1a5ede5d255bde8ef707f8441b997563b9312bd]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
gweb/gweb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gweb/gweb.c b/gweb/gweb.c
|
||||
index 12fcb1d8..13c6c5f2 100644
|
||||
--- a/gweb/gweb.c
|
||||
+++ b/gweb/gweb.c
|
||||
@@ -918,7 +918,7 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
|
||||
}
|
||||
|
||||
*pos = '\0';
|
||||
- count = strlen((char *) ptr);
|
||||
+ count = pos - ptr;
|
||||
if (count > 0 && ptr[count - 1] == '\r') {
|
||||
ptr[--count] = '\0';
|
||||
bytes_read--;
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
From 72343929836de80727a27d6744c869dff045757c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 5 Jul 2022 08:32:12 +0200
|
||||
Subject: wispr: Add reference counter to portal context
|
||||
|
||||
Track the connman_wispr_portal_context live time via a
|
||||
refcounter. This only adds the infrastructure to do proper reference
|
||||
counting.
|
||||
|
||||
Fixes: CVE-2022-32293
|
||||
CVE: CVE-2022-32293
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=416bfaff988882c553c672e5bfc2d4f648d29e8a]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/wispr.c | 52 ++++++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 42 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/wispr.c b/src/wispr.c
|
||||
index a07896ca..bde7e63b 100644
|
||||
--- a/src/wispr.c
|
||||
+++ b/src/wispr.c
|
||||
@@ -56,6 +56,7 @@ struct wispr_route {
|
||||
};
|
||||
|
||||
struct connman_wispr_portal_context {
|
||||
+ int refcount;
|
||||
struct connman_service *service;
|
||||
enum connman_ipconfig_type type;
|
||||
struct connman_wispr_portal *wispr_portal;
|
||||
@@ -97,6 +98,11 @@ static char *online_check_ipv4_url = NULL;
|
||||
static char *online_check_ipv6_url = NULL;
|
||||
static bool enable_online_to_ready_transition = false;
|
||||
|
||||
+#define wispr_portal_context_ref(wp_context) \
|
||||
+ wispr_portal_context_ref_debug(wp_context, __FILE__, __LINE__, __func__)
|
||||
+#define wispr_portal_context_unref(wp_context) \
|
||||
+ wispr_portal_context_unref_debug(wp_context, __FILE__, __LINE__, __func__)
|
||||
+
|
||||
static void connman_wispr_message_init(struct connman_wispr_message *msg)
|
||||
{
|
||||
DBG("");
|
||||
@@ -162,9 +168,6 @@ static void free_connman_wispr_portal_context(
|
||||
{
|
||||
DBG("context %p", wp_context);
|
||||
|
||||
- if (!wp_context)
|
||||
- return;
|
||||
-
|
||||
if (wp_context->wispr_portal) {
|
||||
if (wp_context->wispr_portal->ipv4_context == wp_context)
|
||||
wp_context->wispr_portal->ipv4_context = NULL;
|
||||
@@ -201,9 +204,38 @@ static void free_connman_wispr_portal_context(
|
||||
g_free(wp_context);
|
||||
}
|
||||
|
||||
+static struct connman_wispr_portal_context *
|
||||
+wispr_portal_context_ref_debug(struct connman_wispr_portal_context *wp_context,
|
||||
+ const char *file, int line, const char *caller)
|
||||
+{
|
||||
+ DBG("%p ref %d by %s:%d:%s()", wp_context,
|
||||
+ wp_context->refcount + 1, file, line, caller);
|
||||
+
|
||||
+ __sync_fetch_and_add(&wp_context->refcount, 1);
|
||||
+
|
||||
+ return wp_context;
|
||||
+}
|
||||
+
|
||||
+static void wispr_portal_context_unref_debug(
|
||||
+ struct connman_wispr_portal_context *wp_context,
|
||||
+ const char *file, int line, const char *caller)
|
||||
+{
|
||||
+ if (!wp_context)
|
||||
+ return;
|
||||
+
|
||||
+ DBG("%p ref %d by %s:%d:%s()", wp_context,
|
||||
+ wp_context->refcount - 1, file, line, caller);
|
||||
+
|
||||
+ if (__sync_fetch_and_sub(&wp_context->refcount, 1) != 1)
|
||||
+ return;
|
||||
+
|
||||
+ free_connman_wispr_portal_context(wp_context);
|
||||
+}
|
||||
+
|
||||
static struct connman_wispr_portal_context *create_wispr_portal_context(void)
|
||||
{
|
||||
- return g_try_new0(struct connman_wispr_portal_context, 1);
|
||||
+ return wispr_portal_context_ref(
|
||||
+ g_new0(struct connman_wispr_portal_context, 1));
|
||||
}
|
||||
|
||||
static void free_connman_wispr_portal(gpointer data)
|
||||
@@ -215,8 +247,8 @@ static void free_connman_wispr_portal(gpointer data)
|
||||
if (!wispr_portal)
|
||||
return;
|
||||
|
||||
- free_connman_wispr_portal_context(wispr_portal->ipv4_context);
|
||||
- free_connman_wispr_portal_context(wispr_portal->ipv6_context);
|
||||
+ wispr_portal_context_unref(wispr_portal->ipv4_context);
|
||||
+ wispr_portal_context_unref(wispr_portal->ipv6_context);
|
||||
|
||||
g_free(wispr_portal);
|
||||
}
|
||||
@@ -452,7 +484,7 @@ static void portal_manage_status(GWebResult *result,
|
||||
connman_info("Client-Timezone: %s", str);
|
||||
|
||||
if (!enable_online_to_ready_transition)
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
|
||||
__connman_service_ipconfig_indicate_state(service,
|
||||
CONNMAN_SERVICE_STATE_ONLINE, type);
|
||||
@@ -616,7 +648,7 @@ static void wispr_portal_request_wispr_login(struct connman_service *service,
|
||||
return;
|
||||
}
|
||||
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -952,7 +984,7 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
|
||||
|
||||
if (wp_context->token == 0) {
|
||||
err = -EINVAL;
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
} else if (wp_context->timeout == 0) {
|
||||
wp_context->timeout = g_idle_add(no_proxy_callback, wp_context);
|
||||
@@ -1001,7 +1033,7 @@ int __connman_wispr_start(struct connman_service *service,
|
||||
|
||||
/* If there is already an existing context, we wipe it */
|
||||
if (wp_context)
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
|
||||
wp_context = create_wispr_portal_context();
|
||||
if (!wp_context)
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
From 416bfaff988882c553c672e5bfc2d4f648d29e8a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 5 Jul 2022 09:11:09 +0200
|
||||
Subject: wispr: Update portal context references
|
||||
|
||||
Maintain proper portal context references to avoid UAF.
|
||||
|
||||
Fixes: CVE-2022-32293
|
||||
CVE: CVE-2022-32293
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=72343929836de80727a27d6744c869dff045757c]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/wispr.c | 34 ++++++++++++++++++++++------------
|
||||
1 file changed, 22 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/wispr.c b/src/wispr.c
|
||||
index bde7e63b..84bed33f 100644
|
||||
--- a/src/wispr.c
|
||||
+++ b/src/wispr.c
|
||||
@@ -105,8 +105,6 @@ static bool enable_online_to_ready_transition = false;
|
||||
|
||||
static void connman_wispr_message_init(struct connman_wispr_message *msg)
|
||||
{
|
||||
- DBG("");
|
||||
-
|
||||
msg->has_error = false;
|
||||
msg->current_element = NULL;
|
||||
|
||||
@@ -166,8 +164,6 @@ static void free_wispr_routes(struct connman_wispr_portal_context *wp_context)
|
||||
static void free_connman_wispr_portal_context(
|
||||
struct connman_wispr_portal_context *wp_context)
|
||||
{
|
||||
- DBG("context %p", wp_context);
|
||||
-
|
||||
if (wp_context->wispr_portal) {
|
||||
if (wp_context->wispr_portal->ipv4_context == wp_context)
|
||||
wp_context->wispr_portal->ipv4_context = NULL;
|
||||
@@ -483,9 +479,6 @@ static void portal_manage_status(GWebResult *result,
|
||||
&str))
|
||||
connman_info("Client-Timezone: %s", str);
|
||||
|
||||
- if (!enable_online_to_ready_transition)
|
||||
- wispr_portal_context_unref(wp_context);
|
||||
-
|
||||
__connman_service_ipconfig_indicate_state(service,
|
||||
CONNMAN_SERVICE_STATE_ONLINE, type);
|
||||
|
||||
@@ -546,14 +539,17 @@ static void wispr_portal_request_portal(
|
||||
{
|
||||
DBG("");
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
wp_context->request_id = g_web_request_get(wp_context->web,
|
||||
wp_context->status_url,
|
||||
wispr_portal_web_result,
|
||||
wispr_route_request,
|
||||
wp_context);
|
||||
|
||||
- if (wp_context->request_id == 0)
|
||||
+ if (wp_context->request_id == 0) {
|
||||
wispr_portal_error(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
+ }
|
||||
}
|
||||
|
||||
static bool wispr_input(const guint8 **data, gsize *length,
|
||||
@@ -618,13 +614,15 @@ static void wispr_portal_browser_reply_cb(struct connman_service *service,
|
||||
return;
|
||||
|
||||
if (!authentication_done) {
|
||||
- wispr_portal_error(wp_context);
|
||||
free_wispr_routes(wp_context);
|
||||
+ wispr_portal_error(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Restarting the test */
|
||||
__connman_service_wispr_start(service, wp_context->type);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
|
||||
static void wispr_portal_request_wispr_login(struct connman_service *service,
|
||||
@@ -700,11 +698,13 @@ static bool wispr_manage_message(GWebResult *result,
|
||||
|
||||
wp_context->wispr_result = CONNMAN_WISPR_RESULT_LOGIN;
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
if (__connman_agent_request_login_input(wp_context->service,
|
||||
wispr_portal_request_wispr_login,
|
||||
- wp_context) != -EINPROGRESS)
|
||||
+ wp_context) != -EINPROGRESS) {
|
||||
wispr_portal_error(wp_context);
|
||||
- else
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
+ } else
|
||||
return true;
|
||||
|
||||
break;
|
||||
@@ -753,6 +753,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
if (length > 0) {
|
||||
g_web_parser_feed_data(wp_context->wispr_parser,
|
||||
chunk, length);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -770,6 +771,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
switch (status) {
|
||||
case 000:
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -781,11 +783,14 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
if (g_web_result_get_header(result, "X-ConnMan-Status",
|
||||
&str)) {
|
||||
portal_manage_status(result, wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return false;
|
||||
- } else
|
||||
+ } else {
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->redirect_url, wp_context);
|
||||
+ }
|
||||
|
||||
break;
|
||||
case 300:
|
||||
@@ -798,6 +803,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
!g_web_result_get_header(result, "Location",
|
||||
&redirect)) {
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -808,6 +814,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
wp_context->redirect_url = g_strdup(redirect);
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
wp_context->request_id = g_web_request_get(wp_context->web,
|
||||
redirect, wispr_portal_web_result,
|
||||
wispr_route_request, wp_context);
|
||||
@@ -820,6 +827,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
break;
|
||||
case 505:
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -832,6 +840,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
wp_context->request_id = 0;
|
||||
done:
|
||||
wp_context->wispr_msg.message_type = -1;
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -890,6 +899,7 @@ static void proxy_callback(const char *proxy, void *user_data)
|
||||
xml_wispr_parser_callback, wp_context);
|
||||
|
||||
wispr_portal_request_portal(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
|
||||
static gboolean no_proxy_callback(gpointer user_data)
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON=/usr/sbin/connmand
|
||||
PIDFILE=/var/run/connmand.pid
|
||||
DESC="Connection Manager"
|
||||
|
||||
if [ -f /etc/default/connman ] ; then
|
||||
. /etc/default/connman
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
do_start() {
|
||||
if [ -f @DATADIR@/connman/wired-setup ] ; then
|
||||
. @DATADIR@/connman/wired-setup
|
||||
fi
|
||||
$DAEMON
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
start-stop-daemon --stop --name connmand --quiet
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC"
|
||||
do_start
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $DESC"
|
||||
do_stop
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo "Restarting $DESC"
|
||||
do_stop
|
||||
sleep 1
|
||||
do_start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,27 @@
|
||||
With binutils 2.27 on at least MIPS, connmand will crash on startup. This
|
||||
appears to be due to the symbol visibilty scripts hiding symbols that stdio
|
||||
looks up at runtime, resulting in it segfaulting.
|
||||
|
||||
This certainly appears to be a bug in binutils 2.27 although the problem has
|
||||
been known about for some time:
|
||||
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=17908
|
||||
|
||||
As the version scripts are only used to hide symbols from plugins we can safely
|
||||
remove the scripts to work around the problem until binutils is fixed.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index d70725c..76ae432 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
-src_connmand_LDFLAGS = -Wl,--export-dynamic \
|
||||
- -Wl,--version-script=$(srcdir)/src/connman.ver
|
||||
+src_connmand_LDFLAGS = -Wl,--export-dynamic
|
||||
@@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
|
||||
-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
|
||||
- -Wl,--version-script=$(srcdir)/vpn/vpn.ver
|
||||
+vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic
|
||||
@@ -0,0 +1,20 @@
|
||||
require connman.inc
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
|
||||
file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
|
||||
file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
|
||||
file://connman \
|
||||
file://no-version-scripts.patch \
|
||||
file://CVE-2022-32293_p1.patch \
|
||||
file://CVE-2022-32293_p2.patch \
|
||||
file://CVE-2022-32292.patch \
|
||||
file://0001-gdhcp-Verify-and-sanitize-packet-length-first.patch \
|
||||
file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "79fb40f4fdd5530c45aa8e592fb16ba23d3674f3a98cf10b89a6576f198de589"
|
||||
|
||||
RRECOMMENDS:${PN} = "connman-conf"
|
||||
RCONFLICTS:${PN} = "networkmanager"
|
||||
@@ -0,0 +1,61 @@
|
||||
SECTION = "console/network"
|
||||
SUMMARY = "dhcpcd - a DHCP client"
|
||||
DESCRIPTION = "dhcpcd runs on your machine and silently configures your \
|
||||
computer to work on the attached networks without trouble \
|
||||
and mostly without configuration."
|
||||
|
||||
HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
|
||||
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd"
|
||||
|
||||
SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \
|
||||
file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
|
||||
file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
|
||||
file://dhcpcd.service \
|
||||
file://dhcpcd@.service \
|
||||
file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
|
||||
"
|
||||
|
||||
SRCREV = "5d9bf80c26b4b7dc9d8aa175d96d5a24e75b4d48"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit pkgconfig autotools-brokensep systemd useradd
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "dhcpcd.service"
|
||||
|
||||
PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
|
||||
PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
|
||||
# ntp conflicts with chrony
|
||||
PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
|
||||
PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
|
||||
PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
|
||||
|
||||
# add option to override DBDIR location
|
||||
DBDIR ?= "${localstatedir}/lib/${BPN}"
|
||||
|
||||
EXTRA_OECONF = "--enable-ipv4 \
|
||||
--dbdir=${DBDIR} \
|
||||
--sbindir=${base_sbindir} \
|
||||
--runstatedir=/run \
|
||||
--enable-privsep \
|
||||
--privsepuser=dhcpcd \
|
||||
--with-hooks \
|
||||
--with-eghooks \
|
||||
"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
|
||||
|
||||
do_install:append () {
|
||||
# install systemd unit files
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
|
||||
|
||||
chmod 700 ${D}${DBDIR}
|
||||
chown dhcpcd:dhcpcd ${D}${DBDIR}
|
||||
}
|
||||
|
||||
FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
From 02acc4d875ee81e6fd19ef66d69c9f55b4b4a7e7 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Wed, 9 Nov 2022 16:33:18 +0800
|
||||
Subject: [PATCH] 20-resolv.conf: improve the sitation of working with systemd
|
||||
|
||||
systemd's resolvconf implementation ignores the protocol part.
|
||||
See https://github.com/systemd/systemd/issues/25032.
|
||||
|
||||
When using 'dhcp server + dns server + dhcpcd + systemd', we
|
||||
get an integration issue, that is dhcpcd runs 'resolvconf -d eth0.ra',
|
||||
yet systemd's resolvconf treats it as eth0. This will delete the
|
||||
DNS information set by 'resolvconf -a eth0.dhcp'.
|
||||
|
||||
Fortunately, 20-resolv.conf has the ability to build the resolv.conf
|
||||
file contents itself. We can just pass the generated contents to
|
||||
systemd's resolvconf. This way, the DNS information is not incorrectly
|
||||
deleted. Also, it does not cause behavior regression for dhcpcd
|
||||
in other cases.
|
||||
|
||||
Upstream-Status: Inappropriate [OE Specific]
|
||||
This patch has been rejected by dhcpcd upstream.
|
||||
See details in https://github.com/NetworkConfiguration/dhcpcd/pull/152
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
hooks/20-resolv.conf | 17 +++++++++++++----
|
||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf
|
||||
index 7c29e276..becc019f 100644
|
||||
--- a/hooks/20-resolv.conf
|
||||
+++ b/hooks/20-resolv.conf
|
||||
@@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming"
|
||||
NL="
|
||||
"
|
||||
: ${resolvconf:=resolvconf}
|
||||
+resolvconf_from_systemd=false
|
||||
if command -v "$resolvconf" >/dev/null 2>&1; then
|
||||
have_resolvconf=true
|
||||
+ if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then
|
||||
+ resolvconf_from_systemd=true
|
||||
+ fi
|
||||
else
|
||||
have_resolvconf=false
|
||||
fi
|
||||
@@ -69,8 +73,13 @@ build_resolv_conf()
|
||||
else
|
||||
echo "# /etc/resolv.conf.tail can replace this line" >> "$cf"
|
||||
fi
|
||||
- if change_file /etc/resolv.conf "$cf"; then
|
||||
- chmod 644 /etc/resolv.conf
|
||||
+ if $resolvconf_from_systemd; then
|
||||
+ [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
|
||||
+ "$resolvconf" -a "$ifname" <"$cf"
|
||||
+ else
|
||||
+ if change_file /etc/resolv.conf "$cf"; then
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
rm -f "$cf"
|
||||
}
|
||||
@@ -170,7 +179,7 @@ add_resolv_conf()
|
||||
for x in ${new_domain_name_servers}; do
|
||||
conf="${conf}nameserver $x$NL"
|
||||
done
|
||||
- if $have_resolvconf; then
|
||||
+ if $have_resolvconf && ! $resolvconf_from_systemd; then
|
||||
[ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
|
||||
printf %s "$conf" | "$resolvconf" -a "$ifname"
|
||||
return $?
|
||||
@@ -186,7 +195,7 @@ add_resolv_conf()
|
||||
|
||||
remove_resolv_conf()
|
||||
{
|
||||
- if $have_resolvconf; then
|
||||
+ if $have_resolvconf && ($if_down || ! $resolvconf_from_systemd); then
|
||||
"$resolvconf" -d "$ifname" -f
|
||||
else
|
||||
if [ -e "$resolv_conf_dir/$ifname" ]; then
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
From 4915a7e52fcea8fe283a842890a1e726b1e26b10 Mon Sep 17 00:00:00 2001
|
||||
From: Lei Maohui <leimaohui@fujitsu.com>
|
||||
Date: Fri, 10 Mar 2023 03:48:46 +0000
|
||||
Subject: [PATCH] dhcpcd.8: Fix conflict error when enable multilib.
|
||||
|
||||
Error: Transaction test error:
|
||||
file /usr/share/man/man8/dhcpcd.8 conflicts between attempted
|
||||
installs of dhcpcd-doc-9.4.1-r0.cortexa57 and
|
||||
lib32-dhcpcd-doc-9.4.1-r0.armv7ahf_neon
|
||||
|
||||
The differences between the two files are as follows:
|
||||
@@ -821,7 +821,7 @@
|
||||
If you always use the same options, put them here.
|
||||
.It Pa /usr/libexec/dhcpcd-run-hooks
|
||||
Bourne shell script that is run to configure or de-configure an interface.
|
||||
-.It Pa /usr/lib64/dhcpcd/dev
|
||||
+.It Pa /usr/lib/dhcpcd/dev
|
||||
Linux
|
||||
.Pa /dev
|
||||
management modules.
|
||||
|
||||
It is just a man file, there is no necessary to manage multiple
|
||||
versions.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
|
||||
---
|
||||
src/dhcpcd.8.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in
|
||||
index bc6b3b5..791f2ba 100644
|
||||
--- a/src/dhcpcd.8.in
|
||||
+++ b/src/dhcpcd.8.in
|
||||
@@ -821,7 +821,7 @@ Configuration file for dhcpcd.
|
||||
If you always use the same options, put them here.
|
||||
.It Pa @SCRIPT@
|
||||
Bourne shell script that is run to configure or de-configure an interface.
|
||||
-.It Pa @LIBDIR@/dhcpcd/dev
|
||||
+.It Pa /usr/<libdir>/dhcpcd/dev
|
||||
Linux
|
||||
.Pa /dev
|
||||
management modules.
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Cappa <stefano.cappa.ks89@gmail.com>
|
||||
Date: Sun, 13 Jan 2019 01:50:52 +0100
|
||||
Subject: [PATCH] remove INCLUDEDIR to prevent build issues
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com>
|
||||
---
|
||||
configure | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6c81e0db..32dea2b4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20,7 +20,6 @@ BUILD=
|
||||
HOST=
|
||||
HOSTCC=
|
||||
TARGET=
|
||||
-INCLUDEDIR=
|
||||
DEBUG=
|
||||
FORK=
|
||||
STATIC=
|
||||
@@ -72,7 +71,6 @@ for x do
|
||||
--mandir) MANDIR=$var;;
|
||||
--datadir) DATADIR=$var;;
|
||||
--with-ccopts|CFLAGS) CFLAGS=$var;;
|
||||
- -I|--includedir) INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }-I$var";;
|
||||
CC) CC=$var;;
|
||||
CPPFLAGS) CPPFLAGS=$var;;
|
||||
PKG_CONFIG) PKG_CONFIG=$var;;
|
||||
@@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then
|
||||
echo "CPPFLAGS=" >>$CONFIG_MK
|
||||
echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK
|
||||
fi
|
||||
-if [ -n "$INCLUDEDIR" ]; then
|
||||
- echo "CPPFLAGS+= $INCLUDEDIR" >>$CONFIG_MK
|
||||
-fi
|
||||
if [ -n "$LDFLAGS" ]; then
|
||||
echo "LDFLAGS=" >>$CONFIG_MK
|
||||
echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK
|
||||
--
|
||||
2.17.2 (Apple Git-113)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=A minimalistic network configuration daemon with DHCPv4, rdisc and DHCPv6 support
|
||||
Wants=network.target
|
||||
Before=network.target
|
||||
Conflicts=connman.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/sbin/dhcpcd -q --nobackground
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=dhcpcd on %I
|
||||
Wants=network.target
|
||||
Before=network.target
|
||||
BindsTo=sys-subsystem-net-devices-%i.device
|
||||
After=sys-subsystem-net-devices-%i.device
|
||||
Conflicts=connman.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/dhcpcd/%I.pid
|
||||
ExecStart=/sbin/dhcpcd -q %I
|
||||
ExecStop=/sbin/dhcpcd -x %I
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,85 @@
|
||||
From c7c27ba763c613f83c1561e56448b49315c271c5 Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
Date: Wed, 6 Mar 2019 09:36:11 -0500
|
||||
Subject: [PATCH] Upstream:
|
||||
http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
|
||||
---
|
||||
ping/ping_common.h | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/ping/ping_common.h b/ping/ping_common.h
|
||||
index 65e3e60..3e84db0 100644
|
||||
--- a/ping/ping_common.h
|
||||
+++ b/ping/ping_common.h
|
||||
@@ -18,10 +18,14 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see `http://www.gnu.org/licenses/'. */
|
||||
|
||||
+#include <config.h>
|
||||
+
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
+#ifdef HAVE_IPV6
|
||||
#include <netinet/icmp6.h>
|
||||
+#endif
|
||||
#include <icmp.h>
|
||||
#include <error.h>
|
||||
#include <progname.h>
|
||||
@@ -63,7 +67,12 @@ struct ping_stat
|
||||
want to follow the traditional behaviour of ping. */
|
||||
#define DEFAULT_PING_COUNT 0
|
||||
|
||||
+#ifdef HAVE_IPV6
|
||||
#define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN)
|
||||
+#else
|
||||
+#define PING_HEADER_LEN (ICMP_MINLEN)
|
||||
+#endif
|
||||
+
|
||||
#define PING_TIMING(s) ((s) >= sizeof (struct timeval))
|
||||
#define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */
|
||||
|
||||
@@ -78,13 +87,20 @@ struct ping_stat
|
||||
|
||||
#define PING_MIN_USER_INTERVAL (200000/PING_PRECISION)
|
||||
|
||||
+#ifdef HAVE_IPV6
|
||||
/* FIXME: Adjust IPv6 case for options and their consumption. */
|
||||
#define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
|
||||
(MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN))
|
||||
|
||||
+#else
|
||||
+#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_IPV6
|
||||
typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
|
||||
struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
|
||||
int datalen);
|
||||
+#endif
|
||||
|
||||
typedef int (*ping_efp) (int code,
|
||||
void *closure,
|
||||
@@ -93,13 +109,17 @@ typedef int (*ping_efp) (int code,
|
||||
struct ip * ip, icmphdr_t * icmp, int datalen);
|
||||
|
||||
union event {
|
||||
+#ifdef HAVE_IPV6
|
||||
ping_efp6 handler6;
|
||||
+#endif
|
||||
ping_efp handler;
|
||||
};
|
||||
|
||||
union ping_address {
|
||||
struct sockaddr_in ping_sockaddr;
|
||||
+#ifdef HAVE_IPV6
|
||||
struct sockaddr_in6 ping_sockaddr6;
|
||||
+#endif
|
||||
};
|
||||
|
||||
typedef struct ping_data PING;
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
From f7f785c21306010b2367572250b2822df5bc7728 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier at gentoo.org>
|
||||
Date: Thu, 18 Nov 2010 16:59:14 -0500
|
||||
Subject: [PATCH] printf-parse: pull in features.h for __GLIBC__
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
|
||||
|
||||
---
|
||||
lib/printf-parse.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/lib/printf-parse.h b/lib/printf-parse.h
|
||||
index e7d0f82..d7b4534 100644
|
||||
--- a/lib/printf-parse.h
|
||||
+++ b/lib/printf-parse.h
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
#include "printf-args.h"
|
||||
|
||||
+#ifdef HAVE_FEATURES_H
|
||||
+# include <features.h> /* for __GLIBC__ */
|
||||
+#endif
|
||||
|
||||
/* Flags */
|
||||
#define FLAG_GROUP 1 /* ' flag */
|
||||
@@ -0,0 +1,25 @@
|
||||
From 9089c6eafbf5903174dce87b68476e35db80beb9 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Jansa <martin.jansa@gmail.com>
|
||||
Date: Wed, 6 Mar 2019 09:36:11 -0500
|
||||
Subject: [PATCH] inetutils: Import version 1.9.4
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
lib/wchar.in.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
|
||||
index cdda680..043866a 100644
|
||||
--- a/lib/wchar.in.h
|
||||
+++ b/lib/wchar.in.h
|
||||
@@ -77,6 +77,9 @@
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_WCHAR_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
|
||||
+#else
|
||||
+# include <stddef.h>
|
||||
+# define MB_CUR_MAX 1
|
||||
#endif
|
||||
|
||||
#undef _GL_ALREADY_INCLUDING_WCHAR_H
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
From 101130f422dd5c01a1459645d7b2a5b8d19720ab Mon Sep 17 00:00:00 2001
|
||||
From: Martin Jansa <martin.jansa@gmail.com>
|
||||
Date: Wed, 6 Mar 2019 09:36:11 -0500
|
||||
Subject: [PATCH] inetutils: define PATH_PROCNET_DEV if not already defined
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
this prevents the following compilation error :
|
||||
system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function)
|
||||
|
||||
this patch comes from :
|
||||
http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/
|
||||
|
||||
Upstream-Status: Inappropriate [not author]
|
||||
|
||||
Signed-of-by: Eric Bénard <eric@eukrea.com>
|
||||
|
||||
---
|
||||
ifconfig/system/linux.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/ifconfig/system/linux.c b/ifconfig/system/linux.c
|
||||
index e453b46..4268ca9 100644
|
||||
--- a/ifconfig/system/linux.c
|
||||
+++ b/ifconfig/system/linux.c
|
||||
@@ -53,6 +53,10 @@
|
||||
#include "../ifconfig.h"
|
||||
|
||||
|
||||
+#ifndef PATH_PROCNET_DEV
|
||||
+ #define PATH_PROCNET_DEV "/proc/net/dev"
|
||||
+#endif
|
||||
+
|
||||
/* ARPHRD stuff. */
|
||||
|
||||
static void
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
From cc66e842e037fba9f06761f942abe5c4856492b8 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Kang <kai.kang@windriver.com>
|
||||
Date: Wed, 6 Mar 2019 09:36:11 -0500
|
||||
Subject: [PATCH] inetutils: Import version 1.9.4
|
||||
|
||||
Only check security/pam_appl.h which is provided by package libpam when pam is
|
||||
enabled.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
---
|
||||
configure.ac | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5e16c3a..18510a8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -182,6 +182,19 @@ AC_SUBST(LIBUTIL)
|
||||
|
||||
# See if we have libpam.a. Investigate PAM versus Linux-PAM.
|
||||
if test "$with_pam" = yes ; then
|
||||
+ AC_CHECK_HEADERS([security/pam_appl.h], [], [], [
|
||||
+#include <sys/types.h>
|
||||
+#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
+# include <netinet/in_systm.h>
|
||||
+#endif
|
||||
+#include <netinet/in.h>
|
||||
+#ifdef HAVE_NETINET_IP_H
|
||||
+# include <netinet/ip.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_PARAM_H
|
||||
+# include <sys/param.h>
|
||||
+#endif
|
||||
+])
|
||||
AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl)
|
||||
AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)
|
||||
if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then
|
||||
@@ -617,7 +630,7 @@ AC_HEADER_DIRENT
|
||||
AC_CHECK_HEADERS([arpa/nameser.h arpa/tftp.h fcntl.h features.h \
|
||||
glob.h memory.h netinet/ether.h netinet/in_systm.h \
|
||||
netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \
|
||||
- security/pam_appl.h shadow.h \
|
||||
+ shadow.h \
|
||||
stropts.h sys/tty.h \
|
||||
sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \
|
||||
sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \
|
||||
@@ -0,0 +1,20 @@
|
||||
# default: off
|
||||
# description:
|
||||
# Rexecd is the server for the rexec program. The server provides remote
|
||||
# execution facilities with authentication based on user names and
|
||||
# passwords.
|
||||
#
|
||||
service exec
|
||||
{
|
||||
socket_type = stream
|
||||
protocol = tcp
|
||||
flags = NAMEINARGS
|
||||
wait = no
|
||||
user = root
|
||||
group = root
|
||||
log_on_success += USERID
|
||||
log_on_failure += USERID
|
||||
server = @SBINDIR@/tcpd
|
||||
server_args = @SBINDIR@/in.rexecd
|
||||
disable = yes
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# default: off
|
||||
# description:
|
||||
# Rlogind is a server for the rlogin program. The server provides remote
|
||||
# execution with authentication based on privileged port numbers from trusted
|
||||
# host
|
||||
#
|
||||
service login
|
||||
{
|
||||
socket_type = stream
|
||||
protocol = tcp
|
||||
flags = NAMEINARGS
|
||||
wait = no
|
||||
user = root
|
||||
group = root
|
||||
log_on_success += USERID
|
||||
log_on_failure += USERID
|
||||
server = @SBINDIR@/tcpd
|
||||
server_args = @SBINDIR@/in.rlogind -a
|
||||
disable = yes
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# default: off
|
||||
# description:
|
||||
# The rshd server is a server for the rcmd(3) routine and,
|
||||
# consequently, for the rsh(1) program. The server provides
|
||||
# remote execution facilities with authentication based on
|
||||
# privileged port numbers from trusted hosts.
|
||||
#
|
||||
service shell
|
||||
{
|
||||
socket_type = stream
|
||||
protocol = tcp
|
||||
flags = NAMEINARGS
|
||||
wait = no
|
||||
user = root
|
||||
group = root
|
||||
log_on_success += USERID
|
||||
log_on_failure += USERID
|
||||
server = @SBINDIR@/tcpd
|
||||
server_args = @SBINDIR@/in.rshd -aL
|
||||
disable = yes
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# default: on
|
||||
# description: The telnet server serves telnet sessions; it uses \
|
||||
# unencrypted username/password pairs for authentication.
|
||||
service telnet
|
||||
{
|
||||
disable = no
|
||||
flags = REUSE
|
||||
socket_type = stream
|
||||
wait = no
|
||||
user = root
|
||||
server = @SBINDIR@/in.telnetd
|
||||
log_on_failure += USERID
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# default: off
|
||||
# description:
|
||||
# Tftpd is a server which supports the Internet Trivial File Transfer
|
||||
# Pro-tocol (RFC 783). The TFTP server operates at the port indicated
|
||||
# in the tftp service description; see services(5).
|
||||
#
|
||||
service tftp
|
||||
{
|
||||
disable = yes
|
||||
socket_type = dgram
|
||||
protocol = udp
|
||||
flags = IPv6
|
||||
wait = yes
|
||||
user = root
|
||||
group = root
|
||||
server = @SBINDIR@/in.tftpd
|
||||
server_args = /tftpboot
|
||||
}
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
SUMMARY = "The GNU inetutils are a collection of common networking utilities and servers."
|
||||
DESCRIPTION = "The GNU inetutils are a collection of common \
|
||||
networking utilities and servers including ftp, ftpd, rcp, \
|
||||
rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
|
||||
talkd, telnet, telnetd, tftp, tftpd, and uucpd."
|
||||
HOMEPAGE = "http://www.gnu.org/software/inetutils"
|
||||
SECTION = "net"
|
||||
DEPENDS = "ncurses netbase readline virtual/crypt"
|
||||
|
||||
LICENSE = "GPL-3.0-only"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
|
||||
|
||||
SRC_URI[sha256sum] = "1789d6b1b1a57dfe2a7ab7b533ee9f5dfd9cbf5b59bb1bb3c2612ed08d0f68b2"
|
||||
SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
|
||||
file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
|
||||
file://inetutils-1.8-0003-wchar.patch \
|
||||
file://rexec.xinetd.inetutils \
|
||||
file://rlogin.xinetd.inetutils \
|
||||
file://rsh.xinetd.inetutils \
|
||||
file://telnet.xinetd.inetutils \
|
||||
file://tftpd.xinetd.inetutils \
|
||||
file://inetutils-1.9-PATH_PROCNET_DEV.patch \
|
||||
file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
|
||||
"
|
||||
|
||||
inherit autotools gettext update-alternatives texinfo
|
||||
|
||||
acpaths = "-I ./m4"
|
||||
|
||||
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
|
||||
|
||||
PACKAGECONFIG ??= "ftp uucpd \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \
|
||||
"
|
||||
PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline"
|
||||
PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline"
|
||||
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no,"
|
||||
PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6,"
|
||||
|
||||
EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
|
||||
inetutils_cv_path_login=${base_bindir}/login \
|
||||
--with-libreadline-prefix=${STAGING_LIBDIR} \
|
||||
--enable-rpath=no \
|
||||
"
|
||||
|
||||
# These are horrible for security, disable them
|
||||
EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \
|
||||
--disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
|
||||
|
||||
do_configure:prepend () {
|
||||
export HELP2MAN='true'
|
||||
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath
|
||||
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
|
||||
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
|
||||
rm -f ${S}/glob/configure*
|
||||
}
|
||||
|
||||
do_install:append () {
|
||||
install -m 0755 -d ${D}${base_sbindir}
|
||||
install -m 0755 -d ${D}${sbindir}
|
||||
install -m 0755 -d ${D}${sysconfdir}/xinetd.d
|
||||
if [ "${base_bindir}" != "${bindir}" ] ; then
|
||||
install -m 0755 -d ${D}${base_bindir}
|
||||
mv ${D}${bindir}/ping* ${D}${base_bindir}/
|
||||
mv ${D}${bindir}/hostname ${D}${base_bindir}/
|
||||
mv ${D}${bindir}/dnsdomainname ${D}${base_bindir}/
|
||||
fi
|
||||
mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
|
||||
mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
|
||||
mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
|
||||
mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
|
||||
if [ -e ${D}${libexecdir}/rexecd ]; then
|
||||
mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
|
||||
cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
|
||||
fi
|
||||
if [ -e ${D}${libexecdir}/rlogind ]; then
|
||||
mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
|
||||
cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
|
||||
fi
|
||||
if [ -e ${D}${libexecdir}/rshd ]; then
|
||||
mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
|
||||
cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
|
||||
fi
|
||||
if [ -e ${D}${libexecdir}/talkd ]; then
|
||||
mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
|
||||
fi
|
||||
mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd
|
||||
mv ${D}${libexecdir}/* ${D}${bindir}/
|
||||
cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet
|
||||
cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd
|
||||
|
||||
sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/*
|
||||
if [ -e ${D}${libdir}/charset.alias ]; then
|
||||
rm -rf ${D}${libdir}/charset.alias
|
||||
fi
|
||||
rm -rf ${D}${libexecdir}/
|
||||
# remove usr/lib if empty
|
||||
rmdir ${D}${libdir} || true
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \
|
||||
${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \
|
||||
${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \
|
||||
${PN}-rsh ${PN}-rshd"
|
||||
|
||||
# The packages tftpd, telnetd and rshd conflict with the ones
|
||||
# provided by netkit, so add the corresponding -dbg packages
|
||||
# for them to avoid the confliction between the dbg package
|
||||
# of inetutils and netkit.
|
||||
PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg"
|
||||
NOAUTOPACKAGEDEBUG = "1"
|
||||
|
||||
ALTERNATIVE_PRIORITY = "79"
|
||||
ALTERNATIVE:${PN} = "whois dnsdomainname"
|
||||
ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
|
||||
ALTERNATIVE_LINK_NAME[dnsdomainname] = "${base_bindir}/dnsdomainname"
|
||||
|
||||
ALTERNATIVE_PRIORITY_${PN}-logger = "60"
|
||||
ALTERNATIVE:${PN}-logger = "logger"
|
||||
ALTERNATIVE:${PN}-syslogd = "syslogd"
|
||||
ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
|
||||
|
||||
ALTERNATIVE:${PN}-ftp = "ftp"
|
||||
ALTERNATIVE:${PN}-ftpd = "ftpd"
|
||||
ALTERNATIVE:${PN}-tftp = "tftp"
|
||||
ALTERNATIVE:${PN}-tftpd = "tftpd"
|
||||
ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd"
|
||||
ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd"
|
||||
|
||||
ALTERNATIVE:${PN}-telnet = "telnet"
|
||||
ALTERNATIVE:${PN}-telnetd = "telnetd"
|
||||
ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd"
|
||||
ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd"
|
||||
|
||||
ALTERNATIVE:${PN}-inetd= "inetd"
|
||||
ALTERNATIVE:${PN}-traceroute = "traceroute"
|
||||
|
||||
ALTERNATIVE:${PN}-hostname = "hostname"
|
||||
ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
|
||||
|
||||
ALTERNATIVE:${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8 \
|
||||
tftpd.8 tftp.1 telnetd.8"
|
||||
ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
|
||||
ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
|
||||
ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
|
||||
ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
|
||||
ALTERNATIVE_LINK_NAME[telnetd.8] = "${mandir}/man8/telnetd.8"
|
||||
ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8"
|
||||
ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1"
|
||||
|
||||
ALTERNATIVE:${PN}-ifconfig = "ifconfig"
|
||||
ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
|
||||
|
||||
ALTERNATIVE:${PN}-ping = "ping"
|
||||
ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
|
||||
|
||||
ALTERNATIVE:${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}"
|
||||
ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
|
||||
|
||||
|
||||
FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
|
||||
FILES:${PN}-ping = "${base_bindir}/ping.${BPN}"
|
||||
FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
|
||||
FILES:${PN}-hostname = "${base_bindir}/hostname.${BPN}"
|
||||
FILES:${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
|
||||
FILES:${PN}-traceroute = "${bindir}/traceroute.${BPN}"
|
||||
FILES:${PN}-logger = "${bindir}/logger.${BPN}"
|
||||
|
||||
FILES:${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
|
||||
RCONFLICTS:${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng"
|
||||
|
||||
FILES:${PN}-ftp = "${bindir}/ftp.${BPN}"
|
||||
|
||||
FILES:${PN}-tftp = "${bindir}/tftp.${BPN}"
|
||||
FILES:${PN}-telnet = "${bindir}/telnet.${BPN}"
|
||||
|
||||
# We make us of RCONFLICTS / RPROVIDES here rather than using the normal
|
||||
# alternatives method as this leads to packaging QA issues when using
|
||||
# musl as that library does not provide what these applications need to
|
||||
# build.
|
||||
FILES:${PN}-rsh = "${bindir}/rsh ${bindir}/rlogin ${bindir}/rexec ${bindir}/rcp"
|
||||
RCONFLICTS:${PN}-rsh += "netkit-rsh-client"
|
||||
RPROVIDES:${PN}-rsh = "rsh"
|
||||
|
||||
FILES:${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
|
||||
${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
|
||||
FILES:${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd"
|
||||
RDEPENDS:${PN}-rshd += "xinetd tcp-wrappers"
|
||||
RCONFLICTS:${PN}-rshd += "netkit-rshd-server"
|
||||
RPROVIDES:${PN}-rshd = "rshd"
|
||||
|
||||
FILES:${PN}-ftpd = "${bindir}/ftpd.${BPN}"
|
||||
FILES:${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}"
|
||||
RDEPENDS:${PN}-ftpd += "xinetd"
|
||||
|
||||
FILES:${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
|
||||
FILES:${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd"
|
||||
RCONFLICTS:${PN}-tftpd += "netkit-tftpd"
|
||||
RDEPENDS:${PN}-tftpd += "xinetd"
|
||||
|
||||
FILES:${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
|
||||
FILES:${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd"
|
||||
RCONFLICTS:${PN}-telnetd += "netkit-telnet"
|
||||
RPROVIDES:${PN}-telnetd = "telnetd"
|
||||
RDEPENDS:${PN}-telnetd += "xinetd"
|
||||
|
||||
FILES:${PN}-inetd = "${bindir}/inetd.${BPN}"
|
||||
|
||||
RDEPENDS:${PN} = "xinetd"
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Thu, 22 Dec 2016 15:26:30 +0200
|
||||
Subject: [PATCH] libc-compat.h: add musl workaround
|
||||
|
||||
The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and
|
||||
__USE_MISC) to solve conflicts with libc provided headers. This patch makes
|
||||
libc-compat.h work for musl libc as well.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Taken From:
|
||||
https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
|
||||
---
|
||||
include/uapi/linux/libc-compat.h | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
|
||||
index a159991..22198fa 100644
|
||||
--- a/include/uapi/linux/libc-compat.h
|
||||
+++ b/include/uapi/linux/libc-compat.h
|
||||
@@ -50,10 +50,12 @@
|
||||
#define _LIBC_COMPAT_H
|
||||
|
||||
/* We have included glibc headers... */
|
||||
-#if defined(__GLIBC__)
|
||||
+#if 1
|
||||
+#define __USE_MISC
|
||||
|
||||
/* Coordinate with glibc net/if.h header. */
|
||||
#if defined(_NET_IF_H) && defined(__USE_MISC)
|
||||
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
|
||||
|
||||
/* GLIBC headers included first so don't define anything
|
||||
* that would already be defined. */
|
||||
@@ -0,0 +1,103 @@
|
||||
SUMMARY = "TCP / IP networking and traffic control utilities"
|
||||
DESCRIPTION = "Iproute2 is a collection of utilities for controlling \
|
||||
TCP / IP networking and traffic control in Linux. Of the utilities ip \
|
||||
and tc are the most important. ip controls IPv4 and IPv6 \
|
||||
configuration and tc stands for traffic control."
|
||||
HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
|
||||
SECTION = "base"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
"
|
||||
|
||||
DEPENDS = "flex-native bison-native iptables libcap"
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
|
||||
file://0001-libc-compat.h-add-musl-workaround.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "dfb2a98db96e7a653cffc6693335a1a466e29a34b6ac528be48f35e1d2766732"
|
||||
|
||||
inherit update-alternatives bash-completion pkgconfig
|
||||
|
||||
PACKAGECONFIG ??= "tipc elf devlink"
|
||||
PACKAGECONFIG[tipc] = ",,libmnl,"
|
||||
PACKAGECONFIG[elf] = ",,elfutils,"
|
||||
PACKAGECONFIG[devlink] = ",,libmnl,"
|
||||
PACKAGECONFIG[rdma] = ",,libmnl,"
|
||||
PACKAGECONFIG[selinux] = ",,libselinux"
|
||||
|
||||
IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}"
|
||||
|
||||
# CFLAGS are computed in Makefile and reference CCOPTS
|
||||
#
|
||||
EXTRA_OEMAKE = "\
|
||||
CC='${CC}' \
|
||||
KERNEL_INCLUDE=${STAGING_INCDIR} \
|
||||
DOCDIR=${docdir}/iproute2 \
|
||||
SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \
|
||||
SBINDIR='${base_sbindir}' \
|
||||
LIBDIR='${libdir}' \
|
||||
CCOPTS='${CFLAGS}' \
|
||||
"
|
||||
|
||||
do_configure:append () {
|
||||
sh configure ${STAGING_INCDIR}
|
||||
# Explicitly disable ATM support
|
||||
sed -i -e '/TC_CONFIG_ATM/d' config.mk
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake DESTDIR=${D} install
|
||||
mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
|
||||
install -d ${D}${datadir}
|
||||
mv ${D}/share/* ${D}${datadir}/ || true
|
||||
rm ${D}/share -rf || true
|
||||
}
|
||||
|
||||
# The .so files in iproute2-tc are modules, not traditional libraries
|
||||
INSANE_SKIP:${PN}-tc = "dev-so"
|
||||
|
||||
IPROUTE2_PACKAGES =+ "\
|
||||
${PN}-devlink \
|
||||
${PN}-genl \
|
||||
${PN}-ifstat \
|
||||
${PN}-ip \
|
||||
${PN}-lnstat \
|
||||
${PN}-nstat \
|
||||
${PN}-routel \
|
||||
${PN}-rtacct \
|
||||
${PN}-ss \
|
||||
${PN}-tc \
|
||||
${PN}-tipc \
|
||||
${PN}-rdma \
|
||||
"
|
||||
|
||||
PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}"
|
||||
RDEPENDS:${PN} += "${PN}-ip"
|
||||
|
||||
FILES:${PN}-tc = "${base_sbindir}/tc* \
|
||||
${libdir}/tc/*.so"
|
||||
FILES:${PN}-lnstat = "${base_sbindir}/lnstat \
|
||||
${base_sbindir}/ctstat \
|
||||
${base_sbindir}/rtstat"
|
||||
FILES:${PN}-ifstat = "${base_sbindir}/ifstat"
|
||||
FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2"
|
||||
FILES:${PN}-genl = "${base_sbindir}/genl"
|
||||
FILES:${PN}-rtacct = "${base_sbindir}/rtacct"
|
||||
FILES:${PN}-nstat = "${base_sbindir}/nstat"
|
||||
FILES:${PN}-ss = "${base_sbindir}/ss"
|
||||
FILES:${PN}-tipc = "${base_sbindir}/tipc"
|
||||
FILES:${PN}-devlink = "${base_sbindir}/devlink"
|
||||
FILES:${PN}-rdma = "${base_sbindir}/rdma"
|
||||
FILES:${PN}-routel = "${base_sbindir}/routel"
|
||||
|
||||
RDEPENDS:${PN}-routel = "python3-core"
|
||||
|
||||
ALTERNATIVE:${PN}-ip = "ip"
|
||||
ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
|
||||
ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
ALTERNATIVE:${PN}-tc = "tc"
|
||||
ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc"
|
||||
ALTERNATIVE_PRIORITY_${PN}-tc = "100"
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Subject: [PATCH] iw: version.sh: don't use git describe for versioning
|
||||
|
||||
It will detect top-level git repositories like the Angstrom setup-scripts and break.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
---
|
||||
diff -Naur iw-4.7-orig/version.sh iw-4.7/version.sh
|
||||
--- iw-4.7-orig/version.sh 2016-05-31 12:52:46.000000000 +0300
|
||||
+++ iw-4.7/version.sh 2016-06-01 11:21:58.307409060 +0300
|
||||
@@ -15,27 +15,7 @@
|
||||
SRC_DIR=$(cd ${SRC_DIR}; pwd)
|
||||
cd "${SRC_DIR}"
|
||||
|
||||
-v=""
|
||||
-if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
||||
- git update-index --refresh --unmerged > /dev/null
|
||||
- descr=$(git describe --match=v* 2>/dev/null)
|
||||
- if [ $? -eq 0 ]; then
|
||||
- # on git builds check that the version number above
|
||||
- # is correct...
|
||||
- if [ "${descr%%-*}" = "v$VERSION" ]; then
|
||||
- v="${descr#v}"
|
||||
- if git diff-index --name-only HEAD | read dummy ; then
|
||||
- v="$v"-dirty
|
||||
- fi
|
||||
- fi
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-# set to the default version when failed to get the version
|
||||
-# information with git
|
||||
-if [ -z "${v}" ]; then
|
||||
- v="$VERSION"
|
||||
-fi
|
||||
+v="$VERSION"
|
||||
|
||||
echo '#include "iw.h"' > "$OUT"
|
||||
echo "const char iw_version[] = \"$v\";" >> "$OUT"
|
||||
@@ -0,0 +1,50 @@
|
||||
From ff9f0a631c99fb6e2677c02bf572a5e69c70f5cf Mon Sep 17 00:00:00 2001
|
||||
From: Changhyeok Bae <changhyeok.bae@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 22:48:03 +0100
|
||||
Subject: [PATCH] Support separation of SRCDIR and OBJDIR
|
||||
|
||||
Typical use of VPATH to locate the sources.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
---
|
||||
Makefile | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 90f2251..714cdb9 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,9 @@
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
+OBJDIR ?= $(PWD)
|
||||
+VPATH = $(SRCDIR)
|
||||
+
|
||||
PREFIX ?= /usr
|
||||
SBINDIR ?= $(PREFIX)/sbin
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
@@ -92,7 +96,7 @@ all: $(ALL)
|
||||
version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
|
||||
$(wildcard .git/index .git/refs/tags)
|
||||
@$(NQ) ' GEN ' $@
|
||||
- $(Q)./version.sh $@
|
||||
+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
|
||||
|
||||
nl80211-commands.inc: nl80211.h
|
||||
@$(NQ) ' GEN ' $@
|
||||
@@ -100,7 +104,7 @@ nl80211-commands.inc: nl80211.h
|
||||
|
||||
%.o: %.c iw.h nl80211.h nl80211-commands.inc
|
||||
@$(NQ) ' CC ' $@
|
||||
- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
ifeq ($(IW_ANDROID_BUILD),)
|
||||
iw: $(OBJS)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
|
||||
DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
|
||||
wireless devices. It supports almost all new drivers that have been added \
|
||||
to the kernel recently. "
|
||||
HOMEPAGE = "https://wireless.wiki.kernel.org/en/users/documentation/iw"
|
||||
SECTION = "base"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
|
||||
|
||||
DEPENDS = "libnl"
|
||||
|
||||
SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
|
||||
file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
|
||||
file://separate-objdir.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "2a44676d28a87bbc232903d5d573e7618e4fae0cea3a1aff067a26fa66652b75"
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
EXTRA_OEMAKE = "\
|
||||
-f '${S}/Makefile' \
|
||||
\
|
||||
'PREFIX=${prefix}' \
|
||||
'SBINDIR=${sbindir}' \
|
||||
'MANDIR=${mandir}' \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 841924e1fe8db2bff3eab8d37634ef08f86c00ec Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Tue, 10 Nov 2020 15:57:03 +0000
|
||||
Subject: [PATCH] src/lib/log/logger_unittest_support.cc: do not write build
|
||||
path into binary
|
||||
|
||||
This breaks reproducibility and is needed only in unit testing.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
|
||||
---
|
||||
src/lib/log/logger_unittest_support.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/log/logger_unittest_support.cc b/src/lib/log/logger_unittest_support.cc
|
||||
index fc01c6e..f46d17e 100644
|
||||
--- a/src/lib/log/logger_unittest_support.cc
|
||||
+++ b/src/lib/log/logger_unittest_support.cc
|
||||
@@ -84,7 +84,7 @@ void initLogger(isc::log::Severity severity, int dbglevel) {
|
||||
const char* localfile = getenv("KEA_LOGGER_LOCALMSG");
|
||||
|
||||
// Set a directory for creating lockfiles when running tests
|
||||
- setenv("KEA_LOCKFILE_DIR", TOP_BUILDDIR, 0);
|
||||
+ //setenv("KEA_LOCKFILE_DIR", TOP_BUILDDIR, 0);
|
||||
|
||||
// Initialize logging
|
||||
initLogger(root, severity, dbglevel, localfile);
|
||||
@@ -0,0 +1,58 @@
|
||||
From d027b1d85a8c1a0193b6e4a00083d3038d699a59 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Kang <kai.kang@windriver.com>
|
||||
Date: Tue, 22 Sep 2020 15:02:33 +0800
|
||||
Subject: [PATCH] There are conflict of config files between kea and lib32-kea:
|
||||
|
||||
| Error: Transaction test error:
|
||||
| file /etc/kea/kea-ctrl-agent.conf conflicts between attempted installs of
|
||||
lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64
|
||||
| file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of
|
||||
lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64
|
||||
|
||||
Because they are all commented out, replace the expanded libdir path with
|
||||
'$libdir' in the config files to avoid conflict.
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/issues/2602]
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
---
|
||||
src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++-
|
||||
src/bin/keactrl/kea-dhcp4.conf.pre | 4 ++--
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre b/src/bin/keactrl/kea-ctrl-agent.conf.pre
|
||||
index e6ae8b8..50a3092 100644
|
||||
--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre
|
||||
+++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre
|
||||
@@ -51,7 +51,8 @@
|
||||
// Agent will fail to start.
|
||||
"hooks-libraries": [
|
||||
// {
|
||||
-// "library": "@libdir@/kea/hooks/control-agent-commands.so",
|
||||
+// // Replace $libdir with real library path /usr/lib or /usr/lib64
|
||||
+// "library": "$libdir/kea/hooks/control-agent-commands.so",
|
||||
// "parameters": {
|
||||
// "param1": "foo"
|
||||
// }
|
||||
diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre
|
||||
index 26bf163..49ddb0a 100644
|
||||
--- a/src/bin/keactrl/kea-dhcp4.conf.pre
|
||||
+++ b/src/bin/keactrl/kea-dhcp4.conf.pre
|
||||
@@ -252,7 +252,7 @@
|
||||
// // of all devices serviced by Kea, including their identifiers
|
||||
// // (like MAC address), their location in the network, times
|
||||
// // when they were active etc.
|
||||
- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so",
|
||||
+ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so",
|
||||
// "parameters": {
|
||||
// "path": "/var/lib/kea",
|
||||
// "base-name": "kea-forensic4"
|
||||
@@ -269,7 +269,7 @@
|
||||
// // of specific options or perhaps even a combination of several
|
||||
// // options and fields to uniquely identify a client. Those scenarios
|
||||
// // are addressed by the Flexible Identifiers hook application.
|
||||
- // "library": "@libdir@/kea/hooks/libdhcp_flex_id.so",
|
||||
+ // "library": "$libdir/kea/hooks/libdhcp_flex_id.so",
|
||||
// "parameters": {
|
||||
// "identifier-expression": "relay4[2].hex"
|
||||
// }
|
||||
@@ -0,0 +1,29 @@
|
||||
From 18f4f6206c248d6169aa67b3ecf16bf54e9292e8 Mon Sep 17 00:00:00 2001
|
||||
From: Armin kuster <akuster808@gmail.com>
|
||||
Date: Wed, 14 Oct 2020 22:48:31 -0700
|
||||
Subject: [PATCH] Busybox does not support ps -p so use pgrep
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
|
||||
|
||||
Signed-off-by: Armin kuster <akuster808@gmail.com>
|
||||
|
||||
---
|
||||
src/bin/keactrl/keactrl.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
|
||||
index ae5bd8e..e9f9b73 100644
|
||||
--- a/src/bin/keactrl/keactrl.in
|
||||
+++ b/src/bin/keactrl/keactrl.in
|
||||
@@ -151,8 +151,8 @@ check_running() {
|
||||
# Get the PID from the PID file (if it exists)
|
||||
get_pid_from_file "${proc_name}"
|
||||
if [ ${_pid} -gt 0 ]; then
|
||||
- # Use ps to check if PID is alive
|
||||
- if ps -p ${_pid} 1>/dev/null; then
|
||||
+ # Use pgrep and grep to check if PID is alive
|
||||
+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then
|
||||
# No error, so PID IS ALIVE
|
||||
_running=1
|
||||
fi
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: kea-dhcp-ddns-server
|
||||
# Required-Start: $local_fs $network $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $network $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: ISC KEA DHCP IPv6 Server
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="kea-dhcp-ddns-server"
|
||||
NAME=kea-dhcp-ddns
|
||||
DAEMON=/usr/sbin/keactrl
|
||||
DAEMON_ARGS=" -s dhcp_ddns"
|
||||
|
||||
set -e
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
kpid=`pidof $NAME`
|
||||
kill $kpid
|
||||
echo "done."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Kea DHCP-DDNS Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea
|
||||
ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: kea-dhcp4-server
|
||||
# Required-Start: $local_fs $network $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $network $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: ISC KEA DHCP IPv6 Server
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="kea-dhcp4-server"
|
||||
NAME=kea-dhcp4
|
||||
DAEMON=/usr/sbin/keactrl
|
||||
DAEMON_ARGS=" -s dhcp4"
|
||||
|
||||
set -e
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
kpid=`pidof $NAME`
|
||||
kill $kpid
|
||||
echo "done."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Kea DHCPv4 Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
|
||||
ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: kea-dhcp6-server
|
||||
# Required-Start: $local_fs $network $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $network $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: ISC KEA DHCP IPv6 Server
|
||||
### END INIT INFO
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="kea-dhcp6-server"
|
||||
NAME=kea-dhcp6
|
||||
DAEMON=/usr/sbin/keactrl
|
||||
DAEMON_ARGS=" -s dhcp6"
|
||||
|
||||
set -e
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
kpid=`pidof $NAME`
|
||||
kill $kpid
|
||||
echo "done."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Kea DHCPv6 Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
|
||||
ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,77 @@
|
||||
SUMMARY = "ISC Kea DHCP Server"
|
||||
DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS."
|
||||
HOMEPAGE = "http://kea.isc.org"
|
||||
SECTION = "connectivity"
|
||||
LICENSE = "MPL-2.0"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=97ce14bdd2733f5b84ab5e29380d057d"
|
||||
|
||||
DEPENDS = "boost log4cplus openssl"
|
||||
|
||||
SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
|
||||
file://kea-dhcp4.service \
|
||||
file://kea-dhcp6.service \
|
||||
file://kea-dhcp-ddns.service \
|
||||
file://kea-dhcp4-server \
|
||||
file://kea-dhcp6-server \
|
||||
file://kea-dhcp-ddns-server \
|
||||
file://fix-multilib-conflict.patch \
|
||||
file://fix_pid_keactrl.patch \
|
||||
file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "da7d90ca62a772602dac6e77e507319038422895ad68eeb142f1487d67d531d2"
|
||||
|
||||
inherit autotools systemd update-rc.d upstream-version-is-even
|
||||
|
||||
INITSCRIPT_NAME = "kea-dhcp4-server"
|
||||
INITSCRIPT_PARAMS = "defaults 30"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
DEBUG_OPTIMIZATION:remove:mips = " -Og"
|
||||
DEBUG_OPTIMIZATION:append:mips = " -O"
|
||||
BUILD_OPTIMIZATION:remove:mips = " -Og"
|
||||
BUILD_OPTIMIZATION:append:mips = " -O"
|
||||
|
||||
DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
|
||||
DEBUG_OPTIMIZATION:append:mipsel = " -O"
|
||||
BUILD_OPTIMIZATION:remove:mipsel = " -Og"
|
||||
BUILD_OPTIMIZATION:append:mipsel = " -O"
|
||||
|
||||
EXTRA_OECONF = "--with-boost-libs=-lboost_system \
|
||||
--with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
|
||||
--with-openssl=${STAGING_DIR_TARGET}${prefix}"
|
||||
|
||||
do_configure:prepend() {
|
||||
# replace abs_top_builddir to avoid introducing the build path
|
||||
# don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
|
||||
find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
|
||||
sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
|
||||
}
|
||||
|
||||
# patch out build host paths for reproducibility
|
||||
do_compile:prepend:class-target() {
|
||||
sed -i -e "s,${WORKDIR},,g" ${B}/config.report
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
|
||||
install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
|
||||
install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
|
||||
-e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
rm -rf "${D}${localstatedir}"
|
||||
}
|
||||
|
||||
CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
|
||||
|
||||
FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
|
||||
FILES:${PN} += "${libdir}/hooks/*.so"
|
||||
|
||||
PARALLEL_MAKEINST = ""
|
||||
@@ -0,0 +1,39 @@
|
||||
SUMMARY = "Name Service Switch module for Multicast DNS (zeroconf) name resolution"
|
||||
HOMEPAGE = "https://github.com/lathiat/nss-mdns"
|
||||
DESCRIPTION = "nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local."
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "LGPL-2.1-or-later"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
DEPENDS = "avahi"
|
||||
|
||||
SRC_URI = "git://github.com/lathiat/nss-mdns;branch=master;protocol=https \
|
||||
"
|
||||
|
||||
SRCREV = "4b3cfe818bf72d99a02b8ca8b8813cb2d6b40633"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
COMPATIBLE_HOST:libc-musl = 'null'
|
||||
|
||||
EXTRA_OECONF = "--libdir=${base_libdir}"
|
||||
|
||||
RDEPENDS:${PN} = "avahi-daemon"
|
||||
|
||||
pkg_postinst:${PN} () {
|
||||
sed '
|
||||
/^hosts:/ !b
|
||||
/\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
|
||||
s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
|
||||
' -i $D${sysconfdir}/nsswitch.conf
|
||||
}
|
||||
|
||||
pkg_prerm:${PN} () {
|
||||
sed '
|
||||
/^hosts:/ !b
|
||||
s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
|
||||
' -i $D${sysconfdir}/nsswitch.conf
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
SUMMARY = "Interface for user-level network packet capture"
|
||||
DESCRIPTION = "Libpcap provides a portable framework for low-level network \
|
||||
monitoring. Libpcap can provide network statistics collection, \
|
||||
security monitoring and network debugging."
|
||||
HOMEPAGE = "http://www.tcpdump.org/"
|
||||
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
|
||||
SECTION = "libs/network"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \
|
||||
file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
|
||||
DEPENDS = "flex-native bison-native"
|
||||
|
||||
SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz"
|
||||
SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f"
|
||||
|
||||
inherit autotools binconfig-disabled pkgconfig
|
||||
|
||||
BINCONFIG = "${bindir}/pcap-config"
|
||||
|
||||
# Explicitly disable dag support. We don't have recipe for it and if enabled here,
|
||||
# configure script poisons the include dirs with /usr/local/include even when the
|
||||
# support hasn't been detected. Do the same thing for DPDK.
|
||||
EXTRA_OECONF = " \
|
||||
--with-pcap=linux \
|
||||
--without-dag \
|
||||
--without-dpdk \
|
||||
"
|
||||
EXTRA_AUTORECONF += "--exclude=aclocal"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
|
||||
"
|
||||
PACKAGECONFIG[bluez5] = "--enable-bluetooth,--disable-bluetooth,bluez5"
|
||||
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
|
||||
PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
|
||||
|
||||
do_configure:prepend () {
|
||||
#remove hardcoded references to /usr/include
|
||||
sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.ac
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,22 @@
|
||||
SUMMARY = "A multi-platform support library with a focus on asynchronous I/O"
|
||||
HOMEPAGE = "https://github.com/libuv/libuv"
|
||||
DESCRIPTION = "libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others."
|
||||
BUGTRACKER = "https://github.com/libuv/libuv/issues"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=74b6f2f7818a4e3a80d03556f71b129b \
|
||||
file://LICENSE-extra;md5=f9307417749e19bd1d6d68a394b49324"
|
||||
|
||||
SRCREV = "f0bb7e40f0508bedf6fad33769b3f87bb8aedfa6"
|
||||
SRC_URI = "git://github.com/libuv/libuv.git;branch=v1.x;protocol=https"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
|
||||
do_configure() {
|
||||
${S}/autogen.sh || bbnote "${PN} failed to autogen.sh"
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "Mobile Broadband Service Provider Database"
|
||||
HOMEPAGE = "http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders"
|
||||
DESCRIPTION = "Mobile Broadband Service Provider Database stores service provider specific information. When this Database is available the information can be fetched there"
|
||||
SECTION = "network"
|
||||
LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
|
||||
|
||||
SRCREV = "aae7c68671d225e6d35224613d5b98192b9b2ffe"
|
||||
PV = "20230416"
|
||||
PE = "1"
|
||||
|
||||
SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
|
||||
DEPENDS += "libxslt-native"
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From affaa2021a54c30353e4e1fee09c13a4de2196be Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
Date: Fri, 17 Mar 2017 14:24:29 +0200
|
||||
Subject: [PATCH] Add header dependency to nciattach.o
|
||||
|
||||
This can happen when compiling nciattach.o:
|
||||
|
||||
| In file included from ../neard-0.16/tools/nciattach.c:47:0:
|
||||
| ../neard-0.16/src/near.h:30:27: fatal error: near/nfc_copy.h: No such
|
||||
file or directory
|
||||
| #include <near/nfc_copy.h>
|
||||
|
||||
Add the missing dependency to local headers.
|
||||
|
||||
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
Upstream-Status: Submitted [mailinglist]
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index fa552ee..acef6ba 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -253,6 +253,7 @@ se/builtin.h: src/genbuiltin $(builtin_se_sources)
|
||||
|
||||
$(src_neard_OBJECTS) \
|
||||
$(tools_nfctool_nfctool_OBJECTS) \
|
||||
+$(tools_nciattach_OBJECTS) \
|
||||
$(plugin_objects) \
|
||||
$(se_seeld_OBJECTS) \
|
||||
$(unit_test_ndef_parse_OBJECTS) \
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From bfd32d68cfc9f1e31dab88e07446d1c02bc80b5e Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Thu, 12 Feb 2015 00:39:29 -0800
|
||||
Subject: [PATCH] Makefile.am: do not ship version.h
|
||||
|
||||
The HEADERS' name has been changed to pkginclude_HEADERS, so use
|
||||
nodist_pkginclude_HEADERS, otherwise version.h would be shipped.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
Makefile.am | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 3334790..69cd58f 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -10,11 +10,11 @@ pkginclude_HEADERS = include/types.h include/log.h include/plugin.h \
|
||||
include/tlv.h include/setting.h include/device.h \
|
||||
include/nfc_copy.h include/snep.h
|
||||
|
||||
-nodist_include_HEADERS = include/version.h
|
||||
+nodist_pkginclude_HEADERS = include/version.h
|
||||
|
||||
noinst_HEADERS = include/dbus.h
|
||||
|
||||
-local_headers = $(foreach file,$(pkginclude_HEADERS) $(nodist_include_HEADERS) \
|
||||
+local_headers = $(foreach file,$(pkginclude_HEADERS) $(nodist_pkginclude_HEADERS) \
|
||||
$(noinst_HEADERS), include/near/$(notdir $(file)))
|
||||
|
||||
gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 43acc56d5506c7e318f717fb3634bc16e3438913 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Thu, 15 Jan 2015 18:12:07 -0800
|
||||
Subject: [PATCH] Makefile.am: fix parallel issue
|
||||
|
||||
There might be no src dir if src/builtin.h runs earlier, create it to
|
||||
fix the race issue:
|
||||
|
||||
src/genbuiltin nfctype1 nfctype2 nfctype3 nfctype4 p2p > src/builtin.h
|
||||
/bin/sh: src/builtin.h: No such file or directory
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: neard-0.16/Makefile.am
|
||||
===================================================================
|
||||
--- neard-0.16.orig/Makefile.am
|
||||
+++ neard-0.16/Makefile.am
|
||||
@@ -244,6 +244,7 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(di
|
||||
src/plugin.$(OBJEXT): src/builtin.h
|
||||
|
||||
src/builtin.h: src/genbuiltin $(builtin_sources)
|
||||
+ $(AM_V_at)$(MKDIR_P) src
|
||||
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
|
||||
|
||||
se/plugin.$(OBJEXT): se/builtin.h
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# start/stop neard daemon.
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: neard
|
||||
# Required-Start: $network
|
||||
# Required-Stop: $network
|
||||
# Default-Start: S 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: NFC daemon
|
||||
# Description: neard is a daemon used to enable NFC features
|
||||
### END INIT INFO
|
||||
|
||||
DAEMON=@installpath@/neard
|
||||
PIDFILE=/var/run/neard.pid
|
||||
DESC="Linux NFC daemon"
|
||||
|
||||
if [ -f /etc/default/neard ] ; then
|
||||
. /etc/default/neard
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
do_start() {
|
||||
$DAEMON
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
start-stop-daemon --stop --name neard --quiet
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC"
|
||||
do_start
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $DESC"
|
||||
do_stop
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo "Restarting $DESC"
|
||||
do_stop
|
||||
sleep 1
|
||||
do_start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,51 @@
|
||||
SUMMARY = "Linux NFC daemon"
|
||||
DESCRIPTION = "A daemon for the Linux Near Field Communication stack"
|
||||
HOMEPAGE = "http://01.org/linux-nfc"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
|
||||
"
|
||||
|
||||
DEPENDS = "dbus glib-2.0 libnl autoconf-archive-native"
|
||||
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=https;branch=master \
|
||||
file://neard.in \
|
||||
file://Makefile.am-fix-parallel-issue.patch \
|
||||
file://Makefile.am-do-not-ship-version.h.patch \
|
||||
file://0001-Add-header-dependency-to-nciattach.o.patch \
|
||||
"
|
||||
|
||||
SRCREV = "c781008d3786e03173f0a0f5dfcc0545c787d7fc"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig systemd update-rc.d
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
|
||||
|
||||
PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}/ --with-systemduserunitdir=${systemd_unitdir}/user/,--disable-systemd"
|
||||
|
||||
EXTRA_OECONF += "--enable-tools"
|
||||
|
||||
# This would copy neard start-stop shell and test scripts
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \
|
||||
> ${D}${sysconfdir}/init.d/neard
|
||||
chmod 0755 ${D}${sysconfdir}/init.d/neard
|
||||
fi
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "dbus"
|
||||
|
||||
# Bluez & Wifi are not mandatory except for handover
|
||||
RRECOMMENDS:${PN} = "\
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
|
||||
"
|
||||
|
||||
INITSCRIPT_NAME = "neard"
|
||||
INITSCRIPT_PARAMS = "defaults 64"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "neard.service"
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
From 690a90a5b7786e40b5447ad7c5f19a7657d27405 Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <Mingli.Yu@windriver.com>
|
||||
Date: Fri, 14 Dec 2018 17:44:32 +0800
|
||||
Subject: [PATCH] Makefile.am: fix undefined function for libnsm.a
|
||||
|
||||
The source file of libnsm.a uses some function
|
||||
in ../support/misc/file.c, add ../support/misc/file.c
|
||||
to libnsm_a_SOURCES to fix build error when run
|
||||
"make -C tests statdb_dump":
|
||||
| ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname':
|
||||
| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
|
||||
| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
|
||||
| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname'
|
||||
| ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames':
|
||||
| /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:280: undefined reference to `generic_setup_basedir'
|
||||
| collect2: error: ld returned 1 exit status
|
||||
|
||||
As there is already one source file named file.c
|
||||
as support/nsm/file.c in support/nsm/Makefile.am,
|
||||
so rename ../support/misc/file.c to ../support/misc/misc.c.
|
||||
|
||||
Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=154502780423058&w=2]
|
||||
|
||||
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
|
||||
|
||||
Rebase it.
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
support/misc/Makefile.am | 2 +-
|
||||
support/misc/file.c | 115 ---------------------------------------------------------------------------------------------------------------
|
||||
support/misc/misc.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
support/nsm/Makefile.am | 2 +-
|
||||
4 files changed, 113 insertions(+), 117 deletions(-)
|
||||
|
||||
diff --git a/support/misc/Makefile.am b/support/misc/Makefile.am
|
||||
index f9993e3..8b0e9db 100644
|
||||
--- a/support/misc/Makefile.am
|
||||
+++ b/support/misc/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
noinst_LIBRARIES = libmisc.a
|
||||
-libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c file.c \
|
||||
+libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c misc.c \
|
||||
nfsd_path.c workqueue.c xstat.c
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
diff --git a/support/misc/file.c b/support/misc/file.c
|
||||
deleted file mode 100644
|
||||
index 06f6bb2..0000000
|
||||
--- a/support/misc/file.c
|
||||
+++ /dev/null
|
||||
@@ -1,115 +0,0 @@
|
||||
-/*
|
||||
- * Copyright 2009 Oracle. All rights reserved.
|
||||
- * Copyright 2017 Red Hat, Inc. All rights reserved.
|
||||
- *
|
||||
- * This file is part of nfs-utils.
|
||||
- *
|
||||
- * nfs-utils 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; either version 2 of the License, or
|
||||
- * (at your option) any later version.
|
||||
- *
|
||||
- * nfs-utils is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License
|
||||
- * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
|
||||
- */
|
||||
-
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-#include <config.h>
|
||||
-#endif
|
||||
-
|
||||
-#include <sys/stat.h>
|
||||
-
|
||||
-#include <string.h>
|
||||
-#include <libgen.h>
|
||||
-#include <stdio.h>
|
||||
-#include <errno.h>
|
||||
-#include <dirent.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <stdbool.h>
|
||||
-#include <limits.h>
|
||||
-
|
||||
-#include "xlog.h"
|
||||
-#include "misc.h"
|
||||
-
|
||||
-/*
|
||||
- * Returns a dynamically allocated, '\0'-terminated buffer
|
||||
- * containing an appropriate pathname, or NULL if an error
|
||||
- * occurs. Caller must free the returned result with free(3).
|
||||
- */
|
||||
-__attribute__((__malloc__))
|
||||
-char *
|
||||
-generic_make_pathname(const char *base, const char *leaf)
|
||||
-{
|
||||
- size_t size;
|
||||
- char *path;
|
||||
- int len;
|
||||
-
|
||||
- size = strlen(base) + strlen(leaf) + 2;
|
||||
- if (size > PATH_MAX)
|
||||
- return NULL;
|
||||
-
|
||||
- path = malloc(size);
|
||||
- if (path == NULL)
|
||||
- return NULL;
|
||||
-
|
||||
- len = snprintf(path, size, "%s/%s", base, leaf);
|
||||
- if ((len < 0) || ((size_t)len >= size)) {
|
||||
- free(path);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- return path;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- * generic_setup_basedir - set up basedir
|
||||
- * @progname: C string containing name of program, for error messages
|
||||
- * @parentdir: C string containing pathname to on-disk state, or NULL
|
||||
- * @base: character buffer to contain the basedir that is set up
|
||||
- * @baselen: size of @base in bytes
|
||||
- *
|
||||
- * This runs before logging is set up, so error messages are directed
|
||||
- * to stderr.
|
||||
- *
|
||||
- * Returns true and sets up our basedir, if @parentdir was valid
|
||||
- * and usable; otherwise false is returned.
|
||||
- */
|
||||
-_Bool
|
||||
-generic_setup_basedir(const char *progname, const char *parentdir, char *base,
|
||||
- const size_t baselen)
|
||||
-{
|
||||
- static char buf[PATH_MAX];
|
||||
- struct stat st;
|
||||
- char *path;
|
||||
-
|
||||
- /* First: test length of name and whether it exists */
|
||||
- if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) {
|
||||
- (void)fprintf(stderr, "%s: Directory name too long: %s",
|
||||
- progname, parentdir);
|
||||
- return false;
|
||||
- }
|
||||
- if (lstat(parentdir, &st) == -1) {
|
||||
- (void)fprintf(stderr, "%s: Failed to stat %s: %s",
|
||||
- progname, parentdir, strerror(errno));
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- /* Ensure we have a clean directory pathname */
|
||||
- strncpy(buf, parentdir, sizeof(buf)-1);
|
||||
- path = dirname(buf);
|
||||
- if (*path == '.') {
|
||||
- (void)fprintf(stderr, "%s: Unusable directory %s",
|
||||
- progname, parentdir);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- xlog(D_CALL, "Using %s as the state directory", parentdir);
|
||||
- strcpy(base, parentdir);
|
||||
- return true;
|
||||
-}
|
||||
diff --git a/support/misc/misc.c b/support/misc/misc.c
|
||||
new file mode 100644
|
||||
index 0000000..e7c3819
|
||||
--- /dev/null
|
||||
+++ b/support/misc/misc.c
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright 2009 Oracle. All rights reserved.
|
||||
+ * Copyright 2017 Red Hat, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This file is part of nfs-utils.
|
||||
+ *
|
||||
+ * nfs-utils 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; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * nfs-utils is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
+#include <string.h>
|
||||
+#include <libgen.h>
|
||||
+#include <stdio.h>
|
||||
+#include <errno.h>
|
||||
+#include <dirent.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdbool.h>
|
||||
+#include <limits.h>
|
||||
+
|
||||
+#include "xlog.h"
|
||||
+#include "misc.h"
|
||||
+
|
||||
+/*
|
||||
+ * Returns a dynamically allocated, '\0'-terminated buffer
|
||||
+ * containing an appropriate pathname, or NULL if an error
|
||||
+ * occurs. Caller must free the returned result with free(3).
|
||||
+ */
|
||||
+__attribute__((__malloc__))
|
||||
+char *
|
||||
+generic_make_pathname(const char *base, const char *leaf)
|
||||
+{
|
||||
+ size_t size;
|
||||
+ char *path;
|
||||
+ int len;
|
||||
+
|
||||
+ size = strlen(base) + strlen(leaf) + 2;
|
||||
+ if (size > PATH_MAX)
|
||||
+ return NULL;
|
||||
+
|
||||
+ path = malloc(size);
|
||||
+ if (path == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ len = snprintf(path, size, "%s/%s", base, leaf);
|
||||
+ if ((len < 0) || ((size_t)len >= size)) {
|
||||
+ free(path);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return path;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * generic_setup_basedir - set up basedir
|
||||
+ * @progname: C string containing name of program, for error messages
|
||||
+ * @parentdir: C string containing pathname to on-disk state, or NULL
|
||||
+ * @base: character buffer to contain the basedir that is set up
|
||||
+ * @baselen: size of @base in bytes
|
||||
+ *
|
||||
+ * This runs before logging is set up, so error messages are directed
|
||||
+ * to stderr.
|
||||
+ *
|
||||
+ * Returns true and sets up our basedir, if @parentdir was valid
|
||||
+ * and usable; otherwise false is returned.
|
||||
+ */
|
||||
+_Bool
|
||||
+generic_setup_basedir(const char *progname, const char *parentdir, char *base,
|
||||
+ const size_t baselen)
|
||||
+{
|
||||
+ static char buf[PATH_MAX];
|
||||
+ struct stat st;
|
||||
+ char *path;
|
||||
+
|
||||
+ /* First: test length of name and whether it exists */
|
||||
+ if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) {
|
||||
+ (void)fprintf(stderr, "%s: Directory name too long: %s",
|
||||
+ progname, parentdir);
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (lstat(parentdir, &st) == -1) {
|
||||
+ (void)fprintf(stderr, "%s: Failed to stat %s: %s",
|
||||
+ progname, parentdir, strerror(errno));
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* Ensure we have a clean directory pathname */
|
||||
+ strncpy(buf, parentdir, sizeof(buf)-1);
|
||||
+ path = dirname(buf);
|
||||
+ if (*path == '.') {
|
||||
+ (void)fprintf(stderr, "%s: Unusable directory %s",
|
||||
+ progname, parentdir);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ xlog(D_CALL, "Using %s as the state directory", parentdir);
|
||||
+ strcpy(base, parentdir);
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/support/nsm/Makefile.am b/support/nsm/Makefile.am
|
||||
index 8f5874e..68f1a46 100644
|
||||
--- a/support/nsm/Makefile.am
|
||||
+++ b/support/nsm/Makefile.am
|
||||
@@ -10,7 +10,7 @@ GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
|
||||
EXTRA_DIST = sm_inter.x
|
||||
|
||||
noinst_LIBRARIES = libnsm.a
|
||||
-libnsm_a_SOURCES = $(GENFILES) file.c rpc.c
|
||||
+libnsm_a_SOURCES = $(GENFILES) ../misc/misc.c file.c rpc.c
|
||||
|
||||
BUILT_SOURCES = $(GENFILES)
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
From e89652b853ca7de671093ae44305fa3435e13d3d Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 15 Dec 2022 13:29:43 -0800
|
||||
Subject: [PATCH] Replace statfs64 with statfs
|
||||
|
||||
autoconf AC_SYS_LARGEFILE is used by configure to add needed defines
|
||||
when needed for enabling 64bit off_t, therefore replacing statfs64 with
|
||||
statfs should be functionally same. Additionally this helps compiling
|
||||
with latest musl where 64bit LFS functions like statfs64 and friends are
|
||||
now moved under _LARGEFILE64_SOURCE feature test macro, this works on
|
||||
glibc systems because _GNU_SOURCE macros also enables
|
||||
_LARGEFILE64_SOURCE indirectly. This is not case with musl and this
|
||||
latest issue is exposed.
|
||||
|
||||
Upstream-Status: Submitted [https://lore.kernel.org/linux-nfs/20221215213605.4061853-1-raj.khem@gmail.com/T/#u]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
support/export/cache.c | 14 +++++++-------
|
||||
support/include/nfsd_path.h | 6 +++---
|
||||
support/misc/nfsd_path.c | 24 ++++++++++++------------
|
||||
utils/exportfs/exportfs.c | 4 ++--
|
||||
4 files changed, 24 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/support/export/cache.c b/support/export/cache.c
|
||||
index a5823e9..2497d4f 100644
|
||||
--- a/support/export/cache.c
|
||||
+++ b/support/export/cache.c
|
||||
@@ -346,27 +346,27 @@ static int uuid_by_path(char *path, int type, size_t uuidlen, char *uuid)
|
||||
|
||||
/* Possible sources of uuid are
|
||||
* - blkid uuid
|
||||
- * - statfs64 uuid
|
||||
+ * - statfs uuid
|
||||
*
|
||||
- * On some filesystems (e.g. vfat) the statfs64 uuid is simply an
|
||||
+ * On some filesystems (e.g. vfat) the statfs uuid is simply an
|
||||
* encoding of the device that the filesystem is mounted from, so
|
||||
* it we be very bad to use that (as device numbers change). blkid
|
||||
* must be preferred.
|
||||
- * On other filesystems (e.g. btrfs) the statfs64 uuid contains
|
||||
+ * On other filesystems (e.g. btrfs) the statfs uuid contains
|
||||
* important info that the blkid uuid cannot contain: This happens
|
||||
* when multiple subvolumes are exported (they have the same
|
||||
- * blkid uuid but different statfs64 uuids).
|
||||
+ * blkid uuid but different statfs uuids).
|
||||
* We rely on get_uuid_blkdev *knowing* which is which and not returning
|
||||
- * a uuid for filesystems where the statfs64 uuid is better.
|
||||
+ * a uuid for filesystems where the statfs uuid is better.
|
||||
*
|
||||
*/
|
||||
- struct statfs64 st;
|
||||
+ struct statfs st;
|
||||
char fsid_val[17];
|
||||
const char *blkid_val = NULL;
|
||||
const char *val;
|
||||
int rc;
|
||||
|
||||
- rc = nfsd_path_statfs64(path, &st);
|
||||
+ rc = nfsd_path_statfs(path, &st);
|
||||
|
||||
if (type == 0 && rc == 0) {
|
||||
const unsigned long *bad;
|
||||
diff --git a/support/include/nfsd_path.h b/support/include/nfsd_path.h
|
||||
index 3b73aad..aa1e1dd 100644
|
||||
--- a/support/include/nfsd_path.h
|
||||
+++ b/support/include/nfsd_path.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
struct file_handle;
|
||||
-struct statfs64;
|
||||
+struct statfs;
|
||||
|
||||
void nfsd_path_init(void);
|
||||
|
||||
@@ -18,8 +18,8 @@ char * nfsd_path_prepend_dir(const char *dir, const char *pathname);
|
||||
int nfsd_path_stat(const char *pathname, struct stat *statbuf);
|
||||
int nfsd_path_lstat(const char *pathname, struct stat *statbuf);
|
||||
|
||||
-int nfsd_path_statfs64(const char *pathname,
|
||||
- struct statfs64 *statbuf);
|
||||
+int nfsd_path_statfs(const char *pathname,
|
||||
+ struct statfs *statbuf);
|
||||
|
||||
char * nfsd_realpath(const char *path, char *resolved_path);
|
||||
|
||||
diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c
|
||||
index 65e53c1..c3dea4f 100644
|
||||
--- a/support/misc/nfsd_path.c
|
||||
+++ b/support/misc/nfsd_path.c
|
||||
@@ -184,46 +184,46 @@ nfsd_path_lstat(const char *pathname, struct stat *statbuf)
|
||||
return nfsd_run_stat(nfsd_wq, nfsd_lstatfunc, pathname, statbuf);
|
||||
}
|
||||
|
||||
-struct nfsd_statfs64_data {
|
||||
+struct nfsd_statfs_data {
|
||||
const char *pathname;
|
||||
- struct statfs64 *statbuf;
|
||||
+ struct statfs *statbuf;
|
||||
int ret;
|
||||
int err;
|
||||
};
|
||||
|
||||
static void
|
||||
-nfsd_statfs64func(void *data)
|
||||
+nfsd_statfsfunc(void *data)
|
||||
{
|
||||
- struct nfsd_statfs64_data *d = data;
|
||||
+ struct nfsd_statfs_data *d = data;
|
||||
|
||||
- d->ret = statfs64(d->pathname, d->statbuf);
|
||||
+ d->ret = statfs(d->pathname, d->statbuf);
|
||||
if (d->ret < 0)
|
||||
d->err = errno;
|
||||
}
|
||||
|
||||
static int
|
||||
-nfsd_run_statfs64(struct xthread_workqueue *wq,
|
||||
+nfsd_run_statfs(struct xthread_workqueue *wq,
|
||||
const char *pathname,
|
||||
- struct statfs64 *statbuf)
|
||||
+ struct statfs *statbuf)
|
||||
{
|
||||
- struct nfsd_statfs64_data data = {
|
||||
+ struct nfsd_statfs_data data = {
|
||||
pathname,
|
||||
statbuf,
|
||||
0,
|
||||
0
|
||||
};
|
||||
- xthread_work_run_sync(wq, nfsd_statfs64func, &data);
|
||||
+ xthread_work_run_sync(wq, nfsd_statfsfunc, &data);
|
||||
if (data.ret < 0)
|
||||
errno = data.err;
|
||||
return data.ret;
|
||||
}
|
||||
|
||||
int
|
||||
-nfsd_path_statfs64(const char *pathname, struct statfs64 *statbuf)
|
||||
+nfsd_path_statfs(const char *pathname, struct statfs *statbuf)
|
||||
{
|
||||
if (!nfsd_wq)
|
||||
- return statfs64(pathname, statbuf);
|
||||
- return nfsd_run_statfs64(nfsd_wq, pathname, statbuf);
|
||||
+ return statfs(pathname, statbuf);
|
||||
+ return nfsd_run_statfs(nfsd_wq, pathname, statbuf);
|
||||
}
|
||||
|
||||
struct nfsd_realpath_data {
|
||||
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
|
||||
index 0897b22..6d79a5b 100644
|
||||
--- a/utils/exportfs/exportfs.c
|
||||
+++ b/utils/exportfs/exportfs.c
|
||||
@@ -513,7 +513,7 @@ validate_export(nfs_export *exp)
|
||||
*/
|
||||
struct stat stb;
|
||||
char *path = exportent_realpath(&exp->m_export);
|
||||
- struct statfs64 stf;
|
||||
+ struct statfs stf;
|
||||
int fs_has_fsid = 0;
|
||||
|
||||
if (stat(path, &stb) < 0) {
|
||||
@@ -528,7 +528,7 @@ validate_export(nfs_export *exp)
|
||||
if (!can_test())
|
||||
return;
|
||||
|
||||
- if (!statfs64(path, &stf) &&
|
||||
+ if (!statfs(path, &stf) &&
|
||||
(stf.f_fsid.__val[0] || stf.f_fsid.__val[1]))
|
||||
fs_has_fsid = 1;
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From 887ecc7837962e9be77a4fea7d9122648f73a84a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 15 Aug 2022 14:47:53 -0700
|
||||
Subject: [PATCH] mountd: Check for return of stat function
|
||||
|
||||
simplify the check, stat() return 0 on success -1 on failure
|
||||
|
||||
Fixes clang reported errors e.g.
|
||||
|
||||
| v4clients.c:29:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
|
||||
| if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
|
||||
| ^ ~~
|
||||
|
||||
Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-nfs/patch/20220816024403.2694169-1-raj.khem@gmail.com/]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Cc: Konstantin Khorenko <khorenko@virtuozzo.com>
|
||||
Cc: Steve Dickson <steved@redhat.com>
|
||||
---
|
||||
support/export/v4clients.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/support/export/v4clients.c b/support/export/v4clients.c
|
||||
index 5f15b61..3230251 100644
|
||||
--- a/support/export/v4clients.c
|
||||
+++ b/support/export/v4clients.c
|
||||
@@ -26,7 +26,7 @@ void v4clients_init(void)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
- if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
|
||||
+ if (stat("/proc/fs/nfsd/clients", &sb) != 0 ||
|
||||
!S_ISDIR(sb.st_mode))
|
||||
return;
|
||||
if (clients_fd >= 0)
|
||||
@@ -0,0 +1,93 @@
|
||||
From cf0ffbb5c8fa167376926d12a63613f15aa7602f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 15 Aug 2022 14:50:15 -0700
|
||||
Subject: [PATCH] Fix function prototypes
|
||||
|
||||
Clang is now erroring out on functions with out parameter types
|
||||
|
||||
Fixes errors like
|
||||
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
|
||||
|
||||
Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-nfs/patch/20220816024403.2694169-2-raj.khem@gmail.com/]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
support/export/auth.c | 2 +-
|
||||
support/export/v4root.c | 2 +-
|
||||
support/export/xtab.c | 2 +-
|
||||
utils/exportfs/exportfs.c | 4 ++--
|
||||
utils/mount/network.c | 2 +-
|
||||
5 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/support/export/auth.c b/support/export/auth.c
|
||||
index 03ce4b8..2d7960f 100644
|
||||
--- a/support/export/auth.c
|
||||
+++ b/support/export/auth.c
|
||||
@@ -82,7 +82,7 @@ check_useipaddr(void)
|
||||
}
|
||||
|
||||
unsigned int
|
||||
-auth_reload()
|
||||
+auth_reload(void)
|
||||
{
|
||||
struct stat stb;
|
||||
static ino_t last_inode;
|
||||
diff --git a/support/export/v4root.c b/support/export/v4root.c
|
||||
index c12a7d8..fbb0ad5 100644
|
||||
--- a/support/export/v4root.c
|
||||
+++ b/support/export/v4root.c
|
||||
@@ -198,7 +198,7 @@ static int v4root_add_parents(nfs_export *exp)
|
||||
* looking for components of the v4 mount.
|
||||
*/
|
||||
void
|
||||
-v4root_set()
|
||||
+v4root_set(void)
|
||||
{
|
||||
nfs_export *exp;
|
||||
int i;
|
||||
diff --git a/support/export/xtab.c b/support/export/xtab.c
|
||||
index c888a80..e210ca9 100644
|
||||
--- a/support/export/xtab.c
|
||||
+++ b/support/export/xtab.c
|
||||
@@ -135,7 +135,7 @@ xtab_write(char *xtab, char *xtabtmp, char *lockfn, int is_export)
|
||||
}
|
||||
|
||||
int
|
||||
-xtab_export_write()
|
||||
+xtab_export_write(void)
|
||||
{
|
||||
return xtab_write(etab.statefn, etab.tmpfn, etab.lockfn, 1);
|
||||
}
|
||||
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
|
||||
index 6ba615d..0897b22 100644
|
||||
--- a/utils/exportfs/exportfs.c
|
||||
+++ b/utils/exportfs/exportfs.c
|
||||
@@ -69,14 +69,14 @@ static int _lockfd = -1;
|
||||
* need these additional lockfile() routines.
|
||||
*/
|
||||
static void
|
||||
-grab_lockfile()
|
||||
+grab_lockfile(void)
|
||||
{
|
||||
_lockfd = open(lockfile, O_CREAT|O_RDWR, 0666);
|
||||
if (_lockfd != -1)
|
||||
lockf(_lockfd, F_LOCK, 0);
|
||||
}
|
||||
static void
|
||||
-release_lockfile()
|
||||
+release_lockfile(void)
|
||||
{
|
||||
if (_lockfd != -1) {
|
||||
lockf(_lockfd, F_ULOCK, 0);
|
||||
diff --git a/utils/mount/network.c b/utils/mount/network.c
|
||||
index ed2f825..01ead49 100644
|
||||
--- a/utils/mount/network.c
|
||||
+++ b/utils/mount/network.c
|
||||
@@ -179,7 +179,7 @@ static const unsigned long probe_mnt3_only[] = {
|
||||
|
||||
static const unsigned int *nfs_default_proto(void);
|
||||
#ifdef MOUNT_CONFIG
|
||||
-static const unsigned int *nfs_default_proto()
|
||||
+static const unsigned int *nfs_default_proto(void)
|
||||
{
|
||||
extern unsigned long config_default_proto;
|
||||
/*
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
|
||||
Date: Wed, 17 Feb 2016 08:33:45 +0100
|
||||
Subject: bugfix: adjust statd service name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service'
|
||||
instead but forgot to update the mount.nfs helper 'start-statd' accordingly.
|
||||
|
||||
Upstream-Status: Inappropriate [other]
|
||||
|
||||
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
|
||||
|
||||
Rebase it.
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
utils/statd/start-statd | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/utils/statd/start-statd b/utils/statd/start-statd
|
||||
index af5c950..df9b9be 100755
|
||||
--- a/utils/statd/start-statd
|
||||
+++ b/utils/statd/start-statd
|
||||
@@ -28,10 +28,10 @@ fi
|
||||
# First try systemd if it's installed.
|
||||
if [ -d /run/systemd/system ]; then
|
||||
# Quit only if the call worked.
|
||||
- if systemctl start rpc-statd.service; then
|
||||
+ if systemctl start nfs-statd.service; then
|
||||
# Ensure systemd knows not to stop rpc.statd or its dependencies
|
||||
# on 'systemctl isolate ..'
|
||||
- systemctl add-wants --runtime remote-fs.target rpc-statd.service
|
||||
+ systemctl add-wants --runtime remote-fs.target nfs-statd.service
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,36 @@
|
||||
From 1ab0c326405c6daa06f1a7eb4b0b60bf4e0584c2 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 31 Dec 2019 08:15:34 -0800
|
||||
Subject: [PATCH] Detect warning options during configure
|
||||
|
||||
Certain options maybe compiler specific therefore its better
|
||||
to detect them before use.
|
||||
|
||||
nfs_error copies the format string and appends newline to it
|
||||
but compiler can forget that it was format string since its not
|
||||
same fmt string that was passed. Ignore the warning
|
||||
|
||||
Wdiscarded-qualifiers is gcc specific and this is no longer needed
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
support/nfs/xcommon.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/support/nfs/xcommon.c b/support/nfs/xcommon.c
|
||||
index 3989f0b..e080423 100644
|
||||
--- a/support/nfs/xcommon.c
|
||||
+++ b/support/nfs/xcommon.c
|
||||
@@ -98,7 +98,10 @@ nfs_error (const char *fmt, ...) {
|
||||
|
||||
fmt2 = xstrconcat2 (fmt, "\n");
|
||||
va_start (args, fmt);
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
vfprintf (stderr, fmt2, args);
|
||||
+#pragma GCC diagnostic pop
|
||||
va_end (args);
|
||||
free (fmt2);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=NFS Mount Daemon
|
||||
DefaultDependencies=no
|
||||
After=rpcbind.socket
|
||||
Requires=proc-fs-nfsd.mount
|
||||
After=proc-fs-nfsd.mount
|
||||
After=network.target local-fs.target
|
||||
BindsTo=nfs-server.service
|
||||
ConditionPathExists=@SYSCONFDIR@/exports
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
|
||||
ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS
|
||||
LimitNOFILE=@HIGH_RLIMIT_NOFILE@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=NFS server and services
|
||||
DefaultDependencies=no
|
||||
Requires=network.target proc-fs-nfsd.mount
|
||||
Requires=nfs-mountd.service
|
||||
Wants=rpcbind.service
|
||||
After=local-fs.target
|
||||
After=network.target proc-fs-nfsd.mount rpcbind.service nfs-mountd.service
|
||||
ConditionPathExists=@SYSCONFDIR@/exports
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
|
||||
ExecStartPre=@SBINDIR@/exportfs -r
|
||||
ExecStart=@SBINDIR@/rpc.nfsd $NFSD_OPTS $NFSD_COUNT
|
||||
ExecStop=@SBINDIR@/rpc.nfsd 0
|
||||
ExecStopPost=@SBINDIR@/exportfs -au
|
||||
ExecStopPost=@SBINDIR@/exportfs -f
|
||||
ExecReload=@SBINDIR@/exportfs -r
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=NFS status monitor for NFSv2/3 locking.
|
||||
DefaultDependencies=no
|
||||
Conflicts=umount.target
|
||||
Requires=nss-lookup.target rpcbind.service
|
||||
After=network.target nss-lookup.target rpcbind.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
|
||||
ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS
|
||||
LimitNOFILE=@HIGH_RLIMIT_NOFILE@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user