Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] 2.1.0rc1 available for testing

Roger Light <roger@xxxxxxxxxx> writes:

> On Tue, 20 Jan 2026 at 17:47, Greg Troxel via mosquitto-dev
> <mosquitto-dev@xxxxxxxxxxx> wrote:
>
>>There are a bunch of minor things to fix
>> and I think an rc2 would be good.
>
> I think it's looking that way.

Great, thanks.  My view is that integers are cheap and there's nothing
wrong with several.

>>   - I didn't ask to test, but I got a failure because gmock was not
>>     provided.  I think this is a cmake architecture bug, where it looks
>>     in the filesystem and finds things and assumes they are part of the
>>     build environment.  (pkgsrc has compiler wrappers that hide things
>>     that are not declared dependencies, to get repeatable builds, and I
>>     expect that other packaging systems will do this too.)  The fix is
>>     to check for GTest by trying to build with it - but it is probably
>>     better to note this in the README.
>
> Testing is enabled unless you explicitly ask to turn it off, so I'd
> expect an error. If you're still getting an error using
> -DWITH_TESTS=OFF then that's definitely a concern. There's an argument
> to be made about carrying on with some tests if gmock/gtest is not
> there - I'd probably argue that if you want tests you want the whole
> lot.

Agreed if you want to test you want to test.

This was an impedance mismatch between cmake thinking and traditional
thinking.  I had no idea that tests were turned on and off how they
were, and expected that building would build, and something that sounds
like "make test" would build tests and run them.  pkgsrc uses
TEST_DEPENDS to specify packages only needed at 'make test' time; that
scheme doesn't work with cmake-time test enabling.

It's of course ok that it isn't that way - just that I was confused,
which could be me, could be a clue about others.

I suggest that README-compiling.md have a section about testing, and
replace the first line

  For testing, the following packages are required:

with something like

  mosquitto has extensive tests, and you should run them on your
  platform.  Testing or not testing is set as a cmake configure
  argument, and defaults to on.  To disable, use -DWITH_TESTS=OFF.  When
  building with tests senabled, the following packages are required:

and googletest line could be

  * googletest (also known as GTest, containing gmock/gmock.h)

because it's confusing that the cmakery to include googletest is written
GTest.

>> => Full dependency libwebsockets>=4.3.0nb1: found libwebsockets-4.3.3nb1
>
> Depending on what you want to support, libwebsockets is no longer
> required. It's not only of interest if you need to serve files over
> http. The built-in websockets support is better performance and
> integrates better with the other options like certificates, that
> libwebsockets didn't allow in the same way.

I do see that in ChangeLog.txt now that I look.  Perhaps
README-compiling.md might say

  The following used to be recommended and should not longer be used

    * libwebsockets (See 2.1.0 ChangeLog.txt)

and

  Packagers likely want to disable all bundled dependencies; this may be
  done via -DWITH_BUNDLED_DEPS=no.


>> |Provide a dir for capath, but do not set it.  (In mosquitto, having a
>> |key/cert for the server is linked to having a CA, and to treating
>> |clients with a certificate from a known CA as authorized.  This is
>> |complicated, and not about pkgsrc, and this change does not intend to
>> |step into the situation.)
>
> This has not been the case for a long time now. You only need a
> certfile and keyfile to configure a listener, unless you want client
> certificates / mutual-TLS in which case you also need to set capath /
> cafile.

Thanks.  I have not returned to that in a long time as my two production
instances have not required me to tend to them at all!  Will recheck and
clean up.


Back to the top