Vladimír Čunát [Mon, 9 Mar 2020 14:39:15 +0000 (15:39 +0100)]
lib/generic/array: improve the growth strategy
For large arrays it was linear, so huge amount of +1 would need
quadratic time together. I've been hating that for a long time,
but now I finally have a use case where it makes a large difference.
The one from GCC looks good to me (theoretically) and it surely has
lots of practical deployment.
CI scan-build: I still have no idea about these array allocation
errors; I had just given up and believe they're false alarms.
Vladimír Čunát [Mon, 9 Mar 2020 14:10:24 +0000 (15:10 +0100)]
kr_zonecut_add(): allow not checking for duplicates
Large block-lists in hints will end up in keeping a huge reverse map
for some IP address(es), and our simple duplicate-checking algorithm
can't handle that efficiently. The duplicate checking in hints seems
better removed, so that add-del pairs work well in that case.
Vladimír Čunát [Mon, 24 Feb 2020 17:32:26 +0000 (18:32 +0100)]
gc: don't re-open cache so often
Re-opening the cache causes fsync - every interval (1s by default).
Normally that isn't noticeable, but on encrypted ZFS it causes
high CPU consumption (even when "idle").
grahamc first reported this and Mic92 tested the patch helps. Thanks!
https://gitter.im/CZ-NIC/knot-resolver?at=5e4ea2343ca8a67fb808e349
Petr Špaček [Mon, 17 Feb 2020 08:56:48 +0000 (09:56 +0100)]
autogenerate AUTHORS file to get rid of outdated data
The file can be re-generated using scripts/update-authors.sh.
File .mailmap is used for name canonicalization and fresh list of
authors replaces the old one in AUTHORS file automatically.
Gitlab CI checks its content before release (on branches named release-*).
Marek Vavruša is listed in .mailmap file twice intentionally,
once as CZ.NIC employee and second time as external contributor.
Petr Špaček [Fri, 21 Feb 2020 15:27:41 +0000 (16:27 +0100)]
http: document source of bootstrap/bootswatch theme
Source is
git+https://github.com/twbs/bootstrap.git@a78dc3aed640a35914361b837ce24573a0515e19#yeti/bootstrap.min.css
but our version has minor modifications:
- removed link to font file
- minor font and line height adjustments
- added SPDX header
Diffing minimized CSS file is a mess so use something like
$ awk '{gsub(/{|}|;/,"&\n"); print}'
to get something more legible.
Petr Špaček [Thu, 20 Feb 2020 13:51:04 +0000 (14:51 +0100)]
http: update selectize.js to match upstream version 0.12.6
Originally we used version 0.12.0 but the files in our repo did not
exactly match files in the upstream repo and I could not confirm
if the changes were meaningful or just artifact of source minimization
process.
To remove uncertainity I've updated selectize.js to latest upstream version
0.12.6, did not do any extra CSS minimization, and removed unused file
selectize.min.css.
Petr Špaček [Tue, 18 Feb 2020 15:43:02 +0000 (16:43 +0100)]
mark bundled content with SPDX file
The SPDX file contains hand-written metadata about source URL, version,
authors, and license.
There are two missing pieces in HTTP module:
- bootswatch theme - I could not find what theme we ship, maybe it is
based on one of bootswatch themes but heavily modified
- selectize.js source does not match respective files in upstream but
contains minor changes
Vladimír Čunát [Tue, 18 Feb 2020 19:03:14 +0000 (20:03 +0100)]
meson: actually #define HAVE_ASPRINTF
I believe this should now correctly enable the code iff it's needed.
This commits and the parent will probably be no-op in practice.
I believe distros commonly do use fortification by default,
and I'm not aware of any platform with kresd and without asprintf().
I considered using `conf_data.set()` in meson, but that would require
us modifying contrib/ccan/asprintf/asprintf.h to include kresconfig.h,
and that seemed weird.
Vladimír Čunát [Mon, 10 Feb 2020 08:54:48 +0000 (09:54 +0100)]
base64_* -> kr_base64_*
GnuTLS 3.3 contained these as public symbols. This doesn't seem
important, but why not use more collision-resistant names anyway?
Details/discussion: https://github.com/CZ-NIC/knot/pull/14
Basically noone should notice, so I didn't include any NEWS entry.
Vladimír Čunát [Mon, 27 Jan 2020 16:42:18 +0000 (17:42 +0100)]
systemd: explicitly add kresd@ to system-kresd.slice
By some magic (unknown so far) the service was ending up in the slice
anyway, but it seems much better to put it there explicitly.
Closely related to !925.