tpkg 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/bin/tpkg +3 -3
- data/lib/tpkg.rb +17 -6
- metadata +25 -11
- data/schema/schema-1.0.yml +0 -84
data/Rakefile
CHANGED
@@ -2,10 +2,10 @@ 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.3'
|
6
6
|
s.authors = ['Darren Dao', 'Jason Heiss']
|
7
7
|
s.email = 'tpkg-users@lists.sourceforge.net'
|
8
|
-
s.homepage = 'http://tpkg.
|
8
|
+
s.homepage = 'http://tpkg.github.com/'
|
9
9
|
s.rubyforge_project = 'tpkg'
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.required_ruby_version = '>=1.8'
|
data/bin/tpkg
CHANGED
@@ -64,7 +64,7 @@ def parse_config_files
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# FIXME: Move config file parsing to tpkg.rb
|
67
|
-
#
|
67
|
+
# https://github.com/tpkg/client/issues/22
|
68
68
|
fsroot = @tpkg_options[:file_system_root] ? @tpkg_options[:file_system_root] : ''
|
69
69
|
settings = {:sources => []}
|
70
70
|
[File.join(fsroot, Tpkg::DEFAULT_CONFIGDIR, 'tpkg.conf'),
|
@@ -514,8 +514,8 @@ end
|
|
514
514
|
case
|
515
515
|
when !@sudo.nil?
|
516
516
|
@tpkg_options[:sudo] = @sudo
|
517
|
-
when
|
518
|
-
@sudo = @tpkg_options[:sudo]
|
517
|
+
when settings.has_key?(:sudo)
|
518
|
+
@sudo = @tpkg_options[:sudo] = settings[:sudo]
|
519
519
|
else
|
520
520
|
@sudo = @tpkg_options[:sudo] = Tpkg.sudo_default?
|
521
521
|
end
|
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.3'
|
46
46
|
|
47
47
|
GENERIC_ERR = 1
|
48
48
|
POSTINSTALL_ERR = 2
|
@@ -3692,9 +3692,14 @@ class Tpkg
|
|
3692
3692
|
name = pkg[:metadata][:name]
|
3693
3693
|
version = pkg[:metadata][:version]
|
3694
3694
|
package_version = pkg[:metadata][:package_version]
|
3695
|
-
pkgname = "#{name}
|
3695
|
+
pkgname = "#{name}"
|
3696
|
+
if Tpkg::get_os =~ /Debian|Ubuntu/
|
3697
|
+
pkgname << "=#{version}"
|
3698
|
+
else
|
3699
|
+
pkgname <<"-#{version}"
|
3700
|
+
end
|
3696
3701
|
if package_version
|
3697
|
-
|
3702
|
+
pkgname << "-#{package_version}"
|
3698
3703
|
end
|
3699
3704
|
puts "Native #{pkgname}"
|
3700
3705
|
else
|
@@ -3776,7 +3781,7 @@ class Tpkg
|
|
3776
3781
|
elsif Tpkg::get_os =~ /Debian|Ubuntu/
|
3777
3782
|
name = pkg[:metadata][:name]
|
3778
3783
|
version = pkg[:metadata][:version]
|
3779
|
-
pkgname = "#{name}
|
3784
|
+
pkgname = "#{name}=#{version}"
|
3780
3785
|
if pkg[:metadata][:package_version]
|
3781
3786
|
pkgname << "-#{pkg[:metadata][:package_version]}"
|
3782
3787
|
end
|
@@ -3987,7 +3992,7 @@ class Tpkg
|
|
3987
3992
|
elsif Tpkg::get_os =~ /Debian|Ubuntu/
|
3988
3993
|
name = pkg[:metadata][:name]
|
3989
3994
|
version = pkg[:metadata][:version]
|
3990
|
-
pkgname = "#{name}
|
3995
|
+
pkgname = "#{name}=#{version}"
|
3991
3996
|
if pkg[:metadata][:package_version]
|
3992
3997
|
pkgname << "-#{pkg[:metadata][:package_version]}"
|
3993
3998
|
end
|
@@ -4768,7 +4773,13 @@ class Tpkg
|
|
4768
4773
|
end
|
4769
4774
|
|
4770
4775
|
def send_update_to_server(options={})
|
4771
|
-
|
4776
|
+
|
4777
|
+
fqdn = Facter['fqdn'].value
|
4778
|
+
if fqdn == nil
|
4779
|
+
fqdn = Facter['hostname'].value<<"."<<Facter['domain'].value
|
4780
|
+
end
|
4781
|
+
|
4782
|
+
request = {"client"=>fqdn}
|
4772
4783
|
request[:user] = Etc.getlogin || Etc.getpwuid(Process.uid).name
|
4773
4784
|
request[:tpkg_home] = ENV['TPKG_HOME']
|
4774
4785
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tpkg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-09-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: facter
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: net-ssh
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,10 +38,15 @@ dependencies:
|
|
33
38
|
version: '0'
|
34
39
|
type: :runtime
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
37
47
|
- !ruby/object:Gem::Dependency
|
38
48
|
name: kwalify
|
39
|
-
requirement:
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
none: false
|
41
51
|
requirements:
|
42
52
|
- - ! '>='
|
@@ -44,7 +54,12 @@ dependencies:
|
|
44
54
|
version: '0'
|
45
55
|
type: :runtime
|
46
56
|
prerelease: false
|
47
|
-
version_requirements:
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
48
63
|
description:
|
49
64
|
email: tpkg-users@lists.sourceforge.net
|
50
65
|
executables:
|
@@ -71,7 +86,6 @@ files:
|
|
71
86
|
- schema/schema-1.0.7.yml
|
72
87
|
- schema/schema-1.0.8.yml
|
73
88
|
- schema/schema-1.0.9.yml
|
74
|
-
- schema/schema-1.0.yml
|
75
89
|
- schema/schema.yml
|
76
90
|
- schema/tpkg-1.0.0.dtd
|
77
91
|
- schema/tpkg-1.0.1.dtd
|
@@ -84,7 +98,7 @@ files:
|
|
84
98
|
- schema/tpkg-1.0.8.dtd
|
85
99
|
- schema/tpkg-1.0.9.dtd
|
86
100
|
- schema/tpkg.dtd
|
87
|
-
homepage: http://tpkg.
|
101
|
+
homepage: http://tpkg.github.com/
|
88
102
|
licenses: []
|
89
103
|
post_install_message:
|
90
104
|
rdoc_options: []
|
@@ -104,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
118
|
version: '0'
|
105
119
|
requirements: []
|
106
120
|
rubyforge_project: tpkg
|
107
|
-
rubygems_version: 1.8.
|
121
|
+
rubygems_version: 1.8.24
|
108
122
|
signing_key:
|
109
123
|
specification_version: 3
|
110
124
|
summary: tpkg Application Packaging & Deployment
|
data/schema/schema-1.0.yml
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
type: map
|
2
|
-
mapping:
|
3
|
-
"schema_file": { type: text }
|
4
|
-
"name": { type: str, required: yes }
|
5
|
-
"version": { type: text, required: yes }
|
6
|
-
"package_version": { type: text }
|
7
|
-
"maintainer": { type: str, required: yes }
|
8
|
-
"operatingsystem": { type: seq, sequence: [ {type: str} ] }
|
9
|
-
"architecture": { type: seq, sequence: [ {type: str} ] }
|
10
|
-
"description": { type: str }
|
11
|
-
"bugreporting": { type: str }
|
12
|
-
"dependencies":
|
13
|
-
type: seq
|
14
|
-
sequence:
|
15
|
-
- type: map
|
16
|
-
mapping:
|
17
|
-
"name": { type: str, required: yes }
|
18
|
-
"minimum_version": { type: text }
|
19
|
-
"maximum_version": { type: text }
|
20
|
-
"minimum_package_version": { type: text }
|
21
|
-
"maximum_package_version": { type: text }
|
22
|
-
"native": { type: bool }
|
23
|
-
"type": { type: any, pattern: /(native|tpkg)$/ }
|
24
|
-
"conflicts":
|
25
|
-
type: seq
|
26
|
-
sequence:
|
27
|
-
- type: map
|
28
|
-
mapping:
|
29
|
-
"name": { type: str, required: yes }
|
30
|
-
"minimum_version": { type: text }
|
31
|
-
"maximum_version": { type: text }
|
32
|
-
"minimum_package_version": { type: text }
|
33
|
-
"maximum_package_version": { type: text }
|
34
|
-
"native": { type: bool }
|
35
|
-
"type": { type: any, pattern: /(native|tpkg)$/ }
|
36
|
-
"externals":
|
37
|
-
type: seq
|
38
|
-
sequence:
|
39
|
-
- type: map
|
40
|
-
mapping:
|
41
|
-
"name": { type: text, required: yes }
|
42
|
-
"data": { type: text }
|
43
|
-
"datascript": { type: text }
|
44
|
-
"files":
|
45
|
-
type: map
|
46
|
-
mapping:
|
47
|
-
"file_defaults":
|
48
|
-
type: map
|
49
|
-
mapping:
|
50
|
-
"posix":
|
51
|
-
type: map
|
52
|
-
mapping:
|
53
|
-
"owner": { type: text }
|
54
|
-
"group": { type: text }
|
55
|
-
"perms": { type: text }
|
56
|
-
"dirs_defaults":
|
57
|
-
type: map
|
58
|
-
mapping:
|
59
|
-
"posix":
|
60
|
-
type: map
|
61
|
-
mapping:
|
62
|
-
"owner": { type: text }
|
63
|
-
"group": { type: text }
|
64
|
-
"perms": { type: text }
|
65
|
-
"files":
|
66
|
-
type: seq
|
67
|
-
sequence:
|
68
|
-
- type: map
|
69
|
-
mapping:
|
70
|
-
"path": { type: text, required: yes }
|
71
|
-
"encrypt": { type: any, pattern: /^true$|^precrypt$/ }
|
72
|
-
"init":
|
73
|
-
type: map
|
74
|
-
mapping:
|
75
|
-
"start": { type: int }
|
76
|
-
"levels": { type: seq, sequence: [ { type: int } ] }
|
77
|
-
"crontab":
|
78
|
-
type: map
|
79
|
-
mapping: { "user": { type: str } }
|
80
|
-
"posix":
|
81
|
-
type: map
|
82
|
-
mapping: { "owner": { type: text },
|
83
|
-
"group": { type: text },
|
84
|
-
"perms": { type: text } }
|