Skip to content

Commit

Permalink
Move clevis-zfs-common to /usr/libexec
Browse files Browse the repository at this point in the history
  • Loading branch information
lowjoel committed Sep 28, 2024
1 parent 90dfddb commit fc9e6a6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/initramfs-tools/hooks/clevis-zfs.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ copy_exec @bindir@/clevis-decrypt-tang || die 1 "@bindir@/clevis-decrypt-tang no
copy_exec @bindir@/clevis-decrypt-sss || die 1 "@bindir@/clevis-decrypt-sss not found"
copy_exec @bindir@/clevis-decrypt-null || die 1 "@bindir@/clevis-decrypt-null not found"
copy_exec @bindir@/clevis-decrypt || die 1 "@bindir@/clevis-decrypt not found"
copy_exec @bindir@/clevis-zfs-common || die 1 "@bindir@/clevis-zfs-common not found"
copy_exec @libexecdir@/clevis-zfs-common || die 1 "@libexecdir@/clevis-zfs-common not found"
copy_exec @bindir@/clevis-zfs-unlock || die 1 "@bindir@/clevis-zfs-unlock not found"
if [ -x @bindir@/clevis-decrypt-tpm2 ]; then
copy_exec @bindir@/clevis-decrypt-tpm2 || die 1 "@bindir@/clevis-decrypt-tpm2 not found"
Expand Down
2 changes: 1 addition & 1 deletion src/zfs/clevis-zfs-bind
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ function main() {
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
. clevis-zfs-common
. @libexecdir@/clevis-zfs-common
main "${@}"
fi
2 changes: 1 addition & 1 deletion src/zfs/clevis-zfs-list
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ main() {
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
. clevis-zfs-common
. @libexecdir@/clevis-zfs-common
main "${@}"
fi
2 changes: 1 addition & 1 deletion src/zfs/clevis-zfs-unbind
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ function main() {
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
. clevis-zfs-common
. @libexecdir@/clevis-zfs-common
main "${@}"
fi
2 changes: 1 addition & 1 deletion src/zfs/clevis-zfs-unlock
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ function testing() {
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
. clevis-zfs-common
. @libexecdir@/clevis-zfs-common
main "${@}"
fi
27 changes: 21 additions & 6 deletions src/zfs/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-bind')
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-common')
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-list')
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-test')
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-unbind')
bins += join_paths(meson.current_source_dir(), 'clevis-zfs-unlock')
install_data(
[join_paths(meson.current_source_dir(), 'clevis-zfs-common')],
install_dir: libexecdir
)

zfs_bins = [
'clevis-zfs-bind',
'clevis-zfs-list',
'clevis-zfs-unbind',
'clevis-zfs-unlock',
]
foreach b : zfs_bins
configure_file(
input: b,
output: b,
install_dir: bindir,
configuration: data
)
endforeach

test('clevis-zfs-test', find_program(join_paths(meson.current_source_dir(), 'clevis-zfs-test')))

0 comments on commit fc9e6a6

Please sign in to comment.