Commit Graph

85 Commits

Author SHA1 Message Date
hjk
5b8b585d04 RemoteLinux: Rename RsyncDeployStep into GenericDeployStep
It's handling several options nowadays.

Change-Id: Iee599489521c7cb6fa7ec5e28739f7a5ef9bbd8e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-06 11:15:25 +00:00
hjk
1700355534 RemoteLinux: Try better wording for upload options
The actual deploy method is not really fixed until the step starts
running.

Task-number: QTCREATORBUG-29710
Change-Id: Ide4f76b1270f1e998dfac516ae101ddf6f4cebed
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-06 11:11:07 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
Jarek Kobus
ef005dd56e RemoteLinux: Unexport some classes
And move them into Internal namespace.

Change-Id: Ic3cc92b8250413f46f597f99fe0f1e4c8ef68950
Reviewed-by: hjk <hjk@qt.io>
2023-07-25 10:00:43 +00:00
Jarek Kobus
d171e6da69 AbstractRemoteLinuxDeployStep: Make some overrides final
Move some methods into protected section.
Do some cleanup.

Change-Id: Ica6f6fd181334c450666049c10d9ecc1ea16ea5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-11 09:10:52 +00:00
Jarek Kobus
02ffee322b AbstractRemoteLinuxDeployStep: Make recipe return GroupItem
There is no need for extra nested Group item in deployRecipe()
overloads, as sometimes it's just one task, like in case of
QdbStopApplicationStep or CustomCommandDeployStep.

Change-Id: I89cdb703c24198f3cbdfb17d0317e40f1929c376
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-11 08:02:46 +00:00
Jarek Kobus
a119242771 AbstractRemoteLinuxDeployStep: Get rid of run preparer
Make it a part of isDeploymentNecessary() instead.

Change-Id: I73bda4f75b94222b6e9475b13a373f7237969999
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-09 18:39:43 +00:00
Jarek Kobus
243341df46 AbstractRemoteLinuxDeployStep: Get rid of CheckResult
Use expected_str<void> instead.

Change-Id: I93518da9ba9393a3db84aefeb9edd164cd830d42
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-09 18:39:14 +00:00
hjk
79bf7873bd RemoteLinux: More direct aspect use in RsyncDeployStep
Change-Id: Iaa34dba82189f78e88dd09585ada9b36ec3f2852
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-05 11:15:48 +00:00
Marcus Tillmanns
ee2fa69def RemoteLinux: Generalize deploy step
Instead of three different deploy steps we use only the RSyncDeployStep
which can be configured to each of the three file transfer methods.

The SupportsRSync constant is moved to projectexplorer so that it can be
used by all devices.

The RSyncDeployStep checks which transfer method is available based on
source and target devices. An option is added for the user to force
a different method in case of issues.

Change-Id: I2b1eb39b5bd4a30d0f879d18317b7677d127f48f
Reviewed-by: hjk <hjk@qt.io>
2023-06-23 07:57:23 +00:00
Marcus Tillmanns
68b750d83d RemoteLinux: Use FilePath to create directories
Change-Id: I90986632fd601b588f7ca0459b5eb62ac2379d97
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-06-22 08:47:27 +00:00
Jarek Kobus
d97d3f58ac TaskTree: Rename TaskItem into GroupItem
Not all classes derived from TaskItem are tasks,
but the common denominator is that all may be placed
inside a group: thus GroupItem sounds more appropriate.

Addresses the 10th point in the bugreport below.

Task-number: QTCREATORBUG-28741
Change-Id: I94d728a8e39ec732810f2e5bbe6b9a76f3bc387c
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-06-06 09:06:01 +00:00
Jarek Kobus
f84199f8b7 Solutions: Long live Solutions!
Short live Tasking in Solutions!

Add src/libs/solutions/README.md with the motivation and hints.

Move TaskTree and Barrier from Utils into Tasking object lib,
the first solution in Solutions project.

Tasking: Some more work is still required for adapting auto and
manual tests. Currently they use Async task, which stayed in Utils.
For Qt purposed we most probably need to have a clone of
Async task inside the Tasking namespace that is more Qt-like
(no Utils::FutureSynchronizer, no priority field,
global QThreadPool instead of a custom one for Creator).

