Mozilla in Lenny

Mike Hommey mh at glandium.org
Sat Sep 27 16:53:22 UTC 2008


On Sat, Sep 27, 2008 at 11:39:07AM +0200, Mike Hommey wrote:
> I'm going to upload 1.9.0.3-1 soon, so I invite the release team to
> already take a look at the upstream changes to anticipate the upload.
> 
> Changes between 1.9.0.1 and 1.9.0.2
> http://git.debian.org/?p=pkg-mozilla/iceweasel.git;a=commit;h=665bfa3a9adefe649266a524aa046c513f937ab3
> Changes between 1.9.0.2 and 1.9.0.3
> http://git.debian.org/?p=pkg-mozilla/iceweasel.git;a=commit;h=f2bb1a05028205e3c0c1ca9f769b291aa79b1a71
> 
> (This is the iceweasel repository, but as it happens, xulrunner and
> iceweasel tarballs are now perfectly identical)

And FWIW, attached here are the additional patches in my current trunk,
compared to 1.9.0.1-1, that will end up in 1.9.0.3-1.

Changelog, so far, looks like this:

  * New upstream release.
  * debian/xulrunner-1.9.install: Don't install dependentlibs.list. It's
    causing problems with gdb and is not necessary on our builds.
  * debian/control: Bumped Standards-Version to 3.8.0.1. No changes.
  * xulrunner/app/Makefile.in: Use browser/app/mozilla.in instead of
    xulrunner/app/mozilla.in. The browser version has received more love
    upstream, and properly remove the xremote code, which has been handled
    by the binary itself for a while, and causes some problems on PPC at
    least.
  * build/unix/run-mozilla.sh, debian/postinstrm.in, debian/rules,
    xulrunner/stub/nsXULStub.cpp: Disable jemalloc by default, because of all
    the kinds of random problems it causes, but let advanced users load it by
    setting the MOZILLA_JEMALLOC environment variable. Closes: #490360.
  * debian/rules: Create sdk/bin as a symlink to /usr/lib/xulrunner-1.9.
    Closes: #491693
  * modules/plugin/base/src/nsPluginHostImpl.cpp: Don't register plugins if
    the MOZILLA_DISABLE_PLUGINS environment variable is set.

Cheers,

Mike
-------------- next part --------------
commit ea2c5cf001e5d70ca9aa233e9f2875b43c8ba1b0
Author: Mike Hommey <glandium at debian.org>
Date:   Tue Jul 15 07:41:25 2008 +0200

    Don't install dependentlibs.list
    
    It's causing problems with gdb and is not necessary on our builds.

diff --git a/debian/xulrunner-1.9.install b/debian/xulrunner-1.9.install
index 5674c32..d71bac8 100644
--- a/debian/xulrunner-1.9.install
+++ b/debian/xulrunner-1.9.install
@@ -1,6 +1,5 @@
 etc/gre.d/1.9.system.conf
 
-usr/lib/xulrunner-1.9/dependentlibs.list
 usr/lib/xulrunner-1.9/platform.ini
 
 usr/lib/xulrunner-1.9/libxul.so
-------------- next part --------------
commit fa03732a9f4eeb9844b4616ce5f72a612d4129f7
Author: Mike Hommey <glandium at debian.org>
Date:   Tue Jul 15 07:42:23 2008 +0200

    Bumped Standards-Version to 3.8.0.1

diff --git a/debian/control b/debian/control
index 7ca0ac6..bb5bdf2 100644
--- a/debian/control
+++ b/debian/control
@@ -34,7 +34,7 @@ Build-Depends: debhelper (>= 5.0.59),
                xfonts-base,
                xauth
 Build-Depends-Indep: java-gcj-compat-dev (>= 1.0.56)
-Standards-Version: 3.7.3.0
+Standards-Version: 3.8.0.1
 
 Package: xulrunner-1.9
 Section: devel

-------------- next part --------------
commit cb014facce56415a93038a5c50805a912e0cbc3c
Author: Mike Hommey <glandium at debian.org>
Date:   Wed Sep 24 08:45:46 2008 +0200

    Use browser/app/mozilla.in instead of xulrunner/app/mozilla.in
    
    The browser version has received more love upstream, and properly remove the
    xremote code, which has been handled by the binary itself for a while, and
    causes some problems on PPC at least.

diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in
index 8267cd2..9634958 100644
--- a/xulrunner/app/Makefile.in
+++ b/xulrunner/app/Makefile.in
@@ -204,7 +204,7 @@ endif
 
 ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH)))
 
-xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
+xulrunner:: $(topsrcdir)/browser/app/mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
 	cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
                 -e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \
 		-e "s|%MREDIR%|$(mredir)|" > $@

