[tor-commits] [torbrowser/maint-2.2] OSX/Lin: Prevent double-patching firefox

erinn at torproject.org erinn at torproject.org
Thu Mar 8 20:43:00 UTC 2012


commit 0930156217f120e77f4d2767580496e4f5f05385
Author: Sebastian Hahn <sebastian at torproject.org>
Date:   Sat Jan 28 15:20:43 2012 +0100

    OSX/Lin: Prevent double-patching firefox
    
    Now patching will just fail instead of silently reverting the fix. This
    prepares for a more general solution later on.
---
 build-scripts/linux.mk         |    4 +++-
 build-scripts/osx.mk           |    4 +++-
 build-scripts/patch-any-src.sh |    2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build-scripts/linux.mk b/build-scripts/linux.mk
index 2131276..d3e942b 100644
--- a/build-scripts/linux.mk
+++ b/build-scripts/linux.mk
@@ -115,11 +115,13 @@ build-pidgin:
 	echo "We're not building pidgin yet!"
 
 FIREFOX_DIR=$(FETCH_DIR)/mozilla-release
-build-firefox:
+patch-firefox-source:
 	cp ../src/current-patches/firefox/* $(FIREFOX_DIR)
 	cp patch-any-src.sh $(FIREFOX_DIR)
 	cp $(CONFIG_SRC)/dot_mozconfig $(FIREFOX_DIR)/mozconfig
 	cd $(FIREFOX_DIR) && ./patch-any-src.sh
+
+build-firefox:
 	cd $(FIREFOX_DIR) && make -f client.mk build
 
 copy-firefox:
diff --git a/build-scripts/osx.mk b/build-scripts/osx.mk
index e77d85e..84dd620 100644
--- a/build-scripts/osx.mk
+++ b/build-scripts/osx.mk
@@ -125,11 +125,13 @@ build-tor:
 	cd $(TOR_DIR) && make install
 
 FIREFOX_DIR=$(FETCH_DIR)/mozilla-release
-build-firefox:
+patch-firefox-source:
 	cp ../src/current-patches/firefox/* $(FIREFOX_DIR)
 	cp patch-any-src.sh $(FIREFOX_DIR)
 	cp $(CONFIG_SRC)/mozconfig-osx-$(ARCH_TYPE) $(FIREFOX_DIR)/mozconfig
 	cd $(FIREFOX_DIR) && ./patch-any-src.sh
+
+build-firefox:
 	cd $(FIREFOX_DIR) && make -f client.mk build
 
 copy-firefox:
diff --git a/build-scripts/patch-any-src.sh b/build-scripts/patch-any-src.sh
index 602612a..90a564e 100755
--- a/build-scripts/patch-any-src.sh
+++ b/build-scripts/patch-any-src.sh
@@ -3,4 +3,4 @@
 # Cycle through available patches for Firefox and apply them in order. Fail if
 # any of them don't apply cleanly.
 
-for i in *patch; do patch -tp1 <$i || exit 1; done
+for i in *patch; do patch -Ntp1 <$i || exit 1; done





More information about the tor-commits mailing list