Re: [LEDE-DEV] [patch master 01/15] Double quote to prevent globbing and word splitting

2016-09-30 Thread Jan-Tarek Butt
Hi Lars, On 09/30/16 23:50, Lars Kruse wrote: > Hi Jan-Tarek, > > first of all: I am very happy to see your patches! Thanks :) > Whenever I took a look at some shell scripts in openwrt, I felt the strong > urge > to change many of the things you went out to fix. But until now I was always >

Re: [LEDE-DEV] Build ar71xx / 4MB with IPv6, Luci, OpenVPN (PolarSSL), Command, Watchcat, relay and printk without debug ?

2016-09-30 Thread Lars Kruse
Hello Daniel, Am Fri, 30 Sep 2016 18:39:39 +0300 schrieb Daniel Petre : > > CONFIG_TARGET_ROOTFS_SQUASHFS=y > > CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256 > > > > You could try setting the blocksize to 1024 - this should make a > > noticeable difference as squashfs can

Re: [LEDE-DEV] Automated shell code debugging

2016-09-30 Thread Lars Kruse
Hi, Am Sat, 1 Oct 2016 00:11:23 +0200 schrieb Martin Tippmann : > [..] > I'm not a shell pro but I found it very difficult to impossible to > write something that passes without any hints/errors. > > There is a way to avoid this by using special comments that prevent > shellcheck

Re: [LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, I think, this is just a change based on style preferences, or? Using single quotes specifically for situation where expansion is not intended feels quite explicite and clear to me - thus personally I would prefer to stick with single quotes instead of double quotes combined with

Re: [LEDE-DEV] [patch master 13/15] To read lines rather than words, pipe/redirect to a 'while read' loop

2016-09-30 Thread Lars Kruse
Hi, Am Fri, 30 Sep 2016 22:02:27 +0200 schrieb Jan-Tarek Butt : > --- > scripts/deptest.sh | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/scripts/deptest.sh b/scripts/deptest.sh > index 8c859ef..0b0e7a9 100755 > --- a/scripts/deptest.sh > +++

Re: [LEDE-DEV] [patch master 12/15] use * instead of @ to concatenate

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, Am Fri, 30 Sep 2016 22:02:26 +0200 schrieb Jan-Tarek Butt : > - cc="$@" > + cc="$*" as far as I understand $* and $@, there should be no difference in this context, or? Cheers, Lars ___ Lede-dev

Re: [LEDE-DEV] [patch master 11/15] Consider using { cmd1; cmd2; } >> file instead of individual redirects

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, Am Fri, 30 Sep 2016 22:02:25 +0200 schrieb Jan-Tarek Butt : > --- > scripts/config/lxdialog/check-lxdialog.sh | 16 +++- > scripts/diffconfig.sh | 16 +++- > scripts/ext-toolchain.sh | 43 >

Re: [LEDE-DEV] [patch master 10/15] quote literal {

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, Am Fri, 30 Sep 2016 22:02:24 +0200 schrieb Jan-Tarek Butt : > --- > scripts/getver.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/getver.sh b/scripts/getver.sh > index f8b4ed3..27f246e 100755 > --- a/scripts/getver.sh >

Re: [LEDE-DEV] [patch master 07/15] Quote to prevent word splitting

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, Am Fri, 30 Sep 2016 22:02:21 +0200 schrieb Jan-Tarek Butt : > diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh > index ef35b82..2946408 100755 > --- a/scripts/strip-kmod.sh > +++ b/scripts/strip-kmod.sh > @@ -50,6 +50,6 @@ $3 && $2 ~ /[brtd]/ && $3 !~

Re: [LEDE-DEV] [patch master 06/15] redirect matters, the 2>&1 has to be last.

2016-09-30 Thread Lars Kruse
Hi, Am Fri, 30 Sep 2016 22:02:20 +0200 schrieb Jan-Tarek Butt : > --- > scripts/make-ipkg-dir.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/make-ipkg-dir.sh b/scripts/make-ipkg-dir.sh > index 529e430..9e38df5 100755 > ---

Re: [LEDE-DEV] [patch master 05/15] Use cd ... || exit in case cd fails

2016-09-30 Thread Lars Kruse
Hi, Am Fri, 30 Sep 2016 22:02:19 +0200 schrieb Jan-Tarek Butt : > diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh > index 5cae341..9efcac5 100755 > --- a/scripts/clean-package.sh > +++ b/scripts/clean-package.sh > @@ -8,14 +8,14 @@ > exit 1 > } > cat

Re: [LEDE-DEV] [patch master 01/15] Double quote to prevent globbing and word splitting

2016-09-30 Thread Lars Kruse
Hi Jan-Tarek, first of all: I am very happy to see your patches! Whenever I took a look at some shell scripts in openwrt, I felt the strong urge to change many of the things you went out to fix. But until now I was always stopped by the sheer amount of changes necessary. Thank you! Am Fri, 30

[LEDE-DEV] Automated shell code debugging

2016-09-30 Thread Jan-Tarek Butt
Hi thogeter, I have a realy nice idea :) As a part of code quallity enhancemend and prevenition. We can do an ondemand daemon as engine to check all shell scrips. We can use the opensource Project shellcheck [0]. My idea is to do an insatnce on a server: This insatnce can pull the lede repo

Re: [LEDE-DEV] [patch master 00/15] shell code improvement for /scripts

2016-09-30 Thread Alberto Bursi
I'm suspecting he did use shellcheck.net (or its local version, shellcheck) to find the errors. That's a great tool to find all dumb mistakes and bad practices in scripts. It's also opensource: https://github.com/koalaman/shellcheck -Alberto On 09/30/2016 10:19 PM, John Crispin wrote: > >

Re: [LEDE-DEV] [patch master 00/15] shell code improvement for /scripts

2016-09-30 Thread Jan-Tarek Butt
On 09/30/16 22:19, John Crispin wrote: > On 30/09/2016 22:02, Jan-Tarek Butt wrote: >> Hi, >> >> I did some bugfixing and code quality improvement for >> all shell scrips inside the dir ./scripts. >> >> cheers >> Tarek > > > Hi Tarek, > > did you manually generate these or did you use some

Re: [LEDE-DEV] [packages for-15.05 PATCH 2/2] ffmpeg: backport AAC fix for multichannel mapping

2016-09-30 Thread Rafał Miłecki
On 30 September 2016 at 21:00, Ted Hess wrote: > Thanks for these updates - I manually merged them to for-15.05. > https://github.com/openwrt/packages/commit/9de3069a949d303dcafd52c6df11baa7c673b > 57f > > (Tried to include your SoB, but branch wouldn't allow force-push

Re: [LEDE-DEV] [patch master 00/15] shell code improvement for /scripts

2016-09-30 Thread John Crispin
On 30/09/2016 22:02, Jan-Tarek Butt wrote: > Hi, > > I did some bugfixing and code quality improvement for > all shell scrips inside the dir ./scripts. > > cheers > Tarek Hi Tarek, did you manually generate these or did you use some semantic patching tools. John > Jan-Tarek Butt

Re: [LEDE-DEV] dnsmasq: failed to load names from /etc/hosts: Permission denied

2016-09-30 Thread Arjen de Korte
Citeren Arjen de Korte : Same for /etc/ethers: Permission denied. This used to work fine (last version checked 1648), but now with 1725 I see the above problem. Possibly related, LuCI won't load anymore: Forbidden You don't have permission to access

[LEDE-DEV] [patch master 13/15] To read lines rather than words, pipe/redirect to a 'while read' loop

2016-09-30 Thread Jan-Tarek Butt
--- scripts/deptest.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deptest.sh b/scripts/deptest.sh index 8c859ef..0b0e7a9 100755 --- a/scripts/deptest.sh +++ b/scripts/deptest.sh @@ -86,9 +86,9 @@ test_package() # $1=pkgname [ -n "$pkg" -a -z

[LEDE-DEV] [patch master 05/15] Use cd ... || exit in case cd fails

2016-09-30 Thread Jan-Tarek Butt
--- scripts/clean-package.sh | 4 ++-- scripts/deptest.sh | 4 ++-- scripts/ext-toolchain.sh | 12 ++-- scripts/get_source_date_epoch.sh | 2 +- scripts/getver.sh| 2 +- scripts/patch-specs.sh | 2 +- scripts/sysupgrade-tar.sh

[LEDE-DEV] [patch master 11/15] Consider using { cmd1; cmd2; } >> file instead of individual redirects

2016-09-30 Thread Jan-Tarek Butt
--- scripts/config/lxdialog/check-lxdialog.sh | 16 +++- scripts/diffconfig.sh | 16 +++- scripts/ext-toolchain.sh | 43 +-- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git

[LEDE-DEV] [patch master 00/15] shell code improvement for /scripts

2016-09-30 Thread Jan-Tarek Butt
Hi, I did some bugfixing and code quality improvement for all shell scrips inside the dir ./scripts. cheers Tarek Jan-Tarek Butt (15): Double quote to prevent globbing and word splitting code style: remove whitespaces on end of lines Add and fix a shebang $/${} is unnecessary on

