Giter Site home page Giter Site logo

Old InRelease file left about apt-mirror HOT 16 OPEN

apt-mirror avatar apt-mirror commented on September 23, 2024
Old InRelease file left

from apt-mirror.

Comments (16)

madscientist159 avatar madscientist159 commented on September 23, 2024 1

Just got hit by this after Debian Stretch went from testing to stable. Any chance of a "proper" fix or is the deletion of the skel directory the official fix method after release?

from apt-mirror.

pboguslawski avatar pboguslawski commented on September 23, 2024

I see that

$skipclean{$} = 1 if s[.gz$][];
$skipclean{$
} = 1 if s[.bz2$][];
$skipclean{$_} = 1 if s[.xz$][];

is required to protect also uncompressed file version.

Not all repos has debian-installer component so consider this mod:

--- apt-mirror.orig.master 2015-09-09 19:23:06.000000000 +0200
+++ apt-mirror 2015-09-09 21:13:25.359932307 +0200
@@ -672,6 +672,12 @@
local $/ = "\n\n";
$mirror = get_variable("mirror_path") . "/" . $path;

  • if (! -f "$path/$index")
  • {
  •    warn("apt-mirror: index file $path/$index does not exit") unless $index =~ /debian-installer/;
    
  •    return;
    
  • }

if ( $index =~ s/.gz$// )
{
system("gunzip < $path/$index.gz > $path/$index");

Regards,
Pawel

from apt-mirror.

Hellnino18 avatar Hellnino18 commented on September 23, 2024

Hi Pawel,

I'm not sure to undestand what you're describing upper, but I have a problem with my apt-mirror since we are in Debian 8.2. I have a lot of Sum Hash Mismatch and I think it's for the same problem.

Could you be more explicit plz? Your workaround is not very well presented.

I think for the moment we can edit the postmirror.sh and put this line :

find "REMOTE_MIRROR/debian/dists/jessie" -name "InRelease" -exec rm {} ;

Regards,

from apt-mirror.

pboguslawski avatar pboguslawski commented on September 23, 2024

Hi,

Debian 8.2 does not contain InRelease file in ftp://ftp.debian.org/debian/dists/jessie/ and InRelease was present in this dir in Debian 8.1.

apt-mirror does not handle such update and leaves InRelease untouched in copy which gives us copy with fresh Release+Release.gpg files and old InRelease from Debian 8.1. apt-get tries InRelease if found and sum mismatches occur.

We've resolved this issue by removing manually all InRelease files from apt-mirror "mirror" and "skel directories" (cmd to find like "find mirror -name InRelease") and forcing apt-mirror to sync (which downloaded only fresh files and resolved issue).

Remember about backup before applying such changes :)

I think apt-mirror should better handle such quirks and leave mirror 1:1 after successfull sync, removing old files.

BTW: we've send question to Debian FTP Mirror team about lack of InRelease in Debian 8.2 - no answer till now.

Regards,
Pawel

from apt-mirror.

Hellnino18 avatar Hellnino18 commented on September 23, 2024

I have always the problem with the jessie backports. The InRelease file exists on the repository http://ftp.fr.debian.org/debian/dists/jessie-backports/

The only way to avoid the Sum Mismatch is to delete Packages.bz2. I don't understand why.

Regars,

Nath

from apt-mirror.

Kunzol avatar Kunzol commented on September 23, 2024

@Hellnino18, as far as I can see, if you delete the "Packages.bz2", the OLD inRelease file is used by "apt-get update" and you will not see newer updates. Better to delete the old "InRelease", which lets "apt-get update" use the NEW "Packages.*" file as the index.

@ALL: Besides this I experiance something else. I deleted the old "InRelese" file from the mirror directory, but every day, it came back, even if it was not available anymore in the repo I mirror (404 on the InRelease).

After some search in the source and filesystem, I realized that the OLD "InRelease" file is still in the "skel_path" directory and is copied in the mirror, every time "apt-mirror" is run.

Thus the patch in the "clean" function might not be the perfect solution, because it does not handle the files in the cache of the index files in "skel_path". The clean works only on the "mirror_path".

Some cleanup of the index files is needed, too.

I see, that it is optimal to cache index files and only download newer files. But "cache" means also to cleanup removed cache items.

I will check if I can provide a fix, but maybe someone who is "in the code" could do it much easier.

from apt-mirror.

pashinin avatar pashinin commented on September 23, 2024

My case for Ubuntu: apt-mirror tries to download InRelease file which does not exist anymore.
This causes error at a desktop which tries to apt-get update

sudo apt-get update
Get:1 http://apt.....com vivid InRelease [269 B]
99% [1 InRelease gpgv 269 B] [Waiting for headers]Splitting up /var/lib/apt/lists/partial/apt....com_mirror.yIgn http://apt.....com vivid InRelease       d signature failed
E: GPG error: http://apt.....com vivid InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

from apt-mirror.

ljoets avatar ljoets commented on September 23, 2024

Hi,
I have no InRelease file on my mirror.
"# find /depot -name InRelease" returns noting.

BTW, I have hash problems on clients with
ftp.fr.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages
ftp.fr.debian.org/debian/dists/jessie-backports/main/binary-i386/Packages

I noticed that http://ftp.fr.debian.org/debian/dists/jessie-backports/InRelease exists, but seems not to be downloaded by apt-mirror :
ls /depot/mirror/ftp.fr.debian.org/debian/dists/jessie-backports
contrib main non-free Release Release.gpg

from apt-mirror.

Kunzol avatar Kunzol commented on September 23, 2024

As I said. It is not in the "mirror_path" it is in the "skel_path" (index cache).

The the index cache (skel_path) is not cleaned up correctly.
Just delete all files in the index cache (skel_path) from time to time (or whenever a problem occurs).

from apt-mirror.

ljoets avatar ljoets commented on September 23, 2024

I did it.
That has not solved the problem :-(

from apt-mirror.

hungpr0 avatar hungpr0 commented on September 23, 2024

I had the same issue here. I cleaned skel_path and it fixed the issue as Kunzol said.

from apt-mirror.

andreazorzetto avatar andreazorzetto commented on September 23, 2024

Very similar is happening to me too with another repository that I'm mirroring on 4 ubuntu boxes
https://packagecloud.io/grafana/stable/debian

I had to remove the skel folder for that repo in order to get the latest Grafana version released
That's quite annoying and I'm not sure how much I can rely on this solution

from apt-mirror.

chani avatar chani commented on September 23, 2024

Hi,

i regularly run into this issue. Is there some fix for this available? Some script which would delete the outdated InRelease file?

from apt-mirror.

fbarbeira avatar fbarbeira commented on September 23, 2024

This bug hits again with Debian buster release

from apt-mirror.

chutzimir avatar chutzimir commented on September 23, 2024

This was fixed with #156. Can be closed.

from apt-mirror.

nE0sIghT avatar nE0sIghT commented on September 23, 2024

This was fixed with #156. Can be closed.

This issue still not fixed. The main problem is that apt-mirror doesn't clean skel folder so outdated index files are used in metadata parsing stage

from apt-mirror.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.