You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by vi...@apache.org on 2019/03/02 20:06:18 UTC

[drill] branch master updated: DRILL-7070: Fix deb and rpm issues on apache drill master branch

This is an automated email from the ASF dual-hosted git repository.

vitalii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e5b9a4  DRILL-7070: Fix deb and rpm issues on apache drill master branch
5e5b9a4 is described below

commit 5e5b9a415d40899987bbc8fb7778e41779f599ad
Author: Naresh Bhat <na...@linaro.org>
AuthorDate: Tue Feb 19 08:43:43 2019 +0000

    DRILL-7070: Fix deb and rpm issues on apache drill master branch
    
    The Apache Drill failed to generate debian and rpm packages. The issues fixed as below,
    -Add apache as prefix
    -Remove lib folder while packaging, because lib folder does not exist.
    -Add git.properties, KEYS, LICENSE, NOTICE, README.md and sample-data dir into the /opt/drill/.
    -Update plugin version to 2.2.0
    -Update Maven org.vafer:jdeb plugin version to 1.7
    -Change the rpm name tobe generated by editing version, and name.
    -Remove two files under distribution/src/deb/control/ i.e. conffiles and control.
    -The `<copyright>` tag isn't supported anymore for this plugin. Hence use `<license>` and project variables content instead of `2013 ASF`.
    
    Signed-off-by: Naresh Bhat <na...@linaro.org>
---
 distribution/pom.xml                   | 121 +++++++++++++++++++++++++++------
 distribution/src/deb/control/conffiles |  21 ------
 distribution/src/deb/control/control   |   8 ---
 3 files changed, 100 insertions(+), 50 deletions(-)

diff --git a/distribution/pom.xml b/distribution/pom.xml
index 735eea8..eabcca4 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -196,9 +196,7 @@
         <inherited>true</inherited>
         <configuration>
           <excludes>
-            <exclude>**/conffiles</exclude>
             <exclude>**/git.properties</exclude>
-            <exclude>**/control</exclude>
             <exclude>**/*.checkstyle</exclude>
             <exclude>**/*.json</exclude>
             <exclude>**/README.md</exclude>
@@ -366,7 +364,7 @@
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>rpm-maven-plugin</artifactId>
-            <version>2.1-alpha-3</version>
+            <version>2.2.0</version>
             <executions>
               <execution>
                 <id>generate-rpm</id>
@@ -376,26 +374,49 @@
               </execution>
             </executions>
             <configuration>
-              <copyright>2013 ASF</copyright>
+              <license>${project.organization} ${project.licenses}</license>
               <group>Apache Software Foundation</group>
               <prefix>/opt</prefix>
-              <release>SNAPSHOT</release>
-              <version>1.0</version>
-              <name>drill</name>
+              <version>${project.version}</version>
+              <name>apache-drill</name>
               <mappings>
                 <mapping>
-                  <directory>/opt/drill/bin</directory>
+                  <directory>/opt/drill</directory>
                   <sources>
                     <source>
-                      <location>target/drill-${project.version}-bin/drill-${project.version}/bin</location>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/git.properties</location>
                     </source>
                   </sources>
                 </mapping>
                 <mapping>
-                  <directory>/opt/drill/lib</directory>
+                  <directory>/opt/drill</directory>
                   <sources>
                     <source>
-                      <location>target/drill-${project.version}-bin/drill-${project.version}/lib</location>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/KEYS</location>
+                    </source>
+                  </sources>
+                </mapping>
+                <mapping>
+                  <directory>/opt/drill</directory>
+                  <sources>
+                    <source>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/LICENSE</location>
+                    </source>
+                  </sources>
+                </mapping>
+                <mapping>
+                  <directory>/opt/drill</directory>
+                  <sources>
+                    <source>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/NOTICE</location>
+                    </source>
+                  </sources>
+                </mapping>
+                <mapping>
+                  <directory>/opt/drill</directory>
+                  <sources>
+                    <source>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/README.md</location>
                     </source>
                   </sources>
                 </mapping>
@@ -403,7 +424,23 @@
                   <directory>/opt/drill/jars</directory>
                   <sources>
                     <source>
