Blame aeolus-configserver.spec

Joe VLcek 225df58
#
Joe VLcek 225df58
#   Copyright [2011] [Red Hat, Inc.]
Joe VLcek 225df58
#
Joe VLcek 225df58
#   Licensed under the Apache License, Version 2.0 (the "License");
Joe VLcek 225df58
#   you may not use this file except in compliance with the License.
Joe VLcek 225df58
#   You may obtain a copy of the License at
Joe VLcek 225df58
#
Joe VLcek 225df58
#   http://www.apache.org/licenses/LICENSE-2.0
Joe VLcek 225df58
#
Joe VLcek 225df58
#   Unless required by applicable law or agreed to in writing, software
Joe VLcek 225df58
#   distributed under the License is distributed on an "AS IS" BASIS,
Joe VLcek 225df58
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Joe VLcek 225df58
#   See the License for the specific language governing permissions and
Joe VLcek 225df58
#  limitations under the License.
Joe VLcek 225df58
#
Joe VLcek 810e080
%global app_root %{_datadir}/%{name}
Joe VLcek 225df58
Joe VLcek 225df58
Name:       aeolus-configserver
Joe VLcek 810e080
Version:    0.4.8
Joe VLcek a18181f
Release:    1%{?dist}
Joe VLcek 225df58
Summary:    The Aeolus Config Server
Joe VLcek 225df58
Joe VLcek 225df58
Group:      Applications/System
Joe VLcek 225df58
License:    ASL 2.0
Joe VLcek 225df58
URL:        http://aeolusproject.org
Joe VLcek 810e080
Source0:    https://github.com/aeolusproject/audrey/tarball/1.0/aeolus-configserver-%{version}.tgz
Joe VLcek 810e080
Joe VLcek 810e080
BuildRequires:   rubygems
Joe VLcek 810e080
%if 0%{?fedora} >= 17
Joe VLcek 810e080
BuildRequires:   ruby(abi) >= 1.9
Joe VLcek 810e080
%else
Joe VLcek 810e080
BuildRequires:   ruby(abi) = 1.8
Joe VLcek 810e080
%endif
Joe VLcek 225df58
BuildRequires:   ruby-devel
Joe VLcek 225df58
BuildRequires:   help2man
Joe VLcek 225df58
Joe VLcek 225df58
Requires:        httpd
Joe VLcek 225df58
Requires:        mod_ssl
Joe VLcek 225df58
Requires:        puppet
Joe VLcek 810e080
Requires:        rubygems
Joe VLcek 810e080
%if 0%{?fedora} >= 17
Joe VLcek 810e080
Requires:        ruby(abi) >= 1.9
Joe VLcek 810e080
%else
Joe VLcek 810e080
Requires:        ruby(abi) = 1.8
Joe VLcek 810e080
%endif
Joe VLcek 810e080
Requires:        rubygem(nokogiri)
Joe VLcek 225df58
Requires:        rubygem(sinatra)
Joe VLcek 225df58
Requires:        rubygem(thin)
Joe VLcek 225df58
Requires:        rubygem(archive-tar-minitar)
Joe VLcek 225df58
Requires:        rubygem(activesupport)
Joe VLcek 225df58
Requires:        rubygem(oauth)
Joe VLcek 225df58
Requires(post):  chkconfig
Joe VLcek 225df58
Requires(preun): chkconfig
Joe VLcek 225df58
Requires(preun): initscripts
Joe VLcek 225df58
Joe VLcek 225df58
BuildArch:      noarch
Joe VLcek 225df58
Joe VLcek 225df58
%description
Joe VLcek 225df58
The Aeolus Config Server, a service for storing and retrieving VM
Joe VLcek 225df58
configurations.
Joe VLcek 225df58
Joe VLcek 225df58
%prep
Joe VLcek 225df58
%setup -q
Joe VLcek 225df58
Joe VLcek 225df58
%build
Joe VLcek 225df58
Joe VLcek 225df58
%install
Joe VLcek 225df58
rm -rf %{buildroot}
Joe VLcek 225df58
Joe VLcek 225df58
##
Joe VLcek 225df58
# aeolus-configserver
Joe VLcek 225df58
##
Joe VLcek 225df58
mkdir -p %{buildroot}%{app_root}/configure
Joe VLcek 810e080
mkdir -p %{buildroot}%{app_root}/examples
Joe VLcek 225df58
mkdir -p %{buildroot}%{_bindir}
Joe VLcek 225df58
mkdir -p %{buildroot}%{_initrddir}
Joe VLcek 225df58
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
Joe VLcek 225df58
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
Joe VLcek 225df58
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
Joe VLcek 225df58
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/schema
Joe VLcek 225df58
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
Joe VLcek 225df58
mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
Joe VLcek 225df58
mkdir -p %{buildroot}%{_mandir}/man8
Joe VLcek 225df58
Joe VLcek 225df58
# copy over all of the src directory...
Joe VLcek 225df58
install -d %{buildroot}/%{app_root}/lib/model
Joe VLcek 225df58
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    src/config.ru \
Joe VLcek a18181f
    src/common_config.rb \
Joe VLcek 225df58
    src/configserver.rb %{buildroot}/%{app_root}
Joe VLcek 225df58
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    src/lib/application_helper.rb \
Joe VLcek 225df58
    src/lib/config_handler.rb \
Joe VLcek 225df58
    src/lib/model.rb %{buildroot}/%{app_root}/lib
Joe VLcek 225df58
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    src/lib/model/base.rb \
Joe VLcek 225df58
    src/lib/model/consumer.rb \
Joe VLcek 225df58
    src/lib/model/deployable.rb \
Joe VLcek 225df58
    src/lib/model/instance.rb %{buildroot}/%{app_root}/lib/model
Joe VLcek 225df58
Joe VLcek 225df58
# copy over init scripts and configs
Joe VLcek 225df58
install conf/%{name} %{buildroot}/%{_initrddir}
Joe VLcek 225df58
install -m 0644 conf/%{name}.sysconf \
Joe VLcek 225df58
    %{buildroot}%{_sysconfdir}/sysconfig/%{name}
Joe VLcek 225df58
install -m 0644 conf/%{name}-proxy.sysconf \
Joe VLcek 225df58
    %{buildroot}%{_sysconfdir}/sysconfig/%{name}-proxy
Joe VLcek 225df58
install -m 0644 conf/%{name}.logrotate \
Joe VLcek 225df58
    %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
Joe VLcek 225df58
Joe VLcek 225df58
# copy relaxNG schema files
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    schema/assembly.rng \
Joe VLcek 225df58
    schema/deployable.rng \
Joe VLcek 225df58
    schema/instance-config.rng \
Joe VLcek 225df58
    schema/template.rng %{buildroot}%{_localstatedir}/lib/%{name}/schema/
Joe VLcek 225df58
Joe VLcek 225df58
# copy over all puppet scripts and bin files
Joe VLcek 225df58
install -d %{buildroot}%{app_root}/configure/puppet/modules/apache/manifests
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    configure/puppet/modules/apache/manifests/init.pp \
Joe VLcek 225df58
    %{buildroot}%{app_root}/configure/puppet/modules/apache/manifests
Joe VLcek 225df58
Joe VLcek 225df58
install -d %{buildroot}%{app_root}/configure/puppet/modules/apache/templates
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    configure/puppet/modules/apache/templates/vhost443.erb \
Joe VLcek 225df58
    configure/puppet/modules/apache/templates/vhost80.erb \
Joe VLcek 225df58
    configure/puppet/modules/apache/templates/vhost.erb \
Joe VLcek 225df58
    %{buildroot}%{app_root}/configure/puppet/modules/apache/templates
Joe VLcek 225df58
Joe VLcek 225df58
install -d \
Joe VLcek 225df58
    %{buildroot}%{app_root}/configure/puppet/modules/configserver/manifests
Joe VLcek 225df58
install -m 0644 \
Joe VLcek 225df58
    configure/puppet/modules/configserver/manifests/init.pp \
Joe VLcek 225df58
    %{buildroot}%{app_root}/configure/puppet/modules/configserver/manifests
Joe VLcek 225df58
Joe VLcek 225df58
install configure/bin/config_httpd.sh \
Joe VLcek 225df58
    %{buildroot}%{_bindir}/aeolus-configserver-setup
Joe VLcek 225df58
Joe VLcek 810e080
install examples/katello-register.xml \
Joe VLcek 810e080
    %{buildroot}%{app_root}/examples
Joe VLcek 810e080
Joe VLcek 225df58
# copy the generated man page from the buildroot
Joe VLcek 225df58
install -m 0644 aeolus-configserver-setup.8 %{buildroot}%{_mandir}/man8
Joe VLcek 225df58
Joe VLcek 225df58
%clean
Joe VLcek 225df58
rm -rf %{buildroot}
Joe VLcek 225df58
Joe VLcek 225df58
%pre
Joe VLcek 225df58
# Ensure the aeolus user/group is created (same IDs as in aeolus-conductor)
Joe VLcek 225df58
getent group aeolus >/dev/null || \
Joe VLcek 225df58
    groupadd -g 180 -r aeolus 2>/dev/null || :
Joe VLcek 225df58
getent passwd aeolus >/dev/null || \
Joe VLcek 225df58
    useradd -u 180 -g aeolus -c "aeolus" \
Joe VLcek 225df58
    -s /sbin/nologin -r -d /var/aeolus aeolus 2> /dev/null || :
Joe VLcek 225df58
Joe VLcek 225df58
%post
Joe VLcek 225df58
# Register the service
Joe VLcek 810e080
/sbin/chkconfig --add %{name}
Joe VLcek 810e080
/sbin/chkconfig %{name} on
Joe VLcek 810e080
/sbin/chkconfig httpd on
Joe VLcek 225df58
Joe VLcek 225df58
%preun
Joe VLcek 810e080
# cleanup the service before package deletion
Joe VLcek 225df58
if [ $1 = 0 ]; then
Joe VLcek 810e080
  /sbin/service %{name} stop > /dev/null 2>&1
Joe VLcek 810e080
  /sbin/chkconfig --del %{name}
Joe VLcek 225df58
fi
Joe VLcek 225df58
Joe VLcek 225df58
%files
Joe VLcek 225df58
%defattr(-,root,root,-)
Joe VLcek 225df58
%{_bindir}/aeolus-configserver-setup
Joe VLcek 225df58
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-proxy
Joe VLcek 225df58
%{app_root}
Joe VLcek 225df58
%dir %{_sysconfdir}/%{name}
Joe VLcek 225df58
%{_initrddir}/%{name}
Joe VLcek 225df58
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
Joe VLcek 225df58
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
Joe VLcek 225df58
%attr(-, aeolus, aeolus) %{_localstatedir}/lib/%{name}
Joe VLcek 225df58
%ghost %attr(-, aeolus, aeolus) %{_localstatedir}/run/%{name}
Joe VLcek 225df58
%attr(-, aeolus, aeolus) %{_localstatedir}/log/%{name}
Joe VLcek 225df58
%{_mandir}/man8/aeolus-configserver-setup.8*
Joe VLcek 225df58
%doc COPYING
Joe VLcek 225df58
Joe VLcek 225df58
%changelog
Joe VLcek 810e080
* Thu Apr 12 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.8-1
Joe VLcek 810e080
- Fixes provided by jlaska@redhat.com for BZ 812107
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=812107
Joe VLcek 810e080
- Update the comment in preun to avoid BZ 803864
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=803864
Joe VLcek 810e080
* Tue Apr 10 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.7-1
Joe VLcek 810e080
- Updated deployable XML file for Katello registration
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=807473
Joe VLcek 810e080
* Wed Mar 28 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.6-2
Joe VLcek 810e080
- Added facility to host example deployable XML files
Joe VLcek 810e080
- Added first example deployable XML file for Katello registration
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=807473
Joe VLcek 810e080
* Mon Mar 05 2012 Dan Radez <dradez@redhat.com> 0.4.6-1
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=798787
Joe VLcek 810e080
- chkconfig on for http and configserver
Joe VLcek 810e080
* Thu Feb 09 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.6-0
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=788996
Joe VLcek 810e080
* Mon Jan 16 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.5-2
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=781459
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=768433
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=773036
Joe VLcek 810e080
* Tue Jan 03 2012 Dan Radez <dradez@redhat.com> 0.4.5-1
Joe VLcek 810e080
- https://bugzilla.redhat.com/show_bug.cgi?id=769656
Joe VLcek a18181f
* Fri Dec 16 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.4-2
Joe VLcek a18181f
- https://bugzilla.redhat.com/show_bug.cgi?id=760377
Joe VLcek a18181f
- https://bugzilla.redhat.com/show_bug.cgi?id=768425
Joe VLcek a18181f
* Mon Dec 12 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.3-2
Joe VLcek a18181f
- Fix 500 on audrey-agent HTTP PUT of partial params
Joe VLcek a18181f
- https://bugzilla.redhat.com/show_bug.cgi?id=766967
Joe VLcek a18181f
* Fri Dec 09 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.3-1
Joe VLcek a18181f
- Fix 500 on HTTP DELETE of deployment data
Joe VLcek a18181f
- (https://bugzilla.redhat.com/show_bug.cgi?id=766012)
Joe VLcek a18181f
* Tue Nov 29 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.2-2
Joe VLcek a18181f
- Allow deletion of deployment configs
Joe VLcek 225df58
* Tue Nov 29 2011 Joe VLcek <jvlcek@redhat.com> 0.4.1-4
Joe VLcek 225df58
- Use install -m in place of cp in spec file
Joe VLcek 225df58
* Mon Nov 28 2011 Joe VLcek <jvlcek@redhat.com> 0.4.1-3
Joe VLcek 225df58
- Removed rake build comment from spec
Joe VLcek 225df58
* Mon Nov 20 2011 Joe VLcek <jvlcek@redhat.com> 0.4.1-2
Joe VLcek 225df58
- Packaging for Fedora
Joe VLcek 225df58
* Mon Nov 14 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.1-1
Joe VLcek 225df58
- Enabling Config Server to process inline configuration files
Joe VLcek 225df58
* Mon Nov 14 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.0-4
Joe VLcek 225df58
- Allow httpd and config server to run with selinux enabled
Joe VLcek 225df58
- Configure ip tables to open port 443
Joe VLcek 225df58
* Fri Nov 04 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.0-3
Joe VLcek 225df58
- Adding new "auth" endpoint for testing oauth credentials
Joe VLcek 225df58
- Fixing audrey_data unsigned parameter name for oauth
Joe VLcek 225df58
* Thu Nov 03 2011 Greg Blomquist <gblomqui@redhat.com> 0.4.0-1
Joe VLcek 225df58
- Version bump to start being consistent with Audrey Client
Joe VLcek 225df58
* Tue Nov 01 2011 Greg Blomquist <gblomqui@redhat.com> 0.3.0-3
Joe VLcek 225df58
- Few small fixes for OAuth signature validation
Joe VLcek 225df58
* Wed Oct 26 2011 Greg Blomquist <gblomqui@redhat.com> 0.3.0-2
Joe VLcek 225df58
- Now using oauth for authentication
Joe VLcek 225df58
- Fix logging for production deployment
Joe VLcek 225df58
* Tue Oct 25 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.3-5
Joe VLcek 225df58
- Explicitly require mod_ssl for proxy package
Joe VLcek 225df58
* Wed Oct 05 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.3-4
Joe VLcek 225df58
- Fix rakefile to build on f16, and fixup extrarelease and dist tags in the version
Joe VLcek 225df58
* Wed Sep 07 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.3-3
Joe VLcek 225df58
- Fix service to return 202 when configs are not complete
Joe VLcek 225df58
* Thu Aug 18 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.3-2
Joe VLcek 225df58
- Fix syntax in spec
Joe VLcek 225df58
* Tue Aug 16 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.3-1
Joe VLcek 225df58
- Updated data format for Config Server -> Audrey client API
Joe VLcek 225df58
* Wed Jul 27 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.2-3
Joe VLcek 225df58
- Ability to read tarball from instance-config
Joe VLcek 225df58
- Added minitar dependency
Joe VLcek 225df58
* Tue Jul 12 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.1-5
Joe VLcek 225df58
- Adding ability to upload and download a tarball for instances
Joe VLcek 225df58
* Mon Jun 27 2011 Greg Blomquist <gblomqui@redhat.com> 0.2.0-1
Joe VLcek 225df58
- Add the "proxy" sub-package
Joe VLcek 225df58
* Thu May 26 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.2-2
Joe VLcek 225df58
- Kludge release that allows guests to PUT to invalid UUIDs (RHEV-M)
Joe VLcek 225df58
* Mon May 09 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.2-1
Joe VLcek 225df58
- Fixed POST bug that allowed POSTing no data
Joe VLcek 225df58
* Wed May 04 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.1-3
Joe VLcek 225df58
- Fixed IP storage bugs
Joe VLcek 225df58
* Wed May 04 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.1-2
Joe VLcek 225df58
- Removed arch requirement from rpm spec
Joe VLcek 225df58
* Wed May 04 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.1-1
Joe VLcek 225df58
- Storing IP address of instances that check-in
Joe VLcek 225df58
* Fri Apr 09 2011 Greg Blomquist <gblomqui@redhat.com> 0.1.0-1
Joe VLcek 225df58
- Now supporting multi-instance configuration
Joe VLcek 225df58
* Thu Mar 24 2011 Greg Blomquist <gblmoqui@redhat.com> 0.0.2-2
Joe VLcek 225df58
- Added Nokogiri dependency
Joe VLcek 225df58
* Thu Mar 24 2011 Greg Blomquist <gblmoqui@redhat.com> 0.0.2-1
Joe VLcek 225df58
- Version bump for major functionality implementation
Joe VLcek 225df58
* Wed Mar 16 2011 Greg Blomquist <gblmoqui@redhat.com> 0.0.1-1
Joe VLcek 225df58
- Initial spec