[LEDE-DEV] [patch master 10/15] quote literal {

2016-09-30 Thread Jan-Tarek Butt
--- scripts/getver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/getver.sh b/scripts/getver.sh index f8b4ed3..27f246e 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -25,8 +25,8 @@ try_git() { ;; *)

[LEDE-DEV] [patch master 14/15] Expressions don't expand in single quotes, use double quotes for that

2016-09-30 Thread Jan-Tarek Butt
--- scripts/deptest.sh | 2 +- scripts/ext-toolchain.sh | 24 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/deptest.sh b/scripts/deptest.sh index 0b0e7a9..2b156b3 100755 --- a/scripts/deptest.sh +++ b/scripts/deptest.sh @@ -88,7 +88,7 @@

[LEDE-DEV] [patch master 01/15] Double quote to prevent globbing and word splitting

2016-09-30 Thread Jan-Tarek Butt
--- scripts/arm-magic.sh | 12 ++-- scripts/clean-package.sh | 2 +- scripts/combined-ext-image.sh| 10 +- scripts/combined-image.sh| 2 +- scripts/deptest.sh | 12 ++-- scripts/ext-toolchain.sh | 16

[LEDE-DEV] [patch master 02/15] code style: remove whitespaces on end of lines

2016-09-30 Thread Jan-Tarek Butt
--- scripts/combined-ext-image.sh | 4 ++-- scripts/flashing/flash.sh | 6 +++--- scripts/patch-kernel.sh | 20 ++-- scripts/rstrip.sh | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/combined-ext-image.sh

[LEDE-DEV] [patch master 09/15] Argument mixes string and array. Use $*

2016-09-30 Thread Jan-Tarek Butt
--- scripts/mkits.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mkits.sh b/scripts/mkits.sh index cf176af..937f712 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -41,7 +41,7 @@ do k ) KERNEL=$OPTARG;; o ) OUTPUT=$OPTARG;;

[LEDE-DEV] [patch master 03/15] Add and fix a shebang

2016-09-30 Thread Jan-Tarek Butt
--- scripts/freebsd.sh | 1 + scripts/om-fwupgradecfg-gen.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/freebsd.sh b/scripts/freebsd.sh index 3107861..a6cca0e 100644 --- a/scripts/freebsd.sh +++ b/scripts/freebsd.sh @@ -1 +1,2 @@ +#!/bin/sh env

[LEDE-DEV] [patch master 04/15] $/${} is unnecessary on arithmetic variables

2016-09-30 Thread Jan-Tarek Butt
--- scripts/om-fwupgradecfg-gen.sh | 10 +- scripts/ubinize-image.sh | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index 93f6794..5cbb8d1 100644 --- a/scripts/om-fwupgradecfg-gen.sh

[LEDE-DEV] [patch master 12/15] use * instead of @ to concatenate

2016-09-30 Thread Jan-Tarek Butt
--- scripts/config/lxdialog/check-lxdialog.sh | 4 ++-- scripts/ubinize-image.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/config/lxdialog/check-lxdialog.sh b/scripts/config/lxdialog/check-lxdialog.sh index 02f05ad..0791372 100644 ---

Re: [LEDE-DEV] [packages for-15.05 PATCH 2/2] ffmpeg: backport AAC fix for multichannel mapping

