Comment 82 for bug 24061

haiko2201 (2201haiko) wrote :

I have some problem with a local mirror (apt-mirror)

Holen: 1 http://192.168.0.100 trusty InRelease [246 B]
Holen: 2 http://192.168.0.100 trusty-updates InRelease [246 B]
Holen: 3 http://192.168.0.100 trusty-backports InRelease [246 B]
Holen: 4 http://192.168.0.100 trusty-security InRelease [246 B]
Ign http://192.168.0.100 trusty InRelease Splitting up /var/lib/apt/lists/partial/192.168.0.100_ubuntu_dists_trusty_InRelease into data and signature failed
E: GPG-Fehler: http://192.168.0.100 trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

in the directories like http://192.168.0.100/ubuntu/dists/trusty/ I have a InRelease file

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>replace</title>
<body>
<script language="JavaScript" type="text/javascript">
var pageName = '/';
top.location.replace(pageName);
</script>
</body>
</html>

if I am deleting it all works fine but after the next refresh of apt-mirror InRelease is back and it happens the same.

I found a fix

#!/bin/bash
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade

did not work!

With the normal Repos everything is ok.