Devuan bug report logs - #168
apt-get update fails in ascii if a local mirror is used using a file:/// URL due to missing .xz files

Package: amprolla; Maintainer for amprolla is Devuan Developers <devuan-dev@lists.dyne.org>;

Reported by: Daniel Abrecht <me@danielabrecht.ch>

Date: Thu, 14 Dec 2017 16:33:02 UTC

Severity: normal

Tags: ascii

Done: KatolaZ <katolaz@freaknet.org>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, Daniel Reurich <daniel@centurion.net.nz>:
bug#168; Package amprolla. (full text, mbox, link).


Acknowledgement sent to Daniel Abrecht <me@danielabrecht.ch>:
New bug report received and forwarded. Copy sent to Daniel Reurich <daniel@centurion.net.nz>. (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: Daniel Abrecht <me@danielabrecht.ch>
To: submit@bugs.devuan.org
Subject: apt-get update fails in ascii if a local mirror is used using a file:/// URL due to missing .xz files
Date: Thu, 14 Dec 2017 16:23:54 +0000
Package: amprolla
Version: 3
Tags: ascii

In devuan ascii, apt tries to use .xz archives before .gz archives by
default, but the .xz archives are missing. This doesn't cause any
problems when using http or https transport to access the repos, since
apt will just use the .gz archive when it can't download the .xz
archive. But it fails if a local mirror is used using a file:/// url.
I'm using apt-mirror for my local mirror, but that shouldn't matter.

My current workaround for this is to create a config file at
/etc/apt/apt.conf.d/20archivetypes to specify which archive type to use.
It contains the following line:
Acquire::CompressionTypes::Order:: "gz";

This Problem doesn't affect devuan jessie.

There are multiple possible solutions:
 1) Generate the .xz files
 2) Don't list the .xz files in the release files etc.
 3) Change the behaviour of apt to fallback to other compression types
when accessing a repo over a file:/// url
 4) Creating a config file to change the order using a package


Here is the output of a failed apt-get update. It will only fail if the
files it tries to download have changed since the last successful update:
> root@duck:~# apt-get update
> Get:1 file:/var/local/apt-repo ascii InRelease [63.5 kB]
> Get:1 file:/var/local/apt-repo ascii InRelease [63.5 kB]
> Get:2 file:/var/local/apt-repo ascii-updates InRelease [63.5 kB]
> Get:3 file:/var/local/apt-repo ascii-security InRelease [62.9 kB]
> Get:2 file:/var/local/apt-repo ascii-updates InRelease [63.5 kB]
> Get:3 file:/var/local/apt-repo ascii-security InRelease [62.9 kB]
> Get:4 file:/var/local/apt/mirror/devuanfwojg73k6r.onion/devuan
ascii-proposed InRelease [122 kB]
> Get:4 file:/var/local/apt/mirror/devuanfwojg73k6r.onion/devuan
ascii-proposed InRelease [122 kB]
> Get:5 file:/var/local/apt-repo ascii/main Sources [8,675 kB]
> Err:5 file:/var/local/apt-repo ascii/main Sources
>   Hash Sum mismatch
>   Hashes of expected file:
>    - Filesize:8675180 [weak]
>    -
SHA256:536af199dd5d825a4866a8de4960d98f8cb20921d6de52df8c20ae0376be8bb2
>   Hashes of received file:
>   Release file created at: Wed, 13 Dec 2017 23:04:02 +0000
> Get:6 file:/var/local/apt-repo ascii/main amd64 Packages [9,667 kB]
> Err:6 file:/var/local/apt-repo ascii/main amd64 Packages
>
> Get:7 file:/var/local/apt-repo ascii-updates/main Sources [3,740 B]
> Err:7 file:/var/local/apt-repo ascii-updates/main Sources
>   Hash Sum mismatch
>   Hashes of expected file:
>    - Filesize:3740 [weak]
>    -
SHA256:669f1a2b277cd1e7d2fd4349adc2ee82d53c676afc54376fb0e1ce2405ce4b83
>   Hashes of received file:
>   Release file created at: Thu, 14 Dec 2017 03:18:02 +0000
> Get:8 file:/var/local/apt-repo ascii-updates/main amd64 Packages [6,540 B]
> Err:8 file:/var/local/apt-repo ascii-updates/main amd64 Packages
>
> Get:9 file:/var/local/apt-repo ascii-security/main Sources [115 kB]
> Err:9 file:/var/local/apt-repo ascii-security/main Sources
>   Hash Sum mismatch
>   Hashes of expected file:
>    - Filesize:115364 [weak]
>    -
SHA256:906afc78836447f892c7f063b5991641deb05e5688dc5cb6d6634c9c8543b0c5
>   Hashes of received file:
>   Release file created at: Wed, 13 Dec 2017 23:04:01 +0000
> Get:10 file:/var/local/apt-repo ascii-security/main amd64 Packages
[280 kB]
> Err:10 file:/var/local/apt-repo ascii-security/main amd64 Packages
>
> Get:11 file:/var/local/apt/mirror/devuanfwojg73k6r.onion/devuan
ascii-proposed/main amd64 Packages [19.7 kB]
> Reading package lists... Done
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii/main/source/Sources.xz  Hash Sum
mismatch
>    Hashes of expected file:
>     - Filesize:8675180 [weak]
>     -
SHA256:536af199dd5d825a4866a8de4960d98f8cb20921d6de52df8c20ae0376be8bb2
>    Hashes of received file:
>    Release file created at: Wed, 13 Dec 2017 23:04:02 +0000
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii/main/binary-amd64/Packages.xz
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii-updates/main/source/Sources.xz
Hash Sum mismatch
>    Hashes of expected file:
>     - Filesize:3740 [weak]
>     -
SHA256:669f1a2b277cd1e7d2fd4349adc2ee82d53c676afc54376fb0e1ce2405ce4b83
>    Hashes of received file:
>    Release file created at: Thu, 14 Dec 2017 03:18:02 +0000
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii-updates/main/binary-amd64/Packages.xz
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii-security/main/source/Sources.xz
Hash Sum mismatch
>    Hashes of expected file:
>     - Filesize:115364 [weak]
>     -
SHA256:906afc78836447f892c7f063b5991641deb05e5688dc5cb6d6634c9c8543b0c5
>    Hashes of received file:
>    Release file created at: Wed, 13 Dec 2017 23:04:01 +0000
> E: Failed to fetch
file:/var/local/apt-repo/dists/ascii-security/main/binary-amd64/Packages.xz

