summaryrefslogtreecommitdiffstats
path: root/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-09-08 13:23:42 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-02-05 14:56:52 +0000
commit8bf3c50ab7eb48f8db63ea41d6a12e32f3633dee (patch)
treeacf5541f19ca2a40ef1361e0757485d91e0b05c6 /meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch
parentd369fae7ef2e0bcbd934c838145b08a443b414ff (diff)
Changes: - Mask out the duplicate libopus recipe, the same version is available from a recipe in meta-oe. - Update BBFILES addition for the audio module in the feature template to work with yet another new audio output backend. - Update the AlexaAutoCoreEngineConfig.json.in template based on the new sample JSON in 2.3. - Update alexa-voiceagent-config recipe to add new configuration variables ALEXA_LOCALE, ALEXA_TIMEZONE, ALEXA_MFG_NAME, and ALEXA_DESCRIPTION to match requirements of the updated configuration JSON. - Remove local alexa-voiceagent-service patches merged by Amazon, and update 0001-remove-library-dependency-copying.patch for 2.3. - Update SDK module DEPENDS for alexa-voiceagent-service recipe to match what seems required now with 2.3. - Remove avs-device-sdk patch for building with g++ 9.x, as it is no longer required. - Add avs-device-sdk patch to workaround hang seen on first connection. - Add bbappends for aac-module-car-control and aac-module-messaging recipes to fix their nlohmann-json DEPENDS to work with the recipe that is available in meta-oe. - Rework aac-module-system-audio.bbappend to enable the PipeWire support that has been merged into the module. Bug-AGL: SPEC-3783 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I18c910f9cbf874fef85d1d84508f6666d53629ed (cherry picked from commit e0d5ad833e89f47c88601e15158015319e568af8)
Diffstat (limited to 'meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch')
-rw-r--r--meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch124
1 files changed, 0 insertions, 124 deletions
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch
deleted file mode 100644
index 0bf4267f..00000000
--- a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service/0004-update-config-and-database-paths.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-alexa-voiceagent-service: update config and database file paths
-
-Tweak getDataRootPath in the AASBConfigProviderImpl class to use the
-AFM_WORKDIR environment variable as the basis for the path, which
-moves things from the binding installation hierarchy into the app
-framework's provided application data directory. This avoids the
-permissions problems stemming from the new security model of running
-as non-root. Also reworked the main configuration JSON file location
-logic to use a new helper member function that checks for the file
-in /etc/xdg/AGL and then in AFM_WORKDIR (app-data directory), before
-falling back to the original location in var/config under the binding
-installation directory. The local copy of GetBindingDirPath has been
-removed, as it seems to be working fine now that the binding is being
-built with AFB_BINDING_VERSION = 3.
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-
-diff --git a/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp b/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp
-index b51185c..5d5c3ba 100644
---- a/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp
-+++ b/src/plugins/aasb-client/config/AASBConfigProviderImpl.cpp
-@@ -19,6 +19,7 @@
- #include <iostream>
- #include <sstream>
- #include <unistd.h>
-+#include <sys/stat.h>
-
- #include <rapidjson/document.h>
- #include <rapidjson/istreamwrapper.h>
-@@ -36,6 +37,9 @@ using Level = agl::common::interfaces::ILogger::Level;
- /// Logging tag for this file.
- static std::string TAG = "agl::alexa::AASBConfigProviderImpl";
-
-+/// Directory where user over-ride alexa json configuration may be.
-+static std::string ALEXA_CONFIG_FILE_OVERRIDE_DIR = "/etc/xdg/AGL/";
-+
- /// File name where alexa json configuration is stored.
- static std::string ALEXA_CONFIG_FILE_NAME = "AlexaAutoCoreEngineConfig.json";
-
-@@ -64,8 +68,7 @@ AASBConfigProviderImpl::AASBConfigProviderImpl(std::shared_ptr<agl::common::inte
- m_enableLocalVoiceControl(false) {
- m_LocalVoiceControlConfiguration = std::unique_ptr<LVCConfiguration>(new LVCConfiguration());
- m_carControlConfiguration = std::unique_ptr<CarControlConfiguration>(new CarControlConfiguration());
-- std::string alexaConfigFile = getDataRootPath() + ALEXA_CONFIG_FILE_NAME;
-- initConfigFromFile(alexaConfigFile);
-+ initConfigFromFile(getAlexaConfigPath());
- logCurrentConfiguration();
- }
-
-@@ -520,32 +523,25 @@ void AASBConfigProviderImpl::initConfigFromFile(const std::string& fileName) {
- }
- }
-
--// GetBindingDirPath() method provided by AGL SDK crashes every single time.
--// It turns out that on latest AGL platforms, GetBindingDirPath(afb_api_t) version
--// is supposed to be the correct version. However when we include filescan-utils.h
--// it compiles a version without "afb_api_t" parameter. For now, I have made a
--// copy of this method here which accepts "afb_api_t" parameter.
--// TODO: Fix it
--std::string GetBindingDirectoryPath(afb_api_t api) {
-- // A file description should not be greater than 999.999.999
-- char fd_link[CONTROL_MAXPATH_LEN];
-- char retdir[CONTROL_MAXPATH_LEN];
-- ssize_t len;
-- sprintf(fd_link, "/proc/self/fd/%d", afb_dynapi_rootdir_get_fd(api));
--
-- if ((len = readlink(fd_link, retdir, sizeof(retdir) - 1)) == -1) {
-- perror("lstat");
-- strncpy(retdir, "/tmp", CONTROL_MAXPATH_LEN - 1);
-- } else {
-- retdir[len] = '\0';
-- }
--
-- return std::string(retdir);
-+std::string AASBConfigProviderImpl::getDataRootPath() {
-+ std::string workDir(getenv("AFM_WORKDIR"));
-+ return workDir + "/";
- }
-
--std::string AASBConfigProviderImpl::getDataRootPath() {
-- std::string bindingDir(GetBindingDirectoryPath(m_api));
-- return bindingDir + "/var/config/";
-+std::string AASBConfigProviderImpl::getAlexaConfigPath() {
-+ struct stat statbuf;
-+
-+ // Look in over-ride directory first
-+ std::string configPath = ALEXA_CONFIG_FILE_OVERRIDE_DIR + ALEXA_CONFIG_FILE_NAME;
-+ if(stat(configPath.c_str(), &statbuf) != 0) {
-+ // Look in work directory (app-data) next
-+ configPath = getDataRootPath() + ALEXA_CONFIG_FILE_NAME;
-+ if(stat(configPath.c_str(), &statbuf) != 0) {
-+ // Fall back to default version in widget
-+ configPath = std::string(GetBindingDirPath(m_api)) + "/var/config/" + ALEXA_CONFIG_FILE_NAME;
-+ }
-+ }
-+ return configPath;
- }
-
- void AASBConfigProviderImpl::logCurrentConfiguration() {
-diff --git a/src/plugins/aasb-client/config/AASBConfigProviderImpl.h b/src/plugins/aasb-client/config/AASBConfigProviderImpl.h
-index 6b79994..e32f7b7 100644
---- a/src/plugins/aasb-client/config/AASBConfigProviderImpl.h
-+++ b/src/plugins/aasb-client/config/AASBConfigProviderImpl.h
-@@ -87,6 +87,11 @@ private:
- */
- std::string getDataRootPath();
-
-+ /**
-+ * Provides the path where alexa json config resides.
-+ */
-+ std::string getAlexaConfigPath();
-+
- /**
- * Logs the current configuration loaded by this object.
- */
-@@ -139,4 +144,4 @@ private:
- } // namespace alexa
- } // namespace agl
-
--#endif // AGL_ALEXA_SVC_AASB_CONFIG_PROVIDER_IMPL_H_
-\ No newline at end of file
-+#endif // AGL_ALEXA_SVC_AASB_CONFIG_PROVIDER_IMPL_H_