facter 1.6.12.rc2 → 1.6.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of facter might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,11 +1,8 @@
1
- 1.6.12-rc2
1
+ 1.6.12
2
2
  ===
3
3
  398b111 (Maint) Extract common elements of selinux tests
4
4
  c534126 (#10819) Avoid reading from /proc/self/mounts in ruby
5
5
  b95ea54 fix yum repo path in yaml file
6
-
7
- 1.6.12rc1
8
- ===
9
6
  3ad05f1 Remove version test from facter
10
7
  fce4b01 fix redhat spec release template variable
11
8
  903b1d9 Stop using sed to generate the preflight erb
@@ -105,6 +105,23 @@ def get_dash_version
105
105
  end
106
106
  end
107
107
 
108
+ def get_ips_version
109
+ if File.exists?('.git')
110
+ desc = %x{git describe}.chomp
111
+ osrelease = %x{uname -r}.chomp
112
+ varr = desc.gsub(/[a-zA-Z]+/,' ').split(' ')
113
+ ver = varr[0].gsub('-', '')
114
+ res = case varr[1]
115
+ when /(\d+)-(\d+)/ # rcX-build
116
+ "#{ver},#{osrelease}-#{$1}.#{$2}"
117
+ else
118
+ "#{ver},#{osrelease}"
119
+ end
120
+ else
121
+ get_pwd_version
122
+ end
123
+ end
124
+
108
125
  def get_dot_version
109
126
  if File.exists?('.git')
110
127
  %x{git describe}.chomp.gsub('-', '.').split('.')[0..3].join('.').gsub('v', '')
@@ -118,7 +135,7 @@ def get_pwd_version
118
135
  end
119
136
 
120
137
  def get_debversion
121
- (@version.include?("rc") ? @version.sub(/rc[0-9]+/, '0.1\0') : "#{@version}-1") + "#{@packager}#{get_debrelease}"
138
+ (@version.include?("rc") ? @version.sub(/rc[0-9]+/, '0.1\0') : "#{@version.gsub('-','.')}-1") + "#{@packager}#{get_debrelease}"
122
139
  end
123
140
 
124
141
  def get_origversion
@@ -130,7 +147,13 @@ def get_rpmversion
130
147
  end
131
148
 
132
149
  def get_version_file_version
133
- File.open( @version_file ) {|io| io.grep(/VERSION = /)}[0].split()[-1]
150
+ # Match version files containing 'VERSION = "x.x.x"' and just x.x.x
151
+ contents = IO.read(@version_file)
152
+ if version_string = contents.match(/VERSION =.*/)
153
+ version_string.to_s.split()[-1]
154
+ else
155
+ contents
156
+ end
134
157
  end
135
158
 
136
159
  def get_debrelease
@@ -212,3 +235,8 @@ def ship_gem(file)
212
235
  %x{gem push #{file}}
213
236
  end
214
237
 
238
+ def x(v)
239
+ puts %[#{v}]
240
+ print %x[#{v}]
241
+ end
242
+
@@ -1,6 +1,3 @@
1
- require 'rubygems'
2
- require 'rubygems/package_task'
3
- require 'rspec/core/rake_task'
4
1
  require 'yaml'
5
2
  require 'erb'
6
3
 
@@ -45,6 +42,7 @@ begin
45
42
  @apt_host = @pkg_defaults['apt_host']
46
43
  @apt_repo_url = @pkg_defaults['apt_repo_url']
47
44
  @apt_repo_path = @pkg_defaults['apt_repo_path']
45
+ @ips_repo = @pkg_defaults['ips_repo']
48
46
  rescue
49
47
  STDERR.puts "There was an error loading the packaging defaults from the 'ext/build_defaults.yaml' file."
50
48
  exit 1
@@ -53,6 +51,7 @@ end
53
51
  @build_root ||= Dir.pwd
54
52
  @version ||= get_dash_version
55
53
  @gemversion ||= get_dot_version
54
+ @ipsversion ||= get_ips_version
56
55
  @debversion ||= get_debversion
57
56
  @origversion ||= get_origversion
58
57
  @rpmversion ||= get_rpmversion
@@ -0,0 +1,79 @@
1
+ require 'erb'
2
+ namespace :package do
3
+ namespace :ips do
4
+ workdir = "pkg/ips"
5
+ proto = workdir + '/proto'
6
+
7
+ # Create a source repo
8
+ # We dont clean the base pkg directory only ips work dir.
9
+ task :clean do
10
+ %x[rm -rf #{workdir}]
11
+ end
12
+
13
+ # Create an installation image at ips/proto
14
+ task :prepare => :clean do
15
+ check_tool('pkgsend')
16
+ x %[mkdir -p #{workdir}]
17
+ x %[gmake -f ext/ips/rules DESTDIR=#{proto} 2>#{workdir}/build.out ]
18
+ end
19
+
20
+ # Process templates and write the initial manifest
21
+ task :prototmpl do
22
+ erb("ext/ips/#{@name}.p5m.erb", workdir + '/' + @name + '.p5m.x')
23
+ end
24
+
25
+ # Update manifest to include the installation image information.
26
+ task :protogen => :prototmpl do
27
+ x %[pkgsend generate #{proto} >> #{workdir}/#{@name}.p5m.x ]
28
+ os=%x[uname -p].chomp
29
+ end
30
+
31
+ # Generate and resolve dependency list
32
+ task :protodeps => :protogen do
33
+ x %[pkgdepend generate -d #{proto} #{workdir}/#{@name}.p5m.x > #{workdir}/#{@name}.depends ]
34
+ x %[pkgdepend resolve -m #{workdir}/#{@name}.depends ]
35
+ x %[cat #{workdir}/#{@name}.depends.res >> #{workdir}/#{@name}.p5m.x]
36
+ end
37
+
38
+ # Mogrify manifest to remove unncecessary info, and other kinds of transforms.
39
+ task :protomogrify => :protodeps do
40
+ x %[pkgmogrify ./ext/ips/transforms ./#{workdir}/#{@name}.p5m.x| pkgfmt >> #{workdir}/#{@name}.p5m ]
41
+ end
42
+
43
+ # Generate and resolve dependency list
44
+ task :license => :protomogrify do
45
+ x %[cp LICENSE #{proto}/#{@name}.license]
46
+ end
47
+
48
+ # Ensure that our manifest is sane.
49
+ task :lint => :license do
50
+ x %[pkglint #{workdir}/#{@name}.p5m]
51
+ end
52
+
53
+ # the older versions may require --fmri-in-manifest
54
+ task :package => :lint do
55
+ x %[pkgsend -s #{@ips_repo} publish -d #{proto} --fmri-in-manifest #{workdir}/#{@name}.p5m]
56
+ end
57
+
58
+ task :retrieve do
59
+ %x[rm #{workdir}/#{@name}.p5p]
60
+ x %[pkgrecv -s #{@ips_repo} -a -d #{workdir}/#{@name}.p5p #{@name}@#{@ipsversion}]
61
+ x %[pkg list -n -g #{workdir}/#{@name}.p5p #{@name}@#{@ipsversion}]
62
+ end
63
+
64
+ task :dry_install => :retrieve do
65
+ x %[pkg install -nv -g #{workdir}/#{@name}.p5p #{@name}@#{@ipsversion}]
66
+ end
67
+
68
+ task :install_cmd => :retrieve do
69
+ puts %x[pkg install -nv -g #{workdir}/#{@name}.p5p #{@name}@#{@ipsversion}]
70
+ end
71
+ end
72
+
73
+ desc "Uploads an ips version"
74
+ task :ips do
75
+ Rake::Task['package:ips:prepare'].invoke
76
+ Rake::Task['package:ips:package'].invoke
77
+ end
78
+
79
+ end
@@ -6,8 +6,10 @@ namespace :package do
6
6
  new_version = '"' + @version.to_s.strip + '"'
7
7
  if contents.match("VERSION = #{old_version}")
8
8
  contents.gsub!("VERSION = #{old_version}", "VERSION = #{new_version}")
9
- else
9
+ elsif contents.match("#{@name.upcase}VERSION = #{old_version}")
10
10
  contents.gsub!("#{@name.upcase}VERSION = #{old_version}", "#{@name.upcase}VERSION = #{new_version}")
11
+ else
12
+ contents.gsub!(old_version, @version)
11
13
  end
12
14
  file = File.open(@version_file, 'w')
13
15
  file.write contents
@@ -15,11 +15,12 @@ namespace :pl do
15
15
  rsync_to('pkg/deb/', @apt_host, @apt_repo_path)
16
16
  end
17
17
 
18
- desc "Ship built gem to rubygems"
19
- task :ship_gem do
20
- ship_gem("pkg/#{@name}-#{@gemversion}.gem")
18
+ if @build_gem == TRUE or @build_gem == 'true' or @build_gem == 'TRUE'
19
+ desc "Ship built gem to rubygems"
20
+ task :ship_gem do
21
+ ship_gem("pkg/#{@name}-#{@gemversion}.gem")
22
+ end
21
23
  end
22
-
23
24
  end
24
25
 
25
26
 
@@ -1,6 +1,7 @@
1
1
  namespace :package do
2
2
  desc "Create a source tar archive"
3
3
  task :tar => [ :clean ] do
4
+ tar = ENV['TAR'] || 'tar'
4
5
  workdir = "pkg/#{@name}-#{@version}"
5
6
  mkdir_p(workdir)
6
7
  FileList[@files.split(' ')].each do |f|
@@ -10,7 +11,7 @@ namespace :package do
10
11
  erb("#{workdir}/ext/debian/changelog.erb", "#{workdir}/ext/debian/changelog")
11
12
  rm_rf(FileList["#{workdir}/ext/debian/*.erb", "#{workdir}/ext/redhat/*.erb"])
12
13
  cd "pkg" do
13
- sh "tar --exclude=.gitignore --exclude=ext/#{@packaging_repo} -zcf #{@name}-#{@version}.tar.gz #{@name}-#{@version}"
14
+ sh "#{tar} --exclude=.gitignore --exclude=ext/#{@packaging_repo} -zcf #{@name}-#{@version}.tar.gz #{@name}-#{@version}"
14
15
  end
15
16
  rm_rf(workdir)
16
17
  puts
@@ -1,6 +1,6 @@
1
1
  module Facter
2
2
  if not defined? FACTERVERSION then
3
- FACTERVERSION = '1.6.12-rc2'
3
+ FACTERVERSION = '1.6.12'
4
4
  end
5
5
 
6
6
  def self.version
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 4099510959
5
- prerelease: 7
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
9
  - 12
10
- - rc
11
- - 2
12
- version: 1.6.12.rc2
10
+ version: 1.6.12
13
11
  platform: ruby
14
12
  authors:
15
13
  - Puppet Labs
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2012-08-31 00:00:00 Z
18
+ date: 2012-09-11 00:00:00 Z
21
19
  dependencies: []
22
20
 
23
21
  description: You can prove anything with facts!
@@ -62,6 +60,7 @@ files:
62
60
  - ext/packaging/tasks/clean.rake
63
61
  - ext/packaging/tasks/deb.rake
64
62
  - ext/packaging/tasks/gem.rake
63
+ - ext/packaging/tasks/ips.rake
65
64
  - ext/packaging/tasks/mock.rake
66
65
  - ext/packaging/tasks/release.rake
67
66
  - ext/packaging/tasks/rpm.rake
@@ -311,14 +310,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
311
310
  required_rubygems_version: !ruby/object:Gem::Requirement
312
311
  none: false
313
312
  requirements:
314
- - - ">"
313
+ - - ">="
315
314
  - !ruby/object:Gem::Version
316
- hash: 25
315
+ hash: 3
317
316
  segments:
318
- - 1
319
- - 3
320
- - 1
321
- version: 1.3.1
317
+ - 0
318
+ version: "0"
322
319
  requirements: []
323
320
 
324
321
  rubyforge_project: