diff mbox

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

Message ID CAO5tm1sZDG6vgEFJFh+GDMvRstUEj33vq6vdYQuB7egE77_k-w@mail.gmail.com
State Changes Requested
Headers show

Commit Message

Mark Mentovai Nov. 21, 2015, 6:34 p.m. UTC
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 <mark@moxienet.com>

Comments

John Crispin Nov. 21, 2015, 8:21 p.m. UTC | #1
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 <mark@moxienet.com <mailto:mark@moxienet.com>>
> 
> 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
>
Mark Mentovai Nov. 21, 2015, 9:21 p.m. UTC | #2
John Crispin wrote:
> patch does not apply to current trunk

Sorry, the tabs got swallowed. I re-sent it.
diff mbox

Patch

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