r19370@cathode-dark-space: kpkoch | 2007-03-31 23:28:07 -0400
Target_Version: 1.6.1
Ticket: 5490
Tags: pullup
Correct directory structure in zip files.
Make main config file match today's usage & implementation wrt /sign.
Clean staging area before using it.
Just clean output area instead of removing it.
Clean ziptemp area after each zip.
ticket: 5490
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19386
dc483132-0cff-0310-8789-
dd5450dbe970
<clean value="0" />\r
<nomake value="0" />\r
<nopackage value="0" />\r
- <sign value="0" timestampserver="" />\r
+ <sign value="0" />\r
<verbose value="0" />\r
<vverbose value="0" />\r
</Options>\r
<File dummy="foo" />\r
<!-- File from paths are relative to <src>/pismere. -->\r
<!-- File to paths are relative to <out>. -->\r
- <File name="msi-deployment-guide.txt" from="staging\install\wix\" to="" />\r
- <File name="netidmgr_userdoc.pdf" from="staging\doc" to="." />\r
- <File name="kfw.msi" from="staging\install\wix\" to="" newname="%filestem%.msi" />\r
+ <File name="msi-deployment-guide.txt" from="staging\install\wix\" to="" />\r
+ <File name="netidmgr_userdoc.pdf" from="staging\doc" to="." />\r
+ <File name="kfw.msi" from="staging\install\wix\" to="" newname="%filestem%.msi" />\r
<File name="MITKerberosForWindows%-DEBUG%.exe" from="staging\install\nsis" to="" newname="%filestem%%-DEBUG%.exe" />\r
+ <File name="relnotes.html" from="staging\doc" to="." />\r
</Files>\r
</CopyList>\r
</PostPackage>\r
# We put the staging area in the fixed area .../pismere/staging.\r
my $prepackage = $config->{Stages}->{PrePackage};\r
my $staging = "$wd\\staging";\r
- chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";\r
- if ($verbose) {print "Info -- chdir to $wd\n";}\r
- (-e $staging) or mkdir($staging);\r
+ chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";\r
+ print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
+ !system("rm -rf $staging/*") or die "Fatal -- Couldn't clean $staging.";\r
+ !system("rmdir $staging") or die "Fatal -- Couldn't remove $staging.";\r
+ mkdir($staging) or die "Fatal -- Couldn't create $staging.";\r
\r
# Force Where From and To are relative to:\r
$prepackage->{CopyList}->{Config}->{From}->{root} = "$wd\\athena";\r
# Begin packaging extra items:\r
chdir($src); # Now in <src>.\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- system("rm -rf $out") if (-d $out);\r
- die "Fatal -- Couldn't remove $out." if (-d $out);\r
- mkdir($out);\r
+ if (-d $out) {!system("rm -rf $out/*") or die "Fatal -- Couldn't clean $out."} ## Clean output directory.\r
+ else {mkdir($out);}\r
my $zipsXML = $config->{Stages}->{PostPackage}->{Zips};\r
\r
local $i = 0;\r
while ($zipsXML->{Zip}[$i]) {\r
local $zip = $zipsXML->{Zip}[$i];\r
- makeZip($zip, $config) if (exists $zip->{name}); ## Ignore dummy entry.\r
+ makeZip($zip, $config) if (exists $zip->{name}); ## Ignore dummy entry.\r
+ chdir("$out");\r
+ print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
+ system("rm -rf ziptemp") if (-d "ziptemp"); ## Clean up any temp directory.\r
$i++; \r
- } ## End zip in xml.\r
- \r
- $ziptemp = "$out\\ziptemp"; ## Clean up any temp directory.\r
- chdir("$out");\r
- print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- system("rm -rf $ziptemp") if (-d $ziptemp);\r
+ } ## End zip in xml.\r
\r
$config->{Stages}->{PostPackage}->{CopyList}->{Config} = $config->{Stages}->{PostPackage}->{Config}; ## Use the post package config.\r
$config->{Stages}->{PostPackage}->{CopyList}->{Config}->{From}->{root} = "$src\\pismere";\r
# because the CopyList's Config might contain substitution tags.\r
$zip->{CopyList}->{Config}->{FileStem}->{name} = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name};\r
$zip->{CopyList}->{Config}->{From}->{root} = "$src\\pismere"; ## Add zip-specific config settings.\r
- $zip->{CopyList}->{Config}->{To}->{root} = "$ziptemp\\$zip->{topdir}";\r
+ $zip->{CopyList}->{Config}->{To}->{root} = $ziptemp;\r
copyFiles($zip->{CopyList}, $config);\r
# Drop down into <out>/ziptemp so the path to the added file won't include <out>:\r
chdir $ziptemp;\r
local $template2 = $template;\r
$template2 =~ s/%filename%/$target/;\r
print "Info -- Signing $target\n" if ($verbose);\r
- !system($template2) or die "Fatal -- Error signing $target.";\r
+ !system("$template2") or die "Fatal -- Error signing $target.";\r
}\r
}\r
$ENV{PATH} = $savedPATH;\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8" ?>\r
- <Files>\r
- <!-- File from paths are relative to <src>/pismere. -->\r
- <!-- File to paths are relative to <out>. -->\r
- <File dummy="foo" /> <!-- Forces XML::Simple behavior -->\r
- <!-- Without this, XML::Simple does not make an anonymous array and I can't figure out how to iterate over it. -->\r
-\r
- <File name="config_1033.wxi" from="athena\auth\krb5\src\windows\installer\wix\lang\" to="\install\wix\lang" />\r
- <File name="strings_1033.wxl" from="athena\auth\krb5\src\windows\installer\wix\lang\" to="\install\wix\lang" />\r
- <File name="ui_1033.wxi" from="athena\auth\krb5\src\windows\installer\wix\lang\" to="\install\wix\lang" />\r
- <File name="license.rtf" from="athena\auth\krb5\src\windows\installer\wix\lang\" to="\install\wix\lang" />\r
- <File name="krb5.conf" from="athena\auth\krb5\src\config-files\" to="\sample" newname="krb5.ini"/>\r
- </Files>
\ No newline at end of file