Yay and paru fail to decompress AUR package metadata

OK this is a weird one…
I noticed that my yay does not do “autocomplete” when i start the packagename on “yay -S …” i got a “NULL Byte” error.
So i tried to see if something was wrong with my yay cache or the AUR package metadata because with pacman and paru the autocomplete worked.
So i tried:
yay -Slq --aur | head -n 5

The output was gibberish. It looked like an uncompressed datafile.
Weird. I tried the same with paru:
paru -Slq --aur | head -n 5
ALSO gibberish. Very weird.

Then i went into an hourlong rabbithole:

  • clean yay, paru, pacman cache
  • refresh pacman keys
  • verified that if i use --repo instead of --aur both yay AND paru work correctly
  • reinstall yay and paru from source
  • check in a --norc shell (env -i SHELL=/bin/bash TERM=$TERM /bin/bash --noprofile --norc)
  • reinstall zlib and libarchive
  • check if i had some weird proxy settings (i had not) or if something was wrong with utf8 in my etc/locale settings but everything was ok

Then i went really deep. I manually downloaded the AUR metadata:
curl -o /tmp/aur-packages.json.gz https://aur.archlinux.org/packages-meta-v1.json.gz
Gunzipped it and tested:
head -n 5 /tmp/aur-packages.json
And it was fine! No gibberish!

I even checked the log of
strace -s 1024 -o /tmp/paru.log paru -Slq --aur
for connect, read, write and saw that the data was already corrupted before paru or yay tried to print it.

So this leaves me basically with one conclusion:
Paru and Yay fail to decompress the AUR metadata on my system. I think they do not use the system gunzip, they use something internal, and that fails?! It is so weird. Because both definitely do not use the same method, paru is written in rust, yay in go… maybe it is some AMD cpu microcode issue?! I am using a Ryzen 5800x cpu…

I went back timeshift snapshots as far as i had, over 7 weeks, and the issue was in there all the time. I just didnt notice.

So has anyone ANY clue what is going on on my system? Can someone check on their system if using an AMD cpu to see if this is only my issue or something general? Please try
yay -Slq --aur | head -n 5
paru -Slq --aur | head -n 5

I mean i can still use my system, it just bothers me…
Thanks a lot.

Hi there, welcome to the forum.
Please always provide your garuda-inxi, as required in the topic template.
First of all, in Garuda yay is aliased to paru, so this could be a problem only in paru.
But I see you installed yay, so the alias should not be triggered by config.fish.
I just noticed the same behaviour.
For the autocompletion, I then found this recent paru commit (after the last release)

So, I downloaded that file, copied it to /usr/share/fish/vendor_completions.d/paru.fish and the completion now seems to be working.
The gibberish problem remains, but I think that’s a different (unsolved) issue:

and different topic probably…

4 Likes

Recently I had several packages from the AUR that would not build correctly with 3 different AUR helpers. I installed Aura, as over the years I’ve found sometimes a different AUR helper will work when others have problems. Aura managed to build the packages correctly when the others failed.

I’m not saying Aura will work for you, I’m only saying testing different alternatives can’t hurt.

YMMV.

Edit:

Just built pacaur successfully with Aura, when the others failed. Pacaur is another AUR helper that I’ve used quite a bit in the past. I only installed Aura because the other helpers could not build Pacaur correctly.

4 Likes

I just found this:

So it’s a known issue and the solution seems to be to install a yay-gzip-fix Patch…
wow… And i thought i somehow broke my system…
The issue came up because aur doesnt communicate anymore in their header that it is zipped so that’s why it effected both, paru and yay.

2 Likes

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