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 patches for macOS? #18

Open
theory opened this issue Oct 3, 2018 · 6 comments
Open

Add patches for macOS? #18

theory opened this issue Oct 3, 2018 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@theory
Copy link
Owner

theory commented Oct 3, 2018

Look at the changes required for PL/Perl and PL/TCL on macOS 10.14 “Mojave”. Pretty annoying. The next releases of currently-supported versions of Postgres will include this fix, but not older versions, of course. Do we need to create patches for those versions?

To that end, do we need to formalize a patching process? Right now we just patch 8.0 and 8.1, but it's feasible we'll need to create and maintain patches for other versions. Perhaps we should create some formal process. Maybe something like creating a patch directory structure? That's fine for targeting specific versions, or major versions, but what about a case like this, where a fix will be in a core release soon, and we won't need to apply the patch for those newer versions? Maybe create some sort of mapping file?

@theory theory added enhancement New feature or request help wanted Extra attention is needed labels Oct 3, 2018
@fluca1978
Copy link
Collaborator

One quick and dirty solution could be to implement an hierarchy of directories lead by exact PostgreSQL version and containing patches to apply against.
Something like:

patches/
            8.4.0/
           8.4.1/
          8.4.2/

This would make really easy to find out if the building version requires to be patched and with which files. On the other hand, I suspect some patches could be applied to multiple versions (e.g., 8.4 branch) and therefore the above approach will lead to duplication of patches. Making a patch-chain sounds a little too complicated for, ehm, a shell script, and is probably out of scope for pgenv.
I would propose a "by-version" approach as detailed before, in the case it is fine, please assign the issue and I will submit a proposal.

@theory
Copy link
Owner Author

theory commented Oct 10, 2018

Yeah, lotta duplication, though. Another approach would be to have a directory with all the patches, and then a lookup table for each version listing the patches that need to be applied. Would be a big table, potentially, but it could be put in a separate file and loaded only when doing a build.

@fluca1978
Copy link
Collaborator

What about a "system V" approach? A single directory with all the patches, and a set of per-version directories with links to the files in the main directory. Will resolve duplication and prevents for having a table, something I believe a script is not so able to work with.
We could also build a per-version, per-os level of directories and links to customize as much as possible the process.

@theory
Copy link
Owner Author

theory commented Oct 14, 2018

That's not a bad idea, though maybe per-version files listing the required patches would be better, since then we don't have to worry about the portability of symlinks.

@fluca1978
Copy link
Collaborator

Forgot to mention this issue in my pull request, please see #20.

@fluca1978
Copy link
Collaborator

Since #20 has been merged, can we close the ticket or are going to keep open to remind us to add patches in the code base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants