Hard-code enabling usr-merge for Ubuntu releases equal or newer than
21.x and Debian releases equal or newer than Bullseye (11).
We probably want to add a override to the configuration, for force
enabling or disabling.
For now avoid doing so in Devuan, IIRC they do not want to follow
usr-merge at the moment.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
commit dbac106eb6 introduced a flaw in
the logic - once a file is downloaded the 'last;' statement exited the
inner loop iterating over the compoentens instead of the outer one
iterating over the compressors.
since both do not inherently depend on each other simply swap them.
noticed while trying to build a pmg-template in a clean environment
with full repository configuration (before the tests worked due to
leftover files in the infodir)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Some repositories (e.g. debian-security) only offer .xz compressed
Packages, others (e.g. promox repositories) only .gz compressed ones.
Make the compressors an array and try them in order until successful
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
levle 9 is what Arch Linux uses for their packages, so it's a widely
used level which is a good default tradeoff for such images.
Add also zstd-max level, which uses the highest default level which
is still highly efficient on decompression, i.e., while compression
needs more time and resources the decompression doesn't.
Some number for a Debian 11 minimal template from 2021-05-06:
uncomp. 321M 100.0%
gzip 116M 36.1%
zstd 0 106M 33.0%
zstd 9 98M 30.5%
zstd 19 83M 26.8%
So, the still cheap to extract zstd lvl19 need 33M less than the
current default gzip, the access log from our german cdn server show
about 490 successful access to our system images per day, that would
mean that changes saves `490 download/day * 30.4375 days/month * 33M
saved/download` =~ 490 G/month traffic for us and for users.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
If it somehow really makes sense a user can just unmask it again,
this is just setting the default, nothing permanent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
hopefully we can extract some features to this hash in the future so
that the other spaghetti code with big if/else chains in the future
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
otherwise mail received via TCP (localhost port 25) is not accepted, since
there is no default smptd_relay_restriction set, which would make the system an
open relay.
in compatibility_level 2 the default is sensibly set to:
'permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination'
reported via the pve-user list:
https://pve.proxmox.com/pipermail/pve-user/2020-February/171368.html
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
We cannot use perl 'keys', because that return a list with random
order. Some packages use preinst scripts (run at unpack time), so
package order is important.
(cherry picked from commit a922f88f4a)