<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/make, branch compr</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>otel: add build tooling to include otel code</title>
<updated>2024-11-12T17:50:02+00:00</updated>
<author>
<name>Ava Hahn</name>
<email>a.hahn@f5.com</email>
</author>
<published>2024-11-07T22:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9d3dcb800aba0c036b032ccd00197712c3f5d0d9'/>
<id>9d3dcb800aba0c036b032ccd00197712c3f5d0d9</id>
<content type='text'>
Adds the --otel flag to the configure command and the various build time
variables and checks that are needed in this flow.

It also includes the nxt_otel.c and nxt_otel.h files that are needed for
the rest of Unit to talk to the compiled static library that's generated
from the rust crate.

Signed-off-by: Ava Hahn &lt;a.hahn@f5.com&gt;
Co-authored-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
Signed-off-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the --otel flag to the configure command and the various build time
variables and checks that are needed in this flow.

It also includes the nxt_otel.c and nxt_otel.h files that are needed for
the rest of Unit to talk to the compiled static library that's generated
from the rust crate.

Signed-off-by: Ava Hahn &lt;a.hahn@f5.com&gt;
Co-authored-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
Signed-off-by: Gabor Javorszky &lt;g.javorszky@f5.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto: Don't install $runstatedir</title>
<updated>2024-06-18T20:59:45+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@kernel.org</email>
</author>
<published>2024-04-22T18:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2e2e5d1e8e862c5d55cda0035eef90c5b6596112'/>
<id>2e2e5d1e8e862c5d55cda0035eef90c5b6596112</id>
<content type='text'>
This directory should exist already in the system, and if not, it should
(and will) be created at run time, not at install time.

It triggered a warning in Alpine Linux's packaging system:

    ERROR: unit*: Packages must not put anything under /var/run

Fixes: 5a37171f733f ("Added default values for pathnames.")
Fixes: 57fc9201cb91 ("Socket: Created control socket &amp; pid file directories.")
Closes: &lt;https://github.com/nginx/unit/issues/742&gt;
Reported-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This directory should exist already in the system, and if not, it should
(and will) be created at run time, not at install time.

It triggered a warning in Alpine Linux's packaging system:

    ERROR: unit*: Packages must not put anything under /var/run

Fixes: 5a37171f733f ("Added default values for pathnames.")
Fixes: 57fc9201cb91 ("Socket: Created control socket &amp; pid file directories.")
Closes: &lt;https://github.com/nginx/unit/issues/742&gt;
Reported-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andy Postnikov &lt;apostnikov@gmail.com&gt;
Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Cc: Liam Crilly &lt;liam@nginx.com&gt;
Cc: Konstantin Pavlov &lt;thresh@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuzzing: add fuzzing infrastructure in build system</title>
<updated>2024-06-14T14:11:38+00:00</updated>
<author>
<name>Arjun</name>
<email>pkillarjun@protonmail.com</email>
</author>
<published>2024-05-25T12:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=965fc94e4910da14d13a2f10d997cc720b3f6127'/>
<id>965fc94e4910da14d13a2f10d997cc720b3f6127</id>
<content type='text'>
Signed-off-by: Arjun &lt;pkillarjun@protonmail.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Arjun &lt;pkillarjun@protonmail.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an EXTRA_CFLAGS make variable</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-08T15:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a171b399220b69d4b526769481a089a117265902'/>
<id>a171b399220b69d4b526769481a089a117265902</id>
<content type='text'>
This variable is _appended_ to the main CFLAGS variable and allows
setting extra compiler options at make time. E.g

  $ make EXTRA_CFLAGS="..." ...

Useful for quickly testing various extra warning flags.

Suggested-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This variable is _appended_ to the main CFLAGS variable and allows
setting extra compiler options at make time. E.g

  $ make EXTRA_CFLAGS="..." ...

Useful for quickly testing various extra warning flags.

