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. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7eaf537d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7eaf537d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7eaf537d Branch: refs/heads/master Commit: 7eaf537d9573839f84494ed31f52ff70b2d03a7e Parents: b892ff6 Author: Wido den Hollander <w...@widodh.nl> Authored: Thu Sep 13 15:49:52 2012 +0200 Committer: Wido den Hollander <w...@widodh.nl> Committed: Thu Sep 13 16:29:01 2012 +0200 ---------------------------------------------------------------------- agent/conf/environment.properties.in | 2 +- client/tomcatconf/environment.properties.in | 2 +- cloud.spec | 32 ++++++++------------- debian/cloud-agent-scripts.config | 17 ----------- debian/cloud-agent-scripts.install | 27 ------------------ debian/cloud-agent-scripts.postinst | 29 ------------------- debian/cloud-scripts.install | 27 ++++++++++++++++++ debian/cloud-system-iso.install | 2 +- debian/control | 11 ++++--- wscript_build | 8 +++--- wscript_configure | 5 +++ 11 files changed, 57 insertions(+), 105 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/agent/conf/environment.properties.in ---------------------------------------------------------------------- diff --git a/agent/conf/environment.properties.in b/agent/conf/environment.properties.in index b077f9e..514161a 100644 --- a/agent/conf/environment.properties.in +++ b/agent/conf/environment.properties.in @@ -18,4 +18,4 @@ # management server compile-time environment parameters paths.pid=@PIDDIR@ -paths.script=@AGENTLIBDIR@ +paths.script=@COMMONLIBDIR@ http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/client/tomcatconf/environment.properties.in ---------------------------------------------------------------------- diff --git a/client/tomcatconf/environment.properties.in b/client/tomcatconf/environment.properties.in index b89e2b6..49544a1 100644 --- a/client/tomcatconf/environment.properties.in +++ b/client/tomcatconf/environment.properties.in @@ -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@ http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/cloud.spec ---------------------------------------------------------------------- diff --git a/cloud.spec b/cloud.spec index 761ff35..bd49128 100644 --- a/cloud.spec +++ b/cloud.spec @@ -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 http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/cloud-agent-scripts.config ---------------------------------------------------------------------- diff --git a/debian/cloud-agent-scripts.config b/debian/cloud-agent-scripts.config deleted file mode 100644 index 00ae6c0..0000000 --- a/debian/cloud-agent-scripts.config +++ /dev/null @@ -1,17 +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. - http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/cloud-agent-scripts.install ---------------------------------------------------------------------- diff --git a/debian/cloud-agent-scripts.install b/debian/cloud-agent-scripts.install deleted file mode 100644 index 675383d..0000000 --- a/debian/cloud-agent-scripts.install +++ /dev/null @@ -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/* http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/cloud-agent-scripts.postinst ---------------------------------------------------------------------- diff --git a/debian/cloud-agent-scripts.postinst b/debian/cloud-agent-scripts.postinst deleted file mode 100644 index bf7f2c3..0000000 --- a/debian/cloud-agent-scripts.postinst +++ /dev/null @@ -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# http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/cloud-scripts.install ---------------------------------------------------------------------- diff --git a/debian/cloud-scripts.install b/debian/cloud-scripts.install new file mode 100644 index 0000000..5e8896d --- /dev/null +++ b/debian/cloud-scripts.install @@ -0,0 +1,27 @@ +# 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/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/* http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/cloud-system-iso.install ---------------------------------------------------------------------- diff --git a/debian/cloud-system-iso.install b/debian/cloud-system-iso.install index 6caac6a..5a0b636 100644 --- a/debian/cloud-system-iso.install +++ b/debian/cloud-system-iso.install @@ -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 http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/debian/control ---------------------------------------------------------------------- diff --git a/debian/control b/debian/control index 19fe558..a264bfc 100644 --- a/debian/control +++ b/debian/control @@ -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 http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/wscript_build ---------------------------------------------------------------------- diff --git a/wscript_build b/wscript_build index 19e5fe5..42a3a2b 100644 --- a/wscript_build +++ b/wscript_build @@ -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") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7eaf537d/wscript_configure ---------------------------------------------------------------------- diff --git a/wscript_configure b/wscript_configure index 44953a8..0e90963 100644 --- a/wscript_configure +++ b/wscript_configure @@ -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)