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

Please provide .deb packages for Debian 11/12 armhf & arm64 #543

Closed
stefanb2 opened this issue Sep 29, 2023 · 6 comments
Closed

Please provide .deb packages for Debian 11/12 armhf & arm64 #543

stefanb2 opened this issue Sep 29, 2023 · 6 comments
Assignees
Labels
OS support request Request for new OS/ Arch support

Comments

@stefanb2
Copy link

Unfortunately the SW build described by How To Build the Device Update Agent is unreliable/not reproducable, even inside a Docker container to isolate it from the build host OS.

I really can't see the point that I (and others...) have to re-invent the wheel over-and-over again and spend several working days fixing bugs in the build process and source code, just to enable an Azure IoT feature (i.e. Device Update) on an officially supported Azure IoT Edge platform (like Debian 11/arm64, e.g. Raspi OS).

I'm wondering why the project doesn't provide pre-built .deb packages in the Microsoft production packages repository for officially supported Azure IoT Edge platforms? Other Azure IoT Edge projects already do this as SOP, e.g. moby-engine.

I sincerely hope that the (technical) reason for this isn't that the project itself isn't able to reproduce the SW build...

As the Raspberry Pi 5 announcement indicates that Raspi OS will be rebased to Debian 12, it would be nice if that platform would also be covered.

@eshashah-msft eshashah-msft self-assigned this Oct 4, 2023
@eshashah-msft
Copy link
Contributor

Hi @stefanb2,

DU agent is available for Ubuntu 20.4, Deb 10 for various archs as debian packages (Link). Debian 11(arm32, arm64 and x64) and Ubuntu 22.04 packages are in work and should be published in next few weeks. I will update this issue as soon as those are available.

While our aim is to ensure alignment with other services like IoT Edge, we are an independent service and need to have bandwidth for adding support to new OS, Archs.

The build instructions are if there are code modifications that users would want to build for or if you want to port to other OS and arch where out of box support is not available. Also please feel free to create a new issue for any specific bugs/ issues you are hitting with the build and install-deps script.

We do not have a timeline for Raspberry Pi 5 and Debian 12 yet. But please free to upvote this discussion item that allows us to prioritize the ask.

@stefanb2
Copy link
Author

stefanb2 commented Oct 5, 2023

@eshashah-msft snippets that show how I attempted the build.

Docker image based on debian:bullseye-slim for the platform linux/aarch64 with additional packages installed:

# Debian package installation
# NOTE: build scripts assume that they can run apt-get install
RUN \
  mkdir -p /build /out && \
  apt-get update       && \
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    ca-certificates \
    curl            \
    patch           \
    && \
  /bin/true

Build script inside the Docker container:

#!/bin/bash -xe
set -xe

# constants
_package_name="iot-hub-device-update"
_release_base_url="https://github.com/Azure/${_package_name}/archive/refs/tags/"
_release_suffix=".tar.gz"
_release_version="1.0.2"

# Fetch release source tarball
_file="${_package_name}-${_release_version}${_release_suffix}"
curl \
      --fail-early --location \
      --output "${_file}" --remote-name-all \
      "${_release_base_url}${_release_version}${_release_suffix}"

... <REMOVED NOT IMPORTANT STUFF> ...

# install dependencies
# NOTE: DO 1.1.0 required for Debian 11 support
DEBIAN_FRONTEND=noninteractive \
  ./scripts/install-deps.sh \
    --install-aduc-deps --install-packages \
    --install-do --do-ref v1.1.0 \

# build debian package
./scripts/build.sh --build-packages --type Release

For the build to proceed to the last step I needed to apply the following patch to the source tree:

diff -up iot-hub-device-update-1.0.2/scripts/install-deps.sh.ORIG iot-hub-device-update-1.0.2/scripts/install-deps.sh
--- iot-hub-device-update-1.0.2/scripts/install-deps.sh.ORIG	2023-02-09 01:03:44.000000000 +0200
+++ iot-hub-device-update-1.0.2/scripts/install-deps.sh	2023-09-15 15:34:08.607778247 +0300
@@ -79,7 +79,9 @@ do_ref=$default_do_ref
 # Dependencies packages
 aduc_packages=('git' 'make' 'build-essential' 'cmake' 'ninja-build' 'libcurl4-openssl-dev' 'libssl-dev' 'uuid-dev' 'python2.7' 'lsb-release' 'curl' 'wget' 'pkg-config')
 static_analysis_packages=('clang' 'clang-tidy' 'cppcheck')
-compiler_packages=("gcc-[68]")
+# NOTE: already handled by build-essentials dependencies
+#compiler_packages=("gcc-[68]")
+compiler_packages=()
 
 # Distro and arch info
 OS=""
@@ -167,7 +169,9 @@ do_install_aduc_packages() {
     if [[ $OS == "debian" && $VER == "9" ]]; then
         $SUDO apt-get install --yes gcc-6 g++-6 || return
     else
-        $SUDO apt-get install --yes gcc-8 g++-8 || return
+# NOTE: already handled by build-essentials dependencies
+#        $SUDO apt-get install --yes gcc-8 g++-8 || return
+       /bin/true
     fi
 
     echo "Installing packages required for static analysis..."
@@ -405,7 +409,8 @@ do_install_do_release_tarball() {
         popd || return
     fi
 
-    return 0
+    echo -e "No libdeliveryoptimization release tarball available for this OS, falling back to build from source.\n"
+    return 1
 }
 
 do_install_do() {

The final step failed with a compilation error. I stopped there, because reaching this point had already taken too much time.

@jw-msft jw-msft added the OS support request Request for new OS/ Arch support label Oct 27, 2023
@patheikkinen
Copy link

It would be great if you could provide an updated view on when you expect (to the extent that it can be estimated anyway) Ubuntu 22 support might be ready. The last info on the subject is two months old now and at this point clearly outdated.

@Clockwork-Muse
Copy link

... and 24.04 is going to be released in 5 months, so I hope somebody is already looking at that...

@eshashah-msft
Copy link
Contributor

eshashah-msft commented Dec 22, 2023

Please find the packages for Debian 11 in the repo here: https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod/pool/main/d/deviceupdate-agent/

and Ubuntu 22.04 Debian packages here: https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod/pool/main/d/deviceupdate-agent/

We are tracking support for Debian 12 in our backlog for future release and will track Ubuntu 24.04 as well

@Clockwork-Muse
Copy link

Argh.
So, it turns out RPi 5 doesn't (natively) support Ubuntu 22.04 (only 23+), and RPi OS uses Deb12.
That's going to make my life more interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS support request Request for new OS/ Arch support
Projects
None yet
Development

No branches or pull requests

5 participants