Use GNU grep, sed and awk instead of BSD variants. Developers will have
to install these using a package manager like homebrew. Updated the
INSTALL.md and doc/Development.md tech docs with instructions.
Was failing because recvmsg(2) on OSX does not nul terminate the
pathname of local (AF_UNIX) sockets in the returned sockaddr buffer.
Zerofilling the buffer before calling recvmsg() does the trick.
In the process, improved debug and error logging, replacing
recvwithttl() with recv_message() and recv_message_frag(). The
mdp_net.c source file was retired.
Were early 2012 vintage.
This will help Debian and other distribution packagers, who rely on
having up-to-date architecture detection in every package when built.
Henceforward, aclocal.m4 will be generated by the 'autoreconf' command.
The 'autoreconf -f -i' command may now emit a warning "Unsupported
attribute section, the test may fail" on some systems, but it will still
generate the proper aclocal.m4 and ./configure files. To suppress this
warning, simply invoke autoreconf with '-I m4' argument:
autoreconf -f -i -I m4
The INSTALL.md has been updated accordingly, and a new 'Notes for
Developers' technical document added, explaining the use of aclocal and
autoreconf, and documenting that these warning messages are of no
concern.
These macros copied in from the Autoconf Macro Archive were missing
support for the following attributes:
- AX_GCC_VAR_ATTRIBUTE() for __attribute__(section("..."))
- AX_GCC_FUNC_ATTRIBUTE() for __attribute__(returns_nonnull)
This commit fixes them. (The versions in aclocal.m4 were already fixed,
but aclocal.m4 is about to be removed from version control.)
Add RHIZOME_BUNDLE_STATUS_MANIFEST_TOO_BIG enum option to indicate
that the manifest exceeded 8 KiB in size.
Refactor rhizome_add_manifest() and rhizome_manifest_finalise()
to return 'struct rhizome_bundle_result' instead of 'enum
rhizome_bundle_status', so that that their detailed failure messages
can reach the HTTP API layer instead of just being logged.
Fix HTTP response status codes produced Rhizome direct HTTP requests
to be consistent with the Rhizome RESTful API.
- Introduce the new 'struct rhizome_bundle_result' that contains a
rhizome_bundle_status enum value and an optional, nul-terminated
string that provides an explanation of the cause of the status; add
functions to construct, query, and free the struct
- Replace 'enum rhizome_add_result' with 'struct rhizome_bundle_result',
removing an unnecessary level of enum interpretation
- Make rhizome_fill_manifest() return 'struct rhizome_bundle_result' and
add logic to check that the supplied author SID is correct (previous
behaviour was: if an incorrect author SID was supplied but the correct
author could be found in the keyring, then the incorrect one was
silently ignored)
- Simplify the response code in rhizome_restful.cc to take advantage of
the new 'struct rhizome_bundle_result'; in particular, the mapping
from 'enum rhizome_bundle_status' codes to HTTP status codes is now
expressed in a single switch statement
- Fix some minor failures in test scripts revealed by the changes
In 'struct http_response', rename the 'result_code' field to
'status_code' for consistency with the terminology used in the HTTP
specification, and add a 'reason' field, so that the phrase that
appears in the first response line can differ from the standard
"canned" phrases.