diff options
author | Thomas Haller <thaller@redhat.com> | 2022-08-04 17:38:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-08-08 11:54:27 +0200 |
commit | 341c46de84b18226f95b07bbd4c35ba56b42dd40 (patch) | |
tree | 9904a404e4fbb454f542d64ab0e54ebc4a09cf8b /contrib | |
parent | d966c2ac4c2aa2147104b7b5b5fc1e56f1268383 (diff) | |
download | NetworkManager-341c46de84b18226f95b07bbd4c35ba56b42dd40.tar.gz |
contrib: improve motd for nm-in-container.sh script
Leave a hint about core-dumps.
Also, now we have `contrib/fedora/rpm/configure-for-system.sh` script,
which can configure the build in a way similar to what we get
when doing an RPM build.
That means, inside "contrib/scripts/nm-in-container.sh" we
can just type `make install`, and it will replace the pre-installed
NetworkManager.
The main advantage is that it becomes convenient to run NetworkManager
as a systemd service. Previously, the suggested was to to install
NetworkManager inside another prefix, and run it in the terminal.
Running NetworkManager as systemd service is also necessary for NM-ci,
which restarts the NetworkManager service, and you couldn't run a test,
if you just started NetworkManager in a terminal.
Previously, you had to build a complete RPM, which takes a lot of time.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/scripts/nm-in-container.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/scripts/nm-in-container.sh b/contrib/scripts/nm-in-container.sh index 72b3f1130a..c8f5ad62e2 100755 --- a/contrib/scripts/nm-in-container.sh +++ b/contrib/scripts/nm-in-container.sh @@ -113,7 +113,19 @@ create_dockerfile() { find NetworkManager bind mounted at $BASEDIR_NM run \`nm-env-prepare.sh setup --idx 1\` to setup test interfaces -Configure NetworkManager with +Coredumps: coredumps are not namespaced, so by default they will +be sent to coredumpctl of the outer host, which has no idea where +to get the debugging symbols from. A possible workaround is setting + + $ echo '/tmp/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern + +so that core dumps get written to file. Afterwards, restore with + + echo '|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h' | sudo tee /proc/sys/kernel/core_pattern + +from /usr/lib/sysctl.d/50-coredump.conf. + +For example, configure NetworkManager with \$ ./configure \\ --enable-address-sanitizer=no \\ --enable-compile-warnings=yes \\ @@ -164,6 +176,10 @@ Configure NetworkManager with "\${NM_CONFIGURE_OTPS[@]}" Test with: \$ systemctl stop NetworkManager; /opt/test/sbin/NetworkManager --debug 2>&1 | tee -a /tmp/nm-log.txt + +Alternatively, configure with \`contrib/fedora/rpm/configure-for-system.sh\`, +subsequent \`make && make install\` will overwrite your system's NetworkManager, +and you can test it with \`systemctl daemon-reload ; systemctl restart NetworkManager\`. EOF cat <<EOF | tmp_file "$BASEDIR/data-bashrc.my" |