tpkg 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +20 -0
  5. data/Portfile +39 -0
  6. data/Portfile.template +39 -0
  7. data/README.md +43 -0
  8. data/Rakefile +468 -18
  9. data/bin/gem2tpkg +2 -2
  10. data/bin/tpkg +18 -13
  11. data/bin/tpkg_uploader +132 -0
  12. data/ca.pem +1 -0
  13. data/control +7 -0
  14. data/depend +3 -0
  15. data/externals-etch/authorized_keys +40 -0
  16. data/externals-etch/group +9 -0
  17. data/externals-etch/iptables +38 -0
  18. data/externals-etch/limits +30 -0
  19. data/externals-etch/nfs +30 -0
  20. data/externals-etch/sudo +30 -0
  21. data/externals-etch/supplemental_groups +8 -0
  22. data/externals-etch/sysctl +30 -0
  23. data/externals-etch/user +41 -0
  24. data/externals/group +39 -0
  25. data/externals/supplemental_groups +48 -0
  26. data/externals/user +39 -0
  27. data/lib/tpkg.rb +260 -991
  28. data/lib/tpkg/os.rb +164 -0
  29. data/lib/tpkg/os/debian.rb +159 -0
  30. data/lib/tpkg/os/freebsd.rb +113 -0
  31. data/lib/tpkg/os/macosx.rb +113 -0
  32. data/lib/tpkg/os/redhat.rb +173 -0
  33. data/lib/tpkg/os/solaris.rb +101 -0
  34. data/lib/tpkg/os/windows.rb +26 -0
  35. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify.rb +67 -0
  36. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/errors.rb +127 -0
  37. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/kwalify.schema.yaml +58 -0
  38. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/main.rb +442 -0
  39. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/messages.rb +173 -0
  40. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/meta-validator.rb +275 -0
  41. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/parser/base.rb +127 -0
  42. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/parser/yaml.rb +841 -0
  43. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/rule.rb +559 -0
  44. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/templates/genclass-java.eruby +222 -0
  45. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/templates/genclass-php.eruby +104 -0
  46. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/templates/genclass-ruby.eruby +113 -0
  47. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/types.rb +156 -0
  48. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util.rb +158 -0
  49. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/assert-text-equal.rb +46 -0
  50. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/hash-interface.rb +18 -0
  51. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/hashlike.rb +51 -0
  52. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/option-parser.rb +220 -0
  53. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/ordered-hash.rb +57 -0
  54. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/util/testcase-helper.rb +112 -0
  55. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/validator.rb +282 -0
  56. data/lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/yaml-parser.rb +870 -0
  57. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh.rb +219 -0
  58. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/agent.rb +179 -0
  59. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/constants.rb +18 -0
  60. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/key_manager.rb +219 -0
  61. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/methods/abstract.rb +60 -0
  62. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/methods/hostbased.rb +71 -0
  63. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/methods/keyboard_interactive.rb +66 -0
  64. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/methods/password.rb +39 -0
  65. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/methods/publickey.rb +92 -0
  66. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/pageant.rb +183 -0
  67. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/authentication/session.rb +134 -0
  68. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/buffer.rb +340 -0
  69. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/buffered_io.rb +198 -0
  70. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/config.rb +205 -0
  71. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/connection/channel.rb +630 -0
  72. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/connection/constants.rb +33 -0
  73. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/connection/session.rb +597 -0
  74. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/connection/term.rb +178 -0
  75. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/errors.rb +85 -0
  76. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/key_factory.rb +102 -0
  77. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/known_hosts.rb +129 -0
  78. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/loggable.rb +61 -0
  79. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/packet.rb +102 -0
  80. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/prompt.rb +93 -0
  81. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/proxy/command.rb +75 -0
  82. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/proxy/errors.rb +14 -0
  83. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/proxy/http.rb +94 -0
  84. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/proxy/socks4.rb +70 -0
  85. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/proxy/socks5.rb +142 -0
  86. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/ruby_compat.rb +43 -0
  87. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/service/forward.rb +288 -0
  88. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test.rb +89 -0
  89. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/channel.rb +129 -0
  90. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/extensions.rb +152 -0
  91. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/kex.rb +44 -0
  92. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/local_packet.rb +51 -0
  93. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/packet.rb +81 -0
  94. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/remote_packet.rb +38 -0
  95. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/script.rb +157 -0
  96. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/test/socket.rb +64 -0
  97. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/algorithms.rb +384 -0
  98. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/cipher_factory.rb +97 -0
  99. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/constants.rb +30 -0
  100. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac.rb +31 -0
  101. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/abstract.rb +79 -0
  102. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/md5.rb +12 -0
  103. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/md5_96.rb +11 -0
  104. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/none.rb +15 -0
  105. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/sha1.rb +13 -0
  106. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/hmac/sha1_96.rb +11 -0
  107. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/identity_cipher.rb +55 -0
  108. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/kex.rb +13 -0
  109. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +208 -0
  110. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +77 -0
  111. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/openssl.rb +127 -0
  112. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/packet_stream.rb +235 -0
  113. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb +71 -0
  114. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/session.rb +276 -0
  115. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/transport/state.rb +206 -0
  116. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/verifiers/lenient.rb +30 -0
  117. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/verifiers/null.rb +12 -0
  118. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/verifiers/strict.rb +53 -0
  119. data/lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/version.rb +62 -0
  120. data/lib/tpkg/version.rb +3 -0
  121. data/man/man1/cpan2tpkg.1 +82 -0
  122. data/man/man1/gem2tpkg.1 +120 -0
  123. data/man/man1/tpkg.1 +411 -0
  124. data/pkginfo +8 -0
  125. data/postinstall.solaris +11 -0
  126. data/postremove.solaris +16 -0
  127. data/schema/schema-1.0.5.yml +0 -0
  128. data/schema/schema-1.0.6.yml +0 -0
  129. data/schema/schema-1.0.7.yml +0 -0
  130. data/schema/schema-1.0.8.yml +0 -0
  131. data/schema/schema-1.0.9.yml +0 -0
  132. data/schema/schema.yml +0 -0
  133. data/schema/tpkg-1.0.0.dtd +0 -0
  134. data/schema/tpkg-1.0.1.dtd +0 -0
  135. data/schema/tpkg-1.0.2.dtd +0 -0
  136. data/schema/tpkg-1.0.3.dtd +0 -0
  137. data/schema/tpkg-1.0.4.dtd +0 -0
  138. data/schema/tpkg-1.0.5.dtd +0 -0
  139. data/schema/tpkg-1.0.6.dtd +0 -0
  140. data/schema/tpkg-1.0.7.dtd +0 -0
  141. data/schema/tpkg-1.0.8.dtd +0 -0
  142. data/schema/tpkg-1.0.9.dtd +0 -0
  143. data/schema/tpkg.dtd +0 -0
  144. data/test/TODO +30 -0
  145. data/test/premadetestpkg/pkg_without_file_metadata-1.0-1.tpkg +0 -0
  146. data/test/test_checksum.rb +53 -0
  147. data/test/test_compress.rb +55 -0
  148. data/test/test_conflict.rb +41 -0
  149. data/test/test_crontabs.rb +398 -0
  150. data/test/test_dependency.rb +1113 -0
  151. data/test/test_downgrade.rb +80 -0
  152. data/test/test_download.rb +95 -0
  153. data/test/test_encrypt.rb +136 -0
  154. data/test/test_filemetadata.rb +131 -0
  155. data/test/test_initscript.rb +93 -0
  156. data/test/test_install.rb +186 -0
  157. data/test/test_lock.rb +82 -0
  158. data/test/test_make.rb +410 -0
  159. data/test/test_metadata.rb +805 -0
  160. data/test/test_misc.rb +379 -0
  161. data/test/test_options.rb +1711 -0
  162. data/test/test_os.rb +193 -0
  163. data/test/test_os_debian.rb +99 -0
  164. data/test/test_os_freebsd.rb +89 -0
  165. data/test/test_os_macosx.rb +79 -0
  166. data/test/test_os_redhat.rb +124 -0
  167. data/test/test_os_solaris.rb +85 -0
  168. data/test/test_os_windows.rb +26 -0
  169. data/test/test_query.rb +134 -0
  170. data/test/test_remove.rb +539 -0
  171. data/test/test_tar.rb +99 -0
  172. data/test/test_unpack.rb +977 -0
  173. data/test/test_upgrade.rb +398 -0
  174. data/test/test_version.rb +54 -0
  175. data/test/testcmds/crontab +14 -0
  176. data/test/testcmds/debian/apt-cache +145 -0
  177. data/test/testcmds/debian/dpkg-query +16 -0
  178. data/test/testcmds/freebsd/pkg_info +13 -0
  179. data/test/testcmds/macosx/port +35 -0
  180. data/test/testcmds/redhat/rpmbuild +6 -0
  181. data/test/testcmds/redhat/yum +90 -0
  182. data/test/testcmds/solaris/pkginfo +25 -0
  183. data/test/testcmds/solaris/pkgutil +36 -0
  184. data/test/testpkg/reloc/encfile +2 -0
  185. data/test/testpkg/reloc/file +2 -0
  186. data/test/testpkg/reloc/precryptfile +1 -0
  187. data/test/testpkg/reloc/precryptfile.plaintext +3 -0
  188. data/test/testpkg/tpkg-bad-ownergroup.xml +25 -0
  189. data/test/testpkg/tpkg-bad-ownergroup.yml +18 -0
  190. data/test/testpkg/tpkg-default-perms.xml +28 -0
  191. data/test/testpkg/tpkg-default-perms.yml +20 -0
  192. data/test/testpkg/tpkg-good-ownergroup.xml +25 -0
  193. data/test/testpkg/tpkg-good-ownergroup.yml +18 -0
  194. data/test/testpkg/tpkg-nativedeps.yml +13 -0
  195. data/test/testpkg/tpkg-nofiles.xml +14 -0
  196. data/test/testpkg/tpkg-nofiles.yml +9 -0
  197. data/test/testpkg/tpkg.xml +35 -0
  198. data/test/testpkg/tpkg.yml +25 -0
  199. data/test/tpkgtest.rb +300 -0
  200. data/tpkg.conf +16 -0
  201. data/tpkg.gemspec +24 -0
  202. data/tpkg.spec +28 -0
  203. data/tpkg.xml +17 -0
  204. data/tpkg_profile.sh +32 -0
  205. metadata +306 -31
