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

Support for Acquire-by-hash feature of APT 1.2.0 #536

Closed
erickeller opened this issue Apr 1, 2017 · 3 comments · Fixed by #664
Closed

Support for Acquire-by-hash feature of APT 1.2.0 #536

erickeller opened this issue Apr 1, 2017 · 3 comments · Fixed by #664
Labels

Comments

@erickeller
Copy link

It could be that some racing condition around an apt checksum missmatch ocurrs when apt-get update and aptly generates a new Release file.

Detailed Description

More information from package cloud.io
blog.packagecloud.io/eng/2016/09/27/fixing-apt-hash-sum-mismatch-consistent-apt-repositories/

Thanks @tuxtimo for pointing to this reference

Cheers

@smira
Copy link
Contributor

smira commented Apr 3, 2017

Thanks for the link, that should be really interesting feature, but not very trivial to implement (as we need to generate those links by hash and clean them up eventually).

@neolynx
Copy link
Member

neolynx commented Apr 17, 2017

Hello!
More info on that topic: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

I did a first implementation, please let me know what you think about it. Works well with ubuntu yakkety. I did not look into mirroring repos with Acquire-By-Hash yet.

@smira
Copy link
Contributor

smira commented Apr 17, 2017

This looks great, I'm looking forward towards it!

sliverc pushed a commit to sliverc/aptly that referenced this issue Oct 17, 2017
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
 /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"

This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.

Note: this only works with aptly.FileSystemPublishedStorage

Closes: aptly-dev#536

Signed-off-by: André Roth <neolynx@gmail.com>
sliverc pushed a commit to sliverc/aptly that referenced this issue Nov 2, 2017
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
 /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"

This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.

Note: this only works with aptly.FileSystemPublishedStorage

Closes: aptly-dev#536

Signed-off-by: André Roth <neolynx@gmail.com>
sliverc pushed a commit to sliverc/aptly that referenced this issue Nov 17, 2017
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
 /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"

This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.

Note: this only works with aptly.FileSystemPublishedStorage

Closes: aptly-dev#536

Signed-off-by: André Roth <neolynx@gmail.com>
sliverc pushed a commit to sliverc/aptly that referenced this issue Nov 30, 2017
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
 /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"

This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html

This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.

Note: this only works with aptly.FileSystemPublishedStorage

Closes: aptly-dev#536

Signed-off-by: André Roth <neolynx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants