You are not logged in.

#1 2023-12-20 22:18:53

tlat
Member
Registered: 2019-11-25
Posts: 12

BUG: captive portal corrupts repository databases

Repository db files get corrupted if I try to run `pacman -Syu` before logging into the captive portal. pacman should validate the filetype before overwriting the file.

Instructions

1. When not logged in to the captive portal, run `pacman -Syu`

# pacman -Syu                                                                                                                             
:: Synchronizing package databases...                                                                                                                 
 core                             27.2 KiB  25.5 KiB/s 00:01 [################################] 100%                                                  
 extra                            27.2 KiB  29.4 KiB/s 00:01 [################################] 100%
 aur                              27.2 KiB  31.0 KiB/s 00:01 [################################] 100%                                                  
:: Starting full system upgrade...                                                                                                                    
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format                                                                  
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/aur.db: Unrecognized archive format                                                                   
 there is nothing to do

The databases get corrupted.

2. View `/var/lib/pacman/sync/core.db`

# cat /var/lib/pacman/sync/core.db
<!DOCTYPE html>
<html>
<head>
<title>Sightglass</title>
<link rel="stylesheet" media="all" href="/assets/login-b68d29abc23e1ceec4808d13328544028264c42431c39e98377b0a08e304982b.css" data-turbolinks-track="true" />
<script src="/assets/login-d41b914a8fd7ce41deb0bfdc5a01141817f8bd4cc8cb1b75754674dd986653e3.js" data-turbolinks-track="true"></script>
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="4RkgbQt8y8ABlfy+mMeYX7gCAhJ07cX72FtYST26LhJ4YsZGRjy3yj4D8/cpPMWqx/8w0gRaUZ6V0pm51TQ47A==" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://s3-eu-west-1.amazonaws.com/beamboxstore/fonts/FontAwesome/css/all.min.css">
</head>
<body class="login">
<style>
...

Pacman version

# pacman -Qi pacman
Name            : pacman
Version         : 6.0.2-8

Last edited by tlat (2023-12-20 22:21:31)

Offline

#2 2023-12-20 22:29:47

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: BUG: captive portal corrupts repository databases

Holy cow!

Bug reports go on the gitlab instance, though.

Offline

#3 2023-12-20 22:53:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 66,659

Offline

#4 2023-12-23 15:42:00

loqs
Member
Registered: 2014-03-06
Posts: 18,481

Re: BUG: captive portal corrupts repository databases

Related tracking bug in gitlab for all outstanding pacman bugs in flyspray https://gitlab.archlinux.org/pacman/pacman/-/issues/68

Offline

Board footer

Powered by FluxBB