Skip to content

Commit

Permalink
Merge pull request #5617 from dizzzz/feature/upgrade-commons-daemon-1…
Browse files Browse the repository at this point in the history
….4.1-native
  • Loading branch information
dizzzz authored Jan 27, 2025
2 parents f531ed9 + aaeb178 commit ad2fb39
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
29 changes: 21 additions & 8 deletions exist-service/bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Windows Binary
The Windows Binary is taken directly from the native binaries for Windows package provided by the Apache Commons Daemon project. For example:
```
wget https://dlcdn.apache.org/commons/daemon/binaries/windows/commons-daemon-1.3.3-bin-windows.zip
unzip commons-daemon-1.3.3-bin-windows.zip
wget https://dlcdn.apache.org/commons/daemon/binaries/windows/commons-daemon-1.4.1-bin-windows.zip
unzip commons-daemon-1.4.1-bin-windows.zip
```

## macOS Binary
Expand All @@ -14,9 +14,10 @@ It is compiled for a minimum version of 10.13 of macOS so as to provide some bac
For example:

```bash
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.3.3-native-src.tar.gz
tar zxvf commons-daemon-1.3.3-native-src.tar.gz
cd commons-daemon-1.3.3-native-src/unix
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.4.1-native-src.tar.gz
tar zxvf commons-daemon-1.4.1-native-src.tar.gz

cd commons-daemon-1.4.1-native-src/unix
export CFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64"
export LDFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64"
./configure
Expand All @@ -30,14 +31,26 @@ It is compiled for a minimum glibc of 2.17 so as to provide some backwards compa
CentOS 7 provides a glibc 2.17. If you have Docker, you can build it using the following example:

```bash
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.3.3-native-src.tar.gz
tar zxvf commons-daemon-1.3.3-native-src.tar.gz
docker run -it -v /tmp/commons-daemon-1.3.3-native-src/unix:/commons-daemon-src centos:7
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.4.1-native-src.tar.gz
tar zxvf commons-daemon-1.4.1-native-src.tar.gz

docker run -it -v ./commons-daemon-1.4.1-native-src/unix:/commons-daemon-1.4.1-native-src centos:7

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

yum install -y gcc make libcap-devel java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel

cd /commons-daemon-src
export CFLAGS=-m64
export LDFLAGS=-m64
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
./configure
make
```

For building a linux binary on MacOs Mx processors run docker like

```
docker run -it --platform linux/amd64 -v ./commons-daemon-1.4.1-native-src/unix:/commons-daemon-1.4.1-native-src centos:7
```
Binary file modified exist-service/bin/jsvc-linux-x86_64
Binary file not shown.
Binary file modified exist-service/bin/jsvc-mac
Binary file not shown.
Binary file modified exist-service/bin/prunsrv-x86_64.exe
100644 → 100755
Binary file not shown.
2 changes: 1 addition & 1 deletion exist-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>commons-daemon</groupId>
<artifactId>commons-daemon</artifactId>
<version>1.3.3</version>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down

0 comments on commit ad2fb39

Please sign in to comment.