shashwatsai commented on code in PR #9181:
URL: https://github.com/apache/seatunnel/pull/9181#discussion_r2048325534
##########
seatunnel-dist/pom.xml:
##########
@@ -68,6 +73,112 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>postinstall_script</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <echo append="false"
file="${project.build.directory}/postinstall.sh">#!/bin/sh
+ mkdir -p ${rpm.stack.root}/current
+ ln -sfn
${rpm.stack.root}/${rpm.version}/seatunnel ${rpm.stack.root}/current
+ chmod 755
${rpm.stack.root}/${rpm.version}/seatunnel/bin/*.sh
+ chmod 755 /etc/seatunnel/conf/*.sh</echo>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>postremove_script</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <echo append="false"
file="${project.build.directory}/postremove.sh">#!/bin/sh
+ rm -rf ${rpm.stack.root}/current/seatunnel
+ rm -rf
${rpm.stack.root}/${rpm.version}</echo>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <version>2.3.0</version>
+ <executions>
+ <execution>
+ <id>generate-rpm</id>
+ <goals>
+ <goal>rpm</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <group>Development</group>
+ <name>seatunnel</name>
+ <version>${project.version}</version>
+ <release>${rpm.release.number}</release>
+ <needarch>x86_64</needarch>
+ <group>Application/Java</group>
+ <defaultFilemode>644</defaultFilemode>
+ <defaultDirmode>755</defaultDirmode>
+ <defaultUsername>root</defaultUsername>
+ <defaultGroupname>root</defaultGroupname>
+ <autoRequires>false</autoRequires>
+ <disabled>${rpm.build.disable}</disabled>
+ <mappings>
+ <mapping>
+
<directory>${rpm.stack.root}/${rpm.version}/seatunnel/</directory>
+ <sources>
+ <source>
+
<location>${project.build.directory}/apache-seatunnel-${project.version}-bin/apache-seatunnel-${project.version}/</location>
+ <excludes>
+ <exclude>config/**</exclude>
+ </excludes>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/etc/seatunnel/conf/</directory>
+ <sources>
+ <source>
+
<location>${project.build.directory}/apache-seatunnel-${project.version}-bin/apache-seatunnel-${project.version}/config/</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/usr/sbin</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+
<directoryIncluded>false</directoryIncluded>
+ <sources>
+ <source>
+
<location>${project.basedir}/sbin/seatunnel</location>
+ </source>
+ </sources>
+ </mapping>
+ </mappings>
+ <postinstallScriptlet>
Review Comment:
should we have a preInstallScriptlet, /usr/bigtop, which is defined as an
rpm root, may not be present,
```
<preInstallScriptlet>
<![CDATA[
#!/bin/bash
mkdir -p /usr/bigtop
]]>
</preInstallScriptlet>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]