src_deblob.sh 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #!/bin/sh
  2. ########################################
  3. # name: src_deblob.sh
  4. # main: jadedctrl
  5. # lisc: isc
  6. # desc: delobbing obsd base sources for
  7. # use in lbsd.
  8. ########################################
  9. . ./libdeblob.sh
  10. if test -z "$1"; then
  11. echo "usage: src_deblob.sh source_dir";
  12. exit 2
  13. else
  14. SRC_DIR="$1"
  15. fi
  16. PATCH_DIR=/tmp/src_deblob/
  17. mkdir "$PATCH_DIR" 2> /dev/null
  18. # --------------------------------------
  19. arch_list="amd64 i386"
  20. blobs="4c9904 3c990 3c990-license atu-at76c503-i3863-ext"
  21. blobs="$blobs atu-at76c503-i3863-int atu-at76c503-rfmd-acc-ext"
  22. blobs="$blobs atu-at76c503-rfmd-acc-int atu-at76c505-rfmd-ext"
  23. blobs="$blobs atu-at76c505-rfmd-int atu-intersil-ext atu-intersil-int"
  24. blobs="$blobs atu-license atu-rfmd-ext atu-rfmd-int atu-rfmd2958-ext"
  25. blobs="$blobs atu-rfmd2958-int atu-rfmd2958smc-ext atu-rfmd2958smc-int bnx-b06"
  26. blobs="$blobs bnx-b09 bnx-license bnx-rv2p bnx-xi-rv2p bnx-xi90-rv2p cs4280"
  27. blobs="$blobs cs4280-license fxp-d101a fxp-d101b0 fxp-d101ma fxp-d101s fxp-d102"
  28. blobs="$blobs fxp-d102c fxp-d102e fxp-license kue kue-license myx-eth_z8e"
  29. blobs="$blobs myx-ethp_z8e myx-license ral-license ral-rt2561 ral-rt2561s"
  30. blobs="$blobs ral-rt2661 ral-rt2860 ral-rt3290 rum-license rum-rt2573"
  31. blobs="$blobs run-license run-rt2870 run-rt3071 symbol-eprim symbol-esec"
  32. blobs="$blobs symbol-license tht tht-license tigon-license tigon1 tigon2"
  33. blobs="$blobs tusb3410 tusb3410-license udl_huffman yds yds-license zd1211"
  34. blobs="$blobs zd1211-license zd1211b"
  35. for arch in $arch_list; do
  36. for blob in $blobs; do
  37. linedel "/etc/firmware/${firmware}" \
  38. "distrib/${arch}/ramdisk_cd/list"
  39. linedel "./etc/firmware/$blob" \
  40. "distrib/sets/lists/base/md.${arch}"
  41. done
  42. echo
  43. done
  44. # --------------------------------------
  45. for arch in $arch_list
  46. do
  47. linedel "./usr/libdata/perl5/OpenBSD/FwUpdate.pm" \
  48. "distrib/sets/lists/base/md.${arch}"
  49. linedel "./usr/sbin/fw_update" "distrib/sets/lists/base/md.${arch}"
  50. echo
  51. done
  52. # --------------------------------------
  53. rep "\^OpenBSD " "\^LibertyBSD " usr.sbin/syspatch/syspatch.sh
  54. rep "openbsd-" "libertybsd-" usr.sbin/syspatch/syspatch.sh
  55. rep "MIRROR=https://cdn.openbsd.org/pub/OpenBSD" \
  56. "MIRROR=https://ftp.libertybsd.net/pub/LibertyBSD" \
  57. usr.sbin/syspatch/syspatch.sh
  58. rep "\^OpenBSD " "\^LibertyBSD " usr.sbin/sysupgrade/sysupgrade.sh
  59. rep "openbsd-" "libertybsd-" usr.sbin/sysupgrade/sysupgrade.sh
  60. rep "MIRROR=https://cdn.openbsd.org/pub/OpenBSD" \
  61. "MIRROR=https://ftp.libertybsd.net/pub/LibertyBSD" \
  62. usr.sbin/sysupgrade/sysupgrade.sh
  63. # --------------------------------------
  64. linedel "./usr/libdata/perl5/OpenBSD/FwUpdate.pm" distrib/sets/lists/base/mi
  65. linedel "./usr/sbin/fw_update" distrib/sets/lists/base/mi
  66. linedel "pkg_add pkg_sign" usr.sbin/pkg_add/Makefile
  67. rep "pkg_add fw_update" "pkg_add pkg_sign" usr.sbin/pkg_add/Makefile
  68. strdel "fw_update.1" usr.sbin/pkg_add/Makefile
  69. strdel "fw_update" usr.sbin/pkg_add/Makefile
  70. linedel "FwUpdate.pm" usr.sbin/pkg_add/Makefile
  71. echo
  72. # --------------------------------------
  73. echo "Applying..."
  74. apply