Skip to content

Commit

Permalink
Install the new dbx utility as fwupdbxtool
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed Aug 18, 2020
1 parent fd0ee51 commit 58ba785
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/fwupd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions contrib/snap/dbxtool.wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec "$SNAP/fwupd-command" $SNAP/bin/dbxtool $@
7 changes: 7 additions & 0 deletions plugins/uefi-dbx/dbxtool.h2m
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions plugins/uefi-dbx/fu-dbxtool.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (C) 2015-2017 Peter Jones <[email protected]>
* Copyright (C) 2020 Richard Hughes <[email protected]>
*
* SPDX-License-Identifier: LGPL-2.1+
Expand Down
22 changes: 22 additions & 0 deletions plugins/uefi-dbx/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
3 changes: 3 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ architectures:
apps:
dfu-tool:
command: dfu-tool.wrapper
dbxtool:
command: dbxtool.wrapper
fwupdtool:
command: fwupdtool.wrapper
completer:
Expand Down Expand Up @@ -299,6 +301,7 @@ parts:
source: contrib/snap
stage:
- dfu-tool.wrapper
- dbxtool.wrapper
- fwupd-command
- fwupdtool.wrapper
- fwupd.wrapper
Expand Down

0 comments on commit 58ba785

Please sign in to comment.