9a84c2
%global project freeipa
9a84c2
%global shortname healthcheck
9a84c2
%global longname ipa%{shortname}
9a84c2
%global debug_package %{nil}
9a84c2
%global python3dir %{_builddir}/python3-%{name}-%{version}-%{release}
9a84c2
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
9a84c2
9a84c2
9a84c2
Name:           ipa-healthcheck
717a87
Version:        0.12
717a87
Release:        1%{?dist}
9a84c2
Summary:        Health check tool for IdM
9a84c2
BuildArch:      noarch
9a84c2
License:        GPLv3
9a84c2
URL:            https://github.com/%{project}/freeipa-healthcheck
717a87
Source0:        https://github.com/%{project}/%{name}/archive/%{version}.tar.gz#/%{version}.tar.gz
9a84c2
Source1:        %{longname}.conf
9a84c2
717a87
Patch0001:      0001-Remove-ipaclustercheck.patch
717a87
Patch0002:      0002-Disable-two-failing-tests.patch
717a87
Patch0003:      0003-Fix-logging-issue-related-to-dtype.patch
9a84c2
c953d3
Requires:       %{name}-core = %{version}-%{release}
9a84c2
Requires:       ipa-server
9a84c2
Requires:       python3-ipalib
9a84c2
Requires:       python3-ipaserver
e6a568
Requires:       python3-lib389
9a84c2
# cronie-anacron provides anacron
9a84c2
Requires:       anacron
9a84c2
Requires:       logrotate
9a84c2
Requires(post): systemd-units
9a84c2
Requires:       %{name}-core = %{version}-%{release}
9a84c2
BuildRequires:  python3-devel
9a84c2
BuildRequires:  systemd-devel
9a84c2
%{?systemd_requires}
9a84c2
9a84c2
9a84c2
%description
9a84c2
The FreeIPA health check tool provides a set of checks to
9a84c2
proactively detect defects in a FreeIPA cluster.
9a84c2
9a84c2
%package -n %{name}-core
9a84c2
Summary: Core plugin system for healthcheck
c953d3
# No Requires on %%{name} = %%{version}-%%{release} since this can be
c953d3
# installed standalone
c953d3
Conflicts: %{name} < 0.4
9a84c2
9a84c2
%description -n %{name}-core
9a84c2
Core files
9a84c2
9a84c2
9a84c2
%prep
9a84c2
%autosetup -p1 -n %{project}-%{shortname}-%{version}
9a84c2
9a84c2
9a84c2
%build
9a84c2
%py3_build
9a84c2
9a84c2
9a84c2
%install
9a84c2
%py3_install
9a84c2
9a84c2
mkdir -p %{buildroot}%{_sysconfdir}/%{longname}
9a84c2
install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{longname}
9a84c2
9a84c2
mkdir -p %{buildroot}/%{_unitdir}
9a84c2
install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.service %{buildroot}%{_unitdir}
9a84c2
install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.timer %{buildroot}%{_unitdir}
9a84c2
9a84c2
mkdir -p %{buildroot}/%{_libexecdir}/ipa
9a84c2
install -p -m755 %{_builddir}/%{project}-%{shortname}-%{version}/systemd/ipa-%{shortname}.sh %{buildroot}%{_libexecdir}/ipa/
9a84c2
9a84c2
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
9a84c2
install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/logrotate/%{longname} %{buildroot}%{_sysconfdir}/logrotate.d
9a84c2
9a84c2
mkdir -p %{buildroot}/%{_localstatedir}/log/ipa/%{shortname}
9a84c2
e6a568
mkdir -p %{buildroot}/%{_mandir}/man8
9a84c2
mkdir -p %{buildroot}/%{_mandir}/man5
e6a568
install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/man/man8/ipa-%{shortname}.8  %{buildroot}%{_mandir}/man8/
9a84c2
install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/man/man5/%{longname}.conf.5  %{buildroot}%{_mandir}/man5/
9a84c2
9a84c2
(cd %{buildroot}/%{python3_sitelib}/ipahealthcheck && find . -type f  | \
9a84c2
    grep -v '^./core' | \
9a84c2
    grep -v 'opt-1' | \
9a84c2
    sed -e 's,\.py.*$,.*,g' | sort -u | \
9a84c2
    sed -e 's,\./,%%{python3_sitelib}/ipahealthcheck/,g' ) >healthcheck.list
9a84c2
9a84c2
%post
9a84c2
%systemd_post ipa-%{shortname}.service
9a84c2
9a84c2
9a84c2
%preun
9a84c2
%systemd_preun ipa-%{shortname}.service
9a84c2
9a84c2
9a84c2
%postun
9a84c2
%systemd_postun_with_restart ipa-%{shortname}.service
9a84c2
9a84c2
9a84c2
%files -f healthcheck.list
9a84c2
%{!?_licensedir:%global license %%doc}
9a84c2
%license COPYING
9a84c2
%doc README.md
9a84c2
%{_bindir}/ipa-%{shortname}
9a84c2
%dir %{_sysconfdir}/%{longname}
9a84c2
%dir %{_localstatedir}/log/ipa/%{shortname}
9a84c2
%config(noreplace) %{_sysconfdir}/%{longname}/%{longname}.conf
9a84c2
%config(noreplace) %{_sysconfdir}/logrotate.d/%{longname}
9a84c2
%{python3_sitelib}/%{longname}-%{version}-*.egg-info/
9a84c2
%{python3_sitelib}/%{longname}-%{version}-*-nspkg.pth
9a84c2
%{_unitdir}/*
9a84c2
%{_libexecdir}/*
e6a568
%{_mandir}/man8/*
9a84c2
%{_mandir}/man5/*
9a84c2
9a84c2
%files -n %{name}-core
9a84c2
%{!?_licensedir:%global license %%doc}
9a84c2
%license COPYING
9a84c2
%doc README.md
9a84c2
%{python3_sitelib}/%{longname}/core/
9a84c2
9a84c2
9a84c2
%changelog
717a87
* Thu Dec 01 2022 Rob Crittenden <rcritten@redhat.com> - 0.12-1
717a87
- Update to upstream 0.12 (#2139529)
717a87
- Verify that the number of krb5kdc worker processes is aligned to the
717a87
  number of configured CPUs (#2052930)
717a87
- IPADNSSystemRecordsCheck displays warning message for 2 expected
717a87
  ipa-ca AAAA records (#2099484)
717a87
d97ed2
* Wed May 25 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-14
d97ed2
- Add CLI options to healthcheck configuration file (#1872467)
d97ed2
d97ed2
* Fri Apr 29 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-13
d97ed2
- Allow multiple file modes in the FileChecker (#2058239)
d97ed2
d97ed2
* Thu Mar 31 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-12
d97ed2
- Use the subject base from the IPA configuration, not REALM (#2066308)
d97ed2
d97ed2
* Fri Mar 18 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-11
d97ed2
- Add support for the DNS URI type (#2037847)
d97ed2
9b0b1a
* Thu Feb 17 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-10
9b0b1a
- Don't depend on IPA status when suppressing pki checks (#2055316)
9b0b1a
9b0b1a
* Mon Jan 17 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-9
9b0b1a
- Don't assume the entry_point order when determining if there is a
9b0b1a
  CA installed (#2041995)
9b0b1a
9b0b1a
* Thu Jan 06 2022 Rob Crittenden <rcritten@redhat.com> - 0.7-8
9b0b1a
- Suppress the CRLManager check false positive when a CA is not
9b0b1a
  configured (#1983060)
9b0b1a
- Fix the backport of the pki.server.healthcheck suppression (#1983060)
9b0b1a
9b0b1a
* Thu Oct 07 2021 Rob Crittenden <rcritten@redhat.com> - 0.7-7
9b0b1a
- ipa-healthcheck command takes some extra time to complete when dirsrv
9b0b1a
  instance is stopped (#1776687)
9b0b1a
- ipa-healthcheck complains about pki.server.healthcheck errors even CA
9b0b1a
  is not configured on the replica (#1983060)
9b0b1a
6457ff
* Mon Jun 14 2021 Rob Crittenden <rcritten@redhat.com> - 0.7-6
6457ff
- Fix patch fuzz issues, apply add'l upstream for log files (#1780020)
6457ff
6457ff
* Wed Jun  2 2021 Rob Crittenden <rcritten@redhat.com> - 0.7-5
6457ff
- Return a user-friendly message when no issues are found (#1780062)
6457ff
- Report on FIPS status (#1781107)
6457ff
- Detect mismatches beteween certificates in LDAP and filesystem (#1886770)
6457ff
- Verify owner/perms for important log files (#1780020)
6457ff
6457ff
* Tue Apr  6 2021 Rob Crittenden <rcritten@redhat.com> - 0.7-4
6457ff
- Add check to validate the KRA Agent is correct (#1894781)
6457ff
e6a568
* Fri Dec  4 2020 Rob Crittenden <rcritten@redhat.com> - 0.7-3
e6a568
- Translate result names when reading input from a json file (#1866558)
e6a568
e6a568
* Tue Nov  3 2020 Rob Crittenden <rcritten@redhat.com> - 0.7-2
e6a568
- Fix collection of AD trust domains (#1891505) 
e6a568
e6a568
* Tue Nov  3 2020 Rob Crittenden <rcritten@redhat.com> - 0.7-1
e6a568
- Update to upstream 0.7 (#1891850)
e6a568
- Include Directory Server healthchecks (#1824193)
e6a568
- Document that default output format is JSON (#1780328)
e6a568
- Fix return value on exit with --input-file (#1866558)
e6a568
- Fix examples in man page (#1809215)
e6a568
- Replace man page reference to output-format with output-type (#1780303)
e6a568
- Add dependencies on services to avoid false positives (#1780510)
e6a568
c953d3
* Wed Aug 19 2020 Rob Crittenden <rcritten@redhat.com> - 0.4-6
c953d3
- The core subpackage can be installed standalone, drop the Requires
c953d3
  on the base package. (#1852244)
c953d3
- Add Conflicts < 0.4 to to core to allow downgrading with
c953d3
  --allowerasing (#1852244)
c953d3
c953d3
* Tue Aug  4 2020 Rob Crittenden <rcritten@redhat.com> - 0.4-5
c953d3
- Remove the Obsoletes < 0.4 and add same-version Requires to each
c953d3
  subpackage so that upgrades from 0.3 will work (#1852244)
c953d3
9a84c2
* Thu Jan 16 2020 Rob Crittenden <rcritten@redhat.com> - 0.4-4
9a84c2
- Allow plugins to read contents from config during initialization (#1784037)
9a84c2
9a84c2
* Thu Dec  5 2019 Rob Crittenden <rcritten@redhat.com> - 0.4-3
9a84c2
- Add Obsoletes to core subpackage (#1780121)
9a84c2
9a84c2
* Mon Dec  2 2019 Rob Crittenden <rcritten@redhat.com> - 0.4-2
9a84c2
- Abstract processing so core package is standalone (#1771710)
9a84c2
9a84c2
* Mon Dec  2 2019 Rob Crittenden <rcritten@redhat.com> - 0.4-1
9a84c2
- Rebase to upstream 0.4 (#1770346)
9a84c2
- Create subpackage to split out core processing (#1771710)
9a84c2
- Correct URL (#1773512)
9a84c2
- Errors not translated to strings (#1752849)
9a84c2
- JSON output not indented by default (#1729043)
9a84c2
- Add dependencies to checks to avoid false-positives (#1727900)
9a84c2
- Verify expected DNS records (#1695125)
9a84c2
9a84c2
* Mon Aug 12 2019 Rob Crittenden <rcritten@redhat.com> - 0.3-4
9a84c2
- Lookup AD user by SID and not by hardcoded username (#1739500)
9a84c2
9a84c2
* Thu Aug  8 2019 Rob Crittenden <rcritten@redhat.com> - 0.3-3
9a84c2
- The AD trust agent and controller are not being initialized (#1738314)
9a84c2
9a84c2
* Mon Aug  5 2019 Rob Crittenden <rcritten@redhat.com> - 0.3-2
9a84c2
- Change DNA plugin to return WARNING if no range is set (#1737492)
9a84c2
9a84c2
* Mon Jul 29 2019 François Cami <fcami@redhat.com> - 0.3-1
9a84c2
- Update to upstream 0.3 (#1701351)
9a84c2
- Add logrotate configs + depend on anacron and logrotate (#1729207)
9a84c2
9a84c2
* Thu Jul 11 2019 François Cami <fcami@redhat.com> - 0.2-4
9a84c2
- Fix ipa-healthcheck.sh installation path (rhbz#1729188)
9a84c2
- Create and own log directory (rhbz#1729188)
9a84c2
9a84c2
* Tue Apr 30 2019 François Cami <fcami@redhat.com> - 0.2-3
9a84c2
- Add python3-lib389 to BRs
9a84c2
9a84c2
* Tue Apr 30 2019 François Cami <fcami@redhat.com> - 0.2-2
9a84c2
- Fix changelog
9a84c2
9a84c2
* Thu Apr 25 2019 Rob Crittenden <rcritten@redhat.com> - 0.2-1
9a84c2
- Update to upstream 0.2
9a84c2
9a84c2
* Thu Apr 4 2019 François Cami <fcami@redhat.com> - 0.1-2
9a84c2
- Explicitly list dependencies
9a84c2
9a84c2
* Tue Apr 2 2019 François Cami <fcami@redhat.com> - 0.1-1
9a84c2
- Initial package import