Successful Install of piaware 11.0~dev and dump1090-fa 11.0~dev on RPi OS Trixie

I think the issue lies in some thinking this is a distro issue and not realizing it is a Python Issue. As mentioned previously minus maybe a package dependency not addressed in the README the current piaware_builder works flawlessly on Ubuntu up to Noble. When the proper “Debian equivalent” running the same Python version is chosen when installing PiAware.

@abcd567 Curious if ./sensible-build.sh trixie on Nobel works as things stand in the dev branch.

Remember cxfreeze is installed via pip not a package supplied by Debian or Ubuntu.

This being said, the issue is not a distribution issue per say, more a Python version issue brought about by breaking changes in cxfreeze. It was the direction I was going in my original pull request saving the need for the additional piaware_builder/noble folder being the Trixie and Nobel installs SHOULD be able to use the same “folders”. “Folders” are more dependent on the version of Python than the distro being used if memory serves right. This would cut back greatly on the code that needs to be maintained if the folks at PiAware consider adding Ubuntu support. The original changes would have worked great but Debian went with a newer version of Python when it hit RTM as opposed to what was available when I made my modifications. (Again thanks to retornam and caius for the changes bumping the cxfreeze version to one compatible with both) Refer to my earlier post where the following was mentioned.

noble)
debdist=trixie
targetdist=noble
extraversion=“~ubuntu2404+”
;;

Trixie “folder” is used to install on Noble when Trixie was using the same version of Python in test AKA beta when the pull request was originally made.

Noble Numbat, Oracular Oriole, Plucky Puffin are all running versions of Python campatible with the version of cxfreeze utilized by the “trixie” option. This is why I mentioned in earlier posts the possibility to consolidate cxfreeze versions across Nobel and Trixie installs.

@obj Note that if the option to use Python 3.14 over Python 3.13 is chosen in Questing Quokka it will requires cxfreeze 8.5 or newer as will all distros using Python 3.14. Debian Forky will more than likely ship with Python 3.14 I am guessing. This being said it might be an interesting update option to the dev branch to try cxfreeze 8.5.x for further future proofing. (possibly no rush to get a fix out the door for Forky when released at least as far as cxfreeze is concerned while the dev branch is still in dev)

cxfreeze 8.5.3 is stable mind you not beta and compatible with Python versions shipped with Trixie and Nobel as well as 3.14 soon to hit the next version of your favorite distro I am sure. So documentation claims.

And I thought .NET NuGet packages were a pain in the ass…

Sorry for all the edits. I make a reply then ponder it a bit after and come up with more things. :slight_smile:

 

Yes, the mlat-client is built by “python -m build” and installed by “python -m pip install

Following is the relevant portion from file package-trixie/rules

 79 build_mlat-client:
 80         # setup venv for mlat-client build
 81         $(PYTHON3) -m venv --system-site-packages --without-pip $(VENV)
 82         # build cxfreeze for later packaging of mlat-client
 83         $(VENV)/bin/python -m build --skip-dependency-check --no-isolation --wheel -C="--build-option=--plat-name" -C="--build-option=$(PYTHON_HOST_PLATFORM)" --outdir $(CURDIR)/wheels cx_Freeze-8.1.0
 84         $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/cx_freeze-8.1.0*.whl
 85         # build mlat-client proper
 86         $(VENV)/bin/python -m build --skip-dependency-check --no-isolation --wheel -C="--build-option=--plat-name" -C="--build-option=$(PYTHON_HOST_PLATFORM)" --outdir $(CURDIR)/wheels mlat-client
 87         $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/mlatclient-*.whl
 88

 

The cx_Freeze archive are fetched by wget, and not by apt or pip

(A) Function fetch_archive()