Change-Id: I5d10a2d68170ffa467d8c299be5995b9aa4f8f77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 06:29:03 +00:00
Jarek Kobus
97a66067bb TaskTree: Prepare for de-utils-ization - part 2
Move TaskTree into Tasking namespace.
Move Tasking namespace out of Utils namespace.

Change-Id: Ib4c1d7f54f1808517e54768dfa27209c33517b61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:19 +00:00
Jarek Kobus
2bec94ea58 Tasking::Transfer: Rename Transfer into FileTransferTask
Rename TransferTest into FileTransferTestTask.
Rename adapters accordingly.

Task-number: QTCREATORBUG-29102
Change-Id: I50c8b8d64abd7d3063044eaf2e0daceb01e8d388
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 06:07:30 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Jarek Kobus
1d69f943aa Tasking::Process: Rename Process into ProcessTask
Rename QtcProcessAdapter into ProcessTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I1902c7176da75db60d70125f505084a2ea5ba774
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:24 +00:00
hjk
2c3373172b RemoteLinux: Simplify RsyncDeployStep implementation
Change-Id: Ife6eb2d1f7ab2202e7ddc6c13c68f3ed09403553
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 11:51:04 +00:00
hjk
2534226d26 RemoteLinux: Move RSyncDeployStep implementation out of sight
Not needed publicly anymore.

Change-Id: I07f36c2fb7f4f42a970c43a4c7ad957b0b1dfce1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 14:33:52 +00:00
hjk
62b1795fb0 RemoteLinux: Further disantangle buildsteps from downstream
Expose Factories, (mid term:) hide step implementations.

Change-Id: I930899fe6873c8f727f3dedbb86aceb9bcbda0a4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-28 09:49:52 +00:00
hjk
64e40631ec RemoteLinux: Inline a few more deploy step functions
Change-Id: Ib93562b24de796f570cfa76dd3990ede5ebc6061
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 10:55:02 +00:00
hjk
c6b6e5b0c6 RemoteLinux: Drop some in-class signalling
Not needed since the deploy step and service hierarchy merge.

Change-Id: I644bdeca31caa2182b9d618e5f1ec6865c95f4c8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 07:22:50 +00:00
hjk
a4ed630c7d RemoteLinux/Boot2Qt: Merge DeployStep and DeployService hierarchies
They were 1:1 now.

The change here is as small as possible, there are quite a few places
to clean up left.

Change-Id: I4f78d1de857b93d8372e2592a7723b02fe2fc947
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 07:16:54 +00:00
hjk
930cbdf68b RemoteLinux: Merge abstractremotelinuxdeploy{step,service} file pairs
Plan is to merge the class hierarchies, this is a mechanical first step.

Change-Id: I163578297a4badb5b8c861283f0d6a44c25f124f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-27 12:30:20 +00:00
hjk
15f33422cb RemoteLinux: Be a bit more verbose when rsync fails
Change-Id: Ibd049c67b5e6ab3d6526a35762f842819ef2f668
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-25 07:04:44 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
f2f1b7c2d7 AbstractRemoteLinuxDeployService: Refactor API
Instead of implementing two virtual methods:
- doDeploy
- stopDeployment
provide just one to be implemented:
- deployRecipe

The new method returns task tree description enclosed in
Group recipe. The abstract deploy service constructs the
TaskTree when needed, applies the recipe and starts the tree.

Change-Id: I36e52935f98736dafeea6be32fde5595410db077
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-25 13:33:47 +00:00
Jarek Kobus
0a925009a1 RemoteLinux: Fix const correctness
Amends c88a829059
Amends f9b4bcd3d8

Change-Id: Ia9817d4f7ba7df495e55e8729ba34258c907a545
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-25 09:28:41 +00:00
Jarek Kobus
c88a829059 RsyncDeployService: Reuse TaskTree
Change-Id: I411726e47550da5fd3269fcbb3e4f3e19096adeb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 15:12:14 +00:00
Jarek Kobus
d2b887cfad RsyncDeployService: Remove setFinished()
Use stopDeployment() instead. Simplify file transfer's
done handler.

