From f4e478bae32083a5dc2ad0acaec766c6ae80c6c8 Mon Sep 17 00:00:00 2001 From: Welby McRoberts Date: Thu, 6 Jun 2024 14:41:13 -0400 Subject: [PATCH 1/2] Bump version to 26.1.3.Final and adjust java dependency to java-runtime >=8 rather than java8-runtime --- Makefile | 4 ++-- debian/control | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a117e67..effcb61 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,13 @@ ## debhelper and devscripts packages ## -WF_CURRENT_VERSION = 18.0.1.Final +WF_CURRENT_VERSION = 26.1.3.Final WF_VERSION := $(or $(version),$(WF_VERSION),$(WF_CURRENT_VERSION)) WF_TARBALL = wildfly-$(WF_VERSION).tar.gz WF_TARBALL_ORIG = $(subst -,_,$(subst tar.gz,orig.tar.gz,$(WF_TARBALL))) WF_DIRECTORY = wildfly-$(WF_VERSION) -WF_DOWNLOAD_URL = http://download.jboss.org/wildfly/$(WF_VERSION)/$(WF_TARBALL) +WF_DOWNLOAD_URL = https://github.com/wildfly/wildfly/releases/download/$(WF_VERSION)/$(WF_TARBALL) WF_DISTRIBUTION := $(or $(distribution),$(WF_DISTRIBUTION),$(shell lsb_release -sc)) GPG_KEY := $(or $(gpg),$(GPG_KEY)) PPA_VERSION := $(or $(ppa_version),$(PPA_VERSION),$(shell cat PPA_VERSION)) diff --git a/debian/control b/debian/control index be4b2ea..cff4a48 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Section: java Priority: optional Architecture: all Homepage: https://github.com/ilanddev/wildfly-debian -Depends: openjdk-8-jre-headless | java8-runtime, adduser, ${misc:Depends} +Depends: java-runtime-headless (>=8) | java-runtime (>=8), adduser, ${misc:Depends} Description: Wildfly Application Server WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications. From 35ff5e3e7043ad02fed0b97a567b29f5af30e394 Mon Sep 17 00:00:00 2001 From: Welby McRoberts Date: Mon, 24 Jun 2024 10:15:30 -0400 Subject: [PATCH 2/2] Move from init to systemd for startup script --- Makefile | 5 +---- debian/wildfly.service | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 debian/wildfly.service diff --git a/Makefile b/Makefile index effcb61..6c1eaab 100644 --- a/Makefile +++ b/Makefile @@ -51,14 +51,11 @@ unpack: $(WF_TARBALL) clean copy: unpack cp -R debian $(WF_DIRECTORY)/ -$(WF_DIRECTORY)/debian/wildfly.init: copy - find $(WF_DIRECTORY) -name wildfly-init-debian.sh -exec cp {} $(WF_DIRECTORY)/debian/wildfly.init \; - conffiles: copy cd $(WF_DIRECTORY) && find domain/ standalone/ -type f -exec echo "/opt/wildfly/{}" \; > debian/wildfly.conffiles cd $(WF_DIRECTORY) && find bin/ \( -name '*.conf' -o -name '*.properties' \) -exec echo "/opt/wildfly/{}" \; >> debian/wildfly.conffiles -prepare: $(WF_DIRECTORY)/debian/wildfly.init conffiles PPA_VERSION +prepare: $(WF_DIRECTORY)/debian/wildfly.service conffiles PPA_VERSION cd $(WF_DIRECTORY) && \ dch --create --distribution=$(WF_DISTRIBUTION) --package=wildfly \ --newversion=$(WF_VERSION)-1~$(WF_DISTRIBUTION)ppa$(PPA_VERSION) \ diff --git a/debian/wildfly.service b/debian/wildfly.service new file mode 100644 index 0000000..4c1b61f --- /dev/null +++ b/debian/wildfly.service @@ -0,0 +1,39 @@ +[Unit] +Description=The WildFly Application Server +After=syslog.target network.target +Before=httpd.service + +[Service] +# Assume standalone for default +Environment=WILDFLY_MODE=standalone + +# Assume no config or bind config +Environment=WILDFLY_CONFIG= +Environment=WILDFLY_BIND= + +# Load in defaults file if exists +EnvironmentFile=-/etc/default/wildfly + +# Load in /etc/wildfly/ config file if exists +EnvironmentFile=-/etc/wildfly/wildfly.conf + +# Start wildfly in the background +Environment=LAUNCH_JBOSS_IN_BACKGROUND=1 + +# Drop privileges to +User=wildfly +Group=wildfly + +LimitNOFILE=102642 +PIDFile=/var/run/wildfly/wildfly.pid + +ExecStart=/usr/bin/bash /opt/wildfly/bin/${WILDFLY_MODE}.sh $WILDFLY_CONFIG $WILDFLY_BIND +ExecStop=/usr/bin/bash /opt/wildfly/bin/jboss-cli.sh --connect command=:shutdown + +StandardOutput=journal + +# Timeouts +TimeoutStopSec=300 + +[Install] +WantedBy=multi-user.target