From 0900edb10d6def65dd6482d9ed3c596eb5305b3f Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 21 Oct 2021 13:23:25 +0300 Subject: Packages: added Ubuntu 21.10 "impish" support. --- pkg/deb/Makefile | 16 +++++ pkg/deb/Makefile.jsc-common | 6 +- pkg/deb/Makefile.jsc18 | 71 ++++++++++++++++++++++ pkg/deb/Makefile.python310 | 46 ++++++++++++++ pkg/deb/debian.module/unit.example-jsc18-config | 15 +++++ .../debian.module/unit.example-python3.10-config | 16 +++++ 6 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 pkg/deb/Makefile.jsc18 create mode 100644 pkg/deb/Makefile.python310 create mode 100644 pkg/deb/debian.module/unit.example-jsc18-config create mode 100644 pkg/deb/debian.module/unit.example-python3.10-config (limited to 'pkg/deb') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 85d5545e..d762e790 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -19,6 +19,22 @@ BUILD_DEPENDS = $(BUILD_DEPENDS_unit) MODULES= +# Ubuntu 21.10 +ifeq ($(CODENAME),impish) +include Makefile.php +include Makefile.python27 +include Makefile.python39 +include Makefile.python310 +include Makefile.go +include Makefile.perl +include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc11 +include Makefile.jsc16 +include Makefile.jsc17 +include Makefile.jsc18 +endif + # Ubuntu 21.04 ifeq ($(CODENAME),hirsute) include Makefile.php diff --git a/pkg/deb/Makefile.jsc-common b/pkg/deb/Makefile.jsc-common index 5f727124..42b452b2 100644 --- a/pkg/deb/Makefile.jsc-common +++ b/pkg/deb/Makefile.jsc-common @@ -6,10 +6,10 @@ MODULE_SUMMARY_jsc_common= Java shared packages for NGINX Unit MODULE_VERSION_jsc_common= $(VERSION) MODULE_RELEASE_jsc_common= 1 -ifneq (,$(findstring $(CODENAME),hirsute groovy focal eoan disco buster bullseye)) -JAVA_MINVERSION= 11 -else +ifneq (,$(findstring $(CODENAME),stretch xenial bionic)) JAVA_MINVERSION= 8 +else +JAVA_MINVERSION= 11 endif MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-$(JAVA_MINVERSION)-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ diff --git a/pkg/deb/Makefile.jsc18 b/pkg/deb/Makefile.jsc18 new file mode 100644 index 00000000..806aa320 --- /dev/null +++ b/pkg/deb/Makefile.jsc18 @@ -0,0 +1,71 @@ +MODULES+= jsc18 +MODULE_SUFFIX_jsc18= jsc18 + +MODULE_SUMMARY_jsc18= Java 18 module for NGINX Unit + +MODULE_VERSION_jsc18= $(VERSION) +MODULE_RELEASE_jsc18= 1 + +MODULE_CONFARGS_jsc18= java --module=java18 --home=/usr/lib/jvm/java-18-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ +MODULE_MAKEARGS_jsc18= java18 +MODULE_INSTARGS_jsc18= java18-install + +MODULE_SOURCES_jsc18= unit.example-jsc-app \ + unit.example-jsc18-config + +BUILD_DEPENDS_jsc18= openjdk-18-jdk-headless openjdk-18-jre-headless +BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc18) + +MODULE_BUILD_DEPENDS_jsc18=,openjdk-18-jdk-headless +MODULE_DEPENDS_jsc18=,openjdk-18-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) + +define MODULE_PREINSTALL_jsc18 + mkdir -p debian/unit-jsc18/usr/share/doc/unit-jsc18/examples/jsc-app + install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc18/usr/share/doc/unit-jsc18/examples/jsc-app/index.jsp + install -m 644 -p debian/unit.example-jsc18-config debian/unit-jsc18/usr/share/doc/unit-jsc18/examples/unit.config + install -m 644 -p src/java/README.JSR-340 debian/unit-jsc18/usr/share/doc/unit-jsc18/ +endef +export MODULE_PREINSTALL_jsc18 + +define MODULE_POSTINSTALL_jsc18 + cd $$\(BUILDDIR_unit\) \&\& \ + DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall +endef +export MODULE_POSTINSTALL_jsc18 + +define MODULE_POST_jsc18 +cat < Date: Thu, 21 Oct 2021 15:28:58 +0300 Subject: Packages: removed support for EOL'ed Debian/Ubuntu distros. While here, default debhelper compat level bumped to 11 (this is the version installed out of the box on Ubuntu 18.04 "bionic" which is the oldest one from supported distros). --- pkg/deb/Makefile | 99 +-------------------------------------------- pkg/deb/Makefile.jsc-common | 2 +- pkg/deb/debian/rules.in | 4 -- 3 files changed, 3 insertions(+), 102 deletions(-) (limited to 'pkg/deb') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index d762e790..01ed13e7 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -50,21 +50,6 @@ include Makefile.jsc16 include Makefile.jsc17 endif -# Ubuntu 20.10 -ifeq ($(CODENAME),groovy) -include Makefile.php -include Makefile.python27 -include Makefile.python38 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -include Makefile.jsc13 -include Makefile.jsc14 -include Makefile.jsc15 -endif - # Ubuntu 20.04 ifeq ($(CODENAME),focal) include Makefile.php @@ -77,46 +62,6 @@ include Makefile.jsc-common include Makefile.jsc11 endif -# Ubuntu 19.10 -ifeq ($(CODENAME),eoan) -include Makefile.php -include Makefile.python27 -include Makefile.python37 -include Makefile.python38 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -endif - -# Ubuntu 19.04 -ifeq ($(CODENAME),disco) -include Makefile.php -include Makefile.python27 -include Makefile.python37 -include Makefile.python38 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -endif - -# Ubuntu 18.10 -ifeq ($(CODENAME),cosmic) -include Makefile.php -include Makefile.python27 -include Makefile.python36 -include Makefile.python37 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -include Makefile.jsc11 -endif - # Ubuntu 18.04 ifeq ($(CODENAME),bionic) include Makefile.php @@ -132,25 +77,6 @@ include Makefile.jsc8 include Makefile.jsc11 endif -# Ubuntu 16.04 -ifeq ($(CODENAME),xenial) -include Makefile.php -include Makefile.python27 -include Makefile.python35 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -endif - -# Ubuntu 14.04 -ifeq ($(CODENAME),trusty) -include Makefile.php -include Makefile.python -include Makefile.perl -endif - # Debian 11 ifeq ($(CODENAME),bullseye) include Makefile.php @@ -175,27 +101,6 @@ include Makefile.jsc-common include Makefile.jsc11 endif -# Debian 9 -ifeq ($(CODENAME),stretch) -include Makefile.php -include Makefile.python27 -include Makefile.python35 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -endif - -# Debian 8 -ifeq ($(CODENAME),jessie) -include Makefile.php -include Makefile.python27 -include Makefile.python34 -include Makefile.perl -include Makefile.ruby -endif - CONFIGURE_ARGS=\ --prefix=/usr \ --state=/var/lib/unit \ @@ -247,7 +152,7 @@ debuild/$(SRCDIR)/debian: set -e ; \ mkdir -p debuild/$(SRCDIR) ; \ cp -pr debian debuild/$(SRCDIR) ; \ - echo '9' > debuild/$(SRCDIR)/debian/compat ; \ + echo '11' > debuild/$(SRCDIR)/debian/compat ; \ mkdir -p debuild/$(SRCDIR)/debian/source ; \ echo '3.0 (quilt)' > debuild/$(SRCDIR)/debian/source/format ; \ cat debian/control.in | sed \ @@ -291,7 +196,7 @@ debuild-%: debuild/unit_$(VERSION).orig.tar.gz ../../docs/changes.xml cp debuild/unit_$(VERSION).orig.tar.gz debuild-$*/unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz cd $@ && tar zxf unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz mkdir $@/$(SRCDIR)/debian - echo '9' > $@/$(SRCDIR)/debian/compat + echo '11' > $@/$(SRCDIR)/debian/compat mkdir $@/$(SRCDIR)/debian/source echo '3.0 (quilt)' > $@/$(SRCDIR)/debian/source/format cd ../../docs && make ../build/unit-$(MODULE_SUFFIX_$*).deb-changelog diff --git a/pkg/deb/Makefile.jsc-common b/pkg/deb/Makefile.jsc-common index 42b452b2..2b098025 100644 --- a/pkg/deb/Makefile.jsc-common +++ b/pkg/deb/Makefile.jsc-common @@ -6,7 +6,7 @@ MODULE_SUMMARY_jsc_common= Java shared packages for NGINX Unit MODULE_VERSION_jsc_common= $(VERSION) MODULE_RELEASE_jsc_common= 1 -ifneq (,$(findstring $(CODENAME),stretch xenial bionic)) +ifneq (,$(findstring $(CODENAME),bionic)) JAVA_MINVERSION= 8 else JAVA_MINVERSION= 11 diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index c7a56b6b..3f1f9db8 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -99,11 +99,7 @@ install: build do.tests dh_testroot dh_prep dh_installdirs -ifeq ($(CODENAME), xenial) - dh_installinit -else dh_installsystemd -endif dh_installlogrotate cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install -- cgit From b6b15c552df10817fb8fa52d775f877f5680a4c7 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Tue, 9 Nov 2021 12:19:54 +0300 Subject: Packages: fixed dependency checks on multi-arch Debian/Ubuntu. --- pkg/deb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/deb') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 01ed13e7..66a5f33a 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -131,7 +131,7 @@ check-build-depends-%: esac ; \ not_installed= ; \ for pkg in $${pkgs}; do \ - dpkg -s $${pkg} >/dev/null 2>&1 ; \ + dpkg-query -W $${pkg} >/dev/null 2>&1 ; \ if [ $$? -ne 0 ]; then \ not_installed="$${not_installed} $${pkg}" ; \ fi ; \ -- cgit