[OpenWrt-Devel] [PATCH] Fix Busybox “uname -o”

2015-11-21 Thread Mark Mentovai
Since r47288, “uname -o” shows “n”. It used to be “GNU/Linux”.

root@gw1 sh# uname -a
Linux gw1.nyc 4.1.11 #1 Sat Nov 21 12:50:41 EST 2015 mips n
root@gw1 sh# uname -o
n

It looks like a recent change in Busybox uname made “uname -o”
configurable:
http://git.busybox.net/busybox/commit?id=64ed5f0d3c5eefbb208d4a334654834c78be2cbd
.

In build_dir/target-mips_34kc_musl-1.1.11/busybox-1.24.1/.config, I see

CONFIG_UNAME_OSNAME="n"

Probably relevant, I use CONFIG_BUSYBOX_CUSTOM=y.

OpenWrt’s busybox/config/coreutils/Config.in needs to mirror Busybox’ own
coreutils/Config.src. Likely, all of OpenWrt’s busybox Config.in files need
to be updated in this way after a Busybox update.

Signed-off-by: Mark Mentovai 

diff --git a/package/utils/busybox/config/coreutils/Config.in
b/package/utils/busybox/config/coreutils/Config.in
index f50823f012de..e25da6519f2b 100644
--- a/package/utils/busybox/config/coreutils/Config.in
+++ b/package/utils/busybox/config/coreutils/Config.in
@@ -829,6 +829,14 @@ config BUSYBOX_CONFIG_UNAME
  help
   uname is used to print system information.

+config BUSYBOX_CONFIG_UNAME_OSNAME
+ string "Operating system name"
+ default "GNU/Linux"
+ depends on BUSYBOX_CONFIG_UNAME
+ help
+  Sets the operating system name reported by uname -o.  The
+  default is "GNU/Linux".
+
 config BUSYBOX_CONFIG_UNEXPAND
  bool "unexpand"
  default BUSYBOX_DEFAULT_UNEXPAND
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Fix Busybox “uname -o”

2015-11-21 Thread Mark Mentovai

John Crispin wrote:

patch does not apply to current trunk


Sorry, the tabs got swallowed. I re-sent it.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Fix Busybox “uname -o”

2015-11-21 Thread John Crispin
Hi,

patch does not apply to current trunk

John

On 21/11/2015 19:34, Mark Mentovai wrote:
> Since r47288, “uname -o” shows “n”. It used to be “GNU/Linux”.
> 
> root@gw1 sh# uname -a
> Linux gw1.nyc 4.1.11 #1 Sat Nov 21 12:50:41 EST 2015 mips n
> root@gw1 sh# uname -o
> n
> 
> It looks like a recent change in Busybox uname made “uname -o”
> configurable: 
> http://git.busybox.net/busybox/commit?id=64ed5f0d3c5eefbb208d4a334654834c78be2cbd.
> 
> In build_dir/target-mips_34kc_musl-1.1.11/busybox-1.24.1/.config, I see
> 
> CONFIG_UNAME_OSNAME="n"
> 
> Probably relevant, I use CONFIG_BUSYBOX_CUSTOM=y.
> 
> OpenWrt’s busybox/config/coreutils/Config.in needs to mirror Busybox’
> own coreutils/Config.src. Likely, all of OpenWrt’s busybox Config.in
> files need to be updated in this way after a Busybox update.
> 
> Signed-off-by: Mark Mentovai >
> 
> diff --git a/package/utils/busybox/config/coreutils/Config.in
> b/package/utils/busybox/config/coreutils/Config.in
> index f50823f012de..e25da6519f2b 100644
> --- a/package/utils/busybox/config/coreutils/Config.in
> +++ b/package/utils/busybox/config/coreutils/Config.in
> @@ -829,6 +829,14 @@ config BUSYBOX_CONFIG_UNAME
>  help
>   uname is used to print system information.
>  
> +config BUSYBOX_CONFIG_UNAME_OSNAME
> +string "Operating system name"
> +default "GNU/Linux"
> +depends on BUSYBOX_CONFIG_UNAME
> +help
> + Sets the operating system name reported by uname -o.  The
> + default is "GNU/Linux".
> +
>  config BUSYBOX_CONFIG_UNEXPAND
>  bool "unexpand"
>  default BUSYBOX_DEFAULT_UNEXPAND
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel