summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 13:07:00 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 13:07:00 -0700
commita1402ec7346dc935cec1dc1a02eff3816d98ffc2 (patch)
treea35c8c6c6048b7e7567dc2bc04a5da9d00c1f648 /packages
parent6d74afcd0e11de5cb56623d9121472e9212e8481 (diff)
downloadvyos-cloud-init-a1402ec7346dc935cec1dc1a02eff3816d98ffc2.tar.gz
vyos-cloud-init-a1402ec7346dc935cec1dc1a02eff3816d98ffc2.zip
This will be a rpm template file for the eventual specfile that will be created.
Diffstat (limited to 'packages')
-rw-r--r--packages/brpm.tmpl173
1 files changed, 173 insertions, 0 deletions
diff --git a/packages/brpm.tmpl b/packages/brpm.tmpl
new file mode 100644
index 00000000..141578a5
--- /dev/null
+++ b/packages/brpm.tmpl
@@ -0,0 +1,173 @@
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+
+Name: cloud-init
+Version: {{version}}
+Release: {{release}}%{?dist}
+Summary: Cloud instance init scripts
+
+Group: System Environment/Base
+License: GPLv3
+URL: http://launchpad.net/cloud-init
+
+Source0: %{name}-%{version}-bzr532.tar.gz
+
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: python-devel
+BuildRequires: python-setuptools-devel
+Requires: e2fsprogs
+Requires: iproute
+Requires: libselinux-python
+Requires: net-tools
+Requires: procps
+Requires: python-boto
+Requires: python-cheetah
+Requires: python-configobj
+Requires: PyYAML
+Requires: rsyslog
+Requires: shadow-utils
+Requires: /usr/bin/run-parts
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(postun): initscripts
+
+%description
+Cloud-init is a set of init scripts for cloud instances. Cloud instances
+need special scripts to run during initialization to retrieve and install
+ssh keys and to let the user run various scripts.
+
+
+%prep
+%setup -q -n %{name}-%{version}-bzr532
+%patch0 -p0
+%patch1 -p0
+%patch2 -p1
+%patch3 -p1
+
+cp -p %{SOURCE2} README.fedora
+
+
+%build
+%{__python} setup.py build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+for x in $RPM_BUILD_ROOT/%{_bindir}/*.py; do mv "$x" "${x%.py}"; done
+chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/cloudinit/SshUtil.py
+mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/cloud
+
+# We supply our own config file since our software differs from Ubuntu's.
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg
+
+# Note that /etc/rsyslog.d didn't exist by default until F15.
+# el6 request: https://bugzilla.redhat.com/show_bug.cgi?id=740420
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d
+cp -p tools/21-cloudinit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
+
+# Install the init scripts
+install -p -D -m 755 %{SOURCE3} %{buildroot}%{_initrddir}/cloud-config
+install -p -D -m 755 %{SOURCE4} %{buildroot}%{_initrddir}/cloud-final
+install -p -D -m 755 %{SOURCE5} %{buildroot}%{_initrddir}/cloud-init
+install -p -D -m 755 %{SOURCE6} %{buildroot}%{_initrddir}/cloud-init-local
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ # Enabled by default per "runs once then goes away" exception
+ for svc in config final init init-local; do
+ chkconfig --add cloud-$svc
+ chkconfig cloud-$svc on
+ done
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ for svc in config final init init-local; do
+ chkconfig --del cloud-$svc
+ chkconfig cloud-$svc on
+ done
+ # One-shot services -> no need to stop
+fi
+
+%postun
+# One-shot services -> no need to restart
+
+
+%files
+%doc ChangeLog LICENSE TODO README.fedora
+%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
+%dir %{_sysconfdir}/cloud/cloud.cfg.d
+%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/*.cfg
+%doc %{_sysconfdir}/cloud/cloud.cfg.d/README
+%dir %{_sysconfdir}/cloud/templates
+%config(noreplace) %{_sysconfdir}/cloud/templates/*
+%{_initrddir}/cloud-*
+%{python_sitelib}/*
+%{_libexecdir}/%{name}
+%{_bindir}/cloud-init*
+%doc %{_datadir}/doc/%{name}
+%dir %{_sharedstatedir}/cloud
+
+%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
+
+
+%changelog
+* Mon Jun 18 2012 Pádraig Brady <P@draigBrady.com> - 0.6.3-0.6.bzr532
+- Further adjustments to support EPEL 6
+
+* Fri Jun 15 2012 Tomas Karasek <tomas.karasek@cern.ch> - 0.6.3-0.5.bzr532
+- Fix cloud-init-cfg invocation in init script
+
+* Tue May 22 2012 Pádraig Brady <P@draigBrady.com> - 0.6.3-0.4.bzr532
+- Support EPEL 6
+
+* Sat Mar 31 2012 Andy Grimm <agrimm@gmail.com> - 0.6.3-0.2.bzr532
+- Fixed incorrect interpretation of relative path for
+ AuthorizedKeysFile (BZ #735521)
+
+* Mon Mar 5 2012 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.3-0.1.bzr532
+- Rebased against upstream rev 532
+- Fixed runparts() incompatibility with Fedora
+
+* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-0.8.bzr457
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Wed Oct 5 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.7.bzr457
+- Disabled SSH key-deleting on startup
+
+* Wed Sep 28 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.6.bzr457
+- Consolidated selinux file context patches
+- Fixed cloud-init.service dependencies
+- Updated sshkeytypes patch
+- Dealt with differences from Ubuntu's sshd
+
+* Sat Sep 24 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.5.bzr457
+- Rebased against upstream rev 457
+- Added missing dependencies
+
+* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.4.bzr450
+- Added more macros to the spec file
+
+* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.3.bzr450
+- Fixed logfile permission checking
+- Fixed SSH key generation
+- Fixed a bad method call in FQDN-guessing [LP:857891]
+- Updated localefile patch
+- Disabled the grub_dpkg module
+- Fixed failures due to empty script dirs [LP:857926]
+
+* Fri Sep 23 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.2.bzr450
+- Updated tzsysconfig patch
+
+* Wed Sep 21 2011 Garrett Holmstrom <gholms@fedoraproject.org> - 0.6.2-0.1.bzr450
+- Initial packaging