Commit 5258e0ab authored by Matt Ray's avatar Matt Ray

initial Wind River Linux 5 support for Cisco Nexus devices

Add wrlinux platform and nexus platform_family support for building on Wind
River Linux 5.
parent 9fd45554
......@@ -51,6 +51,17 @@ module Omnibus
/libutil\.so/,
].freeze
WRLINUX_WHITELIST_LIBS = [
/libc\.so/,
/libcrypt\.so/,
/libdl\.so/,
/libffi\.so/,
/libm\.so/,
/libpthread\.so/,
/librt\.so/,
/libutil\.so/,
].freeze
AIX_WHITELIST_LIBS = [
/libpthread\.a/,
/libpthreads\.a/,
......@@ -410,6 +421,8 @@ module Omnibus
whitelist_libs = case Ohai['platform']
when 'arch'
ARCH_WHITELIST_LIBS
when 'nexus'
WRLINUX_WHITELIST_LIBS
when 'mac_os_x'
MAC_WHITELIST_LIBS
when 'solaris2'
......
......@@ -157,7 +157,7 @@ module Omnibus
#
def truncate_platform_version(platform_version, platform)
case platform
when 'centos', 'debian', 'el', 'fedora', 'freebsd', 'omnios', 'pidora', 'raspbian', 'rhel', 'sles', 'suse', 'smartos'
when 'centos', 'debian', 'el', 'fedora', 'freebsd', 'omnios', 'pidora', 'raspbian', 'rhel', 'sles', 'suse', 'smartos', 'nexus'
# Only want MAJOR (e.g. Debian 7, OmniOS r151006, SmartOS 20120809T221258Z)
platform_version.split('.').first
when 'aix', 'gentoo', 'mac_os_x', 'openbsd', 'slackware', 'solaris2', 'opensuse', 'ubuntu'
......
......@@ -37,6 +37,7 @@ module Omnibus
'debian' => DEB,
'fedora' => RPM,
'rhel' => RPM,
'wrlinux' => RPM,
'aix' => BFF,
'solaris2' => Solaris,
'windows' => MSI,
......
......@@ -302,6 +302,7 @@ module Omnibus
config_files: config_files,
files: files,
build_dir: build_dir,
platform: Omnibus::Metadata.platform_shortname
}
)
end
......@@ -494,7 +495,11 @@ module Omnibus
# http://rpm.org/ticket/56
#
if version =~ /\-/
converted = version.gsub('-', '~')
if Ohai['platform_family'] == 'wrlinux'
converted = version.gsub('-', '_') #WRL5 has an elderly RPM version
else
converted = version.gsub('-', '~')
end
log.warn(log_key) do
"Tildes hold special significance in the RPM package versions. " \
......
......@@ -19,6 +19,9 @@ Name: <%= name %>
Version: <%= version %>
Release: <%= iteration %><%= dist_tag %>
Summary: <%= description.split("\n").first.empty? ? "_" : description.split("\n").first %>
-<% if platform != 'nexus' -%>
BuildArch: <%= architecture %>
-<% end -%>
AutoReqProv: no
BuildRoot: %buildroot
Prefix: /
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment