AUR Package installs with makepkg, with not through yay/paru -S

From this GitHub repo
I created this AUR repo.

The package builds and install fine with makepkg -i, or pacman -U,
but when I use yay/paru, it throws me the error:

fatal: invalid reference: origin/v1.0
==> ERROR: Failure while creating working copy of rtl8188gu git repo

I already asked in the Arch forums, but with no solutions so far…


There are many things wrong here.

This is a VCS package which should have the -git suffix. I’ve submitted a deletion request. Please resubmit it as rtl8188gu-dkms-git.

To address your concern:

Your pkgver function is malformed. There are no tags, so the v1.0 you’re shoving in there improperly is why there’s an invalid reference. Do not invent a pkgver, always generate it from the upstream repo. See VCS package guidelines - ArchWiki

Now for PKGBUILD critique:

  • The pkgname must match the AUR repo name.
  • Do not use unneeded variables like $_pkgbase. For one, it’s the same as your pkgname so it’s redundant and pointless. There’s already a pkgbase which is not needed here.
  • Do not skip checksums for files
  • Use install -d instead of mkdir
  • Use install -DmXXX to install files with the proper permissions
  • See also DKMS package guidelines - ArchWiki

EDIT: rtl8188gu-dkms is now deleted and I see you resubmitted it as rtl8188gu-dkms-git. That’s great, however you haven’t changed the pkgver function which was the topic of this thread.

1 Like

Yes. Thank you!

The package is ready to build from the AUR now. I already fixed practically everything.

I think you meant to install the dkms.conf you included, right? :wink:

It should be installed to a folder matching the module name.

prepare() {
  cd rtl8188gu
  sed -e "s/@PKGVER@/${pkgver}/" -i dkms.conf

package() {
  cd rtl8188gu
  install -d "${pkgdir}/usr/src/rtl8188gu-${pkgver}"
  cp -pr * "${pkgdir}/usr/src/rtl8188gu-${pkgver}/"

EDIT: Fixed typo.

EDIT2: Corrections.

1 Like

Mmm :thinking:

So the current one was installing the package, but failing to install the DKMS?
I tested it and it installed the DKMS modules.

If I try the method that you described, the package fails to build the module, saying that the name is incorrect.

Your current PKGBUILD installs the upstream dkms.conf instead of the one you included with the PKGBUILD.

I edited my post above.

1 Like

Oh well, that’s what it supposed to do.
Even shipping the dkms.conf in the AUR would be redundant I guess.

I thought you were including a custom one for a reason. I edited my post again. No reason to explicitly install the upstream dkms.conf then because it gets copied along with everything else. Post above edited to reflect that.

1 Like

I removed the dkms.conf from the AUR and compiled it directly from the source.

Thanks! :heart_decoration:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.