History log of /unit/auto/ (Results 1 – 25 of 246)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
2242:d83646816b4616-Nov-2022 Konstantin Pavlov

Propagated NXT_RUBY_CFLAGS to Ruby checks.

This fixes an issue addressed in 651f5a37f5b8 on FreeBSD 12.

The problem manifested itself as:

configuring Ruby module
checking for -fdeclspec ... found

Propagated NXT_RUBY_CFLAGS to Ruby checks.

This fixes an issue addressed in 651f5a37f5b8 on FreeBSD 12.

The problem manifested itself as:

configuring Ruby module
checking for -fdeclspec ... found
checking for Ruby library ... not found
checking for Ruby library in /usr/local/lib ... not found

./configure: error: no Ruby found.

show more ...

2228:f403dc1e3ec127-Oct-2022 Andrew Clayton

Fixed main() prototypes in auto tests.

Future releases of GCC are planning to remove[0] default support for
some old features that were removed from C99 but GCC still accepts.

We can test for these

Fixed main() prototypes in auto tests.

Future releases of GCC are planning to remove[0] default support for
some old features that were removed from C99 but GCC still accepts.

We can test for these changes by using the following -Werror=
directives

-Werror=implicit-int
-Werror=implicit-function-declaration
-Werror=int-conversion
-Werror=strict-prototypes
-Werror=old-style-definition

Doing so revealed an issue with the auto/ tests in that the test
programs always define main as

int main()

rather than

int main(void)

which results in a bunch of errors like

build/autotest.c:3:23: error: function declaration isn't a prototype [-Werror=strict-prototypes]
3 | int main() {
| ^~~~
build/autotest.c: In function 'main':
build/autotest.c:3:23: error: old-style function definition [-Werror=old-style-definition]

The fix was easy, it only required fixing the main prototype with

find -type f -exec sed -i 's/int main() {/int main(void) {/g' {} \;

Regardless of these upcoming GCC changes, this is probably a good thing
to do anyway for correctness.

[0]: https://fedoraproject.org/wiki/Changes/PortingToModernC

Link: <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/>
Link: <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6SGHPHPAXKCVJ6PUZ57WVDQ5TDBVIRMF/>
Reviewed-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>

show more ...

2222:500275bcf9c711-Oct-2022 Alex Colomar

Avoided modifying existing directories at 'make install'.

'install -d' has an issue compared to 'mkdir -p': it doesn't
respect existing directories. It will set the ownership, file
mode, and SELin

Avoided modifying existing directories at 'make install'.

'install -d' has an issue compared to 'mkdir -p': it doesn't
respect existing directories. It will set the ownership, file
mode, and SELinux contexts (and any other property that would be
set by install(1) to a newly-created directory), overwriting any
existing properties of the existing directory.

'mkdir -p' doesn't have this issue: it is a no-op if the
directory exists. However, it's not an ideal solution either,
since it can't be used to set the properties (owner, mode, ...) of
a newly-created directory.

Therefore, the best solution is to use install(1), but only after
making sure that the directory doesn't exist with test(1).

Reported-by: Andrew Clayton <a.clayton@nginx.com>
Reported-by: Alejandro Colomar <alx@nginx.com>
Closes: <https://github.com/nginx/unit/issues/769>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>

show more ...

2221:667ee7489a0019-Oct-2022 Zhidao HONG

Configuration: added the regex status in configure summary.

2218:ed81ed291d0b02-Jun-2022 Remi Collet

PHP: Fixed php_module_startup() call for PHP 8.2.

PHP 8.2 changed the prototype of the function, removing the last
parameter.

Signed-off-by: Remi Collet <remi@remirepo.net>
Cc: Timo Stark <t.stark@

PHP: Fixed php_module_startup() call for PHP 8.2.

PHP 8.2 changed the prototype of the function, removing the last
parameter.

Signed-off-by: Remi Collet <remi@remirepo.net>
Cc: Timo Stark <t.stark@nginx.com>
Cc: George Peter Banyard <girgias@php.net>
Tested-by: Andy Postnikov <apostnikov@gmail.com>
Acked-by: Andy Postnikov <apostnikov@gmail.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>

show more ...

2216:231b36f0062c06-Oct-2022 Andrew Clayton

Fixed the build on MacOS (and others).

@alejandro-colomar reported that the build was broken on MacOS

cc -o build/unitd -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -W

Fixed the build on MacOS (and others).

@alejandro-colomar reported that the build was broken on MacOS

cc -o build/unitd -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g \
build/src/nxt_main.o build/libnxt.a \
\
\
-L/usr/local/Cellar/pcre2/10.40/lib -lpcre2-8
Undefined symbols for architecture x86_64:
"_nxt_fs_mkdir_parent", referenced from:
_nxt_runtime_pid_file_create in libnxt.a(nxt_runtime.o)
_nxt_runtime_controller_socket in libnxt.a(nxt_controller.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/unitd] Error 1

This was due to commit 57fc920 ("Socket: Created control socket & pid file
directories.").

This happened because this commit introduced the usage of
nxt_fs_mkdir_parent() in core code which uses nxt_fs_mkdir(), both of
these are defined in src/nxt_fs.c. It turns out however that this file
doesn't get built on MacOS (or any system that isn't Linux or that
lacks a FreeBSD compatible nmount(2) system call) due to the following

In auto/sources we have

if [ $NXT_HAVE_ROOTFS = YES ]; then
NXT_LIB_SRCS="$NXT_LIB_SRCS src/nxt_fs.c"
fi

NXT_HAVE_ROOTFS is set in auto/isolation

If [ $NXT_HAVE_MOUNT = YES -a $NXT_HAVE_UNMOUNT = YES ]; then
NXT_HAVE_ROOTFS=YES

cat << END >> $NXT_AUTO_CONFIG_H
#ifndef NXT_HAVE_ISOLATION_ROOTFS
#define NXT_HAVE_ISOLATION_ROOTFS 1
#endif
END

fi

While we do have a check for a generic umount(2) which is found on
MacOS, for mount(2) we currently only check for the Linux mount(2) and
FreeBSD nmount(2) system calls. So NXT_HAVE_ROOTFS is set to NO on MacOS
and we don't build src/nxt_fs.c

This fixes the immediate build issue by taking the mount/umount OS
support out of nxt_fs.c into a new nxt_fs_mount.c file which is guarded
by the above while we now build nxt_fs.c unconditionally.

This should fix the build on any _supported_ system.

Reported-by: Alejandro Colomar <alx@nginx.com>
Fixes: 57fc920 ("Socket: Created control socket & pid file directories.")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>

show more ...

Revision tags: 1.28.0-1, 1.28.0
2185:2227bdbb3c8929-Aug-2022 Valentin Bartenev

Implemented basic statistics API.

2175:e83cff38d67203-Aug-2022 Alejandro Colomar

Removed dead code.

nxt_sockaddr_ntop() stopped being used in commit (git) 029942f4eb71.
It has been replaced mostly by nxt_sockaddr_text().

commit 029942f4eb7196c2cff0d0e26bc6ff274138f7d8
A

Removed dead code.

nxt_sockaddr_ntop() stopped being used in commit (git) 029942f4eb71.
It has been replaced mostly by nxt_sockaddr_text().

commit 029942f4eb7196c2cff0d0e26bc6ff274138f7d8
Author: Igor Sysoev <igor@sysoev.ru>
Date: Wed Feb 22 15:09:59 2017 +0300

I/O operations refactoring.

nxt_job_sockaddr_parse() stopped being used in commit (git) 794248090a74.

commit 794248090a74f31cbfcf24ea8c835df2d4d21073
Author: Igor Sysoev <igor@sysoev.ru>
Date: Wed Mar 4 14:04:08 2020 +0300

Legacy upstream code removed.

Also, remove functions and types used only by those two functions:

nxt_job_sockaddr_unix_parse()
nxt_job_sockaddr_inet6_parse()
nxt_job_sockaddr_inet_parse()
nxt_job_sockaddr_parse_t
nxt_job_resolve()
nxt_job_resolve_t

show more ...

2170:8eee6cdafb5802-Aug-2022 Alejandro Colomar

Rejecting non-Linux pivot_root(2).

Some non-Linux systems implement pivot_root(2), even if they
don't document that. An example is MacOS:

$ grepc pivot_root / 2>/dev/null
.../sys/sysproto.h:3012:

Rejecting non-Linux pivot_root(2).

Some non-Linux systems implement pivot_root(2), even if they
don't document that. An example is MacOS:

$ grepc pivot_root / 2>/dev/null
.../sys/sysproto.h:3012:
int pivot_root(struct proc *, struct pivot_root_args *, int *);

Since the prototype of the syscall differs from that of Linux, we
can't use that syscall. Let's make sure the test only detects
pivot_root(2) under Linux. Also, rename the feature macro to make
clear that it's only about Linux's pivot_root(2).

This closes #737 issue on GitHub.

show more ...

2169:b8afbff114fc18-Jun-2022 Alejandro Colomar

Including <mntent.h> iff it exists.

With NXT_HAVE_PIVOT_ROOT, we had issues in MacOS. Headers should
normally be included unconditionally, except of course if they
don't exist.

This fixes part of

Including <mntent.h> iff it exists.

With NXT_HAVE_PIVOT_ROOT, we had issues in MacOS. Headers should
normally be included unconditionally, except of course if they
don't exist.

This fixes part of the #737 issue on GitHub.

show more ...

2165:556348458f3414-Jul-2022 Zhidao HONG

Log: split access log from nxt_router.c.

No functional changes.

2153:37bccff06c9f18-Jun-2022 Alejandro Colomar

Replaced Linux syscall macros by libc macros.

User-space programs should use the SYS_*form, as documented in
syscall(2). That also adds compatibility to non-Linux systems.

2152:7f6d1cd4bb8e19-Jun-2022 Alejandro Colomar

Removed unnecessary include.

Some OSes, as Linux, provide FIONBIO in <sys/ioctl.h>. Others,
such as the BSDs and Illumos, provide it in <sys/filio.h>, but
they all include that header from <sys/ioc

Removed unnecessary include.

Some OSes, as Linux, provide FIONBIO in <sys/ioctl.h>. Others,
such as the BSDs and Illumos, provide it in <sys/filio.h>, but
they all include that header from <sys/ioctl.h>, so for this test,
we can simplify and just include <sys/ioctl.h>.

show more ...

2151:fab207c6836c19-Jun-2022 Alejandro Colomar

Removed code used when NXT_HAVE_POSIX_SPAWN is false.

posix_spawn(3POSIX) was introduced by POSIX.1d
(IEEE Std 1003.1d-1999), and was later consolidated in
POSIX.1-2001, requiring it in all POSIX-co

Removed code used when NXT_HAVE_POSIX_SPAWN is false.

posix_spawn(3POSIX) was introduced by POSIX.1d
(IEEE Std 1003.1d-1999), and was later consolidated in
POSIX.1-2001, requiring it in all POSIX-compliant systems.
It's safe to assume it's always available, more than 20 years
after its standardization.

Link: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html>

show more ...

Revision tags: 1.27.0-1, 1.27.0
2080:651f5a37f5b810-Mar-2022 Alejandro Colomar

Workarounded Clang bug triggered by Ruby.

Add -fdeclspec to NXT_RUBY_CFLAGS for Clang, if it's available.

Clang incorrectly reports 1 for __has_declspec_attribute(x) in
some cases, such as MacOS or

Workarounded Clang bug triggered by Ruby.

Add -fdeclspec to NXT_RUBY_CFLAGS for Clang, if it's available.

Clang incorrectly reports 1 for __has_declspec_attribute(x) in
some cases, such as MacOS or Cygwin. That causes ruby code to
break. ruby added -fdeclspec to their CFLAGS in 2019 to
workaround this bug, since it enables __declspec() and therefore,
the compiler behavior matches what it reports.

Since we don't know what are all the architectures that trigger
the clang bug, let's add the flag for all of them (especially
since it should be harmless).

