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.
This commit is contained in:
Wido den Hollander 2012-09-13 15:49:52 +02:00
parent b892ff6630
commit 7eaf537d95
10 changed files with 40 additions and 88 deletions

View File

@ -18,4 +18,4 @@
# management server compile-time environment parameters # management server compile-time environment parameters
paths.pid=@PIDDIR@ paths.pid=@PIDDIR@
paths.script=@AGENTLIBDIR@ paths.script=@COMMONLIBDIR@

View File

@ -17,6 +17,6 @@
# management server compile-time environment parameters # management server compile-time environment parameters
paths.script=@AGENTLIBDIR@ paths.script=@COMMONLIBDIR@
mount.parent=@MSMNTDIR@ mount.parent=@MSMNTDIR@
cloud-stack-components-specification=@COMPONENTS-SPEC@ cloud-stack-components-specification=@COMPONENTS-SPEC@

View File

@ -81,8 +81,8 @@ Group: System Environment/Libraries
%description server %description server
The CloudStack server libraries provide a set of Java classes for CloudStack. The CloudStack server libraries provide a set of Java classes for CloudStack.
%package agent-scripts %package scripts
Summary: CloudStack agent scripts Summary: CloudStack scripts
# FIXME nuke the archdependency # FIXME nuke the archdependency
Requires: python Requires: python
Requires: bash Requires: bash
@ -95,13 +95,10 @@ Requires: nfs-utils
Requires: wget Requires: wget
# 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 # 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
AutoReqProv: no AutoReqProv: no
Obsoletes: vmops-agent-scripts < %{version}-%{release} Obsoletes: cloud-agent-scripts < %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
%description agent-scripts %description scripts
The CloudStack agent is in charge of managing shared computing resources in This package contains common scripts used by the Agent and Management server
a KVM-powered cloud. Install this package if this computer
will participate in your cloud -- this is a requirement for the CloudStack KVM
agent.
%package python %package python
Summary: CloudStack Python library Summary: CloudStack Python library
@ -143,8 +140,7 @@ Requires: java >= 1.6.0
Requires: %{name}-deps = %{version}, %{name}-utils = %{version}, %{name}-server = %{version} Requires: %{name}-deps = %{version}, %{name}-utils = %{version}, %{name}-server = %{version}
Requires: %{name}-client-ui = %{version} Requires: %{name}-client-ui = %{version}
Requires: %{name}-setup = %{version} Requires: %{name}-setup = %{version}
# reqs the agent-scripts package because of xenserver within the management server Requires: %{name}-scripts = %{version}
Requires: %{name}-agent-scripts = %{version}
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
Requires: %{name}-aws-api = %{version} Requires: %{name}-aws-api = %{version}
# for consoleproxy # for consoleproxy
@ -209,7 +205,7 @@ Obsoletes: cloud-premium-agent < %{version}-%{release}
Requires: java >= 1.6.0 Requires: java >= 1.6.0
Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version} Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}
Requires: %{name}-agent-libs = %{version} Requires: %{name}-agent-libs = %{version}
Requires: %{name}-agent-scripts = %{version} Requires: %{name}-scripts = %{version}
Requires: python Requires: python
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
Requires: commons-httpclient Requires: commons-httpclient
@ -376,10 +372,6 @@ else
/sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true /sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true
fi fi
%pre agent-scripts
id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
-r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true
%preun agent %preun agent
if [ "$1" == "0" ] ; then if [ "$1" == "0" ] ; then
/sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true /sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true
@ -454,12 +446,12 @@ fi
%{_javadir}/%{name}-plugin-nicira-nvp.jar %{_javadir}/%{name}-plugin-nicira-nvp.jar
%config(noreplace) %{_sysconfdir}/%{name}/server/* %config(noreplace) %{_sysconfdir}/%{name}/server/*
%files agent-scripts %files scripts
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/%{name}/agent/scripts/* %{_libdir}/%{name}/common/scripts/*
# maintain the following list in sync with files agent-scripts # maintain the following list in sync with files scripts
%{_libdir}/%{name}/agent/vms/systemvm.zip %{_libdir}/%{name}/common/vms/systemvm.zip
%{_libdir}/%{name}/agent/vms/systemvm.iso %{_libdir}/%{name}/common/vms/systemvm.iso
%files deps %files deps

View File

@ -1,27 +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.
/usr/lib/cloud/agent/scripts/installer/*
/usr/lib/cloud/agent/scripts/network/*
/usr/lib/cloud/agent/scripts/storage/*
/usr/lib/cloud/agent/scripts/util/*
/usr/lib/cloud/agent/scripts/vm/network/*
/usr/lib/cloud/agent/scripts/vm/systemvm/*
/usr/lib/cloud/agent/scripts/vm/pingtest.sh
/usr/lib/cloud/agent/scripts/vm/hypervisor/kvm/*
/usr/lib/cloud/agent/scripts/vm/hypervisor/versions.sh
/usr/lib/cloud/agent/scripts/vm/hypervisor/xenserver/*

View File

@ -1,29 +0,0 @@
#!/bin/sh -e
# 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.
case "$1" in
configure)
if ! id cloud > /dev/null 2>&1 ; then
adduser --system --home /var/lib/cloud/management --no-create-home \
--group --disabled-password --shell /bin/sh cloud
# update me in cloud-usage.postinst as well
fi
;;
esac
#DEBHELPER#

View File

@ -15,3 +15,13 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
/usr/lib/cloud/common/scripts/installer/*
/usr/lib/cloud/common/scripts/network/*
/usr/lib/cloud/common/scripts/storage/*
/usr/lib/cloud/common/scripts/util/*
/usr/lib/cloud/common/scripts/vm/network/*
/usr/lib/cloud/common/scripts/vm/systemvm/*
/usr/lib/cloud/common/scripts/vm/pingtest.sh
/usr/lib/cloud/common/scripts/vm/hypervisor/kvm/*
/usr/lib/cloud/common/scripts/vm/hypervisor/versions.sh
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/*

View File

@ -15,4 +15,4 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
/usr/lib/cloud/agent/vms/systemvm.iso /usr/lib/cloud/common/vms/systemvm.iso

11
debian/control vendored
View File

@ -45,12 +45,13 @@ Description: CloudStack server library
The CloudStack server libraries provide a set of Java classes used The CloudStack server libraries provide a set of Java classes used
in the CloudStack management server. in the CloudStack management server.
Package: cloud-agent-scripts Package: cloud-scripts
Replaces: cloud-agent-scripts
Architecture: any Architecture: any
Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client
Description: CloudStack agent scripts Description: CloudStack scripts
This package contains a number of scripts needed for the CloudStack Agent on KVM This package contains a number of scripts needed for the CloudStack Agent and Management Server.
HyperVisor hosts. The CloudStack Agent depends on this package. Both the CloudStack Agent and Management server depend on this package
Package: cloud-core Package: cloud-core
Architecture: any Architecture: any
@ -89,7 +90,7 @@ Description: CloudStack agent libraries
Package: cloud-agent Package: cloud-agent
Architecture: any Architecture: any
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) 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)
Description: CloudStack agent Description: CloudStack agent
The CloudStack agent is in charge of managing shared computing resources in The CloudStack agent is in charge of managing shared computing resources in
a CloudStack powered cloud. Install this package if this computer a CloudStack powered cloud. Install this package if this computer

View File

@ -201,9 +201,9 @@ def build_patches ():
def build_systemvm_patch (): def build_systemvm_patch ():
if bld.env.DISTRO not in ["Windows","Mac"]: if bld.env.DISTRO not in ["Windows","Mac"]:
# patch creation # patch creation
bld.install_files ("${AGENTLIBDIR}/vms", "%s/systemvm.zip" % distdir) bld.install_files ("${COMMONLIBDIR}/vms", "%s/systemvm.zip" % distdir)
# ISO creation # ISO creation
bld.install_as("${AGENTLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir) bld.install_as("${COMMONLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir)
def build_systemvm_iso (): def build_systemvm_iso ():
if buildpremium: if buildpremium:
@ -263,7 +263,7 @@ def build_dirs_symlinks ():
def build_scripts (): def build_scripts ():
start_path = bld.path.find_dir ("scripts") start_path = bld.path.find_dir ("scripts")
bld.substitute('**',"${AGENTLIBDIR}/scripts",chmod=0755, cwd=start_path) bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path)
def build_bin_exec_dirs (): def build_bin_exec_dirs ():
#bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755) #bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
@ -404,7 +404,7 @@ def build_xml_api_description ():
def build_ovm(): def build_ovm():
start_path = bld.path.find_dir("plugins/hypervisors/ovm/scripts") start_path = bld.path.find_dir("plugins/hypervisors/ovm/scripts")
bld.substitute('**',"${AGENTLIBDIR}/scripts",chmod=0755, cwd=start_path) bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path)
def build_test(): def build_test():
start_path = bld.path.find_dir("test/scripts") start_path = bld.path.find_dir("test/scripts")

View File

@ -235,6 +235,7 @@ try: conf.check_tool("tomcat")
except Configure.ConfigurationError,e: except Configure.ConfigurationError,e:
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) 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)
conf.env.COMMONPATH = _join(conf.env.PACKAGE,"common")
conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent") conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent")
conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy") conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy")
conf.env.IPALLOCATORPATH = _join(conf.env.PACKAGE,"ipallocator") conf.env.IPALLOCATORPATH = _join(conf.env.PACKAGE,"ipallocator")
@ -277,6 +278,8 @@ in_javadir = lambda name: _join(conf.env.JAVADIR,_basename(name)) # $PREFIX/shar
in_system_javadir = lambda name: _join(conf.env.SYSTEMJAVADIR,name) # /usr/share/java in_system_javadir = lambda name: _join(conf.env.SYSTEMJAVADIR,name) # /usr/share/java
in_premiumjavadir = lambda name: _join(conf.env.PREMIUMJAVADIR,name) # $PREFIX/share/java/cloud-premium in_premiumjavadir = lambda name: _join(conf.env.PREMIUMJAVADIR,name) # $PREFIX/share/java/cloud-premium
conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env)
conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env) conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env)
conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env) conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env)
conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env) conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env)
@ -355,6 +358,8 @@ conf.check_message_2('Done','GREEN')
# log4j config and property config files require backslash escapes on Windows # log4j config and property config files require backslash escapes on Windows
conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env)
conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env) conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env)
conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env) conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env)
conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env) conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env)