pull up r19370 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 2 Apr 2007 20:46:27 +0000 (20:46 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 2 Apr 2007 20:46:27 +0000 (20:46 +0000)
 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

src/windows/build/BKWconfig.xml
src/windows/build/bkw.pl
src/windows/build/makeZip.pl
src/windows/build/signFiles.pl
src/windows/build/srcfiles.xml [deleted file]

index 111aaa60134cae0348656fb7b4cbd7e642382c2c..37c1a5c43be80c3335249ad0dd772832a9dcce98 100644 (file)
@@ -21,7 +21,7 @@
             <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
index 95b7dc12b8a217d03b4e90a3b6f09b8201d9afb1..7c25399aa09b48a7dd66843c28b819e6396a2c4c 100644 (file)
@@ -465,9 +465,11 @@ print Dumper($prunes);
         #  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
@@ -550,22 +552,19 @@ print Dumper($prunes);
 # 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
index e54f5a83168f92d8e555ee4aaef50afec2791177..a805b745386b27d45fa1898770baf5729b2aea89 100644 (file)
@@ -57,7 +57,7 @@ sub makeZip {
     #  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
index 058eff2a46f53c9e56117788a0e3e09bd7d2863a..d2ffb2c0e3541408024fea7e6359782349d330f0 100644 (file)
@@ -18,7 +18,7 @@ sub signFiles {
             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
diff --git a/src/windows/build/srcfiles.xml b/src/windows/build/srcfiles.xml
deleted file mode 100644 (file)
index 58b58af..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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