Change-Id: Ib43d95c1498be590d1557fbe4fcaf2f2e79d08fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 10:50:35 +00:00
hjk
bf57568880 RemoteLinux: Fix RsyncDeployService::setDeployableFiles()
It previously did not set, but appended.

Amends 515845b815.

Change-Id: Ida3bd66e188ad4b1bbf0ea7686ac101a3f61c28e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-17 10:28:31 +00:00
hjk
9e4eabb410 RemoteLinux: Dissolve AbstractRemoteLinuxDeployStep::createDeployService
The previous setup doesn't buy much in comparison to new + setDeployService()
combo. Making that explicit now opens the path to simplify the two-phase
creation (i.e. move setInternalInitializer to the service c'tor).

Change-Id: Ib66c7d02efcddd6909fe612a786034e2728cdedf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-14 09:12:40 +00:00
hjk
541ddd1ff7 RemoteLinux: Be explicit about the current rsync support
We currently only transfer host->remote device (or back),
not host->host or remote->remote. Inform the user if we
hit an (currently) unsupported combination.

Change-Id: Icd33414d7d0bc2b5db284a62b5d757989f1596c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-13 14:01:08 +00:00
Ari Parkkila
d22fba5d7f Enable deploy step via rsync for Boot2Qt target
Fixes: QTCREATORBUG-24731
Change-Id: I1a4aaa9f653d42e89488b1790d9ddd10d3fb49dc
Reviewed-by: hjk <hjk@qt.io>
2022-10-13 06:04:38 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
hjk
ea1b35584d RemoteLinux: Streamline RsyncDeployStep interface
Change-Id: I5b5945758d4d188887e8724c09272f0fd9867c60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-02 08:50:26 +00:00
hjk
e9d6c0f154 RemoteLinux: Streamline RsyncDeployStep interface
Change-Id: I5aa5ff477d1c654fd502575c32af667e436a2129
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-31 16:41:06 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
23d9ef1adb RemoteLinux: Convert to Tr::tr
Change-Id: I1c541d392992fb37acecbb98f331e01d7b73fbc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-22 11:11:48 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
hjk
eb411dfeb0 RemoteLinux: Fix rscync deploystep with multiple dirs
This was quoting them into a single argument, failing if there was more
than one.

Change-Id: Idc099970f3b747918adf7559b95e749940aad11a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-17 12:16:09 +00:00
Jarek Kobus
a7fa8c46ee LinuxProcessInterface: Fix error reporting on failed to start
Change-Id: I2af4a13289458e6270452a254cf90f7bd9cc3684
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-31 08:12:48 +00:00
Jarek Kobus
7d848364ff Move FileTransfer into ProjectExplorer plugin
Make it ready for providing implementations for other devices.

Change-Id: I14eaf167a7b2c1189f4d23f2e9f556204295b9b3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-30 10:10:33 +00:00
Jarek Kobus
87f3e7563c Ssh: Rename SshConnectionParameters into SshParameters
Move it to its own header.
Get rid of SshConnection and SshConnectionManager,
as they are not used anymore.

Change-Id: I52fe20d7816ea57e7a7158ab2ae9565d50a76e21
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-23 12:03:39 +00:00
Jarek Kobus
29a62ff35c RsyncDeployStep: Get rid of unused methods
Change-Id: If597b7cca7a5913c2c9bab663ddd4fcd098deb59
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-23 11:54:36 +00:00
Jarek Kobus
dcc93253c8 FileTransfer: Add some static helpers
Change-Id: Ie22e7ecce52b308df32316ff85d4744bd26060b0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 12:55:20 +00:00
Jarek Kobus
515845b815 RsyncDeployStep: Use FileTransfer for rsync
Instead of constructing custom ssh command.
Create the mkdir process on stack.

Change-Id: I3944ec4e2979b820a40971a8836e36084a44902a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 10:19:29 +00:00
Jarek Kobus
7cca6cd718 FileTransfer: Make the usage more convenient
Prepare the API for rsync implementation.

Change-Id: I13b7def31c2e2b1460d18340f6bd7cbd8e0e9434
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 17:27:29 +00:00