netdata compiles its own copy of SQLite 3.36.0 from June 2021 into the
daemon. Link the daemon against libsqlite3 instead, so that SQLite gets
its updates from the sqlite3 package.
On aarch64_generic the daemon shrinks from 2386355 to 1365700 bytes.
libsqlite3 has 1110402 bytes there, so an installation without it grows
by about 90 kB in total and one that already has it saves 1 MB.
The OpenWrt library is built without UPDATE and DELETE with LIMIT. The
only statement that needs it is in the cloud code, which the package
does not build, and the unit test skips its two LIMIT statements when
the library lacks the option.
Tested on aarch64 with libsqlite3 3.54.1: upgrade from the previous
release over an existing database, health log written and read back
after a restart, a streaming parent with one child and the built-in
unit tests.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
libmnl was added to DEPENDS with the update to 1.9.0. Its only user in
netdata is the nfacct plugin, which the package turns off with
--disable-plugin-nfacct since the update to 1.11.0.
None of the installed binaries link against libmnl. A build with libmnl
removed from the staging directory produces the same 445 files as
before, byte for byte.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
The dashboard comes with 14 source map files that take 13.4 MB, which
is half of the installed size of the package. Only the developer tools
of a browser read them, the dashboard works without them.
On aarch64_generic the package shrinks from 8.0 MB to 4.5 MB and its
installed size from 26.9 MB to 13.4 MB.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Both issues are in the streaming receiver, which is disabled by default,
and both were fixed upstream in 1.37.0.
CVE-2023-22497 [1]: a parent accepted the MACHINE GUID of a child that
had connected before as an API key. Backport the upstream fix [2],
which gives every section of stream.conf a type. The GUID of a
connected child is now refused as an API key without any change to the
configuration. Sections that stream.conf holds for single machines
should get the new "type = machine" line. Without it such a section
still works as an API key as long as its machine has not connected.
CVE-2023-22496 [3]: the arguments of the alert notification command
were not sanitized, so a streaming child was able to change the command
that the parent runs. It also needs health to be enabled, which this
package turns off by default. Backport the upstream fix [4]. health.c
is ported by hand to the argument list of 1.33.1, and the sanitizing
function is taken from upstream master, where it was hardened later [5].
As in upstream, a leading dash is removed from every argument, '$' is
replaced by '_', and the script named by "exec" is quoted, so it can no
longer carry arguments of its own. An argument that contains an
apostrophe now reaches the notification script in one piece.
[1] https://nvd.nist.gov/vuln/detail/CVE-2023-22497
[2] https://github.com/netdata/netdata/commit/811028aea2
[3] https://nvd.nist.gov/vuln/detail/CVE-2023-22496
[4] https://github.com/netdata/netdata/commit/4de2ce54d5
[5] https://github.com/netdata/netdata/commit/3e508c8f95
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
monit and monit-nossl both install /usr/bin/monit, but nothing marks
them as conflicting, so they can be selected and installed together.
Declare the conflict so that they cannot be selected or installed
together.
Checked the Conflicts field in the generated package metadata.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Build with rust-package.mk of the build system from a vendor tarball
generated from the GitHub tag archive, so that cargo builds offline.
bottom builds with the Rust toolchain of the build system when one is
selected, and with rust/host of this feed otherwise.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
libdbi and its drivers are being removed from the feed: neither has had
a release since 2013. rsyslog keeps its native MySQL and PostgreSQL
output modules (RSYSLOG_mysql and RSYSLOG_pgsql).
Signed-off-by: Sander van Deijck <sander@vandeijck.com>
syslog-ng is built with --disable-sql, so the libdbi dependency and
LIBDBI_CFLAGS have no effect beyond pulling libdbi onto every device
that installs syslog-ng.
Signed-off-by: Sander van Deijck <sander@vandeijck.com>
3.5.3 hardens the htoprc parser, which upstream lists as the fix for
CVE-2024-37676. 3.5.2 also fixes terminal escape injection through the
process name and a stack underflow on very narrow terminals.
Fixes: CVE-2024-37676
Changelog: https://github.com/htop-dev/htop/compare/3.5.1...3.5.3
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Switch source fetch from git clone to the upstream release tarball
published for every tag, as recommended by the feed guidelines.
This replaces PKG_MIRROR_HASH with a plain PKG_HASH of the
codeload tarball.
Co-authored-by: Federico Capoano <f.capoano@openwisp.io>
Signed-off-by: Gagan Deep <pandafy.dev@gmail.com>
Handling uci-defaults scripts in package postinst is not needed in
modern OpenWrt and in fact results in error messages on install since
the common postinst processes and deletes uci-defaults scripts before
package-specific postinsts are executed.
Therefore remove the unneeded postinsts in this package.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
/etc/syslog-ng.conf is installed with INSTALL_DATA, so it ends up
world readable at 0644. The file holds the credentials of every
destination that needs them, so install it with INSTALL_CONF and
0600 instead, as the rest of the tree does for configuration under
/etc.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
The script creates and updates the private Python virtualenv that the
Python module runs from, but the package is built with --disable-python,
so there is nothing for it to do. It cannot even parse its arguments on
a stock image:
/usr/bin/syslog-ng-update-virtualenv: line 30: getopt: not found
Error parsing arguments
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
The package ships ten executables and only the daemon reports a
version, so the generic per-executable probe warns for the other nine:
syslog-ng: 9/10 executables are missing version 4.12.0
The tools next to the daemon print their usage instead, which the probe
cannot read a version from. Assert the version on syslog-ng itself.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
In actions-shared-workflows the version is now checked in
test-version.sh, while test.sh is left for the generic tests.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_VERSION substitutes p->_p (1.9.17_p2) for a valid apk version, but the
binaries print the real 1.9.17p2, so the generic per-executable version
probe reports "no executables provided version" and fails. Add a
test-version.sh that matches the version string compiled into the binary.
Executing sudo under QEMU emulation (e.g. mips_24kc) hangs indefinitely, so
neither test-version.sh nor test.sh runs it any more: the version is read
from the binary and test.sh only checks the installed files.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
The patch blanked INSTALL_OWNER in Makefile.in so the staged install does
not chown to install_uid/install_gid, which fails when building as an
unprivileged user. sudo already supports this: the top-level install rule
recurses with "INSTALL_OWNER=$(INSTALL_OWNER)" into every sub-make, and
sudo's own "package" target does "make install INSTALL_OWNER=" for exactly
this fakeroot case. Pass INSTALL_OWNER= via MAKE_INSTALL_FLAGS instead of
carrying a patch.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Remove the quiet mode flag (-q) from grep in version check commands
to ensure that their stdout output is visible.
While at it, switch the remaining regex matches (perl, sscep, awscli) to
fixed-string matching where appropriate, so that special characters in the
version string are matched literally.
For libzip, the zipcmp and zipmerge branches ran grep and then
unconditionally exited 0, so a version mismatch was never reported and
the version check override always passed.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Add 'procd_set_param file' for both the base config and the generated
config file so procd detects config changes and restarts rsyslogd.
Without this, procd_add_reload_trigger fires on config changes but
procd does not restart the service because the command line is
identical. This leaves stale configuration active until a manual
restart.
Signed-off-by: Michael Pfeifroth <michael.pfeifroth@westermo.com>
Add a 'sudo' system group at package-install time using the USERID
mechanism.
Rationale: sudoers configurations that grant privileges to the 'sudo'
group -- the near-universal Debian/Ubuntu idiom, e.g.
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
-- fail silently on OpenWrt today because no 'sudo' group exists in
/etc/group. sudo(8) logs 'unknown group: sudo' and the rule is skipped.
Users also cannot 'usermod -aG sudo <user>' without the group present,
so there is no straightforward way to delegate root without hand-editing
/etc/group or writing per-user sudoers snippets.
Seeding the group here matches how OpenWrt already handles other
service accounts (chrony, dbus, ntpd, ...): the USERID mechanism
creates them lazily via add_group_and_user in the postinst script.
No privileges are granted by default -- an administrator still has to
add users to the group and ship a sudoers rule that references it.
No numeric GID is pinned. The group name is what sudoers, addgroup(1),
and getgrnam() operate on; the numeric GID is invisible to sudo's
authorisation path and matters only for on-disk group ownership
metadata (e.g. 'chgrp sudo' persisted to shared storage) -- something
this package does not do. Letting add_group_and_user pick a dynamic
GID in the 32768+ range keeps sudo out of base-files' reserved
low-range group space and avoids any name-vs-number collision debate.
Bump PKG_RELEASE.
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
Each output flush runs in a coroutine whose stack was forced to 4096 (one
page). The HTTP output plugin overflows it and crashes with SIGSEGV after
the flush (issue #30113). Pin FLB_CORO_STACK_SIZE to upstream's own 64K
floor (FLB_CORO_STACK_SIZE_MIN_BYTE), which the musl-shrunk default undercuts.
Also add a regression test: drive the dummy input into the http output and
assert fluent-bit survives a few flush cycles instead of dying from a signal
(no listener needed -- the overflow happens while composing the request).
Fixes: https://github.com/openwrt/packages/issues/30113
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
* Add config file patch for proxy
* Add initscript for proxy
* Update Makefile and support files to bring proxy to parity with
agentd and server.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
* Genericize zabbix_server initscript.
* Add shellcheck overrides where needed.
* Add a 'never_root' config option (default true) that determines
whether server starts as an unprivileged user or starts as root and
drops to an unprivileged user (unless config is changed so it always
runs as root).
* Bring zabbix_agentd initscript to parity with zabbix_server for the
initscript and configuration.
* Tweak Makefile to reduce repetition
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Tweak the agentd and server patch configurations and bring agentd and
server confgurations to parity.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
This is the upstream recommendation, and fits with our separation
of agent and server.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
While the frontend can mostly operate without php8-mod-simplexml, when
trying to import XML templates the user only gets unhelpful error
messages and is unlikely to realize the module is required for that
functionality. Therefore have the frontend depend on php8-mod-simplexml.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
The sysctl file increases max files to allow the default full
complement of discovery workers, however this is probably not a
hard requirement and such a conf not shipped elsewhere in tree, so
leave that to the user to configure. (The syslog messages from
zabbix-server and/or zabbix-proxy provided the needed information).
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Reorganize the extra files under the 'files' dir so that it is more
clear where they go and what they are for, and to avoid having a
disorganized mass of files.
Move the extra C source file out of files and into 'src-extra'.
Avoid treating openwrt-supplied params files as configuration data.
Instead have them in a separate directory under /usr/share which is
included in the zabbix_agentd configuration by default. This also better
follows the FHS.
Hopefully these changes make sense on their own, as well as helping the
CI accept the changes.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Add the user config file directories (/etc/zabbix_x.conf.d) to the
list of directories and files to preserve across sysupgrade.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Drop 001-configure-make-libyaml-default-on-explicit.patch; it was a backport
of upstream commit c5c24486 which is now part of this release, so configure.ac
already makes libyaml default-on and fails fast when yaml-0.1 is missing.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Now that post install is running properly, when CI executes the
tests the zabbix-extra-* packages that have a posinst exit the
post install with an error if ubusd is not running.
Drop the error code from killall with no usbd running to fix this.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Allow CI to pass the version check for packages with executables
with not version output.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
* Update version to latest upstream LTS version.
* The Makefile was using an overly clever means to be compact that the
CI webhook, and possibly the CI test container, didn't understand. We
unroll that logic, and have more usual install and conffiles sections.
In the process we fix a missing conffile install for zbbix-proxy*
packages.
* Whitespace fixups
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Update 4.2.0 -> 5.0.8 and adopt maintainership. fluent-bit segfaulted at
startup on every musl target: under GCC 14 the upstream C-TLS probe no longer
compiles (undeclared __tls_get_addr), so the pthread_key fallback calls
pthread_getspecific() before pthread_key_create() and derefs a NULL tsd array
on musl (glibc is unaffected). Force -DFLB_HAVE_C_TLS=Yes for __thread TLS.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
The way we use -lfts isn't particularly consistent. There's no reason
it shouldn't be. glibc users shouldn't have to deal with someone else's
lack of rigor.
Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>