Metadata-Version: 2.1
Name: verify-checksums
Version: 1.0.14
Description-Content-Type: text/markdown

## 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. | 


### 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`                    | Program operation log.                                         |

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

















