[Pkg-mozext-commits] [adblock-plus] 42/464: Allow signing parameters to be specified in the file .signature rather than requiring a separate script.
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 4a673c0fdd7c2d7d645cd0a8df0a4f5f848be6bf
Author: Wladimir Palant <trev at adblockplus.org>
Date: Sun Jul 5 08:57:55 2009 +0200
Allow signing parameters to be specified in the file .signature rather than requiring a separate script.
---
Packager.pm | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/Packager.pm b/Packager.pm
index 349f94b..6ec597a 100644
--- a/Packager.pm
+++ b/Packager.pm
@@ -415,17 +415,30 @@ sub makeXPI
}
}
- if (-f 'sign.pl')
+ if (-f '.signature')
{
- system($^X, 'sign.pl', 'tmp', 'temp_xpi_file.xpi');
- }
- else
- {
- chdir('tmp');
- print `zip -rDX ../temp_xpi_file.xpi @files`;
- chdir('..');
+ my $signData = $self->readFile(".signature");
+ my ($signtool) = ($signData =~ /^signtool=(.*)/mi);
+ my ($certname) = ($signData =~ /^certname=(.*)/mi);
+ my ($dbdir) = ($signData =~ /^dbdir=(.*)/mi);
+ my ($dbpass) = ($signData =~ /^dbpass=(.*)/mi);
+
+ system($signtool, '-k', $certname, '-d', $dbdir, '-p', $dbpass, 'tmp');
+
+ # Add signature files to list and make sure zigbert.rsa is always compressed first
+ opendir(local *METADIR, 'tmp/META-INF');
+ unshift @files, map {"META-INF/$_"} sort {
+ my $aValue = ($a eq 'zigbert.rsa' ? -1 : 0);
+ my $bValue = ($b eq 'zigbert.rsa' ? -1 : 0);
+ $aValue <=> $bValue;
+ } grep {!/^\./} readdir(METADIR);
+ closedir(METADIR);
}
+ chdir('tmp');
+ print `zip -rDX9 ../temp_xpi_file.xpi @files`;
+ chdir('..');
+
$self->fixZipPermissions("temp_xpi_file.xpi") if $^O =~ /Win32/i;
rename("temp_xpi_file.xpi", $xpiFile);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list