Skip to content

Commit eccee6c

Browse files
committed
Use aws-greengrass-sdk-lite repo with FetchContent
1 parent 72acd84 commit eccee6c

File tree

102 files changed

+136
-6101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+136
-6101
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ check_c_source_compiles(
277277
# Add components
278278
#
279279

280+
add_subdirectory(${ggl_sdk_SOURCE_DIR} ggl-sdk)
281+
target_include_directories(ggl-sdk INTERFACE ${ggl_sdk_SOURCE_DIR}/priv_include)
282+
280283
# Common setup for a GGL module
281284
function(ggl_init_module name)
282285
cmake_parse_arguments(PARSE_ARGV 1 COMP_ARG "" "SRCDIR" "INCDIRS;LIBS")

fc_deps.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
"url": "https://github.com/aws/SigV4-for-AWS-IoT-embedded-sdk.git",
1414
"rev": "f0409ced6c2c9430f0e972019b7e8f20bbf58f4e",
1515
"hash": "sha256-6is4ymM/Ct9JntgpFHF4Vlv5+GUwy0HZvEiEV+ALJkw="
16+
},
17+
"ggl_sdk": {
18+
"url": "https://github.com/aws-greengrass/aws-greengrass-sdk-lite.git",
19+
"rev": "f06f8e1e78e150172bbaa5386325e3918dfbc83e",
20+
"hash": "sha256-+yu8ciEmVv2rmSTy4iQqDcH3+yrugwZCF7ZBkAgVDAo="
1621
}
1722
}

misc/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ PTRACE
105105
Pypi
106106
pyproject
107107
respfd
108+
rlimits
108109
rodata
109110
rootca
110111
semp

modules/fleet-provisioning/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
ggl_init_module(
6-
fleet-provision LIBS ggl-sdk core-bus ggl-exec core-bus-gg-config
7-
core-bus-aws-iot-mqtt PkgConfig::openssl)
6+
fleet-provision
7+
LIBS ggl-sdk
8+
ggl-common
9+
core-bus
10+
ggl-exec
11+
core-bus-gg-config
12+
core-bus-aws-iot-mqtt
13+
PkgConfig::openssl)
814
target_compile_definitions(
915
fleet-provision
1016
PRIVATE "GGL_SYSTEMD_SYSTEM_USER=\"${GGL_SYSTEMD_SYSTEM_USER}\"")

modules/fleet-provisioning/bin/fleet-provisioning.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@
88
#include <ggl/error.h>
99
#include <ggl/exec.h>
1010
#include <ggl/log.h>
11+
#include <ggl/nucleus/init.h>
1112
#include <ggl/vector.h>
12-
#include <ggl/version.h>
1313
#include <sys/types.h>
1414
#include <stdint.h>
1515

16-
__attribute__((visibility("default"))) const char *argp_program_version
17-
= GGL_VERSION;
18-
1916
static char doc[] = "fleet provisioner -- Executable to automatically "
2017
"provision the device to AWS IOT core";
2118
static GglBuffer component_name = GGL_STR("fleet-provisioning");
@@ -128,6 +125,8 @@ int main(int argc, char **argv) {
128125
argp_parse(&argp, argc, argv, 0, 0, &args);
129126
args.iotcored_path = (char *) iotcored_path;
130127

128+
ggl_nucleus_init();
129+
131130
pid_t pid = -1;
132131
ret = run_fleet_prov(&args, &pid);
133132
if (ret != GGL_ERR_OK) {

modules/gg-fleet-statusd/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
ggl_init_module(
6-
gg-fleet-statusd LIBS ggl-sdk core-bus core-bus-gghealthd core-bus-gg-config
7-
core-bus-aws-iot-mqtt ggl-constants)
6+
gg-fleet-statusd
7+
LIBS ggl-sdk
8+
ggl-common
9+
core-bus
10+
core-bus-gghealthd
11+
core-bus-gg-config
12+
core-bus-aws-iot-mqtt
13+
ggl-constants)

modules/gg-fleet-statusd/bin/gg-fleet-statusd.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
#include "gg_fleet_statusd.h"
66
#include <ggl/error.h>
7-
#include <ggl/version.h>
8-
9-
__attribute__((visibility("default"))) const char *argp_program_version
10-
= GGL_VERSION;
7+
#include <ggl/nucleus/init.h>
118

129
int main(int argc, char **argv) {
1310
(void) argc;
1411
(void) argv;
1512

13+
ggl_nucleus_init();
14+
1615
GglError ret = run_gg_fleet_statusd();
1716
if (ret != GGL_ERR_OK) {
1817
return 1;

modules/gg-fleet-statusd/src/fleet_status_service.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <ggl/nucleus/constants.h>
1919
#include <ggl/object.h>
2020
#include <ggl/vector.h>
21-
#include <ggl/version.h>
2221
#include <limits.h>
2322
#include <pthread.h>
2423
#include <string.h>

modules/ggconfigd/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: Apache-2.0
44

5-
ggl_init_module(ggconfigd LIBS ggl-sdk core-bus core-bus-gg-config ggl-yaml
6-
PkgConfig::sqlite3)
5+
ggl_init_module(ggconfigd LIBS ggl-sdk ggl-common core-bus core-bus-gg-config
6+
ggl-yaml PkgConfig::sqlite3)
77
target_compile_definitions(ggconfigd
88
PRIVATE "GGL_COMP_DIR=${CMAKE_CURRENT_LIST_DIR}")
99
target_compile_options(ggconfigd PRIVATE $<$<COMPILE_LANGUAGE:ASM>:-undef>)

modules/ggconfigd/bin/ggconfigd.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
#include "ggconfigd.h"
66
#include <argp.h>
77
#include <ggl/buffer.h>
8-
#include <ggl/version.h>
8+
#include <ggl/nucleus/init.h>
99
#include <stdlib.h>
1010

11-
__attribute__((visibility("default"))) const char *argp_program_version
12-
= GGL_VERSION;
13-
1411
static char doc[] = "ggconfigd -- Greengrass Nucleus Lite configuration daemon";
1512

1613
static struct argp_option opts[] = {
@@ -50,6 +47,8 @@ int main(int argc, char **argv) {
5047
// NOLINTNEXTLINE(concurrency-mt-unsafe)
5148
argp_parse(&argp, argc, argv, 0, 0, NULL);
5249

50+
ggl_nucleus_init();
51+
5352
atexit(exit_cleanup);
5453

5554
(void) ggconfig_open();

0 commit comments

Comments
 (0)