diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c36803 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/freeipa-healthcheck-0.2.tar.gz diff --git a/.ipa-healthcheck.metadata b/.ipa-healthcheck.metadata new file mode 100644 index 0000000..2a0255c --- /dev/null +++ b/.ipa-healthcheck.metadata @@ -0,0 +1 @@ +2c1398586b861f598c4836eeed2ee30a629cedb1 SOURCES/freeipa-healthcheck-0.2.tar.gz diff --git a/SOURCES/0001-Remove-requirement-for-pytest-runner-since-PyPI-isn-.patch b/SOURCES/0001-Remove-requirement-for-pytest-runner-since-PyPI-isn-.patch new file mode 100644 index 0000000..8a3a8f2 --- /dev/null +++ b/SOURCES/0001-Remove-requirement-for-pytest-runner-since-PyPI-isn-.patch @@ -0,0 +1,26 @@ +From bf2363355b4fec7a47ad9a02d011701ecabd523a Mon Sep 17 00:00:00 2001 +From: Rob Crittenden +Date: Fri, 3 May 2019 10:10:57 -0400 +Subject: [PATCH] Remove requirement for pytest-runner since PyPI isn't + available + +We won't be executing make check because the dependencies aren't +available due to IDM being in a module. +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 4b3ca3b..6c941f8 100644 +--- a/setup.py ++++ b/setup.py +@@ -58,6 +58,5 @@ setup( + 'Programming Language :: Python :: 3.6', + ], + python_requires='!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', +- setup_requires=['pytest-runner',], + tests_require=['pytest',], + ) +-- +2.17.2 + diff --git a/SOURCES/ipahealthcheck.conf b/SOURCES/ipahealthcheck.conf new file mode 100644 index 0000000..ab109a1 --- /dev/null +++ b/SOURCES/ipahealthcheck.conf @@ -0,0 +1 @@ +[default] diff --git a/SPECS/ipa-healthcheck.spec b/SPECS/ipa-healthcheck.spec new file mode 100644 index 0000000..1a66f7b --- /dev/null +++ b/SPECS/ipa-healthcheck.spec @@ -0,0 +1,102 @@ +%global project freeipa +%global shortname healthcheck +%global longname ipa%{shortname} +%global debug_package %{nil} +%global python3dir %{_builddir}/python3-%{name}-%{version}-%{release} +%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + + +Name: ipa-healthcheck +Version: 0.2 +Release: 3%{?dist} +Summary: Health check tool for IdM +BuildArch: noarch +License: GPLv3 +URL: https://github.com/%{project}/%{name} +Source0: https://github.com/%{project}/%{name}/archive/release-%{version}.tar.gz#/%{project}-%{shortname}-%{version}.tar.gz +Source1: %{longname}.conf +Requires: ipa-server +Requires: python3-ipalib +Requires: python3-ipaserver +Requires(post): systemd-units +BuildRequires: python3-devel +BuildRequires: systemd-devel +%{?systemd_requires} + +Patch: 0001-Remove-requirement-for-pytest-runner-since-PyPI-isn-.patch + + +%description +The FreeIPA health check tool provides a set of checks to +proactively detect defects in a FreeIPA cluster. + + +%prep +%autosetup -p1 -n %{project}-%{shortname}-%{version} + + +%build +%py3_build + + +%install +%py3_install +mkdir -p %{buildroot}%{_sysconfdir}/%{longname} +install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{longname} +mkdir -p %{buildroot}/%{_unitdir} + +install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.service %{buildroot}%{_unitdir} +install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.timer %{buildroot}%{_unitdir} +mkdir -p %{buildroot}/%{_libexecdir} +install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.sh %{buildroot}%{_libexecdir}/ + +mkdir -p %{buildroot}/%{_mandir}/man1 +mkdir -p %{buildroot}/%{_mandir}/man5 +install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/man/man1/ipa-%{shortname}.1 %{buildroot}%{_mandir}/man1/ +install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/man/man5/%{longname}.conf.5 %{buildroot}%{_mandir}/man5/ + +#%check +#%{__python3} setup.py test + + +%post +%systemd_post ipa-%{shortname}.service + +%preun +%systemd_preun ipa-%{shortname}.service + +%postun +%systemd_postun_with_restart ipa-%{shortname}.service + + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc README.md +%{_bindir}/ipa-%{shortname} +%dir %{_sysconfdir}/%{longname} +%config(noreplace) %{_sysconfdir}/%{longname}/%{longname}.conf +%{python3_sitelib}/%{longname}/ +%{python3_sitelib}/%{longname}-%{version}-*.egg-info/ +%{python3_sitelib}/%{longname}-%{version}-*-nspkg.pth +%{_unitdir}/* +%{_libexecdir}/* +%{_mandir}/man1/* +%{_mandir}/man5/* + + +%changelog +* Tue Apr 30 2019 François Cami - 0.2-3 +- Add python3-lib389 to BRs + +* Tue Apr 30 2019 François Cami - 0.2-2 +- Fix changelog + +* Thu Apr 25 2019 Rob Crittenden - 0.2-1 +- Update to upstream 0.2 + +* Thu Apr 4 2019 François Cami - 0.1-2 +- Explicitly list dependencies + +* Tue Apr 2 2019 François Cami - 0.1-1 +- Initial package import