[RFC 00] Makefile dependencies and `#if' conversion

2017-08-01 Thread Michael Witten
On Wed, 19 Jul 2017 17:30:53 -, Michael Witten wrote: > On Thu, 20 Jul 2017 00:31:25 +0800, Matt Johnston wrote: > >> Thanks for your patches. The Makefile dependency ones look >> useful, I'll try and double-check them and get them merged >> in the next week or so. P

Re: [RFC 0/3] Refactor the options system

2017-07-19 Thread Michael Witten
ar as part of a larger, automated building process should receive such a notification if the `stderr' output is being logged for later review. In short, this is potentially a great opportunity to clean up the source code, establishing a more solid foundation for future development. Sincerely, Michael Witten

[RFC 3/3] options: Refactor option names

2017-07-18 Thread Michael Witten
Date: Tue, 18 Jul 2017 05:02:16 - Options are now categorized explicitly into 2 groups: * Customizable options These are the object-like macros in `default_options.h.in'; they are given the prefix `CUSTOM_', and they can be overriden by the definitions

[RFC 2/3] options: Move customizable options to `default_options.h.in'

2017-07-18 Thread Michael Witten
Date: Mon, 17 Jul 2017 21:11:17 - * These macros are not used anywhere, and have therefore been removed: MIN_DSS_KEYLEN ENV_SIZE * According to `CHANGES', the macro `DROPBEAR_CLEANUP' is supposed to be disabled by default; this commit disables it by default. * A number of the

[RFC 0/3] Refactor the options system

2017-07-18 Thread Michael Witten
This is a request for comments on the following patch series, which is an attempt to establish a more consistent way of organizing how options are defined, used, and documented; it's mainly a bunch of refactoring: [1] options: Give the header files names that are more consistent [2] options:

[PATCH 2/2] default_options: Update the comments

2017-07-17 Thread Michael Witten
On Sat, 15 Jul 2017 20:46:02 -, Michael Witten wrote: > Now the comments reflect the way the code works; no code > has been changed. > > In the process of updating the comments, they have also been > copy edited; notably, old-style C comments (/**/) have been > replaced w

[PATCH 2/2] default_options: Update the comments