Suggested-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a help target to the root Makefile</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-05T15:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f55fa70c6935f0fa0ab5964830de83ae44006edb'/>
<id>f55fa70c6935f0fa0ab5964830de83ae44006edb</id>
<content type='text'>
This adds a help target to the Makefile in the repository root that
shows what variables are available to control the make/build behaviour.
It currently looks like

  $ make help
  Variables to control make/build behaviour:

    make V=1 ...           - Enables verbose output
    make D=1 ...           - Enables debug builds (-O0)
    make E=0 ...           - Disables -Werror

    Variables can be combined.

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a help target to the Makefile in the repository root that
shows what variables are available to control the make/build behaviour.
It currently looks like

  $ make help
  Variables to control make/build behaviour:

    make V=1 ...           - Enables verbose output
    make D=1 ...           - Enables debug builds (-O0)
    make E=0 ...           - Disables -Werror

    Variables can be combined.

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow to disable -Werror at 'make' time</title>
<updated>2024-03-09T01:40:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-02T04:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d23812b8f4376ab05af701e07ad16ff7b1d3bbea'/>
<id>d23812b8f4376ab05af701e07ad16ff7b1d3bbea</id>
<content type='text'>
Having -Werror enabled all the time when developing can be a nuisance,
allow to disable it by passing E=0 to make, e.g

  $ make E=0 ...

This will set -Wno-error overriding the previously set -Werror.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having -Werror enabled all the time when developing can be a nuisance,
allow to disable it by passing E=0 to make, e.g

  $ make E=0 ...

This will set -Wno-error overriding the previously set -Werror.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable optional 'debuggable' builds</title>
<updated>2024-03-09T01:40:18+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-02T03:45:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=15072fbde9b7d451aa4fde815d59a7454604036c'/>
<id>15072fbde9b7d451aa4fde815d59a7454604036c</id>
<content type='text'>
One issue you have when trying to debug Unit under say GDB is that at
the default optimisation level we use of -O (-O1) the compiler will
often optimise things out which means they are not available for
inspection in the debugger.

This patch allows you to pass 'D=1' to make, e.g

  $ make D=1 ...

Which will set -O0 overriding the previously set -O, basically disabling
optimisations, we could use -Og, but the clang(1) man page says this is
best and it seems to not cause any issues when debugging GCC generated
code.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One issue you have when trying to debug Unit under say GDB is that at
the default optimisation level we use of -O (-O1) the compiler will
often optimise things out which means they are not available for
inspection in the debugger.

This patch allows you to pass 'D=1' to make, e.g

  $ make D=1 ...

Which will set -O0 overriding the previously set -O, basically disabling
optimisations, we could use -Og, but the clang(1) man page says this is
best and it seems to not cause any issues when debugging GCC generated
code.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Hook up make pretty printing to the Unit core and tests</title>
<updated>2024-03-09T01:36:23+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-01T02:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5d831af0b0c33582b598bd41b73c85ba7af2089b'/>
<id>5d831af0b0c33582b598bd41b73c85ba7af2089b</id>
<content type='text'>
This makes use of the infrastructure introduced in the previous commit
to pretty print the make output when building the Unit core and the C
test programs.

When building Unit the output now looks like

  VER    build/include/nxt_version.h (NXT_VERSION)
  VER    build/include/nxt_version.h (NXT_VERNUM)
  CC     build/src/nxt_lib.o
  CC     build/src/nxt_gmtime.o
  ...
  CC     build/src/nxt_cgroup.o
  AR     build/lib/libnxt.a
  CC     build/src/nxt_main.o
  LD     build/sbin/unitd
  SED    build/share/man/man8/unitd.8

I'm sure you'll agree that looks much nicer!

You can still get the old verbose output with

  $ make V=1 ...

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes use of the infrastructure introduced in the previous commit
to pretty print the make output when building the Unit core and the C
test programs.

When building Unit the output now looks like

  VER    build/include/nxt_version.h (NXT_VERSION)
  VER    build/include/nxt_version.h (NXT_VERNUM)
  CC     build/src/nxt_lib.o
  CC     build/src/nxt_gmtime.o
  ...
  CC     build/src/nxt_cgroup.o
  AR     build/lib/libnxt.a
  CC     build/src/nxt_main.o
  LD     build/sbin/unitd
  SED    build/share/man/man8/unitd.8

