%global axis2c_home %{_libdir}/wso2-axis2 %global axis2c_services %{_libdir}/%{name}/axis2 %global eucalibexecdir %{_libexecdir}/%{name} %global eucadatadir %{_datadir}/%{name} %global eucajavalibdir %{_datadir}/%{name} %global helperdir %{_datadir}/%{name} %global gittag 32052445 %global tar_suffix .%{gittag} %global with_axis2v14 0 %global _hardened_build 1 %global __provides_exclude_from ^%{_libdir}/%{name}/.*.so$ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Summary: Elastic Utility Computing Architecture Name: eucalyptus Version: 3.3.0 Release: 0.5.20130408git%{gittag}%{?dist} License: GPLv3 and (GPLv3 and ASL 2.0) and (GPLv3 and BSD) URL: http://www.eucalyptus.com Group: Applications/System BuildRequires: help2man BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: libvirt-devel >= 0.6 BuildRequires: libxslt-devel BuildRequires: openssl-devel BuildRequires: python-boto >= 2.1 BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: swig BuildRequires: wso2-axis2-devel BuildRequires: wso2-rampart-devel BuildRequires: wso2-wsf-cpp-devel BuildRequires: iscsi-initiator-utils BuildRequires: curl-devel BuildRequires: systemd-units BuildRequires: activemq-core BuildRequires: ant >= 1.7 BuildRequires: antlr-tool BuildRequires: apache-commons-codec BuildRequires: apache-commons-compress BuildRequires: apache-commons-fileupload BuildRequires: apache-commons-io BuildRequires: apache-commons-lang BuildRequires: axiom # BuildRequires: axis2 BuildRequires: bcel BuildRequires: bouncycastle BuildRequires: btm BuildRequires: dnsjava # Should be a json-lib Requires BuildRequires: ezmorph BuildRequires: geronimo-jta BuildRequires: geronimo-validation BuildRequires: groovy BuildRequires: guava >= 9 BuildRequires: ha-jdbc BuildRequires: hamcrest12 BuildRequires: hibernate3 >= 3.6.10-7 BuildRequires: hibernate3-ehcache >= 3.6.10-7 BuildRequires: hibernate3-entitymanager >= 3.6.10-7 BuildRequires: hibernate3-jbosscache >= 3.6.10-7 BuildRequires: hibernate3-proxool >= 3.6.10-7 BuildRequires: hibernate-jpa-2.0-api BuildRequires: jakarta-commons-httpclient BuildRequires: javamail BuildRequires: jboss-logging BuildRequires: jetty-annotations BuildRequires: jetty-client BuildRequires: jetty-continuation BuildRequires: jetty-deploy BuildRequires: jetty-http BuildRequires: jetty-io BuildRequires: jetty-jmx BuildRequires: jetty-jndi BuildRequires: jetty-plus BuildRequires: jetty-rewrite BuildRequires: jetty-security BuildRequires: jetty-server BuildRequires: jetty-servlet BuildRequires: jetty-servlets BuildRequires: jetty-util BuildRequires: jetty-webapp BuildRequires: jetty-xml BuildRequires: jgroups212 BuildRequires: jibx BuildRequires: jsch BuildRequires: json-lib BuildRequires: junit BuildRequires: log4j BuildRequires: mule-module-builders BuildRequires: mule-module-client BuildRequires: mule-module-xml BuildRequires: mule-transport-vm BuildRequires: netty31 BuildRequires: proxool BuildRequires: rhq-plugin-annotations BuildRequires: springframework-context-support BuildRequires: springframework-web BuildRequires: tomcat-servlet-3.0-api BuildRequires: velocity BuildRequires: woodstox-core BuildRequires: wsdl4j BuildRequires: wss4j >= 1.6.7-1 BuildRequires: xalan-j2 BuildRequires: xml-commons-apis BuildRequires: xml-security >= 1.5.3-1 # Should be a json-lib Requires BuildRequires: xom BuildRequires: m2crypto %if %with_axis2v14 BuildRequires: axis2v14 %endif Requires: vconfig Requires: wget Requires: rsync Requires: which Requires: libselinux-python Requires: perl(Crypt::OpenSSL::RSA) Requires: perl(Crypt::OpenSSL::Random) Requires: sudo Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd Requires(post): %{_sbindir}/euca_conf #Source0: http://downloads.eucalyptus.com/releases/eucalyptus/3.2/source/eucalyptus-3.2.1.tar.gz # git archive --format=tgz --prefix=eucalyptus-3.3.0.$( git rev-parse HEAD | cut -c1-8)/ \ # HEAD -o ~/fedpkg/eucalyptus/eucalyptus-3.3.0.$( git rev-parse HEAD | cut -c1-8).tgz Source0: eucalyptus-%{version}.%{gittag}.tgz # A version of WSDL2C.sh that respects standard classpaths Source1: euca-WSDL2C.sh Source2: eucalyptus-jarlinks.txt # XXX: these system units should go in the source tree Source3: eucalyptus-cloud.service Source4: eucalyptus-cc.service Source5: eucalyptus-nc.service # These are sources that greatly simplify CC/NC startup, # Removing dynamic config file generation and needless # guesswork about where axis2 files are. Source6: axis2.xml Source7: eucalyptus-cc.init Source8: eucalyptus-nc.init # Note that these needed to be adapted for httpd 2.4 # See http://httpd.apache.org/docs/2.4/upgrading.html Source9: httpd-cc.conf Source10: httpd-nc.conf Source11: httpd-common.conf # Axis2/Java code generation is broken with v1.6 # To regenerate this code: # 1) yum install http://arg.fedorapeople.org/axis2v14/noarch/axis2v14-1.4.1-1.fc18.noarch.rpm # 2) Set with_axis2v14 to 1 # 3) fedpkg prep # 4) pushd eucalyptus- # 5) Run configure command from: rpmspec -P ../eucalyptus.spec | grep -A 15 ^./configure # 6) for x in gatherlog cluster node; do pushd $x; make generated/stubs; popd; done # 7) find . -name '*.o' | xargs rm # 8) popd # 9) tar czf eucalyptus--generated.tgz \ # eucalyptus-/{node,cluster,gatherlog}/generated %if !%with_axis2v14 Source12: eucalyptus-%{version}%{tar_suffix}-generated.tgz %endif # Add a separate "clean" script for the CC Source13: eucalyptus-clean-cc # Add a new-style polkit rule Source14: eucalyptus-nc-libvirt.rules # Add tmpfiles config Source15: eucalyptus.tmpfiles # Systemd unit for eucalyptus-console Source16: eucalyptus-console.service # https://eucalyptus.atlassian.net/browse/EUCA-2364 Patch0: eucalyptus-jdk7.patch # https://eucalyptus.atlassian.net/browse/EUCA-3253 Patch2: eucalyptus-jetty8.patch # https://eucalyptus.atlassian.net/browse/EUCA-2993 Patch4: eucalyptus-groovy18.patch # Three separate patches to disable gwt Patch9: eucalyptus-disable-gwt.patch Patch10: eucalyptus-disable-gwt-in-buildxml.patch Patch11: eucalyptus-disable-gwt-in-makefile.patch # Make install paths configurable # https://eucalyptus.atlassian.net/browse/EUCA-3531 Patch13: eucalyptus-configurable-paths.patch # Make one repo per service of Axis2 services Patch14: eucalyptus-axis2-services.patch # Fix rootwrap path in python files Patch15: eucalyptus-rootwrap-python.patch # Fix include location for axis2 libs Patch16: eucalyptus-wso2-axis2-configure.patch # Use System.load with an absolute path for JNI lib load Patch18: eucalyptus-jni-abspath.patch # Move version file out of /etc Patch20: eucalyptus-move-version-file.patch # Support wss4j 1.6.x Patch23: eucalyptus-wss4j-support.patch # eucalyptus 3.2 patches Patch24: eucalyptus-disable-reporting.patch Patch25: eucalyptus-3.2-guava.patch # Drop backport-util-concurrent usage Patch26: eucalyptus-drop-backport-util-concurrent.patch # tgt checks are not systemd-compatible # https://eucalyptus.atlassian.net/browse/EUCA-4398 Patch27: eucalyptus-bad-tgt-check.patch # libmod_rampart should not be linked into CC, GL, or NC # https://eucalyptus.atlassian.net/browse/EUCA-4400 Patch28: eucalyptus-unlink-mod_rampart.patch # cert validation in boto 2.6.0 breaks the user console, # since the CLC has a self-signed cert Patch29: eucalyptus-no-console-cert-validation.patch # jetty.util.log.Log usage breaks in Jetty 9 Patch30: eucalyptus-jetty-logging.patch # jetty SslSelectChannelConnector was deprecated and has been removed. Patch31: eucalyptus-jetty-ssl-config.patch # import guava class from guava (!) instead of GWT Patch32: eucalyptus-braindead-gwt-import.patch # Fix classpath for JNI builds (do we still need to build these? Patch33: eucalyptus-javah-classpath.patch %description Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the common parts; you will need to install at least one of the cloud controller (cloud), cluster controller (cc), node controller (nc), storage controller (sc), or walrus packages as well. %package common-java Summary: Elastic Utility Computing Architecture - ws java stack Requires: %{name} = %{version}-%{release} Requires: jpackage-utils Requires: java >= 1:1.6.0 Requires: lvm2 Requires: activemq-core Requires: ant Requires: antlr-tool Requires: apache-commons-codec Requires: apache-commons-collections Requires: apache-commons-compress Requires: apache-commons-fileupload Requires: apache-commons-io Requires: axiom Requires: bcel Requires: bouncycastle Requires: btm Requires: dnsjava Requires: dom4j Requires: ezmorph Requires: geronimo-jms Requires: geronimo-jta Requires: groovy Requires: guava >= 9 Requires: ha-jdbc Requires: hamcrest12 Requires: hibernate3 >= 3.6.10-7 Requires: hibernate3-ehcache >= 3.6.10-7 Requires: hibernate3-entitymanager >= 3.6.10-7 Requires: hibernate3-jbosscache >= 3.6.10-7 Requires: hibernate3-proxool >= 3.6.10-7 Requires: hibernate-commons-annotations Requires: hibernate-jpa-2.0-api Requires: jakarta-commons-httpclient Requires: javamail Requires: jboss-logging Requires: jetty Requires: jgroups212 Requires: jibx Requires: jsch Requires: json-lib Requires: jsr-305 Requires: log4j Requires: mule-module-builders Requires: mule-module-client Requires: mule-module-management Requires: mule-module-spring-config Requires: mule-module-xml Requires: mule-transport-vm Requires: mx4j Requires: netty31 Requires: postgresql-jdbc Requires: proxool Requires: springframework-context-support Requires: springframework-web Requires: stax-utils Requires: tomcat-servlet-3.0-api Requires: velocity Requires: woodstox-core Requires: wsdl4j Requires: wss4j >= 1.6.7-1 Requires: xalan-j2 Requires: xml-commons-apis Requires: xml-security >= 1.5.3-1 Requires: xom Requires: %{_sbindir}/euca_conf Requires(preun): systemd-units Requires(post): systemd-units %description common-java Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the java WS stack. %package walrus Summary: Elastic Utility Computing Architecture - walrus Requires: %{name} = %{version}-%{release} Requires: %{name}-common-java = %{version}-%{release} Requires: drbd-utils Requires: lvm2 %description walrus Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains storage component for your cloud: images and buckets are handled by walrus. Typically this package is installed alongside the cloud controller. %package sc Summary: Elastic Utility Computing Architecture - storage controller Requires: %{name} = %{version}-%{release} Requires: %{name}-common-java = %{version}-%{release} Requires: rhq-plugin-annotations Requires: device-mapper-multipath Requires: lvm2 Requires: iscsi-initiator-utils Requires: scsi-target-utils %description sc Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the storage controller part of eucalyptus, which handles the elastic blocks for a given cluster. Typically you install it alongside the cluster controller. %package cloud Summary: Elastic Utility Computing Architecture - cloud controller Requires: %{name} = %{version}-%{release} Requires: %{name}-common-java%{?_isa} = %{version}-%{release} Requires: euca2ools >= 2.0 Requires: lvm2 Requires: perl(Getopt::Long) Requires: postgresql Requires: postgresql-server # For reporting web UI # Requires: dejavu-serif-fonts %description cloud Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the cloud controller part of eucalyptus. The cloud controller needs to be reachable by both the cluster controller and from the cloud clients. %package cc Summary: Elastic Utility Computing Architecture - cluster controller Requires: %{name} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: bridge-utils Requires: iproute Requires: iptables Requires: vtun Requires: dhcp Requires: httpd Requires: %{_sbindir}/euca_conf Requires: mod_wso2-axis2 # XXX: I wish this were not "devel", but some modules are being # loaded without a version Requires: wso2-axis2-devel Requires: wso2-axis2-modules Requires(preun): systemd-units Requires(post): systemd-units %description cc Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the cluster controller part of eucalyptus. It handles a group of node controllers. %package nc Summary: Elastic Utility Computing Architecture - node controller Requires: %{name} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: bridge-utils Requires: device-mapper Requires: device-mapper-multipath Requires: euca2ools >= 2.1.3 Requires: perl(Sys::Virt) Requires: perl(Time::HiRes) Requires: perl(XML::Simple) # The next six come from storage/diskutil.c, which shells out to lots of stuff. Requires: coreutils Requires: e2fsprogs Requires: file # grub2 package not available on arm %ifnarch %{arm} Requires: grub2 %endif Requires: parted Requires: util-linux Requires: curl Requires: httpd Requires: kvm Requires: iscsi-initiator-utils Requires: libvirt Requires: mod_wso2-axis2 # XXX: I wish this were not "devel", but some modules are being # loaded without a version Requires: wso2-axis2-devel Requires: wso2-axis2-modules Requires: %{_sbindir}/euca_conf Requires(preun): systemd-units Requires(post): systemd-units %description nc Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the node controller part of eucalyptus. This component handles instances. %package gl Summary: Elastic Utility Computing Architecture - log service Requires: %{name} = %{version}-%{release} Requires: httpd %description gl Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the internal log service of eucalyptus. %package admin-tools Summary: Elastic Utility Computing Architecture - admin CLI tools License: BSD Requires: %{name} = %{version}-%{release} Requires: python-eucadmin = %{version}-%{release} Requires: rsync BuildArch: noarch %description admin-tools Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains command line tools necessary for managing a Eucalyptus cluster. %package -n python-eucadmin Summary: Elastic Utility Computing Architecture - administration Python library # A patched version of python's gzip is included, so we add the Python license License: BSD and Python Requires: PyGreSQL Requires: python-boto >= 2.1 Requires: rsync BuildArch: noarch %description -n python-eucadmin Eucalyptus is a service overlay that implements elastic computing using existing resources. The goal of Eucalyptus is to allow sites with existing clusters and server infrastructure to co-host an elastic computing service that is interface-compatible with Amazon AWS. This package contains the Python library used by Eucalyptus administration tools. It is neither intended nor supported for use by any other programs. %package axis2-clients Summary: Axis2/C web service clients for Eucalyptus services License: GPLv3 Requires: wso2-axis2 Requires: %{name}-cc = %{version}-%{release} %description axis2-clients This package contains three debugging programs for testing Eucalyptus components which run as Axis2/C webservices. %package console Summary: Client user interface for Eucalyptus License: GPLv3 and BSD Group: Applications/System Requires: python-tornado Requires: python-boto >= 2.1 Requires: m2crypto %description console Client user interface for Eucalyptus. %prep %setup -q -n %{name}-%{version}.%{gittag} %if !%with_axis2v14 tar --strip-components=1 -xvzf %{SOURCE12} touch gatherlog/generated/stubs cluster/generated/stubs node/generated/stubs %endif # This patch is upstream now # %patch0 -p1 %patch2 -p1 %patch4 -p1 %patch9 -p1 # This patch is no longer needed due to build refactoring # %patch10 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 # JNI libraries appear not to be loaded in 3.3 # %patch18 -p1 %patch20 -p1 %patch23 -p1 # Reporting can be used in 3.3 # %patch24 -p1 %patch25 -p1 %patch26 -p1 %patch27 -p1 %patch28 -p1 # This patch is upstream now # %patch29 -p1 %patch30 -p1 %patch31 -p1 %patch32 -p1 %patch33 -p1 # remove classes which depend on junit # This is because junit on Fedora bundles hamcrest 1.1, which has conflicts # with hamcrest 1.2. And regardless, these should not be bundled into our # production jars. pushd clc/modules rm core/src/main/java/edu/ucsb/eucalyptus/util/XMLParserTest.java rm dns/src/main/java/com/eucalyptus/cloud/ws/tests/DNSControlTest.java rm dns/src/main/java/com/eucalyptus/cloud/ws/tests/RemoveARecordTest.java rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/CreateVolumeFromSnapshotTest.java rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/StorageTests.java rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/VolumeTest.java rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/DeleteSnapshotTest.java rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/CreateSnapshotTest.java popd # This has a compilation error, and we aren't supporting upgrades from anything older rm clc/modules/core/src/main/java/com/eucalyptus/upgrade/StandalonePersistence.java # Remove admin web UI. It uses GWT. Ick. rm -rf clc/modules/www # Do not redistribute a binary floppy image # We should have a script to reconstruct this echo -n > tools/floppy # Filter unwanted perl provides cat << \EOF > %{name}-prov #!/bin/sh %{__perl_provides} $* |\ sed -e '/perl(disconnect_iscsitarget_main.pl)/d' \ -e '/perl(connect_iscsitarget_main.pl)/d' \ -e '/perl(iscsitarget_common.pl)/d' EOF %global __perl_provides %{_builddir}/%{name}-%{version}%{?tar_suffix}/%{name}-prov chmod +x %{__perl_provides} # Filter unwanted perl requires cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} $* |\ sed -e '/perl(disconnect_iscsitarget_main.pl)/d' \ -e '/perl(connect_iscsitarget_main.pl)/d' \ -e '/perl(iscsitarget_common.pl)/d' EOF %global __perl_requires %{_builddir}/%{name}-%{version}%{?tar_suffix}/%{name}-req chmod +x %{__perl_requires} %build export CFLAGS="%{optflags}" export LDFLAGS="$RPM_LD_FLAGS" # TODO: we should use %%configure now, except that "prefix" is still broken # Also, helperdir sould be a config option, unless we decide that # it's always eucadatadir ./configure --with-axis2=%{_datadir}/axis2-* \ --with-axis2c=%{axis2c_home} \ --with-axis2c-services=%{axis2c_services} \ --with-wsdl2c-sh=%{SOURCE1} \ --enable-debug \ --prefix=/ \ --sbindir=%{_sbindir} \ --libexecdir=%{_libexecdir} \ --libdir=%{_libdir} \ --datarootdir=%{_datadir} \ --localstatedir=%{_localstatedir} \ --sysconfdir=%{_sysconfdir} \ --with-apache2-module-dir=%{_libdir}/httpd/modules \ --with-db-home=/usr \ --with-extra-version=%{release} # symlink java deps mkdir clc/lib for x in $( cat %{SOURCE2} ); do if [ ! -e $x ]; then echo "Could not find $x" exit 1 fi ln -s $x clc/lib/; done # Don't bother with git since we're using a cloud-libs tarball touch clc/.nogit # FIXME: storage/Makefile breaks with parallel make make # %{?_smp_mflags} pushd clc/eucadmin ( export PYTHONPATH=.; python gen_manpages.py ) popd # Build the Eucalyptus Console pushd console %{__python} setup.py build popd console %install make install DESTDIR=$RPM_BUILD_ROOT for x in $( cat %{SOURCE2} | grep -v junit4 ); do rm $RPM_BUILD_ROOT%{eucajavalibdir}/$( basename $x ) ln -s $x $RPM_BUILD_ROOT%{eucajavalibdir} done rm $RPM_BUILD_ROOT%{eucajavalibdir}/junit4* # Fix jar paths and replace them with symlinks mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name} for x in $RPM_BUILD_ROOT%{eucajavalibdir}/eucalyptus-*.jar; do if [ $( basename $x ) == "eucalyptus-storagecontroller-%{version}.jar" ]; then DESTFILE=%{_libdir}/%{name}/$( basename $x ) else DESTFILE=%{_javadir}/%{name}/$( basename $x ) fi mv $x $RPM_BUILD_ROOT$DESTFILE ln -s $DESTFILE $RPM_BUILD_ROOT/%{eucajavalibdir}/ done # Link jars not needed at build time for jar in mule/mule-module-management \ postgresql-jdbc \ avalon-framework-impl \ avalon-logkit \ stax-utils \ mx4j/mx4j-impl \ mx4j/mx4j \ mx4j/mx4j-jmx \ mx4j/mx4j-remote \ mx4j/mx4j-tools; do ln -s /usr/share/java/${jar}.jar $RPM_BUILD_ROOT%{eucajavalibdir} done pushd clc/eucadmin/man mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 cp -p * $RPM_BUILD_ROOT/%{_mandir}/man1 popd sed -i -e 's#.*EUCALYPTUS=.*#EUCALYPTUS="/"#' \ -e 's#.*HYPERVISOR=.*#HYPERVISOR="kvm"#' \ -e 's#.*INSTANCE_PATH=.*#INSTANCE_PATH="/var/lib/%{name}/instances"#' \ -e 's#.*VNET_BRIDGE=.*#VNET_BRIDGE="br0"#' \ -e 's#.*USE_VIRTIO_DISK=.*#USE_VIRTIO_DISK="1"#' \ -e 's#.*USE_VIRTIO_ROOT=.*#USE_VIRTIO_ROOT="1"#' \ -e 's#.*VNET_PUBINTERFACE=.*#VNET_PUBINTERFACE="em1"#' \ -e 's#.*VNET_PRIVINTERFACE=.*#VNET_PRIVINTERFACE="em1"#' \ $RPM_BUILD_ROOT/etc/%{name}/eucalyptus.conf # Move init scripts into sbindir and call them from systemd mv $RPM_BUILD_ROOT/etc/init.d/eucalyptus-cloud \ $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cloud.init rm -rf $RPM_BUILD_ROOT/etc/init.d cp -p %{SOURCE7} $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cc.init cp -p %{SOURCE8} $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-nc.init sed -i -e "s#@LIBDIR@#%{_libdir}#" $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cc.init sed -i -e "s#@LIBDIR@#%{_libdir}#" $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-nc.init cp -p %{SOURCE13} $RPM_BUILD_ROOT/%{_sbindir}/eucalyptus-clean-cc # Make a server root for apache mkdir -p $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/ cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-cc.conf cp -p %{SOURCE10} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-nc.conf cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-common.conf ln -s %{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/%{name}/httpd/modules rm $RPM_BUILD_ROOT/etc/%{name}/httpd.conf sed -i -e "s#@EUCAAXIS2HOME@#%{axis2c_services}#" $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-nc.conf sed -i -e "s#@EUCAAXIS2HOME@#%{axis2c_services}#" $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-cc.conf # Create the directories where components store their data mkdir -p $RPM_BUILD_ROOT/var/lib/%{name} touch $RPM_BUILD_ROOT/var/lib/%{name}/services for dir in bukkits CC db keys ldap upgrade vmware volumes webapps; do install -d -m 0700 $RPM_BUILD_ROOT/var/lib/%{name}/$dir done install -d -m 0771 $RPM_BUILD_ROOT/var/lib/%{name}/instances # Add PolicyKit config on systems that support it mkdir -p $RPM_BUILD_ROOT/usr/share/polkit-1/rules.d/ cp -p %{SOURCE14} $RPM_BUILD_ROOT/usr/share/polkit-1/rules.d/eucalyptus-nc-libvirt.rules # Put udev rules in the right place mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d cp -p $RPM_BUILD_ROOT/usr/share/eucalyptus/udev/rules.d/12-dm-permissions.rules $RPM_BUILD_ROOT/etc/udev/rules.d/12-dm-permissions.rules cp -p $RPM_BUILD_ROOT/usr/share/eucalyptus/udev/rules.d/65-drbd-owner.rules $RPM_BUILD_ROOT/etc/udev/rules.d/65-drbd-owner.rules rm -rf $RPM_BUILD_ROOT/usr/share/eucalyptus/udev # Install systemd service files mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -p -m 644 %{SOURCE3} \ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-cloud.service install -p -m 644 %{SOURCE4} \ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-cc.service install -p -m 644 %{SOURCE5} \ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-nc.service install -p -m 644 %{SOURCE16} \ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-console.service # Copy axis2.xml into /etc for now, and symlink it install -m 644 %{SOURCE6} \ $RPM_BUILD_ROOT/etc/%{name}/axis2.xml # add a mess of symlinks ln -s /etc/%{name}/axis2.xml $RPM_BUILD_ROOT%{axis2c_services}/cc/ ln -s /etc/%{name}/axis2.xml $RPM_BUILD_ROOT%{axis2c_services}/nc/ ln -s %{_libdir}/wso2-axis2/modules $RPM_BUILD_ROOT%{axis2c_services}/cc/ ln -s %{_libdir}/wso2-axis2/modules $RPM_BUILD_ROOT%{axis2c_services}/nc/ ln -s %{_libdir} $RPM_BUILD_ROOT%{axis2c_services}/cc/lib ln -s %{_libdir} $RPM_BUILD_ROOT%{axis2c_services}/nc/lib ln -s %{axis2c_services}/gl/services/EucalyptusGL $RPM_BUILD_ROOT%{axis2c_services}/cc/services ln -s %{axis2c_services}/gl/services/EucalyptusGL $RPM_BUILD_ROOT%{axis2c_services}/nc/services # Install axis2 test client files install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -m 755 gatherlog/GLclient $RPM_BUILD_ROOT%{_bindir} install -m 755 node/NCclient $RPM_BUILD_ROOT%{_bindir} install -m 755 cluster/CCclient_full $RPM_BUILD_ROOT%{_bindir}/CCclient # Fix some file permissions found by rpmlint chmod -x $RPM_BUILD_ROOT/var/lib/%{name}/keys/nc-client-policy.xml chmod -x $RPM_BUILD_ROOT/var/lib/%{name}/keys/cc-client-policy.xml chmod -x $RPM_BUILD_ROOT%{axis2c_services}/cc/services/EucalyptusCC/eucalyptus_cc.wsdl chmod -x $RPM_BUILD_ROOT%{axis2c_services}/cc/services/EucalyptusCC/services.xml chmod -x $RPM_BUILD_ROOT%{axis2c_services}/gl/services/EucalyptusGL/eucalyptus_gl.wsdl chmod -x $RPM_BUILD_ROOT%{axis2c_services}/gl/services/EucalyptusGL/services.xml chmod -x $RPM_BUILD_ROOT%{axis2c_services}/nc/services/EucalyptusNC/services.xml chmod -x $RPM_BUILD_ROOT%{_datadir}/eucalyptus/floppy # This file is no longer needed, and was not even ported from MySQL to PostGreSQL rm $RPM_BUILD_ROOT%{python_sitelib}/eucadmin/local.py* # This is not the ideal way to set kernel parameters. We'll deal with this # via documentation for now. rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/init.d/01_pg_kernel_params # Move cloud.d directories which aren't config files. We need symlinks # for now, though. mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/scripts \ $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts ln -s %{_libexecdir}/%{name}/scripts \ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/ # doc fixups mv $RPM_BUILD_ROOT%{_docdir}/%{name} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/drbd.conf.example \ $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ # install tmpfiles config install -d -m 755 $RPM_BUILD_ROOT/etc/tmpfiles.d install -m 0644 %{SOURCE15} $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name} # Install Eucalyptus Console pushd console %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # Install sysconfig file install -d $RPM_BUILD_ROOT/etc/sysconfig install -m 644 ../tools/eucalyptus-console.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/eucalyptus-console echo " [paths] staticpath: /usr/share/eucalyptus-console/static " >> $RPM_BUILD_ROOT/etc/eucalyptus-console/console.ini # Enable SSL support by default # NOTE: The certificate and key are not packaged, but will be generated # on the first run of the service. # # Fixes EUCA-3901 sed -i -e 's@^#sslcert:.*$@sslcert: /etc/eucalyptus-console/console.crt@' \ -e 's@^#sslkey:.*$@sslkey: /etc/eucalyptus-console/console.key@' \ $RPM_BUILD_ROOT/etc/eucalyptus-console/console.ini # Create directory for pid file install -d $RPM_BUILD_ROOT/var/run/eucalyptus-console popd console %files %doc LICENSE README CHANGELOG %doc tools/multipath.conf.example tools/iscsid.conf.example # Eucalyptus initialization fails if the eucalyptus user # cannot write this file. %config(noreplace) %attr(-,eucalyptus,eucalyptus) /etc/%{name}/eucalyptus.conf %{_datadir}/%{name}/eucalyptus-version %config(noreplace) /etc/%{name}/axis2.xml %dir /etc/%{name}/httpd %dir /etc/%{name}/httpd/conf %config(noreplace) /etc/%{name}/httpd/conf/httpd-common.conf %config /etc/tmpfiles.d/%{name} /etc/%{name}/httpd/modules # Needed for multipath on NCs and SAN-enabled SCs /etc/udev/rules.d/12-dm-permissions.rules /etc/udev/rules.d/65-drbd-owner.rules %attr(-,root,root) %dir %{eucalibexecdir} %attr(4750,root,eucalyptus) %{eucalibexecdir}/euca_mountwrap %attr(4750,root,eucalyptus) %{eucalibexecdir}/euca_rootwrap %dir %{eucadatadir} %{_sbindir}/euca_sync_key %{_sbindir}/euca-generate-fault # helperdir is either eucadatadir or eucalibexecdir %{helperdir}/add_key.pl %{helperdir}/connect_iscsitarget.pl %{helperdir}/connect_iscsitarget_main.pl %{helperdir}/create-loop-devices %{helperdir}/disconnect_iscsitarget.pl %{helperdir}/disconnect_iscsitarget_main.pl %{helperdir}/euca_ipt %{helperdir}/euca_upgrade %{helperdir}/floppy %{helperdir}/faults/ %{helperdir}/get_iscsitarget.pl %{helperdir}/iscsitarget_common.pl %{helperdir}/populate_arp.pl %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name} %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/db %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/keys %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/upgrade # Can this file go into a single-component package? What uses it? /var/lib/%{name}/keys/cc-client-policy.xml %attr(-,eucalyptus,eucalyptus) %dir /var/log/%{name} %attr(-,eucalyptus,eucalyptus) %dir /var/run/%{name} %files common-java %{_unitdir}/eucalyptus-cloud.service %{_libexecdir}/%{name}/eucalyptus-cloud.init # cloud.d contains random stuff used by every Java component. Most of it # probably belongs in /usr/share, but moving it will be painful. %{_sysconfdir}/%{name}/cloud.d/ %{_libexecdir}/%{name}/scripts/ %{_sbindir}/eucalyptus-cloud %{eucajavalibdir}/*jar* %{_javadir}/%{name}/*jar* %{_libdir}/%{name}/eucalyptus-storagecontroller-%{version}.jar %ghost /var/lib/%{name}/services %attr(-,eucalyptus,eucalyptus) /var/lib/%{name}/webapps/ %files cloud %{_sbindir}/euca-lictool %{eucadatadir}/lic_default %{eucadatadir}/lic_template %files walrus %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/bukkits %doc %{_docdir}/%{name}-%{version}/drbd.conf.example %files sc %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/volumes %{helperdir}/connect_iscsitarget_sc.pl %{helperdir}/disconnect_iscsitarget_sc.pl %{_libdir}/eucalyptus/libdascontrol.so %{_libdir}/eucalyptus/liblvm2control.so %files cc %{_unitdir}/eucalyptus-cc.service %{_libexecdir}/%{name}/eucalyptus-cc.init %{axis2c_services}/cc %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/CC %config(noreplace) /etc/%{name}/httpd/conf/httpd-cc.conf %{_datadir}/%{name}/vtunall.conf.template %attr(0755,root,root) %{_libexecdir}/eucalyptus/shutdownCC %{_sbindir}/eucalyptus-clean-cc %{helperdir}/dynserv.pl %{helperdir}/getstats_net.pl # Is this used? /var/lib/%{name}/keys/nc-client-policy.xml %files nc %config(noreplace) /etc/%{name}/libvirt.xsl %dir /etc/%{name}/nc-hooks /etc/%{name}/nc-hooks/example.sh %{_unitdir}/eucalyptus-nc.service %{_libexecdir}/%{name}/eucalyptus-nc.init %{axis2c_services}/nc %attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/instances %config(noreplace) /etc/%{name}/httpd/conf/httpd-nc.conf %{_sbindir}/euca_test_nc %{helperdir}/detach.pl %{helperdir}/gen_kvm_libvirt_xml %{helperdir}/gen_libvirt_xml %{helperdir}/getstats.pl %{helperdir}/get_sys_info %{helperdir}/get_xen_info %{helperdir}/partition2disk /usr/share/polkit-1/rules.d/eucalyptus-nc-libvirt.rules %{_docdir}/%{name}-%{version}/libvirt* %files gl %{axis2c_services}/gl # NB: the vmware tools packaged here only work against Eucalyptus # Enterprise plugins, but the client and server may be different # systems, so it's reasonable to package these commands here. %files admin-tools %{_sbindir}/euca_conf %{_sbindir}/euca-configure-vmware %{_sbindir}/euca-deregister-arbitrator %{_sbindir}/euca-deregister-cloud %{_sbindir}/euca-deregister-cluster %{_sbindir}/euca-deregister-storage-controller %{_sbindir}/euca-deregister-vmware-broker %{_sbindir}/euca-deregister-walrus %{_sbindir}/euca-describe-arbitrators %{_sbindir}/euca-describe-clouds %{_sbindir}/euca-describe-clusters %{_sbindir}/euca-describe-components %{_sbindir}/euca-describe-nodes %{_sbindir}/euca-describe-properties %{_sbindir}/euca-describe-services %{_sbindir}/euca-describe-storage-controllers %{_sbindir}/euca-describe-vmware-brokers %{_sbindir}/euca-describe-walruses %{_sbindir}/euca-get-credentials %{_sbindir}/euca-modify-cluster %{_sbindir}/euca-modify-property %{_sbindir}/euca-modify-service %{_sbindir}/euca-modify-storage-controller %{_sbindir}/euca-modify-walrus %{_sbindir}/euca-register-arbitrator %{_sbindir}/euca-register-cloud %{_sbindir}/euca-register-cluster %{_sbindir}/euca-register-storage-controller %{_sbindir}/euca-register-vmware-broker %{_sbindir}/euca-register-walrus %{_sbindir}/eureport-generate-report %{_sbindir}/eureport-export-data %{_sbindir}/eureport-delete-data %{_sbindir}/euca-describe-instance-types %{_sbindir}/euca-migrate-instances %{_mandir}/man1/* %files -n python-eucadmin %{python_sitelib}/eucadmin* %files console %defattr(-,root,root,-) %doc console/README.md %{python_sitelib}/esapi* %{python_sitelib}/eucaconsole* %{python_sitelib}/Eucalyptus_Management_Console*.egg-info %{_bindir}/euca-console-server %{_unitdir}/eucalyptus-console.service %attr(-,eucaconsole,eucaconsole) %{_datadir}/eucalyptus-console %attr(-,eucaconsole,eucaconsole) %dir /etc/eucalyptus-console %attr(-,eucaconsole,eucaconsole) %config /etc/eucalyptus-console/console.ini %attr(-,eucaconsole,eucaconsole) %dir /var/run/eucalyptus-console %config /etc/sysconfig/eucalyptus-console %files axis2-clients %{_bindir}/NCclient %{_bindir}/CCclient %{_bindir}/GLclient %pre getent group eucalyptus >/dev/null || groupadd -r eucalyptus ## FIXME: Make QA (and Eucalyptus proper?) work with /sbin/nologin as the shell [RT:2092] #getent passwd eucalyptus >/dev/null || \ # useradd -r -g eucalyptus -d /var/lib/%{name} -s /sbin/nologin \ # -c 'Eucalyptus' eucalyptus getent passwd eucalyptus >/dev/null || \ useradd -r -g eucalyptus -d /var/lib/%{name} \ -c 'Eucalyptus' eucalyptus %pre console getent group eucaconsole >/dev/null || groupadd -r eucaconsole getent passwd eucaconsole >/dev/null || \ useradd -r -g eucaconsole -d /etc/eucalyptus-console \ -c 'Eucalyptus Console' eucaconsole %post udevadm control --reload-rules %post common-java %systemd_post eucalyptus-cloud.service %post cc %systemd_post eucalyptus-cc.service %post nc usermod -a -G kvm eucalyptus %systemd_post eucalyptus-nc.service %post console %systemd_post eucalyptus-console.service %preun common-java %systemd_preun eucalyptus-cloud.service %preun cc %systemd_preun eucalyptus-cc.service %preun nc %systemd_preun eucalyptus-nc.service %preun console %systemd_preun eucalyptus-console.service %postun # Reload udev rules on uninstall if [ "$1" = "0" ]; then /sbin/service udev-post reload || : fi %changelog * Sat Aug 10 2013 Matt Spaulding - 3.3.0-0.5.20130408git32052445 - Remove grub2 requirement to fix arm build * Tue Aug 06 2013 Dennis Gilmore - 3.3.0-0.4.20130408git32052445 - fix path to wss4j.jar * Sat Aug 03 2013 Fedora Release Engineering - 3.3.0-0.3.20130408git32052445 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jul 17 2013 Petr Pisar - 3.3.0-0.2.20130408git32052445 - Perl 5.18 rebuild * Mon Apr 8 2013 Andy Grimm - 3.3.0-0.1.20130408git32052445 - Update to 3.3.0 snapshot * Fri Mar 1 2013 Andy Grimm - 3.2.1-3 - Fix build issues caused by Jetty 9 update * Thu Feb 28 2013 Andy Grimm - 3.2.1-2 - Add explicit BuildRequires/Requires for jboss-logging * Thu Feb 28 2013 Andy Grimm - 3.2.1-1 - Update to 3.2.1 (CVE-2012-4066) * Wed Feb 13 2013 Fedora Release Engineering - 3.2.0-0.6.20121210git5ab72572 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Thu Dec 13 2012 Andy Grimm - 3.2.0-0.5.20121210git5ab7257 - Remove backport-util-concurrent - Add systemd unit for eucalyptus-console - Fix cert validation error in eucalyptus-console - Fix a typo in eucalyptus-clean-cc script * Wed Dec 12 2012 Andy Grimm - 3.2.0-0.4.20121210git5ab7257 - Use newer wss4j / xml-security / hibernate in F18 - Fix systemd macro usage * Wed Dec 12 2012 Andy Grimm - 3.2.0-0.3.20121210git5ab7257 - Work around incorrect tgt status checks - Define environment variables in eucalyptus-clean-cc script - Remove libmod_rampart link from axis2 service modules * Tue Dec 11 2012 Andy Grimm - 3.2.0-0.2.20121210git5ab7257 - Add compatibility for F18 * Mon Dec 10 2012 Andy Grimm - 3.2.0-0.1.20121210git5ab7257 - Bump to 3.2.0 * Thu Nov 08 2012 Marek Goldmann - 3.1.2-0.7.20120917gitb8c109b4 - Add support for new Maven compat version resolver (hibernate3) * Tue Oct 09 2012 Andy Grimm - 3.1.2-0.6.20120917gitb8c109b4 - First official Fedora build