-------------- next part --------------
commit f94bccbbdd6045a5d0a31a1ebd817325442665d1
Author: Mike Hommey <glandium at debian.org>
Date:   Sat Sep 27 10:02:47 2008 +0200

    Disable jemalloc by default
    
    It causes several kinds of random problems. Let advanced users load it
    anyways by setting the MOZILLA_JEMALLOC environment variable.

diff --git a/build/unix/run-mozilla.sh b/build/unix/run-mozilla.sh
index 92f3bf9..d0602d8 100755
--- a/build/unix/run-mozilla.sh
+++ b/build/unix/run-mozilla.sh
@@ -163,7 +163,7 @@ moz_run_program()
 	##
 	## Run the program
 	##
-	if [ -z "$MOZILLA_NO_JEMALLOC" ] &&
+	if [ "$MOZILLA_JEMALLOC" ] &&
 	   [ -f "$MOZILLA_FIVE_HOME/libjemalloc.so" ]; then
 		LD_PRELOAD="${LD_PRELOAD+$LD_PRELOAD:}$MOZILLA_FIVE_HOME/libjemalloc.so" "$prog" ${1+"$@"}
 	else
@@ -236,7 +236,7 @@ moz_debug_program()
             echo " '$PARAM'" | perl -pe 'chomp' >> $tmpfile
         done
         echo >> $tmpfile
-	if [ -z "$MOZILLA_NO_JEMALLOC" ] &&
+	if [ "$MOZILLA_JEMALLOC" ] &&
 	   [ -f "$MOZILLA_FIVE_HOME/libjemalloc.so" ]; then
 		echo "set env LD_PRELOAD '${LD_PRELOAD+$LD_PRELOAD:}$MOZILLA_FIVE_HOME/libjemalloc.so'" >> $tmpfile
 	fi
diff --git a/debian/postinstrm.in b/debian/postinstrm.in
index badb44b..fbea15d 100644
--- a/debian/postinstrm.in
+++ b/debian/postinstrm.in
@@ -9,7 +9,7 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-install" ] ||
     rm -f /usr/lib/xulrunner-1.9/components/compreg.dat \
           /usr/lib/xulrunner-1.9/components/xpti.dat
     cd /usr/lib/xulrunner-1.9
-    MOZILLA_NO_JEMALLOC=1 ./run-mozilla.sh ./xpcshell -e "" ||
+    ./run-mozilla.sh ./xpcshell -e "" ||
     rm -f /usr/lib/xulrunner-1.9/components/compreg.dat \
           /usr/lib/xulrunner-1.9/components/xpti.dat
 fi
diff --git a/debian/rules b/debian/rules
index 30b27f3..08d515f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -95,7 +95,7 @@ TEST =	( if ( \
 		cd dist/bin; \
 		GNOME22_USER_DIR="$(CURDIR)/dist/.gnome2" \
 		HOME="$(CURDIR)/dist" \
-		xvfb-run -a sh -c "MOZILLA_NO_JEMALLOC=$(strip $(1)) ./xulrunner '$(CURDIR)/debian/test/application.ini' 2> /dev/null" || \
+		xvfb-run -a sh -c "./xulrunner '$(CURDIR)/debian/test/application.ini' 2> /dev/null" || \
 			echo "xulrunner test exited with code $$?" >&2; \
 	) | grep -q '^unload$$'; then \
 		echo "xulrunner test successful" >&2; \
@@ -115,17 +115,8 @@ test: build-stamp
 		 f.initWithPath('/'); \
 		 dump('xpcshell test ' + (f.isDirectory() ? 'successful' : 'failed') + '\n');"
 
-	# basic test that can trigger failures with libjemalloc.
-	@if [ -f dist/bin/libjemalloc.so ]; then \
-		$(call TEST) && \
-			echo usr/lib/xulrunner-1.9/libjemalloc.so >> debian/xulrunner-1.9.install || \
-			echo Not installing libjemalloc >&2; \
-	else \
-		echo libjemalloc not built, skipping test >&2; \
-	fi
-
-	# same test, without libjemalloc
-	@$(call TEST, 1)
+	# basic test
+	$(call TEST)
 
 build-jars: build-jars-stamp
 
diff --git a/debian/xulrunner-1.9.install b/debian/xulrunner-1.9.install
index d71bac8..6e4a963 100644
--- a/debian/xulrunner-1.9.install
+++ b/debian/xulrunner-1.9.install
@@ -30,3 +30,4 @@ usr/lib/xulrunner-1.9/modules usr/share/xulrunner-1.9
 usr/lib/xulrunner-1.9/components/*.js
 usr/lib/xulrunner-1.9/components/*.xpt
 usr/lib/xulrunner-1.9/components/libimgicon.so
+usr/lib/xulrunner-1.9/libjemalloc.so
diff --git a/xulrunner/stub/nsXULStub.cpp b/xulrunner/stub/nsXULStub.cpp
index 276bac6..0f22b68 100644
--- a/xulrunner/stub/nsXULStub.cpp
+++ b/xulrunner/stub/nsXULStub.cpp
@@ -323,8 +323,8 @@ main(int argc, char **argv)
 #endif
 
   const char *env;
-  env = getenv("MOZILLA_NO_JEMALLOC");
-  if (!env || !env[0]) {
+  env = getenv("MOZILLA_JEMALLOC");
+  if (env && env[0]) {
     // Fill tmpPath with location to the jemalloc library
     strcpy(tmpPath, greDir);
     lastSlash = strrchr(tmpPath, PATH_SEPARATOR_CHAR);
@@ -339,7 +339,7 @@ main(int argc, char **argv)
     struct stat st;
     if (stat(tmpPath, &st) == 0 && S_ISREG(st.st_mode)) {
       // Avoid infinite loop
-      setenv("MOZILLA_NO_JEMALLOC", "1", 1);
+      unsetenv("MOZILLA_JEMALLOC");
 
       // Keep previously set LD_PRELOAD
       char *ldpreload;

-------------- next part --------------
commit 6fb0da41c72e47cee6096590c8354919e314f5fa
Author: Mike Hommey <glandium at debian.org>
Date:   Sat Sep 27 10:57:02 2008 +0200

    Create sdk/bin as a symlink to /usr/lib/xulrunner-1.9

diff --git a/debian/rules b/debian/rules
index 08d515f..db7cdda 100755
--- a/debian/rules
+++ b/debian/rules
@@ -188,6 +188,7 @@ install-stamp: build-stamp
 		for f in *; do \
 			rm -f ../unstable/$$f; ln -s ../stable/$$f ../unstable/$$f; \
 		done
+	ln -s ../../xulrunner-1.9 debian/tmp/usr/lib/xulrunner-devel-1.9/sdk/bin
 
 	find dist/bin -printf %P\\n | sort -u > debian/dist.list
 	find debian/tmp/usr/lib/xulrunner-1.9 -printf %P\\n | sort -u > debian/tmp.list

-------------- next part --------------
commit 00ab4de233e4122f9191bce47dfd9f95e0044d40
Author: Mike Hommey <glandium at debian.org>
Date:   Sat Sep 27 17:17:39 2008 +0200

    Don't register plugins if the MOZILLA_DISABLE_PLUGINS environment variable is set

diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp
index 8acba41..b16fa6c 100644
--- a/modules/plugin/base/src/nsPluginHostImpl.cpp
+++ b/modules/plugin/base/src/nsPluginHostImpl.cpp
@@ -260,6 +260,24 @@ PRBool gSkipPluginSafeCalls = PR_FALSE;
 nsIFile *nsPluginHostImpl::sPluginTempDir;
 nsPluginHostImpl *nsPluginHostImpl::sInst;
 
+// Globally disable plugins
+static
+int pluginsdisabled()
+{
+  static int _disabled = -1;
+
+  if (_disabled >= 0)
+    return _disabled;
+
+  const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS");
+  if (env && env[0])
+    _disabled = 1;
+  else
+    _disabled = 0;
+
+  return _disabled;
+}
+
 ////////////////////////////////////////////////////////////////////////
 // flat file reg funcs
 static
@@ -5371,6 +5389,10 @@ nsresult nsPluginHostImpl::FindPlugins(PRBool aCreatePluginList, PRBool * aPlugi
   // possible reset in subsequent ScanPluginsDirectory calls
   PRBool pluginschanged = PR_FALSE;
 
+  if (pluginsdisabled()) {
+    mPluginsLoaded = PR_TRUE;
+    return NS_OK;
+  }
   // Scan the app-defined list of plugin dirs.
   rv = dirService->Get(NS_APP_PLUGINS_DIR_LIST, NS_GET_IID(nsISimpleEnumerator), getter_AddRefs(dirList));
   if (NS_SUCCEEDED(rv)) {
@@ -5685,6 +5707,9 @@ nsPluginHostImpl::WritePluginInfo()
 nsresult
 nsPluginHostImpl::ReadPluginInfo()
 {
+  if (pluginsdisabled())
+    return NS_ERROR_FAILURE;
+
   nsresult rv;
 
   nsCOMPtr<nsIProperties> directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,&rv));



More information about the pkg-mozilla-maintainers mailing list