commit | 343011faa5bdb52e6428eeefd732d33bbf70f710 | [log] [tgz] |
---|---|---|
author | Jan Kundrát <jan.kundrat@cesnet.cz> | Mon Nov 13 17:40:08 2023 +0100 |
committer | Jan Kundrát <jan.kundrat@cesnet.cz> | Mon Nov 13 17:46:51 2023 +0100 |
tree | 6dc517d7a317d0b5cc246f46f267e46c2655943c | |
parent | 613f07f95d77575aeddbd89c51a085b9b7829adf [diff] |
Fix build failure with GCC 13.2 After a system update, this stopped building: velia/src/system/Authentication.cpp: In function ‘auto velia::system::impl::file_open(const char*, const char*)’: velia/src/system/Authentication.cpp:58:65: error: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Werror=ignored-attributes] 58 | auto res = std::unique_ptr<std::FILE, decltype(&std::fclose)>(std::fopen(filename, mode), std::fclose); | ^ The root cause is that fclose's argument has __attribute__((nonnull(1))), and that attribute triggers that warning. It turns out that this pattern is actually not strictly speaking correct because one is not allowed to take the address of a standard function like this. Also, declaring the unique_ptr with a function-pointer destructor is a wee bit less effective because this type would offer runtime customization of its behavior, whereas we do not really need to consult this function pointer at runtime. Fortunately, as of C++20 it's OK to use a decltype(lambda) as the second template type to unique_ptr (and then it's OK to rely on its implicit "construction" for the actual destructor), so the fix is pretty short. Yay! Change-Id: Ibd0397ad3446c0fe95de297f36d11637eb74d96c Link: https://stackoverflow.com/questions/76867698/what-does-ignoring-attributes-on-template-argument-mean-in-this-context Link: https://stackoverflow.com/a/76867913/2245623
Together with sysrepo, this software provides "general system management" of embedded devices. The target platform is anything that runs Linux with systemd. This runs in production on CzechLight SDN DWDM devices.
This component tracks the overal health state of the system, including various sensors, or the state of systemd
units. As an operator-friendly LED at the front panel of the appliance shows the aggregated health state.
Firmware can be updated via RAUC, and various aspects of the system's configuration can be adjusted. This includes a firewall, basic network settings, and authentication management.
For a full list, consult the yang/
directory in this repository.
ietf-access-control-list
, RFC 8519 (with deviations)ietf-hardware
, RFC 8348ietf-system
, RFC 7317 (partial support)ietf-interfaces
, RFC 8343 (generating config for systemd-networkd
, with extensions)ietf-routing
, RFC 8349 (see above)czechlight-system
For building, one needs:
1.75
)pkg-config
libnl-route
for talking to the Linux kernellibsystemd
and systemd
at runtimelibyang-cpp
- C++ bindings for libyangsysrepo-cpp
- C++ bindings for sysrepospdlog
- a logging librarysdbus-c++
- C++ library for D-Busfmt
- C++ string formatting librarynlohmann_json
- C++ JSON librarydocopt
for CLI option parsingnft
- the netfilter tooliproute2
- the ip
tool for testingThe build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install
.