-                      <location>target/drill-${project.version}-bin/drill-${project.version}/jars</location>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/jars</location>
+                    </source>
+                  </sources>
+                </mapping>
+                <mapping>
+                  <directory>/opt/drill/bin</directory>
+                  <sources>
+                    <source>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/bin</location>
+                    </source>
+                  </sources>
+                </mapping>
+                <mapping>
+		<directory>/opt/drill/sample-data</directory>
+                  <sources>
+                    <source>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/sample-data</location>
                     </source>
                   </sources>
                 </mapping>
@@ -411,7 +448,7 @@
                   <directory>/etc/drill/conf</directory>
                   <sources>
                     <source>
-                      <location>target/drill-${project.version}-bin/drill-${project.version}/conf</location>
+                      <location>target/apache-drill-${project.version}/apache-drill-${project.version}/conf</location>
                     </source>
                   </sources>
                   <configuration>true</configuration>
@@ -438,7 +475,7 @@
           <plugin>
             <artifactId>jdeb</artifactId>
             <groupId>org.vafer</groupId>
-            <version>1.0</version>
+            <version>1.7</version>
             <executions>
               <execution>
                 <phase>package</phase>
@@ -446,18 +483,51 @@
                   <goal>jdeb</goal>
                 </goals>
                 <configuration>
-                  <deb>target/drill-${project.version}.deb</deb>
+                  <skipPOMs>false</skipPOMs>
+                  <deb>distribution/target/apache-drill-${project.version}/apache-drill-${project.version}.deb</deb>
                   <dataSet>
                     <data>
-                      <src>target/drill-${project.version}-bin/drill-${project.version}/lib</src>
-                      <type>directory</type>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/git.properties</src>
+                      <type>file</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/opt/drill/</prefix>
+                      </mapper>
+                    </data>
+                    <data>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/KEYS</src>
+                      <type>file</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/opt/drill/</prefix>
+                      </mapper>
+                    </data>
+                    <data>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/LICENSE</src>
+                      <type>file</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/opt/drill/</prefix>
+                      </mapper>
+                    </data>
+                    <data>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/NOTICE</src>
+                      <type>file</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/opt/drill/</prefix>
+                      </mapper>
+                    </data>
+                    <data>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/README.md</src>
+                      <type>file</type>
                       <mapper>
                         <type>perm</type>
-                        <prefix>/opt/drill/lib/</prefix>
+                        <prefix>/opt/drill/</prefix>
                       </mapper>
                     </data>
                     <data>
-                      <src>target/drill-${project.version}-bin/drill-${project.version}/jars</src>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/jars</src>
                       <type>directory</type>
                       <mapper>
                         <type>perm</type>
@@ -465,7 +535,7 @@
                       </mapper>
                     </data>
                     <data>
-                      <src>target/drill-${project.version}-bin/drill-${project.version}/bin</src>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/bin</src>
                       <type>directory</type>
                       <mapper>
                         <type>perm</type>
@@ -474,7 +544,16 @@
                       </mapper>
                     </data>
                     <data>
-                      <src>target/drill-${project.version}-bin/drill-${project.version}/conf</src>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/sample-data</src>
+                      <type>directory</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/opt/drill/sample-data</prefix>
+                        <filemode>755</filemode>
+                      </mapper>
+                    </data>
+                    <data>
+                      <src>target/apache-drill-${project.version}/apache-drill-${project.version}/conf</src>
                       <type>directory</type>
                       <mapper>
                         <type>perm</type>
diff --git a/distribution/src/deb/control/conffiles b/distribution/src/deb/control/conffiles
deleted file mode 100644
index 40a9114..0000000
--- a/distribution/src/deb/control/conffiles
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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.
-#
-
-/etc/drill/conf/drill-override.conf
-/etc/drill/conf/logback.xml
-/etc/drill/conf/drill-env.sh
diff --git a/distribution/src/deb/control/control b/distribution/src/deb/control/control
deleted file mode 100644
index 8a6b69b..0000000
--- a/distribution/src/deb/control/control
+++ /dev/null
@@ -1,8 +0,0 @@
-Package: drill
-Version: 1.0-SNAPSHOT
-Section: misc
-Priority: optional
-Architecture: all
-Maintainer: name <>
-Description: Apache Drill
-Distribution: development
\ No newline at end of file