Skip to content

Commit 62ef386

Browse files
committed
debian: Package split part 2
1 parent 754ffc4 commit 62ef386

File tree

9 files changed

+32
-178
lines changed

9 files changed

+32
-178
lines changed

debian/install

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
1-
# shell scripts in the tree
2-
sbin/safeboot usr/sbin/
3-
sbin/safeboot-tpm-unseal usr/sbin/
1+
# shell script commands
42
sbin/tpm2-attest usr/sbin/
53
sbin/tpm2-pcr-validate usr/sbin/
64

7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
9-
functions.sh etc/safeboot/
10-
11-
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
15-
16-
# Compiled with modifications from source
17-
# to add support for the pkcs11 engine (sbsign),
18-
# hostnames and small qrcodes (tpm2-totp),
19-
# and bundle all tpm2 applications in a single script (tpm2)
20-
bin/sbsign.safeboot usr/sbin/
21-
bin/sign-efi-sig-list.safeboot usr/sbin/
22-
bin/tpm2-totp usr/sbin/
23-
bin/tpm2 usr/sbin/
24-
25-
# scripts to interface with secure boot in the initramfs
26-
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/
27-
initramfs/hooks/safeboot-hooks etc/initramfs-tools/hooks/
28-
initramfs/scripts/dmverity-root etc/initramfs-tools/scripts/local-premount/
29-
initramfs/scripts/blockdev-readonly etc/initramfs-tools/scripts/local-premount/
30-
initramfs/scripts/safeboot-bootmode etc/initramfs-tools/scripts/init-top/
5+
# libexec shell scripts
6+
sbin/getkeytab usr/libexec/safeboot/
Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
11
# shell scripts in the tree
2-
sbin/safeboot usr/sbin/
3-
sbin/safeboot-tpm-unseal usr/sbin/
4-
sbin/tpm2-attest usr/sbin/
5-
sbin/tpm2-pcr-validate usr/sbin/
6-
7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
9-
functions.sh etc/safeboot/
10-
11-
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
15-
16-
# Compiled with modifications from source
17-
# to add support for the pkcs11 engine (sbsign),
18-
# hostnames and small qrcodes (tpm2-totp),
19-
# and bundle all tpm2 applications in a single script (tpm2)
20-
bin/sbsign.safeboot usr/sbin/
21-
bin/sign-efi-sig-list.safeboot usr/sbin/
22-
bin/tpm2-totp usr/sbin/
23-
bin/tpm2 usr/sbin/
24-
25-
# scripts to interface with secure boot in the initramfs
26-
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/
27-
initramfs/hooks/safeboot-hooks etc/initramfs-tools/hooks/
28-
initramfs/scripts/dmverity-root etc/initramfs-tools/scripts/local-premount/
29-
initramfs/scripts/blockdev-readonly etc/initramfs-tools/scripts/local-premount/
30-
initramfs/scripts/safeboot-bootmode etc/initramfs-tools/scripts/init-top/
2+
sbin/attest-enroll usr/sbin/
3+
sbin/attest-verify
4+
sbin/attest-server usr/sbin/
5+
# XXX
6+
sbin/attest-server-sub.py usr/sbin/
7+
8+
# These are delivered by safeboot-attest-client for now until we split them up
9+
# sbin/tpm2-attest usr/sbin/
10+
# sbin/tpm2-pcr-validate usr/sbin/
11+
12+
# libexec shell scripts
13+
sbin/gencert usr/libexec/safeboot/
14+
sbin/genkeytab usr/libexec/safeboot/

debian/safeboot-boot.install

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
# shell scripts in the tree
22
sbin/safeboot usr/sbin/
33
sbin/safeboot-tpm-unseal usr/sbin/
4-
sbin/tpm2-attest usr/sbin/
5-
sbin/tpm2-pcr-validate usr/sbin/
6-
7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
9-
functions.sh etc/safeboot/
10-
11-
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
154

165
# Compiled with modifications from source
176
# to add support for the pkcs11 engine (sbsign),
187
# hostnames and small qrcodes (tpm2-totp),
198
# and bundle all tpm2 applications in a single script (tpm2)
209
bin/sbsign.safeboot usr/sbin/
2110
bin/sign-efi-sig-list.safeboot usr/sbin/
22-
bin/tpm2-totp usr/sbin/
23-
bin/tpm2 usr/sbin/
2411

2512
# scripts to interface with secure boot in the initramfs
2613
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/

debian/safeboot-tpm2-tools.install

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
# shell scripts in the tree
2-
sbin/safeboot usr/sbin/
3-
sbin/safeboot-tpm-unseal usr/sbin/
4-
sbin/tpm2-attest usr/sbin/
5-
sbin/tpm2-pcr-validate usr/sbin/
6-
7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
9-
functions.sh etc/safeboot/
10-
11-
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
15-
161
# Compiled with modifications from source
172
# to add support for the pkcs11 engine (sbsign),
183
# hostnames and small qrcodes (tpm2-totp),
194
# and bundle all tpm2 applications in a single script (tpm2)
20-
bin/sbsign.safeboot usr/sbin/
21-
bin/sign-efi-sig-list.safeboot usr/sbin/
22-
bin/tpm2-totp usr/sbin/
235
bin/tpm2 usr/sbin/
24-
25-
# scripts to interface with secure boot in the initramfs
26-
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/
27-
initramfs/hooks/safeboot-hooks etc/initramfs-tools/hooks/
28-
initramfs/scripts/dmverity-root etc/initramfs-tools/scripts/local-premount/
29-
initramfs/scripts/blockdev-readonly etc/initramfs-tools/scripts/local-premount/
30-
initramfs/scripts/safeboot-bootmode etc/initramfs-tools/scripts/init-top/

debian/safeboot-tpm2-totp.install

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
# shell scripts in the tree
2-
sbin/safeboot usr/sbin/
3-
sbin/safeboot-tpm-unseal usr/sbin/
4-
sbin/tpm2-attest usr/sbin/
5-
sbin/tpm2-pcr-validate usr/sbin/
6-
7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
9-
functions.sh etc/safeboot/
10-
11-
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
15-
161
# Compiled with modifications from source
172
# to add support for the pkcs11 engine (sbsign),
183
# hostnames and small qrcodes (tpm2-totp),
194
# and bundle all tpm2 applications in a single script (tpm2)
20-
bin/sbsign.safeboot usr/sbin/
21-
bin/sign-efi-sig-list.safeboot usr/sbin/
225
bin/tpm2-totp usr/sbin/
23-
bin/tpm2 usr/sbin/
24-
25-
# scripts to interface with secure boot in the initramfs
26-
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/
27-
initramfs/hooks/safeboot-hooks etc/initramfs-tools/hooks/
28-
initramfs/scripts/dmverity-root etc/initramfs-tools/scripts/local-premount/
29-
initramfs/scripts/blockdev-readonly etc/initramfs-tools/scripts/local-premount/
30-
initramfs/scripts/safeboot-bootmode etc/initramfs-tools/scripts/init-top/

debian/safeboot.install

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
# shell scripts in the tree
2-
sbin/safeboot usr/sbin/
3-
sbin/safeboot-tpm-unseal usr/sbin/
4-
sbin/tpm2-attest usr/sbin/
5-
sbin/tpm2-pcr-validate usr/sbin/
6-
7-
# configuration files and helper functions
8-
safeboot.conf etc/safeboot/
1+
# Shell functions library
92
functions.sh etc/safeboot/
3+
functions.sh usr/lib/safeboot/
104

115
# TPM certs and a script to refresh them
12-
tpm-certs.txt etc/safeboot/
13-
refresh-certs etc/safeboot/
14-
certs/* etc/safeboot/certs/
15-
16-
# Compiled with modifications from source
17-
# to add support for the pkcs11 engine (sbsign),
18-
# hostnames and small qrcodes (tpm2-totp),
19-
# and bundle all tpm2 applications in a single script (tpm2)
20-
bin/sbsign.safeboot usr/sbin/
21-
bin/sign-efi-sig-list.safeboot usr/sbin/
22-
bin/tpm2-totp usr/sbin/
23-
bin/tpm2 usr/sbin/
24-
25-
# scripts to interface with secure boot in the initramfs
26-
initramfs/hooks/dmverity-root etc/initramfs-tools/hooks/
27-
initramfs/hooks/safeboot-hooks etc/initramfs-tools/hooks/
28-
initramfs/scripts/dmverity-root etc/initramfs-tools/scripts/local-premount/
29-
initramfs/scripts/blockdev-readonly etc/initramfs-tools/scripts/local-premount/
30-
initramfs/scripts/safeboot-bootmode etc/initramfs-tools/scripts/init-top/
6+
tpm-certs.txt usr/share/safeboot/
7+
refresh-certs usr/share/safeboot/
8+
certs/* usr/share/safeboot/certs/

functions.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,17 @@ safeboot_dir() {
2424
[[ -n $1 ]] \
2525
|| die "Internal error in caller of safeboot_dir"
2626
case "$1" in
27-
bin) echo "$TOP/bin";;
27+
bin) echo "$TOP/sbin";;
2828
lib) echo "$TOP/lib";;
29+
libexec|share)
30+
if [[ $TOP = /usr && -d /usr/${1}/safeboot ]]; then
31+
echo "/usr/${1}/safeboot"
32+
elif [[ -d $TOP/${1} ]]; then
33+
echo "$TOP/${1}"
34+
else
35+
echo "/etc/safeboot"
36+
fi;;
37+
certs) echo "$(safeboot_dir libexec)/certs";;
2938
etc) if [[ $TOP = /usr ]]; then
3039
echo "/etc/safeboot"
3140
elif [[ -d $TOP/etc/safeboot ]]; then

sbin/tpm2-attest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ verify()
394394

395395
QUOTE_TAR="$1"
396396
NONCE="$2"
397-
CA_ROOT="${3:-$PREFIX$DIR/certs}"
397+
CA_ROOT="${3:-$(safeboot_dir certs)}"
398398

399399
unpack-quote "$QUOTE_TAR" \
400400
|| die "$QUOTE_TAR: unable to unpack"

0 commit comments

Comments
 (0)