Skip to content

Commit 7a77f48

Browse files
committed
Packages: added Ubuntu 23.04 "lunar" support.
1 parent 20a5fd4 commit 7a77f48

File tree

6 files changed

+177
-1
lines changed

6 files changed

+177
-1
lines changed

docs/changes.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
unit-ruby
1515
unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11 unit-jsc13
1616
unit-jsc14 unit-jsc15 unit-jsc16 unit-jsc17 unit-jsc18
17-
unit-jsc19"
17+
unit-jsc19 unit-jsc20"
1818
ver="1.30.0" rev="1"
1919
date="" time=""
2020
packager="Nginx Packaging <[email protected]>">
@@ -28,6 +28,19 @@ NGINX Unit updated to 1.30.0.
2828
</changes>
2929

3030

31+
<changes apply="unit-jsc20" ver="1.30.0" rev="1"
32+
date="2023-05-03" time="15:00:00 -0700"
33+
packager="Nginx Packaging &lt;[email protected]&gt;">
34+
35+
<change>
36+
<para>
37+
Initial release of Java 20 module for NGINX Unit.
38+
</para>
39+
</change>
40+
41+
</changes>
42+
43+
3144
<changes apply="unit" ver="1.30.0" rev="1"
3245
date="" time=""
3346
packager="Nginx Packaging &lt;[email protected]&gt;">

pkg/deb/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
1919

2020
MODULES=
2121

22+
# Ubuntu 23.04
23+
ifeq ($(CODENAME),lunar)
24+
include Makefile.php
25+
include Makefile.python311
26+
include Makefile.go
27+
include Makefile.perl
28+
include Makefile.ruby
29+
include Makefile.jsc-common
30+
include Makefile.jsc11
31+
include Makefile.jsc17
32+
include Makefile.jsc18
33+
include Makefile.jsc19
34+
include Makefile.jsc20
35+
endif
36+
2237
# Ubuntu 22.10
2338
ifeq ($(CODENAME),kinetic)
2439
include Makefile.php

pkg/deb/Makefile.jsc20

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
MODULES+= jsc20
2+
MODULE_SUFFIX_jsc20= jsc20
3+
4+
MODULE_SUMMARY_jsc20= Java 20 module for NGINX Unit
5+
6+
MODULE_VERSION_jsc20= $(VERSION)
7+
MODULE_RELEASE_jsc20= 1
8+
9+
MODULE_CONFARGS_jsc20= java --module=java20 --home=/usr/lib/jvm/java-20-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/
10+
MODULE_MAKEARGS_jsc20= java20
11+
MODULE_INSTARGS_jsc20= java20-install
12+
13+
MODULE_SOURCES_jsc20= unit.example-jsc-app \
14+
unit.example-jsc20-config
15+
16+
BUILD_DEPENDS_jsc20= openjdk-20-jdk-headless openjdk-20-jre-headless
17+
BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc20)
18+
19+
MODULE_BUILD_DEPENDS_jsc20=,openjdk-20-jdk-headless
20+
MODULE_DEPENDS_jsc20=,openjdk-20-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME))
21+
22+
define MODULE_PREINSTALL_jsc20
23+
mkdir -p debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/jsc-app
24+
install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/jsc-app/index.jsp
25+
install -m 644 -p debian/unit.example-jsc20-config debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/unit.config
26+
install -m 644 -p src/java/README.JSR-340 debian/unit-jsc20/usr/share/doc/unit-jsc20/
27+
endef
28+
export MODULE_PREINSTALL_jsc20
29+
30+
define MODULE_POSTINSTALL_jsc20
31+
cd $$\(BUILDDIR_unit\) \&\& \
32+
DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall
33+
endef
34+
export MODULE_POSTINSTALL_jsc20
35+
36+
define MODULE_POST_jsc20
37+
cat <<BANNER
38+
----------------------------------------------------------------------
39+
40+
The $(MODULE_SUMMARY_jsc20) has been installed.
41+
42+
To check out the sample app, run these commands:
43+
44+
sudo service unit restart
45+
cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc20)/examples
46+
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
47+
curl http://localhost:8800/
48+
49+
Online documentation is available at https://unit.nginx.org
50+
51+
NOTICE:
52+
53+
This version of Unit code is made available in support of the open source
54+
development process. This is an intermediate build made available for
55+
testing purposes only. This Unit code is untested and presumed incompatible
56+
with the JSR 340 Java Servlet 3.1 specification. You should not deploy or
57+
write to this code. You should instead deploy and write production
58+
applications on pre-built binaries that have been tested and certified
59+
to meet the JSR-340 compatibility requirements such as certified binaries
60+
published for the JSR-340 reference implementation available at
61+
https://javaee.github.io/glassfish/.
62+
63+
Redistribution of any Intermediate Build must retain this notice.
64+
65+
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
66+
Other names may be trademarks of their respective owners.
67+
68+
----------------------------------------------------------------------
69+
BANNER
70+
endef
71+
export MODULE_POST_jsc20

pkg/deb/Makefile.python311

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
MODULES+= python311
2+
MODULE_SUFFIX_python311= python3.11
3+
4+
MODULE_SUMMARY_python311= Python 3.11 module for NGINX Unit
5+
6+
MODULE_VERSION_python311= $(VERSION)
7+
MODULE_RELEASE_python311= 1
8+
9+
MODULE_CONFARGS_python311= python --config=python3.11-config
10+
MODULE_MAKEARGS_python311= python3.11
11+
MODULE_INSTARGS_python311= python3.11-install
12+
13+
MODULE_SOURCES_python311= unit.example-python-app \
14+
unit.example-python3.11-config
15+
16+
BUILD_DEPENDS_python311= python3.11-dev
17+
BUILD_DEPENDS+= $(BUILD_DEPENDS_python311)
18+
19+
MODULE_BUILD_DEPENDS_python311=,python3.11-dev
20+
21+
define MODULE_PREINSTALL_python311
22+
mkdir -p debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/python-app
23+
install -m 644 -p debian/unit.example-python-app debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/python-app/wsgi.py
24+
install -m 644 -p debian/unit.example-python3.11-config debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/unit.config
25+
endef
26+
export MODULE_PREINSTALL_python311
27+
28+
define MODULE_POST_python311
29+
cat <<BANNER
30+
----------------------------------------------------------------------
31+
32+
The $(MODULE_SUMMARY_python311) has been installed.
33+
34+
To check out the sample app, run these commands:
35+
36+
sudo service unit restart
37+
cd /usr/share/doc/unit-$(MODULE_SUFFIX_python311)/examples
38+
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
39+
curl http://localhost:8400/
40+
41+
Online documentation is available at https://unit.nginx.org
42+
43+
----------------------------------------------------------------------
44+
BANNER
45+
endef
46+
export MODULE_POST_python311
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"applications": {
3+
"example_java20": {
4+
"processes": 1,
5+
"type": "java 20",
6+
"webapp": "/usr/share/doc/unit-jsc20/examples/jsc-app"
7+
}
8+
},
9+
10+
"listeners": {
11+
"*:8800": {
12+
"pass": "applications/example_java20"
13+
}
14+
}
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"applications": {
3+
"example_python": {
4+
"type": "python 3.11",
5+
"processes": 2,
6+
"path": "/usr/share/doc/unit-python3.11/examples/python-app",
7+
"module": "wsgi"
8+
}
9+
},
10+
11+
"listeners": {
12+
"*:8400": {
13+
"pass": "applications/example_python"
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)