<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/tools, branch gzip-v37</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Tools: unitc remote mode edit fix.</title>
<updated>2023-10-18T21:26:13+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-10-18T21:26:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d51f7def1442ff7519e14263559e3483a9a28f93'/>
<id>d51f7def1442ff7519e14263559e3483a9a28f93</id>
<content type='text'>
Previously, the edit method created a temporary file that was then sent
to curl(1) as --data-binary @filename.tmp. This did not work with
remote instances because the temporary file is not on the remote host.
The edit method now passes the configuration to curl(1) using stdin, the
same way as for all other configuration changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the edit method created a temporary file that was then sent
to curl(1) as --data-binary @filename.tmp. This did not work with
remote instances because the temporary file is not on the remote host.
The edit method now passes the configuration to curl(1) using stdin, the
same way as for all other configuration changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: unitc Docker mode.</title>
<updated>2023-10-16T09:32:19+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-10-16T09:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=43f140dfd318378f330ff019bb2a37c94d8f885c'/>
<id>43f140dfd318378f330ff019bb2a37c94d8f885c</id>
<content type='text'>
Introduces a new remote host scheme docker:// that specifies a local
container ID. By default, the control socket is assumed to be in the default
location, as per the Docker Official Images for Unit. If not, the path to
the control socket can be appended to the container ID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduces a new remote host scheme docker:// that specifies a local
container ID. By default, the control socket is assumed to be in the default
location, as per the Docker Official Images for Unit. If not, the path to
the control socket can be appended to the container ID.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: unitc YAML mode.</title>
<updated>2023-10-10T14:06:36+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-10-10T14:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=599b035a544ea27e9fe76cb79f7d672ef114c2d2'/>
<id>599b035a544ea27e9fe76cb79f7d672ef114c2d2</id>
<content type='text'>
Added --format option to manage configuration in other formats.
Initially, YAML is the only supported conversion format.
JSON/YAML conversion is performed with yq(1).

Suggested by: Torstein Krause Johansen &lt;https://github.com/skybert&gt;
Closes: #958 &lt;https://github.com/nginx/unit/issues/958&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added --format option to manage configuration in other formats.
Initially, YAML is the only supported conversion format.
JSON/YAML conversion is performed with yq(1).

