From d4749445ff3aa6af305d3f3b2716dfda8af7119f Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Tue, 27 Oct 2026 10:15:45 +0200 Subject: [PATCH 1/7] ci: Add packaging directory with the standard debhelper files Signed-off-by: Alin Opris --- packaging/debian/changelog | 5 +++++ packaging/debian/control | 19 +++++++++++++++++++ packaging/debian/copyright | 9 +++++++++ packaging/debian/rules | 10 ++++++++++ packaging/debian/source/format | 1 + 5 files changed, 44 insertions(+) create mode 100644 packaging/debian/changelog create mode 100644 packaging/debian/control create mode 100644 packaging/debian/copyright create mode 100644 packaging/debian/rules create mode 100644 packaging/debian/source/format diff --git a/packaging/debian/changelog b/packaging/debian/changelog new file mode 100644 index 000000000..a849c7e9e --- /dev/null +++ b/packaging/debian/changelog @@ -0,0 +1,5 @@ +libiio (@VERSION@) UNRELEASED; urgency=low + + * CI release. + + -- EngineerZone @DATE@ \ No newline at end of file diff --git a/packaging/debian/control b/packaging/debian/control new file mode 100644 index 000000000..6220ddb95 --- /dev/null +++ b/packaging/debian/control @@ -0,0 +1,19 @@ +Source: libiio +Section: libs +Priority: optional +Maintainer: Engineerzone +Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, + libcdk5-dev, libaio-dev, libusb-1.0-0-dev, libzstd-dev, + libserialport-dev, libavahi-client-dev +Standards-Version: 4.6.0 +Homepage: https://github.com/analogdevicesinc/libiio + +Package: libiio +Architecture: @ARCHITECTURE@ +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: libiio0, libiio-dev, libiio-utils, iiod +Conflicts: libiio0, libiio-dev, libiio-utils, iiod +Replaces: libiio0, libiio-dev, libiio-utils, iiod +Description: Library for interfacing with IIO devices + libiio is used to interface to the Linux Industrial Input/Output (IIO) + Subsystem. Includes library, development files, utilities, and daemon. diff --git a/packaging/debian/copyright b/packaging/debian/copyright new file mode 100644 index 000000000..6b0411745 --- /dev/null +++ b/packaging/debian/copyright @@ -0,0 +1,9 @@ +Copyright: , Analog Devices, Inc. +License: LGPL-2.1 + +License: LGPL-2.1 +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; version 2.1 of the License. +On Debian systems, the complete text of version 2.1 of the GNU Lesser +General Public License can be found in '/usr/share/common-licenses/LGPL-2.1'. diff --git a/packaging/debian/rules b/packaging/debian/rules new file mode 100644 index 000000000..f486b3ff8 --- /dev/null +++ b/packaging/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCPP_BINDINGS=ON \ + -DWITH_SERIAL_BACKEND=ON \ + -DWITH_EMU_BACKEND=ON \ + -DWITH_MAN=ON diff --git a/packaging/debian/source/format b/packaging/debian/source/format new file mode 100644 index 000000000..46ebe0266 --- /dev/null +++ b/packaging/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file From 7b09d6cc649f27d8c960e1985ed241e37c1225c9 Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Tue, 27 Oct 2026 10:20:21 +0200 Subject: [PATCH 2/7] ci: Configure workflows to use the deb-generator-action Configure arm-builds and linux-builds to use the deb-generator-action instead of generating deb packages with cmake. Adapt the artifact_manifest.txt.cmakein with the new naming of the packages. Signed-off-by: Alin Opis --- .github/workflows/_arm-builds.yml | 118 ++++++++++++---------------- .github/workflows/_linux-builds.yml | 36 ++++++++- artifact_manifest.txt.cmakein | 51 ++++-------- 3 files changed, 101 insertions(+), 104 deletions(-) diff --git a/.github/workflows/_arm-builds.yml b/.github/workflows/_arm-builds.yml index 0e045f288..8d3b796e1 100644 --- a/.github/workflows/_arm-builds.yml +++ b/.github/workflows/_arm-builds.yml @@ -47,51 +47,44 @@ jobs: - image: arm32v7/debian:trixie platform-flag: '--platform linux/arm/v7' artifact-name: Debian-13-armhf - env: - ARTIFACTNAME: ${{ matrix.artifact-name }} - CMAKE_BUILD_TYPE: ${{ inputs.build-type }} steps: - uses: actions/checkout@v7 with: fetch-depth: 1 - - name: Build - run: | - set -e - docker run \ - ${{ matrix.platform-flag }} \ - --rm -t --privileged \ - -e ARTIFACTNAME=${{ matrix.artifact-name }} \ - -e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \ - -v "${{ github.workspace }}":"/ci" \ - "${{ matrix.image }}" \ - /bin/bash -c " - set -e - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y build-essential git cmake libxml2-dev bison flex \ - libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ - libserialport-dev libavahi-client-dev \ - python3 python3-pip python3-setuptools + - uses: actions/checkout@v7 + with: + repository: analogdevicesinc/shared-actions + path: shared-actions + fetch-depth: 1 - git clone --depth 1 https://github.com/pcercuei/libini.git - cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig - cd /ci + - name: Get version + id: version + run: | + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME} - make - make package - make required2tar - " + - name: Build deb + run: | + set -e + docker run -d --name builder \ + ${{ matrix.platform-flag }} --privileged \ + -v "${{ github.workspace }}:${{ github.workspace }}" \ + -w "${{ github.workspace }}" \ + -e DEBIAN_FRONTEND=noninteractive \ + -e GITHUB_WORKSPACE="${{ github.workspace }}" \ + -e VERSION="${{ steps.version.outputs.version }}" \ + -e WORKING_DIRECTORY="${{ github.workspace }}" \ + -e IGNORE_PATH="shared-actions" \ + "${{ matrix.image }}" sleep infinity + docker exec builder bash -c "apt-get update && apt-get install -y curl" + docker exec builder bash shared-actions/deb-generator-action/build-deb.sh - name: Upload artifacts uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} - path: | - build/*.deb - build/*.tar.gz + path: artifacts cross-arch: name: ${{ matrix.artifact-name }} @@ -113,51 +106,44 @@ jobs: - image: ubuntu:26.04 arch: s390x artifact-name: Ubuntu-26.04-s390x - env: - ARTIFACTNAME: ${{ matrix.artifact-name }} - CMAKE_BUILD_TYPE: ${{ inputs.build-type }} steps: - uses: actions/checkout@v7 with: fetch-depth: 1 + - uses: actions/checkout@v7 + with: + repository: analogdevicesinc/shared-actions + path: shared-actions + fetch-depth: 1 + - name: Set up QEMU uses: docker/setup-qemu-action@v4 - - name: Build + - name: Get version + id: version run: | - set -e - sudo docker run \ - --platform "linux/${{ matrix.arch }}" \ - --rm -t --privileged \ - -e ARTIFACTNAME=${{ matrix.artifact-name }} \ - -e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \ - -v "${{ github.workspace }}":"/ci" \ - "${{ matrix.image }}" \ - /bin/bash -c " - set -e - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y build-essential git cmake libxml2-dev bison flex \ - libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ - libserialport-dev libavahi-client-dev \ - python3 python3-pip python3-setuptools - - git clone --depth 1 https://github.com/pcercuei/libini.git - cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig - cd /ci + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME} - make - make package - make required2tar - " + - name: Build deb + run: | + set -e + docker run -d --name builder \ + --platform "linux/${{ matrix.arch }}" --privileged \ + -v "${{ github.workspace }}:${{ github.workspace }}" \ + -w "${{ github.workspace }}" \ + -e DEBIAN_FRONTEND=noninteractive \ + -e GITHUB_WORKSPACE="${{ github.workspace }}" \ + -e VERSION="${{ steps.version.outputs.version }}" \ + -e WORKING_DIRECTORY="${{ github.workspace }}" \ + -e IGNORE_PATH="shared-actions" \ + "${{ matrix.image }}" sleep infinity + docker exec builder bash -c "apt-get update && apt-get install -y curl" + docker exec builder bash shared-actions/deb-generator-action/build-deb.sh - name: Upload artifacts uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} - path: | - build/*.deb - build/*.tar.gz + path: artifacts diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 29c2a7c07..76c65c4fe 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -18,18 +18,23 @@ jobs: include: - image: ubuntu:22.04 artifact-name: Linux-Ubuntu-22.04 + deb: true - image: ubuntu:24.04 artifact-name: Linux-Ubuntu-24.04 + deb: true - image: ubuntu:26.04 artifact-name: Linux-Ubuntu-26.04 + deb: true - image: fedora:42 artifact-name: Linux-Fedora-42 - image: fedora:44 artifact-name: Linux-Fedora-44 - image: debian:bookworm artifact-name: Linux-Debian-12 + deb: true - image: debian:trixie artifact-name: Linux-Debian-13 + deb: true - image: opensuse/leap:15.6 artifact-name: Linux-openSUSE-15.6 - image: opensuse/leap:16.0 @@ -48,7 +53,7 @@ jobs: apt-get install -y build-essential git cmake libxml2-dev bison flex \ libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ libserialport-dev libavahi-client-dev doxygen graphviz man2html \ - python3 python3-pip python3-setuptools wget + python3 python3-pip python3-setuptools wget curl pip3 install sphinx --break-system-packages 2>/dev/null || pip3 install sphinx # Fedora @@ -84,8 +89,23 @@ jobs: make VERBOSE=1 cmake .. -DLICENSE_CHECK=ON export QA_RPATHS=$(( 0x0001|0x0002 )) - make package - make required2tar + if [ "${{ matrix.deb }}" != "true" ]; then + make package + make required2tar + fi + + - name: Get version + if: matrix.deb + id: version + run: | + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" + + - uses: analogdevicesinc/shared-actions/deb-generator-action@main + if: matrix.deb + id: deb + with: + version: ${{ steps.version.outputs.version }} - name: Build with Examples if: matrix.artifact-name == 'Linux-Ubuntu-24.04' @@ -104,10 +124,18 @@ jobs: run: ./CI/scripts/check_README_BUILD.sh - name: Upload artifacts + if: "!matrix.deb" uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} path: | - build/*.deb build/*.rpm build/*.tar.gz + + - name: Upload artifacts + if: matrix.deb + uses: actions/upload-artifact@v7 + with: + name: ${{ matrix.artifact-name }} + path: | + ${{ steps.deb.outputs.artifact-dir }} diff --git a/artifact_manifest.txt.cmakein b/artifact_manifest.txt.cmakein index cc3aea959..fafa22859 100644 --- a/artifact_manifest.txt.cmakein +++ b/artifact_manifest.txt.cmakein @@ -6,20 +6,15 @@ Linux-Fedora-42/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-42.tar.gz Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.rpm Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.tar.gz -Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.deb -Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.tar.gz +Linux-Debian-12/libiio_@VERSION@-1_amd64.deb -Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.deb -Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.tar.gz +Linux-Debian-13/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.deb -Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.tar.gz +Linux-Ubuntu-22.04/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.deb -Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.tar.gz +Linux-Ubuntu-24.04/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.deb -Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.tar.gz +Linux-Ubuntu-26.04/libiio_@VERSION@-1_amd64.deb Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.rpm Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.tar.gz @@ -42,41 +37,29 @@ macOS-26-x64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-macOS-27-arm64.tar.gz macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg -Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.deb -Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.tar.gz +Ubuntu-22.04-arm32v7/libiio_@VERSION@-1_armhf.deb -Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.deb -Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.tar.gz +Ubuntu-22.04-arm64v8/libiio_@VERSION@-1_arm64.deb -Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.deb -Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.tar.gz +Ubuntu-22.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb -Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.deb -Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.tar.gz +Ubuntu-22.04-s390x/libiio_@VERSION@-1_s390x.deb -Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.deb -Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.tar.gz +Ubuntu-26.04-arm32v7/libiio_@VERSION@-1_armhf.deb -Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.deb -Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.tar.gz +Ubuntu-26.04-arm64v8/libiio_@VERSION@-1_arm64.deb -Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.deb -Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.tar.gz +Ubuntu-26.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb -Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.deb -Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.tar.gz +Ubuntu-26.04-s390x/libiio_@VERSION@-1_s390x.deb -Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.deb -Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.tar.gz +Debian-12-arm64/libiio_@VERSION@-1_arm64.deb -Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.deb -Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.tar.gz +Debian-12-armhf/libiio_@VERSION@-1_armhf.deb -Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.deb -Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.tar.gz +Debian-13-arm64/libiio_@VERSION@-1_arm64.deb -Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.deb -Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.tar.gz +Debian-13-armhf/libiio_@VERSION@-1_armhf.deb Windows-VS-2022-x64/Windows-msvc-deps.zip Windows-VS-2022-x64/iio/iio.h From 4f8b13510d4df862df15bd57218ea79759c8716d Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Thu, 29 Oct 2026 11:35:18 +0200 Subject: [PATCH 3/7] ci: Update Debian copyright and build workflow licenses Correct the Debian copyright file to use LGPL-2.1+. Add MIT license headers to the ARM and Linux build workflows. Signed-off-by: Alin Opris --- .github/workflows/_arm-builds.yml | 4 ++++ .github/workflows/_linux-builds.yml | 4 ++++ packaging/debian/copyright | 7 +++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_arm-builds.yml b/.github/workflows/_arm-builds.yml index 8d3b796e1..6f1362c76 100644 --- a/.github/workflows/_arm-builds.yml +++ b/.github/workflows/_arm-builds.yml @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Analog Devices, Inc. +# +# SPDX-License-Identifier: MIT + name: ARM Builds on: diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 76c65c4fe..3004f87c1 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Analog Devices, Inc. +# +# SPDX-License-Identifier: MIT + name: Linux Builds on: diff --git a/packaging/debian/copyright b/packaging/debian/copyright index 6b0411745..71c5e5e11 100644 --- a/packaging/debian/copyright +++ b/packaging/debian/copyright @@ -1,7 +1,6 @@ -Copyright: , Analog Devices, Inc. -License: LGPL-2.1 - -License: LGPL-2.1 +Files: * +Copyright: 2014-2026 Analog Devices, Inc. +License: LGPL-2.1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. From 64953b969cc05b68c456c9cda2aeeca8ee0c2118 Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Thu, 19 Nov 2026 08:56:37 +0200 Subject: [PATCH 4/7] ci: Add distro-version input for debian package naming The new version of the deb-builder shared action requires distro-version as an input to generate the Debian package name correctly. Also update the maintainer name from EngineeringZone to Analog Devices Maintainers Signed-off-by: Alin Opris --- .github/workflows/_arm-builds.yml | 16 ++++++++++++++++ .github/workflows/_linux-builds.yml | 8 +++++++- packaging/debian/changelog | 2 +- packaging/debian/control | 2 +- packaging/debian/source/format | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_arm-builds.yml b/.github/workflows/_arm-builds.yml index 6f1362c76..944740f5e 100644 --- a/.github/workflows/_arm-builds.yml +++ b/.github/workflows/_arm-builds.yml @@ -24,33 +24,41 @@ jobs: - image: ubuntu:22.04 platform-flag: '' artifact-name: Ubuntu-22.04-arm64v8 + distro-version: +Ubuntu22 - image: arm32v7/ubuntu:22.04 platform-flag: '--platform linux/arm/v7' artifact-name: Ubuntu-22.04-arm32v7 + distro-version: +Ubuntu22 # Ubuntu 26.04 - image: ubuntu:26.04 platform-flag: '' artifact-name: Ubuntu-26.04-arm64v8 + distro-version: +Ubuntu26 - image: arm32v7/ubuntu:26.04 platform-flag: '--platform linux/arm/v7' artifact-name: Ubuntu-26.04-arm32v7 + distro-version: +Ubuntu26 # Debian 12 (bookworm) - image: debian:bookworm platform-flag: '' artifact-name: Debian-12-arm64 + distro-version: +Debian12 - image: arm32v7/debian:bookworm platform-flag: '--platform linux/arm/v7' artifact-name: Debian-12-armhf + distro-version: +Debian12 # Debian 13 (trixie) - image: debian:trixie platform-flag: '' artifact-name: Debian-13-arm64 + distro-version: +Debian13 - image: arm32v7/debian:trixie platform-flag: '--platform linux/arm/v7' artifact-name: Debian-13-armhf + distro-version: +Debian13 steps: - uses: actions/checkout@v7 with: @@ -59,6 +67,7 @@ jobs: - uses: actions/checkout@v7 with: repository: analogdevicesinc/shared-actions + ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89 path: shared-actions fetch-depth: 1 @@ -78,6 +87,7 @@ jobs: -e DEBIAN_FRONTEND=noninteractive \ -e GITHUB_WORKSPACE="${{ github.workspace }}" \ -e VERSION="${{ steps.version.outputs.version }}" \ + -e VERSION_SUFFIX="${{ matrix.distro-version }}" \ -e WORKING_DIRECTORY="${{ github.workspace }}" \ -e IGNORE_PATH="shared-actions" \ "${{ matrix.image }}" sleep infinity @@ -101,15 +111,19 @@ jobs: - image: ubuntu:22.04 arch: ppc64le artifact-name: Ubuntu-22.04-ppc64le + distro-version: +Ubuntu22 - image: ubuntu:22.04 arch: s390x artifact-name: Ubuntu-22.04-s390x + distro-version: +Ubuntu22 - image: ubuntu:26.04 arch: ppc64le artifact-name: Ubuntu-26.04-ppc64le + distro-version: +Ubuntu26 - image: ubuntu:26.04 arch: s390x artifact-name: Ubuntu-26.04-s390x + distro-version: +Ubuntu26 steps: - uses: actions/checkout@v7 with: @@ -118,6 +132,7 @@ jobs: - uses: actions/checkout@v7 with: repository: analogdevicesinc/shared-actions + ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89 path: shared-actions fetch-depth: 1 @@ -140,6 +155,7 @@ jobs: -e DEBIAN_FRONTEND=noninteractive \ -e GITHUB_WORKSPACE="${{ github.workspace }}" \ -e VERSION="${{ steps.version.outputs.version }}" \ + -e VERSION_SUFFIX="${{ matrix.distro-version }}" \ -e WORKING_DIRECTORY="${{ github.workspace }}" \ -e IGNORE_PATH="shared-actions" \ "${{ matrix.image }}" sleep infinity diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 3004f87c1..17b0cd6e1 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -23,12 +23,15 @@ jobs: - image: ubuntu:22.04 artifact-name: Linux-Ubuntu-22.04 deb: true + distro-version: +Ubuntu22 - image: ubuntu:24.04 artifact-name: Linux-Ubuntu-24.04 deb: true + distro-version: +Ubuntu24 - image: ubuntu:26.04 artifact-name: Linux-Ubuntu-26.04 deb: true + distro-version: +Ubuntu26 - image: fedora:42 artifact-name: Linux-Fedora-42 - image: fedora:44 @@ -36,9 +39,11 @@ jobs: - image: debian:bookworm artifact-name: Linux-Debian-12 deb: true + distro-version: +Debian12 - image: debian:trixie artifact-name: Linux-Debian-13 deb: true + distro-version: +Debian13 - image: opensuse/leap:15.6 artifact-name: Linux-openSUSE-15.6 - image: opensuse/leap:16.0 @@ -105,11 +110,12 @@ jobs: version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) echo "version=${version}" >> "${GITHUB_OUTPUT}" - - uses: analogdevicesinc/shared-actions/deb-generator-action@main + - uses: analogdevicesinc/shared-actions/deb-generator-action@242aa00e8eed98e2bd0ee663a9a0597ebec69d89 if: matrix.deb id: deb with: version: ${{ steps.version.outputs.version }} + version-suffix: ${{ matrix.distro-version }} - name: Build with Examples if: matrix.artifact-name == 'Linux-Ubuntu-24.04' diff --git a/packaging/debian/changelog b/packaging/debian/changelog index a849c7e9e..3e81cffb5 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -2,4 +2,4 @@ libiio (@VERSION@) UNRELEASED; urgency=low * CI release. - -- EngineerZone @DATE@ \ No newline at end of file + -- Analog Devices Maintainers @DATE@ diff --git a/packaging/debian/control b/packaging/debian/control index 6220ddb95..c0174dcae 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -1,7 +1,7 @@ Source: libiio Section: libs Priority: optional -Maintainer: Engineerzone +Maintainer: Analog Devices Maintainers Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, libcdk5-dev, libaio-dev, libusb-1.0-0-dev, libzstd-dev, libserialport-dev, libavahi-client-dev diff --git a/packaging/debian/source/format b/packaging/debian/source/format index 46ebe0266..163aaf8d8 100644 --- a/packaging/debian/source/format +++ b/packaging/debian/source/format @@ -1 +1 @@ -3.0 (quilt) \ No newline at end of file +3.0 (quilt) From ccbb86f1e46bd078a259d23b1540a4929b3a656e Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Fri, 20 Nov 2026 13:53:05 +0200 Subject: [PATCH 5/7] ci: Version Provides, ignore /build dir Versioned Provides so reverse-deps with versioned constraints on libiio/-dev/-utils/iiod resolve. Exclude the CMake build/ dir so it stays out of the orig tarball. Signed-off-by: Alin Opris --- .github/workflows/_linux-builds.yml | 2 ++ packaging/debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 17b0cd6e1..373ac1e12 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -116,6 +116,8 @@ jobs: with: version: ${{ steps.version.outputs.version }} version-suffix: ${{ matrix.distro-version }} + ignore-path: | + build - name: Build with Examples if: matrix.artifact-name == 'Linux-Ubuntu-24.04' diff --git a/packaging/debian/control b/packaging/debian/control index c0174dcae..f7d721a20 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -11,7 +11,7 @@ Homepage: https://github.com/analogdevicesinc/libiio Package: libiio Architecture: @ARCHITECTURE@ Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libiio0, libiio-dev, libiio-utils, iiod +Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) Conflicts: libiio0, libiio-dev, libiio-utils, iiod Replaces: libiio0, libiio-dev, libiio-utils, iiod Description: Library for interfacing with IIO devices From cbd7d537885b5eeab20ce516d54400d12c1c76bf Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Thu, 26 Nov 2026 11:11:13 +0200 Subject: [PATCH 6/7] ci: Adapt debian folder Adapt rules and control files for generating c, c# and python bindings as separated deb pacakges. Signed-off-by: Alin Opris --- packaging/debian/control | 40 ++++++++++++++++-- packaging/debian/libiio-cpp.install | 1 + packaging/debian/libiio-csharp.install | 2 + packaging/debian/libiio.install | 6 +++ packaging/debian/python3-libiio.install | 1 + packaging/debian/rules | 55 ++++++++++++++++++++++++- 6 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 packaging/debian/libiio-cpp.install create mode 100644 packaging/debian/libiio-csharp.install create mode 100644 packaging/debian/libiio.install create mode 100644 packaging/debian/python3-libiio.install diff --git a/packaging/debian/control b/packaging/debian/control index f7d721a20..afce885c4 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -3,17 +3,51 @@ Section: libs Priority: optional Maintainer: Analog Devices Maintainers Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, - libcdk5-dev, libaio-dev, libusb-1.0-0-dev, libzstd-dev, - libserialport-dev, libavahi-client-dev + libcdk5-dev, libaio-dev, libusb-1.0-0-dev, + libserialport-dev, libavahi-client-dev, + python3-all, python3-setuptools, dh-python, mono-mcs, cli-common-dev Standards-Version: 4.6.0 Homepage: https://github.com/analogdevicesinc/libiio +Rules-Requires-Root: no Package: libiio Architecture: @ARCHITECTURE@ Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) +Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), + libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) Conflicts: libiio0, libiio-dev, libiio-utils, iiod Replaces: libiio0, libiio-dev, libiio-utils, iiod Description: Library for interfacing with IIO devices libiio is used to interface to the Linux Industrial Input/Output (IIO) Subsystem. Includes library, development files, utilities, and daemon. + +Package: python3-libiio +Section: python +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, libiio0 +Description: Python 3 bindings for libiio + ctypes-based Python bindings for the libiio library for interfacing + with Linux IIO devices. + . + This package contains the Python 3 bindings. + +Package: libiio-cpp +Section: libdevel +Architecture: all +Depends: libiio-dev, ${misc:Depends} +Description: C++ bindings for libiio (development header) + Header-only C++ wrapper (iiopp.h) around the libiio C API for + interfacing with Linux IIO devices. + . + This package contains the C++ binding header. + +Package: libiio-csharp +Section: cli-mono +Architecture: all +Depends: ${cli:Depends}, ${misc:Depends}, libiio0 +Description: C# bindings for libiio + CLI (Mono/.NET) bindings for the libiio library for interfacing with + Linux IIO devices. + . + This package contains the libiio-sharp assembly, loaded against the + native library at runtime via the bundled dllmap config. diff --git a/packaging/debian/libiio-cpp.install b/packaging/debian/libiio-cpp.install new file mode 100644 index 000000000..a118ffae4 --- /dev/null +++ b/packaging/debian/libiio-cpp.install @@ -0,0 +1 @@ +usr/include/iiopp.h diff --git a/packaging/debian/libiio-csharp.install b/packaging/debian/libiio-csharp.install new file mode 100644 index 000000000..68a4963fb --- /dev/null +++ b/packaging/debian/libiio-csharp.install @@ -0,0 +1,2 @@ +usr/lib/cli +usr/lib/pkconfig/libiio-csharp-*.pc diff --git a/packaging/debian/libiio.install b/packaging/debian/libiio.install new file mode 100644 index 000000000..b884ad25e --- /dev/null +++ b/packaging/debian/libiio.install @@ -0,0 +1,6 @@ +usr/bin +usr/sbin +usr/include/iio.h +usr/lib/*/libiio.so* +usr/lib/*/pkgconfig/libiio.pc +usr/lib/udev diff --git a/packaging/debian/python3-libiio.install b/packaging/debian/python3-libiio.install new file mode 100644 index 000000000..eb5441e5f --- /dev/null +++ b/packaging/debian/python3-libiio.install @@ -0,0 +1 @@ +usr/lib/python3*/dist-packages diff --git a/packaging/debian/rules b/packaging/debian/rules index f486b3ff8..7fa335ee2 100644 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem=cmake + dh $@ --buildsystem=cmake --with python3, cli override_dh_auto_configure: dh_auto_configure -- \ @@ -8,3 +8,56 @@ override_dh_auto_configure: -DWITH_SERIAL_BACKEND=ON \ -DWITH_EMU_BACKEND=ON \ -DWITH_MAN=ON +ource: libiio +Section: libs +Priority: optional +Maintainer: Analog Devices Maintainers +Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, libzstd-dev + libcdk5-dev, libaio-dev, libusb-1.0-0-dev, + libserialport-dev, libavahi-client-dev, + python3-all, python3-setuptools, dh-python, mono-mcs, cli-common-dev +Standards-Version: 4.6.0 +Homepage: https://github.com/analogdevicesinc/libiio +Rules-Requires-Root: no + +Package: libiio +Architecture: @ARCHITECTURE@ +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), + libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) +Conflicts: libiio0, libiio-dev, libiio-utils, iiod +Replaces: libiio0, libiio-dev, libiio-utils, iiod +Description: Library for interfacing with IIO devices + libiio is used to interface to the Linux Industrial Input/Output (IIO) + Subsystem. Includes library, development files, utilities, and daemon. + +Package: python3-libiio +Section: python +Architecture: any +Depends: ${python3:Depends}, ${misc:Depends}, libiio0 +Description: Python 3 bindings for libiio + ctypes-based Python bindings for the libiio library for interfacing + with Linux IIO devices. + . + This package contains the Python 3 bindings. + +Package: libiio-cpp +Section: libdevel +Architecture: any +Depends: libiio-dev, ${misc:Depends} +Description: C++ bindings for libiio (development header) + Header-only C++ wrapper (iiopp.h) around the libiio C API for + interfacing with Linux IIO devices. + . + This package contains the C++ binding header. + +Package: libiio-csharp +Section: cli-mono +Architecture: any +Depends: ${cli:Depends}, ${misc:Depends}, libiio0 +Description: C# bindings for libiio + CLI (Mono/.NET) bindings for the libiio library for interfacing with + Linux IIO devices. + . + This package contains the libiio-sharp assembly, loaded against the + native library at runtime via the bundled dllmap config. From 5f946b5aec911a86622b891c734d56574bd54e60 Mon Sep 17 00:00:00 2001 From: Alin Opris Date: Thu, 26 Nov 2026 11:38:45 +0200 Subject: [PATCH 7/7] ci: Fix rpath and binding dependencies Signed-off-by: Alin Opris --- .github/workflows/_linux-builds.yml | 2 + packaging/debian/clean | 6 +++ packaging/debian/control | 12 ++--- packaging/debian/libiio-cpp.install | 2 +- packaging/debian/libiio-csharp.install | 2 +- packaging/debian/libiio.install | 3 +- packaging/debian/rules | 66 +++++--------------------- 7 files changed, 31 insertions(+), 62 deletions(-) create mode 100644 packaging/debian/clean diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 373ac1e12..3e5438c06 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -50,6 +50,8 @@ jobs: artifact-name: Linux-openSUSE-16.0 container: image: ${{ matrix.image }} + env: + DEBIAN_FRONTEND: noninteractive steps: - name: Install dependencies run: | diff --git a/packaging/debian/clean b/packaging/debian/clean new file mode 100644 index 000000000..011210c3a --- /dev/null +++ b/packaging/debian/clean @@ -0,0 +1,6 @@ +bindings/csharp/AssemblyInfo.cs +bindings/csharp/libiio-sharp.dll +bindings/csharp/libiio-sharp.dll.config +bindings/csharp/libiio-sharp-*.pc +bindings/python/pylibiio.egg-info/ +.pybuild/ diff --git a/packaging/debian/control b/packaging/debian/control index afce885c4..4fbd7322a 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -3,9 +3,9 @@ Section: libs Priority: optional Maintainer: Analog Devices Maintainers Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, - libcdk5-dev, libaio-dev, libusb-1.0-0-dev, + libcdk5-dev, libaio-dev, libusb-1.0-0-dev, libzstd-dev, libserialport-dev, libavahi-client-dev, - python3-all, python3-setuptools, dh-python, mono-mcs, cli-common-dev + dh-python, mono-mcs, cli-common-dev Standards-Version: 4.6.0 Homepage: https://github.com/analogdevicesinc/libiio Rules-Requires-Root: no @@ -24,7 +24,7 @@ Description: Library for interfacing with IIO devices Package: python3-libiio Section: python Architecture: all -Depends: ${python3:Depends}, ${misc:Depends}, libiio0 +Depends: ${python3:Depends}, ${misc:Depends}, libiio (>= ${source:Version}) Description: Python 3 bindings for libiio ctypes-based Python bindings for the libiio library for interfacing with Linux IIO devices. @@ -34,9 +34,9 @@ Description: Python 3 bindings for libiio Package: libiio-cpp Section: libdevel Architecture: all -Depends: libiio-dev, ${misc:Depends} +Depends: libiio (>= ${source:Version}), ${misc:Depends} Description: C++ bindings for libiio (development header) - Header-only C++ wrapper (iiopp.h) around the libiio C API for + Header-only C++ wrapper (iio.hpp) around the libiio C API for interfacing with Linux IIO devices. . This package contains the C++ binding header. @@ -44,7 +44,7 @@ Description: C++ bindings for libiio (development header) Package: libiio-csharp Section: cli-mono Architecture: all -Depends: ${cli:Depends}, ${misc:Depends}, libiio0 +Depends: ${cli:Depends}, ${misc:Depends}, libiio (>= ${source:Version}) Description: C# bindings for libiio CLI (Mono/.NET) bindings for the libiio library for interfacing with Linux IIO devices. diff --git a/packaging/debian/libiio-cpp.install b/packaging/debian/libiio-cpp.install index a118ffae4..49d03f13e 100644 --- a/packaging/debian/libiio-cpp.install +++ b/packaging/debian/libiio-cpp.install @@ -1 +1 @@ -usr/include/iiopp.h +usr/include/iio/iio.hpp diff --git a/packaging/debian/libiio-csharp.install b/packaging/debian/libiio-csharp.install index 68a4963fb..0ad07ee98 100644 --- a/packaging/debian/libiio-csharp.install +++ b/packaging/debian/libiio-csharp.install @@ -1,2 +1,2 @@ usr/lib/cli -usr/lib/pkconfig/libiio-csharp-*.pc +usr/lib/pkgconfig/libiio-sharp-*.pc diff --git a/packaging/debian/libiio.install b/packaging/debian/libiio.install index b884ad25e..c862f8e7a 100644 --- a/packaging/debian/libiio.install +++ b/packaging/debian/libiio.install @@ -1,6 +1,7 @@ usr/bin usr/sbin -usr/include/iio.h +usr/include/iio/iio*.h usr/lib/*/libiio.so* usr/lib/*/pkgconfig/libiio.pc usr/lib/udev +usr/share/man diff --git a/packaging/debian/rules b/packaging/debian/rules index 7fa335ee2..805fc5439 100644 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -1,63 +1,23 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem=cmake --with python3, cli + dh $@ --buildsystem=cmake --with python3,cli override_dh_auto_configure: dh_auto_configure -- \ -DCPP_BINDINGS=ON \ + -DCSHARP_BINDINGS=ON \ -DWITH_SERIAL_BACKEND=ON \ -DWITH_EMU_BACKEND=ON \ - -DWITH_MAN=ON -ource: libiio -Section: libs -Priority: optional -Maintainer: Analog Devices Maintainers -Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, libzstd-dev - libcdk5-dev, libaio-dev, libusb-1.0-0-dev, - libserialport-dev, libavahi-client-dev, - python3-all, python3-setuptools, dh-python, mono-mcs, cli-common-dev -Standards-Version: 4.6.0 -Homepage: https://github.com/analogdevicesinc/libiio -Rules-Requires-Root: no + -DWITH_MAN=ON \ + -DUDEV_RULES_INSTALL_DIR=/usr/lib/udev/rules.d \ + -DCMAKE_SKIP_RPATH=ON -Package: libiio -Architecture: @ARCHITECTURE@ -Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), - libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) -Conflicts: libiio0, libiio-dev, libiio-utils, iiod -Replaces: libiio0, libiio-dev, libiio-utils, iiod -Description: Library for interfacing with IIO devices - libiio is used to interface to the Linux Industrial Input/Output (IIO) - Subsystem. Includes library, development files, utilities, and daemon. +override_dh_auto_install: + dh_auto_install + # pyproject.toml needs setuptools>=77, newer than most target distros; the binding is one pure-ctypes module + install -D -m0644 bindings/python/iio/__init__.py \ + debian/tmp/usr/lib/python3/dist-packages/iio/__init__.py -Package: python3-libiio -Section: python -Architecture: any -Depends: ${python3:Depends}, ${misc:Depends}, libiio0 -Description: Python 3 bindings for libiio - ctypes-based Python bindings for the libiio library for interfacing - with Linux IIO devices. - . - This package contains the Python 3 bindings. - -Package: libiio-cpp -Section: libdevel -Architecture: any -Depends: libiio-dev, ${misc:Depends} -Description: C++ bindings for libiio (development header) - Header-only C++ wrapper (iiopp.h) around the libiio C API for - interfacing with Linux IIO devices. - . - This package contains the C++ binding header. - -Package: libiio-csharp -Section: cli-mono -Architecture: any -Depends: ${cli:Depends}, ${misc:Depends}, libiio0 -Description: C# bindings for libiio - CLI (Mono/.NET) bindings for the libiio library for interfacing with - Linux IIO devices. - . - This package contains the libiio-sharp assembly, loaded against the - native library at runtime via the bundled dllmap config. +# libiio is resolved at runtime through libiio-sharp.dll.config, not via shlibs +override_dh_clideps: + dh_clideps --exclude-moduleref=libiio