Re: [LEDE-DEV] OpenWRT tree vs LEDE tree

2016-05-19 Thread David Lang

On Thu, 19 May 2016, Daniel Curran-Dickinson wrote:


Do I think there are potentially problems, like my, and others,
impressions, that there is a fair amount of back channel (private) email
that *isn't* part of the public discussion that I thing is contrary to
the stated goal of transparency, if if the only reason is they think
it's just trivial or trying to hash things out?  Then yes, I think there
is *too much* back channel mail, and that if they're *serious* about
transparency they will fix that, even if it's hard to adopt that working
style.

You know I personally am not afraid to go on the record with my thoughts
and opinions, and I think that kind of approach is what it takes to do
transparency right, if it can be uncomfortable and keeps a history of
thing one might wish were not on the record.



regarding the open decision-making process: *the* channel for any kind
of serious discussion should be the open mailing list.
- as others pointed out, irc plain does not work for such stuff. the
  whole concept of meetings (or generally real-time communication about
  non-trivial matters) doesn't work for many people, so just scratch it.
- alone the fact that "important stuff" happens "out of band" and needs
  to be actively collected by those "passively interested" is a problem.
  probably the problem that triggered bjoern's mail in the first place.


Exactly.  It seems like there is still a lot of back channel talk that
is not public.


Guys, give them a little time to transition here.

Not all conversations should be public.

does the concept of "don't play with matches in a powder magazine" make sense?

negotiations and discussions of blame/hurt feelings don't work well if there is 
a large crowd of hecklers around. They (both LEDE and OpenWRT folks) need to be 
able to meet and discuss history and the effects that it will have going forward 
without people second guessing every move and parsing every word for hidden 
meanings.


The LEDE folks flubbed the announcemnt, but that was only a couple weeks ago. 
These are people working on this part-time, they have families and jobs to deal 
with. It is going to take them time to figure out what and how to change and 
communicate the details between them.


Would you really like it if they started announcing changes, only to have other 
LEDE folks contradict them?


Focus on Code and Tools, you know, technical stuff. Let them have a little 
breathing room to figure out the governence stuff.


Watch what's changing, make suggestions, sure. But tone down the demands and 
criticism until they actually show that they aren't willing to change. So far 
they've seemed very willing to tweak things in response to suggestions.


David Lang

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] how to update a package to a new upstream version was: Re: How to start?

2016-05-19 Thread David Lang

On Thu, 19 May 2016, Gabriel F.C. Mazzocato wrote:


2016-05-19 17:51 GMT-03:00 David Lang :


Is this something that's not already packaged for LEDE/OpenWRT?

It's far more complex to add something new than to just select different
options that are already configured.



Yeah. Currently iptables is at 1.4.21 version at both dists. I was
trying to bump to 1.6.0 and if successful, upload a diff to the dev
team. Tryied through Quilt too using the patch source, almost got it.
The kmod-ipt-* I was trying to build from the source (xtables_$$$.c).


Ok, then your question isn't how to configure OpenWRT/LEDE but rather how to 
update a package to a new version.


That's a question I don't know enough to answerbut by framing the question 
better, you may get more appropriate help (and or different search terms will 
help you find the info)


David Lang

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] OpenWRT tree vs LEDE tree

2016-05-19 Thread Daniel Curran-Dickinson
> anyway, that's my perspective as an outsider (who has 15 years of
> experience in some *big* openly governed communities) ...

Since you obviously feel there are other communities doing this right,
perhaps you'd like to share the *names* of these examples so that LEDE
can look at what they're doing as a reference.  Assuming of course this
isn't just implying more than is actually the case...

Regards,

Daniel

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] ath79: enable LNA for TpLink CPE510 on GPIO 18 & 19

2016-05-19 Thread Alexander Couzens
The LNA improves the rx path up to ~20dbm on those devices.
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
index 8bf5c0f..5cb052a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
@@ -30,6 +30,9 @@
 #define CPE510_GPIO_LED_L3 15
 #define CPE510_GPIO_LED_L4 16
 
