-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changelog: new-command: vdb-report-snapshot
- Loading branch information
1 parent
6cd884c
commit d7905fb
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
# ABSTRACT: Takes a snapshot of your portage package state for debugging | ||
|
||
source "${LIBDIR}/core-functions.sh" || exit 1 | ||
|
||
[[ $# == 1 ]] || die "Expected argument [tar.xz] in: ${cmdname} [tar.xz]" | ||
|
||
require_bin tar app-arch/tar | ||
|
||
set -euo pipefail | ||
|
||
tarfile=$1 | ||
|
||
shift; | ||
|
||
tar -caf "${tarfile}" \ | ||
-C "${EPREFIX:-/}" \ | ||
--exclude CONTENTS \ | ||
--exclude '*.ebuild' \ | ||
--exclude 'environment.bz2' \ | ||
--exclude 'NEEDED*' \ | ||
--no-xattrs \ | ||
--sort=name \ | ||
--no-acls \ | ||
--no-selinux \ | ||
--exclude-vcs \ | ||
--exclude-vcs-ignores \ | ||
--dereference \ | ||
-v \ | ||
--totals \ | ||
./etc/portage \ | ||
./var/db/pkg \ | ||
$(cd ${EPREFIX:-/} && echo ./var/lib/portage/world* ) | ||
|
||
# help: Invocation | ||
# help: gentoo-perl vdb-report-snapshot /tmp/vdb.tar.xz | ||
# help: | ||
# help: Outputs: | ||
# help: A .tar.xz file of a minimal subset of the following portage | ||
# help: files for the purpose of reporting portage dependency resolution | ||
# help: issues: | ||
# help: - /var/db/pkg | ||
# help: - /etc/portage | ||
# help: - /var/lib/portage/world* | ||
# help: | ||
# help: PRIVACY NOTE | ||
# help: although most of the files collected by this process | ||
# help: are *probably* OK and not leaking anything interesting, | ||
# help: there's still substantial room for personal stuff to leak. | ||
# help: | ||
# help: It can also serve as a data file for using in an attack, as knowing | ||
# help: the exact versions of software you run can help a wouldbe attacker | ||
# help: specialise their attack. | ||
# help: | ||
# help: Subsequently, use this command wisely or not at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters