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

Update libglnx subtree to 2024-04-20 #1

Draft
wants to merge 9 commits into
base: libglnx-into-subtree
Choose a base branch
from

Conversation

smcv
Copy link
Owner

@smcv smcv commented May 2, 2024


Normally this would be a pull request against flatpak/flatpak branch main, but I've generated this one against smcv/flatpak branch libglnx-into-subtree to illustrate what a subtree update would normally look like to reviewers.

smcv and others added 9 commits February 22, 2024 12:45
flatpak-builder does this.

Signed-off-by: Simon McVittie <[email protected]>
Recent versions of openSUSE default to using -Werror=return-type for
package builds, which results in all of these function checks
incorrectly detecting the function as not being available.

Co-authored-by: Peng Yi
Resolves: https://gitlab.gnome.org/GNOME/libglnx/-/issues/4
Signed-off-by: Simon McVittie <[email protected]>
backports: Avoid warnings for g_steal_fd when targeting older GLib

See merge request GNOME/libglnx!56
backports: Add a fallback definition for G_PID_FORMAT

See merge request GNOME/libglnx!55
build: Fix function detection when using -Werror=return-type

Closes flatpak#4

See merge request GNOME/libglnx!57
This will allow it to be re-added as a `git subtree`, which stores
commit history inline in the flatpak git repository.

Signed-off-by: Simon McVittie <[email protected]>
…39841d1210b'

This makes the flatpak project more self-contained, and would have
avoided the problems we encountered with unintended changes in the
1.14.7 release. See <https://diziet.dreamwidth.org/14666.html> for an
opinionated description of some of the problems with submodules.

If we can eliminate submodules altogether, then it will become possible
to build Flatpak from a simple `git clone` or `git archive`, or from the
source tarballs auto-generated by Github (which are equivalent to a `git
archive`), without needing an extra step to populate the submodules. As
well as reducing the support burden from users periodically complaining
that our source releases are incomplete, this is a useful "nothing up
my sleeve" mechanism to make it easy to verify that our source releases
do not contain malicious changes hidden in vendored or generated files,
like the one that made CVE-2024-3094 possible.

Added with:

    git remote add --no-tags libglnx https://gitlab.gnome.org/GNOME/libglnx.git
    git fetch libglnx
    git subtree add -P subprojects/libglnx 202b294

To compare with upstream:

    git remote add --no-tags libglnx https://gitlab.gnome.org/GNOME/libglnx.git
    git fetch libglnx
    git diff HEAD:subprojects/libglnx libglnx/master

After checking the diff, updates can be merged into this project with:

    git subtree merge -P subprojects/libglnx libglnx/master

The commit merged here is the same one that was previously a submodule.
A subsequent commit will update it to the latest version of libglnx,
demonstrating how to review such updates.

git-subtree-dir: subprojects/libglnx
git-subtree-mainline: 7df25d6
git-subtree-split: 202b294
  * Fix function detection when using -Werror=return-type
    (Resolves: flatpak#5778)
  * Add a fallback definition for G_PID_FORMAT
  * Avoid warnings for g_steal_fd() when targeting older GLib

This commit was created via:

    git remote add --no-tags libglnx https://gitlab.gnome.org/GNOME/libglnx.git
    git fetch libglnx
    git diff HEAD:subprojects/libglnx libglnx/master
    git subtree merge -P subprojects/libglnx libglnx/master
    git commit --amend -s

Signed-off-by: Simon McVittie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant