diff --git a/config-gate/opensuse/config-gate.changes b/config-gate/opensuse/config-gate.changes new file mode 100644 index 0000000000..2cb3fc0449 --- /dev/null +++ b/config-gate/opensuse/config-gate.changes @@ -0,0 +1,15 @@ + +------------------------------------------------------------------- +Mon Jun 17 21:44:05 UTC 2019 - felipe.de.jesus.ruiz.garcia@intel.com + +- Add %changelog section + +------------------------------------------------------------------- +Mon Jun 17 20:57:02 UTC 2019 - felipe.de.jesus.ruiz.garcia@intel.com + +- Fix build issues + +------------------------------------------------------------------- +Wed Jun 12 07:42:35 UTC 2019 - felipe.de.jesus.ruiz.garcia@intel.com + +- Initial commit diff --git a/config-gate/opensuse/config-gate.spec b/config-gate/opensuse/config-gate.spec new file mode 100644 index 0000000000..add24a6548 --- /dev/null +++ b/config-gate/opensuse/config-gate.spec @@ -0,0 +1,61 @@ +Summary: General config initialization gate +Name: config-gate +Version: 1.0 +Release: 1 +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/config +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: systemd + +%define debug_package %{nil} + +%description +General configuration for the initialization gate + +%package -n %{name}-worker +Summary: Startup configuration gate +BuildRequires: -devel +Group: Development/Tools/Other + +%description -n %{name}-worker +General configuration for the initialization gate + +%define local_etc_systemd /etc/systemd/system/ + +%prep +%setup -n %{name}-%{version}/files + +%build + +%install +make install SBINDIR=%{buildroot}%{_sbindir} SYSTEMDDIR=%{buildroot}%{local_etc_systemd} + +%post +%service_add_post sysinv-agent.service sysinv-agent.target + +/bin/systemctl enable config.service + +%post -n %{name}-worker +systemctl enable worker-config-gate.service + +%clean + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{_sbindir}/wait_for_config_init.sh +%{local_etc_systemd}/config.service +%dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/system + +%files -n %{name}-worker +%defattr(-,root,root,-) +%{_sbindir}/wait_for_worker_config_init.sh +%{local_etc_systemd}/worker-config-gate.service +%dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/system + +%changelog diff --git a/workerconfig/opensuse/workerconfig.changes b/workerconfig/opensuse/workerconfig.changes new file mode 100644 index 0000000000..441b7318ed --- /dev/null +++ b/workerconfig/opensuse/workerconfig.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 12 08:03:51 UTC 2019 - Marcela Rosales + +- Add BuildArch and %config macro to specfile + +------------------------------------------------------------------- +Mon Jun 10 12:10:39 UTC 2019 - Marcela Rosales + +- Initial Commit diff --git a/workerconfig/opensuse/workerconfig.spec b/workerconfig/opensuse/workerconfig.spec new file mode 100644 index 0000000000..0657751f18 --- /dev/null +++ b/workerconfig/opensuse/workerconfig.spec @@ -0,0 +1,79 @@ +Summary: Worker config package +Name: workerconfig +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +License: Apache-2.0 +Group: System/Packages +URL: https://opendev.org/starlingx/config/ +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch + +%define debug_package %{nil} + +BuildRequires: systemd +Requires: pkgconfig(systemd) + +%description +Initial worker node configuration package for StarlingX project. + +%package -n workerconfig-standalone +Summary: The worker config standalone package +Group: System/Packages + +%description -n workerconfig-standalone +Initial worker node configuration for StarlingX project. + +%package -n workerconfig-subfunction +Summary: The worker config subfunction package +Group: System/Packages + +%description -n workerconfig-subfunction +Initial worker node configuration for StarlingX project. + +%define initddir %{_sysconfdir}/init.d/ +%define goenableddir %{_sysconfdir}/goenabled.d/ +%define systemddir %{_sysconfdir}/systemd/system/ + +%prep +%setup -n %{name}-%{version}/%{name} + +%build + +%install +make install INITDDIR=%{buildroot}%{initddir} GOENABLEDDIR=%{buildroot}%{goenableddir} SYSTEMDDIR=%{buildroot}%{systemddir} + +%post -n workerconfig-standalone +cp $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service +systemctl enable workerconfig.service + + +%post -n workerconfig-subfunction +cp $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service +systemctl enable workerconfig.service + +%clean + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{initddir}/* + +%files -n workerconfig-standalone +%defattr(-,root,root,-) +%dir %{systemddir}/config +%{systemddir}/config/workerconfig-standalone.service +%{goenableddir}/* +%dir %{_sysconfdir}/goenabled.d +%dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/system +%config %{systemddir}/config/workerconfig-standalone.service + +%files -n workerconfig-subfunction +%defattr(-,root,root,-) +%dir %{systemddir}/config +%{systemddir}/config/workerconfig-combined.service +%dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/system +%config %{systemddir}/config/workerconfig-combined.service + +%changelog