Add this workaround only at the time of configuring the ruby
module. This way we don't clutter the global NXT_CFLAGS with an
unnecessary flag.

Link: unit bug <https://github.com/nginx/unit/issues/653>
Link: ruby bug <https://bugs.ruby-lang.org/issues/18616>
Link: LLVM bug <https://github.com/llvm/llvm-project/issues/49958>
Commit: LLVM: Add -fdeclspec <d170c4b57a91adc74ca89c6d4af616a00323b12c>
Commit: ruby: Use -fdeclspec <0958e19ffb047781fe1506760c7cbd8d7fe74e57>

show more ...

2079:0dcffa83cac211-Mar-2022 Alejandro Colomar

Added NXT_MAYBE_UNUSED for __attribute__((__unused__)).

When testing some configurations of compilers and OSes, I noticed
that clang(1) 13 on Debian caused a function to be compiled but
unused, and

Added NXT_MAYBE_UNUSED for __attribute__((__unused__)).

When testing some configurations of compilers and OSes, I noticed
that clang(1) 13 on Debian caused a function to be compiled but
unused, and the compiler triggered a compile error.

To avoid that error, use __attribute__((__unused__)). Let's call
our wrapper NXT_MAYBE_UNUSED, since it describes itself more
precisely than the GCC attribute name. It's also the name that
C2x (likely C23) has given to the standard attribute, which is
[[maybe_unused]], so it's also likely to be more readable because
of that name being in ISO C.

