Skip to content

Use deb-generator-action for generating debian packages - #1610

Draft
opa1mm wants to merge 7 commits into
mainfrom
staging/use-shared-action-for-building-deb-pkgs
Draft

opa1mm wants to merge 7 commits into
mainfrom
staging/use-shared-action-for-building-deb-pkgs

Conversation

@opa1mm

@opa1mm opa1mm commented Oct 27, 2026

Copy link
Copy Markdown

Summary

Switches the Linux and ARM CI builds from building .deb packages via make package (CPack) to the shared deb-generator-action (https://github.com/analogdevicesinc/shared-actions/tree/main/deb-generator-action). This gives us proper Debian packaging driven by standard debhelper files instead of CMake/CPack-generated packages.

Changes

Add packaging/debian/ with standard debhelper files:

  • control — source/binary package metadata, build-deps, and the Provides/Conflicts/Replaces for the legacy libiio0/-dev/-utils/iiod packages.
  • rules — builds with CMake (dh --buildsystem=cmake) and enables the C++ bindings, serial & emu backends, and man pages.
  • changelog, copyright (LGPL-2.1), and source/format (3.0 (quilt)).

Configure the workflows to use the action:

  • _linux-builds.yml and _arm-builds.yml: mark Debian/Ubuntu targets with deb: true. For those targets, skip make package/required2tar, extract the version from CMakeLists.txt, run deb-generator-action, and upload the action's output dir. Non-deb targets (Fedora, openSUSE, …) keep the existing RPM/tarball path.
  • artifact_manifest.txt.cmakein: update the deb entries to the action's naming scheme (libiio_@VERSION@-1_amd64.deb, _arm64, _armhf, _ppc64el, _s390x) and drop the now-unused per-distro .tar.gz deb-companion entries.

@opa1mm
opa1mm marked this pull request as ready for review November 2, 2026 06:59

@NicuS03 NicuS03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new deb names no longer include the distro. The release script moves every build's files into one folder, so same-named debs overwrite each other: 17 builds end up as about 5 debs. We need to find a better strategy here (i think we will use '~' in version to specify different versions

Also please use fixed SHA instead of tags for actions

Comment thread packaging/debian/source/format Resolved
Comment thread packaging/debian/changelog Resolved

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't exactly know what this is used for, but I saw that the .tar.gz was also here (the sources), shouldn't also the .orig.tar.gz and .dsc be here ?

-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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is strange here. In the logs, the linter have a lot of errors: https://github.com/analogdevicesinc/libiio/actions/runs/41023411654/job/123955851613?pr=1610#step:7:1763. Can you take a look at those to see why ? I am more concerned about custom-library-search-path RUNPATH but the other error should also be investigated. (Please check the other runs)

Comment thread packaging/debian/control Resolved
Comment thread .github/workflows/_linux-builds.yml Resolved
@opa1mm
opa1mm marked this pull request as draft November 16, 2026 13:01
@opa1mm
opa1mm force-pushed the staging/use-shared-action-for-building-deb-pkgs branch 2 times, most recently from 95aa0d1 to ee0b344 Compare November 19, 2026 13:20
@opa1mm
opa1mm marked this pull request as ready for review November 19, 2026 13:23
@opa1mm
opa1mm marked this pull request as draft November 19, 2026 13:23
@opa1mm
opa1mm force-pushed the staging/use-shared-action-for-building-deb-pkgs branch 3 times, most recently from 5dd8a2f to 3c3f7aa Compare November 26, 2026 12:47
Signed-off-by: Alin Opris <alin.opris@analog.com>
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 <alin.opris@analog.com>
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 <alin.opris@analog.com>
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 <alin.opris@analog.com>
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 <alin.opris@analog.com>
Adapt rules and control files for generating c, c# and python bindings as separated
deb pacakges.

Signed-off-by: Alin Opris <alin.opris@analog.com>
Signed-off-by: Alin Opris <alin.opris@analog.com>
@opa1mm
opa1mm force-pushed the staging/use-shared-action-for-building-deb-pkgs branch from 3c3f7aa to 5f946b5 Compare November 26, 2026 12:58
@opa1mm
opa1mm requested review from Lewluu and NicuS03 November 26, 2026 13:06
fetch-depth: 1

- name: Build
- uses: actions/checkout@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget about fixed ref sha


- name: Upload artifacts
if: matrix.deb
uses: actions/upload-artifact@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same. fixed ref sha

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants