Skip to content

Commit 7eaf537

Browse files
committed
Rename cloud-agent-scripts to cloud-scripts
The management server also depends on a couple of these scripts, so renaming to cloud-scripts makes more sence then installing cloud-agent-scripts. In the future we might want to split this up in two packages.
1 parent b892ff6 commit 7eaf537

10 files changed

Lines changed: 40 additions & 88 deletions

agent/conf/environment.properties.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# management server compile-time environment parameters
1919

2020
paths.pid=@PIDDIR@
21-
paths.script=@AGENTLIBDIR@
21+
paths.script=@COMMONLIBDIR@

client/tomcatconf/environment.properties.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717

1818
# management server compile-time environment parameters
1919

20-
paths.script=@AGENTLIBDIR@
20+
paths.script=@COMMONLIBDIR@
2121
mount.parent=@MSMNTDIR@
2222
cloud-stack-components-specification=@COMPONENTS-SPEC@

cloud.spec

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ Group: System Environment/Libraries
8181
%description server
8282
The CloudStack server libraries provide a set of Java classes for CloudStack.
8383

84-
%package agent-scripts
85-
Summary: CloudStack agent scripts
84+
%package scripts
85+
Summary: CloudStack scripts
8686
# FIXME nuke the archdependency
8787
Requires: python
8888
Requires: bash
@@ -95,13 +95,10 @@ Requires: nfs-utils
9595
Requires: wget
9696
# there is a fsimage.so in the source code, which adds xen-libs as a dependence, needs to supress it, as rhel doesn't have this pacakge
9797
AutoReqProv: no
98-
Obsoletes: vmops-agent-scripts < %{version}-%{release}
98+
Obsoletes: cloud-agent-scripts < %{version}-%{release}
9999
Group: System Environment/Libraries
100-
%description agent-scripts
101-
The CloudStack agent is in charge of managing shared computing resources in
102-
a KVM-powered cloud. Install this package if this computer
103-
will participate in your cloud -- this is a requirement for the CloudStack KVM
104-
agent.
100+
%description scripts
101+
This package contains common scripts used by the Agent and Management server
105102

106103
%package python
107104
Summary: CloudStack Python library
@@ -143,8 +140,7 @@ Requires: java >= 1.6.0
143140
Requires: %{name}-deps = %{version}, %{name}-utils = %{version}, %{name}-server = %{version}
144141
Requires: %{name}-client-ui = %{version}
145142
Requires: %{name}-setup = %{version}
146-
# reqs the agent-scripts package because of xenserver within the management server
147-
Requires: %{name}-agent-scripts = %{version}
143+
Requires: %{name}-scripts = %{version}
148144
Requires: %{name}-python = %{version}
149145
Requires: %{name}-aws-api = %{version}
150146
# for consoleproxy
@@ -209,7 +205,7 @@ Obsoletes: cloud-premium-agent < %{version}-%{release}
209205
Requires: java >= 1.6.0
210206
Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}
211207
Requires: %{name}-agent-libs = %{version}
212-
Requires: %{name}-agent-scripts = %{version}
208+
Requires: %{name}-scripts = %{version}
213209
Requires: python
214210
Requires: %{name}-python = %{version}
215211
Requires: commons-httpclient
@@ -376,10 +372,6 @@ else
376372
/sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true
377373
fi
378374

379-
%pre agent-scripts
380-
id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
381-
-r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true
382-
383375
%preun agent
384376
if [ "$1" == "0" ] ; then
385377
/sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true
@@ -454,12 +446,12 @@ fi
454446
%{_javadir}/%{name}-plugin-nicira-nvp.jar
455447
%config(noreplace) %{_sysconfdir}/%{name}/server/*
456448

457-
%files agent-scripts
449+
%files scripts
458450
%defattr(-,root,root,-)
459-
%{_libdir}/%{name}/agent/scripts/*
460-
# maintain the following list in sync with files agent-scripts
461-
%{_libdir}/%{name}/agent/vms/systemvm.zip
462-
%{_libdir}/%{name}/agent/vms/systemvm.iso
451+
%{_libdir}/%{name}/common/scripts/*
452+
# maintain the following list in sync with files scripts
453+
%{_libdir}/%{name}/common/vms/systemvm.zip
454+
%{_libdir}/%{name}/common/vms/systemvm.iso
463455

464456

465457
%files deps

debian/cloud-agent-scripts.install

Lines changed: 0 additions & 27 deletions
This file was deleted.

debian/cloud-agent-scripts.postinst

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
/usr/lib/cloud/common/scripts/installer/*
19+
/usr/lib/cloud/common/scripts/network/*
20+
/usr/lib/cloud/common/scripts/storage/*
21+
/usr/lib/cloud/common/scripts/util/*
22+
/usr/lib/cloud/common/scripts/vm/network/*
23+
/usr/lib/cloud/common/scripts/vm/systemvm/*
24+
/usr/lib/cloud/common/scripts/vm/pingtest.sh
25+
/usr/lib/cloud/common/scripts/vm/hypervisor/kvm/*
26+
/usr/lib/cloud/common/scripts/vm/hypervisor/versions.sh
27+
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/*

debian/cloud-system-iso.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
/usr/lib/cloud/agent/vms/systemvm.iso
18+
/usr/lib/cloud/common/vms/systemvm.iso

debian/control

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ Description: CloudStack server library
4545
The CloudStack server libraries provide a set of Java classes used
4646
in the CloudStack management server.
4747

48-
Package: cloud-agent-scripts
48+
Package: cloud-scripts
49+
Replaces: cloud-agent-scripts
4950
Architecture: any
5051
Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client
51-
Description: CloudStack agent scripts
52-
This package contains a number of scripts needed for the CloudStack Agent on KVM
53-
HyperVisor hosts. The CloudStack Agent depends on this package.
52+
Description: CloudStack scripts
53+
This package contains a number of scripts needed for the CloudStack Agent and Management Server.
54+
Both the CloudStack Agent and Management server depend on this package
5455

5556
Package: cloud-core
5657
Architecture: any
@@ -89,7 +90,7 @@ Description: CloudStack agent libraries
8990

9091
Package: cloud-agent
9192
Architecture: any
92-
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-agent-scripts (= ${source:Version}), libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, libcommons-httpclient-java, libservlet2.5-java, liblog4j1.2-java (>= 1.2.16), libjna-java, wget, jsvc, lsb-base (>= 3.2)
93+
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), python, cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-scripts (= ${source:Version}), libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, libcommons-httpclient-java, libservlet2.5-java, liblog4j1.2-java (>= 1.2.16), libjna-java, wget, jsvc, lsb-base (>= 3.2)
9394
Description: CloudStack agent
9495
The CloudStack agent is in charge of managing shared computing resources in
9596
a CloudStack powered cloud. Install this package if this computer

wscript_build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ def build_patches ():
201201
def build_systemvm_patch ():
202202
if bld.env.DISTRO not in ["Windows","Mac"]:
203203
# patch creation
204-
bld.install_files ("${AGENTLIBDIR}/vms", "%s/systemvm.zip" % distdir)
204+
bld.install_files ("${COMMONLIBDIR}/vms", "%s/systemvm.zip" % distdir)
205205
# ISO creation
206-
bld.install_as("${AGENTLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir)
206+
bld.install_as("${COMMONLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir)
207207

208208
def build_systemvm_iso ():
209209
if buildpremium:
@@ -263,7 +263,7 @@ def build_dirs_symlinks ():
263263

264264
def build_scripts ():
265265
start_path = bld.path.find_dir ("scripts")
266-
bld.substitute('**',"${AGENTLIBDIR}/scripts",chmod=0755, cwd=start_path)
266+
bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path)
267267

268268
def build_bin_exec_dirs ():
269269
#bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
@@ -404,7 +404,7 @@ def build_xml_api_description ():
404404

405405
def build_ovm():
406406
start_path = bld.path.find_dir("plugins/hypervisors/ovm/scripts")
407-
bld.substitute('**',"${AGENTLIBDIR}/scripts",chmod=0755, cwd=start_path)
407+
bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path)
408408

409409
def build_test():
410410
start_path = bld.path.find_dir("test/scripts")

wscript_configure

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ try: conf.check_tool("tomcat")
235235
except Configure.ConfigurationError,e:
236236
conf.fatal("Tomcat directory %r not found. Either install Tomcat using ./waf installrpmdeps or ./waf installdebdeps, or manually install Tomcat to a directory in your system and set the environment variable TOMCAT_HOME to point to it."%conf.env.TOMCATHOME)
237237

238+
conf.env.COMMONPATH = _join(conf.env.PACKAGE,"common")
238239
conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent")
239240
conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy")
240241
conf.env.IPALLOCATORPATH = _join(conf.env.PACKAGE,"ipallocator")
@@ -277,6 +278,8 @@ in_javadir = lambda name: _join(conf.env.JAVADIR,_basename(name)) # $PREFIX/shar
277278
in_system_javadir = lambda name: _join(conf.env.SYSTEMJAVADIR,name) # /usr/share/java
278279
in_premiumjavadir = lambda name: _join(conf.env.PREMIUMJAVADIR,name) # $PREFIX/share/java/cloud-premium
279280

281+
conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env)
282+
280283
conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env)
281284
conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env)
282285
conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env)
@@ -355,6 +358,8 @@ conf.check_message_2('Done','GREEN')
355358

356359
# log4j config and property config files require backslash escapes on Windows
357360

361+
conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env)
362+
358363
conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env)
359364
conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env)
360365
conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env)

0 commit comments

Comments
 (0)