You are not logged in.

#1 2024-07-27 19:49:53

Achnologia
Member
Registered: 2024-07-27
Posts: 3

[SOLVED] Weird ~/.cache permission error in my first ever AUR package

Greetings all,

After reading the manual all day, i finally managed to create my first ever AUR package :  https://aur.archlinux.org/packages/gowall

Thing is when you

 yay -S gowall

after it gets to the build step where it downloads some go dependencies like the cobra library etc...

     https://freeimage.host/i/dIakudg  ( img for the go depend)

It tries to clean up these dependencies from ~/.cache but it can't because of :

Permission denied.

After that it normally prompts you whether to install the pkg or not and after that it works normally.

    https://freeimage.host/i/dIaUTnR  (img for permission denied)

Here is the thing though, if you

 yay -R gowall 

  and try to install it again

it will throw :

 An unknown error has occurred exiting .

   https://freeimage.host/i/dIa4Hjs (img for this error)

This problem goes away if you remove

~/.cache

I cant find this error anywhere and have no clue on how to fix it since its my first time creating an AUR package.

Has this happened to anyone before? Any clues on how to fix this?

Last edited by Achnologia (2024-07-28 13:45:02)

Offline

#2 2024-07-27 21:16:50

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,665
Website

Re: [SOLVED] Weird ~/.cache permission error in my first ever AUR package

Can you reproduce the behaviour outside of yay (i.e. using makepkg directly)?

BTW, great PKGBUILD. One thing to note, however, is that MIT-licensed packages should install their licence to /usr/share/licenses/$pkgname

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2024-07-28 00:40:32

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 209

Re: [SOLVED] Weird ~/.cache permission error in my first ever AUR package

All the "github.com/chai2010/webp@v1.1.1/" files appear to come down with read-only permissions:

Everything in "path/gowall/src/go/pkg/mod/github.com/chai2010/webp@v1.1.1" looks like this:

-r--r--r-- 1 thomas thomas   276 Jul 28 01:33 z_libwebp_src_utils_rescaler_utils.c
-r--r--r-- 1 thomas thomas   274 Jul 28 01:33 z_libwebp_src_utils_thread_utils.c
-r--r--r-- 1 thomas thomas   267 Jul 28 01:33 z_libwebp_src_utils_utils.c

Desktop: Ryzen 7 1800X | AMD 7800XT | KDE Plasma
MacbookPro-2012 | XFCE

Offline

#4 2024-07-28 13:30:09

Achnologia
Member
Registered: 2024-07-27
Posts: 3

Re: [SOLVED] Weird ~/.cache permission error in my first ever AUR package

WorMzy wrote:

Can you reproduce the behaviour outside of yay (i.e. using makepkg directly)?

BTW, great PKGBUILD. One thing to note, however, is that MIT-licensed packages should install their licence to /usr/share/licenses/$pkgname

Mod note: Moving to AUR Issues.

If i use

 makepkg -si 

it works perfectly fine. no issues When trying to install it from the AUR these permission issues arise.

EDIT : i changed the PKGBUILD and added some GO flags and now it works fine from the AUR for my main machine.

I will spin up a clean vm and try to install it from there to see if its finally fixed

Last edited by Achnologia (2024-07-28 13:33:23)

Offline

#5 2024-07-28 13:35:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,496

Re: [SOLVED] Weird ~/.cache permission error in my first ever AUR package

makepkg *is* installing from the AUR. It's the only official, recommended way of doing so. Do you get the error when adding the -c option to makepkg?

Offline

#6 2024-07-28 13:48:02

Achnologia
Member
Registered: 2024-07-27
Posts: 3

Re: [SOLVED] Weird ~/.cache permission error in my first ever AUR package

Scimmia wrote:

makepkg *is* installing from the AUR. It's the only official, recommended way of doing so. Do you get the error when adding the -c option to makepkg?

 makepkg -si 

worked after adding some flags to the

 go build 
 

  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

For future readers having this issue check out the arch wiki here : https://wiki.archlinux.org/title/Go_pac … e_packages
I dont exactly know what these flags are doing but it fixed the issue alright

Offline

Board footer

Powered by FluxBB