File tree Expand file tree Collapse file tree 24 files changed +121
-90
lines changed Expand file tree Collapse file tree 24 files changed +121
-90
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -ex
2
2
3
- COMMON=" meson curl git make file bzip2 jose tang cryptsetup keyutils jq socat ${CC} "
3
+ COMMON=" meson curl git make file bzip2 jose tang cryptsetup keyutils jq socat lsof ${CC} "
4
4
5
5
case " ${DISTRO} " in
6
6
debian:* |ubuntu:* )
@@ -33,7 +33,7 @@ debian:*|ubuntu:*)
33
33
printf ' max_parallel_downloads=10\nfastestmirror=1\n' >> /etc/dnf/dnf.conf
34
34
dnf -y clean all
35
35
dnf -y --setopt=deltarpm=0 update
36
- dnf -y install dnf-utils jq socat cryptsetup keyutils cracklib-dicts
36
+ dnf -y install dnf-utils jq socat cryptsetup keyutils cracklib-dicts lsof
37
37
dnf -y builddep clevis
38
38
;;
39
39
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ trap 'on_exit' ERR
33
33
34
34
TMP=" $( mktemp -d) "
35
35
36
- port= $( tang_new_random_port )
37
- tang_run " ${TMP} " " ${port} "
36
+ tang_run " ${TMP} "
37
+ port= $( tang_get_port " ${TMP} " )
38
38
39
39
url=" http://localhost:${port} "
40
40
cfg=$( printf ' {"url":"%s"}' " $url " )
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ trap 'on_exit' ERR
33
33
34
34
TMP=" $( mktemp -d) "
35
35
36
- port= $( tang_new_random_port )
37
- tang_run " ${TMP} " " ${port} "
36
+ tang_run " ${TMP} "
37
+ port= $( tang_get_port " ${TMP} " )
38
38
39
39
url=" http://localhost:${port} "
40
40
cfg=$( printf ' {"url":"%s"}' " $url " )
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ trap 'on_exit' EXIT
33
33
34
34
TMP=" $( mktemp -d) "
35
35
36
- port= $( tang_new_random_port )
37
- tang_run " ${TMP} " " ${port} "
36
+ tang_run " ${TMP} "
37
+ port= $( tang_get_port " ${TMP} " )
38
38
39
39
url=" http://localhost:${port} "
40
40
ADV=" ${TMP} /adv.jws"
Original file line number Diff line number Diff line change @@ -37,8 +37,9 @@ DEV="${TMP}/luks1-device"
37
37
new_device " luks1" " ${DEV} "
38
38
39
39
# TANG server specifics
40
- port=$( tang_new_random_port)
41
- tang_run " ${TMP} " " ${port} "
40
+ tang_run " ${TMP} "
41
+ port=$( tang_get_port " ${TMP} " )
42
+
42
43
url=" http://localhost:${port} "
43
44
44
45
# Initial binding to ensure luksmeta gets corrupted
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ trap 'on_exit' ERR
36
36
37
37
TMP=" $( mktemp -d) "
38
38
39
- port= $( tang_new_random_port )
40
- tang_run " ${TMP} " " ${port} "
39
+ tang_run " ${TMP} "
40
+ port= $( tang_get_port " ${TMP} " )
41
41
42
42
url=" http://localhost:${port} "
43
43
64
64
65
65
# Now let's have another tang instance running and change the config to use
66
66
# the new one.
67
- port2=$( tang_new_random_port)
68
67
TMP2=" $( mktemp -d) "
69
- tang_run " ${TMP2} " " ${port2} "
68
+ tang_run " ${TMP2} "
69
+ port2=$( tang_get_port " ${TMP2} " )
70
70
new_url=" http://localhost:${port2} "
71
71
new_cfg=$( printf ' {"url":"%s"}' " ${new_url} " )
72
72
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ trap 'on_exit' ERR
36
36
37
37
TMP=" $( mktemp -d) "
38
38
39
- port= $( tang_new_random_port )
40
- tang_run " ${TMP} " " ${port} "
39
+ tang_run " ${TMP} "
40
+ port= $( tang_get_port " ${TMP} " )
41
41
42
42
url=" http://localhost:${port} "
43
43
64
64
65
65
# Now let's have another tang instance running and change the config to use
66
66
# the new one.
67
- port2=$( tang_new_random_port)
68
67
TMP2=" $( mktemp -d) "
69
- tang_run " ${TMP2} " " ${port2} "
68
+ tang_run " ${TMP2} "
69
+ port2=$( tang_get_port " ${TMP2} " )
70
70
new_url=" http://localhost:${port2} "
71
71
new_cfg=$( printf ' {"url":"%s"}' " ${new_url} " )
72
72
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
export TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
export TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ trap 'on_exit' EXIT
32
32
33
33
TMP=$( mktemp -d)
34
34
35
- port= $( tang_new_random_port )
36
- tang_run " ${TMP} " " ${port} "
35
+ tang_run " ${TMP} "
36
+ port= $( tang_get_port " ${TMP} " )
37
37
38
38
url=" http://localhost:${port} "
39
39
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ trap 'on_exit' ERR
30
30
31
31
TMP=" $( mktemp -d) "
32
32
33
- port= $( tang_new_random_port )
34
- tang_run " ${TMP} " " ${port} "
33
+ tang_run " ${TMP} "
34
+ port= $( tang_get_port " ${TMP} " )
35
35
36
36
url=" http://localhost:${port} "
37
37
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ trap 'on_exit' ERR
33
33
34
34
TMP=" $( mktemp -d) "
35
35
36
- port= $( tang_new_random_port )
37
- tang_run " ${TMP} " " ${port} "
36
+ tang_run " ${TMP} "
37
+ port= $( tang_get_port " ${TMP} " )
38
38
39
39
url=" http://localhost:${port} "
40
40
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ trap 'on_exit' ERR
33
33
34
34
TMP=" $( mktemp -d) "
35
35
36
- port= $( tang_new_random_port )
37
- tang_run " ${TMP} " " ${port} "
36
+ tang_run " ${TMP} "
37
+ port= $( tang_get_port " ${TMP} " )
38
38
39
39
url=" http://localhost:${port} "
40
40
adv=" ${TMP} /adv"
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ trap 'on_exit' EXIT
34
34
35
35
TMP=" $( mktemp -d) "
36
36
37
- port= $( tang_new_random_port )
38
- tang_run " ${TMP} " " ${port} "
37
+ tang_run " ${TMP} "
38
+ port= $( tang_get_port " ${TMP} " )
39
39
40
40
url=" http://localhost:${port} "
41
41
data=" just a sample text"
Original file line number Diff line number Diff line change @@ -31,9 +31,8 @@ trap 'on_exit' EXIT
31
31
32
32
TMP=" $( mktemp -d) "
33
33
34
- port=$( tang_new_random_port)
35
-
36
- tang_run " ${TMP} " " ${port} " sig exc
34
+ tang_run " ${TMP} " sig exc
35
+ port=$( tang_get_port " ${TMP} " )
37
36
38
37
thp=" $( jose jwk thp -i " $TMP /db/sig.jwk" ) "
39
38
adv=" ${TMP} /adv.jws"
You can’t perform that action at this time.
0 commit comments