go-deblob.1 (1591B)
- .\" This file is part of https://hacktivis.me/git/go-deblob
- .\" Copyright © 2019 Haelwenn (lanodan) Monnier <contact+go-deblob-notice@hacktivis.me>
- .\" SPDX-License-Identifier: BSD-3-Clause
- .Dd 2019-12-11
- .Dt go-deblob 1
- .Os
- .Sh NAME
- .Nm go-deblob
- .Nd remove binary blobs from a directory
- .Sh SYNOPSIS
- .Nm
- .Op Fl n
- .Op Fl e Ar excluded paths
- .Op Fl d Ar working directory
- .Sh DESCRIPTION
- The
- .Nm
- 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
- .Lk https://www.fsfla.org/svn/fsfla/software/linux-libre/scripts/ linux-libre deblob script
- already exists.
- .Pp
- The options are as follows:
- .Bl -tag -width Ds
- .It Fl n
- Scan the files but do not actually delete them.
- .It Fl e Ar excluded paths
- Paths to be excluded from removal, accepts shell globbing with Golang path.Match. Pass the option multiple times to do multiple exclusions.
- .It Fl d Ar working directory
- Directory to be scanned rather than the current working directory on execution.
- .El
- .Pp
- Blobs scanned against are the following:
- .Bl -dash -compact
- .It
- ELF files by the magic-header
- .It
- .Xr ar 1
- files by the magic-header
- .It
- x86 IBM PC BIOS Option Rom
- .El
- .Sh EXAMPLES
- The following code block show how it is intended to be used in Gentoo's
- .Pa /etc/portage/bashrc :
- .Bd -literal
- if [ "${EBUILD_PHASE}" == "prepare" ]
- then
- go-deblob -e 'test*' -e '*/test*' -d "${WORKDIR}"
- fi
- .Ed
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+go-deblob-mdoc@hacktivis.me