2017-07-15 Thread Michael Witten
Now the comments reflect the way the code works; no code has been changed. In the process of updating the comments, they have also been copy edited; notably, old-style C comments (/**/) have been replaced with new-style, one-line C++ comments (//). For the record, `packet.c' is another file that

[PATCH 0/2] Get the new `localoptions.h' scheme working

2017-07-15 Thread Michael Witten
+- svr-tcpfwd.c | 2 +- sysoptions.h | 6 +- 12 files changed, 303 insertions(+), 220 deletions(-) Sincerely, Michael Witten

Re: [PATCH 1/2] Clean up: Makefile.in: Correct the prerequisites

2017-07-15 Thread Michael Witten
On Tue, 11 Jul 2017 05:08:56 -, Michael Witten wrote: > Thus, for now, the minimal knowledge of prerequisites to which `make' > has access during the initial run is basically just the one header > which potentially needs to be made before almost everything else: > > de

Re: [PATCH 1/2] Clean up: Makefile.in: Correct the prerequisites

2017-07-12 Thread Michael Witten
On Wed, 12 Jul 2017 17:34:49 -, Michael Witten wrote: > On Tue, 11 Jul 2017 05:08:56 -0000, Michael Witten wrote: > >> diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in >> index dbcd2a0..c06187a 100644 >> --- a/libtommath/Makefile.in >> +++ b/libt

[PATCH] Clean up: Makefiles: Improve support for out-of-tree builds

2017-07-12 Thread Michael Witten
of these patches in a more coherent format. Sincerely, Michael Witten To apply this patch, save this email to a file: /path/to/email and then apply it: git am --scissors /path/to/email Here is the scissors-line across which git will cut in order to throw away the text above it. 8<--

Re: [PATCH 2/2] Clean up: Now that `make -j' works, remove `default_options.h'

2017-07-12 Thread Michael Witten
It was safe to remove `default_options.h', but in my excitement to do so, I forgot to take care of some administrative issues, namely that `git' should be told to ignore that file, and the command `make clean' should remove it, and there's now no need for a comment in `Makefile.in' about the

Re: [PATCH 1/2] Clean up: Makefile.in: Correct the prerequisites

2017-07-12 Thread Michael Witten
On Tue, 11 Jul 2017 05:08:56 -, Michael Witten wrote: > diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in > index dbcd2a0..c06187a 100644 > --- a/libtommath/Makefile.in > +++ b/libtommath/Makefile.in > @@ -17,7 +17,7 @@ endif > ifneq ($V,1) > @echo &qu

[PATCH 2/2] Clean up: libtommath/makefile.include: `arch' -> `uname -m'

2017-07-11 Thread Michael Witten
Whenever building `libtommath', `make' would complain to me that it could not find the `arch' command. According to `info arch': `arch' prints the machine hardware name, and is equivalent to `uname -m'... `arch' is not installed by default, so portable scripts should not rely on its

[PATCH 1/2] Clean up: libtommath/Makefile.in: Remove the `clean' target

2017-07-11 Thread Michael Witten
The file `libtommath/makefile.include', which is supplied by the libtommath sources, already supplies its own `clean' target; besides the fact that GNU `make' frowns upon multiple recipes for the same target, it is likely the case that libtommath's own `clean' target is worth using. Indeed, the

[PATCH 2/2] Clean up: Now that `make -j' works, remove `default_options.h'

2017-07-11 Thread Michael Witten
Now, it will only be necessary to maintain `default_options.h.in', though it does seem like a lot of trouble just to avoid having users deal with #ifndef/#endif statements. --- default_options.h | 466 -- 1 file changed, 466 deletions(-) delete

[PATCH 1/2] Clean up: Makefile.in: Correct the prerequisites

2017-07-11 Thread Michael Witten
This commit provides 3 useful results: * It allows parallel make (`make -j') to function correctly. * It allows `make' to be run from within the libtom(crypt|math) directory without having to worry about the state of prerequisites provided by Dropbear or by the other libtom*. * It

[PATCHES intro] Cleanup: Makefile.in: Get `make -j' working, among other things

2017-07-11 Thread Michael Witten
them as follows: git am /path/to/patches/* Sincerely, Michael Witten

[PATCH 3/3] Clean up: Makefile.in: Remove targets that are probably dead

2017-07-11 Thread Michael Witten
These targets have been removed: multibinary multilink link% The target `multilink' isn't explicitly used anywhere, and it doesn't seem like it would be that useful for most users, and can thus be removed. The targets `multibinary' and `link%' are only referenced by the target

[PATCH 2/3] Clean up: Makefile.in: Explicitly mark PHONY targets

2017-07-11 Thread Michael Witten
This makefile is sprawling enough that there is more value in placing `.PHONY' explicitly next to each phony target, rather than trying to group all the phony targets together as prerequisites to `.PHONY' target. In my experience, it's much easier to know what's going on by being able to look at

[PATCH 1/3] Clean up: Makefile.in: Handle program targets correctly

2017-07-11 Thread Michael Witten
Due to the fact that platforms disagree about which file-name extension an executable should have, subtle problems have accrued; notably, it became the case that build targets were no longer explicitly being treated as actual, real files, but sometimes as implicitly phony targets (that is, a

[PATCH 0/3] Clean up: Makefile.in: Improve target specifications

2017-07-11 Thread Michael Witten
improvements, such as getting parallel make (`make -j') to handle dependencies better. Sincerely, Michael Witten

Re: [PATCH 00/16] Improvements, mainly to user name handling and scp.

2016-01-11 Thread Michael Witten
In-Reply-To<20151229150334.gb27...@ucc.gu.uwa.edu.au> References: <cover.1449517677.git.mfwit...@gmail.com> <20151229150334.gb27...@ucc.gu.uwa.edu.au> On Tue, 29 Dec 2015 23:03:34 +0800, Matt Johnston wrote: > On Mon, Dec 07, 2015 at 10:42:59PM -, Michael

Re: [PATCH 00/16] Improvements, mainly to user name handling and scp.

2016-01-11 Thread Michael Witten
On Tue, 29 Dec 2015 23:03:34 +0800, Matt Johnston wrote: > On Mon, Dec 07, 2015 at 10:42:59PM -0000, Michael Witten wrote: >> User names have hitherto been handled neither consistently nor well; this >> series alleviates at least some of the issues. >> >> Fea

Re: [PATCH 00/16] Improvements, mainly to user name handling and scp.

2016-01-11 Thread Michael Witten
On Mon, 11 Jan 2016 16:37:09 -, Michael Witten wrote: > Message-ID: <2666123da20b47a589b819f37bd4cc54-mfwit...@gmail.com> > In-Reply-To<20151229150334.gb27...@ucc.gu.uwa.edu.au> > References: <cover.1449517677.git.mfwit...@gmail.com> > <2015122

[PATCH 01/16] scp: Insert comma into stderr message

2015-12-07 Thread Michael Witten
Date: Wed, 4 Nov 2015 05:56:09 - --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 70f45e3..b9aad3f 100644 --- a/scp.c +++ b/scp.c @@ -188,7 +188,7 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc) if

[PATCH 02/16] scp: Have `fatal()' append a newline to the message

2015-12-07 Thread Michael Witten
Date: Wed, 4 Nov 2015 20:33:19 - It would seem that it's standard practice not to include a newline in the message text, but that results in poor formatting, as a shell's command line then begins on the line of the error message itself. This commit simply instructs `fatal()' to append a

[PATCH 03/16] scp: pass `-v' only when DEBUG_TRACE is set

2015-12-07 Thread Michael Witten
Date: Wed, 4 Nov 2015 06:30:28 - The program `dbclient' understands the option `-v' only when it is built with the macro DEBUG_TRACE defined; ergo, the program `scp' should pass `-v' to `dbclient' only when the macro DEBUG_TRACE is defined. --- scp.c | 4 1 file changed, 4 insertions(+)

[PATCH 05/16] scp: const/static correctness improvements

2015-12-07 Thread Michael Witten
Date: Wed, 4 Nov 2015 05:37:08 - The variables `*suser' and `*tuser' should be of type `const char' rather than just `char'. Furthermore, the function `okname' should be declared as being `static'. While these changes could be applied to other identifiers, they are valuable in this commit as

[PATCH 06/16] scp: Introduce `get_user_name()'

2015-12-07 Thread Michael Witten
Date: Wed, 4 Nov 2015 05:41:53 - There's no reason to assume that there is a user name; userspace might be so primitive that there is no such thing, and `scp' should continue to run as long as the user explicitly specifies a user name on the command line. So, this commit introduces a new

[PATCH 08/16] scp: style: simplify code by using a tertiary operator

2015-12-07 Thread Michael Witten
Date: Fri, 6 Nov 2015 20:05:54 - --- scp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scp.c b/scp.c index dd92451..9a24490 100644 --- a/scp.c +++ b/scp.c @@ -1161,11 +1161,8 @@ get_user_name() static const char *user_name = NULL; if (user_name

[PATCH 07/16] scp: Use "unknown" when the user name cannot be retrieved

2015-12-07 Thread Michael Witten
Date: Fri, 6 Nov 2015 19:12:49 - It seems unnecessarily draconian to treat an unspecified user name as a fatal error; indeed, `dbclient' attempts to use "unknown" in this case, which is better than nothing, and similarly warns the user about the problem via the usual machinery. Furthermore,

[PATCH 10/16] scp: Simplify code now that the user name is never `NULL'

2015-12-07 Thread Michael Witten
Date: Fri, 6 Nov 2015 23:13:25 - The variables with the name `remuser' cannot hold the value `NULL'; this commit removes the code that handles that case. --- scp.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scp.c b/scp.c index a19d28f..0adb590 100644

[PATCH 11/16] scp: Remove parsing of `[user@]host'

2015-12-07 Thread Michael Witten
Date: Sat, 7 Nov 2015 03:27:36 - The program `dbclient' can already handle parsing such arguments, including determining the current user's name. It should be noted that relying on this centralized machinery changes the behavior: Whereas before, `@host' (i.e., the empty string as the user

[PATCH 13/16] scp: Remove `replacearg()'

2015-12-07 Thread Michael Witten
Date: Sat, 7 Nov 2015 03:48:23 - It seems that it has no purpose. --- scp.c | 1 - scpmisc.c | 20 scpmisc.h | 1 - 3 files changed, 22 deletions(-) diff --git a/scp.c b/scp.c index 9bf22e1..599042c 100644 --- a/scp.c +++ b/scp.c @@ -174,7 +174,6 @@

[PATCH 14/16] runopts: Mark `*cli_runopts.own_user' as `const'

2015-12-07 Thread Michael Witten
Date: Sat, 7 Nov 2015 16:55:53 - This is in preparation for treating `own_user' with less explicit safety. --- runopts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runopts.h b/runopts.h index 7d6ae06..0a97937 100644 --- a/runopts.h +++ b/runopts.h @@ -127,7 +127,7 @@

[PATCH 15/16] runopts: There's no reason to make a duplicate of "unknown"

2015-12-07 Thread Michael Witten
Date: Sat, 7 Nov 2015 17:13:01 - The variable `*cli_opts.own_user is of type `const char', and it doesn't seem to be freed anywhere. --- cli-runopts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-runopts.c b/cli-runopts.c index e8cb313..c4cd12c 100644 ---