update-packaging does not work with MozillaBuild

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

update-packaging does not work with MozillaBuild

Michael Kaply-2
I'm trying to build update-packaging and it is failing with MozillaBuild.

The problem appears to be that the packaging scripts specify bash:

#!/bin/bash

http://lxr.mozilla.org/mozilla/source/tools/update-packaging/make_full_update.sh#1

And bash is not included with MozillaBuild

I tried changing them to /bin/sh and that caused other problems.

Has anyone tried doing the update-packaging with MozillaBuild?

Mike Kaply
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: update-packaging does not work with MozillaBuild

bes.wll (Bugzilla)
Michael Kaply wrote:

> I'm trying to build update-packaging and it is failing with MozillaBuild.
>
> The problem appears to be that the packaging scripts specify bash:
>
> #!/bin/bash
>
> http://lxr.mozilla.org/mozilla/source/tools/update-packaging/make_full_update.sh#1 
>
>
> And bash is not included with MozillaBuild
>
> I tried changing them to /bin/sh and that caused other problems.
>
> Has anyone tried doing the update-packaging with MozillaBuild?
>
> Mike Kaply

There is a bash included in the latest MSYS distribution.

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82724

Maybe it is worth trying?
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: update-packaging does not work with MozillaBuild

John Clizbe-3
In reply to this post by Michael Kaply-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Kaply wrote:
> I'm trying to build update-packaging and it is failing with MozillaBuild.
>
> The problem appears to be that the packaging scripts specify bash:
>
> #!/bin/bash
>
> http://lxr.mozilla.org/mozilla/source/tools/update-packaging/make_full_update.sh#1
>
> And bash is not included with MozillaBuild

MSYS' default sh is bash (2.04), but bash.exe is not present in the default install

$ sh --version
GNU bash, version 2.04.0(1)-release (i686-pc-msys)
Copyright 1999 Free Software Foundation, Inc.

2.05b and 3.1 are available as snapshots

> I tried changing them to /bin/sh and that caused other problems.

What if you copy /bin/sh.exe to /bin/bash.exe?

> Has anyone tried doing the update-packaging with MozillaBuild?


- --
"Be who you are and say what you feel because those who mind don't matter
and those who matter don't mind." - Dr Seuss, "Oh the Places You'll Go"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8-svn-4445-2007-03-06 (Windows PIII)
Comment: When cryptography is outlawed, b25seSBvdXRsYXdzIHdpbGwgdXNlIG
Comment: Be part of the £33t ECHELON -- Use Strong Encryption.
Comment: It's YOUR right - for the time being.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRe8TR74fmBEYuzc6AQK7XAP9FlRhBQKh4hQERJJWqnBTvqgEdfEk4p2d
49z9GbUCNd5f72VBckjl/YJ/59aQgn3mV9ePg0bF7WChzTRESnLzl3R47No3EaWM
xST6NygYGM5YImuj5C+39iJF9L/Eaz3sbsWVKoxojZIHfzkAxuwgJ701EM5Y25W1
wJFOgmhCdo+IPwMFAUXvE0cdBKxKYI0qEBECu1wAoK7wVPkOpI3DL0SF4E0Cdac4
8CqRAKCNmzwnxV+uE4v4f4aSUIxIxY2j/g==
=1b5r
-----END PGP SIGNATURE-----
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: update-packaging does not work with MozillaBuild

Michael Kaply-2
In reply to this post by Michael Kaply-2
Michael Kaply wrote:

> I'm trying to build update-packaging and it is failing with MozillaBuild.
>
> The problem appears to be that the packaging scripts specify bash:
>
> #!/bin/bash
>
> http://lxr.mozilla.org/mozilla/source/tools/update-packaging/make_full_update.sh#1 
>
>
> And bash is not included with MozillaBuild
>
> I tried changing them to /bin/sh and that caused other problems.
>
> Has anyone tried doing the update-packaging with MozillaBuild?
>
> Mike Kaply
Here's a patch that makes things work.

bsmedberg is working on a better version.

Index: common.sh
===================================================================
RCS file: /cvsroot/mozilla/tools/update-packaging/common.sh,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 common.sh
--- common.sh 17 Oct 2005 15:45:06 -0000 1.1.2.5
+++ common.sh 7 Mar 2007 22:58:44 -0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Code shared by update packaging scripts.
 # Author: Darin Fisher
Index: make_full_update.sh
===================================================================
RCS file: /cvsroot/mozilla/tools/update-packaging/make_full_update.sh,v
retrieving revision 1.3.2.4
diff -u -r1.3.2.4 make_full_update.sh
--- make_full_update.sh 24 Feb 2006 20:30:10 -0000 1.3.2.4
+++ make_full_update.sh 7 Mar 2007 22:58:44 -0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # This tool generates full update packages for the update system.
 # Author: Darin Fisher
@@ -43,8 +43,7 @@
 fi
 
 list=$(list_files)
-eval "files=($list)"
-
+files=($list)
 popd
 
 mkdir -p "$workdir"
@@ -54,6 +53,8 @@
 
 for ((i=0; $i<$num_files; i=$i+1)); do
   f=${files[$i]}
+  f=${f%\"}
+  f=${f#\"}
 
   notice "processing $f"
 
Index: make_incremental_update.sh
===================================================================
RCS file: /cvsroot/mozilla/tools/update-packaging/make_incremental_update.sh,v
retrieving revision 1.3.2.5
diff -u -r1.3.2.5 make_incremental_update.sh
--- make_incremental_update.sh 24 Feb 2006 20:30:10 -0000 1.3.2.5
+++ make_incremental_update.sh 7 Mar 2007 22:58:44 -0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # This tool generates incremental update packages for the update system.
 # Author: Darin Fisher
@@ -44,7 +44,7 @@
 fi
 
 list=$(list_files)
-eval "oldfiles=($list)"
+oldfiles=($list)
 
 popd
 
@@ -54,7 +54,7 @@
 fi
 
 list=$(list_files)
-eval "newfiles=($list)"
+newfiles=($list)
 
 popd
 
@@ -65,6 +65,9 @@
 
 for ((i=0; $i<$num_oldfiles; i=$i+1)); do
   f=${oldfiles[$i]}
+  f=${f%\"}
+  f=${f#\"}
+
   # If this file exists in the new directory as well, then check if it differs.
   if [ -f "$newdir/$f" ]; then
     if ! diff "$olddir/$f" "$newdir/$f" > /dev/null; then
@@ -100,10 +103,12 @@
 
 for ((i=0; $i<$num_newfiles; i=$i+1)); do
   f="${newfiles[$i]}"
+  f=${f%\"}
+  f=${f#\"}
 
   # If we've already tested this file, then skip it
   for ((j=0; $j<$num_oldfiles; j=$j+1)); do
-    if [ "$f" = "${oldfiles[j]}" ]; then
+    if [ "${newfiles[$i]}" = "${oldfiles[j]}" ]; then
       continue 2
     fi
   done
Index: unwrap_full_update.sh
===================================================================
RCS file: /cvsroot/mozilla/tools/update-packaging/unwrap_full_update.sh,v
retrieving revision 1.1.14.1
diff -u -r1.1.14.1 unwrap_full_update.sh
--- unwrap_full_update.sh 23 Jun 2006 21:26:13 -0000 1.1.14.1
+++ unwrap_full_update.sh 7 Mar 2007 22:58:44 -0000
@@ -37,7 +37,7 @@
 
 # Generate a list of all files in the archive.
 list=$($MAR -t "$archive" | cut -d' ' -f3)
-eval "files=($list)"
+files=($list)
 
 # Extract the files, creating subdirectories.  The resulting files are bzip2
 # compressed, so we need to walk the list of files, and decompress them.
@@ -49,6 +49,8 @@
 # does not correspond to an actual file in the archive.
 for ((i=1; $i<$num_files; i=$i+1)); do
   f=${files[$i]}
+  f=${f%\"}
+  f=${f#\"}
 
   echo "  decompressing $f"
 

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds