Skip to content

meson: add patch to add distconfdir and change upstream to commit#962

Closed
JustSoup312 wants to merge 1 commit intoAerynOS:2025-05-repo-rebuildfrom
JustSoup312:meson-distconfdir
Closed

meson: add patch to add distconfdir and change upstream to commit#962
JustSoup312 wants to merge 1 commit intoAerynOS:2025-05-repo-rebuildfrom
JustSoup312:meson-distconfdir

Conversation

@JustSoup312
Copy link
Copy Markdown

@JustSoup312 JustSoup312 commented Jul 30, 2025

Adds a flag to define the distconfdir in packaging. This is an important part of getting statelessness support into upstreams.

The GitHub release of Meson is slightly different from the tag itself, so switching to the top commit of the tag fixes the patch.

Collaboration with @ermo.

This is my first time handling stone packaging, so if I messed anything up, please tell me.

@JustSoup312 JustSoup312 requested a review from a team as a code owner July 30, 2025 00:58
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 30, 2025

CLA assistant check
All committers have signed the CLA.

@JustSoup312 JustSoup312 changed the title meson: add patch to add destconfdir and change upstream to commit meson: add patch to add distconfdir and change upstream to commit Jul 30, 2025
@ermo
Copy link
Copy Markdown
Member

ermo commented Jul 30, 2025

@JustSoup312 The patch as-is is technically correct.

However, our custom is to create a ./pkg dir in the recipe folder next to the stone, save and commit the patch there and then reference it as %(pkgdir)/<the patch>

You can then add the URI to the patch in a comment over the patch itself along with whatever commentary seems reasonable, which makes it easy for the next committer to update the patch from the source URI given on a meson update.

So something like this:

    setup       : |
        # hermetic-usr patch adding the 'distconfdir' build-time configuration variable as an alternative to 'sysconfdir'
        # upstream: https://gitlab.postmarketos.org/JustSoup321/hermetic-patches/-/raw/trunk/build-system-patches/meson/meson-1.8.2-distconfdir.patch
        %patch %(pkgdir)/meson-%(version)-distconfdir.patch

This ensures that even if we move our tree elsewhere (or you do), this version of meson will continue to build, as long as the upstream tarball is available.

@ReillyBrogan
Copy link
Copy Markdown
Member

Is there a PR for getting this into upstream meson? This honestly seems pointless to me without that, why would meson-using projects bother merging our distconfdir patches if support for it wasn't available in other distros meson packages?

@ReillyBrogan
Copy link
Copy Markdown
Member

@JustSoup312 The patch as-is is technically correct.

However, our custom is to create a ./pkg dir in the recipe folder next to the stone, save and commit the patch there and then reference it as %(pkgdir)/<the patch>

You can then add the URI to the patch in a comment over the patch itself along with whatever commentary seems reasonable, which makes it easy for the next committer to update the patch from the source URI given on a meson update.

So something like this:

    setup       : |
        # hermetic-usr patch adding the 'distconfdir' build-time configuration variable as an alternative to 'sysconfdir'
        # upstream: https://gitlab.postmarketos.org/JustSoup321/hermetic-patches/-/raw/trunk/build-system-patches/meson/meson-1.8.2-distconfdir.patch
        %patch %(pkgdir)/meson-%(version)-distconfdir.patch

This ensures that even if we move our tree elsewhere (or you do), this version of meson will continue to build, as long as the upstream tarball is available.

It would be very unusual to rename the patch after every meson update. Just name it distconfdir.patch or the PR ID of the upstream PR it represents (so upstream-10001.patch if the PR was ID 10001).

Adds a flag to define the distconfdir in packaging. This is an important
part of getting statelessness support into upstreams.

The GitHub release of Meson is slightly different from the tag itself,
so switching to the top commit of the tag fixes the patch.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
@JustSoup312
Copy link
Copy Markdown
Author

Is there a PR for getting this into upstream meson? This honestly seems pointless to me without that, why would meson-using projects bother merging our distconfdir patches if support for it wasn't available in other distros meson packages?

@ermo believed it best to do a patch first but I would prefer getting the patch into meson. I just don't know if they will accept it without a usecase

@ReillyBrogan ReillyBrogan deleted the branch AerynOS:2025-05-repo-rebuild April 8, 2026 04:43
@ermo
Copy link
Copy Markdown
Member

ermo commented Apr 9, 2026

@JustSoup312 Just a quick note that I have not forgotten, nor given up on this.

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.

4 participants