Suggested by: Torstein Krause Johansen &lt;https://github.com/skybert&gt;
Closes: #958 &lt;https://github.com/nginx/unit/issues/958&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: unitc quiet mode fix for macOS.</title>
<updated>2023-10-03T13:57:17+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-10-03T13:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9ad207057c620f234f01483bd3a39176945ec202'/>
<id>9ad207057c620f234f01483bd3a39176945ec202</id>
<content type='text'>
head -c 0 does not work on macOS (invalid byte count) but tail(1) is happy
to accept zero bytes, and does not have a performance penalty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
head -c 0 does not work on macOS (invalid byte count) but tail(1) is happy
to accept zero bytes, and does not have a performance penalty.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: setup-unit: ctl: added "edit" subcommand.</title>
<updated>2023-06-30T12:35:59+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@nginx.com</email>
</author>
<published>2023-06-21T11:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=543d478e12364b685aec5a903f6cd97fc75ad667'/>
<id>543d478e12364b685aec5a903f6cd97fc75ad667</id>
<content type='text'>
Almost equivalent to b42f6b1d ("Tools: unitc edit mode for interactive
configuration."), implemented by Liam in tools/unitc.

I chose to give preference to vi(1) over vim(1) because Debian has vi(1)
as part of update-alternatives(1), so that sysadmins can configure it to
be a symlink to their favourite vi(1) implementation or variant.

We're ignoring the errors of the commands due to having the SSH tunnel
open.  I should fix the script to use traps to close the tunnel on any
error, so we don't leak tunnels.  Then, we'll be able to not ignore
curl(1) or editor errors.  That will also probably allow moving the
tunneling code to the ctl command, thus deduplicating code.

Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Almost equivalent to b42f6b1d ("Tools: unitc edit mode for interactive
configuration."), implemented by Liam in tools/unitc.

I chose to give preference to vi(1) over vim(1) because Debian has vi(1)
as part of update-alternatives(1), so that sysadmins can configure it to
be a symlink to their favourite vi(1) implementation or variant.

We're ignoring the errors of the commands due to having the SSH tunnel
open.  I should fix the script to use traps to close the tunnel on any
error, so we don't leak tunnels.  Then, we'll be able to not ignore
curl(1) or editor errors.  That will also probably allow moving the
tunneling code to the ctl command, thus deduplicating code.

Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: setup-unit: restart: added -l and -s flags.</title>
<updated>2023-06-27T15:45:49+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@nginx.com</email>
</author>
<published>2023-06-06T14:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d73526d27ca296400fa8f08aa0a23b8ea3ab7a15'/>
<id>d73526d27ca296400fa8f08aa0a23b8ea3ab7a15</id>
<content type='text'>
Add flags for cleaning the log file and state dir.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add flags for cleaning the log file and state dir.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: setup-unit: added restart command.</title>
<updated>2023-06-27T15:45:49+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@nginx.com</email>
</author>
<published>2023-06-06T12:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2f46870a3f799ebb3a23e23b02a9dbee3a33ff46'/>
<id>2f46870a3f799ebb3a23e23b02a9dbee3a33ff46</id>
<content type='text'>
It restarts all running unitd instances.  This is useful when
recompiling unitd often, so that the latest build is running, without
having to manually kill unitd instances and re-run with the same exact
command line every time.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It restarts all running unitd instances.  This is useful when
recompiling unitd often, so that the latest build is running, without
having to manually kill unitd instances and re-run with the same exact
command line every time.

Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: setup-unit: ps: forcing full lines from ps(1).</title>
<updated>2023-06-27T15:45:43+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@nginx.com</email>
</author>
<published>2023-06-06T11:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=e165801732defc5726a3c727b83e31bc3369026f'/>
<id>e165801732defc5726a3c727b83e31bc3369026f</id>
<content type='text'>
Some ps(1) implementations trim lines to 80 columns, even if the output
is being piped.  Let's force ps(1) to output full lines with `ww`, which
is not in POSIX, but seems to be portable enough.

On 2023-06-08 13:19, Andrew Clayton wrote:
&gt; Just for posterity...
&gt;
&gt; BusyBox ps(1) knows about a grand total of 2 options!
&gt;
&gt; BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.
&gt;
&gt; Usage: ps [-o COL1,COL2=HEADER] [-T]
&gt;
&gt; Show list of processes
&gt;
&gt;         -o COL1,COL2=HEADER     Select columns for display
&gt;         -T                      Show threads
&gt;
&gt; But at least it doesn't make it worse.  In fact all of these three do
&gt; exactly the same thing
&gt;
&gt; ps
&gt; ps ax
&gt; ps axww
&gt;
&gt; I.e it ignores any non option argument...
&gt;
&gt; It does however help on OpenIndiana...

Link: &lt;https://github.com/nginx/unit/issues/875&gt;
Link: &lt;https://github.com/nginx/unit/issues/886&gt;
Link: &lt;https://github.com/nginx/unit/pull/885&gt;
Cc: &lt;https://github.com/mattxtaz&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some ps(1) implementations trim lines to 80 columns, even if the output
is being piped.  Let's force ps(1) to output full lines with `ww`, which
is not in POSIX, but seems to be portable enough.

On 2023-06-08 13:19, Andrew Clayton wrote:
&gt; Just for posterity...
&gt;
&gt; BusyBox ps(1) knows about a grand total of 2 options!
&gt;
&gt; BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.
&gt;
&gt; Usage: ps [-o COL1,COL2=HEADER] [-T]
&gt;
&gt; Show list of processes
&gt;
&gt;         -o COL1,COL2=HEADER     Select columns for display
&gt;         -T                      Show threads
&gt;
&gt; But at least it doesn't make it worse.  In fact all of these three do
&gt; exactly the same thing
&gt;
&gt; ps
&gt; ps ax
&gt; ps axww
&gt;
&gt; I.e it ignores any non option argument...
&gt;
&gt; It does however help on OpenIndiana...

Link: &lt;https://github.com/nginx/unit/issues/875&gt;
Link: &lt;https://github.com/nginx/unit/issues/886&gt;
Link: &lt;https://github.com/nginx/unit/pull/885&gt;
Cc: &lt;https://github.com/mattxtaz&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: setup-unit: using $0 is simpler.</title>
<updated>2023-06-27T15:42:32+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@nginx.com</email>
</author>
<published>2023-05-17T17:24:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=7d6851055b1f0c31a28a74a10f2c74380145fa4c'/>
<id>7d6851055b1f0c31a28a74a10f2c74380145fa4c</id>
<content type='text'>
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: unitc edit mode for interactive configuration.</title>
<updated>2023-06-07T13:45:35+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-06-07T13:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=b42f6b1dc8186effaeac566518700e80b2415a41'/>
<id>b42f6b1dc8186effaeac566518700e80b2415a41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
