int rc;
stringstream out;
- // FIXME: we'll need to add mokutil to a 'Requires' line in the spec
- // file, but only for F?+ and RHEL?+. Need to figure out exact
- // release numbers.
- //
// FIXME: In theory, we should be able to read /sys files and use
// some of the guts of read_cert_info_from_file() to get the
// fingerprints. This would rid us of our mokutil
cmd.push_back("--list-enrolled");
rc = stap_system_read(verbose, cmd, out);
if (rc != 0)
- throw runtime_error(_F("failed to get list of machine owner keys (MOK) fingerprints: rc %d", rc));
+ // If we're here, we know the client requires module signing, but
+ // we can't get the list of MOKs. Quit.
+ throw runtime_error(_F("failed to get list of machine owner keys (MOK) fingerprints: rc %d", rc));
string line, fingerprint;
while (! out.eof())
%{!?with_virthost: %global with_virthost 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
%{!?with_virtguest: %global with_virtguest 1}
%{!?with_dracut: %global with_dracut 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
+%ifarch x86_64
+%{!?with_mokutil: %global with_mokutil 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
+%else
+%{!?with_mokutil: %global with_mokutil 0}
+%endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
%define initdir %{_initddir}
Requires: systemtap-runtime = %{version}-%{release}
Requires: coreutils grep sed unzip zip
Requires: openssh-clients
+%if %{with_mokutil}
+Requires: mokutil
+%endif
%description client
This package contains/requires the components needed to develop