Fix an AUR build failing its sha256sums validity check
Checked the Makepkg wiki section Generate new checksums, which says to install pacman-contrib and run updpkgsums in the PKGBUILD directory and that updpkgsums calls makepkg --geninteg. That matches the fix. Confirmed on this machine that pacman-contrib 1.13.1-1 is installed and provides /usr/bin/updpkgsums (pacman -Ql pacman-contrib), and that it is a hard dependency of the omarchy 4.0.2-1 package (pacman -Qi omarchy, Depends On) and listed in /usr/share/omarchy/install/omarchy-base.packages line 98. So on Omarchy 4 the fix's sudo pacman -S --needed pacman-contrib is a no-op and the record should say the tool is already present, which is the mis-specialisation corrected here. That command is not caught by the update guard, which only aborts on -S with -u, and it is not a bare -Sy, so it stays correct for plain Arch. Cache paths held: yay's buildDir here is /home/techluddite/.cache/yay (yay -Pg), so a package's clone and its downloaded tarball sit in ~/.cache/yay/foo because SRCDEST is commented out in /etc/makepkg.conf and no user makepkg.conf exists. paru is not installed here, but paru's src/config.rs builds its clone dir as the cache dir joined with paru and then clone, which gives ~/.cache/paru/clone. Also read: omarchy-update-aur-pkgs runs yay -Sua --noconfirm --cleanafter, which removes the build dir after a successful update, while omarchy-pkg-aur-install runs yay -S --noconfirm without --cleanafter and yay's cleanAfter default is false, so a stale clone can persist for packages installed through the TUI. yay's man page documents --mflags with the example --mflags "--skipchecksums --skippgpcheck", which the record correctly does not recommend. Danger text holds. Not exercised: no build or updpkgsums run was performed.
Running updpkgsums blindly makes the checksum match WHATEVER you downloaded, including a tampered or MITM'd tarball. Only do this after independently confirming the source is legitimate, never as a reflex to get a build to pass.
Symptom
==> Validating source files with sha256sums...
foo-1.2.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!
Often after the AUR maintainer bumped pkgver, or when upstream silently re-rolled a release tarball.
Cause
The sha256sums/b2sums array in the PKGBUILD no longer matches the file actually downloaded. Either the PKGBUILD is stale, upstream replaced the tarball in place, or a stale copy is sitting in your build cache.
Fix
First rule out a stale cached download:
rm -rf ~/.cache/yay/foo # or ~/.cache/paru/clone/foo
yay -S foo
If it still fails and you have verified the download is legitimate (checked the upstream release page / signature yourself), regenerate the checksums locally. updpkgsums comes from pacman-contrib. On Omarchy 4 it is already installed, because pacman-contrib is a dependency of the omarchy package. On plain Arch install it first:
sudo pacman -S --needed pacman-contrib # plain Arch only, already present on Omarchy 4
cd /tmp && git clone https://aur.archlinux.org/foo.git && cd foo
updpkgsums # rewrites the sums arrays in place using makepkg --geninteg
makepkg -si
Then tell the maintainer: leave a comment on the AUR page with the error. If the package is flagged out-of-date and you only need a version bump, edit pkgver in the PKGBUILD and run updpkgsums before building.
Verify
makepkg gets past "Validating source files" and produces a .pkg.tar.zst. pacman -Qi foo shows the new version.