Browse Source

MEN-4256 Do not install the client by default on Prebuilt RPi images

This adds the:

* `MENDER_CLIENT_INSTALL` option, to allow an image to come without the
mender-client installed by default.

The option is on by default, but turned off for the custom image configuration
we use for building the images we provide as a part of our documentation onboarding.

Changelog: Added an option `MENDER_CLIENT_INSTALL=y/n`, in order to
configure the installation of the Mender client into the converted image.
Defaults to `yes`.

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2.5.x
Ole Petter 4 years ago
committed by Lluis Campos
parent
commit
9ef43ba9b7
  1. 3
      configs/images/raspberrypi_raspbian_config
  2. 4
      configs/mender_convert_config
  3. 20
      mender-convert-modify

3
configs/images/raspberrypi_raspbian_config

@ -13,6 +13,9 @@ IMAGE_OVERHEAD_FACTOR=1.0
# Best compression there is!
MENDER_COMPRESS_DISK_IMAGE=lzma
# MEN-4256: Do not install the mender-client by default in our images
MENDER_CLIENT_INSTALL="n"
#
# Resize the data partition to fill the remaining space, using parted, with systemd
#

4
configs/mender_convert_config

@ -113,6 +113,10 @@ MENDER_DATA_PART_SIZE_MB="128"
# Default is 8MB
MENDER_PARTITION_ALIGNMENT="8388608"
# Install Mender client
#
MENDER_CLIENT_INSTALL="y"
# Mender client version
#
# This is used to fetch the correct binaries

20
mender-convert-modify

@ -103,13 +103,19 @@ log_info "Installing Mender client and related files"
deb_arch=$(probe_debian_arch_name)
if [ "${MENDER_CLIENT_VERSION}" = "latest" ]; then
deb_name=$(deb_from_repo_dist_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "stable" "mender-client")
elif [ "${MENDER_CLIENT_VERSION}" = "master" ]; then
deb_name=$(deb_from_repo_dist_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "experimental" "mender-client")
else
DEBIAN_REVISION="-1"
deb_name=$(deb_from_repo_pool_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "mender-client" "${MENDER_CLIENT_VERSION}${DEBIAN_REVISION}")
if [ "${MENDER_CLIENT_INSTALL}" = "y" ]; then
log_info "Installing Mender Client version ${MENDER_CLIENT_VERSION}"
if [ "${MENDER_CLIENT_VERSION}" = "latest" ]; then
deb_name=$(deb_from_repo_dist_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "stable" "mender-client")
elif [ "${MENDER_CLIENT_VERSION}" = "master" ]; then
deb_name=$(deb_from_repo_dist_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "experimental" "mender-client")
else
DEBIAN_REVISION="-1"
deb_name=$(deb_from_repo_pool_get "work/deb-packages" ${MENDER_APT_REPO_URL} ${deb_arch} "mender-client" "${MENDER_CLIENT_VERSION}${DEBIAN_REVISION}")
fi
fi
deb_extract_package "work/deb-packages/${deb_name}" "work/rootfs/"

Loading…
Cancel
Save