Commit graph

309 commits

Author SHA1 Message Date
Andrei Zeliankou
d62a5e2c37 contrib: updated njs to 0.8.5
njs changed strings API so now instead of njs_vm_value_string_set() used
njs_vm_value_string_create() as a drop-in replacement.

Link: <5730d5ffe2>
2024-07-02 17:48:00 +01:00
Konstantin Pavlov
c88265a800 Docker: updated Rust and rustup versions 2024-06-21 11:26:07 -07:00
Konstantin Pavlov
1a6d0bf5a3 Docker: bump node and perl versions 2024-06-21 11:26:07 -07:00
Konstantin Pavlov
7a3b3fcf20 Packages: moved systemd service to forking on rpm-based distros
Closes: https://github.com/nginx/unit/issues/915
Closes: https://github.com/nginx/unit/issues/1178
2024-06-21 11:22:19 -07:00
Konstantin Pavlov
4f776da929 contrib: updated njs to 0.8.4
While at it, follow the njs move to github to fetch sources.
2024-06-18 12:52:17 -07:00
Costas Drongos
693cd8404c Docker: Bump containers to bookworm 2024-06-18 11:32:23 -07:00
Remi Collet
4a37c56569 pkg/rpm: Remove deprecated rpm spec file items
The 'Group' and 'BuildRoot' tags have been declared as deprecated by the
Fedora project.

Also, to quote the Fedora Packaging Guidelines

  The contents of the buildroot SHOULD NOT be removed in the first line
  of %install.

  The %defattr directive in the %files list SHOULD ONLY be used when
  setting a non-default value, or to reset to the default value after
  having set a non-default value.

Link: <https://fedoraproject.org/wiki/RPMGroups>
Link: <https://fedoraproject.org/wiki/Phase_out_buildroot_tag_(draft)>
Link: <https://fedoraproject.org/wiki/Archive:PackagingDrafts/BuildRoot>
Link: <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections>
[ Tweaked subject & added commit message - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-06-18 16:19:18 +01:00
Konstantin Pavlov
c38bcee103 contrib: be quiet on unpack
The lists of files being unpacked are mostly useless but take a
significant amount of lines and bytes in e.g. CI jobs.  E.g. in rhel9
packaging job, it's 39680 lines just for the unpacking of
wasmtime-v11.0.1-src, as compared to total 48945 lines of output.
2024-05-20 12:11:45 -07:00
Konstantin Pavlov
f281207f9e Packaging: fix build-depends detection on debian-based systems
dpkg-query -W will show information about the package if any other
package references it, even when the queried package is not installed.
The fix is to query for an actual status of a needed build dependency.
2024-05-20 12:11:37 -07:00
Konstantin Pavlov
8fc16a77d5 Packaging: added missing build dependencies to Makefiles
Forgotten in bf3d5759e and 260494626.
2024-05-20 12:10:30 -07:00
Andrei Zeliankou
9993814d14 NJS: loader should be registered using njs_vm_set_module_loader()
This change makes NJS module incompatible with NJS older than 0.8.3.
Therefore, the configuration version check has been adjusted accordingly.

This change was introduced in NJS 0.8.3 here:
<https://hg.nginx.com/njs/rev/ad1a7ad3c715>
2024-03-12 16:56:11 +00:00
Andrei Zeliankou
ace553dca4 Generated Dockerfiles for Unit 1.32.0 2024-02-27 12:24:44 +00:00
Konstantin Pavlov
faa7e79242 Packages: Pass CFLAGS to compile wasm modules on all packaging targets
This extends the approach used for debian-based packages in 3f805bc64e
to rpm as well.  Notable change for both deb and rpm packaging is to use
CFLAGS as defined in the build/Makefile, and not pass them from the
environment which might not be there (as is the case for rpm).

While at it, stop passing CFLAGS in the install phase, as it should no
longer invoke builds (see d54af163c4).

The rpm part was overlooked in 7a6405566c, since testing was not done
on the platforms where problem manifested itself, notably Amazon Linux
2023 and Fedora 38+.
2024-02-22 18:46:15 -08:00
Konstantin Pavlov
7a6405566c Packages: added wasm-wasi-component module packaging for rpm-based distros 2024-02-21 17:45:54 -08:00
Konstantin Pavlov
3f805bc64e Packages: added wasm-wasi-component module packaging for deb-based distros
We need to redefine CFLAGS to drop missing-prototypes as warning since
third-party code such as wasmtime fails to build from source when
building a debian package.  This happens only for packages because we
use DPKG_EXPORT_BUILDFLAGS=1 propagating build flags to the environment,
so cargo build picks it up as well.  Since we have no control over
third-party code, the easiest solution is to disable this warning.
2024-02-21 17:45:54 -08:00
Andrew Clayton
4c558697bb Docker: Re-generate Dockerfile.wasm
This now includes support for the 'wasm-wasi-component' module.

This targets the upcoming 1.32.0 release which is required by
wasm-wasi-component. However of course the 1.32.0 tag doesn't exist yet,
so there will be a small window where this image won't build.

Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-21 16:20:32 +00:00
Andrew Clayton
1297f6f0f4 Docker: Add wasm-wasi-component to the wasm target
Thus

  $ make build-wasm

will build _both_ the 'wasm' & 'wasm-wasi-component' modules.

Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-21 16:20:32 +00:00
Andrew Clayton
7702293dda Docker: Bump rust version to 1.76.0
The minimum version required to build wasmtime 17 which is required by
wasm-wasi-component is 1.73.0

But no point not using the latest version.

This also now needs the libclang-dev package installed, we install this
via MODULE_PREBUILD_wasm.

Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-21 16:20:32 +00:00
Andrei Zeliankou
f71ead5fa5 Updated copyright notice. 2024-02-20 16:08:36 +00:00
Dan Callahan
d52a9361a8 Docker: Update versions of Go, Node, PHP, Ruby
- Go: Drop 1.20, Add 1.22
- Node: Drop 18, Add 21
- PHP: Add 8.3
- Ruby: Add 3.3

Perl and Python are still up-to-date with upstream releases

Regenerating the Dockerfiles also picks up the logging change from
183a1e9d63
2024-02-20 13:43:05 +00:00
Dan Callahan
bd0abdf083 Docker: Shallow clone the Unit repo
Saves on the order of 10 MBs of transfer for each build.

We call `rm -rf /usr/src/unit` later in this step, so the full repo has
never appeared in our published images anyway.
2024-02-20 12:35:50 +00:00
Konstantin Pavlov
5570d807d9 Packages: fixed a path to python 3.12 example app 2024-02-20 12:27:52 +00:00
Konstantin Pavlov
183a1e9d63 Docker: redirect logs to stderr
This allows to use /dev/stdout as application logs if users choose to do
so.

Closes: https://github.com/nginx/unit/issues/982
2024-02-20 12:25:00 +00:00
Andrei Zeliankou
ea239635be Docker: Switch python3.12 to using github
Forgotten in
<c3af21e970>
2024-02-19 15:18:13 +00:00
Konstantin Pavlov
baff936be1 Packages: Move dist target to git archive 2024-02-16 13:14:35 -08:00
Konstantin Pavlov
c3af21e970 Docker: Switch to github 2024-02-16 13:13:42 -08:00
tclesius
2b0d93d1a7 Docker: Generated Dockerfile for Unit 1.31.1. 2024-02-13 17:53:43 -08:00
tclesius
661e918a70 Docker: added python3.12 to versions 2024-02-13 17:53:43 -08:00
Konstantin Pavlov
bad2c181e1 Packages: Added Fedora 39 support. 2024-02-09 14:31:36 -08:00
Konstantin Pavlov
ca1bc0625a contrib: updated njs to 0.8.2. 2024-02-09 14:31:36 -08:00
Konstantin Pavlov
8ebe04fd5d contrib: Bump libunit-wasm to 0.3.0. 2024-02-09 14:31:36 -08:00
Konstantin Pavlov
3a2687bb71 Packages: added Ubuntu 23.10 "mantic" support. 2024-02-09 14:31:36 -08:00
Andrei Zeliankou
a1e00b4e28 White space formatting fixes
Closes: <https://github.com/nginx/unit/pull/1062>
2024-01-16 15:37:07 +00:00
Andrei Zeliankou
09ab626b13 Generated Dockerfiles for Unit 1.31.1. 2023-10-17 14:15:38 +00:00
Konstantin Pavlov
b99e26567f contrib: updated njs to 0.8.1. 2023-10-13 12:12:23 -07:00
Liam Crilly
1617f2c045 Docker: fix HTML escaping. 2023-10-04 17:52:06 +01:00
Andrei Zeliankou
fd43b1b0ce Generated Dockerfiles for Unit 1.31.0. 2023-08-23 11:29:07 +00:00
Konstantin Pavlov
31ce5001a0 Regenerated Dockerfiles. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
45bfba04bc Docker: remove gem caches in ruby images. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
7af9f1a175 Docker: remove maven caches in jsc images. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
4caf3abbe4 Docker: remove npm caches in node images. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
9292710f2e Docker: remove build-essential package. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
c1f0aeaea4 Docker: added a container-diff helper.
It's useful to check whether resulting images have unexpected build
leftovers.

Requires https://github.com/GoogleContainerTools/container-diff in
$PATH.
2023-08-22 14:55:10 -07:00
Konstantin Pavlov
78a473743d Docker: be POSIX-compliant in the library creation script. 2023-08-22 14:55:10 -07:00
RomainMou
f311b1f3aa Docker: avoid error if /docker-entrypoint.d already exists.
Closes #865.
2023-08-22 14:55:10 -07:00
Konstantin Pavlov
c79c60be1c Docker: bumped language versions. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
3562c68ce7 Docker: added meaningful title to metadata. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
5ed7dd53c1 Docker: added wasm variant. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
7874798a3f Docker: use a specific directory to build unit. 2023-08-22 14:55:10 -07:00
Konstantin Pavlov
e516d918ed Docker: introduced a "module prebuild" step.
It's now used to install node-gyp on nodejs images.
Starting from node:20, they no longer ship node-gyp that we require to
build the modules with, so we need to install it manually.

Fixes https://github.com/nginx/unit/issues/908.
2023-08-22 14:55:10 -07:00