summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-02-01 15:51:37 +0000
committerDmitry Bogatov <KAction@debian.org>2019-02-01 15:51:37 +0000
commite1c76010bd1b99e85136a4b812ca1e8d8ad97555 (patch)
tree82b8d864956f8b8fa3d424329e790646b7f3d017
parente475c038d1b99ce01cb2cb38a63979fded2b78b9 (diff)
Copy-edit dh_runit(1) documentation. (Closes: #920963)
-rw-r--r--debian/changelog7
-rwxr-xr-xdh_runit79
2 files changed, 48 insertions, 38 deletions
diff --git a/debian/changelog b/debian/changelog
index 5facc36..2d4d990 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1dh-runit (2.8.4) UNRELEASED; urgency=medium
2
3 * Copy-edit dh_runit(1) documentation. (Closes: #920963)
4 + Thanks: Jonathan Nieder <jrnieder@gmail.com>
5
6 -- Dmitry Bogatov <KAction@debian.org> Wed, 30 Jan 2019 15:44:58 -0800
7
1dh-runit (2.8.3) unstable; urgency=medium 8dh-runit (2.8.3) unstable; urgency=medium
2 9
3 * Document runit:Breaks substitution variable 10 * Document runit:Breaks substitution variable
diff --git a/dh_runit b/dh_runit
index 447ae70..7baad5f 100755
--- a/dh_runit
+++ b/dh_runit
@@ -122,77 +122,80 @@ B<dh_runit> [S<I<debhelper options>>] [I<path> I<options>] ...
122=head1 DESCRIPTION 122=head1 DESCRIPTION
123 123
124B<dh_runit> is a debhelper program that is responsible for 124B<dh_runit> is a debhelper program that is responsible for
125installing and enabling I<runit> runscripts. If file named 125installing and enabling I<runit> runscripts. If a file named
126F<debian/I<package>.runit> exists, then different actions 126F<debian/I<package>.runit> exists, then it ensures appropriate actions
127are performed, depending on its format. 127are performed based on its content.
128 128
129For runit, every unit of supervision, simply speaking program, is 129For runit, each unit of supervision (or, simply speaking, program) is
130represented by directory under F</etc/sv>, containing at least F<run> 130represented by a directory under F</etc/sv>, containing at least a F<run>
131executable file. Every enabled program is represented by symbolic link 131executable file. Each enabled unit of supervision is represented by a
132under F</etc/services> (which itself is symbolic link to 132symbolic link under F</etc/services> (which itself is a symbolic link to
133F</etc/runit/runsvdir/default>) pointing to some directory under 133F</etc/runit/runsvdir/default>) pointing to some directory under
134F</etc/sv>. 134F</etc/sv>.
135 135
136B<dh_runit> reads it's arguments from command line and 136B<dh_runit> reads arguments from the command line and
137F<debian/I<package>.runit> by two, with first one being an 137F<debian/I<package>.runit> in pairs, with the first item being the
138file/directory and second one is options. If first argument is file, 138path to a file or directory and the second being a set of options.
139it is considered 'run' script, and it is installed under 139If the first argument names a file, it is treated as a 'run' script
140F</etc/sv/*/run>, executable bit is added. If first argument is 140to be installed at F</etc/sv/*/run> as an executable file. If the first
141directory, it is copied as whole under F</etc/sv>. 141argument names a directory, that directory is copied as a whole to
142F</etc/sv>.
142 143
143Options are comma-separated, like to mount. Unsupported option 144Options are comma separated, like mount options. Unrecognized options
144is error, following are supported: 145are errors. The following options are recognized:
145 146
146=over 147=over
147 148
148=item I<disable> 149=item I<disable>
149 150
150 With this option, runscript is installed, but not enabled by 151Install the runscript but do not enable it by default.
151 default. It means that corresponding service will not be started. 152This means that the corresponding service will not be started.
152 System administrator can always do it manually or via 153The service can be enabled manually by the system administrator or
153 update-service(8). 154automatically using update-service(8).
154 155
155=item I<name>=preferred-name 156=item I<name>=preferred-name
156 157
157 By default, name of directory under F</etc/sv> for given runscript 158By default, the name of the directory under F</etc/sv> for a given
158 is basename of first argument of pair. This option allows you to 159runscript is the basename of the path argument naming it. This
159 be explicit about it. 160option allows overriding that default with an explicitly chosen
161directory name.
160 162
161=item I<logscript> 163=item I<logscript>
162 164
163 Install standard F<log/run> script, which invokes svlogd(8) with 165Install a standard F<log/run> script that invokes svlogd(8) with
164 rights of dedicated user. It is error, if first argument in pair 166the rights of the dedicated user. Specifying this option produces
165 is directory, which already contains F</log/run> script. 167an error if the path argument names a directory that already
168contains a F</log/run> script.
166 169
167=item I<defaults> 170=item I<defaults>
168 171
169 If you need no other options, put this one. 172If you don't need other options, specify this one.
170 173
171=back 174=back
172 175
173=head1 SUBSTITUTION VARIABLES 176=head1 SUBSTITUTION VARIABLES
174 177
175Package, created with help of B<dh_runit> does not depends on B<runit>, 178Packages using B<dh_runit> do not depend on B<runit> but should include the
176but should add I<runit:Breaks> variable into I<Breaks> field in I<debian/control> 179I<runit:Breaks> variable in their I<Breaks> field in I<debian/control>
177to ensure, that no breakages are caused by too old version of B<runit> package. 180to ensure that no breakages are caused by a too-old version of B<runit> package.
178 181
179=head1 EXAMPLES 182=head1 EXAMPLES
180 183
181This section contains several example snippets from F<I<package>.runit> 184This section contains several example F<I<package>.runit> snippets.
182 185
183 # In this case file is installed as 'run' script. Directory name under 186 # In this case, a file is installed as a 'run' script. The directory
184 # /etc/sv is derived from file basename 187 # name under /etc/sv is derived from the file's basename (/etc/sv/script).
185 path/to/file/to/be/installed/as/run/script defaults 188 path/to/file/to/be/installed/as/run/script defaults
186 189
187 # Same, but install directory as whole. It is your responsibility 190 # Similar, but installs a directory as a whole. It is the package's
188 # to ensure is contains everything required. 191 # responsibility to ensure this directory contains everything required.
189 path/to/directory defaults 192 path/to/directory defaults
190 193
191 # Same as above, but do not create symlink under /etc/service 194 # Similar, but without creating a symlink under /etc/service.
192 path/to/directory disable 195 path/to/directory disable
193 196
194 # You can explicitly specify name of directory under /etc/sv. 197 # Explicitly specifying a name to use for the directory under /etc/sv.
195 # Standard log/run script will be created. 198 # A standard log/run script will be created.
196 path/to/directory name=my-preferred-name,logscript 199 path/to/directory name=my-preferred-name,logscript
197 200
198=cut 201=cut