128 fetch_archive() {
129     name=$1
130     url=$2
131     hash=$3
132
133     if [ ! -f $OUTDIR/archives/$name.tar.gz ]; then
134         echo "Fetching $name .."
135         wget -nv -O $OUTDIR/archives/$name.tar.gz.unchecked --prefer-family=IPv4 --connect-timeout=30 $url
136         echo "$hash $OUTDIR/archives/$name.tar.gz.unchecked" | sha256sum -c -
137         mv $OUTDIR/archives/$name.tar.gz.unchecked $OUTDIR/archives/$name.tar.gz
138     fi
139
140     rm -fr $OUTDIR/$name/
141     tar -C $OUTDIR -zxf $OUTDIR/archives/$name.tar.gz $name/
142     if [ -f $TOP/$name.patch ]; then
143         echo "applying $name.patch .."
144         patch -d $OUTDIR/$name -p1 <$TOP/$name.patch
145     fi
146 }

 

(B) Implementation of function fetch_archive()

205     trixie)
206         fetch_archive cx_Freeze-8.1.0 \
207                       https://github.com/marcelotduarte/cx_Freeze/archive/refs/tags/8.1.0.tar.gz \
208                       45d82f7e541ae4fb05ed4250c03a84f969ba94a43bac0112a86c0b7793a12c3b
209         ;;
210
211     forky)
212         fetch_archive cx_Freeze-8.1.0 \
213                       https://github.com/marcelotduarte/cx_Freeze/archive/refs/tags/8.1.0.tar.gz \
214                       45d82f7e541ae4fb05ed4250c03a84f969ba94a43bac0112a86c0b7793a12c3b
215         ;;
216
217     noble)
218         fetch_archive cx_Freeze-7.2.0 \
219                       https://github.com/marcelotduarte/cx_Freeze/archive/refs/tags/7.2.0.tar.gz \
220                       b2846d0215fd6e18a1dccc398f71a67840d77c1fb2f5ae911d87867d4330bcfa
221    

 

@jprochazka

In my fork of piaware_builder, I decided that for each OS version (i.e. noble, trixie, forky) I will provide separate folders and dedicated entries in sensible-build.sh file . This way I could make these to custom-fit to python versions these ship. A little more work, but a neat and very comfortable arrangement.

Python versions are basically set in stone once a distro reaches RTM status.

In (B) Implementation of function fetch_archive() Did you happen to try bumping the cx_Freeze to the same for trixie, forky and noble? I am particularly interested in if setting all three to 8.5.3 will work.

IMO no need to separate them based on distro. Separate by Python version as stated. If what I am hoping is right and cxfreeze 8.5.3 works for all installs for Nobel/Trixie onwards up to Debian Forky, possibly beyond can be handled by a single “folder”

This way the FlightAware team can focus on Python versions and possibly direct other dstros to us an existing “folder” instead of redundant code for multiple distros. Easier path of least resistance directing Ubuntu to use instructions for existing Debian ones. One file to maintain.

Remember the issue is not with Ubuntu or Debian it is with Python versions.

I would try myself but I am beating my head against up in the air math at the moment for fun. That and modernizing the dated static 1980’s styled MRTG/Collectd style graphs I used in the past. FYI about to release a new portal if interested after a long time in the making!

Yes, couple of hours ago I tried on Ubuntu 24.
I have been successfully using cx_Freeze ver 7.2.0 on noble, and now tried to use version 8.1.0. The build failed.

However cx_Freeze ver 8.1.0 works OK for trixi & forky.

@obj
@jprochazka

Tried to build piaware dev on Ubuntu 24 noble as trixie.

(1) ACTION:

git clone --depth 1 -b dev https://github.com/flightaware/piaware_builder piaware-builder-dev
cd piaware-builder-dev 
./sensible-build.sh trixie 
cd package-trixie 
dpkg-buildpackage -us -uc -b --no-sign 

 

(2) RESULT

