Skip to content

GNU uname should identify OS as illumos #195

Description

@jclulow

As of bug 1956, the uname binary provided by the operating system will report illumos for uname -o instead of the traditional Solaris. Unfortunately in a pkgsrc-based zone, at least under some conditions the GNU uname appears first in PATH. A naive script may run uname -o and see the Solaris value.

We should patch the pkgsrc copy of uname to report illumos as the system version does.

See example with current trunk packages:

$ /usr/bin/uname -o
illumos
$ /opt/local/bin/uname -o
Solaris

Activity

  1. wiedi commented on May 2, 2019

    @wiedi

    A long time ago I played with this and had the following:

    diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile
    index 82c440e..cdf8ce7 100644
    --- a/sysutils/coreutils/Makefile
    +++ b/sysutils/coreutils/Makefile
    @@ -43,6 +43,11 @@ SUBST_FILES.libname= Makefile.in
     SUBST_SED.libname=     -e '/^src_libstdbuf_so_LDFLAGS/s,$$, -install_name ${PREFIX}/libexec/coreutils/glibstdbuf.so,'
     .endif
     
    +.if ${OPSYS} == "SunOS"
    +CONFIGURE_ENV+=                gl_cv_host_operating_system=illumos
    +.endif
    +
    +
     PROGS= [ base64 basename cat chcon chgrp chmod chown chroot cksum comm \
            cp csplit cut date dd df dir dircolors dirname du hostid echo env \
            expand expr factor false fmt fold groups head id install join kill \
    

    But that is lazy way to fix it as it would be wrong when using pkgsrc on Oracle Solaris.
    Propably should just try to shell out to /usr/bin/uname -o now?

  2. jperkin commented on May 2, 2019

    @jperkin
    Collaborator

    Older Solaris releases don't support -o so we'd need to handle that, but yeh that seems the simplest way to do it.

  3. jperkin commented on May 2, 2019

    @jperkin
    Collaborator

    Note that I will need to override this for our builds anyway as they are performed on a platform prior to 1956.

  4. added a commit that references this issue on May 2, 2019
    11140e9
  5. self-assigned this
    on May 2, 2019
  6. jperkin commented on May 2, 2019

    @jperkin
    Collaborator

    Fixed in trunk.

  7. added a commit that references this issue on May 19, 2019
    c3f6efe
  8. added a commit that references this issue on Jul 1, 2019
  9. added a commit that references this issue on Jul 20, 2019
  10. added a commit that references this issue on Sep 18, 2019
  11. added a commit that references this issue on Aug 25, 2020
  12. added a commit that references this issue on Sep 9, 2020
  13. 104 remaining items

  14. added a commit that references this issue on Jul 17, 2026
  15. added a commit that references this issue on Aug 7, 2026
  16. added a commit that references this issue on Aug 25, 2026
  17. added a commit that references this issue on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions