logo

go-deblob

Remove binary blobs from a directory (deprecated, consider <https://git.sr.ht/~lanodan/deblob> instead) git clone https://hacktivis.me/git/go-deblob.git

go-deblob.1 (1591B)


  1. .\" This file is part of https://hacktivis.me/git/go-deblob
  2. .\" Copyright © 2019 Haelwenn (lanodan) Monnier <contact+go-deblob-notice@hacktivis.me>
  3. .\" SPDX-License-Identifier: BSD-3-Clause
  4. .Dd 2019-12-11
  5. .Dt go-deblob 1
  6. .Os
  7. .Sh NAME
  8. .Nm go-deblob
  9. .Nd remove binary blobs from a directory
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Fl n
  13. .Op Fl e Ar excluded paths
  14. .Op Fl d Ar working directory
  15. .Sh DESCRIPTION
  16. The
  17. .Nm
  18. utility cleans a directory from binary blobs, for instance an extracted source tarball to be sure that it fully builds from source. Scanning for blobs inside source files is considered to be out-of-scope for now as
  19. .Lk https://www.fsfla.org/svn/fsfla/software/linux-libre/scripts/ linux-libre deblob script
  20. already exists.
  21. .Pp
  22. The options are as follows:
  23. .Bl -tag -width Ds
  24. .It Fl n
  25. Scan the files but do not actually delete them.
  26. .It Fl e Ar excluded paths
  27. Paths to be excluded from removal, accepts shell globbing with Golang path.Match. Pass the option multiple times to do multiple exclusions.
  28. .It Fl d Ar working directory
  29. Directory to be scanned rather than the current working directory on execution.
  30. .El
  31. .Pp
  32. Blobs scanned against are the following:
  33. .Bl -dash -compact
  34. .It
  35. ELF files by the magic-header
  36. .It
  37. .Xr ar 1
  38. files by the magic-header
  39. .It
  40. x86 IBM PC BIOS Option Rom
  41. .El
  42. .Sh EXAMPLES
  43. The following code block show how it is intended to be used in Gentoo's
  44. .Pa /etc/portage/bashrc :
  45. .Bd -literal
  46. if [ "${EBUILD_PHASE}" == "prepare" ]
  47. then
  48. go-deblob -e 'test*' -e '*/test*' -d "${WORKDIR}"
  49. fi
  50. .Ed
  51. .Sh AUTHORS
  52. .An Haelwenn (lanodan) Monnier Aq Mt contact+go-deblob-mdoc@hacktivis.me