Thread: meson and sslfiles.mk in src/test/ssl/

meson and sslfiles.mk in src/test/ssl/

From
Michael Paquier
Date:
Hi all,

While playing with the SSL tests last week, I have noticed that we
don't have a way to regenerate the SSL files with meson for its TAP
suite.  It seems to me that we had better transfer the rules currently
stored in sslfiles.mk into something that meson can use?

Another approach may be to keep sslfiles.mk around, still allow meson
to invoke it with a specific target?  I am not exactly sure how this
would be handled, but it looks like a transfer would make sense in the
long-term if we target a removal of the dependency with make.

Thoughts are welcome.
--
Michael

Attachment

Re: meson and sslfiles.mk in src/test/ssl/

From
Peter Eisentraut
Date:
On 21.02.23 00:54, Michael Paquier wrote:
> While playing with the SSL tests last week, I have noticed that we
> don't have a way to regenerate the SSL files with meson for its TAP
> suite.  It seems to me that we had better transfer the rules currently
> stored in sslfiles.mk into something that meson can use?
> 
> Another approach may be to keep sslfiles.mk around, still allow meson
> to invoke it with a specific target?  I am not exactly sure how this
> would be handled, but it looks like a transfer would make sense in the
> long-term if we target a removal of the dependency with make.

I think the tradeoff here is, given how rarely those rules are used, is 
it worth maintaining duplicate implementations or complicated bridging?

It's clearly something to deal with eventually, but it's not high priority.




Re: meson and sslfiles.mk in src/test/ssl/

From
Jacob Champion
Date:
On Wed, Feb 22, 2023 at 5:40 AM Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
> I think the tradeoff here is, given how rarely those rules are used, is
> it worth maintaining duplicate implementations or complicated bridging?
>
> It's clearly something to deal with eventually, but it's not high priority.

Yeah... in the same vein, I originally thought that I'd need to
quickly add VPATH support to sslfiles.mk, but it seems like it just
hasn't been a problem in practice and now I'm glad I didn't spend much
time on it.

I'm happy to contribute cycles to a Meson port when you're ready for
it. From a skim it seems like maybe in-source generation isn't a focus
for Meson [1]. They might encourage us to write custom Python for it
anyway?

--Jacob

[1] https://github.com/mesonbuild/meson/issues/5434



Re: meson and sslfiles.mk in src/test/ssl/

From
Andres Freund
Date:
Hi,

On 2023-02-22 09:42:54 -0800, Jacob Champion wrote:
> I'm happy to contribute cycles to a Meson port when you're ready for
> it. From a skim it seems like maybe in-source generation isn't a focus for
> Meson [1]. They might encourage us to write custom Python for it anyway?

You'd normally just invoke commands for updating sources as run_target()s, not
custom targets. Or generate them in the build tree via custom_target() and
then copy to the source tree via a run_target().

For this case I think it'd suffice to add a run target that does something
like
make -C ~/src/postgresql/src/test/ssl/ -f ~/src/postgresql/src/test/ssl/sslfiles.mk sslfiles OPENSSL=openssl

obviously with the necessary things being replaced by the relevant variables.


sslfiles.mk doesn't depend on the rest of the buildsystem, and is a rarely
executed command, so I don't see a problem with using make to update the
files. At least for a long while.

Greetings,

Andres Freund



Re: meson and sslfiles.mk in src/test/ssl/

From
Michael Paquier
Date:
On Wed, Feb 22, 2023 at 11:33:09AM -0800, Andres Freund wrote:
> sslfiles.mk doesn't depend on the rest of the buildsystem, and is a rarely
> executed command, so I don't see a problem with using make to update the
> files. At least for a long while.

Agreed to keep things simple for now, even if it means an implicit
dependency to make for developers.
--
Michael

Attachment