Re: [LEDE-DEV] running stuff as !root

2016-05-17 Thread David Lang
On Wed, 18 May 2016, John Crispin wrote: On 18/05/2016 08:08, David Lang wrote: On Wed, 18 May 2016, John Crispin wrote: Hi, we had previously started building the infra for running stuff as !root. so far we have added * the userid/gid stuff * acl on ubus things that i know are missing *

[LEDE-DEV] procd and self-daemonizing processes with no useful foreground option

2016-05-17 Thread Daniel Dickinson
Hi, Rather than patching every package that daemonizes itself but doesn't provide a useful (non-debug mode) option for foregrounding the process (or not option at all for foreground operation), would it possible to do as systemd has done and support both a directly supervised instance (i.e. what i

Re: [LEDE-DEV] Why does multiple instance dnsmasq work with jails but not without?

2016-05-17 Thread Daniel Curran-Dickinson
On 16-05-18 02:32 AM, John Crispin wrote: > it probably checks for a pid file or similar to see if it is already > running. inside a jail it essentially only runs once as it is a > container. so i would guess its pid file of proc table related. It is most likely proc table then (I had separate pid

Re: [LEDE-DEV] Why does multiple instance dnsmasq work with jails but not without?

2016-05-17 Thread John Crispin
On 18/05/2016 08:24, Daniel Dickinson wrote: > Hi all, > > I had a patch that I submitted to the openwrt list sometime back that > launched multiple instances of dnsmasq, so long as the instances were > either tied to specific, non-overlapping, interfaces, or used different > dns port, but at le

Re: [LEDE-DEV] running stuff as !root

2016-05-17 Thread John Crispin
On 18/05/2016 08:09, Daniel Curran-Dickinson wrote: > On 16-05-18 01:05 AM, John Crispin wrote: >> Hi, >> >> we had previously started building the infra for running stuff as !root. >> so far we have added >> >> * the userid/gid stuff >> * acl on ubus >> >> things that i know are missing >> >> *

Re: [LEDE-DEV] running stuff as !root

2016-05-17 Thread John Crispin
On 18/05/2016 08:08, David Lang wrote: > On Wed, 18 May 2016, John Crispin wrote: > >> Hi, >> >> we had previously started building the infra for running stuff as !root. >> so far we have added >> >> * the userid/gid stuff >> * acl on ubus >> >> things that i know are missing >> >> * handling ne

[LEDE-DEV] Why does multiple instance dnsmasq work with jails but not without?

2016-05-17 Thread Daniel Dickinson
Hi all, I had a patch that I submitted to the openwrt list sometime back that launched multiple instances of dnsmasq, so long as the instances were either tied to specific, non-overlapping, interfaces, or used different dns port, but at least in the case of different interfaces it only worked (to

[LEDE-DEV] Why does multiple instance dnsmasq work with jails but not without?

2016-05-17 Thread Daniel Curran-Dickinson
Hi all, I had a patch that I submitted to the openwrt list sometime back that launched multiple instances of dnsmasq, so long as the instances were either tied to specific, non-overlapping, interfaces, or used different dns port, but at least in the case of different interfaces it only worked (to

Re: [LEDE-DEV] [PATCH] ramips: fix 8M WT3020 image creation

2016-05-17 Thread John Crispin
not sure what went wrong Applying: ramips: fix 8M WT3020 image creation fatal: corrupt patch at line 19 i applied the patch manually as it is a regression and pushed it to source.git John On 18/05/2016 03:47, Gerhard Bertelsmann wrote: > fix image size for 8M version : 4M -> 8M > > Sig

Re: [LEDE-DEV] running stuff as !root

2016-05-17 Thread Daniel Curran-Dickinson
On 16-05-18 01:05 AM, John Crispin wrote: > Hi, > > we had previously started building the infra for running stuff as !root. > so far we have added > > * the userid/gid stuff > * acl on ubus > > things that i know are missing > > * handling network ports < 1024 > > what am i missing ? can anyo

Re: [LEDE-DEV] [PATCH 1/4] ar71xx: Add support for initramfs images for OpenMesh devices

2016-05-17 Thread John Crispin
On 17/05/2016 17:51, Sven Eckelmann wrote: > Signed-off-by: Sven Eckelmann > --- > target/linux/ar71xx/image/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target/linux/ar71xx/image/Makefile > b/target/linux/ar71xx/image/Makefile > index 96122d7..384eba8 100644 > --- a/targ

Re: [LEDE-DEV] running stuff as !root

2016-05-17 Thread David Lang
On Wed, 18 May 2016, John Crispin wrote: Hi, we had previously started building the infra for running stuff as !root. so far we have added * the userid/gid stuff * acl on ubus things that i know are missing * handling network ports < 1024 what am i missing ? can anyone think of other issues

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread Daniel Curran-Dickinson
On 16-05-18 12:52 AM, John Crispin wrote: > > >> I was told in the past by one of founding LEDE team members (who shall >> rename nameless unless he chooses to comment himself), that if I really >> wanted to participate in OpenWrt community that I needed to be on IRC >> (in a private mail to me).

Re: [LEDE-DEV] [PATCH RFC 2/2] x86: lift generic x86-32 target

2016-05-17 Thread Russell Senior
> Felix Fietkau writes: > On 2016-05-17 23:12, Daniel Golle wrote: >> * build for pentium4 instead of i486 * enable PAE * enable EFI >> support * enable KVM guest and host support > I like this change, but I think I'll wait a bit before applying it to > see if anybody else has some comments

[LEDE-DEV] running stuff as !root

2016-05-17 Thread John Crispin
Hi, we had previously started building the infra for running stuff as !root. so far we have added * the userid/gid stuff * acl on ubus things that i know are missing * handling network ports < 1024 what am i missing ? can anyone think of other issues we need to address before we change uid to

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread John Crispin
On 18/05/2016 03:10, Daniel Curran-Dickinson wrote: > On 16-05-17 05:22 AM, John Crispin wrote: >> well that is status quo, IRC is used to discuss real time stuff and give >> user support. >> >> all other stuff is on the list. meetings being the only thing still on >> IRC due to lack of better op

[LEDE-DEV] [PATCH 2/2] ath9k: Fix TX99 support

2016-05-17 Thread Helmut Schaa
The patch 300-ath9k-force-rx_clear-when-disabling-rx.patch broke TX99 support in ath9k. Fix the patch by only applying rx_clear if TX99 mode is not used. Signed-off-by: Helmut Schaa --- .../patches/300-ath9k-force-rx_clear-when-disabling-rx.patch | 12 1 file changed, 8 insertions(+

[LEDE-DEV] [PATCH 1/2] mac80211: Allow selection of TX99 support in ath9k

2016-05-17 Thread Helmut Schaa
Add a new config option to enable TX99 support in ath9k. Signed-off-by: Helmut Schaa --- package/kernel/mac80211/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 5bbb7da..e395f81 100644 --- a/package/kerne

[LEDE-DEV] [PATCH 2/2] ath9k: Fix TX99 support

2016-05-17 Thread Helmut Schaa
The patch 300-ath9k-force-rx_clear-when-disabling-rx.patch broke TX99 support in ath9k. Fix the patch by only applying rx_clear if TX99 mode is not used. Signed-off-by: Helmut Schaa --- .../patches/300-ath9k-force-rx_clear-when-disabling-rx.patch | 12 1 file changed, 8 insertions(+

[LEDE-DEV] [PATCH] ramips: fix 8M WT3020 image creation

2016-05-17 Thread Gerhard Bertelsmann
fix image size for 8M version : 4M -> 8M Signed-off-by: Gerhard Bertelsmann --- target/linux/ramips/image/mt7620.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 862f016..f236ba5 100644 --- a

Re: [LEDE-DEV] [BUG]Procd not marking /dev/snd entries correctly

2016-05-17 Thread Rosen Penev
When plugging in a USB sound card, procd(or whatever handles hotplugging by default) marks /dev/snd entries as being owned by root:root preventing non root users from using the sound card. For reference, my desktop has /dev/snd as being owned by root:audio with 666 permissions. LEDE has it at 644 b

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread Daniel Curran-Dickinson
On 16-05-17 05:22 AM, John Crispin wrote: > well that is status quo, IRC is used to discuss real time stuff and give > user support. > > all other stuff is on the list. meetings being the only thing still on > IRC due to lack of better options right now. meetings are however held > late during EU

Re: [LEDE-DEV] [PATCH RFC 2/2] x86: lift generic x86-32 target

2016-05-17 Thread Felix Fietkau
On 2016-05-17 23:12, Daniel Golle wrote: > * build for pentium4 instead of i486 > * enable PAE > * enable EFI support > * enable KVM guest and host support > > Signed-off-by: Daniel Golle I like this change, but I think I'll wait a bit before applying it to see if anybody else has some comments a

[LEDE-DEV] [PATCH RFC 2/2] x86: lift generic x86-32 target

2016-05-17 Thread Daniel Golle
* build for pentium4 instead of i486 * enable PAE * enable EFI support * enable KVM guest and host support Signed-off-by: Daniel Golle --- target/linux/x86/generic/config-default | 98 + target/linux/x86/generic/target.mk | 8 ++- 2 files changed, 94 inserti

[LEDE-DEV] [PATCH RFC 1/2] x86: reorganize x86_32 support

2016-05-17 Thread Daniel Golle
copy current 'generic' target to new 'legacy' target. Signed-off-by: Daniel Golle --- target/linux/x86/Makefile | 2 +- target/linux/x86/legacy/config-default | 218 target/linux/x86/legacy/profiles/000-Generic.mk | 18 ++ target/linux/x

[LEDE-DEV] [PATCH 1/4] ar71xx: Add support for initramfs images for OpenMesh devices

2016-05-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/image/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 96122d7..384eba8 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/

[LEDE-DEV] [PATCH 2/4] ar71xx: Generate sysupgrade images for OpenMesh devices

2016-05-17 Thread Sven Eckelmann
Some OpenWrt based firmwares like Gluon expect that a sysupgrade image exists when a device firmware can be updated via sysupgrade. This image wasn't created until now because OpenMesh devices use the same image for factory and sysupgrade flash. Copying the image from *factory.bin to *sysupgrade.bi

[LEDE-DEV] [PATCH 3/4] ar71xx: Move OpenMesh image target validation into subfunction

2016-05-17 Thread Sven Eckelmann
The platform_check_image_openmesh function used break statements to signal that the board name matched the image target. This worked because the sysupgrade binary checked the image inside a loop. The break statement stopped the loop and skipped any additional check. Instead the check should be don

[LEDE-DEV] [PATCH 4/4] ar71xx: Allow OpenMesh CE images with more than 3 files

2016-05-17 Thread Sven Eckelmann
The CE image format used by OpenMesh can contain extra blocks which are not used for flashing. Only the first three embedded images (fwupgrade.cfg, kernel, rootfs) are required in this order to successfully flash an image via sysupgrade. All extra embedded images should be ignored for the available

[LEDE-DEV] [PATCH 2/2] utils: use O_PATH when opening /dev

2016-05-17 Thread Jo-Philipp Wich
Use the O_PATH and O_DIRECTORY flags when opening the "/dev" path for the subsequent openat() call to ensure that it is indeed a directory. Signed-off-by: Jo-Philipp Wich --- utils/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.c b/utils/utils.c index ebf

[LEDE-DEV] [PATCH 1/2] inittab: use more robust dev_exist() implementation

2016-05-17 Thread Jo-Philipp Wich
Rework the dev_exist() function to use openat() in order to resolve the device file relative to the "/dev" directory. Drop the now unused dev_open() function. Signed-off-by: Jo-Philipp Wich --- inittab.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) dif

[LEDE-DEV] [PATCH 0/2] procd: dev_exist() refactoring

2016-05-17 Thread Jo-Philipp Wich
Refactor the dev_exist() function of inittab.c to use openat() instead of the race condition prone chdir()/open()/chdir() sequence. The refactoring allows us to drop the now unused dev_open(), so kill it. While we touch openat() things, also change patch_fd() of utils.c to use stricter flags when

Re: [LEDE-DEV] libubox, procd: init process hangs

2016-05-17 Thread Mats Karrman
On 2016-05-17 13:29, Felix Fietkau wrote: I just took a look at the code and uloop's processing of signals looked a bit racy to me. I've pushed a commit that makes it use signalfd if available. I also found that waitpid wasn't being retried on signal interrupt, so I added an extra check there. T

[LEDE-DEV] [PATCH 4/5] inittab: use patch_stdio() for stdio redirection

2016-05-17 Thread Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich --- inittab.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/inittab.c b/inittab.c index f8f0218..622601a 100644 --- a/inittab.c +++ b/inittab.c @@ -93,22 +93,14 @@ static int dev_exist(const char *dev) static void fork_worker(s

[LEDE-DEV] [PATCH 5/5] initd: fix descriptor leak

2016-05-17 Thread Jo-Philipp Wich
Close the descriptor to /tmp/.preinit returned by creat() in order to avoid an fd leak in the init process. Signed-off-by: Jo-Philipp Wich --- initd/preinit.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/initd/preinit.c b/initd/preinit.c index 51fde31..729978e 1006

[LEDE-DEV] [PATCH 2/5] initd: use patch_stdio() for early console setup

2016-05-17 Thread Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich --- initd/early.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/initd/early.c b/initd/early.c index 4343516..accfc1d 100644 --- a/initd/early.c +++ b/initd/early.c @@ -21,6 +21,7 @@ #include #include +#include "../util

[LEDE-DEV] [PATCH 3/5] initd: use patch_stdio() for kmodloader stdio redirection

2016-05-17 Thread Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich --- initd/init.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/initd/init.c b/initd/init.c index 4d17563..e453cff 100644 --- a/initd/init.c +++ b/initd/init.c @@ -86,17 +86,9 @@ main(int argc, char **argv) if (!pid) {

[LEDE-DEV] [PATCH 0/5] procd: stdio handling rework

2016-05-17 Thread Jo-Philipp Wich
Currently the vi editor will fail with "vi: can't read user input" in failsafe mode because procd patches all stdio channels to the same descriptor, then sets nonblocking mode on stderr which causes stdin to end up in nonblocking mode as well. Programs like "vi" expect read operations on stdin to

[LEDE-DEV] [PATCH 1/5] utils: add patch_fd() and patch_stdio() helpers

2016-05-17 Thread Jo-Philipp Wich
Introduce two new helper functions to deal with stdio redirecation in a uniform, reliable manner: The patch_fd() function will attempt to redirect the given fd number to the specified file, using the supplied flags for the open() syscall. When the device is NULL, "/dev/null" is asumed, when the de

Re: [LEDE-DEV] Bug REPORT: Lantiq - XRX200 - UBIFS image not built

2016-05-17 Thread Mathias Kresin
2016-05-17 11:51 GMT+02:00 Paul Rowland : > I updated sources and packages 15 minutes ago, did a make clean and a build. > The expected file, lede-lantiq-xrx200-BTHOMEHUBV5A-ubifs-sysupgrade.tar, was > not created. It is selected in menuconfig and built fine on Friday. The culprit is felix commi

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread Fernando Frediani
Fully agree. Fernando On 17 May 2016 at 06:02, Bruno Randolf wrote: > On 17/05/16 09:46, andrew wrote: >> How about something like rocket.chat or one of the opensource self >> hosted alternatives? > > Don't get me wrong, the problem is not IRC itself, there are definetly > good uses for it. I'm

Re: [LEDE-DEV] libubox, procd: init process hangs

2016-05-17 Thread Felix Fietkau
Hi Mats, On 2016-05-17 12:03, Mats Karrman wrote: > Hi Felix, others, > > I have been experiencing problems with the init scripts dispatch > suddenly stopping (indefinitely). > This happens maybe once in 100 reboots. > After inserting a new start script that launches another daemon > (cgrulesen

[LEDE-DEV] Consider using GerritHub for code review

2016-05-17 Thread Dmitry Teselkin
Hi, As you may know many projects (e.g. Android, OpenStack) are using Gerrit [1] as a tool for code-review. I've found recently that there is an integrated solution for Gerrit + GitHub = GerritHub [2]. What do you think about using it for reviewing requests instead of 'pull requests'? [1] https:/

[LEDE-DEV] libubox, procd: init process hangs

2016-05-17 Thread Mats Karrman
Hi Felix, others, I have been experiencing problems with the init scripts dispatch suddenly stopping (indefinitely). This happens maybe once in 100 reboots. After inserting a new start script that launches another daemon (cgrulesengd) very early in the boot process, the failures started to co

Re: [LEDE-DEV] Bug REPORT: Lantiq - XRX200 - UBIFS image not built

2016-05-17 Thread John Crispin
On 17/05/2016 11:51, Paul Rowland wrote: > I updated sources and packages 15 minutes ago, did a make clean and a build. > The expected file, lede-lantiq-xrx200-BTHOMEHUBV5A-ubifs-sysupgrade.tar, was > not created. It is selected in menuconfig and built fine on Friday. > Hi Paul, thanks for t

[LEDE-DEV] Bug REPORT: Lantiq - XRX200 - UBIFS image not built

2016-05-17 Thread Paul Rowland
I updated sources and packages 15 minutes ago, did a make clean and a build. The expected file, lede-lantiq-xrx200-BTHOMEHUBV5A-ubifs-sysupgrade.tar, was not created. It is selected in menuconfig and built fine on Friday. ___ Lede-dev mailing list Lede

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread John Crispin
On 17/05/2016 11:02, Bruno Randolf wrote: > On 17/05/16 09:46, andrew wrote: >> How about something like rocket.chat or one of the opensource self >> hosted alternatives? > > Don't get me wrong, the problem is not IRC itself, there are definetly > good uses for it. I'm NOT saying people should n

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread Bruno Randolf
On 17/05/16 09:46, andrew wrote: > How about something like rocket.chat or one of the opensource self > hosted alternatives? Don't get me wrong, the problem is not IRC itself, there are definetly good uses for it. I'm NOT saying people should not use IRC to coordinate. My point is: hanging out (as

Re: [LEDE-DEV] A request not making IRC necessary to be part of the action

2016-05-17 Thread andrew
How about something like rocket.chat or one of the opensource self hosted alternatives? On Mon, 2016-05-16 at 17:29 -0400, Daniel Curran-Dickinson wrote: > On 16-05-16 05:18 PM, Daniel Curran-Dickinson wrote: > > > > The objective is so that you don't have isolated pools of TZ's > > where one > >