pkgs-checker

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2018 License: GPL-3.0 Imports: 2 Imported by: 0

README

Sabayon Packages Checker

Why

Artefacts created with emerge could be compressed with tar+bz2 not in ordered way and some files must be skipped to avoid injection of some packages that are equal.

How

pkgs-checker processes tarball file and create an MD5 checksum for any file inside package that are not be skipped (by command line options). At EOF create a new MD5 with all MD5 checksum bytes plus list of directories found sorted.

Normally, files to skip are .pyc,.pyo,.mo that contains timestamp data that generate false events for package injection.

Usage

Hereinafter, all available options:

$# pkgs-checker --help
Sabayon packages checker

Usage:
   [flags]

Examples:
$> pkgs-checker -p /usr/portage/packages/sys-app/entropy-9999.tbz2

$> pkgs-checker -e .pyc -e .pyo -e .mo -e .bz2 --directory /usr/portage/packages/

Flags:
  -c, --concurrency                Enable concurrency process.
  -d, --directory string           Artefacts directory with .tbz2 files.
      --hash-empty                 If create a fake hash for empty packages or use 00000000000000000000000000000000.
  -f, --hashfile string            Path of hashfile where write checksum.
                                   Default output on stdout with format: HASH <CHECKSUM> <PACKAGE>
  -h, --help                       help for this command
  -i, --ignore strings             File to ignore.
  -e, --ignore-extension strings   Extension to ignore.
  -l, --logfile string             Logfile Path. Optional.
  -L, --loglevel string            Set logging level.
                                   [DEBUG, INFO, WARN, ERROR] (default "INFO")
  -p, --package strings            Path of package to check.
      --stdin                      Read package data from stdin
  -v, --verbose                    Enable verbose logging on stdout.
      --version                    version for this command

Task for Next Release:

  • Add support to stdin processing

  • Add support to different checksum algorithms

Documentation

Overview

Copyright (C) 2017-2018 Daniele Rondina <geaaru@sabayonlinux.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL