You are not logged in.
I have a strange behaviour during the installation of a package by "makepkg -si". I'm renewing the "apx-git" AUR package with the following PKGBUILD:
pkgname=apx-git
_pkgname=apx
pkgver=758.79b408e
pkgrel=1
pkgdesc="Vanilla OS package manager."
arch=('any')
license=("GPL")
depends=('distrobox' 'docker' 'gettext')
makedepends=('git' 'go' 'make')
source=("git+https://github.com/Vanilla-OS/$_pkgname")
sha512sums=('SKIP')
prepare() {
cd $_pkgname
git submodule update --init --recursive
}
pkgver() {
cd $_pkgname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
build() {
cd $_pkgname
make build
}
package() {
cd $_pkgname
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install-manpages
}When I run the first time "makepkg -si", it is installed correctly. If I run it a second time, I get the following error:
==> Making package: apx-git 758.79b408e-1 (Mon 26 Jun 2023 12:31:00 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning apx git repo...
Cloning into bare repository '/home/athena/athena-apx/apx'...
remote: Enumerating objects: 6094, done.
remote: Counting objects: 100% (1495/1495), done.
remote: Compressing objects: 100% (399/399), done.
remote: Total 6094 (delta 1141), reused 1351 (delta 1059), pack-reused 4599
Receiving objects: 100% (6094/6094), 3.98 MiB | 9.33 MiB/s, done.
Resolving deltas: 100% (3690/3690), done.
==> Validating source files with sha512sums...
apx ... Skipped
==> Extracting sources...
-> Creating working copy of apx git repo...
Switched to a new branch 'makepkg'
==> Starting prepare()...
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
rm: cannot remove '/tmp/makepkg/apx-git/pkg/apx-git/etc/apx/config.json': Permission denied
==> ERROR: An unknown error has occurred. Exiting...
fish: Job 1, 'makepkg -si' terminated by signal SIGUSR1 (User defined signal 1)Why I get a "Permission denied" error on "/tmp/makepkg/apx-git/pkg/apx-git/etc/apx/config.json" when I try to run it a second time? It forces me to remove that file from "/tmp" manually.
Offline
What are the permissions on that file?
Offline
.rw-r--r-- root root 116 B Mon Jun 26 18:31:46 2023 /tmp/makepkg/apx/pkg/apx/etc/apx/apx.jsonI don't understand why makepkg creates those file as root.
Offline
prepare() {
cd $_pkgname
git submodule update --init --recursive
}Not to long ago there were issues with git submodules that look very similar to your issue and required changes to the VCS pacakge guidelines.
Check https://wiki.archlinux.org/title/VCS_pa … submodules for the current method.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thank you for the answer @Lone_Wolf. I tried the approach described on the wiki but I still get the same error. In praticular, I added:
source=("git+https://github.com/Vanilla-OS/$_pkgname"
"git+https://github.com/89luca89/distrobox")
sha512sums=('SKIP'
'SKIP')
prepare() {
cd $_pkgname
#git submodule update --init --recursive
git submodule init
git config submodule.distrobox/distrobox.url "$srcdir/distrobox"
git -c protocol.file.allow=always submodule update
}Not sure if I wrote it correctly.
Offline
.rw-r--r-- root root 116 B Mon Jun 26 18:31:46 2023 /tmp/makepkg/apx/pkg/apx/etc/apx/apx.jsonI don't understand why makepkg creates those file as root.
That's normal, most packaged files should be owned by root:root, and makepkg uses fakeroot to do that. What about the permissions on the dir that the file is in?
Offline
That file is retrieved by "git+https://github.com/Vanilla-OS/$_pkgname", it is not local.
Offline
tmp/makepkg/apx/pkg/apx/etc/apx/apx.jsonThe apx/pkg/apx/etc/apx/apx.json part looks very much like it is under $pkgdir which as far as I know is not accessible during prepare() or build() .
If that's correct that file is copied somewhere to $pkgdir .
Building in /tmp makes it harder to see what really happen.
Please use
$ BUILDDIR=$PWD makepkg ----cleanbuild --syncdeps --rmdeps --logto build and post the logfiles.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline