Files
runner-images-sangeeth/images/ubuntu/scripts/build/configure-dpkg.sh
T

43 lines
1.8 KiB
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
2023-11-22 21:49:23 +01:00
################################################################################
## File: configure-dpkg.sh
## Desc: Configure dpkg
################################################################################
2020-02-04 16:03:08 +03:00
# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/os.sh
2020-02-04 16:03:08 +03:00
# This is the anti-frontend. It never interacts with you at all,
# and makes the default answers be used for all questions. It
# might mail error messages to root, but that's it; otherwise it
# is completely silent and unobtrusive, a perfect frontend for
# automatic installs. If you are using this front-end, and require
2024-03-14 10:53:11 +01:00
# non-default answers to questions, you will need to pre-seed the
2020-02-04 16:03:08 +03:00
# debconf database
2023-12-26 12:50:52 +01:00
set_etc_environment_variable "DEBIAN_FRONTEND" "noninteractive"
2020-02-04 16:03:08 +03:00
# dpkg can be instructed not to ask for confirmation
# when replacing a configuration file (with the --force-confdef --force-confold options)
cat <<EOF >> /etc/apt/apt.conf.d/10dpkg-options
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
EOF
# hide information about packages that are no longer required
cat <<EOF >> /etc/apt/apt.conf.d/10apt-autoremove
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
EOF
# Install libicu70 package for Ubuntu 24
if is_ubuntu24 ; then
2025-04-11 11:53:08 -06:00
wget https://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb
EXPECTED_LIBICU_SHA512="a6315482d93606e375c272718d2458870b95e4ed4b672ea8640cf7bc2d2c2f41aea13b798b1e417e1ffc472a90c6aad150d3d293aa9bddec48e39106e4042807"
ACTUAL_LIBICU_SHA512="$(sha512sum "./libicu70_70.1-2_amd64.deb" | awk '{print $1}')"
[ "$EXPECTED_LIBICU_SHA512" = "$ACTUAL_LIBICU_SHA512" ] || { echo "libicu checksum mismatch in configure-dpkg.sh"; exit 1;}
sudo apt-get install -y ./libicu70_70.1-2_amd64.deb
fi