2016-09-30 Thread Ted Hess
Thanks for these updates - I manually merged them to for-15.05. https://github.com/openwrt/packages/commit/9de3069a949d303dcafd52c6df11baa7c673b 57f (Tried to include your SoB, but branch wouldn't allow force-push after amend -- sorry) /ted On Fri, 2016-09-30 at 14:17 +0200, Rafał Miłecki

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Koen Vandeputte
On 2016-09-30 17:43, Felix Fietkau wrote: On 2016-09-30 17:23, Koen Vandeputte wrote: On 2016-09-30 16:42, Felix Fietkau wrote: On 2016-09-30 16:25, Koen Vandeputte wrote: On 2016-09-30 15:56, Felix Fietkau wrote: On 2016-09-30 15:10, Koen Vandeputte wrote: On 2016-09-30 15:00, Felix

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Felix Fietkau
On 2016-09-30 17:23, Koen Vandeputte wrote: > > > On 2016-09-30 16:42, Felix Fietkau wrote: >> On 2016-09-30 16:25, Koen Vandeputte wrote: >>> >>> On 2016-09-30 15:56, Felix Fietkau wrote: On 2016-09-30 15:10, Koen Vandeputte wrote: > On 2016-09-30 15:00, Felix Fietkau wrote: >> On

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Koen Vandeputte
On 2016-09-30 16:42, Felix Fietkau wrote: On 2016-09-30 16:25, Koen Vandeputte wrote: On 2016-09-30 15:56, Felix Fietkau wrote: On 2016-09-30 15:10, Koen Vandeputte wrote: On 2016-09-30 15:00, Felix Fietkau wrote: On 2016-09-30 14:57, Koen Vandeputte wrote: On 2016-09-30 14:31, Felix

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Felix Fietkau
On 2016-09-30 16:25, Koen Vandeputte wrote: > > > On 2016-09-30 15:56, Felix Fietkau wrote: >> On 2016-09-30 15:10, Koen Vandeputte wrote: >>> On 2016-09-30 15:00, Felix Fietkau wrote: On 2016-09-30 14:57, Koen Vandeputte wrote: > On 2016-09-30 14:31, Felix Fietkau wrote: >> On

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Koen Vandeputte
Did a stupid test: printing the full UCI table contents: http://pastebin.com/raw/8LSLXZ7N 'system' also does not pop up here .. but when requested separately it does .. Is there a limit to the items? Koen On 2016-09-30 16:25, Koen Vandeputte wrote: On 2016-09-30 15:56, Felix Fietkau

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Koen Vandeputte
On 2016-09-30 15:56, Felix Fietkau wrote: On 2016-09-30 15:10, Koen Vandeputte wrote: On 2016-09-30 15:00, Felix Fietkau wrote: On 2016-09-30 14:57, Koen Vandeputte wrote: On 2016-09-30 14:31, Felix Fietkau wrote: On 2016-09-30 09:48, Koen Vandeputte wrote: The general "uci commit" does

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Felix Fietkau
On 2016-09-30 15:10, Koen Vandeputte wrote: > > On 2016-09-30 15:00, Felix Fietkau wrote: >> On 2016-09-30 14:57, Koen Vandeputte wrote: >>> >>> On 2016-09-30 14:31, Felix Fietkau wrote: On 2016-09-30 09:48, Koen Vandeputte wrote: > The general "uci commit" does NOT store the generated

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Felix Fietkau
On 2016-09-30 14:57, Koen Vandeputte wrote: > > > On 2016-09-30 14:31, Felix Fietkau wrote: >> On 2016-09-30 09:48, Koen Vandeputte wrote: >>> The general "uci commit" does NOT store the generated sections. >>> >>> Fix this for now by storing each part separately. >> I'd prefer getting the real

Re: [LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Felix Fietkau
On 2016-09-30 09:48, Koen Vandeputte wrote: > The general "uci commit" does NOT store the generated sections. > > Fix this for now by storing each part separately. I'd prefer getting the real bug fixed instead of just working around it like this. - Felix

[LEDE-DEV] [packages for-15.05 PATCH 1/2] ffmpeg: upgrade to 2.6.9

2016-09-30 Thread Rafał Miłecki
From: Rafał Miłecki It's the latest release from 2.6 branch we use for 15.05. Signed-off-by: Rafał Miłecki --- multimedia/ffmpeg/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/ffmpeg/Makefile

[LEDE-DEV] [packages for-15.05 PATCH 2/2] ffmpeg: backport AAC fix for multichannel mapping

2016-09-30 Thread Rafał Miłecki
From: Rafał Miłecki It's a backport from 2.7 branch that fixes parsing some AAC formats. What makes this quite important is that broken parsing was leading to many loop iterations, scanning taking a lot of time and allocating a lot of memory. Parsing 1.3 GB MPEG TS file could

[LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation

2016-09-30 Thread Koen Vandeputte
The general "uci commit" does NOT store the generated sections. Fix this for now by storing each part separately. Signed-off-by: Koen Vandeputte --- package/base-files/files/bin/config_generate | 4 1 file changed, 4 insertions(+) diff --git

[LEDE-DEV] [PATCH 1/2] base-files: also generate configs when current is empty (FS#193)

2016-09-30 Thread Koen Vandeputte
If a config does not exist, an empty file is created to store the newly generated one. - If a powercut happens during generation, it is not stored - UCI commit does NOT store the generated configs to file on 1st clean boot If such a case happens, an empty file exists and it is never regenerated

[LEDE-DEV] [PATCH v2] kernel: update kernel 4.4 to version 4.4.22

2016-09-30 Thread Stijn Segers
Forgot to update kernel-version.mk, so updated patch. Compile-tested on x86/64 and ar71xx; run-tested on x86/64 and ar71xx. Signed-off-by: Stijn Segers --- include/kernel-version.mk | 4 ++--