[PATCH 2/3] scripts: mkhash fix return code handling

2020-07-16 Thread Paul Spooren
If hashing a file fails mkhash shouldn't just silently fail. Now check after each call of `hash_file()` the return and exit early in case of errors. The return value which was previously ignored and would always return 0. Signed-off-by: Paul Spooren --- scripts/mkhash.c | 5 +++-- 1 file

[PATCH 3/3] scripts: mkhash fail on hashing a folder

2020-07-16 Thread Paul Spooren
mkhash currently returns the hash of an empty input when trying to hash a folder. This can be missleading in caseswhere e.g. an env variable is undefined which should contain a filename. `mkhash ./path/to/$FILE` would exit with code 0 and return a legit looking checksum. A better behaviour would

[PATCH 1/3] scripts: mkhash show -n option in usage

2020-07-16 Thread Paul Spooren
The -n option prints the filename of hashed files next to the calculated checksum. Reflect that in the usage message. user@dawn:~/src/openwrt/openwrt$ ./a.out md5 -n .config eb06db36e7b6751cb18801945e46bf5d .config Signed-off-by: Paul Spooren --- scripts/mkhash.c | 5 - 1 file changed, 4

[PATCH] build: use mkhash for IPK metadata checksums

2020-07-16 Thread Paul Spooren
When setting the option IPK_FILES_CHECKSUMS the build system stores checksums of all package file as metadata. In combination with pkg_check this allows to see if a package is broken, e.g. caused by bad flash. To create those checksums the tool `sha256sum` were used while the rest of OpenWrt uses

Re: [RFC] usage of mkhash, sha256sum and md5sum

2020-07-16 Thread Paul Spooren
On 16.07.20 09:36, Felix Fietkau wrote: On 2020-07-16 21:18, Paul Spooren wrote: Hi, On 15.07.20 22:54, Felix Fietkau wrote: On 2020-07-16 04:06, Paul Spooren wrote: Hi, the OpenWrt system requires the calculation of both md5 and sha256 sums at various places, this is partly done via a

Re: [RFC] usage of mkhash, sha256sum and md5sum

2020-07-16 Thread Felix Fietkau
On 2020-07-16 21:18, Paul Spooren wrote: > Hi, > > On 15.07.20 22:54, Felix Fietkau wrote: >> On 2020-07-16 04:06, Paul Spooren wrote: >>> Hi, >>> >>> the OpenWrt system requires the calculation of both md5 and sha256 sums >>> at various places, this is partly done via a small C file in >>>

Re: [RFC] usage of mkhash, sha256sum and md5sum

2020-07-16 Thread Paul Spooren
Hi, On 15.07.20 22:54, Felix Fietkau wrote: On 2020-07-16 04:06, Paul Spooren wrote: Hi, the OpenWrt system requires the calculation of both md5 and sha256 sums at various places, this is partly done via a small C file in ./scripts/mkhash.c and partly by using a sha256sum binary. A ancient

[PATCH] package/comgt: Handle bind/unbind events

2020-07-16 Thread Arjun AK
This script was expecting only add/remove events which has not been the case since Kernel 4.12 (which added bind/unbind). Bind events were getting treated as remove events which would cause hotplugged 3g modems to not work. More info: https://lkml.org/lkml/2018/12/23/128

[PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
Hi, this is now the right patch that does: Set `priorized_matching` to the latest provider with maximum priority, such that it is similar to the other selections (especially `good_pkg_by_name`). So, we have consistency between using `opkg install apkg` and installing a package that

Re: [PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
Sorry, this is the wrong patch. Please ignore it. On 16.07.20 16:28, Peter Stadler wrote: Set `priorized_matching` to the latest provider with maximum priority, such that it is similar to the other selections (especially `good_pkg_by_name`). So, we have consistency between using `opkg install

[PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
Set `priorized_matching` to the latest provider with maximum priority, such that it is similar to the other selections (especially `good_pkg_by_name`). So, we have consistency between using `opkg install apkg` and installing a package that `DEPENDS:=+apkg` (if there are two providers for `apkg`).

[PATCH v2 1/1] wireless-regdb: add country selection

2020-07-16 Thread Florian Eckert
Until now it has not been possible to remove countries from the regdb. The packages has been extended, so that it is now possible to add or omit individual countries in the regdb during package compile time. You can now add countries to a blacklist or whitelist to customize the regdb. In the

RE: [PATCH v2 3/6] base-files: fwtool: implement compatibility check for images

2020-07-16 Thread mail
> -Original Message- > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] > On Behalf Of Bjørn Mork > Sent: Donnerstag, 16. Juli 2020 10:10 > To: Paul Spooren > Cc: Adrian Schmutzler ; openwrt- > de...@lists.openwrt.org > Subject: Re: [PATCH v2 3/6] base-files: fwtool:

RE: [PATCH v2 5/6] mvebu: implement compatibility version for DSA migration

2020-07-16 Thread mail
> -Original Message- > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] > On Behalf Of Paul Spooren > Sent: Donnerstag, 16. Juli 2020 06:18 > To: Adrian Schmutzler ; openwrt- > de...@lists.openwrt.org > Subject: Re: [PATCH v2 5/6] mvebu: implement compatibility version

RE: [PATCH v2 4/6] base-files: fwtool: make compat_version backward compatible

2020-07-16 Thread mail
> -Original Message- > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] > On Behalf Of Paul Spooren > Sent: Donnerstag, 16. Juli 2020 06:16 > To: Adrian Schmutzler ; openwrt- > de...@lists.openwrt.org > Subject: Re: [PATCH v2 4/6] base-files: fwtool: make compat_version

Re: [RFC] usage of mkhash, sha256sum and md5sum

2020-07-16 Thread Felix Fietkau
On 2020-07-16 04:06, Paul Spooren wrote: > Hi, > > the OpenWrt system requires the calculation of both md5 and sha256 sums > at various places, this is partly done via a small C file in > ./scripts/mkhash.c and partly by using a sha256sum binary. A ancient > wrapper ./scripts/md5sum is added

Re: [PATCH v2 3/6] base-files: fwtool: implement compatibility check for images

2020-07-16 Thread Bjørn Mork
Paul Spooren writes: >> Major version increment: >> This is meant for potential (rare) cases where sysupgrade is >> not possible at all, because it would break the device. >> In this case, a warning will be printed, and -n won't help. > > What are those rare cases? I just can't think of anything