Skip to content

abuild: use dummy checksum for local sources

Replace the checksum of local sources with dots, as we don't need to
verify the checksum for these files stored next to the APKBUILD inside
aports.git.

With this patch we no longer need to run "abuild checksum" after
modifying a local source. I've seen a lot of times that this is not
intuitive for first time contributors, and even as long-time
contributor one may forget it. We can avoid the whole cycle of the
build breaking in CI because of this, developer getting notified,
fixing it and pushing again.

Furthermore this avoids conflicts inside sha512sums= when rebasing
patches with git, and makes no longer necessary to update the checksums
on each individual patch where local files are modified during rebase.

I've also considered omitting local sources from sha512sums, but
decided against it since it is useful to have an easy to parse list of
sources at the end of the APKBUILD. Both for humans so they can see what
sources= expands to after going through possibly various loops inside
the APKBUILD, and for scripts that can quickly get a list of sources
without running the APKBUILD in a shell (we have the latter use case in
pmaports CI to parse the files with Python).

Example:

sha512sums="
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925  binutils-2.40.tar.xz
................................................................................................................................  binutils-ld-fix-static-linking.patch
................................................................................................................................  0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
"

EDIT: if reviewers agree that the checksum for local files is not useful, but would rather have it removed completely than using this dummy line: then I could adjust the patch accordingly

EDIT: aports!45391 (closed) adjusts the githook

Edited by Oliver Smith

Merge request reports

Loading