> E: Some index files failed to download. They have been ignored, or old
ones used instead.


Here is the output of apt-get update after the workaround:
> root@duck:~# apt-get update
> Get:1 file:/var/local/apt-repo ascii InRelease [63.5 kB]
> Get:1 file:/var/local/apt-repo ascii InRelease [63.5 kB]
> Get:2 file:/var/local/apt-repo ascii-updates InRelease [63.5 kB]
> Get:3 file:/var/local/apt-repo ascii-security InRelease [62.9 kB]
> Get:2 file:/var/local/apt-repo ascii-updates InRelease [63.5 kB]
> Get:3 file:/var/local/apt-repo ascii-security InRelease [62.9 kB]
> Get:4 file:/var/local/apt/mirror/devuanfwojg73k6r.onion/devuan
ascii-proposed InRelease [122 kB]
> Get:4 file:/var/local/apt/mirror/devuanfwojg73k6r.onion/devuan
ascii-proposed InRelease [122 kB]
> Get:5 file:/var/local/apt-repo ascii/main Sources [8,675 kB]
> Get:6 file:/var/local/apt-repo ascii/main amd64 Packages [9,666 kB]
> Get:7 file:/var/local/apt-repo ascii-updates/main Sources [3,678 B]

> Get:8 file:/var/local/apt-repo ascii-updates/main amd64 Packages
[6,477 B]
> Get:9 file:/var/local/apt-repo ascii-security/main Sources [115 kB]

> Get:10 file:/var/local/apt-repo ascii-security/main amd64 Packages
[280 kB]
> Reading package lists... Done


Reply sent to KatolaZ <katolaz@freaknet.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Daniel Abrecht <me@danielabrecht.ch>:
bug acknowledged by developer. (full text, mbox, link).


Message #10 received at 168-close@bugs.devuan.org (full text, mbox, reply):

From: KatolaZ <katolaz@freaknet.org>
To: 168-close@bugs.devuan.org
Subject: solved
Date: Sat, 16 Dec 2017 18:48:16 +0000
[Message part 1 (text/plain, inline)]
Solved by the following patch:

  https://git.devuan.org/devuan-infrastructure/amprolla3/commit/590e458822ade96226382d34bea568d1d0c7d5ad

Closing
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Tue Apr 23 18:29:29 2024;