+#define CPE510_GPIO_EXTERNAL_LNA0  18
+#define CPE510_GPIO_EXTERNAL_LNA1  19
+
 #define CPE510_GPIO_BTN_RESET  4
 
 #define CPE510_KEYS_POLL_INTERVAL  20 /* msecs */
@@ -93,6 +96,9 @@ static void __init cpe510_setup(void)
ARRAY_SIZE(cpe510_gpio_keys),
cpe510_gpio_keys);
 
+   ath79_wmac_set_ext_lna_gpio(0, CPE510_GPIO_EXTERNAL_LNA0);
+   ath79_wmac_set_ext_lna_gpio(1, CPE510_GPIO_EXTERNAL_LNA1);
+
ath79_register_m25p80(NULL);
 
ath79_register_mdio(1, 0);
-- 
2.8.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] ath79: enable LNA for TpLink CPE510 on GPIO 18 & 19

2016-05-19 Thread Alexander Couzens
The LNA improves the rx path up to ~20dbm on those devices.
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
index 8bf5c0f..5cb052a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
@@ -30,6 +30,9 @@
 #define CPE510_GPIO_LED_L3 15
 #define CPE510_GPIO_LED_L4 16
 
+#define CPE510_GPIO_EXTERNAL_LNA0  18
+#define CPE510_GPIO_EXTERNAL_LNA1  19
+
 #define CPE510_GPIO_BTN_RESET  4
 
 #define CPE510_KEYS_POLL_INTERVAL  20 /* msecs */
@@ -93,6 +96,9 @@ static void __init cpe510_setup(void)
ARRAY_SIZE(cpe510_gpio_keys),
cpe510_gpio_keys);
 
+   ath79_wmac_set_ext_lna_gpio(0, CPE510_GPIO_EXTERNAL_LNA0);
+   ath79_wmac_set_ext_lna_gpio(1, CPE510_GPIO_EXTERNAL_LNA1);
+
ath79_register_m25p80(NULL);
 
ath79_register_mdio(1, 0);
-- 
2.8.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] nvram: install init.d quirks script on brcm47xx only

2016-05-19 Thread Rafał Miłecki
It contains some quirks for old MIPS devices.

Signed-off-by: Rafał Miłecki 
---
 package/utils/nvram/Makefile | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/utils/nvram/Makefile b/package/utils/nvram/Makefile
index ace6a97..c5a4ca4 100644
--- a/package/utils/nvram/Makefile
+++ b/package/utils/nvram/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nvram
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
@@ -45,10 +45,12 @@ define Build/Compile
 endef
 
 define Package/nvram/install
-   $(INSTALL_DIR) $(1)/etc/init.d
-   $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
+ifneq ($(CONFIG_TARGET_brcm47xx),)
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
+endif
 endef
 
 $(eval $(call BuildPackage,nvram))
-- 
1.8.4.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] busybox: sysntpd - Support for NTP servers received via DHCP(v6)

2016-05-19 Thread Jo-Philipp Wich
Hi Hans,

staged into https://git.lede-project.org/?p=lede/jow/staging.git

A few improvement ideas though;

 - maybe we can make the jsonfilter dependency conditionally depending
   on the ntpd applet
 - maybe pipe the ubus interface status dump directly to jsonfilter
 - is there any reason to not make "use_dhcp" the default?

~ Jo

