FS#50838 - [pacman] makepkg generates wrong checksums with per-arch sources

Attached to Project: Arch Linux
Opened by Robin McCorkell (Xenopathic) - Monday, 19 September 2016, 19:59 GMT
Last edited by Dave Reisner (falconindy) - Monday, 19 September 2016, 20:18 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

With a PKGBUILD that specifies sources for specific architectures, where the source files are renamed to the same thing (e.g. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=cfssl), generating checksums with `makepkg -g` will print the same checksum for different architectures, where the source files are renamed to be the same thing. Since it's very useful to rename per-arch sources to a common name, generation of checksums should work correctly in this circumstance.

Discovered with pacman 5.0.4-1.

Quick reproducible PKGBUILD fragment:

sources_i686=(foo::http://path/to/some/file.i686)
sources_amd64=(foo::http://path/to/some/file.amd64)

Notice the same hash is printed in both *sums_i686 and *sums_amd64 with `makepkg -g`, despite the actual files being different.
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 19 September 2016, 20:18 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#43714 
Comment by Christian Hesse (eworm) - Monday, 19 September 2016, 20:07 GMT
There is neither sources_i686 nor sources_amd64. The fragment should look like this:

source_i686=(foo::http://path/to/some/file.i686)
source_x86_64=(foo::http://path/to/some/file.amd64)
Comment by Christian Hesse (eworm) - Monday, 19 September 2016, 20:09 GMT
BTW, are you living in the future? There is no pacman 5.0.4 release, yet.
Comment by Robin McCorkell (Xenopathic) - Monday, 19 September 2016, 20:10 GMT
Hah, I think I'm too tired to submit bug reports today. s/sources/source/, s/5.0.4-1/5.0.1-4/
Comment by Dave Reisner (falconindy) - Monday, 19 September 2016, 20:18 GMT
You're renaming the file to the same name, thus makepkg can't distinguish between "foo" which is for i686 and "foo" which is for x86_64.

Loading...