Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APT repository snapshots do not include dists/$DIST/$COMP/[i18n|source] #230

Open
davidwalensabfs opened this issue Aug 23, 2023 · 4 comments
Assignees

Comments

@davidwalensabfs
Copy link

# apt -o "Acquire::https::Verify-Peer=false" update
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Get:2 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm InRelease [151 kB]
Ign:3 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Sources
Ign:4 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main amd64 Packages
Ign:5 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Translation-en
Ign:3 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Sources
Get:4 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main amd64 Packages [8,906 kB]
Ign:5 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Translation-en
Ign:3 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Sources
Ign:5 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Translation-en
Ign:3 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Sources
Err:5 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Translation-en
  404  Not Found [IP: IPADDRESS 443]
Ign:3 https://DOMAIN/repository/DebianBookwormTest/snapshots/testing bookworm/main Sources
Fetched 9,057 kB in 1s (6,277 kB/s)
Reading package lists... Done
E: Failed to fetch https://DOMAIN/repository/DebianBookwormTest/snapshots/testing/dists/bookworm/main/i18n/Translation-en  404  Not Found [IP: IPADDRESS 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
  • Do you have a workaround you are using at present?
    No
  • What feature or behavior is this required for?
    Taking and using snapshots
  • How could we solve this issue? (Not knowing is okay!)
    Maybe by including folders i18n and source into created snapshots:
    private static final String PACKAGE_PATH = "dists/%s/%s/binary-%s/%s";

    I'm not an expert in APT repositories, but this was my first thought, maybe there is a reason for this kind of behaviour.
  • Tell us about your Nexus Repository deployment: what version, operating system, and database are you using?
    Docker on a Debian Bookworm VM
Version | 3.59.0-01
Edition | OSS
Build Revision | fd84b9b97455d744af67422b5a31617a9d364d21
Build Timestamp | 2023-08-09-1532-53861

  • Anything else?
    Thanks!
@nblair
Copy link
Contributor

nblair commented Aug 29, 2023

Thanks @davidwalensabfs for opening an issue. We currently don't have support for the behavior you describe, we'll leave this open to track demand.

@davidwalensabfs
Copy link
Author

Hello @nblair,
thanks for looking in our issue.
Can you please confirm if this is a bug, or is it intended behaviour? Because currently it isn't possible to use the snapshot feature.
Thanks!

@robleady
Copy link

robleady commented Oct 6, 2023

@nblair - this looks more like a bug than an enhancement request to me.
Snapshots of APT repository simply don't work in my experience.
I've tried previously to get things working with Debian snapshots, and hit the issue again recently when trying to use an Ubuntu snapshot.

Using the following source, things look fine.
deb http://nexus.local/repository/ubuntu-jammy/ jammy main

# apt update
Hit:1 http://nexus.local:8081/repository/ubuntu-jammy jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

If I try to use a snapshot of the same repo, it fails:
deb http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy main

# apt update
Get:1 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy InRelease [270 kB]
Get:2 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main amd64 Packages [1395 kB]
Ign:3 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main Translation-en
Ign:4 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main amd64 c-n-f Metadata
Ign:3 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main Translation-en
Ign:4 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main amd64 c-n-f Metadata
Ign:3 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main Translation-en
Ign:4 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main amd64 c-n-f Metadata
Ign:3 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main Translation-en
Err:4 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main amd64 c-n-f Metadata
  404  Not Found [IP: 10.x.x.x 8081]
Ign:3 http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001 jammy/main Translation-en
Fetched 270 kB in 0s (549 kB/s)
Reading package lists... Done
E: Failed to fetch http://nexus.local:8081/repository/ubuntu-jammy/snapshots/20231001/dists/jammy/main/cnf/Commands-amd64  404  Not Found [IP: 10.x.x.x 8081]
E: Some index files failed to download. They have been ignored, or old ones used instead.

@davidwalensabfs
Copy link
Author

davidwalensabfs commented Oct 9, 2023

@robleady I came accross this old issue: sonatype-nexus-community/nexus-repository-apt#46 (comment)

It's possible to skip language files download, by disabling it in apt's configuration with Acquire::Languages "none";.
https://askubuntu.com/questions/74653/how-can-i-remove-the-translation-entries-in-apt/74663#74663

Maybe you are lucky if you disable download of cnf content: https://askubuntu.com/questions/1182902/why-do-lines-with-c-n-f-metadata-appear-in-the-output-of-sudo-apt-update

All in all apt support doesn't seem to be well implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants