Metadata-Version: 2.4
Name: verify-checksums
Version: 1.0.19
Summary: An utility to check the hashes of installed RPM packages
Home-page: https://git.altlinux.org/people/nit/packages/verifychecksums.git
Author: Egor Boyko
Author-email: nit@altlinux.org
License: GPL-2.0-only
Keywords: rpm,hash
Classifier: Topic :: System :: Packages
Classifier: Programming Language :: Python :: 3

## Verify-checksums

Checking the hashes of installed rpm packages.

## About 
This utility is created to help verify installed rpm packages

## Requires

* gost12sum
* sha256sum
* md5sum

## Usage

In order to run this utility, you need to pass it the path to the directory that contains files in the ".chksum" format, <br>
that contain information from the original rpm packages. <br>
To run this program, you must sign with superuser rights for successful file verification.

### Arguments

The argument allow you to specify the mounting points where files will be searched.

   | argument                 | Description                                                     |
   |--------------------------|-----------------------------------------------------------------|
   | `--dir <path/to/catalog>` | The directory containing the ".chksum" files.                  |
   | `-f`                     | Displays files with broken hash.                                |
   | `-h`                     | Help.                                                           |
   | `--alg <hash algorithm>` | Determine a hashing algorithm.                                  |
   |                          | By default - `gostsum`.                                         |
   |                          | Available: `sha256sum`, `gostsum`                               |
   | `--R <path/to/rescue>`    | Mounted rescue path with rpm database and with ".chksum" files.|
   | `--list <path/to/list rpm-image>`| Path to list pf rpm images                              |     


### Start
Start:

```
# verify-checksums --dir /path/to/catalog 
```
Start with display files:

```
# verify-checksums --dir /path/to/catalog -f
```
Start with determine a hashing algorithm:

```
# verify-checksums --dir /path/to/catalog --alg <algorithm>
```
Start using multiple dirs:
```
# verify-checksums --dir /path/to/catalog1 --dir /path/to/catalog2
```
Start with rescue path:
```
# verify-checksums --R /path/to/rescue
```
You can also use additional options similarly if you use --dir
```
# verify-checksums --R /path/to/rescue --alg <algorithm> -f 
```
### Note
* The "--R" key cannot be used at the same time as --dir  <br>
* The "--R" key cannot accept more than one argument  <br>
* The "--R" key cannot be used more than once   <br>

### Example
Start:
```
# verify-checksums --dir /path/to/catalog
```
Output:

```
Set the directory to verify: /path/to/catalog/
Create a directory: /root/checksum-verification

Processing /path/to/catalog/file1.chksum (PACKAGE's: 10| FILE's: 40): 
Processing /path/to/catalog/file2.chksum (PACKAGE's: 10| FILE's: 40): 
Processing /path/to/catalog/file3.chksum (PACKAGE's: 10| FILE's: 56): 

**Count of checked packages: 1190**
Report: /root/checksum-verification/report-rpm-found
**Count of missing packages: 3490**
Report: /root/checksum-verification/report-rpm-not-found
**Total count of checked files: 1618**
Report: /root/checksum-verification/report-files-check-ok
**Count of files with broken hash: 7426**
Report: /root/checksum-verification/report-files-check-error

```

Start with -f:
```
# verify-checksums --dir /path/to/catalog -f

path/to/file1
path/to/file2
path/to/file3
path/to/file4

etc.

```
During the execution of the program, will be created

   | Files/Directory                  | Description                                                              |
   |----------------------------------|--------------------------------------------------------------------------|
   | `checksum-verification `         | The directory containing results of execution.                           |
   | `report-rpm-found`               | File containing a list of found packages.                                |
   | `report-rpm-not-found`           | File containing a list of not found packages.                            |
   | `report-files-check-ok`          | File containing a list of successfully checked ELF files.                |
   | `report-files-check-error`       | File containing a list of not successfully checked ELF files.            |
   | `log`                            | Log file                                                                 |
   | `report-rpm-from-image`          | File containing a list of packages from image.                           |
   | `report-rpm-from-repo`           | File containing a list of packages from repo.                            |
   | `report-rpm-from-vendor`         | File containing a list of vendor packages.                               |
   | `report-rpm-from-vendor-removed` | File containing a list of vendor packages that were removed from repo.   |
   | `report-rpm-from-vendor-active`  | File containing a list of vendor packages present in the repo.           |
   | `report-rpm-external`            | File containing a list of packages that were installed from another repo.|


## License
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 2, June 1991

















