Compare commits
2 commits
d415066add
...
a6de269de5
| Author | SHA1 | Date | |
|---|---|---|---|
| a6de269de5 | |||
| 55c25299da |
5 changed files with 44 additions and 23 deletions
12
meson.build
12
meson.build
|
|
@ -1,14 +1,8 @@
|
||||||
# Project definition
|
# Project definition
|
||||||
project('zlevis', license: 'GPL3')
|
project('zlevis', license: 'GPL3', version: '2.3')
|
||||||
|
|
||||||
# Define bindir
|
# Define bin dir
|
||||||
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||||
|
|
||||||
# Define bins list
|
|
||||||
bins = []
|
|
||||||
|
|
||||||
# Define subdir with bins
|
# Define subdir with bins
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
|
||||||
# Install bins in bindir
|
|
||||||
install_data(bins, install_dir: bindir)
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# Find scripts
|
# Find the scripts
|
||||||
main = find_program('zlevis')
|
frontend = find_program('zlevis.in')
|
||||||
encrypt = find_program('zlevis-encrypt')
|
encrypt = find_program('zlevis-encrypt.in')
|
||||||
decrypt = find_program('zlevis-decrypt')
|
decrypt = find_program('zlevis-decrypt.in')
|
||||||
|
|
||||||
# Test the scripts
|
# Test the scripts
|
||||||
test('zlevis', main, args: '--summary')
|
test('zlevis', frontend, args: '--summary')
|
||||||
test('zlevis-encrypt', encrypt, args: '--summary')
|
test('zlevis-encrypt', encrypt, args: '--summary')
|
||||||
test('zlevis-decrypt', decrypt, args: '--summary')
|
test('zlevis-decrypt', decrypt, args: '--summary')
|
||||||
|
|
||||||
# Add paths of scripts to bins
|
# Configure the scripts
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis')
|
configure_file(input: 'zlevis.in', output: 'zlevis', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis-encrypt')
|
configure_file(input: 'zlevis-encrypt.in', output: 'zlevis-encrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis-decrypt')
|
configure_file(input: 'zlevis-decrypt.in', output: 'zlevis-decrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@
|
||||||
# Exit immediately if a command exits with a non-zero status
|
# Exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Summary of the script's functionality
|
# Summary of the functionality of zlevis-decrypt
|
||||||
summary="Decrypts a JWE using a TPM2.0 chip"
|
summary="Decrypts a JWE using a TPM2.0 chip"
|
||||||
|
|
||||||
# TPM2.0 owner hierarchy to be used by the Operating System
|
# Version of zlevis
|
||||||
|
version="@VERSION@"
|
||||||
|
|
||||||
|
# TPM2.0 owner hierarchy to be used by the operating system
|
||||||
auth="o"
|
auth="o"
|
||||||
|
|
||||||
# Display summary if requested
|
# Display summary if requested
|
||||||
|
|
@ -15,6 +18,12 @@ if [ "$1" = "--summary" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Display version if requested
|
||||||
|
if [ "$1" = "--version" ]; then
|
||||||
|
echo "$version"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Display usage information if input is from a terminal
|
# Display usage information if input is from a terminal
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
exec >&2
|
exec >&2
|
||||||
|
|
@ -3,9 +3,12 @@
|
||||||
# Exit immediately if a command exits with a non-zero status
|
# Exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Summary of the script's functionality
|
# Summary of the functionality of zlevis-encrypt
|
||||||
summary="Encrypts using a TPM2.0 chip binding policy"
|
summary="Encrypts using a TPM2.0 chip binding policy"
|
||||||
|
|
||||||
|
# Version of zlevis
|
||||||
|
version="@VERSION@"
|
||||||
|
|
||||||
# TPM2.0 owner hierarchy to be used by the Operating System
|
# TPM2.0 owner hierarchy to be used by the Operating System
|
||||||
auth="o"
|
auth="o"
|
||||||
|
|
||||||
|
|
@ -18,6 +21,12 @@ if [ "$1" = "--summary" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Display version if requested
|
||||||
|
if [ "$1" = "--version" ]; then
|
||||||
|
echo "$version"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Display usage information if input is from a terminal
|
# Display usage information if input is from a terminal
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
exec >&2
|
exec >&2
|
||||||
|
|
@ -3,15 +3,24 @@
|
||||||
# Exit immediately if a command exits with a non-zero status
|
# Exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Summary of the script's functionality
|
# Summary of the functionality of zlevis
|
||||||
summary="A tool that enables automatic decryption of ZFS rpools with TPM2"
|
summary="A tool that enables automatic decryption of ZFS rpools with TPM2"
|
||||||
|
|
||||||
|
# Version of zlevis
|
||||||
|
version="@VERSION@"
|
||||||
|
|
||||||
# Display summary if requested
|
# Display summary if requested
|
||||||
if [ "$1" = "--summary" ]; then
|
if [ "$1" = "--summary" ]; then
|
||||||
echo "$summary"
|
echo "$summary"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Display version if requested
|
||||||
|
if [ "$1" = "--version" ]; then
|
||||||
|
echo "$version"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Function to display usage information of zlevis
|
# Function to display usage information of zlevis
|
||||||
info() {
|
info() {
|
||||||
exec >&2
|
exec >&2
|
||||||
Loading…
Add table
Add a link
Reference in a new issue