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

Add a Linux system packaging backend #1106

Merged
merged 58 commits into from
Mar 9, 2023

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Feb 23, 2023

Adds a generic "Linux System" packaging backend, with (for now) support for Debian and RPM packaging.

Fixes #1062.
Fixes #1063.
Refs #1064.

Testing tl;dr

To test this PR, on any Linux distribution, run the following at a shell prompt:

mkdir bee-test
cd bee-test
python3 -m venv venv
source venv/bin/activate
git clone --branch linux-system https://github.com/beeware/briefcase-template
pip install git+https://github.com/freakboy3742/briefcase.git@linux-system
briefcase new --template ./briefcase-template

Accept the default values for all questions, then:

cd helloworld
briefcase run

An app should start showing an empty window. Then run:

briefcase package

If you're on a Debian-derived OS, this should generate a linux/helloworld_0.0.1-1~<your distro>.deb file that you can install. If you're on a Redhat derived OS, there will be a linux/helloworld-0.0.1-1.<distro tag>.x86_64.rpm. Arch derivatives will raise an error that the backend isn't supported at this point (patches welcome - see #1064).


This is a rework of #1081. Instead of treating Debian packaging as a unique backend, it treats "native system packaging" as a distribution type, and adds deb and rpm as packaging formats. In future, pkg and other packaging formats could be added to satisfy other distro packaging.

Even without packaging support, Arch users can use the create/build/run parts of the Briefcase experience. It also means that Docker isn't needed for the default builds - Docker is only needed if you want to package for a distro other than your current distro. For that reason, this PR modifies the default Linux backend to be this new backend.

There is a linux-system branch on briefcase-template, plus a new briefcase-linux-system-template for apps.

To test this, clone the briefcase-template locally, then run:

$ briefcase new --template /path/to/briefcase-template

(substituting the path to your template).

If you're on any Linux, you should then be able to run:

$ briefcase run

and see the running app.

If you're on a Debian- or RPM-based distro, you can run:

$ briefcase package

If you're on any other Linux distro, or macOS, and you have Docker, you can run:

$ briefcase package linux --target ubuntu:jammy

to build a package for a specific distro; ubuntu:jammy is the vendor and codename of any distribution that has a Docker image (so - debian:bullseye, ubuntu:focal, and fedora:37 will also work).

The packaging commands will drop a .deb or .rpm file in your linux directory, as appropriate. You can then run sudo apt install -f <name of deb pkg> or sudo rpm -i -f <name of rpm pkg> to install the app. On installation, the app should appear in your desktop menus.

The code is fully tested and documented; there are two areas which might need more work:

  1. Linux system identification. I've done what I can based on Docker and Parallels checks; this PR should identify any distro from Debian, Ubuntu, Linux Mint, Pop! OS, RedHat, Fedora, Centos, AlmaLinux, Arch or Manjaro. It may work on other distros; however, I'm limited by what I can test locally. I'm interested in any reports on the failure modes of these (or other) Linux distributions.

  2. Non Toga apps. I haven't done a lot of testing for non-Toga apps yet. PySide apps appear to build without any additional build-time requirements; I'm not sure if there are runtime requirements (it appears like there may not be any). The good news is that the only changes here should be the list of system packages needed to compile and run those apps.

This PR also has a chicken-and-egg relationship with beeware/.github#14 - This PR won't include app verification tests in CI until the PR on .github has landed; but that PR can't land until Briefcase supports system packages.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@philsuth
Copy link

I gave it a test using your process above on Linux Mint 21.1 Vera, and got "doesn't know the system packaging format for linuxmint" error. If I specified ubuntu:jammy target then it all worked, and the resulting deb could be successfully installed and run.
Log of the failing run attached:
briefcase.2023_02_24-07_26_41.package.log

@freakboy3742
Copy link
Member Author

@philsuth Thanks! I've just pushed an update that should now include Linux Mint (and Pop! OS) identification; can you confirm if that now works for you at the packaging step? (re-running the briefcase pip install should be all you need to do before re-running briefcase package)

@philsuth
Copy link

I can confirm that after the update the packaging ran successfully on Mint 21.1. Very neat!

@eigenwijsje
Copy link

I can confirm that it identifies my Ubuntu 22.04 correctly, the generated package can be installed and the application starts.

@rmartin16
Copy link
Member

Docker latest tag I'm not sure if this is really worth worrying about but using --target ubuntu:latest currently "works"....but latest is an unstable tag since it tracks the latest LTS release. May be worth explicitly blocking latest just in case anyone thinks building with that is a good idea.

This was a problem, but it shouldn't be any more - we now derive the version info from os-release, so even if you use ubuntu:latest as the target image, it should create ubuntu/jammy as the folder.

Yes; it works in the sense that it will produce a valid deb. I was more thinking of removing the footgun of allowing users to use latest since its a moving target and this whole build process is intended to target very specific platforms.

But is it a footgun? If you specify ubuntu:latest, everything that Briefcase produces is ubuntu:jammy (at present). There won't be any physical manifestation of latest in the output artefacts of Briefcase.

I think it's a footgun because at some unknown point in the future, it will no longer produce a deb for ubuntu:jammy....it'll be ubuntu:lunar. I guess, personally, I don't know why a reasonable release process would depend on this. It seems someone would more accidentally end up in this situation and then get bit when things change. At any rate, I was mostly just interested in foreclosing this possibility....I don't have any particularly strong feelings about it.

@rmartin16
Copy link
Member

Targeting Arbitrary Architectures
As a final thought (albeit about "future work")....the current implementation allows users to create packages for arbitrary distros; however, they are limited to the underlying architecture producing the build. By and large, this'll be x86_64....especially in CI.

