You are not logged in.

#1 2022-04-16 08:36:24

dllu
Member
Registered: 2015-10-11
Posts: 11

/var/lib/pacman/sync get gunked up with HTML content

If there is a captive redirect on the internet, such as when using public wifi or when the modem detects that broadband isn't available, all HTTP requests get redirected to some HTML page, typically showing an error or letting you log into their public wifi or something.

In this case, when going to /var/lib/pacman/sync/core.db.sig, one will notice that it is filled with HTML such as

cat core.db.sig
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>Not Found</title>
        <link rel="stylesheet" type="text/css" href="/baseINID.css" />
    </head>
  </html>
HTTP/1.0 302 Found
Location: /cgi-bin/ipdiags.ha
Set-Cookie: SessionID=70c0181d53f814a973ca96212cba9959; Version=1; Discard; HttpOnly; Path=/
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate
Expires: 0
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Type: text/html

<html><meta http-equiv=Refresh content=0;url=/cgi-bin/ipdiags.ha>
<body></body></html>

This causes all updates to fail with GPGME errors:

error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

This happened to me because my home wired internet at home suddenly stopped working and the stupid AT&T modem decided to send that with all HTTP requests. This happened abruptly and I had no idea that internet went down before I ran sudo pacman -Syu.

Of course, deleting

rm -r /var/lib/pacman/sync/

fixed it.

It would be good to have a sanity check in Pacman to prevent that sort of thing from happening.

Last edited by dllu (2022-04-16 08:36:55)

Offline

#2 2022-04-16 09:56:35

amish
Member
Registered: 2014-05-10
Posts: 470

Re: /var/lib/pacman/sync get gunked up with HTML content

I guess this would not happen if you use HTTPS mirror instead of HTTP (plain) mirror.

Offline

Board footer

Powered by FluxBB