-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfaq.html
252 lines (231 loc) · 8.21 KB
/
faq.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="/stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/stylesheets/print.css" media="print" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>tpkg: Application packaging and deployment</title>
</head>
<body>
<div id="container">
<div class="sidebar">
<strong>Documents:</strong>
<ul>
<li><a href="get_started.html">Get started</a></li>
<li><a href="configure.html">Configure</a></li>
<li><a href="package.html">Package</a></li>
<li><a href="third_party.html">Package 3rd party apps</a></li>
<li><a href="deploy.html">Deploy</a></li>
<li><a href="package_server.html">Package server</a></li>
<li><a href="reporting_server.html">Reporting server</a></li>
<li><a href="production.html">Production</a></li>
<li><a href="externals.html">Externals</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="develop/">Develop</a></li>
</ul>
</div>
<div class="center">
<div class="inner">
<header>
<h1>tpkg</h1>
<h2>Application packaging and deployment</h2>
</header>
<hr>
<section id="main_content">
<dl>
<dt>
Where should I ask questions or make suggestions?
</dt>
<dd>
<p>
The <a href="https://lists.sourceforge.net/lists/listinfo/tpkg-users">tpkg-users</a> mailing list
</p>
</dd>
<dt>
Surely this already exists?
</dt>
<dd>
<p>
Despite extensive searching we couldn't find an existing project that was
close enough to what we had in mind. We know of a few large companies that
have similar tools internally, but they have not released the tools as open
source.
</p>
<p>
We considered using an existing, widely used packaging and deployment system
like dpkg/apt or rpm/yum, but decided that was not ideal for a couple of
reasons. One of our requirements is a packaging environment that is separate
from the operating system packaging environment for the reasons giving in the
<a href="/">introduction</a>. While it is possible to run multiple instances
of, for example, rpm on the same box that is generally a recipe for confusion
and errors: "Oh, I see the problem, you used /usr/bin/rpm instead of /opt/local/bin/rpm."
</p>
<p>
We also considered <a href="http://www.gnu.org/software/swbis/">swbis</a>,
a GNU project which implements a POSIX packaging standard. That project has
the advantage (for our purposes) of not being a widely used OS packaging tool,
but on the flip side is much less widely used and less well developed.
</p>
</dd>
<dt>
What platforms does it work on?
</dt>
<dd>
<p>
Most common forms on Unix should work. You need Ruby, the
<a href="http://reductivelabs.com/products/facter/">facter</a> library
(available via rubygems), and GNU or BSD tar. It is known to work on Red Hat
Enterprise Linux, CentOS, Debian, Ubuntu, FreeBSD and Solaris. It has also
been lightly tested on Windows under cygwin.
</p>
</dd>
<dt>
What is the package format?
</dt>
<dd>
<p>
A tarball with a particular directory structure and a YAML metadata file. At
runtime tpkg will search your path for a modern version of tar (bsdtar or GNU
tar for example) so that long filenames are supported. See the
<a href="/develop/internals.html">tpkg internals documentation</a> for more
information.
</p>
</dd>
<dt>
Why tar?
</dt>
<dd>
<p>
The two widely available and commonly used file archiving formats are tar and
zip. There are other formats like cpio that are commonly available on Unix
but less so on Windows. Tar and zip both have advantages and disadvantages.
Tar has native support for Unix permissions and is more likely to be installed
on even a minimal Unix install than the zip utilities. On the negative side
for tar are the lack of support for random access within the archive and a
handful of different standards for modern archive formats that support longer
filenames, etc. In the end the more "unixy" tar was selected.
</p>
</dd>
<dt>
Why use tpkg instead of Capistrano or Vlad the Deployer?
</dt>
<dd>
<p>
Tpkg provides many features not available in cap or vlad. File encryption is
essential for deploying the database.yml file in Rails apps, along with any
SSL keys needed. Rails, via bundler, provides support for installing gem
dependencies, but tpkg can handle any kind of dependency, so you can pull in
nginx or Apache, MySQL, or other non-gem dependencies. Tpkg's
<a href="externals.html">externals support</a> can tie into an OS config
management system to configure accounts or other OS settings required by your
application. Init script support in tpkg means you can easily have your
application start at system boot time. A logrotate package is available for
easy log rotation. All of these features could be implemented in your cap or
vlad configuration, but standard implementations are not readily available and
your implementation has to be cut-n-pasted or otherwise separately maintained
if you have multiple projects.
</p>
</dd>
<dt>
How do I specify a version number during install/remove/upgrade?
</dt>
<dd>
<p>
Use the following syntax:
</p>
<pre>pkgname=versionnumber[=packageversionnumber]</pre>
<p>
For example:
</p>
<pre>tpkg -i testpkg=2.4=4</pre>
<p>
The package version is optional, so if any package version of testpkg 2.4 is
acceptable, or testpkg doesn't have package versions, then this syntax will work:
</p>
<pre>tpkg -i testpkg=2.4</pre>
<p>
Inequalities (<=, >=) are also supported. This syntax was partially
borrowed from apt-get.
</p>
</dd>
<dt>
How do I downgrade a package to an older version?
</dt>
<p>
You can use the --downgrade option of tpkg. For example, if you want to
downgrade your pkg fubar to version 1.1, package version 2, run one of the
following commands.
</p>
<p>
If the package is in the repository:
</p>
<pre>tpkg --downgrade=fubar=1.1=2</pre>
<p>
If you have the package file locally:
</p>
<pre>tpkg --downgrade=/mydir/mypath/fubar-1.1-2.tpkg</pre>
<dt>
Are there pre-built packages for common applications like Ruby, Perl or Apache?
</dt>
<dd>
<p>
Not yet. We have a primitive set of build scripts for building packages of
common applications like these. See
<a href="https://github.com/tpkg/pkgs">pkgs</a>. See our
<a href="/develop/help_needed.html">help needed</a> page for some notes on how
we'd like to improve on this.
</p>
</dd>
<dt>
Does tpkg ignore .svn/.git/etc. when making a package?
</dt>
<dd>
<p>
No. The primary reason (in the case of svn users at least) is to encourage
users to build packages from an svn export rather than a working copy. This
helps ensure that packages are not accidentally built with uncommitted
changes. By using an export from svn you know your package only includes
files under revision control.
</p>
</dd>
<dt>
Does tpkg work on Windows?
</dt>
<dd>
<p>
It has been tested under cygwin. Support under native Windows, i.e. using
<a href="http://rubyinstaller.org/">RubyInstaller</a> and
<a href="http://gnuwin32.sourceforge.net/packages/libarchive.htm">bsdtar</a>,
is a work in progress.
</p>
</dd>
<dt>
Why is it called tpkg?
</dt>
<dd>
<p>
We wanted a meaningful name so that folks who don't work with tpkg on a
regular basis, like project managers, have an easier time remembering the
name. For tpkg that meant variants of pack, package, inst, install, etc. We
settled on pkg as short, easily typed, etc. Most of the <one letter>pkg
names were already taken by other projects, mostly package managers for little
specialized Linux distros. tpkg and a few others were available, and tpkg
seemed the easiest of those to say and remember.
</p>
</dd>
</dl>
</section>
</div>
</div>
<section id="downloads" class="clearfix">
<a href="https://github.com/tpkg" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>
</div>
</body>
</html>