diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index 222aa0ca3f19..28923ebea233 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -137,6 +137,9 @@ Obsoletes: libebitdo < 0.7.5-3 Obsoletes: libdfu < 1.0.0 Obsoletes: fwupd-labels < 1.1.0-1 +Obsoletes: dbxtool < 9 +Provides: dbxtool + %if 0%{?rhel} > 7 Obsoletes: fwupdate < 11-4 Obsoletes: fwupdate-efi < 11-4 @@ -289,6 +292,7 @@ mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg %{_bindir}/fwupdtpmevlog %endif %{_bindir}/dfu-tool +%{_bindir}/dbxtool %{_bindir}/fwupdmgr %{_bindir}/fwupdtool %{_bindir}/fwupdagent @@ -323,6 +327,7 @@ mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg %{_datadir}/man/man1/fwupdtool.1.gz %{_datadir}/man/man1/fwupdagent.1.gz %{_datadir}/man/man1/dfu-tool.1.gz +%{_datadir}/man/man1/dbxtool.1.gz %{_datadir}/man/man1/fwupdmgr.1.gz %if 0%{?have_uefi} %{_datadir}/man/man1/fwupdate.1.gz diff --git a/contrib/snap/dbxtool.wrapper b/contrib/snap/dbxtool.wrapper new file mode 100644 index 000000000000..d29ab99015d6 --- /dev/null +++ b/contrib/snap/dbxtool.wrapper @@ -0,0 +1,2 @@ +#!/bin/sh +exec "$SNAP/fwupd-command" $SNAP/bin/dbxtool $@ diff --git a/plugins/uefi-dbx/dbxtool.h2m b/plugins/uefi-dbx/dbxtool.h2m new file mode 100644 index 000000000000..069b08e2d45a --- /dev/null +++ b/plugins/uefi-dbx/dbxtool.h2m @@ -0,0 +1,7 @@ +[DESCRIPTION] +.PP +This manual page documents briefly the \fBdbxtool\fR command. +.PP +\fBdbxtool\fR allows a user to operate on the UEFI dbx revokation list. +This tool can be used to list the current dbx contents or update it to a newer +version. diff --git a/plugins/uefi-dbx/fu-dbxtool.c b/plugins/uefi-dbx/fu-dbxtool.c index 2a9601e7908c..0da139314379 100644 --- a/plugins/uefi-dbx/fu-dbxtool.c +++ b/plugins/uefi-dbx/fu-dbxtool.c @@ -1,4 +1,5 @@ /* + * Copyright (C) 2015-2017 Peter Jones * Copyright (C) 2020 Richard Hughes * * SPDX-License-Identifier: LGPL-2.1+ diff --git a/plugins/uefi-dbx/meson.build b/plugins/uefi-dbx/meson.build index 6961dfab28fb..cca0c6cebbc0 100644 --- a/plugins/uefi-dbx/meson.build +++ b/plugins/uefi-dbx/meson.build @@ -109,9 +109,31 @@ dbxtool = executable( fwupd, fwupdplugin, ], + install : true, + install_dir : bindir, c_args : cargs, ) +if get_option('man') + help2man = find_program('help2man') + extra = join_paths(meson.current_source_dir(), 'dbxtool.h2m') + custom_target('dbxtool-man', + input : dbxtool, + output : 'dbxtool.1', + command : [ + help2man, '@INPUT@', + '--no-info', + '--output', '@OUTPUT@', + '--name', 'dbxtool', + '--manual', 'User Commands', + '--version-string', fwupd_version, + '--include', extra, + ], + install : true, + install_dir : join_paths(mandir, 'man1'), + ) +endif + run_target('fuzz-efidbx', command: [ join_paths(meson.source_root(), 'contrib/afl-fuzz.py'), diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 113e97d8e187..5f1044aff07a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,6 +16,8 @@ architectures: apps: dfu-tool: command: dfu-tool.wrapper + dbxtool: + command: dbxtool.wrapper fwupdtool: command: fwupdtool.wrapper completer: @@ -299,6 +301,7 @@ parts: source: contrib/snap stage: - dfu-tool.wrapper + - dbxtool.wrapper - fwupd-command - fwupdtool.wrapper - fwupd.wrapper