Skip to content

Commit

Permalink
Fix deb libcairo version, small dropbox.in fixes
Browse files Browse the repository at this point in the history
 - Ubuntu 14.04 ships with libcairo2 version
   "1.13.0~20140204-0ubuntu1.1", which compares as earlier than
   "1.13.0". Comparing against "1.13" works, though. Remove ".0" from
   all the versions that end with it since that's more likely to be
   what we want.

 - python-gpg was first included in 17.04, not 17.10. Update warning
   to reflect that.

 - Add more logging around error conditions.
  • Loading branch information
samertm committed Nov 14, 2018
1 parent 00a6538 commit 64f6412
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 6 additions & 3 deletions dropbox.in
Expand Up @@ -44,7 +44,7 @@ try:
gpgme = None
except ImportError:
gpg = None
# Still support gpgme for now. Remove this once we only support 17.10+.
# Still support gpgme for now. Remove this once we only support 17.04+.
try:
import gpgme
except ImportError:
Expand All @@ -56,10 +56,10 @@ from posixpath import curdir, sep, pardir, join, abspath, commonprefix
INFO = u"Dropbox is the easiest way to share and store your files online. Want to learn more? Head to"
LINK = u"https://www.dropbox.com/"
WARNING = u"In order to use Dropbox, you must download the proprietary daemon."
GPG_WARNING = u"Note: python-gpg (python-gpgme for Ubuntu 17.04 and lower) is not installed, we will not be able to verify binary signatures."
GPG_WARNING = u"Note: python-gpg (python-gpgme for Ubuntu 16.10 and lower) is not installed, we will not be able to verify binary signatures."
ERROR_CONNECTING = u"Trouble connecting to Dropbox servers. Maybe your internet connection is down, or you need to set your http_proxy environment variable."
ERROR_SIGNATURE = u"Downloaded binary does not match Dropbox signature, aborting install."
ERROR_INVALID_DROPBOX = u"Could not run Dropbox. Make sure your computer meets the minimum requirements:\nhttps://www.dropbox.com/help/desktop-web/system-requirements#desktop"
ERROR_INVALID_DROPBOX = u"Could not start the Dropbox daemon. Make sure your computer meets the minimum requirements:\nhttps://www.dropbox.com/help/desktop-web/system-requirements#desktop"

DOWNLOAD_LOCATION_FMT = "https://www.dropbox.com/download?plat=%s"
SIGNATURE_LOCATION_FMT = "https://www.dropbox.com/download?plat=%s&signature=1"
Expand Down Expand Up @@ -611,6 +611,7 @@ else:
break
setprogress(DOWNLOADING, progress)
except Exception:
traceback.print_exc()
FatalVisibleError(ERROR_CONNECTING)
else:
setprogress(DOWNLOADING, 1.0)
Expand All @@ -621,8 +622,10 @@ else:
for name, i, total in download.unpack():
setprogress(UNPACKING, float(i)/total)
except SignatureVerifyError:
traceback.print_exc()
FatalVisibleError(ERROR_SIGNATURE)
except Exception:
traceback.print_exc()
FatalVisibleError(ERROR_CONNECTING)
else:
setprogress(UNPACKING, 1.0)
Expand Down
12 changes: 10 additions & 2 deletions generate-deb.sh
Expand Up @@ -419,20 +419,28 @@ debian/tmp/usr/*
EOF

# NOTE: When updating dependencies, make sure to test the package on
# the minimum and maximum supported versions for each distro. In
# particular, debian version ordering can be tricky. E.g.
# "1.3.0~somestring" is considered lower than "1.3.0" since usually
# the "~" is appended to denote a beta version.
#
# For more info, see: https://askubuntu.com/a/229749

cat > debian/control <<EOF
Source: dropbox
Section: gnome
Priority: optional
Maintainer: Dropbox <support@dropbox.com>
Build-Depends: cdbs, debhelper (>= 9), build-essential, libnautilus-extension-dev (>= 3.10.1), libglib2.0-dev (>= 2.40.0), python-gtk2 (>= 2.24.0), python-docutils
Build-Depends: cdbs, debhelper (>= 9), build-essential, libnautilus-extension-dev (>= 3.10.1), libglib2.0-dev (>= 2.40), python-gtk2 (>= 2.24), python-docutils
Standards-Version: 3.9.4.0
Package: dropbox
Replaces: nautilus-dropbox
Breaks: nautilus-dropbox
Provides: nautilus-dropbox
Architecture: any
Depends: procps, python-gtk2 (>= 2.24.0), python (>= 2.7), \${python:Depends}, \${misc:Depends}, libatk1.0-0 (>= 2.10.0), libc6 (>= 2.19), libcairo2 (>= 1.13.0), libglib2.0-0 (>= 2.40.0), libgtk2.0-0 (>= 2.24.23), libpango1.0-0 (>= 1.36.3), lsb-release
Depends: procps, python-gtk2 (>= 2.24), python (>= 2.7), \${python:Depends}, \${misc:Depends}, libatk1.0-0 (>= 2.10), libc6 (>= 2.19), libcairo2 (>= 1.13), libglib2.0-0 (>= 2.40), libgtk2.0-0 (>= 2.24.23), libpango1.0-0 (>= 1.36.3), lsb-release
Suggests: nautilus (>= 3.10.1), python-gpg (>= 1.8.0)
Homepage: https://www.dropbox.com/
Description: cloud synchronization engine - CLI and Nautilus extension
Expand Down

0 comments on commit 64f6412

Please sign in to comment.