#1142611 arduino-cli: Load system provided builtin tools

Package:
arduino-cli
Source:
arduino-cli
Description:
Arduino command line tool (program)
Submitter:
Nicolas Peugnet
Date:
2026-08-12 01:09:01 UTC
Severity:
normal
#1142611#5
Date:
2026-07-22 18:56:07 UTC
From:
To:
Arduino CLI needs some additional binary tools to be installed to work
properly. Currently, these tools are installed automatically from an
Arduino-managed repository. This is not ideal from Debian's point of vue
as we prefer to provide all the binaries ourselves. Also, these tools
were not compiled for all the architectures that Debian supports, which
makes arduino-cli unusable on some architectures.

I made an initial patch that does this, by loading the tools directly
from /usr/libexec/arduino. [1] We now need to package the 5 needed tools,
so I created this bug to track this.

Here are the list of needed tools (the versions are not important, but I
kept them to demonstrate the required layout):

/usr/local/libexec/arduino/
└── builtin
    └── tools
        ├── ctags
        │   └── 5.8-arduino11
        │       └── ctags
        ├── dfu-discovery
        │   └── 0.1.2
        │       ├── dfu-discovery
        │       └── LICENSE.txt
        ├── mdns-discovery
        │   └── 1.0.9
        │       ├── LICENSE.txt
        │       └── mdns-discovery
        ├── serial-discovery
        │   └── 1.4.0
        │       ├── LICENSE.txt
        │       └── serial-discovery
        └── serial-monitor
            └── 0.13.0
                ├── LICENSE.txt
                └── serial-monitor

I started with mdns-discovery, for which I created the package
"arduino-mdns-discovery". I pushed this work in the go-team [2], but
we might want to move them to the debian-electronics team.

Most of them are written in Go, but some (at least ctags) are in C.

[1]: https://salsa.debian.org/electronics-team/arduino/arduino-cli/-/commits/n-peugnet/system-builtin-tools
[2]: https://salsa.debian.org/go-team/packages/arduino-mdns-discovery

See also: https://github.com/arduino/arduino-cli/issues/3106

#1142611#10
Date:
2026-07-24 00:08:44 UTC
From:
To:
Hi Nicolas,

I think it makes sense to create ITPs under the go-team.

Let me know if you need sponsorship...

Cheers!

Chris

#1142611#15
Date:
2026-07-24 00:08:44 UTC
From:
To:
Hi Nicolas,

I think it makes sense to create ITPs under the go-team.

Let me know if you need sponsorship...

Cheers!

Chris

#1142611#30
Date:
2026-07-26 14:32:23 UTC
From:
To:
Hi Christopher,
I mostly finished packaging them, here is the log of arduino-cli in
verbose mode with my patch and all builtin tools installed from Debian
packages:

INFO[0000] Loading tools from dir: /usr/libexec/arduino/builtin/tools
INFO[0000] Loaded tool
tool="builtin:ctags@5.8-arduino11-3"
INFO[0000] Loaded tool
tool="builtin:dfu-discovery@0.1.2-1"
INFO[0000] Loaded tool
tool="builtin:mdns-discovery@1.1.0-1"
INFO[0000] Loaded tool
tool="builtin:serial-discovery@1.5.2-1"
INFO[0000] Loaded tool
tool="builtin:serial-monitor@0.15.0-1"

I will properly finish the packaging of these tools and will ask you
soon for sponsorship :)

By the way, if you can take a look at Bug#1142801 that I created, it
would be helpful (see the second patch, the first one is invalid).

Have a nice day!

#1142611#35
Date:
2026-07-26 17:55:47 UTC
From:
To:
Hi Christopher,

Here are the first three packages that are ready for review and upload:
- https://salsa.debian.org/go-team/packages/golang-github-s-urbaniak-uevent
- https://salsa.debian.org/go-team/packages/arduino-mdns-discovery
- https://salsa.debian.org/go-team/packages/arduino-serial-monitor

The two other are not ready yet.
- https://salsa.debian.org/go-team/packages/arduino-dfu-discovery
- https://salsa.debian.org/go-team/packages/arduino-serial-discovery

The first one downloads some source files from dfu-util during build,
but as it is not a library I had to include them in the package. I
currently created a [patch] for this but I'm not a big fan of this
solution, so I created an [issue] upstream. I'm curious of your opinion.

[patch]:
https://salsa.debian.org/go-team/packages/arduino-dfu-discovery/-/blob/481a17080a7b3f597b80283d132dbf237e0a0006/debian/patches/0001-Add-missing-c-source-and-header-files-from-dfu-utils.patch
[issue]: https://github.com/arduino/dfu-discovery/issues/40

The second one depends on golang-github-s-urbaniak-uevent and updated
golang-github-bugst-go-serial (for which I asked Simon for a sponsor
upload).

#1142611#40
Date:
2026-07-28 18:56:19 UTC
From:
To:
Hi Nicolas,

I looked at all of these; they seem fine but you may want to squash
your packaging commits and upload the source packages to
mentors.debian.net. I can then upload them sponsoring you correctly.
Let me know when you've fixed the packaging repo && uploaded to
mentors and I will sponsor the uploads.
uploading to mentors still apply.
I think this is fine; you may want to propose a bug report and
follow-up patch to the dfu-util package to ship headers/source; or if
possible just comment all of that tut out of arduino-dfu-discovery?
What you have is essentially vendoring dfu-util into the go package
which is.... quite a bit meh.
uploading to mentors still apply.
I am happy to upload those if you want.

Cheers!

Chris

#1142611#45
Date:
2026-07-29 15:44:56 UTC
From:
To:
Hi,

28 juil. 2026 20:56:34 Christopher Obbard <obbardc@gmail.com>:

I would prefer not to squash them if it is ok with you.
I'm currently AFK but I can push them to mentors.d.n tomorrow.

About getting the sources from the dfu-util package, I'm not sure that
this is a good solution. The current version is compatible, but as it is
not a library, there is no guarantee of compatibility whatsoever for the
internal code.
This looks more like a fork of dfu-util than a library usage, which is
why the ideal solution IMO would be that upstream copies the files they
need from dfu-util in their repo.

I agree 😓

Simon uploaded bugst/go-serial so I will upload it to mentors at the same
time as the first three.

#1142611#50
Date:
2026-08-10 10:30:19 UTC
From:
To:
Hi,


All of the builtin tools needed for arduino-cli are now packaged in
Debian so I pushed [0b538d3] to the debian/latest branch.

[0b538d3]:
https://salsa.debian.org/electronics-team/arduino/arduino-cli/-/commit/0b538d3b75fe74f3797bd2c7b90fb7aac45e9dc5

We now have the following tree:

/usr/libexec/arduino/builtin/tools/
├── ctags
│   └── 5.8-arduino11-5
│       └── ctags -> ../../../../../../bin/arduino-ctags
├── dfu-discovery
│   └── 0.1.2+ds1-1
│       └── dfu-discovery
├── mdns-discovery
│   └── 1.1.0+ds1-1+b1
│       └── mdns-discovery
├── serial-discovery
│   └── 1.5.2+ds1-1
│       └── serial-discovery
└── serial-monitor
     └── 0.15.0+ds1-1
         └── serial-monitor

And the tools are correctly loaded:

$ arduino-cli core list --log
INFO[0000] arduino-cli version 1.5.1
INFO[0000] Using config file: /home/nicolas/.arduino15/arduino-cli.yaml
INFO[0000] Checking signature
index=/home/nicolas/.arduino15/package_index.json
signatureFile=/home/nicolas/.arduino15/package_index.json.sig trusted=true
INFO[0000] Loading hardware from: /home/nicolas/.arduino15/packages
INFO[0000] Loading tools from dir: /usr/libexec/arduino/builtin/tools
INFO[0000] Loaded tool tool="builtin:ctags@5.8-arduino11-5"
INFO[0000] Loaded tool tool="builtin:dfu-discovery@0.1.2+ds1-1"
INFO[0000] Loaded tool tool="builtin:mdns-discovery@1.1.0+ds1-1+b1"
INFO[0000] Loaded tool tool="builtin:serial-discovery@1.5.2+ds1-1"
INFO[0000] Loaded tool tool="builtin:serial-monitor@0.15.0+ds1-1"
INFO[0000] Loading libraries index file
index=/home/nicolas/.arduino15/library_index.json
INFO[0000] Adding libraries dir dir=/home/nicolas/Arduino/libraries
isSingleLibrary=false location=user
INFO[0000] Executing `arduino-cli core list`
No platforms installed.


