This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 2ad7758688b HDDS-13414. Build a basic deb package for Ozone (#8888)
2ad7758688b is described below
commit 2ad7758688b53d06a4a812c0d9f4c9161ece4144
Author: Eric C. Ho <[email protected]>
AuthorDate: Fri Sep 5 13:17:19 2025 +0800
HDDS-13414. Build a basic deb package for Ozone (#8888)
---
hadoop-ozone/dist/pom.xml | 145 +++++++++++++++++++++
.../dist/src/main/package/deb/control/control | 22 ++++
pom.xml | 11 ++
3 files changed, 178 insertions(+)
diff --git a/hadoop-ozone/dist/pom.xml b/hadoop-ozone/dist/pom.xml
index 5de8e32c01a..ed082deb4bb 100644
--- a/hadoop-ozone/dist/pom.xml
+++ b/hadoop-ozone/dist/pom.xml
@@ -440,6 +440,151 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>deb</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>detect-distro</id>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <phase>initialize</phase>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+ <argument>-c</argument>
+ <argument><![CDATA[echo "linux.distro=$(if [ -f
/etc/lsb-release ] && grep -q Ubuntu /etc/lsb-release; then echo ubuntu; elif [
-f /etc/debian_version ]; then echo debian; else echo linux; fi)" >
${project.build.directory}/system.properties]]></argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>detect-system</id>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <phase>initialize</phase>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+ <argument>-c</argument>
+ <argument><![CDATA[ARCH=$(uname -m)
+ case $ARCH in
+ x86_64) DEB_ARCH=amd64 ;;
+ aarch64) DEB_ARCH=arm64 ;;
+ armv7l) DEB_ARCH=armhf ;;
+ i386|i686) DEB_ARCH=i386 ;;
+ *) DEB_ARCH=all ;;
+ esac
+
+ echo "deb.arch=$DEB_ARCH" >>
${project.build.directory}/system.properties]]></argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>read-distro</id>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <phase>initialize</phase>
+ <configuration>
+ <files>
+ <file>${project.build.directory}/system.properties</file>
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.vafer</groupId>
+ <artifactId>jdeb</artifactId>
+ <configuration>
+ <controlDir>${basedir}/src/main/package/deb/control</controlDir>
+
<deb>${project.build.directory}/ozone_${project.version}-${linux.distro}_${deb.arch}.deb</deb>
+ <skip>false</skip>
+ <skipPOMs>false</skipPOMs>
+ <dataSet>
+ <data>
+
<src>${project.build.directory}/ozone-${project.version}/bin/ozone</src>
+ <type>file</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/opt/ozone/bin</prefix>
+ <user>root</user>
+ <group>root</group>
+ <filemode>755</filemode>
+ </mapper>
+ </data>
+
+ <data>
+
<src>${project.build.directory}/ozone-${project.version}/sbin</src>
+ <type>directory</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/opt/ozone/sbin</prefix>
+ <user>root</user>
+ <group>root</group>
+ </mapper>
+ </data>
+
+ <data>
+
<src>${project.build.directory}/ozone-${project.version}/etc</src>
+ <type>directory</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/opt/ozone/etc</prefix>
+ <user>root</user>
+ <group>root</group>
+ </mapper>
+ </data>
+
+ <data>
+
<src>${project.build.directory}/ozone-${project.version}/libexec</src>
+ <dst>/opt/ozone/libexec</dst>
+ <type>directory</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/opt/ozone/libexec</prefix>
+ <user>root</user>
+ <group>root</group>
+ </mapper>
+ </data>
+
+ <data>
+
<src>${project.build.directory}/ozone-${project.version}/share</src>
+ <dst>/opt/ozone/share</dst>
+ <type>directory</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/opt/ozone/share</prefix>
+ <user>root</user>
+ <group>root</group>
+ </mapper>
+ </data>
+ </dataSet>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jdeb</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>rpm</id>
<build>
diff --git a/hadoop-ozone/dist/src/main/package/deb/control/control
b/hadoop-ozone/dist/src/main/package/deb/control/control
new file mode 100644
index 00000000000..b0522c0527c
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/package/deb/control/control
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+Package: [[artifactId]]
+Version: [[project.version]]
+Section: net
+Priority: extra
+Depends: openjdk-8-jdk | openjdk-11-jdk | openjdk-17-jdk | openjdk-21-jdk
+Architecture: all
+Description: A scalable, redundant, and distributed object store for Big Data.
+Maintainer: chungen0126 <[email protected]>
diff --git a/pom.xml b/pom.xml
index bf2b9d2079e..76ac1156eb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,6 +117,7 @@
<jaxb-api.version>2.3.3</jaxb-api.version>
<jaxb-runtime.version>2.3.9</jaxb-runtime.version>
<jcip-annotations.version>1.0-1</jcip-annotations.version>
+ <jdeb.version>1.14</jdeb.version>
<jersey.version>1.19.4</jersey.version>
<jersey2.version>2.47</jersey2.version>
<jetty.version>9.4.58.v20250814</jetty.version>
@@ -1384,6 +1385,11 @@
<artifactId>bcutil-jdk18on</artifactId>
<version>${bouncycastle.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>${properties.maven.plugin.version}</version>
+ </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
@@ -1655,6 +1661,11 @@
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.vafer</groupId>
+ <artifactId>jdeb</artifactId>
+ <version>${jdeb.version}</version>
+ </dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]