FS#50439 - makepkg and "./pkg: Permission denied"

Attached to Project: Pacman
Opened by Johannes Ernst (jernst) - Thursday, 18 August 2016, 20:57 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 29 May 2018, 06:31 GMT
Task Type Bug Report
Category makepkg
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Every now and then, when my makepkg fails, it leaves behind a ./pkg/ with these permissions:

d--x--x--x

When makepkg succeeds, they are more reasonable:

dwrxr-xr-x

All sorts of things tend to fail afterwards, like find, or grep, even subsequent invocations of makepkg. Not a big thing but annoying ...

Discussion here: https://bbs.archlinux.org/viewtopic.php?pid=1648019
This task depends upon

Comment by Allan McRae (Allan) - Friday, 19 August 2016, 00:42 GMT
When is makepkg failing to leave this behind? During build()?
Comment by Johannes Ernst (jernst) - Friday, 19 August 2016, 16:16 GMT
Yes. Example:

pkgname=foobar
pkgver=0.1
pkgrel=1
pkgdesc='testing makepkg'
arch=('i686' 'x86_64')
license=('Apache')

build() {
touch ${srcdir}/was-in-build
false
}

package() {
install -Dm644 "${srcdir}/was-in-build" "${pkgdir}/"
}
Comment by Martin Weinelt (mweinelt) - Tuesday, 02 October 2018, 21:26 GMT
This is still an issue on pacman 5.1.1-1. The example in the previous comment shows this.

Origin of the issue is here:
https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in?id=839417e8c65e73e632c77d3ecd68539494850de1#n1699

Loading...