LinuxCommandLibrary

updpkgsums

Update package checksums in PKGBUILD file

TLDR

Update the checksums in a PKGBUILD

$ updpkgsums
copy

Display help
$ updpkgsums [[-h|--help]]
copy

Display version
$ updpkgsums [[-v|--version]]
copy

SYNOPSIS

updpkgsums [options] [PKGBUILD]

PARAMETERS

-h, --help
    Show help message and exit.

-f, --force
    Force download of files even if they already exist.

PKGBUILD
    Path to the PKGBUILD file. Defaults to the PKGBUILD in the current directory.

DESCRIPTION

The updpkgsums command is a utility commonly used within the Arch Linux ecosystem, specifically for maintaining package build files (PKGBUILDs). Its primary function is to automatically regenerate the checksums of source files listed in the source array of a PKGBUILD. These checksums (typically MD5, SHA1, SHA256, or SHA512) are crucial for verifying the integrity of the source files during the build process.

By running updpkgsums within a directory containing a PKGBUILD, the command downloads each source file listed (if necessary), calculates its checksum, and updates the corresponding md5sums, sha1sums, sha256sums or sha512sums array in the PKGBUILD file. This ensures that the package build process uses up-to-date checksums, preventing build failures due to corrupted or modified source files. This is especially helpful if the upstream source files were changed.

updpkgsums simplifies the maintainer's task of keeping PKGBUILDs current and reliable.

CAVEATS

updpkgsums requires network access to download source files.
It only updates the checksums arrays in the PKGBUILD; it doesn't modify any other part of the file.

WORKFLOW

The typical workflow involves navigating to a directory containing a PKGBUILD file and simply running updpkgsums. The command then automatically handles the download and checksum update process.

HISTORY

updpkgsums has evolved as part of the Arch Linux packaging tools and ecosystem. It provides a convenient way to streamline the process of keeping package builds functional over time, as the upstream sources can change.

SEE ALSO

makepkg(1)

Copied to clipboard