Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
google-compute-engine-init.3436
google-compute-engine-init.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File google-compute-engine-init.spec of Package google-compute-engine-init.3436
# # spec file for package google-compute-engine-init # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: google-compute-engine-init Version: 20160803 Release: 0 Summary: GCE Instance Initialization License: Apache-2.0 Group: System/Daemons Url: https://github.com/GoogleCloudPlatform/compute-image-packages Source0: compute-image-packages-%{version}.tar.gz Source1: google-accounts-daemon.suse Source2: google-clock-skew-daemon.suse Source3: google-instance-setup.suse Source4: google-ip-forwarding-daemon.suse Source5: google-shutdown-scripts.suse Source6: google-startup-scripts.suse # The dependency is incorrect. There is a wesk dependency on gsutil # which is part of google-cloud-sdk Patch1: gcei-hide-py-deps.patch # Handle missing of gsutil in a nicer way Patch2: gcei-handle-missing-gsutil.patch # Handle failed open Patch3: gcei-handle-failed-open.patch Requires: python-setuptools %if 0%{?suse_version} > 1140 Requires: google-cloud-sdk BuildRequires: systemd %endif %{?systemd_requires} %if 0%{?suse_version} < 1140 Requires: insserv Requires: sysvinit %endif BuildRequires: python-setuptools BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif Conflicts: google-startup-scripts Conflicts: google-daemon Conflicts: gcimagebundle %description Instance initialization code for Google Compute Engine %prep %setup -q -n compute-image-packages-%{version} %patch1 %patch2 -p1 %patch3 -p1 find -name "*.py" | xargs sed -i 'sm#!/usr/bin/pythonmm' %build python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} mkdir -p %{buildroot}%{_sbindir} # Init %if 0%{?suse_version} > 1140 mkdir -p %{buildroot}%{_unitdir} cp google_compute_engine_init/systemd/*.service %{buildroot}%{_unitdir} for srv_name in %{buildroot}%{_unitdir}/*.service; do rc_name=$(basename -s '.service' $srv_name); ln -s service %{buildroot}%{_sbindir}/rc$rc_name; done %else mkdir -p %{buildroot}%{_initddir} cp %{SOURCE1} %{buildroot}%{_initddir}/google-accounts-daemon cp %{SOURCE2} %{buildroot}%{_initddir}/google-clock-skew-daemon cp %{SOURCE3} %{buildroot}%{_initddir}/google-instance-setup cp %{SOURCE4} %{buildroot}%{_initddir}/google-ip-forwarding-daemon cp %{SOURCE5} %{buildroot}%{_initddir}/google-shutdown-scripts cp %{SOURCE6} %{buildroot}%{_initddir}/google-startup-scripts for srv_name in %{buildroot}%{_initddir}/*; do rc_name=$(basename $srv_name); ln -s %{_initddir}/$rc_name %{buildroot}%{_sbindir}/rc$rc_name; done %endif # Sysconfig mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d cp google_configs/sysctl/11-gce-network-security.conf %{buildroot}%{_sysconfdir}/sysctl.d # udev %if 0%{?suse_version} < 1230 mkdir -p %{buildroot}/lib/udev/rules.d cp google_configs/udev/* %{buildroot}/lib/udev/rules.d %else mkdir -p %{buildroot}/usr/lib/udev/rules.d cp google_configs/udev/* %{buildroot}/usr/lib/udev/rules.d %endif # syslog mkdir %{buildroot}/%{_sysconfdir}/rsyslog.d cp google_configs/rsyslog/* %{buildroot}/%{_sysconfdir}/rsyslog.d %pre %if 0%{?suse_version} > 1140 %service_add_pre google-accounts-daemon.service %service_add_pre google-clock-skew-daemon.service %service_add_pre google-instance-setup.service %service_add_pre google-ip-forwarding-daemon.service %service_add_pre google-shutdown-scripts.service %service_add_pre google-startup-scripts.service %endif %post %if 0%{?suse_version} > 1140 %service_add_post google-accounts-daemon.service %service_add_post google-clock-skew-daemon.service %service_add_post google-instance-setup.service %service_add_post google-ip-forwarding-daemon.service %service_add_post google-shutdown-scripts.service %service_add_post google-startup-scripts.service %else %fillup_and_insserv -fy google-accounts-daemon %fillup_and_insserv -fy google-clock-skew-daemon %fillup_and_insserv -fy google-instance-setup %fillup_and_insserv -fy google-shutdown-scripts %fillup_and_insserv -fy google-startup-scripts %endif %preun %if 0%{?suse_version} > 1140 %service_del_preun google-accounts-daemon.service %service_del_preun google-clock-skew-daemon.service %service_del_preun google-instance-setup.service %service_del_preun google-ip-forwarding-daemon.service %service_del_preun google-shutdown-scripts.service %service_del_preun google-startup-scripts.service %else %stop_on_removal google-accounts-daemon %stop_on_removal google-clock-skew-daemon %stop_on_removal google-instance-setup %stop_on_removal google-ip-forwarding-daemon %stop_on_removal google-shutdown-scripts %stop_on_removal google-startup-scripts %endif %postun %restart_on_update %if 0%{?suse_version} > 1140 %service_del_postun google-accounts-daemon.service %service_del_postun google-clock-skew-daemon.service %service_del_postun google-instance-setup.service %service_del_postun google-ip-forwarding-daemon.service %service_del_postun google-shutdown-scripts.service %service_del_postun google-startup-scripts.service %else %insserv_cleanup %endif %files %defattr(0644,root,root,0755) %doc CONTRIB.md LICENSE README.md %dir %{python_sitelib}/google_compute_engine %dir %{python_sitelib}/google_compute_engine-2.1.3-py%{py_ver}.egg-info %attr(0755,root,root) %{_bindir}/* %attr(0755,root,root) %{_sbindir}/* %{python_sitelib}/google_compute_engine/* %{python_sitelib}/google_compute_engine-2.1.3-py%{py_ver}.egg-info/* %if 0%{?suse_version} > 1140 %{_unitdir}/*.service %else %attr(0755,root,root) %{_initddir}/* %endif %config %{_sysconfdir}/sysctl.d/* %if 0%{?suse_version} < 1230 %dir %{_sysconfdir}/sysctl.d %dir /lib/udev %dir /lib/udev/rules.d /lib/udev/rules.d/* %else %dir /usr/lib/udev %dir /usr/lib/udev/rules.d /usr/lib/udev/rules.d/* %endif %dir %{_sysconfdir}/rsyslog.d %config %{_sysconfdir}/rsyslog.d/* %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor