Build & Install
---------------

For local build run:

    make local

And then the CLI is ready to be run from the current directory:

    ./checksumgen

To make a system-wide installation run:

    make
    make install


Basic usage
-----------

    checksumgen [ options ] BASEDIR ARCH

For instance, to generate checksum list of all x86_64 RPMs in a repo:

    checksumgen [-v] -o allsums07 /mnt/ftppool/private/c10f2/date/2024/07/07 x86_64

Almost the same, but calculates checksums for only a subset of package
names:

    checksumgen [-v] -b baselist -o sums07 /mnt/ftppool/private/c10f2/date/2024/07/07 x86_64

Now, to generate an incremental checksum file, use:

    checksumgen [-v] -b baselist -p sums07 -o sums+09 /mnt/ftppool/private/c10f2/date/2024/07/09 x86_64

In order to append this increment on the fly to existing checksums
use:

    checksumgen [-v] -b baselist -a -p sums07 -o sums0709 /mnt/ftppool/private/c10f2/date/2024/07/09 x86_64

Finally, to produce a complete list faster by utilising the previous
checksum list, use:

    checksumgen [-v] -b baselist -u -p sums07 -o sums09 /mnt/ftppool/private/c10f2/date/2024/07/09 x86_64

For more options see

    checksumgen --help


Using with `mkimage-profiles`
-----------------------------

In order to calculate checksums for RPM packages when an image is
being building, use:

    find /ALTLinux/RPMS.main -type -f -name '*.rpm' | sort -u | checksumgen [-v] -l - -o main.chksum

Alternatively, in order to calculate checksums for RPM packages
included in an already built ISO image, use:

    checksumgen [-v] -f ./alt-sp-server-10.2.1-20250701-x86_64.iso.reports/list-rpms.txt -o alt-sp-server.x86_64.chksum /mirror/c10f2 x86_64

License
-------

GNU GPL v2.
