Skip to content

[ubu24/22] add system libcivetweb#116

Draft
ferdymercury wants to merge 2 commits into
root-project:mainfrom
ferdymercury:patch-1
Draft

[ubu24/22] add system libcivetweb#116
ferdymercury wants to merge 2 commits into
root-project:mainfrom
ferdymercury:patch-1

Conversation

@ferdymercury

Copy link
Copy Markdown
Contributor

No description provided.

@ferdymercury

Copy link
Copy Markdown
Contributor Author

@linev ubu26 passed the httpserver test, should we enable now the other ubuntus and see?
https://github.com/root-project/root/actions/runs/26145752669/job/76900908168?pr=21947

@linev

linev commented May 20, 2026

Copy link
Copy Markdown
Member

Important test is still missing - with WebSocket.
Let me try to implement it before we enable more platforms.

@ferdymercury

Copy link
Copy Markdown
Contributor Author

Important test is still missing - with WebSocket.

Should we also add sth like this, after a system-wide civetweb is found?

if (civetweb_FOUND)
  get_target_property(CIVETWEB_DEFS civetweb::civetweb-c INTERFACE_COMPILE_DEFINITIONS)
  if(NOT "USE_WEBSOCKET" IN_LIST CIVETWEB_DEFS)
    message(STATUS "Force-enabling builtin_civetweb since found system-wide version does not include websocket component")
    set(builtin_civetweb FORCE ON)
  endif()
endif()

@linev

linev commented May 20, 2026

Copy link
Copy Markdown
Member

Should we also add sth like this, after a system-wide civetweb is found?

If it works - yes.
Without WebSocket support use of external civetweb makes no sense.

@ferdymercury

Copy link
Copy Markdown
Contributor Author

If it works - yes.

Attempt here: root-project/root@f04d8ae

@ferdymercury

ferdymercury commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

If it works - yes.

what I initially suggested does not work, but I've fixed it now here:
root-project/root@77492ec

Question: apart from websocket, do we mandatorily need to check for some extra features that are off by default?

For example, Ubuntu 22 returns 151 as bit mask (in the PR now printed by ROOT configure script to terminal), which means https, cgi, websocket are enabled but ipv6, zlib, serverstats, uselua and useduktape are disabled.

       The value is a bit mask. The individual bits are defined as:
         1  serve files (NO_FILES not set)
         2  support HTTPS (NO_SSL not set)
         4  support CGI (NO_CGI not set)
         8  support IPv6 (USE_IPV6 set)
        16  support WebSocket (USE_WEBSOCKET set)
        32  support Lua scripts and Lua server pages (USE_LUA is set)
        64  support server side JavaScript (USE_DUKTAPE is set)
       128  support caching (NO_CACHING not set)
       256  support server statistics (USE_SERVER_STATS is set)
       512  support for on the fly compression (USE_ZLIB is set)

In Ubuntu 26 it's 158, so IPV6 enabled there in contrast to ubu22

@ferdymercury
ferdymercury marked this pull request as ready for review May 20, 2026 15:42
@linev

linev commented May 20, 2026

Copy link
Copy Markdown
Member

SSL is optional and not directly used in the root
But civetweb has extra feature to support unix sockets - see in cmake:

target_compile_definitions(RHTTP PRIVATE -DUSE_X_DOM_SOCKET)

It is important and used by rootssh utility.

@ferdymercury

Copy link
Copy Markdown
Contributor Author

support unix sockets

Detection fixed now via root-project/root@e1c7d63

@ferdymercury

Copy link
Copy Markdown
Contributor Author

@tillea would it be possible to add

-DCIVETWEB_ENABLE_X_DOM_SOCKET=ON
To
https://salsa.debian.org/med-team/civetweb/-/blob/master/debian/rules?ref_type=heads#L21
?

It's required so that ROOT does not need to build its own copy

Thanks in advance

@ferdymercury
ferdymercury marked this pull request as draft May 21, 2026 20:20
@tillea

tillea commented May 22, 2026

Copy link
Copy Markdown

