README.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ===============================================================================
  2. LIBERTYBSD-SCRIPTS For deblobbing OpenBSD
  3. ===============================================================================
  4. Scripts used to deblob and rebrand OpenBSD source-code, made for the
  5. LibertyBSD project. You can get OBSD sources from your local mirror
  6. at https://www.openbsd.org/ftp.html, as the 'src', 'xenocara', or 'sys'
  7. tarballs. CVS can be used, as well.
  8. ----------------------------------------
  9. SCRIPTS
  10. ----------------------------------------
  11. There're five scripts here, so here's what they do:
  12. src_deblob.sh Deblobs main OBSD source of NF FW, references, etc
  13. man_deblob.sh Gets rid of pages with non-free (NF) references
  14. sys_deblob.sh Deletes NF firmware and references thereof from kernel
  15. src_rebrand.sh Basic system rebranding, etc
  16. sys_rebrand.sh System/boot rebranding
  17. man_rebrand.sh Rebrand man-pages, and add some of our new ones
  18. xenocara_rebrand.sh
  19. Rebrands X sources-- not much to this one
  20. ports_deblob.sh
  21. Deblob ports tree of all NF listings
  22. ports_rebrand.sh
  23. Rebrand ports in ports-tree, etc
  24. ----------------------------------------
  25. USAGE
  26. ----------------------------------------
  27. Usage of these scripts is pretty simple-- to make freshly deblobbed OBSD
  28. sources, just run them each with the argument being the directory of the
  29. corresponding source-code, like so:
  30. sh src_deblob.sh /usr/src
  31. sh man_deblob.sh /usr/src
  32. sh sys_deblob.sh /usr/src/sys
  33. sh xenocara_rebrand.sh /usr/xenocara
  34. sh ports_deblob.sh /usr/ports
  35. If you want liberated OpenBSD sources, but without the LibertyBSD rebranding,
  36. just skip the *_rebrand.sh scripts and everything should go fine.
  37. ----------------------------------------
  38. NOTES
  39. ----------------------------------------
  40. All of the scripts make use of "./libdeblob.sh", and all file-editing/etc
  41. operations are abstracted to its functions.
  42. This is because instead of actually applying changes directly to OBSD
  43. sources, the deblob scripts create a set of patches for them, and *then*
  44. apply them.
  45. You might want to perform multiple operations on a given file, (I.E.,
  46. substitute text, then remove a line, etc.). After every operation, a new
  47. (modified) version of the file is created in the /tmp/ directory, along with
  48. a patch. So if you want to do multiple operations, you'll need to decide
  49. whether or not to use the original source-code, or a modified version from
  50. /tmp/...
  51. This has been abstracted away with the "ifile" and "ofile" functions.
  52. "ifile" outputs to stdout the contents of the file-- be it the patch-file, the
  53. original, whatever is appropriate. "ofile" writes to the patch-file what is
  54. piped to it, and handles the bullocks.
  55. Hence why "ifile | operation | ofile" is so common in libdeblob.sh
  56. Each script uses a very clearly-named /tmp/ directory...
  57. /tmp/script-name/
  58. While it is a *tad* bit weird do all of this indirect work on the sources, it
  59. has a few advantages I'd like to stick with:
  60. * Abstraction.
  61. Operations are all very general and unspecific; you don't need
  62. to manually muck with `sed` for every individual patch.
  63. * Easy debugging.
  64. If there's a problem, you can stop the script before it patches
  65. original sources, and look at the /tmp/ data. Compare the
  66. .orig with the .patch with the modified, etc. Very useful.
  67. * Patch generation.
  68. With patches being integral to the entire process, it makes all
  69. changes made to OBSD source code very transparent. Anyone could
  70. take a look at a tarball of the patches and understand *exactly*
  71. what changed.
  72. There're probably some other obscure use-cases for these
  73. patches, anyway. And if it's easy to support a weird
  74. hypothetical use-case, why not?
  75. ... in order of importance.
  76. ----------------------------------------
  77. BORING STUFF
  78. ----------------------------------------
  79. Send patches/issues to:
  80. </f/libertybsd> (raddle.me)
  81. <#libertybsd> (Freenode)
  82. <jadedctrl@teknik.io>
  83. <LibertyBSD/libertybsd-scripts> (NotABug)
  84. License is ISC (COPYING.txt)
  85. Author is Jaidyn Ann <jadedctrl@teknik.io>
  86. Some ports contributions by jmfgdef (Jimmybot),
  87. Some improvements by Einhard Leichtfuß.
  88. Source is at https://notabug.org/LibertyBSD/libertybsd-scripts