22# Install packages that are necessary and/or useful to build and debug
33# HTTPS Everywhere
44set -o errexit -o xtrace
5+
6+ if [ $UID != 0 ]; then
7+ SUDO_SHIM=sudo
8+ fi
9+
510if type apt-get > /dev/null ; then
611 BROWSERS=" firefox chromium-browser"
712 CHROMEDRIVER=" chromium-chromedriver"
@@ -12,8 +17,13 @@ if type apt-get >/dev/null ; then
1217 BROWSERS=" iceweasel chromium"
1318 CHROMEDRIVER=" chromedriver"
1419 fi
20+ <<< <<< < HEAD
1521 sudo apt-get install -y libxml2-dev libxml2-utils libxslt1-dev python-dev \
1622 $BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev xvfb \
23+ =======
24+ $SUDO_SHIM apt-get install libxml2-dev libxml2-utils libxslt1-dev \
25+ python-dev $BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev xvfb \
26+ >>>>>>> effRelease
1727 libssl-dev git $CHROMEDRIVER
1828elif type brew > /dev/null ; then
1929 brew list python & > /dev/null || brew install python
@@ -22,7 +32,29 @@ elif type brew >/dev/null ; then
2232 echo ' /usr/local/bin not found in $PATH, please add it.'
2333 fi
2434elif type dnf > /dev/null ; then
25- sudo dnf install libxml2-devel python-devel libxslt-devel
35+ $SUDO_SHIM dnf install firefox gcc git libcurl-devel libxml2-devel \
36+ libxslt-devel python-devel redhat-rpm-config xorg-x11-server-Xvfb which \
37+ findutils procps openssl chromium GConf2
38+ if ! type chromedriver > /dev/null; then
39+ if [ " ` uname -m` " == " x86_64" ]; then
40+ ARCH=64
41+ else
42+ ARCH=32
43+ fi
44+ curl -O " https://chromedriver.storage.googleapis.com/2.23/chromedriver_linux$ARCH .zip"
45+ unzip " chromedriver_linux$ARCH .zip"
46+ rm -f " chromedriver_linux$ARCH .zip"
47+ $SUDO_SHIM mv chromedriver /usr/bin/chromedriver
48+ $SUDO_SHIM chown root /usr/bin/chromedriver
49+ $SUDO_SHIM chmod +x /usr/bin/chromedriver
50+ $SUDO_SHIM chmod 755 /usr/bin/chromedriver
51+ fi
52+ # This is needed for Firefox on some systems. See here for more information:
53+ # https://github.com/EFForg/https-everywhere/pull/5584#issuecomment-238655443
54+ if [ ! -f /var/lib/dbus/machine-id ]; then
55+ $SUDO_SHIM sh -c ' dbus-uuidgen > /var/lib/dbus/machine-id'
56+ fi
57+ export PYCURL_SSL_LIBRARY=nss
2658fi
2759
2860# Get the addon SDK submodule and rule checker
0 commit comments