<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto, branch 1.33.0</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>java: Update third-party components</title>
<updated>2024-09-07T17:21:35+00:00</updated>
<author>
<name>Sergey A. Osokin</name>
<email>osa@FreeBSD.org.ru</email>
</author>
<published>2024-09-07T15:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=27d3a5c7c0d9b9fc03b69871aea6b3c9ab16aaa0'/>
<id>27d3a5c7c0d9b9fc03b69871aea6b3c9ab16aaa0</id>
<content type='text'>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto: Add a check for Linux's sched_getaffinity(2)</title>
<updated>2024-08-19T22:29:40+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-08-11T15:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f38201c2a144fb28978eabb32a3a080874f92775'/>
<id>f38201c2a144fb28978eabb32a3a080874f92775</id>
<content type='text'>
This will help to better determine the number of router threads to
create in certain situations.

Unlike sysconf(_SC_NPROCESSORS_ONLN) this takes into account per-process
cpu allowed masks as set by sched_setaffinity(2)/cpusets etc.

So while a system may have 64 on-line cpu's, Unit itself may be limited
to using just four of them in which case we should create four extra
router threads, not sixty-four!

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 will help to better determine the number of router threads to
create in certain situations.

Unlike sysconf(_SC_NPROCESSORS_ONLN) this takes into account per-process
cpu allowed masks as set by sched_setaffinity(2)/cpusets etc.

So while a system may have 64 on-line cpu's, Unit itself may be limited
to using just four of them in which case we should create four extra
router threads, not sixty-four!

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto, wasm-wc: Copy the .so into build/lib/unit/modules/</title>
<updated>2024-07-08T14:43:17+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-07-02T16:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=b5fe3eaf1a0bcbc98d274902f5e38f2c2ad71dbc'/>
<id>b5fe3eaf1a0bcbc98d274902f5e38f2c2ad71dbc</id>
<content type='text'>
Normally when the language modules are built, they are built directly
into the build/lib/unit/modules/ directory.

This then allows Unit to find them without being installed. This is
useful for things like the pytests.

This wasn't happening for the wasm-wasi-component language module. So we
now copy it over and give it the right name as part of the make/build
process.

Reported-by: Andrei Zeliankou &lt;zelenkov@nginx.com&gt;
Fixes: 4e6d7e876 ("Wasm-wc: Wire it up to the build system")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Normally when the language modules are built, they are built directly
into the build/lib/unit/modules/ directory.

This then allows Unit to find them without being installed. This is
useful for things like the pytests.

This wasn't happening for the wasm-wasi-component language module. So we
now copy it over and give it the right name as part of the make/build
process.

Reported-by: Andrei Zeliankou &lt;zelenkov@nginx.com&gt;
Fixes: 4e6d7e876 ("Wasm-wc: Wire it up to the build system")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto: Fix some indentation in auto/modules/wasm-wasi-component</title>
<updated>2024-07-08T14:43:17+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-07-02T16:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0e6cc6dcfbd0c019bcd1b264252aeb88303b7362'/>
<id>0e6cc6dcfbd0c019bcd1b264252aeb88303b7362</id>
<content type='text'>
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: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use octal instead of mode macros</title>
<updated>2024-06-18T20:59:45+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx@kernel.org</email>
</author>
<published>2024-04-24T21:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d96d583328f614c658d42f5bb0d2a0f81621327e'/>
<id>d96d583328f614c658d42f5bb0d2a0f81621327e</id>
<content type='text'>
They are more readable.

And we had a mix of both styles; there wasn't really a consistent style.

Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@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>
They are more readable.

And we had a mix of both styles; there wasn't really a consistent style.

Tested-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Reviewed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@kernel.org&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>java: Update third-party components</title>
<updated>2024-05-08T22:06:43+00:00</updated>
<author>
<name>Sergey A. Osokin</name>
<email>osa@FreeBSD.org.ru</email>
</author>
<published>2024-05-08T21:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=da43f4434a6ed257cf6e07ca7b4d00108ffeaf1b'/>
<id>da43f4434a6ed257cf6e07ca7b4d00108ffeaf1b</id>
<content type='text'>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto, perl: Fix building the Perl language module with clang</title>
<updated>2024-05-07T16:36:35+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-04-22T19:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5d1ce5c4475f8d126b61650f3c678e3f94549f6b'/>
<id>5d1ce5c4475f8d126b61650f3c678e3f94549f6b</id>
<content type='text'>
When we added -fno-strict-overflow to the CFLAGS back in c1e3f02f9
("Compile with -fno-strict-overflow") we inadvertently broke building
the Perl language module with clang, e.g

  $ make
    CC     build/src/perl/nxt_perl_psgi-perl.o
  clang: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument]

