Commit graph

22328 commits

Author SHA1 Message Date
Peter Stadler
f62599d27e nginx-util: use UCI for server configuration
**tl;dr:** The functions `{add,del}_ssl` modify a server
section of the UCI config if there is no `.conf` file with
the same name in `/etc/nginx/conf.d/`.

Then `init_lan` creates `/var/lib/nginx/uci.conf` files by
copying the `/etc/nginx/uci.conf.template` and standard
options from the UCI config; additionally the special path
`logd` can be used in `{access,error}_log`.

The init does not change the configuration beside
re-creating self-signed certificates when needed. This is
also the only purpose of the new `check_ssl`, which is
installed as yearly cron job.

**Initialization:**

Invoking `nginx-util init_lan` parses the UCI configuration
for package `nginx`. It creates a server part in
`/var/lib/nginx/uci.conf` for each `section server '$name'`
by copying all UCI options but the following:

* `option uci_manage_ssl` is skipped. It is set to
'self-signed' by `nginx-util add_ssl $name`, removed by
`nginx-util del_ssl $name` and used by
`nginx-util check_ssl` (see below).

* `logd` as path in `error_log` or `access_log` writes them
to STDERR respective STDOUT, which are fowarded by Nginx's
init to the log daemon. Specifically:
`option error_log 'logd'` becomes `error_log stderr;` and
`option access_log 'logd openwrt'` becomes
`access_log /proc/self/fd/1 openwrt;`

Other `[option|list] key 'value'` entries just become
`key value;` directives.

The init.d calls internally also `check_ssl` for rebuilding
self-signed SSL certificates if needed (see below). And it
still sets up `/var/lib/nginx/lan{,_ssl}.listen` files as
it is doing in the current version (so they stay available).

**Defaults:**

The package installs the file `/etc/nginx/restrict_locally`
containing allow/deny directives for restricting the access
to LAN addresses by including it into a server part. The
default server '_lan' includes this file and listens on all
IPs (instead of only the local IPs as it did before; other
servers do not need to listen explicitly on the local IPs
anymore). The default server is contained together with a
server that redirects HTTP requests for inexistent URLs to
HTTPS in the UCI configuration file `/etc/config/nginx`.
Furthermore, the packages installs a
`/etc/nginx/uci.conf.template` containing the current setup
and a marker, which will be replaced by the created UCI
servers when calling `init_lan`.

**Other:**

If there is a file named `/etc/nginx/conf.d/$name.conf` the
functions `init_lan`, `add_ssl $name` and `del_ssl $name`
will use that file instead of a UCI server section (this is
similar to the current version).

Else it selects the UCI `section server $name`, or, when
there is no such section, it searches for the first one
having `option server_name '… $name …'`. For this section:

* `nginx-util add_ssl $name` will add to it:
`option uci_manage_ssl 'self-signed'`
`option ssl_certificate '/etc/nginx/conf.d/$name.crt'`
`option ssl_certificate_key '/etc/nginx/conf.d/$name.key'`
`option ssl_session_cache 'shared:SSL:32k'`
`option ssl_session_timeout '64m'`
If these options are already present, they will stay the
same; just the first option `uci_manage_ssl` will always be
changed to 'self-signed'. The command also changes all
`listen` list items to use port 443 and ssl instead of port
80 (without ssl). If they stated another port than 80
before, they are kept the same. Furthermore, it creates a
self-signed SSL certificate if necessary, i.e., if there is
no *valid* certificate and key at the locations given by
the options `ssl_certificate` and `ssl_certificate_key`.

* `nginx-util del_ssl $name` checks if `uci_manage_ssl` is
set 'self-signed' in the corresponding UCI section. Only
then it removes all of the above options regardless of the
value looking just at the key name. Then, it also changes
all `listen` list items to use port 80 (without ssl)
instead of port 443 with ssl. If stating another port than
443, they are kept the same. Furthermore, it removes the
SSL certificate and key that were indicated by
`ssl_certificate{,_key}`.

* `nginx-util check_ssl` looks through all server sections
of the UCI config for `uci_manage_ssl 'self-signed'`. On
every hit it checks if the SSL certificate-key-pair
indicated by the options `ssl_certificate{,_key}` is
expired. Then it re-creates a self-signed certificate.
If there exists at least one `section server` with
`uci_manage_ssl 'self-signed'`, it will try to install
itself as cron job. If there are no such sections, it
removes that cron job if possible.