@@ -0,0 +1,30 @@
1
+ require 'net/ssh/verifiers/strict'
2
+
3
+ module Net; module SSH; module Verifiers
4
+
5
+ # Basically the same as the Strict verifier, but does not try to actually
6
+ # verify a connection if the server is the localhost and the port is a
7
+ # nonstandard port number. Those two conditions will typically mean the
8
+ # connection is being tunnelled through a forwarded port, so the known-hosts
9
+ # file will not be helpful (in general).
10
+ class Lenient < Strict
11
+ # Tries to determine if the connection is being tunnelled, and if so,
12
+ # returns true. Otherwise, performs the standard strict verification.
13
+ def verify(arguments)
14
+ return true if tunnelled?(arguments)
15
+ super
16
+ end
17
+
18
+ private
19
+
20
+ # A connection is potentially being tunnelled if the port is not 22,
21
+ # and the ip refers to the localhost.
22
+ def tunnelled?(args)
23
+ return false if args[:session].port == Net::SSH::Transport::Session::DEFAULT_PORT
24
+
25
+ ip = args[:session].peer[:ip]
26
+ return ip == "127.0.0.1" || ip == "::1"
27
+ end
28
+ end
29
+
30
+ end; end; end
@@ -0,0 +1,12 @@
1
+ module Net; module SSH; module Verifiers
2
+
3
+ # The Null host key verifier simply allows every key it sees, without
4
+ # bothering to verify. This is simple, but is not particularly secure.
5
+ class Null
6
+ # Returns true.
7
+ def verify(arguments)
8
+ true
9
+ end
10
+ end
11
+
12
+ end; end; end
@@ -0,0 +1,53 @@
1
+ require 'net/ssh/errors'
2
+ require 'net/ssh/known_hosts'
3
+
4
+ module Net; module SSH; module Verifiers
5
+
6
+ # Does a strict host verification, looking the server up in the known
7
+ # host files to see if a key has already been seen for this server. If this
8
+ # server does not appear in any host file, this will silently add the
9
+ # server. If the server does appear at least once, but the key given does
10
+ # not match any known for the server, an exception will be raised (HostKeyMismatch).
11
+ # Otherwise, this returns true.
12
+ class Strict
13
+ def verify(arguments)
14
+ options = arguments[:session].options
15
+ host = options[:host_key_alias] || arguments[:session].host_as_string
16
+ matches = Net::SSH::KnownHosts.search_for(host, arguments[:session].options)
17
+
18
+ # we've never seen this host before, so just automatically add the key.
19
+ # not the most secure option (since the first hit might be the one that
20
+ # is hacked), but since almost nobody actually compares the key
21
+ # fingerprint, this is a reasonable compromise between usability and
22
+ # security.
23
+ if matches.empty?
24
+ ip = arguments[:session].peer[:ip]
25
+ Net::SSH::KnownHosts.add(host, arguments[:key], arguments[:session].options)
26
+ return true
27
+ end
28
+
29
+ # If we found any matches, check to see that the key type and
30
+ # blob also match.
31
+ found = matches.any? do |key|
32
+ key.ssh_type == arguments[:key].ssh_type &&
33
+ key.to_blob == arguments[:key].to_blob
34
+ end
35
+
36
+ # If a match was found, return true. Otherwise, raise an exception
37
+ # indicating that the key was not recognized.
38
+ found || process_cache_miss(host, arguments)
39
+ end
40
+
41
+ private
42
+
43
+ def process_cache_miss(host, args)
44
+ exception = HostKeyMismatch.new("fingerprint #{args[:fingerprint]} does not match for #{host.inspect}")
45
+ exception.data = args
46
+ exception.callback = Proc.new do
47
+ Net::SSH::KnownHosts.add(host, args[:key], args[:session].options)
48
+ end
49
+ raise exception
50
+ end
51
+ end
52
+
53
+ end; end; end
@@ -0,0 +1,62 @@
1
+ module Net; module SSH
2
+ # A class for describing the current version of a library. The version
3
+ # consists of three parts: the +major+ number, the +minor+ number, and the
4
+ # +tiny+ (or +patch+) number.
5
+ #
6
+ # Two Version instances may be compared, so that you can test that a version
7
+ # of a library is what you require:
8
+ #
9
+ # require 'net/ssh/version'
10
+ #
11
+ # if Net::SSH::Version::CURRENT < Net::SSH::Version[2,1,0]
12
+ # abort "your software is too old!"
13
+ # end
14
+ class Version
15
+ include Comparable
16
+
17
+ # A convenience method for instantiating a new Version instance with the
18
+ # given +major+, +minor+, and +tiny+ components.
19
+ def self.[](major, minor, tiny)
20
+ new(major, minor, tiny)
21
+ end
22
+
23
+ attr_reader :major, :minor, :tiny
24
+
25
+ # Create a new Version object with the given components.
26
+ def initialize(major, minor, tiny)
27
+ @major, @minor, @tiny = major, minor, tiny
28
+ end
29
+
30
+ # Compare this version to the given +version+ object.
31
+ def <=>(version)
32
+ to_i <=> version.to_i
33
+ end
34
+
35
+ # Converts this version object to a string, where each of the three
36
+ # version components are joined by the '.' character. E.g., 2.0.0.
37
+ def to_s
38
+ @to_s ||= [@major, @minor, @tiny].join(".")
39
+ end
40
+
41
+ # Converts this version to a canonical integer that may be compared
42
+ # against other version objects.
43
+ def to_i
44
+ @to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
45
+ end
46
+
47
+ # The major component of this version of the Net::SSH library
48
+ MAJOR = 2
49
+
50
+ # The minor component of this version of the Net::SSH library
51
+ MINOR = 1
52
+
53
+ # The tiny component of this version of the Net::SSH library
54
+ TINY = 0
55
+
56
+ # The current version of the Net::SSH library as a Version instance
57
+ CURRENT = new(MAJOR, MINOR, TINY)
58
+
59
+ # The current version of the Net::SSH library as a String
60
+ STRING = CURRENT.to_s
61
+ end
62
+ end; end
@@ -0,0 +1,3 @@
1
+ class Tpkg
2
+ VERSION = '2.3.4'
3
+ end
@@ -0,0 +1,82 @@
1
+ .TH cpan2tpkg 1 "January 2011"
2
+
3
+ .SH NAME
4
+
5
+ .B cpan2tpkg
6
+ \- Create tpkg packages from Perl CPAN modules
7
+
8
+ .SH SYNOPSIS
9
+
10
+ .B cpan2tpkg
11
+ .RB [ --version | \-v
12
+ .IR VERSION ]
13
+ .RB [ --package-version | --pv
14
+ .IR PKGVER ]
15
+ .RB [ --extra-deps
16
+ .IR EXTRADEPS ]
17
+ .RB [ --native-deps
18
+ .IR NATIVEDEPS ]
19
+ .RB [ --force ]
20
+ .RB [ --help | \-h ]
21
+ MODULE
22
+
23
+ .SH DESCRIPTION
24
+
25
+ cpan2tpkg is a utility for creating tpkg packages from Perl CPAN modules. If
26
+ the CPAN module being packaged requires other modules those will also be
27
+ packaged and appropriate dependencies inserted into the various tpkgs.
28
+
29
+ .SH OPTIONS
30
+ .TP
31
+ .BI --version|-v " VERSION"
32
+ Specifies the version of the module to package. By default the latest version
33
+ of the module will be packaged.
34
+ .TP
35
+ .BI --package-version|--pv " PKGVER"
36
+ The package version to set in the generated tpkg. By default
37
+ .I 1
38
+ will be used. See the tpkg documentation for more information about package
39
+ versions.
40
+ .TP
41
+ .BI --extra-deps " NATIVEDEPS"
42
+ Specify any extra dependencies that should be added to the generated tpkg.
43
+ The dependencies are specified as a comma-separated list with the syntax of
44
+ firstdepname,minver,maxver,seconddepname,minver,maxver,etc. Minimum and
45
+ maximum versions can be left blank if not required. The following are all
46
+ valid examples:
47
+ .PP
48
+ .RS
49
+ --extra-deps mysql
50
+ .RS 0
51
+ --extra-deps mysql,,
52
+ .RS 0
53
+ --extra-deps mysql,5.1.33,5.1.35
54
+ .RS 0
55
+ --extra-deps mysql,5.1.33,5.1.35,nginx,0.6,0.6.9999
56
+ .RS 0
57
+ --extra-deps mysql,,,nginx,,
58
+ .RE 1
59
+ .TP
60
+ .BI --native-deps " PACKAGES"
61
+ Specify any native dependencies that should be added to the generated tpkg.
62
+ Syntax is the same as --extra-deps.
63
+ .TP
64
+ .B --force
65
+ Force the install and packaging even if tests fail. CPAN will normally refuse
66
+ to install modules if their tests fail. This allows you to package those
67
+ modules anyway.
68
+ .TP
69
+ .BR --help | \-h
70
+ Display the
71
+ .B cpan2tpkg
72
+ usage message and exit.
73
+
74
+ .SH BUGS
75
+
76
+ --version is not implemented at this time.
77
+
78
+ .SH AUTHORS
79
+
80
+ .B cpan2tpkg
81
+ is designed and maintained by Jason Heiss.
82
+
@@ -0,0 +1,120 @@
1
+ .TH gem2tpkg 1 "January 2011"
2
+
3
+ .SH NAME
4
+
5
+ .B gem2tpkg
6
+ \- Create tpkg packages from Ruby gems
7
+
8
+ .SH SYNOPSIS
9
+
10
+ .B gem2tpkg
11
+ .RB [ --version | \-v
12
+ .IR VERSION ]
13
+ .RB [ --package-version | --pv
14
+ .IR PKGVER ]
15
+ .RB [ --extra-deps
16
+ .IR EXTRADEPS ]
17
+ .RB [ --native-deps
18
+ .IR NATIVEDEPS ]
19
+ .RB [ --install-options
20
+ .IR INSTALLOPTS ]
21
+ .RB [ --build-options
22
+ .IR BUILDOPTS ]
23
+ .RB [ --gem-cmd
24
+ .IR GEMCMD ]
25
+ .RB [ --rubygems-path
26
+ .IR PATH ]
27
+ .RB [ --extra-name
28
+ .IR EXTRANAME ]
29
+ .RB [ --help | \-h ]
30
+ GEMNAME1 GEMNAME2 ...
31
+
32
+ .SH DESCRIPTION
33
+
34
+ gem2tpkg is a utility for creating tpkg packages from Ruby gems. If the gem
35
+ being packaged requires other gems those will also be packaged and appropriate
36
+ dependencies inserted into the various tpkgs.
37
+
38
+ .SH OPTIONS
39
+ .TP
40
+ .BI --version|-v " VERSION"
41
+ Specifies the version of the gem to package. By default the latest version of
42
+ the gem will be packaged.
43
+ .TP
44
+ .BI --package-version|--pv " PKGVER"
45
+ The package version to set in the generated tpkg. By default
46
+ .I 1
47
+ will be used. See the tpkg documentation for more information about package
48
+ versions.
49
+ .TP
50
+ .BI --extra-deps " NATIVEDEPS"
51
+ Specify any extra dependencies that should be added to the generated tpkg.
52
+ The dependencies are specified as a comma-separated list with the syntax of
53
+ firstdepname,minver,maxver,seconddepname,minver,maxver,etc. Minimum and
54
+ maximum versions can be left blank if not required. The following are all
55
+ valid examples:
56
+ .PP
57
+ .RS
58
+ --extra-deps mysql
59
+ .RS 0
60
+ --extra-deps mysql,,
61
+ .RS 0
62
+ --extra-deps mysql,5.1.33,5.1.35
63
+ .RS 0
64
+ --extra-deps mysql,5.1.33,5.1.35,nginx,0.6,0.6.9999
65
+ .RS 0
66
+ --extra-deps mysql,,,nginx,,
67
+ .RE 1
68
+ .TP
69
+ .BI --native-deps " PACKAGES"
70
+ Specify any native dependencies that should be added to the generated tpkg.
71
+ Syntax is the same as --extra-deps.
72
+ .TP
73
+ .BI --install-options " INSTALLOPTS"
74
+ Extra options to the
75
+ .I gem install
76
+ command that gem2tpkg will run. Most commonly used to control where gem gets
77
+ the gem from, via the --source option. I.e.
78
+ .PP
79
+ .RS
80
+ --install-options "--source http://gems.example.com"
81
+ .RE
82
+ .TP
83
+ .BI --build-options " BUILDOPTS"
84
+ Extra options to the gem build process. If you were running
85
+ .I gem install
86
+ manually these would be options placed after a -- on the gem command line.
87
+ I.e. these are not options to the gem command, but rather options to the build
88
+ process of the gem being installed. Most commonly used to help the gem build
89
+ process find libraries. I.e.
90
+ .PP
91
+ .RS
92
+ --build-options "--with-sqlite3-dir=/opt/tpkg"
93
+ .RE
94
+ .TP
95
+ .BI --gem-cmd " GEMCMD"
96
+ The path to the gem command to be used. The configuration of that instance of
97
+ gem determines the paths that will be used in the generated package.
98
+ .TP
99
+ .BI --rubygems-path " PATH"
100
+ Path to the rubygems library. Useful if the copy of ruby being used to run
101
+ gem2tpkg doesn't have rubygems in its library path.
102
+ .TP
103
+ .BI --extra-name " EXTRANAME"
104
+ Extra string to add to package name. Used to distinguish packages of the same
105
+ gem built using different gem commands, and thus different directory
106
+ structures. If not specified
107
+ .B gem2tpkg
108
+ will attempt to do the right thing automatically based on whether or not it is
109
+ using the default gem command.
110
+ .TP
111
+ .BR --help | \-h
112
+ Display the
113
+ .B gem2tpkg
114
+ usage message and exit.
115
+
116
+ .SH AUTHORS
117
+
118
+ .B gem2tpkg
119
+ is designed and maintained by Jason Heiss.
120
+
@@ -0,0 +1,411 @@
1
+ .TH tpkg 1 "October 2009"
2
+
3
+ .SH NAME
4
+
5
+ .B tpkg
6
+ \- Application package management and deployment
7
+
8
+ .SH SYNOPSIS
9
+
10
+ .B tpkg
11
+ .RB [ --servers | \-s
12
+ .IR SERVERS ]
13
+ .RB [ --group | \-g
14
+ .IR GROUP ]
15
+ .RB [ --make | \-m
16
+ .IR DIRECTORY ]
17
+ .RB [ --extract | \-x
18
+ .IR DIRECTORY ]
19
+ .RB [ --download
20
+ .IR PACKAGES ]
21
+ .RB [ --install | \-i
22
+ .IR PACKAGES ]
23
+ .RB [ --upgrade | \-u
24
+ .IR PACKAGES ]
25
+ .RB [ --ua ]
26
+ .RB [ --remove | \-r
27
+ .IR PACKAGES ]
28
+ .RB [ --rd
29
+ .IR PACKAGES ]
30
+ .RB [ --rp
31
+ .IR PACKAGES ]
32
+ .RB [ --ra ]
33
+ .RB [ --verify | \-V ]
34
+ .RB [ --start
35
+ .IR NAME ]
36
+ .RB [ --stop
37
+ .IR NAME ]
38
+ .RB [ --restart
39
+ .IR NAME ]
40
+ .RB [ --reload
41
+ .IR NAME ]
42
+ .RB [ --status
43
+ .IR NAME ]
44
+ .RB [ --start-all
45
+ .IR NAME ]
46
+ .RB [ --stop-all
47
+ .IR NAME ]
48
+ .RB [ --restart-all
49
+ .IR NAME ]
50
+ .RB [ --reload-all
51
+ .IR NAME ]
52
+ .RB [ --exec-init
53
+ .IR NAME ]
54
+ .RB [ --init-script
55
+ .IR NAME ]
56
+ .RB [ --init-cmd
57
+ .IR NAME ]
58
+ .RB [ --query | \-q
59
+ .IR NAMES ]
60
+ .RB [ --qs
61
+ .IR NAME ]
62
+ .RB [ --qa ]
63
+ .RB [ --qas ]
64
+ .RB [ --qi
65
+ .IR NAME ]
66
+ .RB [ --qis
67
+ .IR NAME ]
68
+ .RB [ --ql
69
+ .IR NAME ]
70
+ .RB [ --qls
71
+ .IR NAME ]
72
+ .RB [ --qf
73
+ .IR FILE ]
74
+ .RB [ --qr
75
+ .IR NAME ]
76
+ .RB [ --qd
77
+ .IR NAME ]
78
+ .RB [ --qds
79
+ .IR NAME ]
80
+ .RB [ --dw
81
+ .IR INTEGER ]
82
+ .RB [ --qX
83
+ .IR NAME ]
84
+ .RB [ --qXs
85
+ .IR NAME ]
86
+ .RB [ --history ]
87
+ .RB [ --qenv ]
88
+ .RB [ --qconf ]
89
+ .RB [ --base
90
+ .IR BASE ]
91
+ .RB [ --source
92
+ .IR SOURCE ]
93
+ .RB [ --no-prompt | \-n ]
94
+ .RB [ --quiet ]
95
+ .RB [ --no-sudo ]
96
+ .RB [ --lock-force ]
97
+ .RB [ --force-replace ]
98
+ .RB [ --force ]
99
+ .RB [ --out | \-o
100
+ .IR DIR ]
101
+ .RB [ --skip-remove-stop ]
102
+ .RB [ --use-ssh-key ]
103
+ .RB [ --deploy-as
104
+ .IR USERNAME ]
105
+ .RB [ --debug ]
106
+ .RB [ --version ]
107
+ .RB [ --help | \-h ]
108
+
109
+ .SH DESCRIPTION
110
+
111
+ Tpkg is a tool for packaging and deploying applications. It is designed
112
+ to work alongside your operating system's packaging tool. The deployment
113
+ features in tpkg are designed to scale to deployments across hundreds or
114
+ thousands of systems.
115
+
116
+ .SH OPTIONS
117
+ .TP
118
+ .BI --servers|-s " SERVERS"
119
+ Switches
120
+ .B tpkg
121
+ to deployment mode rather than local mode. Specifies the server(s) to
122
+ operate against in deployment mode. Servers are specified as a
123
+ comma-separated list. Alternatively, this option takes in a file name
124
+ that contains the list of servers (newline as the delimiter)
125
+ .B Tpkg
126
+ will connect to each server via ssh and perform the requested operation.
127
+ SSH and sudo password prompts will be handled.
128
+ .TP
129
+ .BI --group|-g " GROUP"
130
+ Specifies a group of servers to operate against in deployment mode. Server
131
+ names are obtained by running the host_group_script from tpkg.conf with the
132
+ group names as arguments.
133
+ .TP
134
+ .BI --make|\-m " DIRECTORY"
135
+ Make a package from the specified directory. The directory must contain
136
+ at a minimum a tpkg.xml file.
137
+ .TP
138
+ .BI --extract|\-x " DIRECTORY"
139
+ Extract the metadata from a directory of packages to metadata.xml. The
140
+ client expects source directories to have this operation performed on
141
+ them so that it can resolve dependencies without having to download all
142
+ packages.
143
+ .TP
144
+ .BI --download " PACKAGES"
145
+ Download the specified package(s). Packages may be specified as name,
146
+ name=version, name=version=packageversion, or as a filename or URL.
147
+ .TP
148
+ .BI --install|\-i " PACKAGES"
149
+ Install the specified package(s). Packages may be specified as name,
150
+ name=version, name=version=packageversion, or as a filename or URL. The
151
+ equals signs may also be inequalities, for example ruby>=1.9
152
+ .TP
153
+ .BI --upgrade|\-u " PACKAGES"
154
+ Upgrade the specified package(s). Packages specified as with --install.
155
+ If a specific version is not specified then the packages are upgraded to
156
+ the latest available.
157
+ .TP
158
+ .B --ua
159
+ Upgrade all packages to the latest available version.
160
+ .TP
161
+ .BI --remove|\-r " PACKAGES"
162
+ Remove the specified packages. Packages specified as with --install.
163
+ .TP
164
+ .BI --rd " PACKAGES"
165
+ Similar to --remove|\-r but also remove all depending packages.
166
+ .TP
167
+ .BI --rp " PACKAGES"
168
+ Similar to --remove|\-r but also remove all prerequisite packages.
169
+ .TP
170
+ .B --ra
171
+ Remove all installed packages.
172
+ .TP
173
+ .BI --verify|\-V " NAME"
174
+ Verify that the permissions, ownership and file contents of the files
175
+ from the specified package have not been modified.
176
+ .TP
177
+ .BI --start " NAME"
178
+ Run any init scripts associated with the specified package with a
179
+ "start" argument.
180
+ .TP
181
+ .BI --stop " NAME"
182
+ Run any init scripts associated with the specified package with a
183
+ "stop" argument.
184
+ .TP
185
+ .BI --restart " NAME"
186
+ Run any init scripts associated with the specified package with a
187
+ "restart" argument.
188
+ .TP
189
+ .BI --reload " NAME"
190
+ Run any init scripts associated with the specified package with a
191
+ "reload" argument.
192
+ .TP
193
+ .BI --status " NAME"
194
+ Run any init scripts associated with the specified package with a
195
+ "status" argument.
196
+ .TP
197
+ .BI --start-all
198
+ Run the init scripts of all installed packages with a "start" argument.
199
+ .TP
200
+ .BI --stop-all
201
+ Run the init scripts of all installed packages with a "stop" argument.
202
+ .TP
203
+ .BI --restart-all
204
+ Run the init scripts of all installed packages with a "restart" argument.
205
+ .TP
206
+ .BI --reload-all
207
+ Run the init scripts of all installed packages with a "reload" argument.
208
+ .TP
209
+ .BI --exec-init
210
+ Run the init scripts associated with the specified packages. Requires
211
+ --init-cmd option to be specified.
212
+ .TP
213
+ .BI --init-script
214
+ Use with the --exec-init option to specify what packages to run the init
215
+ scripts.
216
+ .TP
217
+ .BI --init-cmd
218
+ Use with the --exec-init option to specify what init action to run.
219
+ .TP
220
+ .BI --query|\-q " NAMES"
221
+ Check if the specified packages are installed.
222
+ .B Tpkg
223
+ exit value will also indicate whether the package was found, so in
224
+ combination with --quiet this can be useful in scripts.
225
+ .TP
226
+ .BI --qs " NAME"
227
+ List packages on the server that match the specified name and are installable
228
+ on the current machine.
229
+ .TP
230
+ .B --qa
231
+ List all installed packages.
232
+ .TP
233
+ .B --qas
234
+ List all packages on the server.
235
+ .TP
236
+ .BI --qi " NAME"
237
+ Display info for the specified package. Accepts the name of an installed
238
+ package or the filename of an uninstalled package.
239
+ .TP
240
+ .BI --qis " NAME"
241
+ Display info for the specified package on the server.
242
+ .TP
243
+ .BI --ql " NAME"
244
+ List the files in the specified package. Accepts the name of an installed
245
+ package or the filename of an uninstalled package.
246
+ .TP
247
+ .BI --qls " NAME"
248
+ List the files in the specified package on the server.
249
+ .TP
250
+ .BI --qf " FILE"
251
+ List the package that owns the specified file.
252
+ .TP
253
+ .BI --qr " NAME"
254
+ List installed packages that depend on the specified package.
255
+ .TP
256
+ .BI --qd " NAME"
257
+ List the packages that the specified package depends on. Accepts the name of
258
+ an installed package or the filename of an uninstalled package.
259
+ .TP
260
+ .BI --qd " NAME"
261
+ List the packages that the specified package on the server depends on.
262
+ .TP
263
+ .BI --dw " INTEGER"
264
+ The number of workers to use when deploying. Defaults to 10. Only meaningful
265
+ when used with the servers option.
266
+ .TP
267
+ .BI --qX " NAME"
268
+ Display the tpkg.xml for the specified package. Accepts the name of an
269
+ installed package or the filename of an uninstalled package.
270
+ .TP
271
+ .BI --qXs " NAME"
272
+ Display the tpkg.xml for the specified package on the server.
273
+ .TP
274
+ .BI --history
275
+ Display package installation history
276
+ .TP
277
+ .BI --qenv
278
+ Display machine's information such as OS and architecture.
279
+ .TP
280
+ .BI --qconf
281
+ Display tpkg's configuration settings.
282
+ .TP
283
+ .BI --base " BASE"
284
+ Base directory for tpkg operations. Command line option overrides the
285
+ TPKG_HOME environment variable and config files. The base directory must be a
286
+ fully qualified path.
287
+ .TP
288
+ .BI --source " SOURCE"
289
+ Specify additional sources where packages are located.
290
+ .TP
291
+ .BR --no-prompt | \-n
292
+ Turn off confirmation prompts.
293
+ .TP
294
+ .B --quiet
295
+ Reduce or eliminate informative but non-essential output.
296
+ .TP
297
+ .B --no-sudo
298
+ Normally
299
+ .B tpkg
300
+ will re-execute itself with sudo for operations that might need root
301
+ privileges. This option disables that behavior.
302
+ .TP
303
+ .B --lock-force
304
+ .B Tpkg
305
+ locks the package database when performing install/upgrade/removal operations.
306
+ If tpkg is interrupted for some reason it might leave the lock file behind.
307
+ It will automatically remove lock files that are more than two hours old, this
308
+ option can be used to force immediate removal.
309
+ .TP
310
+ .B --force-replace
311
+ Replace the conflicting package(s) with the new one(s).
312
+ .TP
313
+ .B --force
314
+ Force the execution of a given task.
315
+ .TP
316
+ .BR --out | \-o
317
+ Output directory for the -m and --download option.
318
+ .TP
319
+ .B --skip-remove-stop
320
+ tpkg normally runs any init scripts in the target packages with a "stop"
321
+ argument on package removal. This option prevents that behavior. The init
322
+ script might be known to be broken, etc.
323
+ .TP
324
+ .BI --use-ssh-key " [KEY]"
325
+ Eliminate the prompt for an SSH password when deploying. Specifying a
326
+ specific key file is optional.
327
+ .TP
328
+ .BI --deploy-as " USERNAME"
329
+ The user to use with SSH when deploying. Defaults to the current user.
330
+ .TP
331
+ .BI --compress " [TYPE]"
332
+ What compression to use when making packages. Defaults to gzip. bz2 is the
333
+ other supported compression. Setting the type to no will disable compression.
334
+ .TP
335
+ .B --debug
336
+ Print lots of messages about what
337
+ .B tpkg
338
+ is doing.
339
+ .TP
340
+ .B --version
341
+ Show the
342
+ .B tpkg
343
+ client version and exit.
344
+ .TP
345
+ .BR --help | \-h
346
+ Display the
347
+ .B tpkg
348
+ usage message and exit.
349
+
350
+ .SH FILES
351
+
352
+ .TP
353
+ .B /opt/tpkg
354
+ The default
355
+ .B tpkg
356
+ base. Relocatable packages are installed relative to the base directory.
357
+ .B Tpkg
358
+ stores its package database, cache, etc. in BASE/var/tpkg.
359
+ .TP
360
+ .B /etc/tpkg.conf, $HOME/.tpkg.conf
361
+ Configuration file for
362
+ .B tpkg.
363
+ The home directory file overrides settings in the system-wide file.
364
+ .RS 8
365
+ .TP
366
+ .BI "base = " BASE
367
+ Set a different base other than /opt/tpkg. The base directory must be a fully
368
+ qualified path.
369
+ .TP
370
+ .BI "source = " SOURCE
371
+ A URL or directory to use as a source of packages. May be specified more than
372
+ once if more than one source of packages is available. The directory must
373
+ have been prepared with the --extract option to create metadata.xml.
374
+ .TP
375
+ .BI "report_server = " URL
376
+ The URL for a
377
+ .B tpkg
378
+ reporting server. If this is defined then all package install/upgrade/removal
379
+ operations will be reported to the server.
380
+ .TP
381
+ .BI "host_group_script = " FILENAME
382
+ The filename for a script which takes one or more host group names as
383
+ arguments and outputs the names of the hosts in those groups one per line on
384
+ stdout. Used with the --group option.
385
+ .TP
386
+ .BI "sudo = " true/false
387
+ Should
388
+ .B tpkg
389
+ use sudo when performing package management operations?
390
+ .RE
391
+ .TP
392
+ .B /etc/tpkg/ca.pem
393
+ SSL certificate(s) needed to verify the
394
+ .B tpkg
395
+ server's identity. If
396
+ .B tpkg
397
+ is using a server with an https:// URL and if this file exists then
398
+ .B tpkg
399
+ will not proceed if the server's SSL certificate can't be verified against the
400
+ certs in this file.
401
+
402
+ .SH DIAGNOSTICS
403
+
404
+ See the
405
+ .B --debug
406
+ option.
407
+
408
+ .SH AUTHORS
409
+
410
+ .B Tpkg
411
+ is designed and maintained by Jason Heiss and Darren Dao.