So now I created [MR3] to support more archs and build arduino-cli only
for the supported ones.

[MR3}:
https://salsa.debian.org/electronics-team/arduino/arduino-cli/-/merge_requests/3

#1142611#55
Date:
2026-08-12 01:06:14 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
arduino-cli, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1142611@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Nicolas Peugnet <nicolas@club1.fr> (supplier of updated arduino-cli package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 12 Aug 2026 02:35:39 +0200
Source: arduino-cli
Architecture: source
Version: 1.5.1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Electronics Team <pkg-electronics-devel@alioth-lists.debian.net>
Changed-By: Nicolas Peugnet <nicolas@club1.fr>
Closes: 1142611
Changes:
 arduino-cli (1.5.1-3) unstable; urgency=medium
 .
   * Load builtin tools from Debian packages (Closes: #1142611)
   * Support all of Debian's release architectures
Checksums-Sha1:
 d440aee235af90f6f653e293ab0e828585b4c9c8 3859 arduino-cli_1.5.1-3.dsc
 e847b08bb71cd5fa7f20e464e83ecfca54d20a2e 10796 arduino-cli_1.5.1-3.debian.tar.xz
 5ae2b1685648742dcc19589ac4599be8a258e4cb 18449 arduino-cli_1.5.1-3_amd64.buildinfo
Checksums-Sha256:
 808709ef9e981a930ccf3c74fb682d95e1bbdbf25b40b12707d66222c29833ef 3859 arduino-cli_1.5.1-3.dsc
 6d5edda1e346826074347a96a1a160abddd8cbd11821eee111361d152b3e5b2d 10796 arduino-cli_1.5.1-3.debian.tar.xz
 2ce58571238079953fd005db36dd0f8bd394c2590b2dd531087aa945b9afb94b 18449 arduino-cli_1.5.1-3_amd64.buildinfo
Files:
 7f41e14ce09de73c2ef819c66b60ad7b 3859 golang optional arduino-cli_1.5.1-3.dsc
 765a234b855a8e06ada62fcd8928036e 10796 golang optional arduino-cli_1.5.1-3.debian.tar.xz
 a78c3764c1456c3780ced45e8f06e0a6 18449 golang optional arduino-cli_1.5.1-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8nKZBfGZIAiZdgVFolSLQbw9IRQFAmp7wbkRHG5pY29sYXNA
Y2x1YjEuZnIACgkQolSLQbw9IRSy3A/8DuQvWVTioymUZvrp6SPtP1/zreXjW9mQ
qGaQkt4IQB91Xv/gGGRfiIRt27GFj/afXDNdp/RAIQ+scBxP9wxoOK4tF1SZGxUD
YHFH08wS6tBDMbUdVCxmKquphrlG0AfU9n2xekwLG+eNmTkIRyvuM/w6lT4zCUbe
KXdv0juc2MytO1BLDnJ7ofmqKuSVlMMBzj71LARd0nS/Dvnw97ucvRGhQ0ddwSCz
wT0Cr/8KQyfCyR0C3/s6U4jtvYJcYmXAdgguaxZp13U1wx2tGcylAj2HBRE9+Nqj
CaEAoi7O2lCDzeeDVWzgUJ2StcQ+vwRXXVBC05R76hE45K/3Dpl57Yfz0MGiale5
xtDHzPM+AXHFu6cea2XvsFR/zy9xS606BGHjATjQRNeHbUm4Np4R6/eHd95WSLKa
AiRb24tIT6Pr2pb993+/5c68P8bnULWzW2Ybj9wHpO3D/KgoF7gzRytcStZ0nlVI
JM71LqgyjavjzLnVpDoYMlvZQuGwm/ZDtkVjN/rsiT73kwXoqLG8Lohtj2piP6iK
Bu5FCKt7FA9M1u2yi0RkJoBAyjXAVRNkkEAa/uKTeeq68G+cHj3IlmCeM5rx/ZHP
Dt6J1QpPJ970SbXGvISDm3+dTh8uqFQusaR1PoYhltiuJRBz7YOiZl/QRUR+/u+E
kXfPIIkCfp8=
=iTz3
-----END PGP SIGNATURE-----