-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#198) added support for el9 packages to be built using a template of…
… el8. Also added support for building el9 packages to the nightly build in the github workflow
- Loading branch information
Showing
5 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Choria Server Provisioner | ||
After=network.target | ||
|
||
[Service] | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
User=root | ||
Group=root | ||
ExecStart={{cpkg_bindir}}/{{cpkg_name}} run --choria-config {{cpkg_etcdir}}/choria.cfg --config={{cpkg_etcdir}}/{{cpkg_name}}.yaml | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
%define debug_package %{nil} | ||
%define pkgname {{cpkg_name}} | ||
%define version {{cpkg_version}} | ||
%define bindir {{cpkg_bindir}} | ||
%define etcdir {{cpkg_etcdir}} | ||
%define release {{cpkg_release}} | ||
%define dist {{cpkg_dist}} | ||
%define manage_conf {{cpkg_manage_conf}} | ||
%define binary {{cpkg_binary}} | ||
%define tarball {{cpkg_tarball}} | ||
|
||
Name: %{pkgname} | ||
Version: %{version} | ||
Release: %{release}.%{dist} | ||
Summary: Choria Server Provisioner | ||
License: Apache-2.0 | ||
URL: https://choria.io | ||
Group: System Tools | ||
Packager: R.I.Pienaar <[email protected]> | ||
Source0: %{tarball} | ||
BuildRoot: %{_tmppath}/%{pkgname}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
|
||
%description | ||
Automatically provisions Choria Servers | ||
|
||
%prep | ||
%setup -q | ||
|
||
%build | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
%{__install} -d -m0755 %{buildroot}/usr/lib/systemd/system | ||
%{__install} -d -m0755 %{buildroot}/etc/logrotate.d | ||
%{__install} -d -m0755 %{buildroot}%{bindir} | ||
%{__install} -d -m0755 %{buildroot}%{etcdir} | ||
%{__install} -d -m0755 %{buildroot}/var/log | ||
%{__install} -d -m0756 %{buildroot}/var/lib/%{pkgname} | ||
%{__install} -m0644 dist/choria-provisioner.service %{buildroot}/usr/lib/systemd/system/%{pkgname}.service | ||
%{__install} -m0644 dist/choria-provisioner-logrotate %{buildroot}/etc/logrotate.d/%{pkgname} | ||
%{__install} -m0640 dist/config.yaml %{buildroot}%{etcdir}/%{pkgname}.yaml | ||
%{__install} -m0755 %{binary} %{buildroot}%{bindir}/%{pkgname} | ||
touch %{buildroot}/var/log/%{pkgname}.log | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%post | ||
if [ $1 -eq 1 ] ; then | ||
systemctl --no-reload preset %{pkgname} >/dev/null 2>&1 || : | ||
fi | ||
|
||
/bin/systemctl --system daemon-reload >/dev/null 2>&1 || : | ||
|
||
if [ $1 -ge 1 ]; then | ||
/bin/systemctl try-restart %{pkgname} >/dev/null 2>&1 || :; | ||
fi | ||
|
||
%preun | ||
if [ $1 -eq 0 ] ; then | ||
systemctl --no-reload disable --now %{pkgname} >/dev/null 2>&1 || : | ||
fi | ||
|
||
%files | ||
%attr(640, root, root) %config(noreplace)%{etcdir}/%{pkgname}.yaml | ||
%{bindir}/%{pkgname} | ||
/etc/logrotate.d/%{pkgname} | ||
/usr/lib/systemd/system/%{pkgname}.service | ||
%attr(644, root, root)/var/log/%{pkgname}.log | ||
|
||
%changelog | ||
* Tue Aug 07 2018 R.I.Pienaar <[email protected]> | ||
- Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
required_properties: | ||
- name | ||
- bindir | ||
- etcdir | ||
- release | ||
- manage_conf | ||
- dist | ||
|
||
artifacts: | ||
- /usr/src/redhat/**/*.rpm | ||
- /root/rpmbuild/**/*.rpm |