In libnetplan v0.102 we introduced a regression, by breaking the ABI compatibility with netplan.io v0.101 (https://pad.lv/1922898)
This happened by introducing two new settings to the NetplanNetDefinition struct (char* filename and guint tunnel.ttl), modifying the memory layout, thus breaking applications linked against older versions of libnetplan0.
For char* filename, we can fix the problem by moving the new field to the end of the NetplanNetDefinition struct, thus not modifying the existing data layout, but only appending to it for the newer version.
For guint netdef->tunnels.ttl we cannot easily fix the problem easily, as this is a struct inside a struct and there seems to be only one byte left (at least on x86_64) before we hit the memory boundary, while this new guint field needs 4 bytes. So we rename that field as tunnel_ttl and append it to the end of the net_definition struct.
COMMITS:
* Revert "Added TTL option for tunnels (LP: #1846783) (#194)"
This reverts commit 6c8ed65df7c7f31280d5d27b67195a1e9a746e7a.
* parse.h: move new 'filename' pointer to the end to avoid changes in the memory layout
* Revert "Revert "Added TTL option for tunnels (LP: #1846783) (#194)""
This reverts commit 97d7d35704f3c3b80ba63e4f054fd8ac6303ba37.
* parse: fix ABI compatibility with tunnel.ttl
* doc: update tunnel_ttl documentation
Proxy the 'netplan generate' CLI via DBus, if called from within a snap,
to work around the strict AppArmor confinement.
see: snapcore/snapd#10212
COMMITS:
* dbus:cli: implement io.netplan.Netplan.Generate()
Proxy the 'netplan generate' CLI via DBus, if called from within a snap,
to work around the strict AppArmor confinement.
see: https://github.com/snapcore/snapd/pull/10212
* doc: mention Netplan.Generate() DBus method
Using os.replace() leads to "Invalid cross-device link" errors on Core20 setups, due to having different mounts.
Use shutil.copy2() & os.remove() instead.
* cli:set: Fix netplan-set on Core20
* cli:set: use shutil.copy2()