summaryrefslogtreecommitdiff
path: root/bin/createpackage.pl
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-25 10:36:33 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-25 15:19:55 +0200
commit1eca3f0ac1ac04fde7f99cfeae2301b8a25af718 (patch)
tree6c17f7bcd292ccc0403e3476d3c88e76281ff383 /bin/createpackage.pl
parent5200f708c46d4bc737d6706691965c726c063292 (diff)
downloadqt4-tools-1eca3f0ac1ac04fde7f99cfeae2301b8a25af718.tar.gz
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-xbin/createpackage.pl14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 522d1fbc82..6b835854c2 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.