Skip to content

Need install cases for SunOS (Solaris) #26

@mehayden

Description

@mehayden

The SunOS operating_system and cpu_type is not detected in the functions:
os_based_configure_options(),
get_download_file_path(),
get_download_url()

A match on substring "SunOS" from "uname -a" could be used to detect the operating system and "isainfo-b" could be used to get "64" or "32" to match on.

Also, it appears the operating_system variable is never initialized in get_download_file_path().

Here is a diff of a version which worked for me against master 2/16/17, although some refactoring to remove duplicate code seems warranted if more architectures are to be added:

$ diff install.ORIG install
67a68,77
>
>   elif [[ "$operating_system" =~ "SunOS" ]]; then
>     # reset cpu_type based on isainfo
>     local bits=$(isainfo -b)
>     if [[ "$bits" =~ "64" ]]; then
>       local cpu_type="x64"
>     else
>       local cpu_type="x86"
>     fi
>
90a101
>   local operating_system=$(uname -a)
101a113,123
>
>     elif [[ "$operating_system" =~ "SunOS" ]]; then
>       # reset cpu_type based on isainfo
>       local bits=$(isainfo -b)
>       if [[ "$bits" =~ "64" ]]; then
>         cpu_type="x64"
>       else
>         cpu_type="x86"
>       fi
>       local pkg_name="node-v${version}-sunos-${cpu_type}"
>
126a149,159
>
>     elif [[ "$operating_system" =~ "SunOS" ]]; then
>       # reset cpu_type based on isainfo
>       local bits=$(isainfo -b)
>       if [[ "$bits" =~ "64" ]]; then
>         cpu_type="x64"
>       else
>         cpu_type="x86"
>       fi
>       echo "http://nodejs.org/dist/v${version}/node-v${version}-sunos-${cpu_type}.tar.gz"
>

Metadata

Metadata

Assignees

No one assigned

    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