Browse Source

Merge pull request #547 from lluiscampos/3.0.x-cherry-picks

3.0.x cherry picks
3.0.x
Lluis Campos 2 years ago
committed by GitHub
parent
commit
42f45dda28
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Dockerfile
  2. 2
      configs/mender_convert_config
  3. 1
      docker-mender-convert
  4. 7
      modules/deb.sh

1
Dockerfile

@ -17,6 +17,7 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
# For 'ar' command to unpack .deb
binutils \
xz-utils \
zstd \
# to be able to detect file system types of extracted images
file \
# to copy files between rootfs directories

2
configs/mender_convert_config

@ -155,7 +155,7 @@ MENDER_APT_REPO_URL="${MENDER_STORAGE_URL}/repos/debian"
# Mender APT repo available distributions, do not modify this unless you know
# what you are doing.
MENDER_APT_REPO_DISTS="debian/buster debian/bullseye ubuntu/bionic ubuntu/focal"
MENDER_APT_REPO_DISTS="debian/buster debian/bullseye ubuntu/bionic ubuntu/focal ubuntu/jammy"
# Mender GitHub organization URL prefix
MENDER_GITHUB_ORG="https://github.com/mendersoftware"

1
docker-mender-convert

@ -48,6 +48,7 @@ docker run \
-v /lib/modules:/lib/modules:ro \
--env MENDER_ARTIFACT_NAME="${MENDER_ARTIFACT_NAME}" \
--env MENDER_CONVERT_LOG_FILE=logs/"${LOG_FILE}" \
--env MENDER_CONVERT_VERSION=${GIT_PROVIDED_TAG_NAME} \
"$IMAGE_NAME" "$@"
exit_code=$?

7
modules/deb.sh

@ -1,4 +1,4 @@
# Copyright 2022 Northern.tech AS
# Copyright 2023 Northern.tech AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -111,7 +111,10 @@ function deb_extract_package() {
cd ${extract_dir}
run_and_log_cmd "ar -xv ${deb_package}"
mkdir -p files
run_and_log_cmd "sudo tar xJf data.tar.xz -C files"
local -r data_archive=$(find . -maxdepth 1 -type f -regex '.*/data\.tar\.\(zst\|xz\)' -printf '%P\n' -quit)
run_and_log_cmd "sudo tar xf ${data_archive} -C files"
cd - > /dev/null 2>&1
run_and_log_cmd "sudo rsync --archive --keep-dirlinks --verbose ${extract_dir}/files/ ${dest_dir}"

Loading…
Cancel
Save