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
paths.pid=@PIDDIR@
paths.script=@AGENTLIBDIR@
paths.script=@COMMONLIBDIR@

View File

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

View File

@ -81,8 +81,8 @@ Group: System Environment/Libraries
%description server
The CloudStack server libraries provide a set of Java classes for CloudStack.
%package agent-scripts
Summary: CloudStack agent scripts
%package scripts
Summary: CloudStack scripts
# FIXME nuke the archdependency
Requires: python
Requires: bash
@ -95,13 +95,10 @@ Requires: nfs-utils
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
AutoReqProv: no
Obsoletes: vmops-agent-scripts < %{version}-%{release}
Obsoletes: cloud-agent-scripts < %{version}-%{release}
Group: System Environment/Libraries
%description agent-scripts
The CloudStack agent is in charge of managing shared computing resources in
a KVM-powered cloud. Install this package if this computer
will participate in your cloud -- this is a requirement for the CloudStack KVM
agent.
%description scripts
This package contains common scripts used by the Agent and Management server
%package python
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}-client-ui = %{version}
Requires: %{name}-setup = %{version}
# reqs the agent-scripts package because of xenserver within the management server
Requires: %{name}-agent-scripts = %{version}
Requires: %{name}-scripts = %{version}
Requires: %{name}-python = %{version}
Requires: %{name}-aws-api = %{version}
# for consoleproxy
@ -209,7 +205,7 @@ Obsoletes: cloud-premium-agent < %{version}-%{release}
Requires: java >= 1.6.0
Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}
Requires: %{name}-agent-libs = %{version}
Requires: %{name}-agent-scripts = %{version}
Requires: %{name}-scripts = %{version}
Requires: python
Requires: %{name}-python = %{version}
Requires: commons-httpclient
@ -376,10 +372,6 @@ else
/sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true
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
if [ "$1" == "0" ] ; then
/sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true
@ -454,12 +446,12 @@ fi
%{_javadir}/%{name}-plugin-nicira-nvp.jar
%config(noreplace) %{_sysconfdir}/%{name}/server/*
%files agent-scripts
%files scripts
%defattr(-,root,root,-)
%{_libdir}/%{name}/agent/scripts/*
# maintain the following list in sync with files agent-scripts
%{_libdir}/%{name}/agent/vms/systemvm.zip
%{_libdir}/%{name}/agent/vms/systemvm.iso
%{_libdir}/%{name}/common/scripts/*
# maintain the following list in sync with files scripts
%{_libdir}/%{name}/common/vms/systemvm.zip
%{_libdir}/%{name}/common/vms/systemvm.iso
%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
# 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
# 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
in the CloudStack management server.
Package: cloud-agent-scripts
Package: cloud-scripts
Replaces: cloud-agent-scripts
Architecture: any
Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client
Description: CloudStack agent scripts
This package contains a number of scripts needed for the CloudStack Agent on KVM
HyperVisor hosts. The CloudStack Agent depends on this package.
Description: CloudStack scripts
This package contains a number of scripts needed for the CloudStack Agent and Management Server.
Both the CloudStack Agent and Management server depend on this package
Package: cloud-core
Architecture: any
@ -89,7 +90,7 @@ Description: CloudStack agent libraries
Package: cloud-agent
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
The CloudStack agent is in charge of managing shared computing resources in
a CloudStack powered cloud. Install this package if this computer

View File

@ -201,9 +201,9 @@ def build_patches ():
def build_systemvm_patch ():
if bld.env.DISTRO not in ["Windows","Mac"]:
# patch creation
bld.install_files ("${AGENTLIBDIR}/vms", "%s/systemvm.zip" % distdir)
bld.install_files ("${COMMONLIBDIR}/vms", "%s/systemvm.zip" % distdir)
# 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 ():
if buildpremium:
@ -263,7 +263,7 @@ def build_dirs_symlinks ():
def build_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 ():
#bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
@ -404,7 +404,7 @@ def build_xml_api_description ():
def build_ovm():
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():
start_path = bld.path.find_dir("test/scripts")

View File

@ -235,6 +235,7 @@ try: conf.check_tool("tomcat")
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.env.COMMONPATH = _join(conf.env.PACKAGE,"common")
conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent")
conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy")
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_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.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${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
conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),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.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env)