show more ...

2062:ede07f84045b10-Jan-2022 Max Romanov

Tests: using modules in Go.

2051:a61d948c802703-Dec-2021 Valentin Bartenev

Printing version in "./configure" output.

Revision tags: 1.26.1-1, 1.26.1
2041:3ecccccc5d1901-Dec-2021 Max Romanov

Disabling SCM_CREDS usage on DragonFly BSD.

DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control
message is passed correctly while the second one isn't processed by the kernel

Disabling SCM_CREDS usage on DragonFly BSD.

DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control
message is passed correctly while the second one isn't processed by the kernel.

This closes #599 issue on GitHub.

show more ...

2026:919e283a9d3101-Dec-2021 Max Romanov

Disabling SCM_CREDS usage on DragonFly BSD.

DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control
message is passed correctly while the second one isn't processed by the kernel

Disabling SCM_CREDS usage on DragonFly BSD.

DragonFly BSD supports SCM_CREDS and SCM_RIGHTS, but only the first control
message is passed correctly while the second one isn't processed by the kernel.

This closes #599 issue on GitHub.

show more ...

Revision tags: 1.26.0-1, 1.26.0
1996:35873fa78fed09-Nov-2021 Tiago Natel de Moura

Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs.

1975:6a47cab8f27126-Oct-2021 Valentin Bartenev

Custom implementation of Base64 decoding function.

Compared to the previous implementation based on OpenSSL, the new implementation
has these advantages:

1. Strict and reliable detection of invali

Custom implementation of Base64 decoding function.

Compared to the previous implementation based on OpenSSL, the new implementation
has these advantages:

1. Strict and reliable detection of invalid strings, including strings with
less than 4 bytes of garbage at the end;

2. Allows to use Base64 strings without '=' padding.

show more ...

Revision tags: 1.25.0-1, 1.25.0
1942:296628096d6c17-Aug-2021 Andrey Suvorov

Added TLS session tickets support.

1938:418e225f58e412-Aug-2021 Max Romanov

Java: upgrading third-party components.

1931:747666e4bec309-Aug-2021 Max Romanov

Java: upgrading third-party components.

12345678910