tpkg 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/gem2tpkg +1 -1
- data/bin/tpkg +33 -14
- data/bin/tpkg_xml_to_yml +1 -1
- data/lib/tpkg.rb +14 -3
- metadata +50 -69
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rake/gempackagetask'
|
|
2
2
|
spec = Gem::Specification.new do |s|
|
3
3
|
s.name = 'tpkg'
|
4
4
|
s.summary = 'tpkg Application Packaging & Deployment'
|
5
|
-
s.version = '2.3.
|
5
|
+
s.version = '2.3.1'
|
6
6
|
s.authors = ['Darren Dao', 'Jason Heiss']
|
7
7
|
s.email = 'tpkg-users@lists.sourceforge.net'
|
8
8
|
s.homepage = 'http://tpkg.sourceforge.net'
|
data/bin/gem2tpkg
CHANGED
data/bin/tpkg
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/ruby
|
2
2
|
##############################################################################
|
3
3
|
# tpkg package management system
|
4
4
|
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
@@ -23,13 +23,6 @@ require 'tpkg'
|
|
23
23
|
@prompt = true
|
24
24
|
@quiet = false
|
25
25
|
@sudo = nil
|
26
|
-
# Neither of the common Windows environments for running Ruby have
|
27
|
-
# sudo, so turn it off by default on those platforms
|
28
|
-
if RUBY_PLATFORM == 'i386-mingw32' || RUBY_PLATFORM == 'i386-cygwin'
|
29
|
-
@sudo = false
|
30
|
-
else
|
31
|
-
@sudo = true
|
32
|
-
end
|
33
26
|
@force = false
|
34
27
|
@deploy = false
|
35
28
|
@deploy_params = ARGV # hold parameters for how to invoke tpkg on the machines we're deploying to
|
@@ -52,9 +45,9 @@ def rerun_with_sudo_if_necessary
|
|
52
45
|
# environment. As such we set the base as a command line option to ensure
|
53
46
|
# it survives the sudo process.
|
54
47
|
if ENV['TPKG_HOME']
|
55
|
-
exec('sudo', $0, '--base', ENV['TPKG_HOME'], *ARGV)
|
48
|
+
exec('sudo', '-H', $0, '--base', ENV['TPKG_HOME'], *ARGV)
|
56
49
|
else
|
57
|
-
exec('sudo', $0, *ARGV)
|
50
|
+
exec('sudo', '-H', $0, *ARGV)
|
58
51
|
end
|
59
52
|
end
|
60
53
|
end
|
@@ -92,6 +85,20 @@ def parse_config_files
|
|
92
85
|
elsif key == 'host_group_script'
|
93
86
|
settings[:host_group_script] = value
|
94
87
|
puts "Loaded host group script #{value} from #{configfile}" if @debug
|
88
|
+
elsif key == 'sudo'
|
89
|
+
sudoval = nil
|
90
|
+
# My kingdom for a String#to_boolean
|
91
|
+
if value == 'true'
|
92
|
+
sudoval = true
|
93
|
+
elsif value == 'false'
|
94
|
+
sudoval = false
|
95
|
+
else
|
96
|
+
puts "Unrecognized value #{value} for sudo setting in #{configfile}, ignoring"
|
97
|
+
end
|
98
|
+
if !sudoval.nil?
|
99
|
+
settings[:sudo] = sudoval
|
100
|
+
puts "Loaded sudo #{value} from #{configfile}" if @debug
|
101
|
+
end
|
95
102
|
end
|
96
103
|
end
|
97
104
|
end
|
@@ -484,11 +491,23 @@ def instantiate_tpkg
|
|
484
491
|
|
485
492
|
# Sources can come from the command line and config files. We use the
|
486
493
|
# combined set of sources.
|
487
|
-
@sources.concat(settings[:sources])
|
494
|
+
@sources.concat(settings[:sources]).uniq!
|
488
495
|
@tpkg_options[:sources] = @sources
|
489
496
|
|
490
497
|
@tpkg_options[:report_server] = settings[:report_server]
|
491
|
-
|
498
|
+
# sudo can come from three possible places. They take precedence in this
|
499
|
+
# order:
|
500
|
+
# - command line option
|
501
|
+
# - config file
|
502
|
+
# - Tpkg.sudo_default? method defined in tpkg.rb
|
503
|
+
case
|
504
|
+
when !@sudo.nil?
|
505
|
+
@tpkg_options[:sudo] = @sudo
|
506
|
+
when @tpkg_options.has_key?(:sudo)
|
507
|
+
@sudo = @tpkg_options[:sudo]
|
508
|
+
else
|
509
|
+
@sudo = @tpkg_options[:sudo] = Tpkg.sudo_default?
|
510
|
+
end
|
492
511
|
@tpkg_options[:force] = @force
|
493
512
|
|
494
513
|
if !@sudo
|
@@ -636,7 +655,7 @@ when :query_installed
|
|
636
655
|
# command-line syntax like "tpkg -q foo || tpkg -i foo" to ensure
|
637
656
|
# that a package is installed.
|
638
657
|
ret_val = 1
|
639
|
-
$stderr.puts "No packages matching '#{@action_value}' installed" if !@quiet
|
658
|
+
$stderr.puts "No packages matching '#{@action_value.join(',')}' installed" if !@quiet
|
640
659
|
else
|
641
660
|
packages.each do | name, pkgs |
|
642
661
|
matches.concat(pkgs)
|
@@ -884,7 +903,7 @@ when :query_available
|
|
884
903
|
ret_val = 1
|
885
904
|
if !@quiet
|
886
905
|
if @action_value
|
887
|
-
$stderr.puts "No packages matching '#{@action_value}' available"
|
906
|
+
$stderr.puts "No packages matching '#{@action_value.join(',')}' available"
|
888
907
|
else
|
889
908
|
$stderr.puts "No packages available"
|
890
909
|
end
|
data/bin/tpkg_xml_to_yml
CHANGED
data/lib/tpkg.rb
CHANGED
@@ -42,7 +42,7 @@ OpenSSLCipherError = OpenSSL::Cipher.const_defined?(:CipherError) ? OpenSSL::Cip
|
|
42
42
|
|
43
43
|
class Tpkg
|
44
44
|
|
45
|
-
VERSION = '2.3.
|
45
|
+
VERSION = '2.3.1'
|
46
46
|
|
47
47
|
GENERIC_ERR = 1
|
48
48
|
POSTINSTALL_ERR = 2
|
@@ -749,7 +749,18 @@ class Tpkg
|
|
749
749
|
end
|
750
750
|
@@os.dup
|
751
751
|
end
|
752
|
-
|
752
|
+
|
753
|
+
# Should sudo be on by default?
|
754
|
+
def self.sudo_default?
|
755
|
+
# Neither of the common Windows environments for running Ruby have
|
756
|
+
# sudo, so turn it off by default on those platforms
|
757
|
+
if RUBY_PLATFORM == 'i386-mingw32' || RUBY_PLATFORM == 'i386-cygwin'
|
758
|
+
false
|
759
|
+
else
|
760
|
+
true
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
753
764
|
# Given an array of pkgs. Determine if any of those package
|
754
765
|
# satisfy the requirement specified by req
|
755
766
|
def self.packages_meet_requirement?(pkgs, req)
|
@@ -1356,7 +1367,7 @@ class Tpkg
|
|
1356
1367
|
if options.has_key?(:force)
|
1357
1368
|
@force = options[:force]
|
1358
1369
|
end
|
1359
|
-
@sudo =
|
1370
|
+
@sudo = Tpkg.sudo_default?
|
1360
1371
|
if options.has_key?(:sudo)
|
1361
1372
|
@sudo = options[:sudo]
|
1362
1373
|
end
|
metadata
CHANGED
@@ -1,71 +1,60 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tpkg
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 2
|
7
|
-
- 3
|
8
|
-
- 0
|
9
|
-
version: 2.3.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.3.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Darren Dao
|
13
9
|
- Jason Heiss
|
14
10
|
autorequire:
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-04-05 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
22
16
|
name: facter
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 0
|
30
|
-
version: "0"
|
17
|
+
requirement: &70195691861980 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
31
23
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: net-ssh
|
35
24
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
25
|
+
version_requirements: *70195691861980
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: net-ssh
|
28
|
+
requirement: &70195691861560 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
43
34
|
type: :runtime
|
44
|
-
version_requirements: *id002
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: kwalify
|
47
35
|
prerelease: false
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
36
|
+
version_requirements: *70195691861560
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: kwalify
|
39
|
+
requirement: &70195691861000 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
55
45
|
type: :runtime
|
56
|
-
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70195691861000
|
57
48
|
description:
|
58
49
|
email: tpkg-users@lists.sourceforge.net
|
59
|
-
executables:
|
50
|
+
executables:
|
60
51
|
- tpkg
|
61
52
|
- cpan2tpkg
|
62
53
|
- gem2tpkg
|
63
54
|
- tpkg_xml_to_yml
|
64
55
|
extensions: []
|
65
|
-
|
66
56
|
extra_rdoc_files: []
|
67
|
-
|
68
|
-
files:
|
57
|
+
files:
|
69
58
|
- bin/cpan2tpkg
|
70
59
|
- bin/gem2tpkg
|
71
60
|
- bin/tpkg
|
@@ -95,36 +84,28 @@ files:
|
|
95
84
|
- schema/tpkg-1.0.8.dtd
|
96
85
|
- schema/tpkg-1.0.9.dtd
|
97
86
|
- schema/tpkg.dtd
|
98
|
-
has_rdoc: true
|
99
87
|
homepage: http://tpkg.sourceforge.net
|
100
88
|
licenses: []
|
101
|
-
|
102
89
|
post_install_message:
|
103
90
|
rdoc_options: []
|
104
|
-
|
105
|
-
require_paths:
|
91
|
+
require_paths:
|
106
92
|
- lib
|
107
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
segments:
|
120
|
-
- 0
|
121
|
-
version: "0"
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '1.8'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
122
105
|
requirements: []
|
123
|
-
|
124
106
|
rubyforge_project: tpkg
|
125
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.8.15
|
126
108
|
signing_key:
|
127
109
|
specification_version: 3
|
128
110
|
summary: tpkg Application Packaging & Deployment
|
129
111
|
test_files: []
|
130
|
-
|