... ... ...
... ... ...
* Building wheel...
configuration error: `project.license` must be valid exactly by one definition (2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']

DESCRIPTION:
    `Project license <https://peps.python.org/pep-0621/#license>`_.

GIVEN VALUE:
    "MIT"

OFFENDING RULE: 'oneOf'

DEFINITION:
    {
        "oneOf": [
            {
                "properties": {
                    "file": {
                        "type": "string",
                        "$$description": [
                            "Relative path to the file (UTF-8) which contains the license for the",
                            "project."
                        ]
                    }
                },
                "required": [
                    "file"
                ]
            },
            {
                "properties": {
                    "text": {
                        "type": "string",
                        "$$description": [
                            "The license of the project whose meaning is that of the",
                            "`License field from the core metadata",
                            "<https://packaging.python.org/specifications/core-metadata/#license>`_."
                        ]
                    }
                },
                "required": [
                    "text"
                ]
            }
        ]
    }
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 434, in build_wheel
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 341, in run_setup
    exec(code, locals())
  File "<string>", line 345, in <module>
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 159, in setup
    dist.parse_config_files()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 899, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/usr/lib/python3/dist-packages/setuptools/config/pyprojecttoml.py", line 66, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/config/pyprojecttoml.py", line 127, in read_configuration
    validate(subset, filepath)
  File "/usr/lib/python3/dist-packages/setuptools/config/pyprojecttoml.py", line 55, in validate
    raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project.license`.
configuration error: `project.license` must be valid exactly by one definition (2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']


ERROR Backend subprocess exited when trying to invoke build_wheel
make[1]: *** [debian/rules:70: build_mlat-client] Error 1
make[1]: Leaving directory '/home/abcd/piaware-builder-dev/package-trixie'
make: *** [debian/rules:106: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
abcd@ubuntu-24:~/piaware-builder-dev/package-trixie$

 

 

One size fits all:wink: does not seem to work in case of Python3 and cx_Freeze.

I have tested couple of hours ago, and found cx_Freeze-7.2.0 works ok on Ubuntu 24 (noble). Why not to continue using it for noble?

well, submit a PR if you have something working ..

(how to do noble support is moot at this point, because I have a PR for that already ready to go – Ubuntu 24.04 (noble) packaging by mutability · Pull Request #33 · flightaware/piaware_builder · GitHub – but if you have changes for 22.04 / jammy, those are definitely welcome!)

Your above noted PR seems a better solution as it uses newer version of cx_Freeze, and with patches, makes it suitable for both noble and trixie - a “one size fits all” solution. I will wait till your PR is merged, then will try dev branch on trixie & noble and report result here.

For jammy, I dont have specific solution. I have been building on jammy using ./sensible-build.sh bullseye by incorporating following stanza in my install script at github:

elif [[ ${OS_VERSION} == jammy || ${OS_VERSION} == kinetic ]]; then OS_EQV_VERSION=bullseye

git clone --depth 1 https://github.com/flightaware/piaware_builder
cd ${INSTALL_DIRECTORY}/piaware_builder

./sensible-build.sh ${OS_EQV_VERSION}
cd ${INSTALL_DIRECTORY}/piaware_builder/package-${OS_EQV_VERSION}

dpkg-buildpackage -b --no-sign

 

 

 

Okay, let me try that; my quick attempt used bookworm, which in retrospect doesn’t match up with what 22.04 was based on.

edit: seems to work. I’ve rolled that change into the existing PR: Ubuntu 22.04 (jammy) and 24.04 (noble) packaging · flightaware/piaware_builder@ae8a7b4 · GitHub

1 Like

@obj
@jprochazka

Building piaware on Jammy

Another issue with Jammy:

PROBLEM:

sudo dpkg -i piaware_10.2~bpo11+1_amd64.deb

Above command returned:

dpkg: dependency problems prevent configuration of piaware:
 piaware depends on tcl-tls (>= 1.7.22-2+fa1); however:
  Package tcl-tls is not installed.

Even sudo apt --fix-broken install did not solve problem because apt supplied tcl-tls version (1.7.22-2ubuntu1) does not match required tcl-tls version (1.7.22-2+fa1) :

apt-cache policy tcl-tls
tcl-tls:
  Installed: (none)
  Candidate: 1.7.22-2ubuntu1
  Version table:
     1.7.22-2ubuntu1 500
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

SOLUTION: Built & installed tcltls-rebuild

apt install -y \
libssl-dev \
tcl-dev \
chrpath

git clone --depth 1 https://github.com/flightaware/tcltls-rebuild
cd tcltls-rebuild
./prepare-build.sh bullseye
cd package-bullseye
dpkg-buildpackage -b --no-sign 
cd ../
dpkg -i tcl-tls_1.7.22-2+fa1_*.deb

apt-mark hold tcl-tls

@obj
@jprochazka
@caius

Successful install of `piaware 11.0~dev
On RPi Model 4
Running OS Ubuntu 24.04 (noble) arm64

image

 

git clone -b dev --depth 1 https://github.com/flightaware/piaware_builder piaware-builder-dev 
cd piaware-builder-dev
./sensible-build noble 
cd package-noble 
dpkg-buildpackage -b --no-sign 

cd ../ 
sudo dpkg -i piaware_11.0~dev~ubuntu2404+1_arm64.deb

 

image

image

 

Installed versions

pi@ubuntu-noble:~$ apt-cache policy piaware | grep Installed
  Installed: 11.0~dev~ubuntu2404+1

pi@ubuntu-noble:~$ apt-cache policy tcl-tls | grep Installed
  Installed: 1.7.22-3build2

Feeding to SITE 114692

pi@ubuntu-noble:~$ sudo journalctl -u piaware -b | grep site
Apr 07 03:10:57 ubuntu-noble piaware[1002]: site statistics URL: https://flightaware.com/adsb/stats/user/abcd567#stats-114692

Journal Logs

pi@ubuntu-noble:~$ sudo journalctl -u piaware -n 8  

Apr 07 11:09:15 ubuntu-noble piaware[1081]: 2101 msgs recv'd from dump1090-fa (1891 in last 5m); 2101 msgs sent to FlightAware
Apr 07 11:14:13 ubuntu-noble piaware[1081]: 4007 msgs recv'd from dump1090-fa (1906 in last 5m); 4007 msgs sent to FlightAware
Apr 07 11:18:45 ubuntu-noble piaware[1081]: mlat-client(2096): Receiver status: connected
Apr 07 11:18:45 ubuntu-noble piaware[1081]: mlat-client(2096): Server status:   synchronized with 291 nearby receivers
Apr 07 11:18:45 ubuntu-noble piaware[1081]: mlat-client(2096): Receiver:  276.9 msg/s received      106.2 msg/s processed (38%)
Apr 07 11:18:45 ubuntu-noble piaware[1081]: mlat-client(2096): Server:      0.0 kB/s from server    0.0kB/s TCP to server     1.0kB/s UDP to server
Apr 07 11:18:45 ubuntu-noble piaware[1081]: mlat-client(2096): Aircraft: 12 of 23 Mode S, 33 of 45 ADS-B used
Apr 07 11:19:14 ubuntu-noble piaware[1081]: 5655 msgs recv'd from dump1090-fa (1648 in last 5m); 5655 msgs sent to FlightAware
pi@ubuntu-noble:~$

 

Related portions of file piaware_builder/sensible-build.sh

62   jammy)
 63     debdist=bullseye
 64     targetdist=jammy
 65     extraversion="~ubuntu2204+"
 66     ;;
 67   noble)
 68     debdist=trixie
 69     targetdist=noble
 70     extraversion="~ubuntu2404+"
 71     ;;

