cxxabi.h is a useless header that libcxx does not include.
Remove indent on postint script. It should be on the same as the above
section.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
In the command read side, close the superfluous write end of the pipe
early to ensure that EOF is reliably detected. Without that change, splice
calls to read from the pipe will occasionally hang until the CGI process
is eventually killed due to timeout.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
musl doesn't support fts. But with the extra package musl-fts installed,
libzip picks up the fts header and fails at the linking stage:
zipcmp.c:(.text.startup+0x130): undefined reference to `fts_open'
/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: zipcmp.c:(.text.startup+0x172): undefined reference to `fts_read'
So with musl-fts we need to link in libfts. To address that this commits
patches the cmake setup to check if fts is available in libc itself or
in any external libfts.
So when musl-fts is installed on the system the setup will be the
following:
musl: use libfts
uclibc: use fts from libc
glibc: like uclibc
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Should fix the no previous prototype errors.
Also fixed the install paths. Now running this should be correct.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
tinycdb now installs a shared lib alongside the static archive. postfix
will use the shared lib, hence this commit updates the dependency.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
dnsdist picks up cdb.h but can't link in the static archive.
/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: /home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libcdb.a(cdb_init.o): relocation R_MIPS_26 against `fstat' can not be used when making a shared object; recompile with -fPIC
This commit extends the tinycdb Makefile to build and install as well
the shared library as well as the pic archive. dnsdist will then pick
the shared library.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The build needs protoc, otherwise it fails.
checking if we need to link in protobuf... yes
checking for PROTOBUF... yes
checking for protoc... no
configure: error: Protobuf requested but the protobuf compiler was not found
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently dnsdist is failing at packaging stage when lmdb is in staging:
make[4]: Leaving directory '/builder/shared-workdir/build/sdk/build_dir/target-x86_64_musl/dnsdist-1.4.0'
Package dnsdist is missing dependencies for the following libraries:
liblmdb.so
Makefile:109: recipe for target '/builder/shared-workdir/build/sdk/bin/packages/x86_64/packages/dnsdist_1.4.0-2_x86_64.ipk' failed
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
On some host machines (example: Gentoo amd64 no-multilib) by default
cmake will install libraries to lib64. But in OpenWrt the correct libdir
is lib (for instance the RPATH is set to lib). So you may end up with
libraries in lib64 while RPATH points to lib:
sk@darth ~/tmp/openwrt $ ldd staging_dir/hostpkg/bin/protoc
linux-vdso.so.1 (0x00007ffc741ea000)
libprotoc.so.3.8.0.0 => not found
libprotobuf.so.3.8.0.0 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0a8f7ea000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6 (0x00007f0a8f572000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0a8f427000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libgcc_s.so.1 (0x00007f0a8f40d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0a8f23c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0a8f827000)
sk@darth ~/tmp/openwrt $
Fix this by specifying the libdir during host builds.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
minidlna uses UUID to uniquely identify the media server
by default, if the "uuid" option is not specified in
its setting file it will try to autogenerate it by
reading MAC address.
This seems to fail on some devices resulting in random
UUID on reboot, and this causes confusion and issues as
for clients this is a new server and must be added to
the list.
In OpenWrt there are also devices where the system can't
read the true MAC address and it is therefore randomized
on reboot.
So, add a static UUID in the settings file.
Since each mindlna server should have a different UUID,
if the user has more than one OpenWrt device with
minidlna, he should change the UUID of the
additional devices.
Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
Implement a new "cgi-exec" applet which allows to invoke remote commands
and stream their stdandard output back to the client via HTTP. This is
needed in cases where large amounts of data or binary encoded contents
such as tar archives need to be transferred, which are unsuitable to be
transported via ubus directly.
The exec call is guarded by the same ACL semantics as rpcd's file plugin,
means in order to be able to execute a command remotely, the ubus session
identified by the given session ID must have read access to the "exec"
function of the "cgi-io" scope and an explicit "exec" permission rule for
the invoked command in the "file" scope.
In order to initiate a transfer, a POST request in x-www-form-urlencoded
format must be sent to the applet, with one field "sessionid" holding
the login session and another field "command" specifiying the commandline
to invoke.
Further optional fields are "filename" which - if present - will cause
the download applet to set a Content-Dispostition header and "mimetype"
which allows to let the applet respond with a specific type instead of
the default "application/octet-stream".
Below is an example for the required ACL rules to grant exec access to
both the "date" and "iptables" commands. The "date" rule specifies the
base name of the executable and thus allows invocation with arbitrary
parameters while the latter "iptables" rule merely allows one specific
set of arguments which must appear exactly in the given order.
ubus call session grant '{
"ubus_rpc_session": "...",
"scope": "cgi-io",
"objects": [
[ "exec", "read" ]
]
}'
ubus call session grant '{
"ubus_rpc_session": "...",
"scope": "file",
"objects": [
[ "/bin/date", "exec" ],
[ "/usr/sbin/iptables -n -v -L", "exec" ]
]
}'
Signed-off-by: Jo-Philipp Wich <jo@mein.io>