Merge service script changes

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
service: add FreeBSD rc script

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
service: rename smf directory to service

This way it makes more sense to add non-SMF rc scripts here.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
cmake: bump the minimum required version to 3.12

Even Debian old-old-stable (buster) shipped 3.13.

This is needed because modern cmake (3.28) warns about specifying too old of a
minimum required version:

  CMake Deprecation Warning at .../CMakeLists.txt:23 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

Instead of bumping the version to 3.11, we bump it to 3.12 to match
libjeffpc.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
req: log the reason for log request failure

This will include the session and thread ids.  That should make sifting
through any partially written logs easier.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
req: write out cpio archives with request logs

Instead of creating a file for each request, let's create a file per thread.
The format is the "old character" cpio format with each file in it
containing the cbor-encoded blob as before.

It can be easily extracted using cpio or pax:

 $ cpio -i < .../path/to/archive.cpio
 $ pax -r -f .../path/to/archive.cpio

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
sidebar: use a logarithmic tagcloud scaling

Instead of linearly scaling the tagcloud entries based on their counts, scale
it based on the 2 times the natural log of the count.  This gives more weight
to lower count tags, making the whole cloud looking "denser".

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
theme: turn the shipped theme into a proper theme example

It is silly to ship my blahg's theme with the software.  For a couple of
years, it's been possible to specify the theme directory via the theme-dir
config option so there is no harm generalizing the shipped theme and
encouraging users to copy it and tweak it to taste.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
fmt3: remove trailing slashes from generated html

The trailing slashes in some of the tags were a XHTML thing that was
acceptable with HTML 4.  Since both of those are a thing of the past, the w3
validator warns about these slashes.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
theme: remove trailing slashes from html

The trailing slashes in some of the tags were a XHTML thing that was
acceptable with HTML 4.  Since both of those are a thing of the past, the w3
validator warns about these slashes.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
template: use %define api.pure instead of %pure-parser

%pure-parser got deprecated a number of years ago.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
post fmt3: use %define api.pure instead of %pure-parser

%pure-parser got deprecated a number of years ago.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Added tag v4.8 for changeset 5306db73b02f

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
utils: clear struct tm before calling strptime

Some strptime implementations clear the struct tm while others do not.
Since we want zeros for everything other than the year, month, day, hour,
and minute, we need to explicitly memset the struct.

This wasn't noticed before since illumos libc falls into the category of
zeroes-tm-for-you implementations.

On systems that do not zero struct tm automatically, various random values
end up in tm_sec which causes the subsequent mktime to return a value that
doesn't represent the passed in string's meaning.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
samples: document tagcloud-min-count

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
config: default URL should include http scheme

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
static: make URI prefix configurable

This changes the definition of the base-url config knob to be a list instead
of a cons.  The list should have one or two items: the scheme+host+port
portion and the URI prefix portion.  The migration is simple - just replace:

	(base-url . "http://example.com")

With:

	(base-url "http://example.com")

That is, the cons cell turned into a list.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
doc: fix incorrect example of post.lisp listed usage

The listed post.lisp option takes a single argument, not a list.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
sidebar: make the minimum tagcloud count configurable

Instead of hardcoding the decision that a tag must have at least 2 posts for
it to show up in the tag cloud, let the admin decide what is a good cutoff.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
nvl_alloc returns a negated errno on error

Checking for NULL is useless since nvl_alloc never returns NULL.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Next