On 05/19/2016 06:57 PM, Hans Dedecker wrote:
> The busybox ntpd utility currently uses ntp servers specified in uci.
> This patch allows the ntpd utility to use NTP servers received via DHCP(v6)
> Following uci parameters have been added:
> use_dhcp : enables NTP server config via DHCP(v6)
> dhcp_interface : use NTP servers received only on the specified DHCP(v6) 
> interfaces; if empty all interfaces are considered
> 
> Signed-off-by: Hans Dedecker 
> ---
> 
> The patch is based on a previous discussion held on the OpenWRT-devel mailing 
> list
> (https://lists.openwrt.org/pipermail/openwrt-devel/2016-January/039081.html) 
> as per Felix's
> comments this solution is based on procd interface service triggers
> 
>  package/utils/busybox/Makefile  |  2 +-
>  package/utils/busybox/files/sysntpd | 43 
> -
>  2 files changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
> index 24c064c..24e0e11 100644
> --- a/package/utils/busybox/Makefile
> +++ b/package/utils/busybox/Makefile
> @@ -42,7 +42,7 @@ define Package/busybox
>MAINTAINER:=Felix Fietkau 
>TITLE:=Core utilities for embedded Linux
>URL:=http://busybox.net/
> -  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam
> +  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam +jsonfilter
>MENU:=1
>  endef
>  
> diff --git a/package/utils/busybox/files/sysntpd 
> b/package/utils/busybox/files/sysntpd
> index f73bb83..5c663d7 100755
> --- a/package/utils/busybox/files/sysntpd
> +++ b/package/utils/busybox/files/sysntpd
> @@ -7,13 +7,35 @@ USE_PROCD=1
>  PROG=/usr/sbin/ntpd
>  HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
>  
> +get_dhcp_ntp_servers() {
> + local interfaces="$1"
> + local filter="*"
> + local network_dump interface ntpservers ntpserver
> +
> + network_dump=$(ubus call network.interface dump)
> + for interface in $interfaces; do
> + [ "$filter" = "*" ] && filter="@.interface='$interface'" || 
> filter="$filter,@.interface='$interface'"
> + done
> +
> + ntpservers=$(jsonfilter -s "$network_dump" -e 
> "@.interface[$filter]['data']['ntpserver']")
> +
> + for ntpserver in $ntpservers; do
> + local duplicate=0
> + local entry
> + for entry in $server; do
> + [ "$ntpserver" = "$entry" ] && duplicate=1
> + done
> + [ "$duplicate" = 0 ] && server="$server $ntpserver"
> + done
> +}
> +
>  validate_ntp_section() {
>   uci_validate_section system timeserver "${1}" \
> - 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
> + 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 
> 'use_dhcp:bool:0' 'dhcp_interface:list(string)'
>  }
>  
>  start_service() {
> - local server enabled enable_server peer
> + local server enabled enable_server use_dhcp dhcp_interface peer
>  
>   validate_ntp_section ntp || {
>   echo "validation failed"
> @@ -22,6 +44,8 @@ start_service() {
>  
>   [ $enabled = 0 ] && return
>  
> + [ $use_dhcp = 1 ] && get_dhcp_ntp_servers "$dhcp_interface"
> +
>   [ -z "$server" ] && return
>  
>   procd_open_instance
> @@ -35,8 +59,17 @@ start_service() {
>   procd_close_instance
>  }
>  
> -service_triggers()
> -{
> - procd_add_reload_trigger "system"
> +service_triggers() {
> + local script name
> +
> + script=$(readlink -f "$initscript")
> + name=$(basename ${script:-$initscript})
> +
> + procd_open_trigger
> + procd_add_config_trigger "config.change" "system" /etc/init.d/$name 
> reload
> +
> + procd_add_raw_trigger "interface.*" 2000 /etc/init.d/$name reload
> + procd_close_trigger
> +
>   procd_add_validation validate_ntp_section
>  }
> 


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] curl: update to 7.49

2016-05-19 Thread Dirk Neukirchen
fixes:
 CVE-2016-3739: TLS certificate check bypass with mbedTLS/PolarSSL

- remove crypto auth compile fix
curl changelog of 7.46 states its fixed

- fix mbedtls and cyassl usability #19621 :
add path to certificate file (from Mozilla via curl) and
provide this in a new package

tested on ar71xx w. curl/mbedtls/wolfssl

Signed-off-by: Dirk Neukirchen 
---
 package/network/utils/curl/Makefile| 15 ++---
 .../utils/curl/patches/200-no_docs_tests.patch | 10 -
 .../curl/patches/300-fix-disable-crypto-auth.patch | 25 --
 ...10-polarssl-disable-runtime-version-check.patch |  4 ++--
 4 files changed, 14 insertions(+), 40 deletions(-)
 delete mode 100644 
package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch

diff --git a/package/network/utils/curl/Makefile 
b/package/network/utils/curl/Makefile
index af38ed4..4b41ac3 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.48.0
+PKG_VERSION:=7.49.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
ftp://ftp.planetmirror.com/pub/curl/ \
http://www.mirrormonster.com/curl/download/ \
http://curl.mirrors.cyberservers.net/download/
-PKG_MD5SUM:=d42e0fc34a5cace5739631cc040974fe
+PKG_MD5SUM:=7416aaff4a9210b43edda7615ffa4169
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
@@ -109,7 +109,6 @@ CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--disable-manual \
-   --without-ca-bundle \
--without-nss \
--without-libmetalink \
--without-librtmp \
@@ -117,11 +116,11 @@ CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
\
$(if $(CONFIG_LIBCURL_AXTLS),--with-axtls="$(STAGING_DIR)/usr" 
--without-ca-path,--without-axtls) \
-   $(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr" 
--without-ca-path,--without-cyassl) \
-   $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" 
--with-ca-path=/etc/ssl/certs,--without-gnutls) \
-   $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" 
--with-ca-path=/etc/ssl/certs,--without-ssl) \
-   $(if $(CONFIG_LIBCURL_POLARSSL),--with-polarssl="$(STAGING_DIR)/usr" 
--with-ca-path=/etc/ssl/certs,--without-polarssl) \
-   $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr" 
--without-ca-path,--without-mbedtls) \
+   $(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr" 
--without-ca-path 
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \
+   $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" 
--without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \
+   $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" 
--without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \
+   $(if $(CONFIG_LIBCURL_POLARSSL),--with-polarssl="$(STAGING_DIR)/usr" 
--without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-polarssl) \
+   $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr" 
--without-ca-path 
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \
\
$(if 
$(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn) \
$(if 
$(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \
diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch 
b/package/network/utils/curl/patches/200-no_docs_tests.patch
index 4ac5bad..6f86d4c 100644
--- a/package/network/utils/curl/patches/200-no_docs_tests.patch
+++ b/package/network/utils/curl/patches/200-no_docs_tests.patch
@@ -3,8 +3,8 @@
 @@ -150,7 +150,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP)
  bin_SCRIPTS = curl-config
  
- SUBDIRS = lib src include scripts
--DIST_SUBDIRS = $(SUBDIRS) tests packages docs
+ SUBDIRS = lib src include
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts
 +DIST_SUBDIRS = $(SUBDIRS) packages
  
  pkgconfigdir = $(libdir)/pkgconfig
@@ -14,9 +14,9 @@
 @@ -611,7 +611,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP)
  
  bin_SCRIPTS = curl-config
- SUBDIRS = lib src include scripts
--DIST_SUBDIRS = $(SUBDIRS) tests packages docs
+ SUBDIRS = lib src include
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts
 +DIST_SUBDIRS = $(SUBDIRS) packages
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = libcurl.pc
- LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \
+ LIB_VAUTH_CFILES = vauth/vauth.c vauth/cleartext.c vauth/cram.c \
diff --git 
a/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch 
b/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch
deleted file mode 100644
index 5c0a37e..000
--- 

[LEDE-DEV] [PATCH] Lua examples using ubus publish and subscribe.

2016-05-19 Thread Iain Fraser
---
 lua/publisher.lua  |   60 
 lua/subscriber.lua |   25 ++
 2 files changed, 85 insertions(+)
 create mode 100644 lua/publisher.lua
 create mode 100644 lua/subscriber.lua

diff --git a/lua/publisher.lua b/lua/publisher.lua
new file mode 100644
index 000..ba5f6a4
--- /dev/null
+++ b/lua/publisher.lua
@@ -0,0 +1,60 @@
+#!/usr/bin/env lua
+
+require "ubus"
+require "uloop"
+
+--[[
+  A demo of ubus publisher binding. Should be run before subscriber.lua
+--]]
+
+
+uloop.init()
+
+local conn = ubus.connect()
+if not conn then
+   error("Failed to connect to ubus")
+end
+
+local ubus_objects = {
+   test = {
+   hello = {
+   function(req, msg)
+   conn:reply(req, {message="foo"});
+   print("Call to function 'hello'")
+   for k, v in pairs(msg) do
+   print("key=" .. k .. " value=" .. 
tostring(v))
+   end
+   end, {id = ubus.INT32, msg = ubus.STRING }
+   },
+   hello1 = {
+   function(req)
+   conn:reply(req, {message="foo1"});
+   conn:reply(req, {message="foo2"});
+   print("Call to function 'hello1'")
+   end, {id = ubus.INT32, msg = ubus.STRING }
+   },
+   __subscriber_cb = function( subs )
+   print("total subs: ", subs )
+   end
+   }
+}
+
+conn:add( ubus_objects )
+print("Objects added, starting loop")
+
+-- start time
+local timer
+local counter = 0
+function t()
+   counter = counter + 1
+   local params = {
+   count = counter 
+   }
+   conn:notify( ubus_objects.test.__ubusobj, "test.alarm", params )
+   timer:set(1)
+end
+timer = uloop.timer(t)
+timer:set(1000)
+
+
+uloop.run()
diff --git a/lua/subscriber.lua b/lua/subscriber.lua
new file mode 100644
index 000..b0abf96
--- /dev/null
+++ b/lua/subscriber.lua
@@ -0,0 +1,25 @@
+#!/usr/bin/env lua
+
+--[[
+  A demo of ubus subscriber binding. Should be run after publisher.lua
+--]]
+
+require "ubus"
+require "uloop"
+
+uloop.init()
+
+local conn = ubus.connect()
+if not conn then
+   error("Failed to connect to ubus")
+end
+
+local sub = {
+   notify = function( msg )
+ print("Count: ", msg["count"])
+   end,
+}
+
+conn:subscribe( "test", sub )
+
+uloop.run()
-- 
1.7.9.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Missing signed-off-by

2016-05-19 Thread John Crispin


On 19/05/2016 09:39, Kevin Darbyshire-Bryant wrote:
> Hi Etienne (& list)
> 
> Yes I've just noticed that too when I looked at them coming back at me
> via master.  I feel really bad!
> 
> I will submit a new PR with properly signed commits once I've done this
> email.  I guess reverting the unsigned & applying the signed would
> maintain an obvious history.
> 
> Kevin
> 
> On 19/05/16 08:08, Etienne Champetier wrote:
>> Hi,
>>
>> Just noticed that 2 commits (dnsmasq.time related) are missing SOB line.
>> Kevin can you confirm that you sign off the 2 commits?
>> http://developercertificate.org/
>>
>> Cheers
>> Etienne
>>


darn they are in source.git already. we should maybe add a commit hook
to not accept patches that do not have a SoB in them

John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/4] v2: block.c: Add support for checking vfat filesystems

2016-05-19 Thread Daniel Curran-Dickinson
Hi John,

It looks like on ar71xx MS_ACL is not defined in linux/fs.h in the
default kernel.  It must have been added later than 4.1 (I believe that
is the version ar71xx is currently on).

I guess my desktop system is a newer kernel that has symbols (I didn't
have a build tree handy to check at the time).

Regards,

Daniel

On 16-05-19 03:22 AM, Daniel Dickinson wrote:
> Hopefully before I crash tonight I will have something to report.  I'm
> in the process of a build now.
> 
> On 16-05-19 02:07 AM, John Crispin wrote:
>>
>>
>> On 18/05/2016 13:28, l...@daniel.thecshore.com wrote:
>>> From: Daniel Dickinson 
>>>
>>> v2: Fix mixup of dosfsck checking ext* and e2fsck checking vfat.
>>>
>>> vfat is a common filesystem which users may want to mount on an
>>> OpenWrt/LEDE device, so support peforming filesystem checks
>>> before mount for vfat.
>>
>> has this series been test on device and did you verify that the fs check
>> now works properly for both those filesystems ?
>>
>>  John
>>
>>>
>>> Signed-off-by: Daniel Dickinson 
>>> ---
>>>  block.c | 12 +---
>>>  1 file changed, 9 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/block.c b/block.c
>>> index 71ffd0b..5a584cb 100644
>>> --- a/block.c
>>> +++ b/block.c
>>> @@ -628,24 +628,30 @@ static void check_filesystem(struct 
>>> blkid_struct_probe *pr)
>>> pid_t pid;
>>> struct stat statbuf;
>>> const char *e2fsck = "/usr/sbin/e2fsck";
>>> +   const char *dosfsck = "/sbin/dosfsck";
>>> +   const char *ckfs;
>>>  
>>> /* UBIFS does not need stuff like fsck */
>>> if (!strncmp(pr->id->name, "ubifs", 5))
>>> return;
>>>  
>>> -   if (strncmp(pr->id->name, "ext", 3)) {
>>> +   if (!strncmp(pr->id->name, "vfat", 4)) {
>>> +   ckfs = dosfsck;
>>> +   } else if (!strncmp(pr->id->name, "ext", 3)) {
>>> +   ckfs = e2fsck;
>>> +   } else {
>>> ULOG_ERR("check_filesystem: %s is not supported\n", 
>>> pr->id->name);
>>> return;
>>> }
>>>  
>>> -   if (stat(e2fsck, ) < 0) {
>>> +   if (stat(ckfs, ) < 0) {
>>> ULOG_ERR("check_filesystem: %s not found\n", e2fsck);
>>> return;
>>> }
>>>  
>>> pid = fork();
>>> if (!pid) {
>>> -   execl(e2fsck, e2fsck, "-p", pr->dev, NULL);
>>> +   execl(ckfs, ckfs, "-p", pr->dev, NULL);
>>> exit(-1);
>>> } else if (pid > 0) {
>>> int status;
>>>
>>
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Missing signed-off-by

2016-05-19 Thread Kevin Darbyshire-Bryant

Hi Etienne (& list)

Yes I've just noticed that too when I looked at them coming back at me 
via master.  I feel really bad!


I will submit a new PR with properly signed commits once I've done this 
email.  I guess reverting the unsigned & applying the signed would 
maintain an obvious history.


Kevin

On 19/05/16 08:08, Etienne Champetier wrote:

Hi,

Just noticed that 2 commits (dnsmasq.time related) are missing SOB line.
Kevin can you confirm that you sign off the 2 commits?
http://developercertificate.org/

Cheers
Etienne



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/4] v2: block.c: Add support for checking vfat filesystems

2016-05-19 Thread Daniel Dickinson
Hopefully before I crash tonight I will have something to report.  I'm
in the process of a build now.

On 16-05-19 02:07 AM, John Crispin wrote:
> 
> 
> On 18/05/2016 13:28, l...@daniel.thecshore.com wrote:
>> From: Daniel Dickinson 
>>
>> v2: Fix mixup of dosfsck checking ext* and e2fsck checking vfat.
>>
>> vfat is a common filesystem which users may want to mount on an
>> OpenWrt/LEDE device, so support peforming filesystem checks
>> before mount for vfat.
> 
> has this series been test on device and did you verify that the fs check
> now works properly for both those filesystems ?
> 
>   John
> 
>>
>> Signed-off-by: Daniel Dickinson 
>> ---
>>  block.c | 12 +---
>>  1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/block.c b/block.c
>> index 71ffd0b..5a584cb 100644
>> --- a/block.c
>> +++ b/block.c
>> @@ -628,24 +628,30 @@ static void check_filesystem(struct blkid_struct_probe 
>> *pr)
>>  pid_t pid;
>>  struct stat statbuf;
>>  const char *e2fsck = "/usr/sbin/e2fsck";
>> +const char *dosfsck = "/sbin/dosfsck";
>> +const char *ckfs;
>>  
>>  /* UBIFS does not need stuff like fsck */
>>  if (!strncmp(pr->id->name, "ubifs", 5))
>>  return;
>>  
>> -if (strncmp(pr->id->name, "ext", 3)) {
>> +if (!strncmp(pr->id->name, "vfat", 4)) {
>> +ckfs = dosfsck;
>> +} else if (!strncmp(pr->id->name, "ext", 3)) {
>> +ckfs = e2fsck;
>> +} else {
>>  ULOG_ERR("check_filesystem: %s is not supported\n", 
>> pr->id->name);
>>  return;
>>  }
>>  
>> -if (stat(e2fsck, ) < 0) {
>> +if (stat(ckfs, ) < 0) {
>>  ULOG_ERR("check_filesystem: %s not found\n", e2fsck);
>>  return;
>>  }
>>  
>>  pid = fork();
>>  if (!pid) {
>> -execl(e2fsck, e2fsck, "-p", pr->dev, NULL);
>> +execl(ckfs, ckfs, "-p", pr->dev, NULL);
>>  exit(-1);
>>  } else if (pid > 0) {
>>  int status;
>>
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


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

2016-05-19 Thread Mats Karrman



On 2016-05-18 15:09, Mats Karrman wrote:



On 2016-05-18 14:03, Felix Fietkau wrote:

On 2016-05-18 14:00, Mats Karrman wrote:


On 2016-05-18 13:01, Felix Fietkau wrote:

On 2016-05-18 11:38, Mats Karrman wrote:

On 2016-05-17 17:31, Mats Karrman wrote:

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. The changes are in 
libubox

git, but not in OpenWrt/LEDE yet.
Please test if this fixes your issue.

Thanks,

- Felix

Tried that but no immediate success, but it might have provided
some additional clues. Now the boot hangs early on *every* boot
but after logging in I found something different in the ps list.
There is a Broadcom utility (smd) that is called from one of the
start scripts (S10environment). It's purpose is to set scheduling
priority and cpu affinity for some of the Broadcom proprietary
processes, The smd program handles fork rather ugly. The
parent only loops until it receives SIGCHLD and then exits without
any wait. With the modified libubox I get a zombie smd child and
sleeping smd parent and S11environment (no other zombie).

Not sure exactly how this happened but I got to think about
something written in the wait man page:

"""
If  a parent process terminates, then its "zombie" children (if any)
are adopted by init(8), which automatically performs a wait to
remove the zombies.
"""

Is this wait really (unconditionally) implemented in procd or could
that be what I accomplished with the "forced timeout" patch?

I fixed the ugly fork and got the system to boot once.
Then tried the original libubox with the fixed smd program but
this was not enough to get things working (25 reboots to hang).

Now I'm running reboot tests with your new libubox and fixed smd...

More than 250 reboots without problem :)

Clearly the smd program is broken, but still it doesn't feel good 
that it

manages to hang the init process. Considering that timing is involved
it's difficult to make any certain conclusions but it seems like 
having

uloop epoll_wait to time out occasionally isn't such a bad idea?

I agree, that definitely needs fixing. What kernel are you using?

It's the 3.4.11-rt19 from the Broadcom SDK v4.16, so very old...

Now I also noticed, with your libubox fixes (and my fixed smd) I 
still get

some zombies, even though the system seems to boot OK all the way
(the corresponding services being defunct though).
With my epoll_wait timeout fix on the original libubox, this does not
happen.

Can you try backporting this to your kernel?
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=128dd1759d96ad36c379240f8b9463e8acfd37a1 



- Felix

OK, did that.

First, I tested original libubox without my epoll_wait timeout fix 
(but fixed smd),

init hung after 7 reboots. Same state as before.

Second, I tested your libubox (with fixed smd), seems to be no change, 
i.e.

some processes/scripts ends up as zombies.

Third, added my epoll_wait timeout fix to your libubox, made no 
difference..


Also noted that other stuff is not working properly with your fixes in 
libubox,

e.g. system upgrade hangs with a zombie sh and after scp copying files
to the box I get a zombie dropbear. Child reaping in general seems to be
broken.

Backed down to latest libubox before your fixes and the zombies/problems
disappear so it has no relation to the kernel patch or smd (original 
intit hang

problem still there of course).

// Mats

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/2] [ubox] syslog: use realloc to change log buffer size

2016-05-19 Thread John Crispin


On 18/05/2016 16:08, Conor O'Gorman wrote:
> On 18/05/16 15:03, Dan Bugnar wrote:
>> For the larger size it takes the distance from the old log and newest
>> and added to _log to have the new newest, same for the oldest. It
>> doesn't matter if the newest > oldest OR oldest > newest.
> If the oldest > newest, there will be a blank area, the new space. How
> will this be handled during log printing?
> 
>> And if the size is smaller than we will have a fresh new smaller
>> buffer with the newest and oldest pointing to _log(start).
>>
>> If it is possible that a message is added to the old log after the
>> realloc call is done and the log doesn't point to the new buffer, we
>> will loose that message.
> For both of these situations, it is possible to lose messages. I thought
> the intention was not to lose messages?
> 
> Conor
> 

i see it the same way. please check the code and make sure it covers all
cases. 2/2 looks good but i just marked the series as "Changes requested"

please explain in V3 how you addressed the issue of reallocating the buffer.

John

> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/4] v2: block.c: Add support for checking vfat filesystems

2016-05-19 Thread Daniel Dickinson
On 16-05-19 02:07 AM, John Crispin wrote:
> 
> 
> On 18/05/2016 13:28, l...@daniel.thecshore.com wrote:
>> From: Daniel Dickinson 
>>
>> v2: Fix mixup of dosfsck checking ext* and e2fsck checking vfat.
>>
>> vfat is a common filesystem which users may want to mount on an
>> OpenWrt/LEDE device, so support peforming filesystem checks
>> before mount for vfat.
> 
> has this series been test on device and did you verify that the fs check
> now works properly for both those filesystems ?

Not yet, will let you know when.

Regards,

Daniel

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/4] v2: block.c: Add support for checking vfat filesystems

2016-05-19 Thread John Crispin


On 18/05/2016 13:28, l...@daniel.thecshore.com wrote:
> From: Daniel Dickinson 
> 
> v2: Fix mixup of dosfsck checking ext* and e2fsck checking vfat.
> 
> vfat is a common filesystem which users may want to mount on an
> OpenWrt/LEDE device, so support peforming filesystem checks
> before mount for vfat.

has this series been test on device and did you verify that the fs check
now works properly for both those filesystems ?

John

> 
> Signed-off-by: Daniel Dickinson 
> ---
>  block.c | 12 +---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 71ffd0b..5a584cb 100644
> --- a/block.c
> +++ b/block.c
> @@ -628,24 +628,30 @@ static void check_filesystem(struct blkid_struct_probe 
> *pr)
>   pid_t pid;
>   struct stat statbuf;
>   const char *e2fsck = "/usr/sbin/e2fsck";
> + const char *dosfsck = "/sbin/dosfsck";
> + const char *ckfs;
>  
>   /* UBIFS does not need stuff like fsck */
>   if (!strncmp(pr->id->name, "ubifs", 5))
>   return;
>  
> - if (strncmp(pr->id->name, "ext", 3)) {
> + if (!strncmp(pr->id->name, "vfat", 4)) {
> + ckfs = dosfsck;
> + } else if (!strncmp(pr->id->name, "ext", 3)) {
> + ckfs = e2fsck;
> + } else {
>   ULOG_ERR("check_filesystem: %s is not supported\n", 
> pr->id->name);
>   return;
>   }
>  
> - if (stat(e2fsck, ) < 0) {
> + if (stat(ckfs, ) < 0) {
>   ULOG_ERR("check_filesystem: %s not found\n", e2fsck);
>   return;
>   }
>  
>   pid = fork();
>   if (!pid) {
> - execl(e2fsck, e2fsck, "-p", pr->dev, NULL);
> + execl(ckfs, ckfs, "-p", pr->dev, NULL);
>   exit(-1);
>   } else if (pid > 0) {
>   int status;
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev