From 82c3ffe7019e1db4727d7e292bf9ab88b56de278 Mon Sep 17 00:00:00 2001 From: TJ Kolev Date: Fri, 3 Feb 2023 11:19:26 -0600 Subject: Dropbear SSH File Reorg The GitHub pipeline is based on the build.yml setup, which previously escaped me. That script relies on default_options.h to be at top of the repo, as it uses it to generate its own localoptions.h for various test sceanrios. * default_options.h moved back to the top. * config.h is also generated in the top folder. * localoptions.h also stays at the top folder. * Readjusted (reverted) the affected Makefile.in-s. * Added notes about the generated file dependencies. * Adjusted references to above files in the .md docs. tjk :) --- DEVELOPING.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'DEVELOPING.md') diff --git a/DEVELOPING.md b/DEVELOPING.md index 65ae9ae..3c7f866 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -3,16 +3,29 @@ #### Building See [INSTALL.md](INSTALL.md) for build instructions. -[SMALL.md](SMALL.md) has hints for building smaller binaries, also see comments in [default_options.h](./src/default_options.h). +[SMALL.md](SMALL.md) has hints for building smaller binaries, also see comments in [default_options.h](./default_options.h). To be able to debug add `-g` compiler option to the `CFLAGS` environment variable. This will generate debug symbols. ``` export CFLAGS="$CFLAGS -g" ``` +#### File dependencies +The GitHub [test build script](./github/workflows/build.yml) requires the [default_options.h](./default_options.h) be at the top of the repository tree. The script uses the file to generate localoptions.h with various features enabled/disabled. + +Following are generated files in the format \: \(\) +``` +- configure: autoconf(configure.ac) +- config.h.in: autoheader(configure.ac) +- config.h: configure(config.h.in) +- Makefile: configure(Makefile.in) +- default_options_guard.h: make(default_options.h) +``` +Although generated, the first two files are checked in as they change very infrequently. + #### Debug printing -Set `#define DEBUG_TRACE 1` in [localoptions.h](./src/localoptions.h) to enable a `-v` option for dropbear and dbclient. That prints various details of the session. For development running `dropbear -F -E` is useful to run in the foreground. You can set `#define DEBUG_NOFORK 1` to make dropbear a one-shot server, easy to run under a debugger. +Set `#define DEBUG_TRACE 1` in [localoptions.h](./localoptions.h) to enable a `-v` option for dropbear and dbclient. That prints various details of the session. For development running `dropbear -F -E` is useful to run in the foreground. You can set `#define DEBUG_NOFORK 1` to make dropbear a one-shot server, easy to run under a debugger. #### Random sources @@ -22,7 +35,7 @@ Most cryptography requires a good random entropy source, both to generate secret Default algorithm lists are specified in [common-algo.c](./src/common-algo.c). They are in priority order, the client's first matching choice is used (see [rfc4253](https://www.rfc-editor.org/rfc/rfc4253.html)). Dropbear client has `-c` and `-m` arguments to choose which are enabled at runtime (doesn't work for server as of June 2020). -Enabling/disabling algorithms is done in [localoptions.h](./src/localoptions.h), see [default_options.h](./src/default_options.h). +Enabling/disabling algorithms is done in [localoptions.h](./localoptions.h), see [default_options.h](./default_options.h). #### Style -- cgit v1.2.1