trino-server-rpm
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-server-rpm</artifactId>
<version>470</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.trino</groupId>
<artifactId>trino-root</artifactId>
<version>470</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>trino-server-rpm</artifactId>
<packaging>rpm</packaging>
<description>Trino - Server RPM package</description>
<properties>
<server.tar.package>trino-server-${project.version}</server.tar.package>
<rpm.skipSigning>true</rpm.skipSigning>
</properties>
<dependencies>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.airlift</groupId>
<artifactId>junit-extensions</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.airlift</groupId>
<artifactId>units</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-main</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-testing-containers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-testing-services</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<licenseSets>
<licenseSet>
<header>${air.license.header-file}</header>
<excludes combine.children="append">
<exclude>src/main/rpm/**</exclude>
</excludes>
</licenseSet>
</licenseSets>
<mapping>
<groovy>SLASHSTAR_STYLE</groovy>
</mapping>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- the default RPM lifecycle does not include testCompile -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
<artifactId>provisio-maven-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<goals>
<goal>provision</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>execute</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<source>${project.basedir}/src/main/script/symlink.groovy</source>
<properties>
<root>${project.build.outputDirectory}/${server.tar.package}</root>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<!-- Build RPM using the untarred artifacts -->
<plugin>
<groupId>de.dentrassi.maven</groupId>
<artifactId>rpm</artifactId>
<version>1.13.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<group>Applications/Databases</group>
<version>${project.version}</version>
<outputFileName>trino-server-rpm-${project.version}.noarch.rpm</outputFileName>
<release>1</release>
<evalHostname>false</evalHostname>
<forceRelease>true</forceRelease>
<description>Trino Server RPM Package.</description>
<epoch>0</epoch>
<requires>
<require>/usr/sbin/useradd</require>
<require>/usr/sbin/groupadd</require>
<!-- Used e.g. by service launcher -->
<require>/usr/bin/sudo</require>
</requires>
<afterInstallation>
<file>src/main/rpm/postinstall</file>
</afterInstallation>
<beforeInstallation>
<file>src/main/rpm/preinstall</file>
</beforeInstallation>
<beforeRemoval>
<file>src/main/rpm/preremove</file>
</beforeRemoval>
<afterRemoval>
<file>src/main/rpm/postremove</file>
</afterRemoval>
<rulesets>
<ruleset>
<id>server-package</id>
<rules>
<rule>
<when>
<prefix>/etc/trino</prefix>
</when>
<configuration>true</configuration>
</rule>
<file>
<when>
<prefix>/usr/shared/doc</prefix>
</when>
<documentation>true</documentation>
</file>
<file>
<when>
<prefix>/etc/init.d</prefix>
<type>file</type>
</when>
<!-- make sure launcher scripts are executable -->
<mode>0755</mode>
</file>
<!-- make launcher and launcher executable -->
<file>
<when>
<suffix>/usr/lib/trino/bin/linux-amd64/launcher</suffix>
<type>file</type>
</when>
<mode>0755</mode>
</file>
<file>
<when>
<suffix>/usr/lib/trino/bin/linux-arm64/launcher</suffix>
<type>file</type>
</when>
<mode>0755</mode>
</file>
<file>
<when>
<suffix>/usr/lib/trino/bin/linux-ppc64le/launcher</suffix>
<type>file</type>
</when>
<mode>0755</mode>
</file>
<file>
<when>
<suffix>/usr/lib/trino/bin/launcher</suffix>
<type>file</type>
</when>
<mode>0755</mode>
</file>
<file>
<when>
<suffix>/usr/lib/trino/bin/launcher</suffix>
<type>file</type>
</when>
<mode>0755</mode>
</file>
<file>
<when>
<suffix>/usr/lib/trino/bin</suffix>
<type>directory</type>
</when>
<mode>0755</mode>
</file>
</rules>
</ruleset>
</rulesets>
<entries>
<entry>
<name>/usr/lib/trino/etc</name>
<linkTo>/etc/trino</linkTo>
</entry>
<entry>
<name>/usr/lib/trino</name>
<collect>
<from>target/classes/${server.tar.package}</from>
<excludes>
<!-- README is added to /usr/share/docs -->
<exclude>README.txt</exclude>
</excludes>
<symbolicLinks>true</symbolicLinks>
</collect>
<ruleset>server-package</ruleset>
</entry>
<entry>
<name>/etc/init.d</name>
<collect>
<from>src/main/resources/dist/etc/init.d</from>
</collect>
<ruleset>server-package</ruleset>
</entry>
<entry>
<!-- explicitly create directory -->
<name>/etc/trino</name>
<directory>true</directory>
</entry>
<entry>
<name>/etc/trino</name>
<collect>
<from>src/main/resources/dist/config</from>
<directories>false</directories>
</collect>
<noreplace>true</noreplace>
<ruleset>server-package</ruleset>
</entry>
<entry>
<!-- explicitly create directory -->
<name>/usr/shared/doc/trino</name>
<directory>true</directory>
</entry>
<entry>
<name>/usr/shared/doc/trino</name>
<collect>
<from>target/classes/${server.tar.package}</from>
<includes>
<include>**/README.txt</include>
</includes>
</collect>
<ruleset>server-package</ruleset>
</entry>
</entries>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<!-- All Trino modules are imported into this module as "provided" dependencies what makes dependencies from all the modules to be cross checked for compatibility -->
<!-- Override rules to disable dependency checks as dependencies of different connectors don't have to be compatible -->
<rules combine.self="override">
<requireFilesSize>
<!-- Maven Central has a 1GB limit -->
<maxsize>1106000000</maxsize>
<files>
<file>${project.build.directory}/${project.build.finalName}.noarch.rpm</file>
</files>
</requireFilesSize>
</rules>
<fail>true</fail>
</configuration>
<executions>
<execution>
<id>default</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<rpm>${project.build.directory}/${project.build.finalName}.noarch.rpm</rpm>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>