diff --git a/apache-commons-daemon-build.xml b/apache-commons-daemon-build.xml
index 17a46e3..976bd9b 100644
--- a/apache-commons-daemon-build.xml
+++ b/apache-commons-daemon-build.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/apache-commons-daemon-gcc14-compat.patch b/apache-commons-daemon-gcc14-compat.patch
index fa43124..09a03a4 100644
--- a/apache-commons-daemon-gcc14-compat.patch
+++ b/apache-commons-daemon-gcc14-compat.patch
@@ -1,13 +1,11 @@
-Index: commons-daemon-1.3.4-src/src/native/unix/native/jsvc-unix.c
-===================================================================
---- commons-daemon-1.3.4-src.orig/src/native/unix/native/jsvc-unix.c
-+++ commons-daemon-1.3.4-src/src/native/unix/native/jsvc-unix.c
+--- a/src/native/unix/native/jsvc-unix.c
++++ b/src/native/unix/native/jsvc-unix.c
@@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args
* These will be replaced in the child process.
*/
memset(&act, '\0', sizeof(act));
-- act.sa_handler = controller;
-+ act.sa_handler = (void *) controller;
+- act.sa_sigaction = controller;
++ act.sa_sigaction = (void *) controller;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO;
diff --git a/apache-commons-daemon.changes b/apache-commons-daemon.changes
index 323de24..dc18978 100644
--- a/apache-commons-daemon.changes
+++ b/apache-commons-daemon.changes
@@ -1,3 +1,28 @@
+-------------------------------------------------------------------
+Mon Aug 12 11:42:00 UTC 2024 - Gus Kenion
+
+- Upgrade to 1.4.0
+ * Fixes:
+ + [StepSecurity] ci: Harden GitHub Actions #95.
+ + Procrun. Enable Control Flow Guard for Windows binaries.
+ Fixes DAEMON-429.
+ + Procrun. Better label for command used to start service shown
+ in Prunmgr.exe. Fixes DAEMON-461.
+ + jsvc. Fix warnings when running support/buildconf.sh
+ + jsvc. Fix compilation issue with newer compilers. Fixes
+ + Procrun. Refactor UAC support so that elevation is only
+ requested for actions that require administrator privileges.
+ * New Features:
+ + Procrun. Add support for hybrid CRT builds.
+ + jsvc. Add support for LoongArch64 support #92.
+ * Update dependencies:
+ + Bump commons-parent from 57 to 69 #155.
+ + The minimum support Java version has been upgraded from Java
+ 7 to Java 8.
+ + Bump commons-parent from 69 to 70.
+- Revise apache-commons-daemon-gcc14-compat.patch for compatibility
+ with version 1.4.0
+
-------------------------------------------------------------------
Mon May 6 11:08:35 UTC 2024 - Gus Kenion
diff --git a/apache-commons-daemon.spec b/apache-commons-daemon.spec
index f7000b7..67df415 100644
--- a/apache-commons-daemon.spec
+++ b/apache-commons-daemon.spec
@@ -20,7 +20,7 @@
%define short_name commons-daemon
%define _lto_cflags %{nil}
Name: apache-%{short_name}
-Version: 1.3.4
+Version: 1.4.0
Release: 0
Summary: Commons Daemon - Controlling of Java Daemons
License: Apache-2.0
diff --git a/commons-daemon-1.3.4-src.tar.gz b/commons-daemon-1.3.4-src.tar.gz
deleted file mode 100644
index 787e127..0000000
--- a/commons-daemon-1.3.4-src.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:df4849d05e5816610e67821883f4fc1e11724a0bb8b78b84b21edd5039ecebbe
-size 290834
diff --git a/commons-daemon-1.3.4-src.tar.gz.asc b/commons-daemon-1.3.4-src.tar.gz.asc
deleted file mode 100644
index e4a9182..0000000
--- a/commons-daemon-1.3.4-src.tar.gz.asc
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Comment: GPGTools - http://gpgtools.org
-
-iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmRU0scACgkQEMAcWi9g
-WecYxw/+IYJPDfFdlR+0QDoRsQcNQRxPSh9Zx6rlHrdV0vCPiC8J7X8XxYcBLCqc
-Jh7hCmwek/nWn7fHPP+CVJ6K8t/d7GGkHXEdmZ+eJTSoGSnEQQwYGgrJiPTQ4hLQ
-oQ2MUxHpKD0ZdHchCm8ogZ4BHuESmGghdVABxb2QhsLnSm/IYpAeSs5D/t+3+pVa
-pIrCQ3Ihnk3UZHoZlsjG8zdPxnmgA1xXp4Nqrt5+2WORxvrzyTcKA7h7s6DtgPnb
-7ddmo7NESuKHSymQPw6utQVNycmM/C8+MAVUy33AP829j4Q75tebkBsYlK38JiyQ
-SiYe0SCP35IRlAPE81moMPjpp7v5vkxU6TXzMc+27meEHn0+bJLqx3wUlCy4WOp7
-HA4/7sjszvf3+eNz0zq0txSY5AOk/ODXmTyuQiC4hgdPzzgHRft/JzcVhiey5MF8
-4mQL8DCN+Nqh1ooyTutiDF3q4m8aDJNiBEWbKJ4OMbyURLJOL43DaLvz8DLxXFOo
-cMW6BIOPWkOxdRCxqToeo+vyT+c7DGdaXsPVp49EIZJPWyk+88/xIK76dZHvlUSN
-Z+LVEDDy5kC6AIDAuA1VG5VE9pL9r9s9YUnGgAciAP3oF+QKHxeuqQl5ygQo5Igk
-iARErXrfm3qpA8CQfPiOkAbHvrJvnKTx6GY4Q5K6VcgbQLTpOgk=
-=wz0c
------END PGP SIGNATURE-----
diff --git a/commons-daemon-1.4.0-src.tar.gz b/commons-daemon-1.4.0-src.tar.gz
new file mode 100644
index 0000000..a8d3ded
--- /dev/null
+++ b/commons-daemon-1.4.0-src.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0059f1e80aa639f02c7e1ff800b57dc62036a5b3f4b17d61e5d3e3ffd2428fee
+size 291610
diff --git a/commons-daemon-1.4.0-src.tar.gz.asc b/commons-daemon-1.4.0-src.tar.gz.asc
new file mode 100644
index 0000000..bddd2f7
--- /dev/null
+++ b/commons-daemon-1.4.0-src.tar.gz.asc
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmZHd5sACgkQEMAcWi9g
+Wee7sxAAqoiqUy96Oq8KEFlyiG7sGIb+LrkcOTelbOvRNR1ZjfbMcTCNWvKrKXa+
+2K2P4yxHJIPuQY84Vo9Y38qef07BDfPmi6jrR8hpDNpmgKJqIDlr0KVr819l63gz
+Yzd8CXgkGQG6Z1LFGiRl/7LiJw2lPA0OVWVBw1B25hvFaGm069pV+S5zcWGsBUJo
+4RV/oLcYvBqU5uIT6YBLmontaKxqgGyBaBlp6Flu21jyQSaTvLPyTzrpRGZ3s+EM
+m1pAu36iXGx9/KSTFEsTOBsW/vCL+ABONJWIbskrYeMJ0ukB8uP1OX7h/o7TUsLU
+DAxR7oShzF1ZCTAusa4GhEatb9mHaXX/D3sAPBrlBHT12BhAq+UaXry11QTT/Ds8
+fF+DSoWZeuyCAkd/meakbNGKvnIyjd7NJq0L0VxYih6pz7ZKFjV3o1LcGlBJ4f8B
+VfE99MAxNHQFE0624G8DpvQ0h4sX/3HPjZOnl/KeEiYqX3L2/jEeu7ICzSsbuB7B
+qGSsIOPxXWV8JIKg6kIfymc9OUQVu/UMf1+GQkix91dG8vyURyrHalykHm4rsqnk
+vsh1pJ3Y8ZbEgKqaGFdcfhoYr4GsGGEEZ48ehjpe0ChxjU9wAZTt+jxD5GJM9cDP
+HeCvx+W+4M+C5Ww9Wp4GYW+iZn3obP7hf2lAQ+yPbw78amJDSpA=
+=0V6W
+-----END PGP SIGNATURE-----