cx_Freezee version for trixie (appliccable to noble also)


175     trixie)
176         fetch_archive cx_Freeze-8.5.0 \
177                       https://github.com/marcelotduarte/cx_Freeze/archive/refs/tags/8.5.0.tar.gz \
178                             2502fd12ce008afb2a3f32056e0808cb16f4f863de9b70c016e0f54716b4788e
179               fetch_archive freeze-core-0.4.2 \
180                                   https://github.com/marcelotduarte/freeze-core/archive/refs/tags/0.4.2.tar.gz \
181                                   1d1ba3c8c8f89feb45fd11478a840c16734fd0f8a3d949b0d788854c84f3ecbe

 

 

@obj
@jprochazka
@caius

tcl-tls issue:

  • Noble has no issue with Ubuntu repository supplied tcl-tls ver 1.7.22-3build2
  • Trixie fails with Debian repository supplied tcl-tls ver 1.8.0-2
  • Forky fails with Debian repository supplied tcl-tls ver 2.0-1

Solution on Trixie & Forky:
Build and installed using source-code https://github.com/flightaware/tcltls-rebuild. This installed ver 1.7.22-2+fa1

Failure with Debian apt supplied tcl-tls:

abcd@debian-13:~$ sudo journalctl -u piaware -n 10  

Apr 07 14:16:35 debian-13 piaware[7999]: unhandled TLS callback: message sock5573bcb371a0 Received TLSv1.3 {Inner Content Type} {  Inner Content Type = ApplicationData (23)
Apr 07 14:16:35 debian-13 piaware[7999]: }
Apr 07 14:16:35 debian-13 piaware[7999]: unhandled TLS callback: message sock5573bcb371a0 Sent TLSv1.2 Header {Sent TLS Record
Apr 07 14:16:35 debian-13 piaware[7999]: Header:
Apr 07 14:16:35 debian-13 piaware[7999]:   Version = TLS 1.2 (0x303)
Apr 07 14:16:35 debian-13 piaware[7999]:   Content Type = ApplicationData (23)
Apr 07 14:16:35 debian-13 piaware[7999]:   Length = 49
Apr 07 14:16:35 debian-13 piaware[7999]: }
Apr 07 14:16:35 debian-13 piaware[7999]: unhandled TLS callback: message sock5573bcb371a0 Sent TLSv1.2 {Inner Content Type} {  Inner Content Type = ApplicationData (23)
Apr 07 14:16:35 debian-13 piaware[7999]: }

 

After Solving by using tcltls-rebuild’s ver 1.7.22-2+fa1:

abcd@debian-13:~$ apt-cache policy piaware | grep Installed
  Installed: 11.0~dev
 
abcd@debian-13:~$ apt-cache policy tcl-tls | grep Installed
  Installed: 1.7.22-2+fa1

Feeding Site 133993

abcd@debian-13:~$ sudo journalctl -u piaware -b | grep site
Apr 07 14:31:23 debian-13 piaware[10040]: site statistics URL: https://flightaware.com/adsb/stats/user/abcd567#stats-133993

 

Journal Logs

abcd@debian-13:~$ sudo journalctl -u piaware -n 8 

Apr 07 14:46:55 debian-13 piaware[10040]: 1966 msgs recv'd from dump1090-fa (1819 in last 5m); 1966 msgs sent to FlightAware
Apr 07 14:51:55 debian-13 piaware[10040]: 3625 msgs recv'd from dump1090-fa (1659 in last 5m); 3625 msgs sent to FlightAware
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Receiver status: connected
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Server status:   synchronized with 303 nearby receivers
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Receiver:  591.3 msg/s received      107.6 msg/s processed (18%)
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Server:      0.0 kB/s from server    0.0kB/s TCP to server     1.0kB/s UDP to server
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Results:  5.2 positions/minute
Apr 07 14:55:24 debian-13 piaware[10040]: mlat-client(12823): Aircraft: 22 of 29 Mode S, 37 of 53 ADS-B used
abcd@debian-13:~$


 

 

@caius
@jprochazka

In folder:
https://github.com/flightaware/piaware_builder/tree/dev

Found following changes done yesterday:

  • 2 new patches
  • modifications to file sensible-build.sh

 

 

1 Like

I appreciate the enthusiasm but most of this stuff is already fixed in PRs that are currently in testing, so feedback on the base dev branch without those PRs applied is not hugely useful. If you want to test the dev branch, you probably want to wait until we’re closer to a release.

1 Like