However, Docker allows running images for arbitrary architectures via buildx (which we're implicitly requiring of users via the --progress option for docker build). Some relatively straightforward changes (I think) should allow users to produce packages for a matrix of distros and architectures.

(I'll try to move my out-of-scope ideas in to enhancement tickets sometime this week.)

@freakboy3742
Copy link
Member Author

Targeting Arbitrary Architectures As a final thought (albeit about "future work")....the current implementation allows users to create packages for arbitrary distros; however, they are limited to the underlying architecture producing the build. By and large, this'll be x86_64....especially in CI.

Can't argue with this as an idea. Although the vast majority of Linux installs are x86_64, it would be nice to be able to build a Raspberry Pi package from my x86_64 CI machine, for example.

(I'll try to move my out-of-scope ideas in to enhancement tickets sometime this week.)

👍

@rmartin16
Copy link
Member

rmartin16 commented Mar 7, 2023

RHEL Build Reqs

The base image for fedora doesn't include make or gcc. Similar to how we're including build-essential for Debian, we should probably include at least make and gcc by default; dnf groupinstall "Development Tools" may be considered an analogue to build-essential....but it definitely contains a whole lot more than we need.

Of note....this only isn't a problem for toga since the default reqs in pyproject.toml pull in gcc and make.

PySide6 App

Non Toga apps. I haven't done a lot of testing for non-Toga apps yet. PySide apps appear to build without any additional build-time requirements; I'm not sure if there are runtime requirements (it appears like there may not be any). The good news is that the only changes here should be the list of system packages needed to compile and run those apps.

I put together the list below based on the Qt's requirements for X11....and trial and error on ubuntu:jammy, ubuntu:focal, and debian:bullseye. I imagine many of these are probably included in a distro that comes with a desktop environment already installed.

"libxrender1",
"libxcb-render0",
"libxcb-render-util0",
"libxcb-shape0",
"libxcb-randr0",
"libxcb-xfixes0",
"libxcb-xkb1",
"libxcb-sync1",
"libxcb-shm0",
"libxcb-icccm4",
"libxcb-keysyms1",
"libxcb-image0",
"libxcb-util1",
"libxkbcommon0",
"libxkbcommon-x11-0",
"libfontconfig1",
"libfreetype6",
"libxext6",
"libx11-6",
"libxcb1",
"libx11-xcb1",
"libsm6",
"libice6",
"libglib2.0-0",
"libgl1",
"libegl1-mesa",
"libdbus-1-3",
"libgssapi-krb5-2",

I tried the same thing on fedora:38....but it went south. The process to build the rpm took a long time and had a lot to say. The install suggested the rpm build was completely broken since it started complaining about PySide6's included so files. I think the rpm build was automatically assessing dynamic linking and adding bogus requirements to the package.

[root@jupiter /]# dnf install /local/linux/pysidepkg-0.0.1-1.fc38.x86_64.rpm 
Last metadata expiration check: 0:01:43 ago on Tue Mar  7 20:17:45 2023.
Error: 
 Problem: conflicting requests
  - nothing provides libQt6Quick3DSpatialAudio.so.6()(64bit) needed by pysidepkg-0.0.1-1.fc38.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
[root@fa428e93b68 /]# 

Also, in case anyone finds it useful:

Script to start Docker with X11 access
#!/bin/bash

if [ -n "$1" ]; then IMAGE="$1"
else
#IMAGE="debian:bullseye"
IMAGE="ubuntu:jammy"
#IMAGE="linuxmintd/mint21.1-amd64"
#IMAGE="fedora:38"
#IMAGE="kalilinux/kali-rolling"
fi

XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run --rm -it -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTH -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -v $(pwd):/local $IMAGE

@freakboy3742
Copy link
Member Author

RHEL Build Reqs

The base image for fedora doesn't include make or gcc. Similar to how we're including build-essential for Debian, we should probably include at least make and gcc by default; dnf groupinstall "Development Tools" may be considered an analogue to build-essential....but it definitely contains a whole lot more than we need.

Of note....this only isn't a problem for toga since the default reqs in pyproject.toml pull in gcc and make.

Agreed it doesn't hurt to be explicit; I've added gcc, make and pkgconf-pkg-config as explicit system requirements for RHEL base machines.

PySide6 App

Non Toga apps. I haven't done a lot of testing for non-Toga apps yet. PySide apps appear to build without any additional build-time requirements; I'm not sure if there are runtime requirements (it appears like there may not be any). The good news is that the only changes here should be the list of system packages needed to compile and run those apps.

I put together the list below based on the Qt's requirements for X11....
and trial and error on ubuntu:jammy, ubuntu:focal, and debian:bullseye. I imagine many of these are probably included in a distro that comes with a desktop environment already installed.

I'll add these to the briefcase template, but... "Alexa, how do you spell 'we don't want you to use Qt'?" :-)

I tried the same thing on fedora:38....but it went south.

It's worth noting that Fedora 38 hasn't been released yet; 36 and 37 are the only two officially supported releases. I don't know if that might have contributed to the problem. I'll have a quick poke to see if I can see anything obvious; however, I'm somewhat comfortable landing this without full PySide support, especially if (yet again) the issue is incompatibilities with PySide packaging.

@freakboy3742
Copy link
Member Author

I tried the same thing on fedora:38....but it went south.

It's worth noting that Fedora 38 hasn't been released yet; 36 and 37 are the only two officially supported releases. I don't know if that might have contributed to the problem. I'll have a quick poke to see if I can see anything obvious; however, I'm somewhat comfortable landing this without full PySide support, especially if (yet again) the issue is incompatibilities with PySide packaging.

Update: It wasn't a fedora 38 problem :-)

briefcase run works with Pyside, but I get the same issue you describe with packaging. Once again, the issue seems to be the PySide bindings being fundamentally incompatible with being redistributed on Linux - which... given Qt exists primarily for usage on Linux, absolutely flummoxes me.

@rmartin16 FYI. I'm about to land #1107, which will involve a bit of a merge; but won't change anything functional here.

@rmartin16
Copy link
Member

briefcase run works with Pyside, but I get the same issue you describe with packaging. Once again, the issue seems to be the PySide bindings being fundamentally incompatible with being redistributed on Linux - which... given Qt exists primarily for usage on Linux, absolutely flummoxes me.

I think this may be more of a function of rpmbuild than anything. For instance, the fedora docs detail how to limit some of this auto-dependency magic it apparently does. I'm thinking maybe if we prevent rpmbuild from trying to derive any dependencies from the included Python packages, could these issues be avoided.... (ofc, I say this with zero prior knowledge of rpmbuild)

@rmartin16
Copy link
Member

As a PoC, I updated the rpmbuild spec to include this:

f"ExclusiveArch:  {self.tools.host_arch}",
"",
"%global __requires_exclude libQt6.*.so"
"",
"%description",
app.long_description,

This mitigated the nothing provides libQt6*.so error.....although, the app immediately seg faulted when I tried to run it.

Nonetheless, I would expect this problem to potentially encompass any Python package that's bundling its own libraries.

@freakboy3742
Copy link
Member Author

As a PoC, I updated the rpmbuild spec to include this:

f"ExclusiveArch:  {self.tools.host_arch}",
"",
"%global __requires_exclude libQt6.*.so"
"",
"%description",
app.long_description,

This mitigated the nothing provides libQt6*.so error.....although, the app immediately seg faulted when I tried to run it.

Nonetheless, I would expect this problem to potentially encompass any Python package that's bundling its own libraries.

I mean - we can probably exclude all the app and app_packages folders - after all, they're supposed to be manylinux wheels, and if there are any dependencies, they should be being declared by pyproject.toml.

As for the segfault - is there any other processing going on? I've discovered through AppImage and Deb packaging that manylinux wheels really don't play well if they're futzed with after being packaged.

@rmartin16
Copy link
Member

As a PoC, I updated the rpmbuild spec to include this:

f"ExclusiveArch:  {self.tools.host_arch}",
"",
"%global __requires_exclude libQt6.*.so"
"",
"%description",
app.long_description,

This mitigated the nothing provides libQt6*.so error.....although, the app immediately seg faulted when I tried to run it.
Nonetheless, I would expect this problem to potentially encompass any Python package that's bundling its own libraries.

I mean - we can probably exclude all the app and app_packages folders - after all, they're supposed to be manylinux wheels, and if there are any dependencies, they should be being declared by pyproject.toml.

That's probably the best approach....at least for now. Additionally, though, this probably needs to be done for %global __provides_exclude as well so these apps don't falsely advertise providing these libs (if im understanding all this correctly).

Although, that's a bit unfortunate because this auto-dependency magic that rpmbuild is doing actually got the PySide6 to run on fedora:37 with nothing inrequires in pyproject.toml.

List of packages automatically pulled in
[root@7202777499f2 /]# dnf install /local/linux/pysidepkg-0.0.1-1.fc37.x86_64.rpm 
Last metadata expiration check: 0:00:29 ago on Wed Mar  8 02:23:15 2023.
Dependencies resolved.
================================================================================================================================================================================================================================
 Package                                                            Architecture                           Version                                                           Repository                                    Size
================================================================================================================================================================================================================================
Installing:
 pysidepkg                                                          x86_64                                 0.0.1-1.fc37                                                      @commandline                                 143 M
Installing dependencies:
 ModemManager-glib                                                  x86_64                                 1.18.12-1.fc37                                                    updates                                      301 k
 NetworkManager-libnm                                               x86_64                                 1:1.40.10-1.fc37                                                  updates                                      1.7 M
 adwaita-cursor-theme                                               noarch                                 43-1.fc37                                                         fedora                                       633 k
 adwaita-icon-theme                                                 noarch                                 43-1.fc37                                                         fedora                                       4.9 M
 alsa-lib                                                           x86_64                                 1.2.8-2.fc37                                                      updates                                      517 k
 at-spi2-atk                                                        x86_64                                 2.38.0-5.fc37                                                     fedora                                        85 k
 at-spi2-core                                                       x86_64                                 2.44.1-2.fc37                                                     fedora                                       192 k
 atk                                                                x86_64                                 2.38.0-2.fc37                                                     fedora                                       289 k
 avahi-glib                                                         x86_64                                 0.8-18.fc37                                                       updates                                       15 k
 avahi-libs                                                         x86_64                                 0.8-18.fc37                                                       updates                                       67 k
 bluez-libs                                                         x86_64                                 5.66-4.fc37                                                       updates                                       85 k
 cairo                                                              x86_64                                 1.17.6-2.fc37                                                     fedora                                       676 k
 cairo-gobject                                                      x86_64                                 1.17.6-2.fc37                                                     fedora                                        18 k
 cdparanoia-libs                                                    x86_64                                 10.2-40.fc37                                                      fedora                                        54 k
 colord-libs                                                        x86_64                                 1.4.6-2.fc37                                                      fedora                                       233 k
 community-mysql-common                                             x86_64                                 8.0.32-1.fc37                                                     updates                                       77 k
 community-mysql-libs                                               x86_64                                 8.0.32-1.fc37                                                     updates                                      1.2 M
 cpio                                                               x86_64                                 2.13-13.fc37                                                      fedora                                       277 k
 crypto-policies-scripts                                            noarch                                 20220815-1.gite4ed860.fc37                                        fedora                                       110 k
 cryptsetup-libs                                                    x86_64                                 2.6.1-1.fc37                                                      updates                                      491 k
 cups-libs                                                          x86_64                                 1:2.4.2-5.fc37                                                    updates                                      267 k
 dbus                                                               x86_64                                 1:1.14.6-1.fc37                                                   updates                                      7.7 k
 dbus-broker                                                        x86_64                                 33-1.fc37                                                         updates                                      174 k
 dbus-common                                                        noarch                                 1:1.14.6-1.fc37                                                   updates                                       15 k
 dbus-libs                                                          x86_64                                 1:1.14.6-1.fc37                                                   updates                                      155 k
 device-mapper                                                      x86_64                                 1.02.175-9.fc37                                                   fedora                                       138 k
 device-mapper-libs                                                 x86_64                                 1.02.175-9.fc37                                                   fedora                                       177 k
 dracut                                                             x86_64                                 057-5.fc37                                                        updates                                      415 k
 duktape                                                            x86_64                                 2.6.0-3.fc37                                                      fedora                                       165 k
 exempi                                                             x86_64                                 2.6.2-2.fc37                                                      fedora                                       568 k
 exiv2-libs                                                         x86_64                                 0.27.6-4.fc37                                                     updates                                      798 k
 fdk-aac-free                                                       x86_64                                 2.0.0-9.fc37                                                      fedora                                       332 k
 file                                                               x86_64                                 5.42-4.fc37                                                       fedora                                        49 k
 flac-libs                                                          x86_64                                 1.3.4-2.fc37                                                      fedora                                       220 k
 fontconfig                                                         x86_64                                 2.14.1-2.fc37                                                     updates                                      294 k
 fonts-filesystem                                                   noarch                                 1:2.0.5-9.fc37                                                    fedora                                       7.9 k
 freetype                                                           x86_64                                 2.12.1-3.fc37                                                     fedora                                       407 k
 fribidi                                                            x86_64                                 1.0.12-2.fc37                                                     fedora                                        89 k
 fuse-common                                                        x86_64                                 3.10.5-5.fc37                                                     fedora                                       8.2 k
 fuse-libs                                                          x86_64                                 2.9.9-15.fc37                                                     fedora                                        97 k
 fuse3                                                              x86_64                                 3.10.5-5.fc37                                                     fedora                                        54 k
 fuse3-libs                                                         x86_64                                 3.10.5-5.fc37                                                     fedora                                        92 k
 gdk-pixbuf2                                                        x86_64                                 2.42.10-1.fc37                                                    fedora                                       485 k
 gdk-pixbuf2-modules                                                x86_64                                 2.42.10-1.fc37                                                    fedora                                        85 k
 geoclue2                                                           x86_64                                 2.6.0-3.fc37                                                      fedora                                       144 k
 gettext-envsubst                                                   x86_64                                 0.21.1-1.fc37                                                     updates                                       36 k
 gettext-libs                                                       x86_64                                 0.21.1-1.fc37                                                     updates                                      319 k
 gettext-runtime                                                    x86_64                                 0.21.1-1.fc37                                                     updates                                      117 k
 giflib                                                             x86_64                                 5.2.1-14.fc37                                                     fedora                                        51 k
 glib-networking                                                    x86_64                                 2.74.0-1.fc37                                                     fedora                                       200 k
 gobject-introspection                                              x86_64                                 1.74.0-1.fc37                                                     fedora                                       259 k
 google-noto-fonts-common                                           noarch                                 20201206^1.git0c78c8329-7.fc37                                    updates                                       18 k
 google-noto-sans-vf-fonts                                          noarch                                 20201206^1.git0c78c8329-7.fc37                                    updates                                      729 k
 graphene                                                           x86_64                                 1.10.6-4.fc37                                                     fedora                                        62 k
 graphite2                                                          x86_64                                 1.3.14-10.fc37                                                    fedora                                        95 k
 grub2-common                                                       noarch                                 1:2.06-88.fc37                                                    updates                                      917 k
 grub2-tools                                                        x86_64                                 1:2.06-88.fc37                                                    updates                                      1.8 M
 grub2-tools-minimal                                                x86_64                                 1:2.06-88.fc37                                                    updates                                      623 k
 gsettings-desktop-schemas                                          x86_64                                 43.0-1.fc37                                                       fedora                                       732 k
 gsm                                                                x86_64                                 1.0.22-1.fc37                                                     fedora                                        35 k
 gstreamer1                                                         x86_64                                 1.20.5-1.fc37                                                     updates                                      1.4 M
 gstreamer1-plugins-base                                            x86_64                                 1.20.5-1.fc37                                                     updates                                      2.2 M
 gtk-update-icon-cache                                              x86_64                                 3.24.37-1.fc37                                                    updates                                       33 k
 gtk3                                                               x86_64                                 3.24.37-1.fc37                                                    updates                                      5.0 M
 harfbuzz                                                           x86_64                                 5.2.0-1.fc37                                                      fedora                                       801 k
 hicolor-icon-theme                                                 noarch                                 0.17-14.fc37                                                      fedora                                        66 k
 hwdata                                                             noarch                                 0.368-1.fc37                                                      updates                                      1.6 M
 iso-codes                                                          noarch                                 4.11.0-1.fc37                                                     fedora                                       3.4 M
 jbigkit-libs                                                       x86_64                                 2.1-24.fc37                                                       fedora                                        53 k
 json-glib                                                          x86_64                                 1.6.6-3.fc37                                                      fedora                                       162 k
 kbd                                                                x86_64                                 2.5.1-3.fc37                                                      fedora                                       429 k
 kbd-legacy                                                         noarch                                 2.5.1-3.fc37                                                      fedora                                       551 k
 kbd-misc                                                           noarch                                 2.5.1-3.fc37                                                      fedora                                       1.6 M
 kmod                                                               x86_64                                 30-2.fc37                                                         fedora                                       120 k
 kmod-libs                                                          x86_64                                 30-2.fc37                                                         fedora                                        68 k
 lame-libs                                                          x86_64                                 3.100-13.fc37                                                     fedora                                       335 k
 langpacks-core-font-en                                             noarch                                 3.0-26.fc37                                                       fedora                                        10 k
 lcms2                                                              x86_64                                 2.14-1.fc37                                                       updates                                      176 k
 libX11                                                             x86_64                                 1.8.4-1.fc37                                                      updates                                      647 k
 libX11-common                                                      noarch                                 1.8.4-1.fc37                                                      updates                                      177 k
 libX11-xcb                                                         x86_64                                 1.8.4-1.fc37                                                      updates                                       11 k
 libXau                                                             x86_64                                 1.0.10-1.fc37                                                     fedora                                        31 k
 libXcomposite                                                      x86_64                                 0.4.5-8.fc37                                                      fedora                                        23 k
 libXcursor                                                         x86_64                                 1.2.1-2.fc37                                                      fedora                                        30 k
 libXdamage                                                         x86_64                                 1.1.5-8.fc37                                                      fedora                                        22 k
 libXext                                                            x86_64                                 1.3.4-9.fc37                                                      fedora                                        39 k
 libXfixes                                                          x86_64                                 6.0.0-4.fc37                                                      fedora                                        19 k
 libXft                                                             x86_64                                 2.3.4-3.fc37                                                      fedora                                        62 k
 libXi                                                              x86_64                                 1.8-3.fc37                                                        fedora                                        39 k
 libXinerama                                                        x86_64                                 1.1.4-11.fc37                                                     fedora                                        14 k
 libXrandr                                                          x86_64                                 1.5.2-9.fc37                                                      fedora                                        27 k
 libXrender                                                         x86_64                                 0.9.10-17.fc37                                                    fedora                                        27 k
 libXtst                                                            x86_64                                 1.2.3-17.fc37                                                     fedora                                        20 k
 libXv                                                              x86_64                                 1.0.11-17.fc37                                                    fedora                                        18 k
 libXxf86vm                                                         x86_64                                 1.1.4-19.fc37                                                     fedora                                        18 k
 libargon2                                                          x86_64                                 20190702-1.fc37                                                   fedora                                        28 k
 libasyncns                                                         x86_64                                 0.8-23.fc37                                                       fedora                                        30 k
 libcanberra                                                        x86_64                                 0.30-29.fc37                                                      fedora                                        87 k
 libcbor                                                            x86_64                                 0.7.0-7.fc37                                                      fedora                                        56 k
 libcloudproviders                                                  x86_64                                 0.3.1-6.fc37                                                      fedora                                        44 k
 libcue                                                             x86_64                                 2.2.1-10.fc37                                                     fedora                                        33 k
 libdatrie                                                          x86_64                                 0.2.13-4.fc37                                                     fedora                                        32 k
 libdrm                                                             x86_64                                 2.4.114-1.fc37                                                    updates                                      158 k
 libedit                                                            x86_64                                 3.1-43.20221009cvs.fc37                                           updates                                      106 k
 libepoxy                                                           x86_64                                 1.5.10-2.fc37                                                     fedora                                       242 k
 libexif                                                            x86_64                                 0.6.24-3.fc37                                                     fedora                                       462 k
 libfdisk                                                           x86_64                                 2.38.1-1.fc37                                                     fedora                                       160 k
 libgexiv2                                                          x86_64                                 0.14.0-4.fc37                                                     fedora                                        94 k
 libglvnd                                                           x86_64                                 1:1.5.0-1.fc37                                                    fedora                                       133 k
 libglvnd-egl                                                       x86_64                                 1:1.5.0-1.fc37                                                    fedora                                        36 k
 libglvnd-glx                                                       x86_64                                 1:1.5.0-1.fc37                                                    fedora                                       140 k
 libgrss                                                            x86_64                                 0.7.0-15.fc37                                                     fedora                                        63 k
 libgsf                                                             x86_64                                 1.14.47-6.fc37                                                    fedora                                       255 k
 libgudev                                                           x86_64                                 237-3.fc37                                                        fedora                                        35 k
 libgusb                                                            x86_64                                 0.4.5-1.fc37                                                      updates                                       63 k
 libgxps                                                            x86_64                                 0.3.2-4.fc37                                                      fedora                                        78 k
 libicu                                                             x86_64                                 71.1-2.fc37                                                       fedora                                        10 M
 libiptcdata                                                        x86_64                                 1.0.5-12.fc37                                                     fedora                                        61 k
 libjpeg-turbo                                                      x86_64                                 2.1.3-2.fc37                                                      fedora                                       181 k
 libkcapi                                                           x86_64                                 1.4.0-2.fc37                                                      fedora                                        46 k
 libkcapi-hmaccalc                                                  x86_64                                 1.4.0-2.fc37                                                      fedora                                        24 k
 libldac                                                            x86_64                                 2.0.2.3-11.fc37                                                   fedora                                        41 k
 libmysofa                                                          x86_64                                 1.2.1-3.fc37                                                      fedora                                        42 k
 libnotify                                                          x86_64                                 0.8.1-2.fc37                                                      fedora                                        51 k
 libogg                                                             x86_64                                 2:1.3.5-4.fc37                                                    fedora                                        33 k
 libosinfo                                                          x86_64                                 1.10.0-5.fc37                                                     updates                                      321 k
 libpciaccess                                                       x86_64                                 0.16-7.fc37                                                       fedora                                        27 k
 libpng                                                             x86_64                                 2:1.6.37-13.fc37                                                  fedora                                       119 k
 libpq                                                              x86_64                                 14.3-2.fc37                                                       fedora                                       199 k
 libproxy                                                           x86_64                                 0.4.18-3.fc37                                                     fedora                                        71 k
 libsbc                                                             x86_64                                 1.5-4.fc37                                                        fedora                                        47 k
 libseccomp                                                         x86_64                                 2.5.3-3.fc37                                                      fedora                                        70 k
 libsndfile                                                         x86_64                                 1.1.0-4.fc37                                                      fedora                                       212 k
 libsoup                                                            x86_64                                 2.74.3-1.fc37                                                     fedora                                       402 k
 libsoup3                                                           x86_64                                 3.2.2-2.fc37                                                      updates                                      387 k
 libstemmer                                                         x86_64                                 0-19.585svn.fc37                                                  fedora                                        79 k
 libtdb                                                             x86_64                                 1.4.7-3.fc37                                                      fedora                                        50 k
 libthai                                                            x86_64                                 0.1.29-3.fc37                                                     fedora                                       213 k
 libtheora                                                          x86_64                                 1:1.1.1-32.fc37                                                   fedora                                       167 k
 libtiff                                                            x86_64                                 4.4.0-4.fc37                                                      fedora                                       197 k
 libtool-ltdl                                                       x86_64                                 2.4.7-2.fc37                                                      fedora                                        37 k
 libtracker-sparql                                                  x86_64                                 3.4.2-1.fc37                                                      updates                                      358 k
 libunwind                                                          x86_64                                 1.6.2-5.fc37                                                      updates                                       67 k
 libusb1                                                            x86_64                                 1.0.25-9.fc37                                                     fedora                                        74 k
 libutempter                                                        x86_64                                 1.2.1-7.fc37                                                      fedora                                        26 k
 libvisual                                                          x86_64                                 1:0.4.0-36.fc37                                                   fedora                                       142 k
 libvorbis                                                          x86_64                                 1:1.3.7-6.fc37                                                    fedora                                       195 k
 libwayland-client                                                  x86_64                                 1.21.0-1.fc37                                                     fedora                                        33 k
 libwayland-cursor                                                  x86_64                                 1.21.0-1.fc37                                                     fedora                                        19 k
 libwayland-egl                                                     x86_64                                 1.21.0-1.fc37                                                     fedora                                        13 k
 libwayland-server                                                  x86_64                                 1.21.0-1.fc37                                                     fedora                                        41 k
 libwebp                                                            x86_64                                 1.3.0-1.fc37                                                      updates                                      283 k
 libxcb                                                             x86_64                                 1.13.1-10.fc37                                                    fedora                                       231 k
 libxkbcommon                                                       x86_64                                 1.4.1-2.fc37                                                      fedora                                       140 k
 libxkbcommon-x11                                                   x86_64                                 1.4.1-2.fc37                                                      fedora                                        22 k
 libxkbfile                                                         x86_64                                 1.1.0-9.fc37                                                      fedora                                        88 k
 libxshmfence                                                       x86_64                                 1.3-11.fc37                                                       fedora                                        12 k
 libxslt                                                            x86_64                                 1.1.37-1.fc37                                                     fedora                                       184 k
 lilv-libs                                                          x86_64                                 0.24.14-3.fc37                                                    fedora                                        58 k
 llvm-libs                                                          x86_64                                 15.0.7-1.fc37                                                     updates                                       25 M
 low-memory-monitor                                                 x86_64                                 2.1-6.fc37                                                        fedora                                        35 k
 mariadb-connector-c-config                                         noarch                                 3.2.7-2.fc37                                                      fedora                                       9.6 k
 mesa-filesystem                                                    x86_64                                 22.3.6-1.fc37                                                     updates                                       18 k
 mesa-libEGL                                                        x86_64                                 22.3.6-1.fc37                                                     updates                                      131 k
 mesa-libGL                                                         x86_64                                 22.3.6-1.fc37                                                     updates                                      176 k
 mesa-libgbm                                                        x86_64                                 22.3.6-1.fc37                                                     updates                                       44 k
 mesa-libglapi                                                      x86_64                                 22.3.6-1.fc37                                                     updates                                       56 k
 mozjs102                                                           x86_64                                 102.8.0-1.fc37                                                    updates                                      4.5 M
 mpg123-libs                                                        x86_64                                 1.31.2-1.fc37                                                     updates                                      341 k
 nspr                                                               x86_64                                 4.35.0-4.fc37                                                     updates                                      135 k
 nss                                                                x86_64                                 3.88.1-1.fc37                                                     updates                                      693 k
 nss-softokn                                                        x86_64                                 3.88.1-1.fc37                                                     updates                                      383 k
 nss-softokn-freebl                                                 x86_64                                 3.88.1-1.fc37                                                     updates                                      325 k
 nss-sysinit                                                        x86_64                                 3.88.1-1.fc37                                                     updates                                       18 k
 nss-util                                                           x86_64                                 3.88.1-1.fc37                                                     updates                                       86 k
 openjpeg2                                                          x86_64                                 2.5.0-2.fc37                                                      fedora                                       178 k
 opus                                                               x86_64                                 1.3.1-11.fc37                                                     fedora                                       204 k
 orc                                                                x86_64                                 0.4.31-8.fc37                                                     fedora                                       183 k
 os-prober                                                          x86_64                                 1.81-1.fc37                                                       fedora                                        50 k
 osinfo-db                                                          noarch                                 20221130-1.fc37                                                   updates                                      418 k
 osinfo-db-tools                                                    x86_64                                 1.10.0-6.fc37                                                     updates                                       76 k
 pango                                                              x86_64                                 1.50.13-1.fc37                                                    updates                                      342 k
 pcsc-lite-libs                                                     x86_64                                 1.9.9-1.fc37                                                      fedora                                        28 k
 pipewire-libs                                                      x86_64                                 0.3.66-1.fc37                                                     updates                                      1.8 M
 pixman                                                             x86_64                                 0.40.0-6.fc37                                                     fedora                                       277 k
 polkit                                                             x86_64                                 121-4.fc37                                                        fedora                                       156 k
 polkit-libs                                                        x86_64                                 121-4.fc37                                                        fedora                                        66 k
 polkit-pkla-compat                                                 x86_64                                 0.1-22.fc37                                                       fedora                                        44 k
 poppler                                                            x86_64                                 22.08.0-3.fc37                                                    updates                                      1.2 M
 poppler-data                                                       noarch                                 0.4.11-3.fc37                                                     fedora                                       2.0 M
 poppler-glib                                                       x86_64                                 22.08.0-3.fc37                                                    updates                                      176 k
 procps-ng                                                          x86_64                                 3.3.17-6.fc37.2                                                   updates                                      337 k
 pulseaudio-libs                                                    x86_64                                 16.1-4.fc37                                                       updates                                      703 k
 pulseaudio-utils                                                   x86_64                                 16.1-4.fc37                                                       updates                                       84 k
 rtkit                                                              x86_64                                 0.11-33.fc37                                                      fedora                                        55 k
 serd                                                               x86_64                                 0.30.12-2.fc37                                                    fedora                                        61 k
 shared-mime-info                                                   x86_64                                 2.2-2.fc37                                                        fedora                                       381 k
 sord                                                               x86_64                                 0.16.10-3.fc37                                                    updates                                       46 k
 sound-theme-freedesktop                                            noarch                                 0.8-18.fc37                                                       fedora                                       383 k
 sratom                                                             x86_64                                 0.6.10-2.fc37                                                     fedora                                        26 k
 systemd                                                            x86_64                                 251.13-4.fc37                                                     updates                                      4.2 M
 systemd-pam                                                        x86_64                                 251.13-4.fc37                                                     updates                                      333 k
 systemd-udev                                                       x86_64                                 251.13-4.fc37                                                     updates                                      1.9 M
 totem-pl-parser                                                    x86_64                                 3.26.6-5.fc37                                                     fedora                                       144 k
 tracker                                                            x86_64                                 3.4.2-1.fc37                                                      updates                                      573 k
 uchardet                                                           x86_64                                 0.0.6-16.fc37                                                     fedora                                        94 k
 unixODBC                                                           x86_64                                 2.3.11-1.fc37                                                     fedora                                       486 k
 upower                                                             x86_64                                 0.99.20-2.fc37                                                    fedora                                       140 k
 util-linux                                                         x86_64                                 2.38.1-1.fc37                                                     fedora                                       2.3 M
 vulkan-loader                                                      x86_64                                 1.3.216.0-3.fc37                                                  fedora                                       142 k
 webrtc-audio-processing                                            x86_64                                 0.3.1-9.fc37                                                      fedora                                       304 k
 wireplumber                                                        x86_64                                 0.4.13-1.fc37                                                     updates                                       94 k
 wireplumber-libs                                                   x86_64                                 0.4.13-1.fc37                                                     updates                                      352 k
 xcb-util                                                           x86_64                                 0.4.0-20.fc37                                                     fedora                                        18 k
 xcb-util-image                                                     x86_64                                 0.4.0-20.fc37                                                     fedora                                        19 k
 xcb-util-keysyms                                                   x86_64                                 0.4.0-18.fc37                                                     fedora                                        14 k
 xcb-util-renderutil                                                x86_64                                 0.3.9-21.fc37                                                     fedora                                        17 k
 xcb-util-wm                                                        x86_64                                 0.4.1-23.fc37                                                     fedora                                        31 k
 xdg-desktop-portal                                                 x86_64                                 1.15.0-4.fc37                                                     updates                                      438 k
 xkeyboard-config                                                   noarch                                 2.36-3.fc37                                                       updates                                      957 k
 xml-common                                                         noarch                                 0.6.3-59.fc37                                                     fedora                                        31 k
 xz                                                                 x86_64                                 5.4.1-1.fc37                                                      updates                                      419 k
Installing weak dependencies:
 abattis-cantarell-fonts                                            noarch                                 0.301-8.fc37                                                      fedora                                       270 k
 adobe-source-code-pro-fonts                                        noarch                                 2.030.1.050-13.fc37                                               fedora                                       831 k
 dconf                                                              x86_64                                 0.40.0-7.fc37                                                     fedora                                       109 k
 diffutils                                                          x86_64                                 3.8-3.fc37                                                        fedora                                       378 k
 exiv2                                                              x86_64                                 0.27.6-4.fc37                                                     updates                                      982 k
 grubby                                                             x86_64                                 8.40-66.fc37                                                      fedora                                        33 k
 kpartx                                                             x86_64                                 0.9.0-4.fc37                                                      updates                                       48 k
 libbpf                                                             x86_64                                 2:0.8.0-2.fc37                                                    fedora                                       172 k
 libcanberra-gtk3                                                   x86_64                                 0.30-29.fc37                                                      fedora                                        32 k
 libfido2                                                           x86_64                                 1.11.0-3.fc37                                                     fedora                                        97 k
 libproxy-duktape                                                   x86_64                                 0.4.18-3.fc37                                                     fedora                                        18 k
 memstrack                                                          x86_64                                 0.2.4-3.fc37                                                      fedora                                        50 k
 mesa-dri-drivers                                                   x86_64                                 22.3.6-1.fc37                                                     updates                                       17 M
 mesa-va-drivers                                                    x86_64                                 22.3.6-1.fc37                                                     updates                                      3.4 M
 mesa-vulkan-drivers                                                x86_64                                 22.3.6-1.fc37                                                     updates                                      7.5 M
 pigz                                                               x86_64                                 2.7-2.fc37                                                        fedora                                        82 k
 pipewire                                                           x86_64                                 0.3.66-1.fc37                                                     updates                                      100 k
 pipewire-alsa                                                      x86_64                                 0.3.66-1.fc37                                                     updates                                       65 k
 pipewire-jack-audio-connection-kit                                 x86_64                                 0.3.66-1.fc37                                                     updates                                      137 k
 pipewire-pulseaudio                                                x86_64                                 0.3.66-1.fc37                                                     updates                                       28 k
 qrencode-libs                                                      x86_64                                 4.1.1-3.fc37                                                      fedora                                        61 k
 systemd-networkd                                                   x86_64                                 251.13-4.fc37                                                     updates                                      615 k
 systemd-resolved                                                   x86_64                                 251.13-4.fc37                                                     updates                                      281 k
 tpm2-tools                                                         x86_64                                 5.4-1.fc37                                                        updates                                      799 k
 tracker-miners                                                     x86_64                                 3.4.2-1.fc37                                                      updates                                      934 k
 xdg-desktop-portal-gtk                                             x86_64                                 1.14.1-1.fc37                                                     updates                                      148 k

Transaction Summary
================================================================================================================================================================================================================================
Install  249 Packages

As for the segfault - is there any other processing going on? I've discovered through AppImage and Deb packaging that manylinux wheels really don't play well if they're futzed with after being packaged.

All of the so files were being stripped; so, I disabled that in rpmbuild:

"%global _enable_debug_package 0",
"%global debug_package %{nil}",
"%global __os_install_post /usr/lib/rpm/brp-compress %{nil}",

And the helloworld PySide6 app properly launched from my fedora:37 container 🙂

@freakboy3742
Copy link
Member Author

I mean - we can probably exclude all the app and app_packages folders - after all, they're supposed to be manylinux wheels, and if there are any dependencies, they should be being declared by pyproject.toml.

That's probably the best approach....at least for now. Additionally, though, this probably needs to be done for %global __provides_exclude as well so these apps don't falsely advertise providing these libs (if im understanding all this correctly).

I think that's my read as well - I've added both these lines in.

Although, that's a bit unfortunate because this auto-dependency magic that rpmbuild is doing actually got the PySide6 to run on fedora:37 with nothing inrequires in pyproject.toml.

List of packages automatically pulled in

Yeah - that list is... a little enthusiastic, to my reading. There's a whole lot of GTK dependencies that definitely aren't needed. We might be able to get a better list from the actual Qt RPM packages...

As for the segfault - is there any other processing going on? I've discovered through AppImage and Deb packaging that manylinux wheels really don't play well if they're futzed with after being packaged.

All of the so files were being stripped; so, I disabled that in rpmbuild:

"%global _enable_debug_package 0",
"%global debug_package %{nil}",
"%global __os_install_post /usr/lib/rpm/brp-compress %{nil}",

And the helloworld PySide6 app properly launched from my fedora:37 container 🙂

Ok - I've added those lines in as well.

I've also finisehd merging the build-list changes, so I think we're at v1.0_final_final_no_really_this_time for this PR...

@freakboy3742
Copy link
Member Author

On a vaguely related, but indepdendent note - OMG there's a whole lot of noise in the PySide package... Why the hell does a wheel contain all the example code and documentation?! There's some room for some major optimisation with a cleanup_paths definition...

@rmartin16
Copy link
Member

Although, that's a bit unfortunate because this auto-dependency magic that rpmbuild is doing actually got the PySide6 to run on fedora:37 with nothing inrequires in pyproject.toml.
List of packages automatically pulled in

Yeah - that list is... a little enthusiastic, to my reading. There's a whole lot of GTK dependencies that definitely aren't needed. We might be able to get a better list from the actual Qt RPM packages...

Yeah....with no dependencies listed for the PySide6 HelloWorld app, I was able to get it running after dnf install qt6-qtbase-gui.

On a vaguely related, but indepdendent note - OMG there's a whole lot of noise in the PySide package... Why the hell does a wheel contain all the example code and documentation?! There's some room for some major optimisation with a cleanup_paths definition...

ha, yeah, no joke; when we were trying to clean some things up for Flatpak in beeware/briefcase-linux-flatpak-template#14, I remember seeing somewhere a whole list of files and directories being deleted from PySide6 after installing the wheel....although, I can't find it now....

@freakboy3742
Copy link
Member Author

🎉

Thanks so much for all your testing and assistance on this @rmartin16. Couldn't have done it without you.

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.

Add an RPM backend for Linux Add a deb backend for Linux
6 participants