@tillea would it be possible to add

-DCIVETWEB_ENABLE_X_DOM_SOCKET=ON To https://salsa.debian.org/med-team/civetweb/-/blob/master/debian/rules?ref_type=heads#L21 ?

Sure its possible: https://salsa.debian.org/med-team/civetweb/-/commit/7562286db61418a43dd111df331161b5f106bd25

The "traditinal" way to request such things is to file a bug report via reportbug - but well I just did it.

Is your request urgent and should I upload this change soonish?

Kind regards, Andreas.

@ferdymercury

ferdymercury commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

The "traditinal" way to request such things is to file a bug report via reportbug

Ahh ok, i will note it down, sorry

Is your request urgent and should I upload this change soonish?

It's not urgent, thanks a lot anyway for the prompt reply

@tillea

tillea commented May 22, 2026

Copy link
Copy Markdown

Ahh ok, i will note it down, sorry

No need to sorry - just mentioning it since this results in a better documentation from the Debian side. If some change in a package closes a bug this is documenting the change in a standard way.

It's not urgent, thanks a lot anyway for the prompt reply

Feel free to let me know if it becomes urgent. ;-)

ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 3, 2026
@linev

linev commented Jun 8, 2026

Copy link
Copy Markdown
Member

I add several basic tests for THttpServer - including websocket and unix socket test.
So one can now add system-wide civetweb and see how it behaves

@ferdymercury

Copy link
Copy Markdown
Contributor Author

So one can now add system-wide civetweb and see how it behaves

Thanks Sergei.
Is there a way to modify packages.txt to install the Ubuntu civetweb system package from the 'unstable' Debian channel? Otherwise it will still have XDOM sockets off.

@linev

linev commented Jun 8, 2026

Copy link
Copy Markdown
Member

Is there a way to modify packages.txt to install the Ubuntu civetweb system package from the 'unstable' Debian channel? Otherwise it will still have XDOM sockets off.

I have no idea how it works with Debian package manager.

@ferdymercury

ferdymercury commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Sure its possible: https://salsa.debian.org/med-team/civetweb/-/commit/7562286db61418a43dd111df331161b5f106bd25

@tillea sorry, I just noticed that, for this to work,
we would need also that this post 1.16 patch is backported into the Debian repo:
civetweb/civetweb@08b7241 (or this one for a clean patch without conflicts ferdymercury/civetweb@c501621)

Or alternatively, temporarily add a flag to the gcc compilation options as done eg in opensuse: https://code.opensuse.org/package/civetweb/blob/master/f/civetweb.spec#_80

ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 30, 2026
… and bump to 1.16

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 30, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 30, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 30, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
ferdymercury added a commit to ferdymercury/root that referenced this pull request Jun 30, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
@tillea

tillea commented Jul 1, 2026

Copy link
Copy Markdown

Sure its possible: https://salsa.debian.org/med-team/civetweb/-/commit/7562286db61418a43dd111df331161b5f106bd25

@tillea sorry, I just noticed that, for this to work, we would need also that this post 1.16 patch is backported into the Debian repo: civetweb/civetweb@08b7241 (or this one for a clean patch without conflicts ferdymercury/civetweb@c501621)

Or alternatively, temporarily add a flag to the gcc compilation options as done eg in opensuse: https://code.opensuse.org/package/civetweb/blob/master/f/civetweb.spec#_80

Any chance to rather tag a new upstream release? This would be more convenient than assembling a lot of patches.

@ferdymercury

Copy link
Copy Markdown
Contributor Author

Any chance to rather tag a new upstream release?

That's currently blocked by: civetweb/civetweb#1351 (comment)

(Which is why openSuse has switched to a git commit version rather than a specific version https://build.opensuse.org/requests/1354158)

ferdymercury added a commit to ferdymercury/root that referenced this pull request Jul 2, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
ferdymercury added a commit to ferdymercury/root that referenced this pull request Jul 2, 2026
…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL

disable SSL dynamic loading

fix openssl include

fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
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.

3 participants