Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
abuild
abuild
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • abuildabuild
  • Issues
  • #10013

Closed
Open
Opened Nov 10, 2020 by Oliver Smith@ollieparanoid
  • Report abuse
  • New issue
Report abuse New issue

Checksums don't work with multiple sources with same filename

When there are two or more files with the same filename in $source, then abuild will not properly generate checksums and won't notice that the checksums are wrong when trying to build the package.

This is not a problem if the files are included in the aport dir, but it may lead to confusion. However, if both files were downloaded, and one doesn't notice it, it will lead to abuild not checking the checksums of at least one file with the same name.

Idea to fix this: exit with error if there are more than one file with the same filename in $source.

Example:

$ tree
.
├── APKBUILD
├── dir1
│   └── testfile
└── dir2
    └── testfile

2 directories, 3 files
$ cat dir1/testfile
first
$ cat dir2/testfile
second
$ abuild checksum
>>> checksums-test: Updating the sha512sums in APKBUILD...
$ cat APKBUILD
pkgname=checksums-test
pkgver=1
pkgrel=0
pkgdesc="reproducer"
url="https://postmarketos.org"
license="MIT"
arch="all"

source="dir1/testfile dir2/testfile"

package() {
	mkdir -p "$pkgdir"
}
sha512sums="a7f76f090fcd3a897220845ad31254c754e1245065d91581ed8a801c6a7d276c7818bf2f0303ef9df9d2efd0c22c8a78ac6acc41f332ec91316f1b29eb4cc527  testfile
a7f76f090fcd3a897220845ad31254c754e1245065d91581ed8a801c6a7d276c7818bf2f0303ef9df9d2efd0c22c8a78ac6acc41f332ec91316f1b29eb4cc527  testfile"
$ abuild
...
>>> checksums-test: Checking sha512sums...                                                                                     
testfile: OK                                                                                                                   
testfile: OK 

https://gitlab.com/ollieparanoid/reproducers/-/tree/master/abuild-checksums

Edited Nov 10, 2020 by Oliver Smith
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: alpine/abuild#10013