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

Debian packaging #104

Merged
merged 12 commits into from
Feb 13, 2025
Merged

Debian packaging #104

merged 12 commits into from
Feb 13, 2025

Conversation

samcday
Copy link
Owner

@samcday samcday commented Feb 13, 2025

closes #67

This pulls in the DebianOnMobile packaging, and also absorbs the latest round of patches Arnaud had to apply to clean up my mess 😅

@agx
Copy link
Collaborator

agx commented Feb 13, 2025

I wonder if it wouldn't be more suitable to require network access and fetch things via Cargo? Otherwise it is very easy to get entangled in package transitions in Debian (or needing to patch around older versions, as you can see from the patches). (This can of course be switched later on later on as well)

In e.g. xdg-desktop-portal-phosh we do the same: use Cargo + net access in CI and use packaged crates when uploading to Debian

This comment has been minimized.

This comment has been minimized.

@samcday
Copy link
Owner Author

samcday commented Feb 13, 2025

I wonder if it wouldn't be more suitable to require network access and fetch things via Cargo? Otherwise it is very easy to get entangled in package transitions in Debian (or needing to patch around older versions, as you can see from the patches). (This can of course be switched later on later on as well)

Perfect, this is much easier, thanks!

Although now the problem is, it seems that a lot of the transitive deps I need are tied up in the various librust- packages. e.g librust-libphosh-sys-dev pulls in stuff like librust-pango-sys-dev, which then finally strings along libpango1.0-dev

If I do a apt install -t trixie-nightly libphosh-dev, I end up in this situation:

PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libphosh-0.45 libphosh-0.45
Package libcallaudio-0.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcallaudio-0.1.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcallaudio-0.1', required by 'libphosh-0.45', not found
Package 'libpulse', required by 'libphosh-0.45', not found
Package 'libpulse-mainloop-glib', required by 'libphosh-0.45', not found
Package 'appstream', required by 'libphosh-0.45', not found
Package 'libsoup-3.0', required by 'libphosh-0.45', not found
Package 'gcr-3', required by 'libphosh-0.45', not found
Package 'gmobile', required by 'libphosh-0.45', not found
Package 'gnome-bluetooth-3.0', required by 'libphosh-0.45', not found
Package 'gnome-desktop-3.0', required by 'libphosh-0.45', not found
Package 'gudev-1.0', required by 'libphosh-0.45', not found
Package 'libfeedback-0.0', required by 'libphosh-0.45', not found
Package 'libnm', required by 'libphosh-0.45', not found
Package 'polkit-agent-1', required by 'libphosh-0.45', not found
Package 'mm-glib', required by 'libphosh-0.45', not found
Package 'libsecret-1', required by 'libphosh-0.45', not found
Package 'upower-glib', required by 'libphosh-0.45', not found
Package 'libcallaudio-0.1', required by 'libphosh-0.45', not found
Package 'libpulse', required by 'libphosh-0.45', not found
Package 'libpulse-mainloop-glib', required by 'libphosh-0.45', not found
Package 'appstream', required by 'libphosh-0.45', not found
Package 'libsoup-3.0', required by 'libphosh-0.45', not found
Package 'gcr-3', required by 'libphosh-0.45', not found
Package 'gmobile', required by 'libphosh-0.45', not found
Package 'gnome-bluetooth-3.0', required by 'libphosh-0.45', not found
Package 'gnome-desktop-3.0', required by 'libphosh-0.45', not found
Package 'gudev-1.0', required by 'libphosh-0.45', not found
Package 'libfeedback-0.0', required by 'libphosh-0.45', not found
Package 'libnm', required by 'libphosh-0.45', not found
Package 'polkit-agent-1', required by 'libphosh-0.45', not found
Package 'mm-glib', required by 'libphosh-0.45', not found
Package 'libsecret-1', required by 'libphosh-0.45', not found
Package 'upower-glib', required by 'libphosh-0.45', not found

Any suggestions here? I suspect you'll see this question and answer long before I figure this out myself 😅

@samcday
Copy link
Owner Author

samcday commented Feb 13, 2025

For now I'm just cargo-culting all of Phosh's build-deps. I guess keeping this list in sync won't be too onerous. Would still love to know if there's a better way to do this though :)

@agx
Copy link
Collaborator

agx commented Feb 13, 2025

I wouldn't know of a better way. It's usually a matter of listing all the non-rust deps so the crates can be built. so if you build-depend on libphosh-0.45-dev | libphosh-dev most of it should get pulled in transitive already. (Now that we target a stable API we can rename libphosh-dev in phosh upstream too, we basically didn't do it to avoid the renaming with each release).

This comment has been minimized.

Thanks Arnaud!

Signed-off-by: Sam Day <me@samcday.com>
This is the version currently packaged in Debian-trixie and Fedora.

Signed-off-by: Sam Day <me@samcday.com>
Not sure what I was really trying to achieve here. There is (hopefully)
zero people intending to run a full Phosh session on their device who
can't spare any room for Bash.

Signed-off-by: Sam Day <me@samcday.com>
Signed-off-by: Sam Day <me@samcday.com>
Debian was patching this out because it presumably breaks the build,
though I'm not really sure why? Makes me wonder if I'm not
linting/clippy-ing as hard as I could/should be... 🤔

Signed-off-by: Sam Day <me@samcday.com>
A couple more cases where we're pulling stuff from places in ::traits,
but this isn't public in the versions of gtk/libhandy that Debian
packages. Weird.

Signed-off-by: Sam Day <me@samcday.com>
Signed-off-by: Sam Day <me@samcday.com>
Signed-off-by: Sam Day <me@samcday.com>
Needed by the first-run test

Signed-off-by: Sam Day <me@samcday.com>
Signed-off-by: Sam Day <me@samcday.com>
@samcday samcday force-pushed the deb branch 2 times, most recently from 5e0088d to d77cd57 Compare February 13, 2025 18:33

This comment has been minimized.

This comment has been minimized.

@samcday
Copy link
Owner Author

samcday commented Feb 13, 2025

Hmph, well... Building the .deb in CI is failing in irritating ways that I cannot reproduce locally. So much for consistent build environments with containers... Sigh.

What I have so far builds cleanly in a pristine debian:sid container, and in a pristine debian:trixie container with Phosh nightly repo.

I'm going to just give up on the GHA workflow for now and open a follow-up issue to track that. If it's getting built regularly in phosh-debs maybe I don't care about building it here anyway 🤔

Drop all the librust deps, and use the build deps from phosh instead.

Signed-off-by: Sam Day <me@samcday.com>
Builds debs against the Phosh nightly repo

Signed-off-by: Sam Day <me@samcday.com>
Copy link

The CI build recorded and generated some videos

Demo video (shown on README and release notes)

accent-colours

emergency-calls

first-run

keypad-shuffle

simple-flow

trivial-flow

@samcday samcday merged commit c2e4514 into main Feb 13, 2025
3 checks passed
@samcday samcday deleted the deb branch February 14, 2025 11:59
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.

Upstream Debian packaging
2 participants