You are not logged in.
I have written a PKGBUILD for a python package SimpleGUICS2Pygame:
pkgname=python-simpleguics2pygame
_pkgname=SimpleGUICS2Pygame
pkgver=2.0.2
pkgrel=1
pkgdesc="A module reimplementing the SimpleGUI particular module of CodeSkulptor and CodeSkulptor3 (a Python browser environment)"
arch=('any')
url="https://simpleguics2pygame.readthedocs.io/en/latest/"
license=("Apache License 2.0")
depends=('python')
makedepends=('python-setuptools')
conflicts=("${pkgname}" "${pkgname}-git")
source=("https://bitbucket.org/OPiMedia/simpleguics2pygame/downloads/$_pkgname-$pkgver.tar.gz")
sha256sums=('b89d488740912b7db61184965c97608b1240474403c334a88fc8f6016ccabcb6')
build() {
cd "$srcdir/$_pkgname-$pkgver"
python setup.py build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
python setup.py install --skip-build --root="$pkgdir/" --optimize=1
}
The package builds and installs ok.
The problem is I can't use the module because I'm getting an ERRNO 13 Permission denied error whenever I include the module. Checking the package installation, I discovered the permission level in the inner files and directories (but not the base) of the package are all -rw --- ---. I would need at least need rw-r--r-- for the files to be usable.
I of course can change the permissions manually but my question is is there a way of rewriting the PKGBUILD so that it installs the package with the right permissions in the installation directory?
Last edited by d_fajardo (2020-09-28 20:03:41)
Offline
prepare()
{
cd "$srcdir/$_pkgname-$pkgver"
find -type f \! -perm -go=r -execdir chmod go+r '{}' \;
}
Off topic the license "Apache License 2.0" should be changed to the standard name APACHE or Apache.
Edit:
Changed the chmod to add r for group and other instead of setting 755 permissions.
I would suggest asking upstream why the permissions in their repository are set to 0 for group and other.
Last edited by loqs (2020-09-28 19:30:00)
Offline
Thanks loqs. It works!
I think I know why the permissions are set to 0. According to the site, the package needs to be installed with 'pip --user' but I'm avoiding to use pip thus my PKGBUILD.
Solved.
Offline
I think I know why the permissions are set to 0. According to the site, the package needs to be installed with 'pip --user' but I'm avoiding to use pip thus my PKGBUILD.
Solved.
pip is the official way to install all python modules, and pip install --user is the recommended way for anyone who doesn't have root. There's nothing special or unusual there.
It's still incorrect for the permissions to be set like this, no other modules do so -- no matter how much they're "supposed to" be installed with "pip install --user". It needs to be fixed upstream.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks eschwartz. I emailed upstream regarding the issue. And yes I have used pip in the past but I have had issues with conflicting package that's why I try to avoid it. I also avoided creating a virtual env since I really just needed this one package for what I was trying to achieve. Besides it was part of my learning to write my own PKGBUILD.
EDIT: Maintainer responded positively to update archive. I will test with new PKGBUILD once it's updated.
Last edited by d_fajardo (2020-10-02 09:25:56)
Offline
I'm here. ;-) I fixed the problem.
Tell me if there is another problem.
Thanks to you.
P.-S.: If you make some nice programs in CodeSkulptor tell me and I will add them to this list:
https://simpleguics2pygame.readthedocs. … links.html
Last edited by OPiMedia (2020-10-02 10:03:43)
Developer / MA Computer Science
https://bitbucket.org/OPiMedia/
http://www.opimedia.be
Offline
I can confirm the updated archive works and there are no more problems with permissions. The prepare() section of the PKGBUILD can thus be removed.
Thanks for the quick fix.
Offline