alexheretic / aurto

Arch Linux AUR tool for managing an auto-updating local 'aurto' package repository
MIT License
134 stars 9 forks source link

trust-check http2 error #70

Closed G4Zz0L1 closed 2 years ago

G4Zz0L1 commented 2 years ago

Hi, the systemd daemon has stopped working for the last 2-3 days now. I've narrowed the problem to the trust-check rust script, but my knowledge stops there, I'm not that fluent with rust. If I try to launch manually the trust-check script, it gives the same error. Can you help me to debug it? I don't know if it's a general problem or something from my setup.

Example screenshot: image image

alexheretic commented 2 years ago

I haven't seen this, nor can I reproduce it. I assume all your system dependencies are up to date & aurto is the latest version?

Are you using core/curl package or replacing it with something?

G4Zz0L1 commented 2 years ago

I'm on arch stock, with everything up to date. I've also tried to use the bash curl with the parameters I've guessed from rust and it returns a valid json. I don't know what else to try

alexheretic commented 2 years ago

Can you try checking out this project.

cd trust-check
cargo run -- foo

Should work with stdout foo::not-in-aur.

If that doesn't work try

cargo update
cargo run -- foo

If both work for you, you may need to rebuild aurto.

aurto remove aurto
aur sync --no-view --no-confirm --chroot --database=aurto --makepkg-conf=/etc/aurto/makepkg-chroot.conf --pacman-conf=/etc/aurto/pacman-chroot.conf aurto
sudo pacman -Syu aurto
G4Zz0L1 commented 2 years ago

It works with the first cargo run, without the update, on a fresh clone.

image

I had already tried to remove, rebuild and reinstall aurto, without success. I've done it just now, same commands you suggested, it doesn't work. Same ouput from the trust-check on /usr/lib

alexheretic commented 2 years ago

That's strange, rebuilding the package basically recompiles it, pretty much the same thing as running it.

There are some differences, it's compiled in release mode. Can you try cargo run --release -- foo

Rebuilding is done in the aurutils chroot. It may be worth trying building it outside the chroot. Or the same aurutils command but without the --chroot arg.

If the cargo run works you can always just copy that ./target binary to /usr/lib/aurto/trust-check.

But I don't understand why the aur pkgbuild wouldn't work when building directly would.

G4Zz0L1 commented 2 years ago

Same thing in release mode.

image

I just tried removing and uninstalling the package, rebuilding without chroot and even manually copying the generated file into /usr/lib/aurto, but it does the same thing.

It's strange, I've checked the updated packages about the same time it started failing but there isn't much.

I can't understand why it has begin to fail without apparent reason.

EDIT: just for fun, I've tried the command as in the bash update-aurto script, and the result it's even more strange:

❯ cargo run --release -- $(pacman -Slq aurto)
    Finished release [optimized] target(s) in 0.04s
     Running `target/release/trust-check the-list-of-packages-ive-installed-from-aurto`
Error: Error { description: "Stream error in the HTTP/2 framing layer", code: 92, extra: Some("HTTP/2 stream 1 was not closed cleanly before end of the underlying stream") }

EDIT2: if I try with a chunk of packages it works fine. I've 486 packages in the pacman -Slq aurto output. Can they be too much?

alexheretic commented 2 years ago

EDIT2: if I try with a chunk of packages it works fine. I've 486 packages in the pacman -Slq aurto output. Can they be too much?

Yes I think this must be the issue. I'll try to reproduce tomorrow & handle this better.

alexheretic commented 2 years ago

Aurweb GET API has a limitation 4443 bytes uri length which you were hitting. Now there's a also POST API that has no such limits, so I've switch to that in v0.12.

G4Zz0L1 commented 2 years ago

Thanks for the fast fix, now it works!