From unknown Fri Aug 15 14:47:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7991 <7991@debbugs.gnu.org> To: bug#7991 <7991@debbugs.gnu.org> Subject: Status: bug in uname (?) Reply-To: bug#7991 <7991@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:47:32 +0000 retitle 7991 bug in uname (?) reassign 7991 coreutils submitter 7991 noel@familie-kuntze.de severity 7991 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 05 15:56:00 2011 Received: (at submit) by debbugs.gnu.org; 5 Feb 2011 20:56:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PlpAk-0005dy-Th for submit@debbugs.gnu.org; Sat, 05 Feb 2011 15:55:59 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PloeR-0004uf-Cz for submit@debbugs.gnu.org; Sat, 05 Feb 2011 15:22:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Plomi-0006Pa-SK for submit@debbugs.gnu.org; Sat, 05 Feb 2011 15:31:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:58564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Plomi-0006PW-QY for submit@debbugs.gnu.org; Sat, 05 Feb 2011 15:31:08 -0500 Received: from [140.186.70.92] (port=60601 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Plomh-0000Ru-SW for bug-coreutils@gnu.org; Sat, 05 Feb 2011 15:31:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Plomg-0006PG-M1 for bug-coreutils@gnu.org; Sat, 05 Feb 2011 15:31:07 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:51946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Plomg-0006OF-7h for bug-coreutils@gnu.org; Sat, 05 Feb 2011 15:31:06 -0500 Received: from [192.168.178.43] (HSI-KBW-109-192-152-249.hsi6.kabel-badenwuerttemberg.de [109.192.152.249]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MB15o-1PtUIK3WFQ-009uPo; Sat, 05 Feb 2011 21:31:01 +0100 Date: Sat, 5 Feb 2011 21:31:02 +0100 From: Noel Kuntze To: bug-coreutils@gnu.org MIME-Version: 1.0 Message-ID: <4D4DB386.6070000@familie-kuntze.de> Subject: bug in uname (?) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-AVK-Virus-Check: AVA 21.4667;F1206 X-Provags-ID: V02:K0:mJLd7mcaj8yFSDj3wrbVNSyiq2JPUE3uyF1bGIdBNY/ 9XhXYWYh/VQuTkmV3Emk3gGcB4NCTB4RHNhY7sifRievlHsV83 pjk6xf/vSymoxeZaCXrHA29BM2jsQh0w7knf9VhfVR7qHXT/2P 9amhYPHgn5e5aLY1sVjD1wWV0dLJnxjGfCC9+AQ7vDhWAKFbwg 6qm0QN2j+oQLo2z7CX8rjKP3yZOr49qJ3iNj6QD/dE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.187 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 05 Feb 2011 15:55:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: noel@familie-kuntze.de List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi, It seems to me that the options for uname, more precise, -v and -r have been interchanged. Extract from the shell: thermi@debian:~$ uname -v #1 SMP Thu Jan 27 00:28:05 UTC 2011 thermi@debian:~$ uname -r 2.6.26-2-686 sincerely yours, Noel Kuntze ____________ Virus checked by G Data AntiVirus Version: AVA 21.4667 dated 05.02.2011 Virus news: www.antiviruslab.com From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 05 17:05:05 2011 Received: (at 7991) by debbugs.gnu.org; 5 Feb 2011 22:05:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PlqFc-0000Fn-9T for submit@debbugs.gnu.org; Sat, 05 Feb 2011 17:05:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PlqFZ-0000FF-I3 for 7991@debbugs.gnu.org; Sat, 05 Feb 2011 17:05:03 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p15MDZ6G028641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 5 Feb 2011 17:13:35 -0500 Received: from [10.3.113.44] (ovpn-113-44.phx2.redhat.com [10.3.113.44]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p15MDYHU025482; Sat, 5 Feb 2011 17:13:34 -0500 Message-ID: <4D4DCB88.8000008@redhat.com> Date: Sat, 05 Feb 2011 15:13:28 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: noel@familie-kuntze.de Subject: Re: bug#7991: bug in uname (?) References: <4D4DB386.6070000@familie-kuntze.de> In-Reply-To: <4D4DB386.6070000@familie-kuntze.de> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA244CC63DC5486BBB3878D3A" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: 7991 Cc: 7991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA244CC63DC5486BBB3878D3A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/05/2011 01:31 PM, Noel Kuntze wrote: > Hi, >=20 > It seems to me that the options for uname, more precise, -v and -r have= > been interchanged. Thanks for the report. However, this is not a bug. >=20 > Extract from the shell: >=20 > thermi@debian:~$ uname -v > #1 SMP Thu Jan 27 00:28:05 UTC 2011 > thermi@debian:~$ uname -r > 2.6.26-2-686 Look at 'man 2 uname'. On Linux, the uname.release version contains a numeric string. The uname.version field is not documented as to it's contents, but POSIX merely requires that release and version together identify the operating system kernel. As confusing as it may be, this behavior is a kernel choice, and coreutils uname(1) has no control over it. Coreutils is accurately reporting what the kernel told it. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigA244CC63DC5486BBB3878D3A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNTcuNAAoJEKeha0olJ0NqlX8H/34rWF2WJjv/h0CXBuXaY+G7 wBlsjpLS0vS6ZoXRwDXQgcuw0ksNj96eYaRe5mdYf2jwHL3n73m1yvFKoisn/UIl mJEkujp02ISgTQxF2yAVlfalri8nqe0U8s/IJP3TBa21Imu6ROssjpZOc1fZljkq 8PYimiKX85AFXLpCOoOJ0b4+e6HML9vWaw7A0hPUE/hxNMTisNiDS8CyCS9I8y62 VvAxvPCASf3/MlPXd7Ww2x3KL2MV6TT5MQHLeE5FULCaHnvCzfV41StPZ1p/w3dH GLwtirkoqQbQps/kJNJoGcW7kXnbcBxXZGbaHZ8O8Hv8CUi3bxjIfRZpO0PhXLI= =AokL -----END PGP SIGNATURE----- --------------enigA244CC63DC5486BBB3878D3A-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 05 18:04:10 2011 Received: (at 7991) by debbugs.gnu.org; 5 Feb 2011 23:04:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PlrAn-0001Y9-Vv for submit@debbugs.gnu.org; Sat, 05 Feb 2011 18:04:10 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PlrAl-0001Xi-DY for 7991@debbugs.gnu.org; Sat, 05 Feb 2011 18:04:08 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 66D4E21308; Sat, 5 Feb 2011 16:12:41 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 524572DCC8; Sat, 5 Feb 2011 16:12:41 -0700 (MST) Date: Sat, 5 Feb 2011 16:12:41 -0700 From: Bob Proulx To: 7991@debbugs.gnu.org, Noel Kuntze Subject: Re: bug#7991: bug in uname (?) Message-ID: <20110205231241.GA22512@hysteria.proulx.com> References: <4D4DB386.6070000@familie-kuntze.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D4DB386.6070000@familie-kuntze.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 7991 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) Noel Kuntze wrote: > It seems to me that the options for uname, more precise, -v and -r have > been interchanged. The uname program dates back to the days of yore before we had refined networking to the mature state that it is now. It is really a terrible interface. Although we often use 'uname -a' to identify systems it isn't out of love but simple practicality that there isn't much better available. If you collected the output of uname with various options on every different system you could find you would have quite a collection of random output! At that point you would understand the problem. The only portable use of uname is without arguments. To use it portably you can only really use it first to figure out which system you are on and then follow that up with subsequent calls with system specific options. I often do this type of thing in scripts: case $(uname) in HP-UX) case $(uname -m) in 9000/*) case $(getconf CPU_VERSION) in 528) mach=hppa1.1 ;; 532) mach=hppa2.0 ;; 768) mach=ia64 ;; esac ;; *) mach=$(uname -m) ;; esac sys=hpux$(uname -r | sed 's/^[AB]\.//') ;; Linux) sys=gnulinux mach=$(uname -m) ;; AIX) sys=aix mach=rs6000 ... ;; esac That is just an example. Such as for AIX I would need to do more but I didn't want to keep going with the example. Bob From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 05 20:25:09 2011 Received: (at control) by debbugs.gnu.org; 6 Feb 2011 01:25:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PltNF-0004af-Im for submit@debbugs.gnu.org; Sat, 05 Feb 2011 20:25:09 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PltND-0004aJ-OZ for control@debbugs.gnu.org; Sat, 05 Feb 2011 20:25:08 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id EF84F21308 for ; Sat, 5 Feb 2011 18:33:41 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id DFF2D2DCC8; Sat, 5 Feb 2011 18:33:41 -0700 (MST) Date: Sat, 5 Feb 2011 18:33:41 -0700 From: Bob Proulx To: control@debbugs.gnu.org Subject: close bug Message-ID: <20110206013341.GA27200@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) close 7991 thanks Closing this bug after more private correspondence with the poster. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 07 10:40:06 2011 Received: (at 7991) by debbugs.gnu.org; 7 Feb 2011 15:40:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PmTC9-0007Y5-MW for submit@debbugs.gnu.org; Mon, 07 Feb 2011 10:40:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PmTC7-0007XZ-EM for 7991@debbugs.gnu.org; Mon, 07 Feb 2011 10:40:04 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p17Fmgt6011620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Feb 2011 10:48:42 -0500 Received: from [10.3.113.122] (ovpn-113-122.phx2.redhat.com [10.3.113.122]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p17FmeTg020087; Mon, 7 Feb 2011 10:48:41 -0500 Message-ID: <4D501458.40409@redhat.com> Date: Mon, 07 Feb 2011 08:48:40 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: noel@familie-kuntze.de, 7991@debbugs.gnu.org Subject: Re: bug#7991: bug in uname (?) References: <4D4DB386.6070000@familie-kuntze.de> <4D4DCB88.8000008@redhat.com> <4D4DF82E.5020104@familie-kuntze.de> In-Reply-To: <4D4DF82E.5020104@familie-kuntze.de> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigAB302300304D3CC6E30624A3" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: 7991 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAB302300304D3CC6E30624A3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [re-adding the list] On 02/05/2011 06:23 PM, Noel Kuntze wrote: >> Look at 'man 2 uname'. On Linux, the uname.release version contains a= >> numeric string. The uname.version field is not documented as to it's >> contents, but POSIX merely requires that release and version together >> identify the operating system kernel. As confusing as it may be, this= >> behavior is a kernel choice, and coreutils uname(1) has no control ove= r >> it. Coreutils is accurately reporting what the kernel told it. >> >=20 > Hi, >=20 > OK, i understood that. > However although i run several different Linuxes i didn't use uname on > any other than Debian. > To "fix" this bug, one should really talk to the developers of the > different distributions. The different Linux distros all use the same uname(2) behavior of the kernel. You only need patch the kernel to swap those two fields, but given historical compatibility, you have a very hard battle in front of you for getting such a patch to be approved. You're better off learning to live with the fields as currently defined by the kernel, in spite of what you feel is an apparent naming confusion.= > This "bug" (i'll call it "bug" in the future, because "weird behaviour > of the Kernel" is just too long) nearly got me a worse mark (we wrote a= > test about Debian Linux and the last task was to write down the kernel > version....). Again, it's not a bug in coreutils, but a feature of your kernel's uname(2) implementation. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigAB302300304D3CC6E30624A3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNUBRYAAoJEKeha0olJ0NqpJsIAInFTjenYJUH0cUS10MndfEf KtlQsgktIP4wtIqkzUmT5PvB+1/dm8t7kihZe1c50CHuw3LS1QL/b0JuFqgCXCHM 8T2RMYDM26tfNZDGzpa+jCScnkrxOpJGqZmVe+vqFIkJWZ8NPFi4EbtAdjK6oo3t xJgc0Uc3ud/ytmFCQAquwV/DfEOmVgq6hUuwPWGgJ1AifEZnZPcMHzhOOeETrHq9 gSzGESQD1ANYpcj9a+u0BNnRo/pJGNABthTQpQhVMrvwJNeX8lc0SajA4F7ZOFlB gQTD7A7gNpt0rlCVk7Z/vx3pQsphwkzO4mHSQ3d/6KIh2CVKgswrSsPpgl495CQ= =OXm3 -----END PGP SIGNATURE----- --------------enigAB302300304D3CC6E30624A3-- From unknown Fri Aug 15 14:47:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 08 Mar 2011 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator