summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * add missing tr for "AlreadyRunning" messageboxKatja Marttila2016-05-191-2/+2
| | | | | | | | | | | | Change-Id: Icffe886597a1f18d9eaacf1e3a14f31e252919c6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
| * Do not force doc build on Linux when calling "make install"Iikka Eklund2016-05-161-6/+0
| | | | | | | | | | Change-Id: I7081e43810ec8c05c75f6772140e1a464dbc08ad Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Doc: Fix PackageManagerCore::ComponentType briefLeena Miettinen2016-05-131-1/+1
| | | | | | | | | | | | | | | | The \enum command \brief commands do not seem to get automatically completed during builds anymore. Change-Id: Id81aa8f3044f6151d6b4d8a441e386deb0ca4844 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: Fix link to Supported Platforms in Qt Reference DocsLeena Miettinen2016-05-131-1/+1
| | | | | | | | | | | | | | | | The module name is needed, because there is a Supported Platforms section in this Manual, too. Change-Id: I3d77c89a2afc006d6e423d21ee46e7fbfee2058b Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: Describe return values for boolean Component functionsLeena Miettinen2016-05-131-2/+11
| | | | | | | | | | | | | | ...to suppress QDoc warnings. Change-Id: Ib79b0392efaed37b4a52932d4f7d98327a3ad306 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Doc: PackageManagerCore::ComponentType is now an enumLeena Miettinen2016-05-131-27/+21
| | | | | | | | | | | | | | Change the documentation accordingly. Change-Id: I2f15bf724558794b66e99eab1120dc2d224600de Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Update changelog2.0.3Katja Marttila2016-05-021-0/+3
| | | | | | | | | | Change-Id: I31ddb526ec76b4b28a457dbb95b1809fb5425395 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
| * Cleanup Japanese translation (12 obsolete).Takayuki ORITO2016-04-291-71/+0
| | | | | | | | | | | | | | Remove 12 obsolete messages in ja.ts. Change-Id: I2d514b93056f5755760ff4eb1b44e36923b01f1c Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
| * Update Japanese translation (new 2).Takayuki ORITO2016-04-291-0/+8
| | | | | | | | | | | | | | | | Update new 2 messages in ja.ts. Change-Id: Ifde5277b4ec968472831c46a940480471dec33dd Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Niels Weber <niels.weber@qt.io>
| * Fix the exception message because missing a space.Takayuki ORITO2016-04-291-1/+1
| | | | | | | | | | | | | | Added space between 'convert' from 'path'. Change-Id: I25f4eedc7d322d29c8c93dd7dd80fc13232de0b7 Reviewed-by: Niels Weber <niels.weber@qt.io>
| * Make IFW compile with FreeBSDKatja Marttila2016-04-262-1/+14
| | | | | | | | | | | | | | Change-Id: Ibebc25b738c843c0eb4291faa2bba7ac9836b008 Task-number: QTIFW-841 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
| * Fix MSVC2015 build.Rafael Roquetto2016-04-182-2/+2
| | | | | | | | | | Change-Id: I502e48dea6329bd6f05a776a669093f41698a274 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
| * Update minimum Qt version for 2.0.3 releaseKatja Marttila2016-03-223-48/+8
| | | | | | | | | | | | | | Minimum required version is now Qt5.5 Change-Id: If000a507f0067650605987d38374bf6694eb16aa Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Update version number for 2.0.3 releaseIikka Eklund2016-03-225-7/+13
| | | | | | | | | | | | | | Also update the Changelog. Change-Id: I2a74edd32783bdfb01d4706dcbc2d3ae78ac5069 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Revert "Use QQmlV4Function to correctly get empty parameters from script."Katja Marttila2016-02-177-175/+58
| | | | | | | | | | | | | | | | | | | | | | This reverts commit eb574d77b0ab9a92b61e7738d089cd4ea4304e51. The change will not work with Qt5.5 as it is causing constant crashes in Qt installers. Using this change will require a fix for Qt5. As we are about to make Qt installers based on 2.0 we need to revert this change for now. Change-Id: Ia7906d02db645f2407ab07d14f5a037224574b29 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Fix crash when updating admin installation with user/temp repositoryKatja Marttila2016-02-151-1/+10
| | | | | | | | | | | | | | | | Grant permission rights for writing maintenance config file Change-Id: I9364358455b8ad5e98b03c20d949c2562ba2535a Task-number: QTIFW-740 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
| * Compile with Qt 5.5, 5.6. Minimum version is now 5.5.Karsten Heimrich2016-01-212-4/+4
| | | | | | | | | | Change-Id: I60d248ea38e8176e18a9b2a642e81a0ad5fb21d3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Fix compile with namespace'ed Qt.Karsten Heimrich2016-01-213-10/+4
| | | | | | | | | | Change-Id: I9c0d399943d2f6eb9a0ab136abf24a5c8b108abb Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
| * Update Changelog for version 2.0.2Iikka Eklund2016-01-211-0/+14
| | | | | | | | | | | | Change-Id: Ic7900dec6db93ecab54bb60685326226127ce20a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Allow signing maintenancetool in WindowsKatja Marttila2016-06-214-15/+42
| | | | | | | | | | | | | | | | | | Signing was not possible for maintenancetool since metadata was added to binary. Separated metadata to installer.dat like in OS X. Task-number: QTIFW-667 Change-Id: I74ef307c51a2f43059475dd943d6f0910925fa86 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Fix cancel button functionality in Settings->Repositories->TestKatja Marttila2016-06-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | When pressing cancel button when testing repositories, the dialog pops up again and again. Cancel the TestRepository job if cancel button is pressed. Change-Id: I48da41a8b791bf04571acd8af4a421b11e0fccc7 Task-number: QTIFW-832 Reviewed-by: Niels Weber <niels.weber@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Introduced gui.setTextItems() methodFrerich Raabe2016-06-155-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This utility function can be used to populate a Qt control which is backed by some QAbstractItemModel with a list of strings. E.g. this can be used to populate a QComboBox or any QAbstractItemView with some items. This is very useful since in many cases, the methods for adding elements to such controls are neither slots, nor marked with Q_INVOKABLE and such unreachable from the script code. Change-Id: I2195f41e53765ef3a798477ed08d8f09ab5c4379 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Store lock files in temporary directoryFrerich Raabe2016-06-152-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory in which the application is stored may not be writable for the current user, e.g. if the installer is stored on a read-only network drive, or (common case on OS X) if the installer bundle is started from a read-only .dmg image. This fixes warnings in the verbose output (especially noticeable during unattended installations) like: [0] Warning: Cannot create lock file "/Volumes/froglogic Squish/Install Squish.app/Contents/MacOS/Squish1234865.lock": Read-only file system The patch is defensive in that it just uses QDir::tempPath() instead of going for QTemporaryFile to avoid having to worry about auto-delete semantics. Change-Id: Iee2409dd6f884c4fe234057b2926eee82127f985 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Vertical layout for LicenseAgreement pageKatja Marttila2016-06-131-4/+4
| | | | | | | | | | | | | | | | | | | | License agreement was hard to read and the title sometimes needed scrolling. Make the layout vertical so there is more room for license title and license agreement text. Change-Id: I46a9d4880b0219a2a92af19a8f17a39ba53faf6a Task-number: QTIFW-815 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix qml includeKatja2016-06-011-1/+1
| | | | | | | | | | | | | | | | This is needed for QV4::Object usage. Missing include was causing compile errors in Qt5.7. Change-Id: Idf9cc6dafedb54be4cb02f12176b31c794b592fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | add NOMINMAX to fix compile with Qt5.7 in WindowsKatja Marttila2016-05-201-2/+3
| | | | | | | | | | | | Task-number: QTIFW-854 Change-Id: I73cb2a40d59803050c1b8f729e22a4caebcab724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Revert "Windows: Fix crashes in elevated installation"Katja Marttila2016-05-205-80/+4
| | | | | | | | | | | | | | | | This reverts commit 95ae661cba931a982d12cd68d8b4da392d74bdd0. As we now require at least Qt5.5.0 we don't need this workaround Change-Id: I6ab930886bc9af0716a61a8e21b12db83018b0c2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Make usage of authorization fallback optionalSlobodan Vrkacevic2016-05-1810-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asking users to use the authorization fallback in case of authorization errors might be a bit problematic in some cases. If the users are not familiar with the concept, running: "<installer_exe> --startserver PRODUCTION,{GUID},{GUID}" from command line might be confusing or difficult. Also it might not help at all. So let's make this optional. If the config variable DisableAuthorizationFallback is set to true the installer will not ask users to run the authorization fallback but instead it will abort the installation immediately. In RemoteClient this is implemented by adding a new function called setAuthorizationFallbackDisabled. The init function could be also extend for this but the config settings are not loaded at the time when the function is called. Change-Id: I4baf1dea34c5cc0016e98df47a9492ee1418c5ee Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Doc: Fix path to includes directoryLeena Miettinen2016-05-121-2/+1
| | | | | | | | | | Change-Id: Idf76961685cdc1c1460f5a3d94b10e2830a1eb35 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix building with ICC on WindowsKatja Marttila2016-05-031-1/+1
| | | | | | | | | | | | | | Task-number: QTIFW-851 Change-Id: Ic92e24cc2d5046aca3ec81843c00aa3c52288a4d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Add the Predefined Variables in Component Scripting.Takayuki ORITO2016-05-032-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add variables - ApplicationsDirX86 - ApplicationsDirX64 Change that the application directory can be selected on Windows, don't depend on the architecture(32bit or 64bit) of QtIFW. For example: When on Windows(64bit version). - QtIFW(32bit version) - ApplicationsDir -> C:\Program Files (x86) - ApplicationsDirX86 -> C:\Program Files (x86) - ApplicationsDirX64 -> C:\Program Files - QtIFW(64bit version) - ApplicationsDir -> C:\Program Files - ApplicationsDirX86 -> C:\Program Files (x86) - ApplicationsDirX64 -> C:\Program Files Change-Id: Idbc41d6f1ba9d7b0b9a9ff5590d05077662345cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Niels Weber <niels.weber@qt.io> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Fixed detecting problems while launching sudoFrerich Raabe2016-05-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The installer would always consider the exit status of the sudo process, but if executing sudo itself fails (e.g. because the file does not exist, or because of insufficient permissions), a success exit status (zero) was returned. Fix this by rather returning the (negative) errno value in case anything goes wrong with execve. Change-Id: Iac5051e998982c6a31fa49cb6f4290cf66050c44 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fixed (and greatly simplified) creating .dmg filesFrerich Raabe2016-04-083-79/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mkdmg.sh script which is used to create .dmg files made some effort to calculate the size of the file system contained in the .dmg file. However, it neglected to consider that a .dmg file is not always (never?) totally empty. A sample session on OS X 10.10.5 shows: $ hdiutil create /tmp/foo.dmg -megabytes 33 -ov -volname foo -type UDIF -fs HFS+ ... <a lot more dots here> created: /tmp/foo.dmg $ hdid /tmp/foo.dmg /dev/disk3 GUID_partition_scheme /dev/disk3s1 Apple_HFS /Volumes/foo $ df /Volumes/foo Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on /dev/disk3s1 67504 1584 65920 3% 196 8240 2% /Volumes/foo About 792kB are apparently used for bookkeeping (in ".Trashes" and ".fseventsd") directories. Since mkdmg.sh failed to account for these 792kB, the .dmg file it creates was occasionally too small, causing an error message to be printed by the 'cp' command in the mkdmg.sh script (but that error message was never printed anywhere, at least I never noticed when executing binarycreator - always only when running mkdmg.sh directly). Instead of fixing the allocated size, let's just make use of the '-srcfolder' argument to 'hdiutil create' which does all of this automatically. It requires no copying around or calculating sizes, which not only makes the script much simpler, it also avoids the above-mentioned issue but also makes the script run faster: about 30% faster in my experiments. With this, the mkdmg.sh script is so small (just one hdiutil and one rm call) that we may just as well drop it completely and perform those operations straight from the C++ code. A final nice side-effect is that '-srcfolder' can be specified multiple times: this makes it very easy to copy multiple directory trees in the resulting .dmg file. This in turn is useful to create nicely styled .dmg files with custom background image and icon arrangements. Change-Id: I54d63a00e56d1ee9fa61c2690ca42d512fda37b1 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fixed handling of Destroy command in server processFrerich Raabe2016-04-071-2/+2
| | | | | | | | | | | | | | | | | | Destroying QProcess or QAbstractFileEngine objects never worked, since the code for deciding what type of object is to be destroyed confused the 'type' with the 'command'. Change-Id: I8d6c6bf2f11ff82cfbd744c43fcc91d234967b69 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Add a logging category and debug for http downloadKatja Marttila2016-04-073-2/+21
| | | | | | | | | | | | | | | | | | | | | | Sometimes installing fails due to a problem in server. Since downloading can happen from mirror, it is hard to detect where the problem is. Print the IP address where the download actually happens to ease the problem solving. Change-Id: I31e15c2b1926745c251093cd1663d1ca1c65bff6 Task-number: QTIFW-813 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Tests: Fix scriptengine testChristian Stenger2016-03-313-2/+4
| | | | | | | | | | Change-Id: I288f366785c72da49087cb688f7f1247c2494c99 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Make communication via installer.execute() Unicode safeKarsten Heimrich2016-03-308-5/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was impossible to pass Unicode data safely to a process started via installer.execute(), or to read Unicode data printed by that process safely back in. The reason for this is that the code hardcoded the latin1 codec for converting between strings used in the script interpreter and bytes used by the QProcessWrapper API. Fix this by adding two new optional arguments to installer.execute() which can be used to define the codec to be used for writing to stdin resp. reading from stdout. This defaults to latin1 for backwards compatibility. Change-Id: I290d8d9617b286ef90b2f0a05c6e7a47f6df317f Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Frerich Raabe <raabe@froglogic.com>
* | Fix failing auto-test.Karsten Heimrich2016-03-231-1/+4
| | | | | | | | | | Change-Id: If948400f15f9dcb43e4f47293ee58428993375f7 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Fix warning introduced with commit 175ffec58f9.Karsten Heimrich2016-03-231-8/+9
| | | | | | | | | | | | Change-Id: I922e572e246abfbd0647216a0134df615d36b484 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Fix compilation, we depend on network for QLocalSocket.Karsten Heimrich2016-03-231-1/+1
| | | | | | | | | | Change-Id: I1ef2da40f3565abff3f1e4d0f802cfb7c2e4dfdb Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Fixed file handle leak when sudo'ingFrerich Raabe2016-03-041-1/+1
| | | | | | | | | | | | | | | | The write handle of the stderr pipe was closed in the parent process further up already. What's left to close is the read handle. Change-Id: I988c5334edb2df002cb29b1f2d47fb34eb284185 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Allow specifying the installer size in 'em' or 'ex' unitsSlobodan Vrkacevic2016-02-298-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WizardDefaultWidth and WizardDefaultHeight configuration settings always expected pixel values. This made the installer look somewhat awkward on high DPI displays, in which case the ratio between the font size and the installer window size was such that the fonts looked very big. Let's fix this by allowing to specify the width/height of the installer using units which are defined in terms of the font size, namely 'em' ("The width of the letter M") and 'ex' ("The width of the letter x"). 'px' is supported as well and means the same thing as not specifying any unit at all: the given size is defined in pixels. We choose to *not* use the font width for 'em' and 'ex' to be consistent with what the Qt CSS parser does (see src/gui/text/qcssparser.cpp), which adheres to what the W3C document at https://www.w3.org/WAI/GL/css2em.htm describes. Change-Id: Iaeb5a29c79d437ef4b956cb318158181f6289ec9 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Fixed deleting files when uninstalling on OS XFrerich Raabe2016-02-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninstalling packages on OS X didn't seem to work very reliably, it often (always?) seemed to not remove a couple of files. When clicking the 'Show Progress' button while uninstalling, it became apparent that the paths to all the files to remove were computed wrongly: instead of deleting e.g. the file /tmp/installdir/foo.txt The uninstaller attempted to remove /tmp/installdir/Uninstall.app/foo.txt What happens is when uninstalling, the ExtractArchiveOperation class (which performs deletion of installed files in its 'undoOperation' reimplementation) reads the files which were installed from the XML markup embedded in the maintenance tool binary (this happens in UpdateOperation::fromXml()). The paths to the files which were installed make use of a special '@RELOCATABLE_PATH@' placeholder which denotes the effective installation directory. This placeholder is meant to be replaced with the actual installation directory, which is assumed to be the directory where the maintenance tool resides, i.e. what QCoreApplication::applicationDirPath();. On OS X however, the maintenance tool is an app bundle, i.e. the actual binary is not in /tmp/installdir/Uninstall but rather /tmp/installdir/Uninstall.app/Contents/MacOS/Uninstall The code already called the QInstaller:isInBundle() utility function to handle this case, but did so wrongly: isInBundle() returns the directory to the app bundle, i.e. /tmp/installdir/Uninstall.app What we want though is just '/tmp/installdir'. Hence, let's go one directory up. Change-Id: I927a453d7fbdd1048ff3d2172bd3cfec3a563b4a Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | fix banner sizeKatja Marttila2016-02-291-2/+9
| | | | | | | | | | | | | | | | | | | | If WizardDefaultSize was not set, banner size was zero. In this commit default banner size to page size if WizardDefaultSize is not set. Also resize banner only when it is found to avoid warning messages in console. Change-Id: If47f947b134714ae935d80bc3074226763ca8ea7 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fix arguments in RegisterFileTypeKatja Marttila2016-02-295-22/+175
| | | | | | | | | | | | | | | | | | | | When using RegisterFileType, argumens include progId. Removed it from arguments and saved as member variable. This way progId won't interfere argument check count and it can be used also in undo operation. Change-Id: Ic80a54a28b5e171a5d4e3023b58eb1636a16fa49 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fixed reading stderr output of sudoFrerich Raabe2016-02-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the sudo process finished, we need to make sure to read any buffered bytes from the stderr pipe. Without this, the stderr data which was shown in the message box often ended up being incomplete. For instance, three failures to enter the correct root password would show a message box saying Sorry, try again. Sorry, try again. Instead of Sorry, try again. Sorry, try again. Sorry, try again. sudo: 3 incorrect password attempts Change-Id: Ib1e7aa40d95f9bf140ba1978fdb9be92cad926b6 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Don't print error messages in case correct sudo password is enteredFrerich Raabe2016-02-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Any stderr data printed by 'sudo' was always printed as part of an error message box, even if sudo succeeded. This issue is triggered very easily by entering a wrong root password first, and then the correct password on the second try. Let's just print stderr data in case we have some *and* in case 'sudo' returns a non-zero return code. Change-Id: Icbb2d31cdf5c4d5d20ed4200553e9bf7e2b5bedd Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* | Fixed checking exit status when calling 'sudo'Frerich Raabe2016-02-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few closely related issues in how the code tried to decide whether running 'sudo' succeeded: The first issue I noticed was that in some cases, the wait() call would fail with ECHILD. What happened was that the waitpid() call noticed that the sudo process terminated and reaped the zombie. Then, the loop was left and wait() was called on the PID again -- at this point, there was no child with that PID anymore though. The user-visible consequence of this was that the authentication was incorrectly considered to have failed, and a "Cannot get authorization" dialog was shown even though the correct root password was entered. No matter whether wait() failed or not, the code would try to use the WIFEXITED() and WEXITSTATUS() macros to interpret the last status. This caused some reading of uninitialized memory (as Valgrind pointed out), since WIFEXITED() may only be called in case wait() succeeded. Furthermore, as wait(2) explains: WEXITSTATUS(status) returns the exit status of the child. [..] This macro should be employed only if WIFEXITED returned true. This patch fixes all these problems by a) not calling wait() again but rather using the status which was fetched by waitpid() and b) only using the W* macros if it's legal to do so (i.e. waitpid() succeeded). Change-Id: I81741898dc686bb2d2128fceb9e71535fab43417 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Add new '--sign' switch to binarycreator for signing OS X app bundlesFrerich Raabe2016-02-182-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces -s/--sign switches for binarycreator which are only available on OS X. Using these switches, a 'Code Signing Identity' can be configured which should be used for signing the generated .app bundle. Signing the application bundles avoids that Apple's Gatekeeper complains about the application coming from an unidentified publisher. Change-Id: I507c6cac0b99faf19faf48c21e47a2df054b0b11 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Fix setValue saving in restartKatja Marttila2016-02-153-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When running maintenancetool and installing a component that sets a value in installscript with setValue, the value is cleared when pressing 'Restart'. Task-number:QTIFW-504 Change-Id: Ie588b6f1011d7b50b771ea8ee0dea99350f65878 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>