ca-certificates-wip-donotuse (2396B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.539513a18a06a21e4660004fea30f3658959c5c7f54488b66b5fee7120b0c27c 3 #+busybox-findutils.3ba95afbbde5f39d6a3c0b17d82ff2e5350904cf19dd40acdf1c60ed126d3bda 4 #+busybox-awk.4ac003d165540d0084cd08c1386f136343851ef344ac5ff844769b058049d859 5 #+certdata2pem.f39498f80a9caa6803a0ef1c52daf573b6a3f1b256fcdc8161bcbda57f42e1f1 6 #@untar:-j:sha256:6ef7bc56cc0e0b307d99a3c494119686091cc1d4ad08986d68aa089dd00c7788:. 7 8 9 # - build script start - 10 11 prefix=/versions/$pthbs_package 12 dest=${pthbs_destdir%/}${prefix} 13 cd 'ca-certificates-20241121' 14 15 16 touch blacklist.txt # TODO! 17 certdata2pem 18 19 install -d "${dest}/config/ssl/certs" 20 for file in ./*.crt; do 21 install -m 644 $file "${dest}/config/ssl/certs" 22 printf '# %s\n' $file >>"${dest}/config/ssl/certs/ca-certificates.crt" 23 cat $file >>"${dest}/config/ssl/certs/ca-certificates.crt" 24 done 25 26 27 28 29 30 cd "$pthbs_destdir/versions/$pthbs_package" 31 find -type d -o -print | awk -F/ ' 32 BEGIN { 33 x["./config/ssl/certs/ISRG_Root_X1.crt"]=1 34 x["./config/ssl/certs/ISRG_Root_X2.crt"]=1 35 } 36 37 function r1(s) { 38 sub("^[.]/[^/]*", ".", s) 39 return s 40 } 41 function s1(repl, s) { 42 sub("^[.]/[^/]*", "./"repl, s) 43 return s 44 } 45 function link(src) { 46 x[$0]=0 47 printf "%s\t%s\n", $0, src 48 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 49 } 50 $1!="."{exit 1} 51 52 53 $2 == "config" { link($0); next } 54 55 $2 == "config" { link($0); next } 56 $2 == "keys" { link($0); next } 57 $2 == "zsh" { link($0); next } 58 $2 == "env" { link($0); next } 59 $2 == "command" { link($0); next } 60 $2 == "bin" { link(s1("command", $0)); next } 61 62 $2 == "library.so" { link($0); next } 63 $2 == "library" { link($0); next } 64 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 65 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 66 67 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } 68 69 $2 == "man" { link($0); next } 70 $2 == "info" { link($0); next } 71 $2 == "doc" { link($0); next } 72 $2 == "icons" { link($0); next } 73 $2 == "terminfo" { link($0); next } 74 $2 == "data" { link($0); next } 75 $2 == "include" { link($0); next } 76 77 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 78 79 END { 80 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 81 for(fname in x) { 82 if(x[fname]) { 83 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 84 exit 3 85 } 86 } 87 }' >.install-links.new 88 mv .install-links.new .install-links 89