Details
-
Epic
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5
-
None
-
CMake-ify 3rdparty update
Description
At present we handle updates to third-party software mostly manually.
In at least some cases, an update consists of downloading a zip-file, tar-ball or similar blob, unpacking it and then copying the files we need from it into the Qt source tree.
There may be some scripts to be run in between; these may automate the copying in some cases, or replace it with edits to source files; but the process for each third-party component is unique, different and all too often at least party in the minds of particular developers who might not always be available to do the updates.
For example, for PCRE, we have a script src/3rdparty/pcre2/import_from_pcre2_tarball.sh that now automates this; in some other cases (e.g. see qtbase/utils/unicode/, qtbase/utils/locale_database/) we have a ReadMe file of one kind or another to guide those doing updates, possibly supported by usage instructions in helper scripts. (In other cases, we have undocumented helper scripts lying around with no hint to how to use them; or scripts with instructions that, if followed, produce diffs that reveal that they have not played a part in updates for long enough to induce scepticism about the prudence of running them.)
In many cases this could plausibly be automated within CMake, albeit probably as a stand-alone project rather than integrated into the general Qt build system. Where there are existing helper scripts, some of these may simply be transcribed to CMake code; for the rest, CMake can at least package the recommended way to go about running the scripts.
This would make third-party updates more uniform, for those doing them, reduce the amount of ad hoc process involved and widen the pool of developers who can take care of such updates. It would also capture more of the quirks currently known to particular developers that have done updates in the past, in a form that would facilitate future updates of those particular developers drop out of the Qt project; and the CMake scripts would be good places for the further comments relating to what to do, and what to check, after the automated parts have run their course.
It may be constructive to create a Wiki page (in suitable categories and linked from suitable other pages of the Wiki) providing guidance on how to port a third-party update process to CMake, e.g. giving recipes for how to download a file from a known-in-advance URL, how to tell CMake unpack the more common container files (zip, tar, ...; and how to control where they get unpacked), how to configure lists of files to be copied around, and so on.