Hi Jim,
Hi Ram,
That's what I researched originally. The problem is, these "uname"
identifiers are not quite constant (and in my own build of the OS/Net
gate I can define anything I want).
I'm sorry but I disagree with the expectations here. If people want to
make their OS practically unidentifiable, then the onus is on them to
deal with the consequences. If someone can fake up their own uname
while building their own kernel, they can also break the kernel package
FMRI any way they choose. This is not something we want to support.
With this being case, we should be able to use 'omni*' or 'oi_*' or
'illumos*' and use 5.11 snv_151 version compatibility.
Regardless, I hacked up a patch last week trying to fix up the FMRI
parsing (rest of the stuff is untouched). I'm attaching the patch here
(you might have to manually apply it, as it's pretty small).
Let me know if this satisfies the requirements for supporting the
distros in question. This patch doesn't do the uname simplification I
mentioned above, so there's no guarantee that I'll be applying this
patch if there is a simpler solution.
My patch did include variants for unames reported by OmniOS, OI "dev"
and OI "Hipster", per these examples:
omnios# SunOS HOSTNAME 5.11 omnios-c4ba593 i86pc i386 i86pc
oi-dev# SunOS HOSTNAME 5.11 oi_151a8 i86pc i386 i86pc
oi-hip# SunOS HOSTNAME 5.11 illumos-1d3f896 i86pc i386 i86pc Solaris
For the moment, they do report "5.11" as the kernel level (but so did
SXCE for most of its history - and before it had crossbow for example,
as well). Kernel versions are tagged as "distro_version",
"distro-commitid" or "illumos-commitid" in just these few examples.
Again, a custom-kernel builder could mark it to be anything else.
There is likely no possible universal automagic solution for this
(hence the fallback to touchable files to satisfy everybody who does
not fit our patterns), just support for the most-likely situations to
require nothing else than a "pkgadd" and do what is appropriate.
Jim Klimov
Index: src/VBox/Installer/solaris/vboxconfig.sh
===================================================================
--- src/VBox/Installer/solaris/vboxconfig.sh (revision 101275)
+++ src/VBox/Installer/solaris/vboxconfig.sh (working copy)
@@ -245,7 +245,8 @@
# or "pkg://solaris/system/[email protected],5.11-5.12.0.0.0.4.1:20120908T030246Z"
# or "pkg://solaris/system/[email protected],5.11-0.175.0.0.0.1.0:20111012T032837Z"
# or "pkg://solaris/system/[email protected]:20121012T032837Z" [1]
- # [1]: The sed below doesn't handle this. It's instead parsed below in the PSARC/2012/240 case.
+ # of "pkg://openindiana.org/system/[email protected]:20150621T130732Z" (OI Hipster'15) [1]
+ # [1]: The sed below doesn't handle these. It's instead parsed below in the exceptions case.
STR_KERN_MAJOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\,.*//'`
if test ! -z "$STR_KERN_MAJOR"; then
# The format is "0.5.11" or "5.12"
@@ -257,21 +258,34 @@
elif test "$STR_KERN_MAJOR" = "0.5.11" || test "$STR_KERN_MAJOR" = "5.11"; then
HOST_OS_MAJORVERSION="11"
else
- # This could be the PSARC/2012/240 naming scheme for S12.
+ # Handle exceptions
# The format is "pkg://solaris/system/[email protected]:20121012T032837Z"
- # The "5.12" following the "@" is the nominal version which we ignore for now as it is
- # not set by most pkg(5) tools...
- # STR_KERN_MAJOR is now of the format "5.12-5.12.0.0.0.9.1.3.0:20121012T032837Z" with '9' representing
- # the build number.
- BRANCH_VERSION=$STR_KERN_MAJOR
- HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f1,2 -d'.'`
- if test "$HOST_OS_MAJORVERSION" = "5.12"; then
- HOST_OS_MAJORVERSION="12"
- HOST_OS_MINORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'`
- return 0
+ # or "pkg://openindiana.org/system/[email protected]:20150621T130732Z" (OI Hipster'15)
+ STR_KERN_MAJOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\,.*//;s/\-.*//'`
+ if test "$STR_KERN_MAJOR" = "5.12"; then
+ # This could be the PSARC/2012/240 naming scheme for S12.
+ # The format is "pkg://solaris/system/[email protected]:20121012T032837Z"
+ # The "5.12" following the "@" is the nominal version which we ignore for now as it is
+ # not set by most pkg(5) tools...
+ # STR_KERN_MAJOR is now of the format "5.12-5.12.0.0.0.9.1.3.0:20121012T032837Z" with '9' representing
+ # the build number.
+ BRANCH_VERSION=$STR_KERN_MAJOR
+ HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f1,2 -d'.'`
+ if test "$HOST_OS_MAJORVERSION" = "5.12"; then
+ HOST_OS_MAJORVERSION="12"
+ HOST_OS_MINORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'`
+ return 0
+ else
+ errorprint "Failed to parse the Solaris kernel major version."
+ exit 1
+ fi
+ elif test "$STR_KERN_MAJOR" = "0.5.11"; then
+ # OI Hipster'15, assume snv_151 compatibility
+ HOST_OS_MAJORVERSION="11"
+ HOST_OS_MINORVERSION=151
else
- errorprint "Failed to parse the Solaris kernel major version."
- exit 1
+ errorprint "Failed to parse the Solaris kernel major version."
+ exit 1
fi
fi
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev