diff --git a/gssproxy.spec b/gssproxy.spec index 4e8675139aafa78f7804436edf62d35a76ef9e26..97f61fe68307b0bccc1336fa5828e2ef42a97d3a 100644 --- a/gssproxy.spec +++ b/gssproxy.spec @@ -1,10 +1,13 @@ +%bcond_without enable_check +%bcond_with use_valgrind + %global servicename gssproxy %global pubconfpath %{_sysconfdir}/gssproxy %global gpstatedir %{_localstatedir}/lib/gssproxy Name: gssproxy Version: 0.9.1 -Release: 2 +Release: 3 Summary: GSSAPI Proxy License: MIT URL: https://github.com/gssapi/gssproxy @@ -25,6 +28,14 @@ BuildRequires: gettext-devel pkgconfig krb5-devel >= 1.12.0 libselinux-devel key # for gssuserproxy.service --idle-timeout BuildRequires: systemd-devel +%if %{with enable_check} +# for make check +BuildRequires: krb5-client krb5-server openldap-clients openldap-servers socket_wrapper nss_wrapper +%if %{with use_valgrind} +BuildRequires: valgrind glibc-debuginfo glibc +%endif +%endif + %description This is a proxy for GSSAPI which deals with credential handling @@ -59,6 +70,17 @@ install -D -m644 examples/proxymech.conf %{buildroot}%{_sysconfdir}/gss/mech.d/p install -m644 examples/24-nfs-server.conf %{buildroot}%{_sysconfdir}/gssproxy/24-nfs-server.conf mkdir -p %{buildroot}%{gpstatedir}/rcache +%check +%if %{with enable_check} +# set timeout 60s +# enough time to execute +%if %{with use_valgrind} +%make_build check CHECKARGS=' --timeout=60' +%else +%make_build check CHECKARGS=' --timeout=60 --valgrind-cmd="" ' +%endif +%endif + %post %systemd_post gssproxy.service @@ -91,6 +113,9 @@ mkdir -p %{buildroot}%{gpstatedir}/rcache %{_mandir}/man8/gssproxy-mech.8* %changelog +* Fri Jul 7 2023 yixiangzhike - 0.9.1-3 +- enable make check + * Mon Apr 10 2023 yixiangzhike - 0.9.1-2 - add BuildRequires:systemd-devel for option idle-timeout