Skip to content

Commit 6c92e3e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into redd-it-update
2 parents 45d88a4 + a10dcdd commit 6c92e3e

714 files changed

Lines changed: 15682 additions & 5248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,33 @@
33
language: python
44
python:
55
- "2.7"
6-
cache: pip
6+
cache:
7+
directories:
8+
- $HOME/.cache/pip
9+
- $HOME/virtualenv/python2.7_with_system_site_packages
710
addons:
811
apt:
912
packages:
1013
- libxml2-dev
1114
- python-dev
1215
- libcurl4-openssl-dev
1316
- python-lxml
17+
- python-software-properties
18+
- chromium-browser
1419
firefox: "37.0"
1520
virtualenv:
1621
system_site_packages: true
1722
install:
1823
- pip install -r https-everywhere-checker/requirements.txt
19-
before_script:
20-
- sh -e /etc/init.d/xvfb start
24+
- pip install -r test/chromium/requirements.txt
2125
env:
2226
- DISPLAY=':99.0'
27+
before_script:
28+
- export DISPLAY=:99.0
29+
- sh -e /etc/init.d/xvfb start
30+
- wget https://chromedriver.storage.googleapis.com/2.12/chromedriver_linux64.zip
31+
- unzip chromedriver_linux64.zip
32+
- mv chromedriver test/chromium/chromedriver
2333
script:
2434
- ./test.sh
2535
sudo: false
@@ -33,4 +43,3 @@ notifications:
3343
- "irc.oftc.net#https-everywhere"
3444
on_success: change
3545
on_failure: change
36-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Run the latest code and rulesets in a standalone Firefox profile:
1818

1919
Run the latest code and rulesets in a standalone Chromium profile:
2020

21-
bash run-chromium.sh
21+
bash test-chromium.sh --justrun
2222

2323
Build the Firefox extension as a .xpi package:
2424

chromium/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
"<all_urls>"
4040
],
4141
"update_url": "https://www.eff.org/files/https-everywhere-chrome-updates.xml",
42-
"version": "2015.8.13"
42+
"version": "2015.8.25"
4343
}

