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

Backport g_autofd and g_clear_fd, cleanup GLib backports #1493

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

GeorgesStavracas
Copy link
Member

See commits. Nothing groundbreaking and shouldn't have any practical changes in behaviour.

@GeorgesStavracas GeorgesStavracas added this to the 1.20 milestone Oct 29, 2024
@jsparber
Copy link
Contributor

lgtm

@swick
Copy link
Contributor

swick commented Oct 29, 2024

LGTM as well

@hfiguiere
Copy link
Collaborator

if we require glib, 2.72 which long term support has it? People still run 4 year old distros...

@GeorgesStavracas
Copy link
Member Author

if we require glib, 2.72 which long term support has it? People still run 4 year old distros...

We looked at Ubuntu 22.04 which ships with GLib 2.72

@hfiguiere
Copy link
Collaborator

That's only two years old

@hfiguiere
Copy link
Collaborator

20.04 has 2.64 which is lower than what was before...

@GeorgesStavracas
Copy link
Member Author

I don't think we ever had any policy to how far back the project would support old distros. I assumed we'd support current Ubuntu LTS + previous Ubuntu LTS at most. I don't think it's practical to support anything older than the previous Ubuntu LTS version.

@GeorgesStavracas GeorgesStavracas added this pull request to the merge queue Oct 29, 2024
@GeorgesStavracas GeorgesStavracas removed this pull request from the merge queue due to a manual request Oct 29, 2024
@GeorgesStavracas GeorgesStavracas added this pull request to the merge queue Oct 29, 2024
@GeorgesStavracas GeorgesStavracas removed this pull request from the merge queue due to the queue being cleared Oct 29, 2024
This is available in Ubuntu 22.04, let's use it.
g_memdup() is unsafe, and deprecated. Use g_memdup2() instead.
Project-wide replacement of our internal macros to GLib macros.

Older GLib versions are covered by the backports of the previous
commit.

The big difference here is that g_clear_fd() takes an error, so
adapt the few callers to that.
They're not necessary now that we depend on GLib >= 2.72
@GeorgesStavracas GeorgesStavracas enabled auto-merge (rebase) October 29, 2024 18:50
@GeorgesStavracas GeorgesStavracas merged commit 6d85ca0 into flatpak:main Oct 29, 2024
5 checks passed
@GeorgesStavracas GeorgesStavracas deleted the gbsneto/gautofd branch October 29, 2024 18:55
@smcv
Copy link
Collaborator

smcv commented Oct 29, 2024

People still run 4 year old distros...

I think it's fine to say that if they do, then they can run the xdg-desktop-portal version that is supported by their distro vendor (after all, the whole point of LTS distributions is that your distro vendor will support them for some reasonable lifetime); and if that version is too old for the apps and desktop environments they want to run, then they should re-evaluate their choice of distro branch.

I would like the latest x-d-p to continue to be buildable on the latest Ubuntu LTS (released once per 2 years, in April of even-numbered years) and the latest Debian stable (released approximately once per 2 years, normally in the middle of odd-numbered years), but I don't think it's necessary to go to heroic efforts to be backportable beyond that.

As a data point, Debian 12 has GLib 2.74.x, which is slightly newer than Ubuntu 22.04. If the freeze for Debian 13 happens at around the date I expect, then it will likely have GLib 2.82.x.

We don't routinely backport a new x-d-p in https://launchpad.net/~flatpak/+archive/ubuntu/stable/+packages, mainly because x-d-p is only useful if it is accompanied by a desktop environment backend like x-d-p-gnome (or x-d-p-kde, or whatever is appropriate for the user's environment), and those tend to be too tightly coupled to the rest of the desktop environment to be useful to backport. If x-d-p offers new features, but they don't actually work because the LTS distribution's x-d-p-gnome is the same age as the rest of the LTS distribution and therefore does not implement the backend for those features, then we gain nothing by backporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

5 participants