diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-25 08:36:33 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-25 13:19:55 (GMT) |
commit | 1eca3f0ac1ac04fde7f99cfeae2301b8a25af718 (patch) | |
tree | 6c17f7bcd292ccc0403e3476d3c88e76281ff383 /bin/createpackage.pl | |
parent | 5200f708c46d4bc737d6706691965c726c063292 (diff) | |
download | Qt-1eca3f0ac1ac04fde7f99cfeae2301b8a25af718.zip Qt-1eca3f0ac1ac04fde7f99cfeae2301b8a25af718.tar.gz Qt-1eca3f0ac1ac04fde7f99cfeae2301b8a25af718.tar.bz2 |
Only patch package content that is necessary for self-signing
Automatic patching was modifying all package files in ways that
only made sense for very limited set of projects. Some things were
also no longer necessary due other developments, so dropped
the dependency, embedded sis, and manufacturer check modifications.
Also provided an option to do a self-signed compatibility
check for the package instead of patching it automatically by
specifying "-d" parameter in QT_SIS_OPTIONS env variable
or createpackage command line, depending on how package is made.
Task-number: QTBUG-15561
Reviewed-by: axis
Diffstat (limited to 'bin/createpackage.pl')
-rwxr-xr-x | bin/createpackage.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 522d1fb..6b83585 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -82,6 +82,8 @@ Where supported options are as follows: [-s|stub] = Generates stub sis for ROM. [-n|sisname <name>] = Specifies the final sis name. [-g|gcce-is-armv5] = Convert gcce platform to armv5. + [-d|dont-patch] = Skip automatic patching of capabilities and pkg file if default certificate + is used. Instead non-self-signable capabilities just cause warnings. Where parameters are as follows: templatepkg = Name of .pkg file template target = Either debug or release @@ -127,6 +129,7 @@ my $stub = ""; my $signed_sis_name = ""; my $onlyUnsigned = ""; my $convertGcce = ""; +my $dontPatchCaps = ""; unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, @@ -135,7 +138,8 @@ unless (GetOptions('i|install' => \$install, 'o|only-unsigned' => \$onlyUnsigned, 's|stub' => \$stub, 'n|sisname=s' => \$signed_sis_name, - 'g|gcce-is-armv5' => \$convertGcce,)) { + 'g|gcce-is-armv5' => \$convertGcce, + 'd|dont-patch' => \$dontPatchCaps,)) { Usage(); } @@ -343,9 +347,13 @@ if($stub) { && !@certificates && $templatepkg !~ m/_installer\.pkg$/i && !$onlyUnsigned) { - print("Auto-patching capabilities for self signed package.\n"); my $patch_capabilities = File::Spec->catfile(dirname($0), "patch_capabilities"); - system ("$patch_capabilities $pkgoutput") and die ("ERROR: Automatic patching failed"); + if ($dontPatchCaps) { + system ("$patch_capabilities -c $pkgoutput") and print ("Warning: Package check for self-signing viability failed. Installing the package on a device will most likely fail!\n\n"); + } else { + print("Auto-patching self-signed package.\n"); + system ("$patch_capabilities $pkgoutput") and die ("ERROR: Automatic patching failed"); + } } # Create SIS. |