]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Add a postinstall script to setup .gdbinit.
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 23 Jan 2021 17:26:33 +0000 (17:26 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 30 Jan 2021 13:28:34 +0000 (13:28 +0000)
systemd is compiled with relative source file paths so we need to
issue a directory command to make sure gdb can find systemd's
source files. Let's put this in a .gdbinit file so it's executed
automatically when we run gdb.

mkosi.postinst [new file with mode: 0755]

diff --git a/mkosi.postinst b/mkosi.postinst
new file mode 100755 (executable)
index 0000000..1bbb9e4
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+
+mkdir -p /root/build
+echo "directory /root/build" > ~/.gdbinit