https-everywhere-tests/test/test-httpse-installed.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ exports["test httpse potentiallyApplicableRulesets"] = function(assert) {
2323

2424
exports["test sample ruleset"] = function(assert, done) {
2525
tabs.open({
26-
url: "http://www.reddit.com/robots.txt",
26+
url: "http://libssh.org/robots.txt",
2727
onOpen: function(tab) {
2828
tab.on('load', function(tab) {
29-
assert.equal(tab.url, "https://www.reddit.com/robots.txt",
30-
"Test that Reddit URLs are rewritten to HTTPS.");
29+
assert.equal(tab.url, "https://libssh.org/robots.txt",
30+
"Test that LibSSH URLs are rewritten to HTTPS.");
3131
tab.close();
3232
done();
3333
});

https-everywhere-tests/test_profile_skeleton/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"hasBinaryComponents": false,
1717
"icon64URL": null,
1818
"iconURL": "chrome://https-everywhere/skin/https-everywhere.png",
19-
"id": "https-everywhere@eff.org",
19+
"id": "https-everywhere-eff@eff.org",
2020
"installDate": 1407525887000,
2121
"internalName": null,
2222
"locales": [],

install-dev-dependencies.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ if type apt-get >/dev/null ; then
1111
BROWSERS="iceweasel chromium"
1212
fi
1313
sudo apt-get install libxml2-dev libxml2-utils libxslt1-dev python-dev \
14-
$BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev
14+
$BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev \
15+
chromium-chromedriver
1516
elif type brew >/dev/null ; then
1617
brew list python &>/dev/null || brew install python
17-
brew install libxml2 gnu-sed
18+
brew install libxml2 gnu-sed chromedriver
1819
if ! echo $PATH | grep -ql /usr/local/bin ; then
1920
echo '/usr/local/bin not found in $PATH, please add it.'
2021
fi
@@ -31,6 +32,9 @@ pip install --user --no-allow-insecure --no-allow-external -r requirements.txt
3132
cd https-everywhere-checker
3233
pip install --user -r requirements.txt
3334
cd -
35+
cd test/chromium
36+
pip install --user -r requirements.txt
37+
cd -
3438

3539
# Install a hook to run tests before pushing.
3640
ln -sf ../../test.sh .git/hooks/pre-push

makexpi.sh

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,19 @@ if [ -n "$1" ] && [ "$2" != "--no-recurse" ] ; then
3434
# Ensure a clean build.
3535
git clean -fdx
3636

37+
git submodule update --recursive -f
3738
# Use the version of the build script that was current when that
3839
# tag/release/branch was made.
3940
./makexpi.sh $1 --no-recurse || exit 1
4041

41-
# Check that all the string present in the English entities file are present in
42-
# each other locale we use. A missing entity causes a nasty error at startup.
43-
# Note that we only make this check when doing tagged builds, since otherwise
44-
# the check would fail anytime someone adds a new string in the entities file,
45-
# before it is included in Transifex. Once the new string is in the master
46-
# branch, Transifex will automatically fill it in with the default English
47-
# value in all the other locales.
48-
if bash utils/compare-locales.sh pkg/$XPI_NAME.xpi >&2
49-
then
50-
echo Validation of included locales completed. >&2
51-
else
52-
die "Validation of locales failed."
53-
fi
54-
5542
# The fact that the above works even when the thing you are building predates
5643
# support for --no-recurse in this script is (1) non-intuitive; (2) crazy; and (3)
5744
# involves two pristine checkouts of $1 within each other
5845

5946
# Now escape from the horrible mess we've made
6047
cd ..
6148
XPI_NAME="$APP_NAME-$1"
62-
cp $SUBDIR/pkg/$XPI_NAME.xpi pkg/
49+
cp $SUBDIR/pkg/$XPI_NAME-eff.xpi pkg/
6350
if ! cp $SUBDIR/pkg/$XPI_NAME-amo.xpi pkg/ 2> /dev/null ; then
6451
echo Old version does not support AMO
6552
fi
@@ -113,14 +100,17 @@ fi
113100

114101
# Prepare packages suitable for uploading to EFF and AMO, respectively.
115102
[ -d pkg ] || mkdir pkg
116-
[ -e pkg/xpi-eff ] && rm -rf pkg/xpi-eff
117-
cp -a src/ pkg/xpi-eff/
103+
rsync -a --delete --delete-excluded --exclude /chrome/content/rules src/ pkg/xpi-eff
118104
cp -a translations/* pkg/xpi-eff/chrome/locale/
119-
rm -r pkg/xpi-eff/chrome/content/rules
120-
[ -e pkg/xpi-amo ] && rm -rf pkg/xpi-amo
121-
cp -a pkg/xpi-eff/ pkg/xpi-amo/
122-
# The AMO version of the package cannot contain the updateKey or updateURL tags
123-
sed -i.bak -e '/updateKey/d' -e '/updateURL/d' pkg/xpi-amo/install.rdf
105+
rsync -a --delete pkg/xpi-eff/ pkg/xpi-amo
106+
# The AMO version of the package cannot contain the updateKey or updateURL tags.
107+
# Also, it has a different id than the eff-hosted version, because Firefox now
108+
# requires us to upload the eff-hosted version to an unlisted extension on AMO
109+
# in order to receive a signature indicating that it is not malware.
110+
# https://github.com/efforg/https-everywhere/issues/2051
111+
sed -i.bak -e '/updateKey/d' -e '/updateURL/d' \
112+
-e 's,<em:id>https-everywhere-eff@eff.org</em:id>,<em:id>https-everywhere@eff.org</em:id>,' \
113+
pkg/xpi-amo/install.rdf
124114
rm pkg/xpi-amo/install.rdf.bak
125115

126116
# Used for figuring out which branch to pull from when viewing source for rules
@@ -132,17 +122,18 @@ fi
132122

133123
# Build the XPI!
134124
rm -f "${XPI_NAME}.xpi"
125+
rm -f "${XPI_NAME}-eff.xpi"
135126
rm -f "${XPI_NAME}-amo.xpi"
136-
python2.7 utils/create_xpi.py -n "${XPI_NAME}.xpi" -x ".build_exclusions" "pkg/xpi-eff"
127+
python2.7 utils/create_xpi.py -n "${XPI_NAME}-eff.xpi" -x ".build_exclusions" "pkg/xpi-eff"
137128
python2.7 utils/create_xpi.py -n "${XPI_NAME}-amo.xpi" -x ".build_exclusions" "pkg/xpi-amo"
138129

139130
echo >&2 "Total included rules: `sqlite3 $RULESETS_SQLITE 'select count(*) from rulesets'`"
140131
echo >&2 "Rules disabled by default: `find src/chrome/content/rules -name "*.xml" | xargs grep -F default_off | wc -l`"
141-
echo >&2 "Created ${XPI_NAME}.xpi and ${XPI_NAME}-amo.xpi"
132+
echo >&2 "Created ${XPI_NAME}-eff.xpi and ${XPI_NAME}-amo.xpi"
142133

143-
bash utils/android-push.sh "$XPI_NAME.xpi"
134+
bash utils/android-push.sh "$XPI_NAME-eff.xpi"
144135

145136
if [ -n "$BRANCH" ]; then
146-
cp $SUBDIR/$XPI_NAME.xpi pkg
137+
cp $SUBDIR/${XPI_NAME}-eff.xpi $SUBDIR/${XPI_NAME}-amo.xpi pkg
147138
rm -rf $SUBDIR
148139
fi

run-chromium.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/Changelog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Firefox 5.1.1 / Chrome 2015.8.25
2+
* Ruleset fixes
3+
* Clean up some unused code that was causing review problems on AMO.
4+
5+
Firefox 5.1.0
6+
* Signed by AMO so it won't get a warning in Firefox
7+
8+
Firefox 5.0.9
9+
* Fixed missing translations from 5.0.8
10+
111
Firefox 5.0.8 / Chrome-2015.8.13
212
* Ruleset fixes
313
* Restore checkbox icons on Firefox

0 commit comments

Comments
 (0)