Skip to content

Commit 4c35fae

Browse files
author
Edison Su
committed
switch to ant target to create cloud-scripts.tgz, as there is assumption that the owner of files in this tgz is root.
1 parent d1af01f commit 4c35fae

File tree

3 files changed

+55
-34
lines changed

3 files changed

+55
-34
lines changed

build/build-cloud.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,6 @@
527527
</tar>
528528
<copy file="${base.dir}/patches/systemvm/debian/config/root/.ssh/authorized_keys" todir="${dist.dir}/"/>
529529
<gzip destfile="${dist.dir}/cloud-scripts.tgz" src="${dist.dir}/patch.tar"/>
530-
<delete file="${dist.dir}/patch.tar"/>
531-
<delete dir="${dist.dir}/build-patch"/>
532530
</target>
533531

534532
<target name="help">

console-proxy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
</goals>
144144
<configuration>
145145
<target>
146-
<copy overwrite="true" file="../patches/target/cloud-scripts.tar.gz" tofile="${basedir}/dist/cloud-scripts.tgz"/>
146+
<copy overwrite="true" file="../patches/target/cloud-scripts.tgz" tofile="${basedir}/dist/cloud-scripts.tgz"/>
147147
</target>
148148
</configuration>
149149
</execution>

patches/pom.xml

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
<!--
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
-->
19-
<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">
1+
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
2+
license agreements. See the NOTICE file distributed with this work for additional
3+
information regarding copyright ownership. The ASF licenses this file to
4+
you under the Apache License, Version 2.0 (the "License"); you may not use
5+
this file except in compliance with the License. You may obtain a copy of
6+
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
7+
by applicable law or agreed to in writing, software distributed under the
8+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
9+
OF ANY KIND, either express or implied. See the License for the specific
10+
language governing permissions and limitations under the License. -->
11+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2013
<modelVersion>4.0.0</modelVersion>
2114
<artifactId>cloud-patches</artifactId>
2215
<name>Apache CloudStack SystemVM Patches</name>
@@ -67,22 +60,52 @@
6760
<defaultGoal>install</defaultGoal>
6861
<plugins>
6962
<plugin>
70-
<artifactId>maven-assembly-plugin</artifactId>
71-
<version>2.3</version>
72-
<configuration>
73-
<finalName>cloud-scripts</finalName>
74-
<appendAssemblyId>false</appendAssemblyId>
75-
<descriptors>
76-
<descriptor>cloudpatch-descriptor.xml</descriptor>
77-
</descriptors>
78-
</configuration>
63+
<artifactId>maven-antrun-plugin</artifactId>
64+
<version>1.7</version>
7965
<executions>
8066
<execution>
81-
<id>make-cloud-scripts</id>
82-
<phase>package</phase>
67+
<id>build-cloud-scripts</id>
68+
<phase>install</phase>
8369
<goals>
84-
<goal>single</goal>
70+
<goal>run</goal>
8571
</goals>
72+
<configuration>
73+
<target>
74+
<mkdir dir="${basedir}/target/build-patch" />
75+
<mkdir dir="${basedir}/target/build-patch/usr/sbin" />
76+
<copy overwrite="true" todir="${basedir}/target/build-patch">
77+
<fileset dir="${basedir}/systemvm/debian/config/">
78+
<include name="**/*" />
79+
</fileset>
80+
<fileset dir="${basedir}/systemvm/debian/vpn/">
81+
<include name="**/*" />
82+
</fileset>
83+
<fileset dir="${basedir}/systemvm/debian/xe/">
84+
<include name="**/*" />
85+
<exclude name="**/xe-*" />
86+
<exclude name="**/xen-*" />
87+
</fileset>
88+
</copy>
89+
<copy overwrite="true" todir="${basedir}/target/build-patch/usr/sbin/">
90+
<fileset dir="${basedir}/systemvm/debian/xe/">
91+
<include name="**/xe-*" />
92+
<include name="**/xen-*" />
93+
</fileset>
94+
</copy>
95+
<tar destfile="${basedir}/target/patch.tar">
96+
<tarfileset dir="${basedir}/target/build-patch/"
97+
filemode="755">
98+
<include name="**/*" />
99+
<exclude name="**/.classpath" />
100+
<exclude name="**/.project" />
101+
<exclude name="**/wscript_build" />
102+
</tarfileset>
103+
</tar>
104+
<gzip destfile="${basedir}/target/cloud-scripts.tgz" src="${basedir}/target/patch.tar" />
105+
<delete dir="${basedir}/target/build-patch" />
106+
<delete file="${basedir}/target/patch.tar" />
107+
</target>
108+
</configuration>
86109
</execution>
87110
</executions>
88111
</plugin>

0 commit comments

Comments
 (0)