For installing a ssl certificate and key managed by
another app, you can call:
`nginx-util add_ssl $name $manager $crtpath $keypath`
Hereby `$name` is as above, `$manager` is an arbitrary
string, and the the ssl certificate and its key are
indicated by their absolute path. If you want to remove
the directives again, then you can use:
`nginx-util del_ssl $name $manager`

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
2020-11-28 18:34:39 +01:00
Rosen Penev
1fcb02973f
Merge pull request #14047 from neheb/lnq
libnetfilter-queue: import and update
2020-11-28 05:48:54 -08:00
Rosen Penev
9f9cf35a8d
Merge pull request #14048 from neheb/lnl
libnetfilter-log: import from baser
2020-11-28 05:48:02 -08:00
Rosen Penev
dc9f4bf26b
Merge pull request #14049 from neheb/lnctt
libnetfilter-cttimeout: import from base
2020-11-28 05:47:29 -08:00
Rosen Penev
755e27ce22
Merge pull request #14050 from neheb/lncth
libnetfilter-cthelper: import from base
2020-11-28 05:46:59 -08:00
Rosen Penev
9ec405756b
libnetfilter-cthelper: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 23:16:46 -08:00
Rosen Penev
367662534d
libnetfilter-cttimeout: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 23:15:55 -08:00
Rosen Penev
e281311f24
libnetfilter-log: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 23:14:52 -08:00
Luiz Angelo Daros de Luca
56eb4078e5 gst1-plugins-base: fix build with no module
gst1-plugins-base might be required only for its libraries, not modules.
However, InstallDev tries to copy them unconditionally, failing when
no modules are selected/compiled.

Fixes #13973

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2020-11-28 09:08:30 +02:00
Robert Högberg
2fa91f4c9f graphicsmagick: Fix package description typo
Signed-off-by: Robert Högberg <robert.hogberg@gmail.com>
2020-11-28 09:07:20 +02:00
Rosen Penev
5f9faebec4
Merge pull request #14046 from neheb/libusb-c
libusb-compat: fix libusb-config
2020-11-27 22:48:54 -08:00
Rosen Penev
b60aa5ffdb
libnetfilter-queue: update to 1.0.5
Switch to normal tarballs for simplicity.

Removed upstream patch.

Fixed license information.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 22:28:18 -08:00
Rosen Penev
3be9bc06ba
libnetfilter-queue: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 22:28:17 -08:00
Rosen Penev
0095cb34e9
libusb-compat: fix libusb-config
Turns out, some packages like serdisplib actually use libusb-config.
Fix the paths in it so that they can work properly. Method taken from
libpng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 22:13:36 -08:00
Rosen Penev
38c0d7084a
Merge pull request #14041 from abajk/coremark-threads
coremark: allow to build with multithrading support
2020-11-27 18:38:44 -08:00
Rosen Penev
e315b72fb2
Merge pull request #14042 from oleg-derevenetz/bwping-2.2
bwping: update to version 2.2
2020-11-27 14:30:00 -08:00
Oleg Derevenetz
9cf0efc4f6 bwping: update to version 2.2
Signed-off-by: Oleg Derevenetz <oleg-derevenetz@yandex.ru>
2020-11-27 23:12:14 +03:00
Aleksander Jan Bajkowski
63b8c73cf1 coremark: allow to build with multithrading support
This patch allows to build coremark with multithreading support.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2020-11-27 20:43:36 +01:00
Rosen Penev
e8d60c034a
Merge pull request #14019 from neheb/lsof
lsof: update to 4.94.0
2020-11-27 09:30:49 -08:00
Rosen Penev
4b4ac939cc
Merge pull request #14036 from neheb/libroxml
libroxml: import from base
2020-11-27 02:36:19 -08:00
Rosen Penev
1652382429
Merge pull request #14034 from nxhack/node_12200
node: update to v12.20.0
2020-11-27 00:28:12 -08:00
Rosen Penev
9dd1d919cb
Merge pull request #14035 from nxhack/hid_132
node-hid: update to 1.3.2
2020-11-27 00:27:40 -08:00
Rosen Penev
99b347905e
libroxml: switch to CMake
Added patch to fix compilation with gcc10.

Fixed license information.

