Unsolved Qt Deploy Symbolic Link to Remote Target
-
Hi,
I'm trying to deploy a symbolic link to my remote device.
I configured my .PRO as follows:
rc5File.path = /etc/rc5.d rc5File.extra = ls INSTALLS += rc5File initFile.path = /etc/init.d initFile.files += qt initFile.extra = cd $(INSTALL_ROOT)$$rc5File.path && ln -sf ../init.d/$$initFile.files S50$$initFile.files INSTALLS += initFile
But when I deploy to the IDE the symbolic link is not sent to the target device.
There is no error in the compilation process and neither in the deployment process.The interesting thing is that, when I perform a "make install" with INSTALL_ROOT configured for a tmp directory that I created in my build folder, the symbolic link is created correctly in the target folder.
Is there an extra step I should take or can this only be done by the "Run custom remote command" in the project tab?
Thank you for your help!
-
@Matheus-da-Silva-Ribeiro said in Qt Deploy Symbolic Link to Remote Target:
But when I deploy to the IDE the symbolic link is not sent to the target device.
About what IDE are you talking exactly? In case of QtCreator it has its own deployment settings in the Project-Tab and thus ignores some features specified in the .pro file.
-
@Matheus-da-Silva-Ribeiro
I'm afraid I know nothing about the installer, so this may not be helpful/relevant. But are you aware that your command (assuming it's acceptable to the installer) will fail if you do not have root permission to write into$(INSTALL_ROOT)$$rc5File.path
ifINSTALL_ROOT
is, say,/
or empty, where it may have permission if it is, say,/tmp
?If you want to know whether that command is being executed and whether it might be erroring, since your line already requires the installer to execute it via the shell you might try one of
initFile.extra = cd $(INSTALL_ROOT)$$rc5File.path && ln -sf ../init.d/$$initFile.files S50$$initFile.files >& /tmp/installer.log initFile.extra = ( cd $(INSTALL_ROOT)$$rc5File.path && ln -sf ../init.d/$$initFile.files S50$$initFile.files ) >& /tmp/installer.log
(or with further info like echoing the paths) to see if the output file gets created/contains any message?
-
Hello @raven-worx !
I am aware that the Project tab has settings that are not part of the .PRO settings and I use this feature to perform processes on my own machine exclusively, but the .PRO I share via Git with my Jenkins server and that is what I need perform some processes that are not in .PRO, because today I execute these commands through the Project tab.
I know that custom settings, such as extra steps in the build, run and deploy process, performed on the Project tab are not linked to .PRO, being linked to .pro.user, so my Jenkins server is unable to perform the actions described there because my process does not consider the .pro.user.
I've read countless forums talking about types of deploy to symbolic link or the deployment process simply, but certain nuances, like the one I'm trying to find out, which I believe other people already needed and were unable to, can be done directly on .PRO.
I believe that the most difficult I had already achieved, because I can generate the symbolic link through the .PRO, I just can't execute the deploy for some reason, I couldn't understand why the IDE doesn't add the link in the list of objects to be copied to the device.
I appreciate your help!
-
Hello @JonB!
Yes, I use root access on my device and even write other files in the / etc directory.
I ran the command you suggested, but the installer.log file for some reason I don't know is not created, either on my machine or on the device.
But as I mentioned before, when I perform a "make install" on my machine with INSTALL_ROOT configured for a tmp directory that I created in my build folder, the symbolic link is created correctly in the target folder.
I believed that all the content generated within this folder would be the content that the deployment process would send to the device, but this situation seems to show that it is not quite like that.
08:22:48: The process "/usr/bin/make" exited normally. 08:22:48: The remote file system has 12338 megabytes of free space, going ahead. 08:22:48: Deploy step finished. 08:22:48: Trying to kill "/opt/MyProject/bin/MyProject" on remote device... 08:22:49: Remote application killed. 08:22:49: Deploy step finished. 08:22:49: 13 file(s) need to be uploaded. 08:22:49: sftp> -mkdir / 08:22:49: sftp> -mkdir /etc 08:22:49: sftp> -mkdir /scripts 08:22:49: sftp> -mkdir /opt 08:22:49: sftp> -mkdir /etc/init.d 08:22:49: sftp> -mkdir /etc/udev 08:22:49: sftp> -mkdir /etc/network 08:22:49: sftp> -mkdir /opt/MyProject 08:22:49: sftp> -mkdir /etc/udev/rules.d 08:22:49: sftp> -mkdir /opt/MyProject/bin 08:22:49: sftp> -mkdir /opt/MyProject/bin/lang 08:22:49: sftp> -mkdir /opt/MyProject/bin/Hashes 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/build/qt /etc/init.d/qt 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/build/autonet.rules /etc/udev/rules.d/autonet.rules 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/build/interfaces /etc/network/interfaces 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/scripts/touchscreen_env.sh /scripts/touchscreen_env.sh 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/lang/en_US.qm /opt/MyProject/bin/lang/en_US.qm 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/lang/es_ES.qm /opt/MyProject/bin/lang/es_ES.qm 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/lang/pt_BR.qm /opt/MyProject/bin/lang/pt_BR.qm 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/build/.commit /opt/MyProject/bin/.commit 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/Hashes/en_US.qm.sha /opt/MyProject/bin/Hashes/en_US.qm.sha 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/Hashes/es_ES.qm.sha /opt/MyProject/bin/Hashes/es_ES.qm.sha 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/Hashes/MyProject.sha /opt/MyProject/bin/Hashes/MyProject.sha 08:22:49: sftp> put /home/matheus.r/Projetos/Qt/MyProject/src/Hashes/pt_BR.qm.sha /opt/MyProject/bin/Hashes/pt_BR.qm.sha 08:22:49: sftp> put /home/matheus.r/Projetos/Build/build-MyProject-POKY_1_6_1-Release/MyProject /opt/MyProject/bin/MyProject 08:22:50: All files successfully deployed. 08:22:50: Deploy step finished. 08:22:50: Elapsed time: 00:04.
But the symbolic link generated by the process performed in the add-on is not on this list.
I believe that some command line is missing for the deployment to be executed.
I appreciate your help!
-
When I add the "Run custom remote command" in the Project tab, after the deployment process the commands that I want to be executed, occur successfully.
I would like the same process to be performed via .PRO settings.
09:23:52: All files successfully deployed. 09:23:52: Deploy step finished. 09:23:52: Starting remote command "cd /etc/rc5.d/ && ln -sf /etc/init.d/qt S50qt"... 09:23:52: Remote command finished successfully. 09:23:52: Deploy step finished. 09:23:52: Elapsed time: 00:04.
-
On my folder:
-rwxrwxr-x 1 matheus.r matheus.r 1707 out 16 16:05 qt
lrwxrwxrwx 1 matheus.r matheus.r 14 out 17 09:00 S50qt -> /etc/init.d/qtIf on .PRO:
rc5d.path = /etc/rc5.d rc5d.files += S50qt INSTALLS += rc5d
But...
09:52:17: The process "/usr/bin/make" exited normally. 09:52:17: The remote file system has 12338 megabytes of free space, going ahead. 09:52:17: Deploy step finished. 09:52:17: Trying to kill "/opt/MyProject/bin/MyProject" on remote device... 09:52:18: Remote application killed. 09:52:18: Deploy step finished. 09:52:18: 14 file(s) need to be uploaded. 09:52:18: Local file "/home/matheus.r/Projetos/Build/build-MyProject-POKY_1_6_1-Release/S50qt" does not exist. 09:52:18: Deploy step failed. Error while building/deploying project MyProject (kit: POKY 1.6.1) When executing step "Upload files via SFTP" 09:52:18: Elapsed time: 00:11.