mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-27 03:17:15 +00:00
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
103 lines
3.2 KiB
Diff
103 lines
3.2 KiB
Diff
From 2a0fe384eec254643ca2176ccfcbbd036a5aad06 Mon Sep 17 00:00:00 2001
|
|
From: Luca Ceresoli <luca@lucaceresoli.net>
|
|
Date: Tue, 14 Jul 2020 10:30:10 +0200
|
|
Subject: [PATCH] Fix build when SNMPv3 is disabled
|
|
|
|
agentpp has ifdefs to disable v3 code when SNMPv3 is disabled. However it
|
|
is missing one and it has a few ones in excess. Fix them.
|
|
|
|
Upstream is aware, says "will fix in later version", but thinks to make v3
|
|
mandatory. See discussion at
|
|
https://forum.snmp.app/t/agent-compile-fails-if-snmp-has-disable-snmpv3/326
|
|
|
|
Upstream status: none, upstream is not welcoming contributions.
|
|
|
|
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
|
|
---
|
|
include/agent_pp/notification_log_mib.h | 4 ++--
|
|
include/agent_pp/notification_originator.h | 2 ++
|
|
include/agent_pp/snmp_community_mib.h | 4 ++--
|
|
src/notification_originator.cpp | 2 ++
|
|
4 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/include/agent_pp/notification_log_mib.h b/include/agent_pp/notification_log_mib.h
|
|
index ddac05e515d9..8fd8cfec32ca 100644
|
|
--- a/include/agent_pp/notification_log_mib.h
|
|
+++ b/include/agent_pp/notification_log_mib.h
|
|
@@ -22,7 +22,7 @@
|
|
|
|
//--AgentGen BEGIN=_BEGIN
|
|
#include <agent_pp/agent++.h>
|
|
-#ifdef _SNMPv3
|
|
+// #ifdef _SNMPv3 // This file deos not look SNMPv3-specific
|
|
#include <agent_pp/mib_complex_entry.h>
|
|
//--AgentGen END
|
|
|
|
@@ -688,6 +688,6 @@ protected:
|
|
*/
|
|
|
|
|
|
-#endif
|
|
+// #endif // _SNMPv3
|
|
|
|
|
|
diff --git a/include/agent_pp/notification_originator.h b/include/agent_pp/notification_originator.h
|
|
index 95e8b4e1836d..6f50cd52625b 100644
|
|
--- a/include/agent_pp/notification_originator.h
|
|
+++ b/include/agent_pp/notification_originator.h
|
|
@@ -307,7 +307,9 @@ class AGENTPP_DECL NotificationOriginator: public NotificationSender {
|
|
*/
|
|
virtual nlmLogEntry* get_nlm_log_entry();
|
|
|
|
+#ifdef _SNMPv3
|
|
virtual v3MP* get_v3mp();
|
|
+#endif
|
|
|
|
protected:
|
|
|
|
diff --git a/include/agent_pp/snmp_community_mib.h b/include/agent_pp/snmp_community_mib.h
|
|
index 7d5c4558f36d..d9eb2b4a87ec 100644
|
|
--- a/include/agent_pp/snmp_community_mib.h
|
|
+++ b/include/agent_pp/snmp_community_mib.h
|
|
@@ -49,7 +49,7 @@ namespace Agentpp {
|
|
#define oidSnmpTrapAddress "1.3.6.1.6.3.18.1.3.0"
|
|
#define oidSnmpTrapCommunity "1.3.6.1.6.3.18.1.4.0"
|
|
|
|
-#ifdef _SNMPv3
|
|
+// #ifdef _SNMPv3 // This file deos not look SNMPv3-specific
|
|
|
|
/**
|
|
* snmpCommunityName
|
|
@@ -346,7 +346,7 @@ class AGENTPP_DECL snmp_community_mib: public MibGroup
|
|
static void add_public();
|
|
static void add_public(Mib* mib);
|
|
};
|
|
-#endif
|
|
+// #endif // _SNMPv3
|
|
|
|
#ifdef AGENTPP_NAMESPACE
|
|
}
|
|
diff --git a/src/notification_originator.cpp b/src/notification_originator.cpp
|
|
index d7d566869998..39ddbe08cdeb 100644
|
|
--- a/src/notification_originator.cpp
|
|
+++ b/src/notification_originator.cpp
|
|
@@ -237,6 +237,7 @@ nlmLogEntry* NotificationOriginator::get_nlm_log_entry() {
|
|
return nlmLogEntry::instance;
|
|
}
|
|
|
|
+#ifdef _SNMPv3
|
|
v3MP* NotificationOriginator::get_v3mp() {
|
|
if (mib) {
|
|
return mib->get_request_list()->get_v3mp();
|
|
@@ -244,6 +245,7 @@ v3MP* NotificationOriginator::get_v3mp() {
|
|
return v3MP::I;
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
|
|
bool NotificationOriginator::check_access(ListCursor<MibTableRow>& cur,
|
|
--
|
|
2.27.0
|
|
|