Fix ABI_VERSION.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-26 23:55:08 -08:00
Rosen Penev
ca320864ec
libroxml: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-26 23:55:08 -08:00
Hirokazu MORIKAWA
48cf176fb9 node-hid: update to 1.3.2
update to 1.3.2

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2020-11-27 09:01:11 +09:00
Hirokazu MORIKAWA
86e5f1baa9 node: update to v12.20.0
Update to v12.20.0
Take over maintainership from John Crispin

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2020-11-27 08:58:31 +09:00
Dirk Brenken
84f20951b3
travelmate: fix possible race condition
* prevent possible duplicate script execution due to
  multiple ntp events in parallel

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-11-26 22:39:15 +01:00
Rosen Penev
6dc567270e
Merge pull request #14031 from ptpt52/ext_ip_reserved_ignore
net/miniupnpd: ext_ip_reserved_ignore support
2020-11-26 10:28:23 -08:00
Stijn Tintel
02bb406983
Merge pull request #14030 from dengqf6/curl
curl: fix build against OpenSSL
2020-11-26 20:20:35 +02:00
Chen Minqiang
b76aa99194 net/miniupnpd: ext_ip_reserved_ignore support
This add an option to ignore ext_ip reserved
Enable this option in config by default.

Fixes: #13773

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-11-26 15:56:20 +08:00
DENG Qingfang
2f68b75a67 curl: fix build against OpenSSL
Ref: https://curl.se/mail/lib-2020-10/0037.html
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-11-26 14:47:55 +08:00
Rosen Penev
40086b9e56
Merge pull request #12030 from pprindeville/xtables-addons-include-xt_geoip_fetch
xtables-addons: include xt_geoip_fetch utility
2020-11-25 21:37:22 -08:00
Philip Prindeville
9781ef95cb xtables-addons: include xt_geoip_fetch utility
It's useful to be able to dump sections of the database by country
for scripting or just plain sanity checking.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-11-25 17:45:28 -07:00
Rosen Penev
233fe27d82
Merge pull request #14026 from neheb/hwl
hwloc: update to 2.3.0
2020-11-25 15:43:24 -08:00
Rosen Penev
d9fcef2baa
hwloc: update to 2.3.0
Added PKG_BUILD_PARALLEL for faster compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-25 15:35:04 -08:00
Rosen Penev
925275cad2
Merge pull request #13377 from micmac1/apa-faker
apache: use fakeroot instead of postinst script
2020-11-25 15:05:52 -08:00
Rosen Penev
d77df7b495
Merge pull request #13941 from jjm2473/master-fix-libtirpc-clang
libs/libtirpc: fix host compile with clang 12.0.0
2020-11-25 14:31:48 -08:00
Rosen Penev
1cf3c4a287
Merge pull request #14002 from olek2/coremark-bump
coremark: bump to 2020-09-16
2020-11-25 14:30:39 -08:00
Rosen Penev
c774cb16ee
Merge pull request #13942 from yangfl/master
libtorrent-rasterbar: add package
2020-11-25 14:30:19 -08:00
Rosen Penev
30bc508a2f
Merge pull request #14005 from pprindeville/issue#14004
avahi: incorrectly requires IFF_MULTICAST on point-to-point (tunnel) …
2020-11-25 14:29:27 -08:00
Rosen Penev
7c491c37be
Merge pull request #13960 from neheb/miniu
miniupnpd: update to 2.2.0
2020-11-25 14:28:51 -08:00
Rosen Penev
88a626d1ef
Merge pull request #13940 from Trotzky/watchcat-new-features
watchcat: add nopingtime option + refactoring
2020-11-25 14:28:37 -08:00
Rosen Penev
e0b388b078
Merge pull request #13926 from ja-pa/tor-0.4.4.6
tor: update to version 0.4.4.6 (security fix)
2020-11-25 14:27:57 -08:00
Rosen Penev
9b3a080c55
Merge pull request #14017 from neheb/aautom
automake: update to 1.16.3
2020-11-25 14:25:42 -08:00
Rosen Penev
3116b22dd3
Merge pull request #14012 from neheb/dmx
dmx_usb_module: update to 19.12.1
2020-11-25 14:23:25 -08:00
Rosen Penev
3cce7bdd72
Merge pull request #14014 from neheb/alsaa
alsa updates
2020-11-25 14:22:55 -08:00
Rosen Penev
f14d1960cf
Merge pull request #14011 from neheb/grlbb
glib2: update to 2.66.3
2020-11-25 14:22:44 -08:00
Rosen Penev
1fc7e49adc
Merge pull request #13990 from neheb/mtr
mtr: update to 0.94
2020-11-25 14:22:29 -08:00
Rosen Penev
21e96c8875
Merge pull request #13987 from neheb/onig
oniguruma: update to 6.9.6
2020-11-25 14:22:05 -08:00
Rosen Penev
24487afe1f
Merge pull request #14013 from neheb/curl
curl: update to 7.73.0
2020-11-25 14:21:54 -08:00