mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

ca-certificates-wip-donotuse (2414B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.d2d7aa00eac6ec561a10d126b1866f22e226a1276307466251e80fd8a4a1ebc7
      3 #+busybox-findutils.85b2328981df683d1ae7597eebdf3a332aa4241b936c0030fe3618cec1f4841a
      4 #+busybox-awk.4c3f8cc249ba35f1206fcaf2979bcfd66d09b117eeea4e6a939024825a542496
      5 #+certdata2pem.87b8512052cc91f89e555e3a3e2d038057ee18b092f0b0772b8a767905f61d76
      6 #@untar:-j:sha256:6ef7bc56cc0e0b307d99a3c494119686091cc1d4ad08986d68aa089dd00c7788:.
      7 
      8 
      9 # - build script start -
     10 
     11 prefix=/home/ccx/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/home/ccx/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