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