I'm sure you'll agree that looks much nicer!

You can still get the old verbose output with

  $ make V=1 ...

Reviewed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add initial infrastructure for pretty printing make output</title>
<updated>2024-03-09T01:36:23+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-01T02:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=280a978d9a82a654f5f5029e47b91a243a087f45'/>
<id>280a978d9a82a654f5f5029e47b91a243a087f45</id>
<content type='text'>
The idea is rather than printing out the full compiler/linker etc
command for each recipe e.g

  cc -c -pipe -fPIC -fvisibility=hidden -O0 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-strict-aliasing -Wmissing-prototypes  -g   -I src -I build/include   \
                        \
                       \
  -o build/src/nxt_cgroup.o \
  -MMD -MF build/src/nxt_cgroup.dep -MT build/src/nxt_cgroup.o \
  src/nxt_cgroup.c

Print a clearer abbreviated message e.g the above becomes

  CC     build/src/nxt_cgroup.o

This vastly reduces the noise when compiling and most of the time you
don't need to see the full command being executed.

This also means that warnings etc show up much more clearly.

You can still get the old verbose output by passing V=1 to make e.g

  $ make V=1 ...

NOTE: With recent versions of make(1) you can get this same, verbose,
behaviour by using the --debug=print option.

This introduces the following message types

  CC	  Compiling a source file to an object file.
  AR	  Producing a static library, .a archive file.
  LD	  Producing a dynamic library, .so DSO, or executable.
  VER	  Writing version information.
  SED	  Running sed(1).

All in all this improves the developer experience.

Subsequent commits will make use of this in the core and modules.

NOTE: This requires GNU make for which we check. On OpenIndiana/illumos
we have to use gmake(1) (GNU make) anyway as the illumos make doesn't
work with our Makefile as it is. Also macOS seems to generally install
GNU make.

We could make it work (probably) on other variants of make, but the
complexity starts increasing exponentially.

In fact we still print the abbreviated messages in the verbose output so
you can still do

  $ make | grep ^"  [A-Z]"

on other makes to effectively get the same output.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The idea is rather than printing out the full compiler/linker etc
command for each recipe e.g

  cc -c -pipe -fPIC -fvisibility=hidden -O0 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-strict-aliasing -Wmissing-prototypes  -g   -I src -I build/include   \
                        \
                       \
  -o build/src/nxt_cgroup.o \
  -MMD -MF build/src/nxt_cgroup.dep -MT build/src/nxt_cgroup.o \
  src/nxt_cgroup.c

Print a clearer abbreviated message e.g the above becomes

  CC     build/src/nxt_cgroup.o

This vastly reduces the noise when compiling and most of the time you
don't need to see the full command being executed.

This also means that warnings etc show up much more clearly.

You can still get the old verbose output by passing V=1 to make e.g

  $ make V=1 ...

NOTE: With recent versions of make(1) you can get this same, verbose,
behaviour by using the --debug=print option.

This introduces the following message types

  CC	  Compiling a source file to an object file.
  AR	  Producing a static library, .a archive file.
  LD	  Producing a dynamic library, .so DSO, or executable.
  VER	  Writing version information.
  SED	  Running sed(1).

All in all this improves the developer experience.

Subsequent commits will make use of this in the core and modules.

NOTE: This requires GNU make for which we check. On OpenIndiana/illumos
we have to use gmake(1) (GNU make) anyway as the illumos make doesn't
work with our Makefile as it is. Also macOS seems to generally install
GNU make.

We could make it work (probably) on other variants of make, but the
complexity starts increasing exponentially.

In fact we still print the abbreviated messages in the verbose output so
you can still do

  $ make | grep ^"  [A-Z]"

on other makes to effectively get the same output.

Co-developed-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Added unit pkg-config file.</title>
<updated>2023-08-01T17:16:17+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2023-08-01T17:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768'/>
<id>ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
