...
 
Commits (10)
......@@ -280,7 +280,7 @@ create_default_profile() {
tbb_extensions_dir="${2}"
destination="${3}"
rsync -a --exclude bookmarks.html --exclude extensions \
rsync -a --exclude extensions \
"${tbb_profile}"/ "${destination}"/
mkdir -p "${destination}"/extensions
......
......@@ -4,18 +4,9 @@ set -e
echo "Set up Tor Browser bookmarks"
# Import ensure_hook_dependency_is_installed()
. /usr/local/lib/tails-shell-library/build.sh
ensure_hook_dependency_is_installed sqlite3
# Create a symlink to places.sqlite in browser profile from a
# dedicated "bookmarks" directory, so that it can be easily made
# persistent
mkdir -p /etc/skel/.mozilla/firefox/bookmarks
ln -s /home/amnesia/.mozilla/firefox/bookmarks/places.sqlite \
/etc/skel/.tor-browser/profile.default/places.sqlite
# Create the bookmarks database
sqlite3 /etc/skel/.mozilla/firefox/bookmarks/places.sqlite \
< /etc/skel/.mozilla/firefox/bookmarks/places.sqlite.in
rm /etc/skel/.mozilla/firefox/bookmarks/places.sqlite.in
PRAGMA foreign_keys=OFF;
PRAGMA user_version=35;
BEGIN TRANSACTION;
CREATE TABLE moz_places ( id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER , guid TEXT, foreign_count INTEGER DEFAULT 0 NOT NULL, url_hash INTEGER DEFAULT 0 NOT NULL );
INSERT INTO "moz_places" VALUES(1,'https://tails.boum.org/',NULL,'gro.muob.sliat.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(2,'file:///usr/share/doc/tails/website/index.en.html',NULL,'.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(3,'https://webmail.no-log.org/',NULL,'gro.gol-on.liambew.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(4,'https://mail.riseup.net/',NULL,'ten.puesir.liam.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(5,'https://webmail.boum.org/',NULL,'gro.muob.liambew.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(6,'https://check.torproject.org/',NULL,'gro.tcejorprot.kcehc.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(7,'https://www.torproject.org/',NULL,'gro.tcejorprot.www.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(8,'https://tor.stackexchange.com/',NULL,'moc.egnahcxekcats.rot.',0,0,0,NULL,140,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(9,'place:sort=8&maxResults=10',NULL,'.',0,0,0,NULL,0,NULL,NULL,1,0);
INSERT INTO "moz_places" VALUES(10,'place:type=6&sort=14&maxResults=10',NULL,'.',0,0,0,NULL,0,NULL,NULL,1,0);
CREATE TABLE moz_historyvisits ( id INTEGER PRIMARY KEY, from_visit INTEGER, place_id INTEGER, visit_date INTEGER, visit_type INTEGER, session INTEGER);
CREATE TABLE moz_inputhistory ( place_id INTEGER NOT NULL, input LONGVARCHAR NOT NULL, use_count INTEGER, PRIMARY KEY (place_id, input));
CREATE TABLE moz_hosts ( id INTEGER PRIMARY KEY, host TEXT NOT NULL UNIQUE, frecency INTEGER, typed INTEGER NOT NULL DEFAULT 0, prefix TEXT);
INSERT INTO "moz_hosts" VALUES(1,'tails.boum.org',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(2,'webmail.no-log.org',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(3,'mail.riseup.net',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(4,'webmail.boum.org',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(5,'check.torproject.org',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(6,'torproject.org',140,0,NULL);
INSERT INTO "moz_hosts" VALUES(7,'tor.stackexchange.com',140,0,NULL);
CREATE TABLE moz_bookmarks ( id INTEGER PRIMARY KEY, type INTEGER, fk INTEGER DEFAULT NULL, parent INTEGER, position INTEGER, title LONGVARCHAR, keyword_id INTEGER, folder_type TEXT, dateAdded INTEGER, lastModified INTEGER, guid TEXT);
INSERT INTO "moz_bookmarks" VALUES(1,2,NULL,0,0,'',NULL,NULL,0,0,'root________');
INSERT INTO "moz_bookmarks" VALUES(2,2,NULL,1,0,'Bookmarks Menu',NULL,NULL,0,0,'menu________');
INSERT INTO "moz_bookmarks" VALUES(3,2,NULL,1,1,'Bookmarks Toolbar',NULL,NULL,0,0,'toolbar_____');
INSERT INTO "moz_bookmarks" VALUES(4,2,NULL,1,2,'Tags',NULL,NULL,0,0,'tags________');
INSERT INTO "moz_bookmarks" VALUES(5,2,NULL,1,3,'Other Bookmarks',NULL,NULL,0,0,'unfiled_____');
INSERT INTO "moz_bookmarks" VALUES(6,2,NULL,1,4,'mobile',NULL,NULL,0,0,'mobile______');
INSERT INTO "moz_bookmarks" VALUES(7,1,1,2,4,'Tails',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(8,1,2,2,5,'Tails documentation (offline)',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(9,2,NULL,2,2,'Webmail',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(10,1,3,9,0,'no-log.org',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(11,1,4,9,1,'riseup.net',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(12,1,5,9,2,'boum.org',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(13,2,NULL,2,3,'Tor',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(14,1,6,13,0,'Tor Check',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(15,1,7,13,1,'Tor Project',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(16,1,8,13,2,'Tor Stack Exchange',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(17,1,9,3,0,'Most Visited',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(18,1,10,2,0,'Recent Tags',NULL,NULL,0,0,NULL);
INSERT INTO "moz_bookmarks" VALUES(19,3,NULL,2,1,NULL,NULL,NULL,0,0,NULL);
CREATE TABLE moz_keywords ( id INTEGER PRIMARY KEY AUTOINCREMENT, keyword TEXT UNIQUE, place_id INTEGER, post_data TEXT);
CREATE TABLE moz_favicons ( id INTEGER PRIMARY KEY, url LONGVARCHAR UNIQUE, data BLOB, mime_type VARCHAR(32), expiration LONG);
CREATE TABLE moz_anno_attributes ( id INTEGER PRIMARY KEY, name VARCHAR(32) UNIQUE NOT NULL);
INSERT INTO "moz_anno_attributes" VALUES(1,'mobile/bookmarksRoot');
INSERT INTO "moz_anno_attributes" VALUES(2,'Places/SmartBookmark');
CREATE TABLE moz_annos ( id INTEGER PRIMARY KEY, place_id INTEGER NOT NULL, anno_attribute_id INTEGER, mime_type VARCHAR(32) DEFAULT NULL, content LONGVARCHAR, flags INTEGER DEFAULT 0, expiration INTEGER DEFAULT 0, type INTEGER DEFAULT 0, dateAdded INTEGER DEFAULT 0, lastModified INTEGER DEFAULT 0);
CREATE TABLE moz_items_annos ( id INTEGER PRIMARY KEY, item_id INTEGER NOT NULL, anno_attribute_id INTEGER, mime_type VARCHAR(32) DEFAULT NULL, content LONGVARCHAR, flags INTEGER DEFAULT 0, expiration INTEGER DEFAULT 0, type INTEGER DEFAULT 0, dateAdded INTEGER DEFAULT 0, lastModified INTEGER DEFAULT 0);
INSERT INTO "moz_items_annos" VALUES(1,6,1,NULL,'1',0,4,1,1071790224,1071790224);
INSERT INTO "moz_items_annos" VALUES(2,17,2,NULL,'MostVisited',0,4,3,0,0);
INSERT INTO "moz_items_annos" VALUES(3,18,2,NULL,'RecentTags',0,4,3,0,0);
ANALYZE sqlite_master;
INSERT INTO "sqlite_stat1" VALUES('moz_bookmarks','moz_bookmarks_guid_uniqueindex','6 1');
INSERT INTO "sqlite_stat1" VALUES('moz_bookmarks','moz_bookmarks_itemlastmodifiedindex','6 6 3');
INSERT INTO "sqlite_stat1" VALUES('moz_bookmarks','moz_bookmarks_parentindex','6 3 1');
INSERT INTO "sqlite_stat1" VALUES('moz_bookmarks','moz_bookmarks_itemindex','6 6 6');
CREATE INDEX moz_places_url_hashindex ON moz_places (url_hash);
CREATE INDEX moz_places_faviconindex ON moz_places (favicon_id);
CREATE INDEX moz_places_hostindex ON moz_places (rev_host);
CREATE INDEX moz_places_visitcount ON moz_places (visit_count);
CREATE INDEX moz_places_frecencyindex ON moz_places (frecency);
CREATE INDEX moz_places_lastvisitdateindex ON moz_places (last_visit_date);
CREATE UNIQUE INDEX moz_places_guid_uniqueindex ON moz_places (guid);
CREATE INDEX moz_historyvisits_placedateindex ON moz_historyvisits (place_id, visit_date);
CREATE INDEX moz_historyvisits_fromindex ON moz_historyvisits (from_visit);
CREATE INDEX moz_historyvisits_dateindex ON moz_historyvisits (visit_date);
CREATE INDEX moz_bookmarks_itemindex ON moz_bookmarks (fk, type);
CREATE INDEX moz_bookmarks_parentindex ON moz_bookmarks (parent, position);
CREATE INDEX moz_bookmarks_itemlastmodifiedindex ON moz_bookmarks (fk, lastModified);
CREATE UNIQUE INDEX moz_bookmarks_guid_uniqueindex ON moz_bookmarks (guid);
CREATE UNIQUE INDEX moz_keywords_placepostdata_uniqueindex ON moz_keywords (place_id, post_data);
CREATE UNIQUE INDEX moz_annos_placeattributeindex ON moz_annos (place_id, anno_attribute_id);
CREATE UNIQUE INDEX moz_items_annos_itemattributeindex ON moz_items_annos (item_id, anno_attribute_id);
COMMIT;
......@@ -271,7 +271,7 @@ class Volume(object):
unmounted_at_least_once = True
except GLib.Error as e:
# Ignore "not mounted" error if the volume was already unmounted
if "org.freedesktop.UDisks2.Error.NotMounted" in e.message and unmounted_at_least_once:
if e.domain == "udisks-error-quark" and e.code == UDisks.Error.NOT_MOUNTED and unmounted_at_least_once:
return
raise
......@@ -325,11 +325,17 @@ class Volume(object):
self.unmount()
self.backing_volume.lock()
except GLib.Error as e:
# Translators: Don't translate {volume_name} or {error_message},
# they are placeholder and will be replaced.
body = _("Couldn't lock volume {volume_name}:\n{error_message}".format(volume_name=self.name,
error_message=e.message))
self.manager.show_warning(_("Error locking volume"), body)
# Show a more helpful message for the known error cases
if e.domain == "udisks-error-quark" and e.code == UDisks.Error.DEVICE_BUSY:
body = _("One or more applications are keeping the volume busy.")
# Show a general error message and print the detailed, technical
# message in unknown error cases
else:
# Translators: Don't translate {volume_name} or {error_message},
# they are placeholder and will be replaced.
body = _("Couldn't lock volume {volume_name}:\n{error_message}".format(volume_name=self.name,
error_message=e.message))
self.manager.show_warning(_("Locking the volume failed"), body)
return
def on_unlock_button_clicked(self, button):
......
tails (3.16) UNRELEASED; urgency=medium
* Dummy entry for next release.
-- Cyril Brulebois <ckb@riseup.net> Wed, 10 Jul 2019 13:23:58 +0200
tails (3.15) unstable; urgency=medium
* Major changes
......
......@@ -1068,7 +1068,7 @@ The remaining configuration differences can be found in:
- [[!tails_gitweb_dir config/chroot_local-includes/usr/share/tails/tor-browser-prefs.js]]
- [[!tails_gitweb config/chroot_local-hooks/14-generate-tor-browser-profile]]
- [[!tails_gitweb config/chroot_local-hooks/15-symlink-places.sqlite]]
- [[!tails_gitweb config/chroot_local-hooks/15-tor-browser-bookmarks]]
It should also be noted that the global Tor Browser installation is also used
for the [[Unsafe Browser]], although it is
......
---
build-target: amd64
channel: alpha
product-name: Tails
product-version: 3.14.3
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEBUafuF6tZYm0PUHT0h2tOK8oHAsFAl0PYD8ACgkQ0h2tOK8o
HAtJ2Q/+P0I2ozdc3QP9yuMtswJ6o+yriPx2g0744XjkWzb9TiPq+9jJjEFeAuzV
zpj4xVmXJNCCP9AId/VJsWOE3mRIp5jkOeV7z8tdhD+u6iIjW5S28aZkBAh3Ksxq
IvT4HVcG1Q7VB/UfU+rQF6upOvVtA9KVpW9T8S14GuG54k9ezIpJfbm81fSOrUml
EpBb/F/nWfsJNTHDUIF9zKBeRPaDwQ1jC+fk9Ld64u3+WgCkAiGgLesnNt7lT5jo
iVud3pVnHdcfJ8TnJjOgT5jbIX2xCReFpLB7QN4dRT5SSeK+vLbrzWhNdrfQG8Km
Dmx76GFOUfb+1AKkrHSYk3ldFe0jGWfw5mbt+WkATWRz6AE3mC7pwncSC3c6POIa
aJZruVuOs85+coiR2qTtVxNQY8LMSK5uTJavyI8Ff7OVYhNkrMsTw+pmy4T3jGKb
LIR0ZD5p1DfYUJy5eOxsK6ZwYxsU45oqPmeYiOobp3x8MTaYatiVQOPDhGgzbs3Q
tlPA8E1wzc1lSadgf3KDpPnu8iL5lWfFNeJJTR4pRpskqQXSCuA/WzxzJnIppKin
Uraj0rM6gUFV6NDLspvbI0hn5r+OV4dmABFT9oP9njx+uAxQ+nSgMOOVzPoqI8iJ
qmsTEYbK6LaGtug+Z40laasAbegmPbvDAEJ8qohOkwYKhQJMhxg=
=ruwE
-----END PGP SIGNATURE-----
---
build-target: amd64
channel: stable
product-name: Tails
product-version: 3.14.3
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEBUafuF6tZYm0PUHT0h2tOK8oHAsFAl0PYDgACgkQ0h2tOK8o
HAu6Ew/+IIsURp85GAmX8W8u308704Sws8rqLrWl1InacdU/P1IAHOVThZCfzc6t
wI6K3EhuOX+gwQSG3djpa7AirV7Dbrfm6Yh3S5DvHLazRxWHVTTDIIV0s9MJrSrM
8tFnfhcE/CB11NIkYiE6uDhlHCNbXfsVgstLoYANPtbJFRsGl1kTTQ9UMXS17QT7
Ott7nGI1KXK1xVEMZuwzhv4JPMS3qfZNXSUXmBL5ABVXrhlbixISSqRalJtXSiXO
lp2MM21mkB/XLpgwoDkNbMqRz10NUDDpxmkXg/8o7ZQpFDT+9Oudtv96DVHfKGjr
M+D9/xj6UEkkDHYef9IuKhQPDrd60Lw4RcqfPOlMbLjUPDn3JYyK/5gTf0T1BJO8
2C/oe6l79tmmMym0aXfQAaaoSwd612e+j3BdxttLY2hsZzqbQCC4ugDrL46vopvu
Ht30dK/W1Xz4R17zcfWo1U9I/lMroLRnS4r3xRJBCYiaiWGkr8c1Rv7rWr3OoBxb
8dpj3c1u9DUD9QeSgPDm3DXHjLo4B+r2dg6pQumQba4jpNkchpq6iXGP5C/xJRWp
ghn8itwOmoIoD85T2bvofGhbKiVzsOAlf8o8AYoy8laUSnBmGZIY+gah9ZHd/UCG
MNm79YqsnKF3YfNM9gbJRpk+2yhib6Rxkz7YI2NGrOWcrxY5960=
=o5mJ
-----END PGP SIGNATURE-----