The following changes are backported from the master branch
bdcb075 libfstools: fix matching device name
(f038a61 on master)
ef2d438 fstools: use -Wno-format-truncation instead of -Wno-error=format-truncation
(c43ae11 on master)
d361923 build: disable the format-truncation warning error to fix gcc 7 build errors
(a19f2b3 on master)
cddc830 libfstools: silence mkfs.{ext4,f2fs}
(88d48d5 on master)
be5004c libfstools: add basic documentation of mount functions
(92b4c2c on master)
34d36c2 add missing includes
(7d78836 on master)
A previously added hotfix was replaced by a git commit, hence the patch
file is removed and we got instead
45c2a6f libfstools: fix multiple volume_identify usages with the same volume
(633a8d0 on master)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The following commits have been cherry-picked into the lede-17.01
branch of procd, listed here in git-log-order ie. with head first:
89918c8 system: introduce new attribute board_name
(79bbe6d and 453116e on master branch)
8297c38 preinit: define _GNU_SOURCE
(e5b963a on master branch)
8fd57dd upgraded: cmake: Find and include uloop.h
(e5ff8ca on master branch)
6b0da20 hotplug: fix a memory leak in handle_button_complete()
(f367ec6 on master branch)
558ffb5 service/service_stopped(): fix a use-after-free
(796ba3b on master branch)
22f89e1 upgraded: define __GNU_SOURCE
(e7bb2c8 on master branch)
6e8ea8b rcS: add missing fcntl.h include
(992b796 on master branch)
cd5225d procd/rcS: Use /dev/null as stdin
(d42b21e on master branch)
5131bec procd: Log initscript output prefixed with script name
(1247db1 on master branch)
225b18d procd: Don't use syslog before its initialization
(8d720b2 on master branch)
889442c procd: Add missing \n in debug message
(2555474 on master branch)
2716228 procd: service gets deleted when its last instance is freed
(8f218f5 on master branch)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Fixes build issues with some toolchains that don't add lcrypt in the default
search paths:
CMakeFiles/rpcd.dir/session.c.o: In function `rpc_login_test_password':
build_dir/target-mipsel-linux-gnu/rpcd-2016-12-03-0577cfc1/session.c:823: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes FS#684 with commit 21a4bd0
Changes since current version. All changes except the ones prefixed
with asterisks are for bugfixes. Module aliases awareness is expected
by the kernel to be a basic facility and is required for properly
initializing wireguard.
16f7e16 syslog: remove unnecessary sizeof struct between messages
21a4bd0 kmodloader: modprobe: return 0 for loaded modules
3dc78a4 kmodloader: don't store aliases info in struct module
c553354 cmake: fix typo
8973576 kmodloader: fix not being able to find some modules
fce9382 cmake: Check for getrandom system call
ac2d43e kmodloader: support '-q' quiet option
*f8d3d16 ubox: Add an option for more accurate timestamps in log
14839f0 kmodloader: make insert_module() idempotent
*6e3c6dc kmodloader: add module alias awareness
9371411 kmodloader: fix out-of-bound access when parsing .modinfo
a62c946 kmodloader: modprobe: skip possible command line arguments
*46a4b5f kmodloader: log to kmsg when loading directories of modules
eacc426 kmodloader: remove redundant glob wildcard char
8488bb5 ubox: Initialize conditionally uninitialized variabled
db070f1 ubox: Fix some memory leaks
acc48b5 kmodloader: Fix typo in error message
Size comparison on x86_64 host
function old new delta
main 2190 2344 +154
scan_module_folder 665 793 +128
alloc_module_node - 113 +113
.rodata 946 1036 +90
alloc_module 202 245 +43
free_modules 77 119 +42
load_modprobe 209 237 +28
scan_loaded_modules 241 265 +24
avl_modcmp 45 67 +22
insert_module 204 224 +20
find_module 13 30 +17
static.optind@@GLIBC_2 - 4 +4
static.load_moddeps 118 117 -1
scan_module_folders 55 54 -1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 10/2 up/down: 685/-2) Total: 683 bytes
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Commit 5c20a4fec9 ("ubox: turn logd into a separate package") changed
the PKG_SOURCE_DATE which is also included in the tar file. This change
resulted in a new tar with a different hash, but the sha256 hash was not
updated. Fix the sha256 hash value in this commit to match what would be
created from git and what is already on the mirror.
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
5f91241 procd: add cancel_timeout on rc scripts when a runtime_timeout is specified
961dc69 procd: stop service using SIGKILL if SIGTERM failed to do so
Fixes FS#516.
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 946d1dfb87d41cf9ffb487522f6a84a5e87edafb)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Fixes compatibility issues with glibc 2.25
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2ffb80bc9f829f81878b12a10b0a352d3f76c421)
c09e4f0 ubusd: fix incomplete copy of shared buf during queue-ing
453b87f cli: add support for subscribing to objects
6eb3c96 cli: do not use default timeout for listen
dfe3383 libubus: reset ctx->sock.error when doing ubus reconnect
34c6e81 cli: fix listen_timeout compile issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Adds the following fixes:
91acde6 libubus: do not modify uloop_cancelled
763b9b2 libubus: reset ctx->sock.eof to fix reconnect issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Default trigger action timeout was added to procd.sh in commit f88e3a4c0
(procd: add default timeout for reload trigger actions)
However, the timeout value was not placed under the correct JSON-script
array nesting level and thus did not apply.
To fix this and make the timeout actually apply to the reload triggers,
we place it in the correct scope, that is the per-trigger array.
Fixes: f88e3a4c0a
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
A given signal-name is now converted to the corresonding number. In general
it's good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.
A real world example is signal 10, which is BUS on ramips and USR1 on PPC.
All users of 'procd_send_signal' must change their code to reflect this.
Signed-off-by: Bastian Bittorf <bb@npl.de>
Clarify opkg's messages related to downloads:
* more visible error message for package list download failure
* separate error message for signature file download error
* if wget returns 4, signal the network error more clearly
* remove '.' from end of filenames and URLs
* try signature check only if the package list was downloaded ok.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
- Adds support for passing file descriptors in ubus invoke requests
- Fixes clearing pending timers on ubus_shutdown()
- Fixes checking the amount of written data in ubusd
- Fixes an ubusd crash when trying to subscribe to system objects
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Currently system log is always included as a part of ubox. Add logd as a
seperate package and add it to default packages list.
Signed-off-by: Andrej Vlasic <andrej.vlasic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
opkg doesn't have BUILD_VARIANTs anymore, so the previously defined
PKG_BUILD_DIR would lead to a weird 'opkg-' path component.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This reverts the following commits:
fbe522d120278ad007ee863888e44f96daf6352fcfd83555fc
This seems to trigger some mconf bugs when built with all feeds
packages, so I will try to find a less intrusive solution before the
release.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
It has never been used by default (due to being too bloated), and it is
properly replaced by usign (which has been the default for a long time
now).
Remove this feature to simplify the build system
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Brings in the following changes:
84b530a732b1 libfstools: Check return values for fread and system
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Opkg's builtin decompression code is unsuitable to process nested archives as
it uses a single shared state and relies on undefined seek behaviour for pipes.
Rework the extraction logic to use the external gzip command as I/O filter for
decompressing data and remove the builtin inflate code entirely.
This shrinks the final opkg binary by about 4KB and results in less runtime
memory consumption due to efficient use of vfork() and less copy-on-write
operations in the forked child.
Rework by Felix: create a thread that relays data to the gzip process
instead of using a fragile poll loop
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Opkg's builtin decompression code is unsuitable to process nested archives as
it uses a single shared state and relies on undefined seek behaviour for pipes.
Rework the extraction logic to use the external gzip command as I/O filter for
decompressing data and remove the builtin inflate code entirely.
This shrinks the final opkg binary by about 4KB and results in less runtime
memory consumption due to efficient use of vfork() and less copy-on-write
operations in the forked child.
Rework by Felix: create a thread that relays data to the gzip process
instead of using a fragile poll loop
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Add procd_send_signal which allows to send an optional specified
kill signal to one specified or all instances of a given service.
By default SIGHUP is sent if no signal is specified
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Update procd to latest HEAD in order to introduce support for services signals:
- Adds a new service.signal ubus call to send a kill() signal to one or all
running instances of a given service
- Adds a new "reload_signal" property which allows service init scripts to
request procd to send a specific kill() signal on reload, instead of
stopping and restarting running processes
Also fixes some potential memory leaks reported by cppcheck and an environment
variable corruption in the trace command.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>