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

Update Apt configuration to no longer explicitly prefer *.gz #37

Merged
merged 1 commit into from
May 24, 2018

Conversation

tianon
Copy link
Collaborator

@tianon tianon commented May 23, 2018

This was added back when Acquire::GzipIndexes only applied to literally gzip-compressed sources -- it's since been generalized (https://salsa.debian.org/apt-team/apt/commit/b0f4b486e6850c5f98520ccf19da71d0ed748ae4; src:apt version 1.0.9.2, jessie and newer), so this is only necessary on older Apt versions.

Thanks to @lamby for prompting me to take another look at this section of the configuration tweaks we apply (more comments/opinions are always welcome, especially around these contents -- we've tried to include fairly verbose comments explaining the rationale behind each change). ❤️

@lamby
Copy link

lamby commented May 23, 2018

Pleasure :)

@tianon
Copy link
Collaborator Author

tianon commented May 23, 2018

The last thing we want is the current DPL (and a master of reproducibility whose work we've shamelessly borrowed from) thinking we're doing really weird things that maybe we could explain better (or even do better)! 😅 ❤️

Relevant diffoscope for wheezy:

@@ -1,11 +1,14 @@
 # Since Docker users using "RUN apt-get update && apt-get install -y ..." in
 # their Dockerfiles don't go delete the lists files afterwards, we want them to
-# be as small as possible on-disk, so we explicitly request "gz" versions and
-# tell Apt to keep them gzipped on-disk.
+# be as small as possible on-disk, so we explicitly request that Apt keep them
+# compressed on-disk too instead of decompressing them.
 
 # For comparison, an "apt-get update" layer without this on a pristine
 # "debian:wheezy" base image was "29.88 MB", where with this it was only
 # "8.273 MB".
 
 Acquire::GzipIndexes "true";
+
+# https://salsa.debian.org/apt-team/apt/commit/b0f4b486e6850c5f98520ccf19da71d0ed748ae4; released in src:apt 1.0.9.2, 2014-10-02
+# prior to src:apt 1.0.9.2, "Acquire::GzipIndexes" _only_ applied to gzip-compressed list files, so we need to prefer those on older releases
 Acquire::CompressionTypes::Order:: "gz";

The same, but for stretch:

@@ -1,11 +1,10 @@
 # Since Docker users using "RUN apt-get update && apt-get install -y ..." in
 # their Dockerfiles don't go delete the lists files afterwards, we want them to
-# be as small as possible on-disk, so we explicitly request "gz" versions and
-# tell Apt to keep them gzipped on-disk.
+# be as small as possible on-disk, so we explicitly request that Apt keep them
+# compressed on-disk too instead of decompressing them.
 
 # For comparison, an "apt-get update" layer without this on a pristine
 # "debian:wheezy" base image was "29.88 MB", where with this it was only
 # "8.273 MB".
 
 Acquire::GzipIndexes "true";
-Acquire::CompressionTypes::Order:: "gz";

@lamby
Copy link

lamby commented May 23, 2018

\o/ diffoscope!

This was added back when "Acquire::GzipIndexes" only applied to literally gzip-compressed sources -- it's since been generalized (https://salsa.debian.org/apt-team/apt/commit/b0f4b486e6850c5f98520ccf19da71d0ed748ae4; `src:apt` version 1.0.9.2, jessie and newer), so this is only necessary on older Apt versions.
@tianon
Copy link
Collaborator Author

tianon commented Jun 22, 2018

Aha, this has caused #41 in Jessie, so we'll need to bump up that minimum APT version to Stretch's instead (since Stretch is just fine). Very odd symptoms there (APT trying to download a package nobody asked for), took embarrassingly long to figure out this was the cause. 😅

What's really odd is that it works if I go back in time to 2018-01-01. 🤷‍♂️

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

Successfully merging this pull request may close these issues.

None yet

2 participants