lib/omnibus/packagers/solaris.rb in omnibus-5.4.0 vs lib/omnibus/packagers/solaris.rb in omnibus-5.5.0
- old
+ new
@@ -12,22 +12,22 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require 'socket'
+require "socket"
module Omnibus
class Packager::Solaris < Packager::Base
# @return [Hash]
SCRIPT_MAP = {
# Default Omnibus naming
- postinst: 'postinstall',
- postrm: 'postremove',
+ postinst: "postinstall",
+ postrm: "postremove",
# Default Solaris naming
- postinstall: 'postinstall',
- postremove: 'postremove',
+ postinstall: "postinstall",
+ postremove: "postremove",
}.freeze
id :solaris
build do
@@ -80,12 +80,12 @@
# Generate a Prototype file for solaris build
#
def write_prototype_file
shellout! "cd #{install_dirname} && find #{install_basename} -print > #{staging_dir_path('files')}"
- File.open staging_dir_path('files.clean'), 'w+' do |fout|
- File.open staging_dir_path('files') do |fin|
+ File.open staging_dir_path("files.clean"), "w+" do |fout|
+ File.open staging_dir_path("files") do |fin|
fin.each_line do |line|
if line.chomp =~ /\s/
log.warn(log_key) { "Skipping packaging '#{line}' file due to whitespace in filename" }
else
fout.write(line)
@@ -93,12 +93,12 @@
end
end
end
# generate list of control files
- File.open staging_dir_path('Prototype'), 'w+' do |f|
- f.write <<-EOF.gsub(/^ {10}/, '')
+ File.open staging_dir_path("Prototype"), "w+" do |f|
+ f.write <<-EOF.gsub(/^ {10}/, "")
i pkginfo
i postinstall
i postremove
EOF
end
@@ -115,11 +115,11 @@
#
def write_pkginfo_file
hostname = Socket.gethostname
# http://docs.oracle.com/cd/E19683-01/816-0219/6m6njqbat/index.html
- pkginfo_content = <<-EOF.gsub(/^ {8}/, '')
+ pkginfo_content = <<-EOF.gsub(/^ {8}/, "")
CLASSES=none
TZ=PST
PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
BASEDIR=#{install_dirname}
PKG=#{project.package_name}
@@ -130,11 +130,11 @@
DESC=#{project.description}
VENDOR=#{project.maintainer}
EMAIL=#{project.maintainer}
PSTAMP=#{hostname}#{Time.now.utc.iso8601}
EOF
- File.open staging_dir_path('pkginfo'), 'w+' do |f|
+ File.open staging_dir_path("pkginfo"), "w+" do |f|
f.write pkginfo_content
end
end
#
@@ -154,14 +154,14 @@
# @return [String]
#
def safe_architecture
# The #i386? and #intel? helpers come from chef-sugar
if intel?
- 'i386'
+ "i386"
elsif sparc?
- 'sparc'
+ "sparc"
else
- Ohai['kernel']['machine']
+ Ohai["kernel"]["machine"]
end
end
end
end