8a7bda39a9293dfa2b8624c7d5761468e0aaac95 — Zack Weinberg 3 years ago 79667d6
Review OpenBSD patches.  Most can be skipped, 1 question remains.
2 files changed, 82 insertions(+), 14 deletions(-)

M list.log
M todo.org
M list.log => list.log +0 -1
@@ 45,7 45,6 @@

M todo.org => todo.org +82 -13
@@ 268,10 268,18 @@ folder structure complicates things quite a bit and the commit messages don't
add any useful context. Need to hunt down mailing list threads for additional

** QUESTION openbsd/patch-bin_autom4te_in
[ZW: Don’t put too much time into OpenBSD. They’re notorious for
making changes that make sense *only* on their operating system, and
not documenting the rationale.  A lot of these patches appear to be
directed at making Autoconf work with OpenBSD’s `/usr/bin/m4`, which
is *not* GNU M4 (see https://github.com/openbsd/src/tree/master/usr.bin/m4 ).
Autoconf upstream only supports use with GNU M4, so all of those
changes we can safely skip.]

** SKIP openbsd/patch-bin_autom4te_in
This is just a bunch of random changes:
- Removes the default recursion limit
- Unconditionally appends `-g -D__gun__` to the m4 options.
- Unconditionally appends `-g -D__gnu__` to the m4 options.
- Replaces some flags by their short hands (--include -> -I)
- Disables --fatal-warning
- Replaces `@M4_DEBUG_FILE@=` by `-o`

@@ 282,12 290,25 @@ these changes I think we'll just skip.

Would need to ask on their mailing list.

** QUESTION openbsd/patch-bin_autoupdate_in
[ZW: The upstream code here is trying to figure out how to work with
whichever version of the ‘m4’ utility happens to be available.
OpenBSD seems to have decided to cut that out and instead make it work
only with the precise version that OpenBSD ships. Some of the changes
here appear to be *wrong*, for instance the ‘-o’ option does something
completely different from ‘--debugfile’. I don’t think we want this at

** SKIP openbsd/patch-bin_autoupdate_in
More of the same:
- Unconditionally appends `-g -D__gun__` to the m4 options.
- Unconditionally appends `-g -D__gnu__` to the m4 options.
- Replaces some flags by their short hands (--include -> -I)

** QUESTION openbsd/patch-configure
[ZW: The change from --include to -I wouldn’t do any harm but I’m not
seeing any particular reason to want it either. (They presumably did
it because their M4 doesn’t support long options.) The `-g -D__gnu__`
addition shouldn’t be necessary.]

** SKIP openbsd/patch-configure
Patches the configure file which is not something we track in git so patch can't
be applied as is.

@@ 299,10 320,22 @@ Otherwise it:
Not sure if these are things we want to support upstream or not. Would need to
dig much further (probably on their mailing list).

[ZW: We definitely don’t want this one. It doesn’t just remove the
`rm -f conftest.m4f`, it disables the entire test for a supported
version of M4. As I mentioned above, this is probably because they
want to use *their* non-GNU implementation of M4, which isn’t
something Autoconf upstream has any intention of supporting.

I imagine they’re patching the generated file because their build
system doesn’t know how to regenerate it after a patch to the actual
source; not our problem anyway.]

** SKIP openbsd/patch-doc_autoconf_texi
Adds the autoconf version number when refering to the autoconf tools. Could
merge it but this seems like a thing that only OpenBSD so can safely skip it.

[ZW: Yeah, this is like the FreeBSD changes to the top-level Info index.]

** SKIP openbsd/patch-doc_Makefile_in
Changes Makefile.in which I believe is a generated file so can't merge this as

@@ 310,21 343,28 @@ is.
Seems like it's applying a bunch of sed transformations to the release file
names. I very much doubt we want to upstream any of this logic.

** EASY openbsd/patch-lib_autoconf_general_m4
Adds a new argument to autoconf `--runstatedir` described as modifiable
per-process data. I believe it's made usable to users via `AC_SUBST`.
[ZW: I believe this is intended to install the documentation under a
versioned name, to go with the patch to doc/autoconf.texi that adds
version numbers to the Info index. This might be a legitimate feature
request, but it would need to be submitted to the *Automake* project,
the code being patched belongs to their Makefile templates.]

Would probably need to dig up more context but since this is a new feature, it
can be relgated to a later version.
** BACKPORT openbsd/patch-lib_autoconf_general_m4

** SKIP openbsd/patch-lib_autoconf_Makefile_in
Modifies a generated file and removes autoconf.m4f from nodist_autoconflib_DATA.
We don't want to upstream this.

[ZW: Concur.  All changes related to `.m4f` files are again because
OpenBSD’s M4 isn’t GNU M4, and does not implement “frozen state” files.]

** SKIP openbsd/patch-lib_autotest_Makefile_in
Modifies a generated file and removes autoconf.m4f from nodist_autoconflib_DATA.
We don't want to upstream this.

[ZW: Concur.]

** QUESTION openbsd/patch-lib_m4sugar_m4sugar_m4
Random changes:
- Provides AM_SANITY_CHECK right after defining m4_provide. Seems like shoving

@@ 335,12 375,18 @@ Random changes:
Need more context to understand what they were trying to fix. Once we get that
we can figure out the right way to implement it.

[ZW: I have no idea what they were trying to do here. If you can find
an explanation then we can revisit, but I wouldn’t consider it a

** SKIP openbsd/patch-lib_m4sugar_Makefile_in
Modifying a generated file so can't be merged as is.

Removes m4sugar.m4f and m4sh.m4f from the nodist variable which is probably not
something we want to upstream.

[ZW: Concur.]

** SKIP openbsd/patch-Makefile_in
Again, modifying generated files so can't be merged as is.

@@ 348,14 394,28 @@ Otherwise, hard to figure out which part of the build they're trying to modify
from the patch alone. The change is a one liner but without understanding where
this takes place, pretty hard to tell what problem they're trying to solve.

[ZW: I have no idea what they’re trying to accomplish here, and again
this is modifying Automake’s templates so it would need to go to

** SKIP openbsd/patch-tests_c_at
Basically `sed -r "s_/lib/cpp_/user/bin/cpp_"`
Basically `sed -r "s_/lib/cpp_/usr/bin/cpp_"`

There are other instances of /lib/cpp that they haven't modified. They only
seemed to be interested in the AT_CHECK. Once again, without more context this
is just a very puzzling change.

** EASY openbsd/patch-tests_local_at
[ZW: I know what’s going on here. /lib/cpp is a very old name for the
‘cpp’ program. OpenBSD has stopped installing it there, and that broke
these tests, so they fixed them. The other places where /lib/cpp is
mentioned, use it only as a last-resort fallback, so it’s harmless.

Autoconf upstream has already made an equivalent set of changes to
these tests, so we don’t need this patch.  I might change AC_PROG_CPP
to try ‘cpp’ (i.e. look for it in $PATH) before ‘/lib/cpp’, when
‘cc -E’ doesn’t work.]

** SKIP openbsd/patch-tests_local_at
This test deals with output of what I can only assume to be compilers and seems
to add an extra case that wasn't previously handled. It unfortunately does not
update the comment which relies heavily on examples which means we'd have to

@@ 363,15 423,24 @@ reverse engineer an example from the sed line.

Hunting for context on the mailing list might help.

[ZW: This is dealing with M4 output; OpenBSD’s M4 must be printing
certain error messages differently.  We don’t need this.]

** SKIP openbsd/patch-tests_Makefile_in
More modifications to generated files.

Seems like they're disabling the call to make on lib/autotest. Pretty sure we
don't want that.

** QUESTION openbsd/patch-tests_tools_at
[ZW: Goes with all the other changes to disable use of .m4f files.
Indeed, we don’t want it.]

** SKIP openbsd/patch-tests_tools_at
Disables one of the tests. Context needed to understand why.

[ZW: ‘--freeze’ and ‘--reload-state’ options are part of the “frozen
state” feature, along with ‘.m4f’ files.  Not wanted.]

* DUPE ubuntu
Same patch file and source as debian