This is due to for example on Apline

  $ perl -MExtUtils::Embed -e ccflags
   -D_REENTRANT -D_GNU_SOURCE -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Where on clang the -fwrapv causes the -fno-strict-overflow to be
discarded resulting in the above error.

We can get around that by simply appending -Qunused-arguments to the
Perl CFLAGS.

This fixes things for _some_ systems, as there is actually another issue
with building this with clang on Fedora (and probably Red Hat) in that
there the Perl ccflags &amp; ldopts have been heavily modified and uses
flags simply not only not in clang (which we can work around as above)
but also incompatible flags, e.g

  $ make perl
    CC     build/src/perl/nxt_perl_psgi-perl.o
  clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]

There doesn't seem to be an easy workaround like -Qunused-arguments for
this.

While we could work around it in some way, I'm not sure it's worth the
effort right now. On Red Hat &amp; Fedora GCC _is_ the system compiler.

This could be revisited if we find people trying to build this on
Red Hat/Fedora with clang...

For comparison this is the Alpine Perl ccflags &amp; ldops

$ perl -MExtUtils::Embed -e ccflags
 -D_REENTRANT -D_GNU_SOURCE -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 alpine:~$
$ perl -MExtUtils::Embed -e ldopts
-rdynamic -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc

Fedora

$ perl -MExtUtils::Embed -e ccflags
 -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$ perl -MExtUtils::Embed -e ldopts
-Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1  -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc

Fixes: c1e3f02f9 ("Compile with -fno-strict-overflow")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we added -fno-strict-overflow to the CFLAGS back in c1e3f02f9
("Compile with -fno-strict-overflow") we inadvertently broke building
the Perl language module with clang, e.g

  $ make
    CC     build/src/perl/nxt_perl_psgi-perl.o
  clang: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument]

This is due to for example on Apline

  $ perl -MExtUtils::Embed -e ccflags
   -D_REENTRANT -D_GNU_SOURCE -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Where on clang the -fwrapv causes the -fno-strict-overflow to be
discarded resulting in the above error.

We can get around that by simply appending -Qunused-arguments to the
Perl CFLAGS.

This fixes things for _some_ systems, as there is actually another issue
with building this with clang on Fedora (and probably Red Hat) in that
there the Perl ccflags &amp; ldopts have been heavily modified and uses
flags simply not only not in clang (which we can work around as above)
but also incompatible flags, e.g

  $ make perl
    CC     build/src/perl/nxt_perl_psgi-perl.o
  clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]

There doesn't seem to be an easy workaround like -Qunused-arguments for
this.

While we could work around it in some way, I'm not sure it's worth the
effort right now. On Red Hat &amp; Fedora GCC _is_ the system compiler.

This could be revisited if we find people trying to build this on
Red Hat/Fedora with clang...

For comparison this is the Alpine Perl ccflags &amp; ldops

$ perl -MExtUtils::Embed -e ccflags
 -D_REENTRANT -D_GNU_SOURCE -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 alpine:~$
$ perl -MExtUtils::Embed -e ldopts
-rdynamic -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc

Fedora

$ perl -MExtUtils::Embed -e ccflags
 -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$ perl -MExtUtils::Embed -e ldopts
-Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1  -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc

Fixes: c1e3f02f9 ("Compile with -fno-strict-overflow")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto/wasm: No need to explicitly set -fno-strict-aliasing now</title>
<updated>2024-05-07T01:43:24+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-04-29T23:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5b01bd652a8ec4854535a9bc70b64fe7db625b51'/>
<id>5b01bd652a8ec4854535a9bc70b64fe7db625b51</id>
<content type='text'>
Since commit 0b5223e1c ("Disable strict-aliasing in clang by default")
we explicitly always build with -fno-strict-aliasing so there's no need
to set it independently in auto/modules/wasm

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 0b5223e1c ("Disable strict-aliasing in clang by default")
we explicitly always build with -fno-strict-aliasing so there's no need
to set it independently in auto/modules/wasm

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
