Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
rhamnousia
tails
Commits
1138ffbe
Commit
1138ffbe
authored
Dec 03, 2014
by
Tails developers
Browse files
Merge
https://git-tails.immerda.ch/tails
into doc/project
parents
56c42191
7999371f
Changes
782
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
1138ffbe
...
...
@@ -41,7 +41,11 @@
/config/chroot_local-includes/usr/share/applications/tails-reboot.desktop
/config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop
/config/chroot_local-includes/usr/share/applications/tails-shutdown.desktop
/config/chroot_local-includes/usr/share/applications/i2p.desktop
/config/chroot_local-includes/usr/share/applications/i2p-browser.desktop
/config/chroot_local-includes/usr/share/applications/tor-browser.desktop
/config/chroot_local-includes/usr/share/applications/tails-about.desktop
/config/chroot_local-includes/usr/share/desktop-directories/Tails.directory
/tmp/
# Files generated during the test suite
/features/misc_files/video.mp4
Rakefile
View file @
1138ffbe
...
...
@@ -344,45 +344,3 @@ namespace :vm do
abort
"'vagrant destroy' failed"
unless
result
end
end
namespace
:basebox
do
task
:create_preseed_cfg
=>
'validate_http_proxy'
do
require
'erb'
preseed_cfg_path
=
File
.
expand_path
(
'../vagrant/definitions/squeeze/preseed.cfg'
,
__FILE__
)
template
=
ERB
.
new
(
File
.
read
(
"
#{
preseed_cfg_path
}
.erb"
))
File
.
open
(
preseed_cfg_path
,
'w'
)
do
|
f
|
f
.
write
template
.
result
end
end
desc
'Create virtual machine template (a.k.a. basebox)'
task
:create_basebox
=>
[
:create_preseed_cfg
]
do
# veewee is pretty stupid regarding path handling
Dir
.
chdir
(
VAGRANT_PATH
)
do
require
'veewee'
# Veewee assumes a separate process for each task. So we mimic that.
env
=
Vagrant
::
Environment
.
new
(
:ui_class
=>
Vagrant
::
UI
::
Basic
)
Process
.
fork
do
env
.
cli
(
'basebox'
,
'build'
,
'squeeze'
)
end
Process
.
wait
abort
"Building the basebox failed (exit code:
#{
$?
.
exitstatus
}
)."
if
$?
.
exitstatus
!=
0
Process
.
fork
do
env
.
cli
(
'basebox'
,
'validate'
,
'squeeze'
)
end
Process
.
wait
abort
"Validating the basebox failed (exit code:
#{
$?
.
exitstatus
}
)."
if
$?
.
exitstatus
!=
0
Process
.
fork
do
env
.
cli
(
'basebox'
,
'export'
,
'squeeze'
)
end
Process
.
wait
abort
"Exporting the basebox failed (exit code:
#{
$?
.
exitstatus
}
)."
if
$?
.
exitstatus
!=
0
end
end
end
auto/build
View file @
1138ffbe
...
...
@@ -65,7 +65,7 @@ chmod -R go+rX config/chroot_sources
# build the image
:
$
{
MKSQUASHFS_OPTIONS
:
=
'-comp xz'
}
:
$
{
MKSQUASHFS_OPTIONS
:
=
'-comp xz
-Xbcj x86 -b 1024K -Xdict-size 1024K
'
}
MKSQUASHFS_OPTIONS
=
"${MKSQUASHFS_OPTIONS} -wildcards -ef chroot/usr/share/amnesia/build/mksquashfs-excludes"
export
MKSQUASHFS_OPTIONS
...
...
auto/config
View file @
1138ffbe
...
...
@@ -35,7 +35,7 @@ $RUN_LB_CONFIG \
--memtest
none
\
--packages-lists
=
"standard"
\
--tasks
=
"standard"
\
--linux-packages
=
"linux-image-3.1
4-1
"
\
--linux-packages
=
"linux-image-3.1
6-3
"
\
--syslinux-menu
vesamenu
\
--syslinux-splash
data/splash.png
\
--syslinux-timeout
4
\
...
...
config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem
View file @
1138ffbe
...
...
@@ -43,11 +43,13 @@ cp "$CHROOT_SYSLINUX_MBR" "$BINARY_MBR_DIR/mbr.bin"
cat chroot
/etc/apt/sources.list
chroot
/etc/apt/sources.list.d/
*
.list
\
|
sed
--regexp-extended
-e
's,^deb(\s+),deb-src\1,'
\
>
"
$CHROOT_TEMP_APT_SOURCES
"
mv chroot
/etc/apt/apt.conf.d/
{
,.
}
0000runtime-proxy
Chroot
chroot
apt-get
--yes
update
Chroot
chroot
apt-get
--yes
install
dpkg-dev
Chroot
chroot
apt-get
source
syslinux
=
"
$(
syslinux_deb_version_in_chroot
)
"
cp chroot
/syslinux-
*
/bios/win32/syslinux.exe
"
$WIN32_BINARY_UTILS_DIR
/"
rm
-r
chroot
/syslinux
*
rm
"
$CHROOT_TEMP_APT_SOURCES
"
mv chroot
/etc/apt/apt.conf.d/
{
.,
}
0000runtime-proxy
Chroot
chroot
apt-get
--yes
update
Chroot
chroot
apt-get
--yes
purge dpkg-dev make
# dpkg-dev depends on make
config/binary_local-hooks/99-syslinux_uefi
View file @
1138ffbe
...
...
@@ -33,7 +33,7 @@ esac
# Main
mkdir
-p
binary/EFI/BOOT
cp chroot
/usr/lib/SYSLINUX/efi64/syslinux.efi binary/EFI/BOOT/bootx64.efi
cp chroot
/usr/lib/SYSLINUX
.EFI
/efi64/syslinux.efi binary/EFI/BOOT/bootx64.efi
cp chroot
/usr/share/tails/bootx64.png binary/EFI/BOOT/
cp
"
$SYSLINUX_PATH
"
/
*
binary/EFI/BOOT/
cp
-f
chroot
/usr/lib/syslinux/modules/efi64/
*
binary/EFI/BOOT/
...
...
config/binary_rootfs/squashfs.sort
View file @
1138ffbe
This diff is collapsed.
Click to expand it.
config/chroot_apt/preferences
View file @
1138ffbe
...
...
@@ -18,6 +18,14 @@ Package: bilibop-udev
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
Package: cryptsetup
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
Package: cryptsetup-bin
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
Package: florence
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
...
...
@@ -94,6 +102,10 @@ Package: iucode-tool
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
Package: libcryptsetup4
Pin: release o=Debian Backports,n=wheezy-backports
Pin-Priority: 999
Package: linux-base
Pin: release o=Debian,a=unstable
Pin-Priority: 999
...
...
@@ -114,19 +126,19 @@ Package: linux-headers-amd64
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-headers-3.1
4-1
-common
Package: linux-headers-3.1
6-3
-common
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-headers-3.1
4-1
-486
Package: linux-headers-3.1
6-3
-486
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-headers-3.1
4-1
-686-pae
Package: linux-headers-3.1
6-3
-686-pae
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-headers-3.1
4-1
-amd64
Package: linux-headers-3.1
6-3
-amd64
Pin: release o=Debian,a=unstable
Pin-Priority: 999
...
...
@@ -142,19 +154,19 @@ Package: linux-image-amd64
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-image-3.1
4-1
-486
Package: linux-image-3.1
6-3
-486
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-image-3.1
4-1
-686-pae
Package: linux-image-3.1
6-3
-686-pae
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-image-3.1
4-1
-amd64
Package: linux-image-3.1
6-3
-amd64
Pin: release o=Debian,a=unstable
Pin-Priority: 999
Package: linux-kbuild-3.1
4
Package: linux-kbuild-3.1
6
Pin: release o=Debian,a=unstable
Pin-Priority: 999
...
...
@@ -198,10 +210,6 @@ Package: ttdnsd
Pin: release o=TorProject,a=unstable
Pin-Priority: 999
Package: xul-ext-foxyproxy-standard
Pin: release o=Debian,a=experimental
Pin-Priority: 999
Package: xul-ext-https-everywhere
Pin: release o=Debian,a=unstable
Pin-Priority: 999
...
...
@@ -220,11 +228,11 @@ Pin: origin deb.tails.boum.org
Pin-Priority: 1005
Package: *
Pin:
origin mozilla.debian.net
Pin:
release o=Debian,n=wheezy-updates
Pin-Priority: 990
Package: *
Pin: release o=Debian,n=wheezy-updates
Pin: release o=Debian,n=wheezy-
proposed-
updates
Pin-Priority: 990
Package: *
...
...
config/chroot_local-hooks/06-adduser_i2pbrowser
0 → 100755
View file @
1138ffbe
#!/bin/sh
set
-e
# Create the i2pbrowser user.
#
# We run i2p-browser under this user
echo
"Creating the i2pbrowser user"
adduser
--system
--quiet
--group
i2pbrowser
config/chroot_local-hooks/10-tbb
0 → 100755
View file @
1138ffbe
#!/bin/sh
set
-eu
echo
"Install the Tor Browser"
# Import the TBB_INSTALL, TBB_PROFILE and TBB_EXT variables, which
# contains the paths we will split TBB's actual browser (binaries
# etc), user data and extension into. While this differs from how the
# TBB organizes the files, the end result will be the same, and it's
# practical since when creating a new browser profile we can simply
# copy the profile directory without duplicating all extensions.
.
/usr/local/lib/tails-shell-library/tor-browser.sh
download_and_verify_files
()
{
local
base_url bundles destination apt_proxy
base_url
=
"
${
1
}
"
bundles
=
"
${
2
}
"
destination
=
"
${
3
}
"
# Use the builder's caching APT proxy, if any
apt_proxy
=
"
$(
apt-config
--format
'%v'
dump Acquire::http::Proxy
)
"
if
[
-n
"
${
apt_proxy
}
"
]
;
then
export
HTTP_PROXY
=
"
${
apt_proxy
}
"
export
http_proxy
=
"
${
apt_proxy
}
"
export
HTTPS_PROXY
=
"
${
apt_proxy
}
"
export
https_proxy
=
"
${
apt_proxy
}
"
fi
echo
"
${
bundles
}
"
|
while
read
expected_sha256 tarball
;
do
(
cd
"
${
destination
}
"
echo
"Fetching
${
base_url
}
/
${
tarball
}
..."
curl
--remote-name
"
${
base_url
}
/
${
tarball
}
"
)
actual_sha256
=
"
$(
sha256sum
"
${
destination
}
/
${
tarball
}
"
|
cut
-d
' '
-f1
)
"
if
[
"
${
actual_sha256
}
"
!=
"
${
expected_sha256
}
"
]
;
then
echo
"SHA256 mismatch for
${
tarball
}
"
>
&2
exit
1
fi
done
}
install_tor_browser
()
{
local
bundle destination tmp prep
bundle
=
"
${
1
}
"
destination
=
"
${
2
}
"
tmp
=
"
$(
mktemp
-d
)
"
tar
-xf
"
${
bundle
}
"
-C
"
${
tmp
}
"
tor-browser_en-US
prep
=
"
${
tmp
}
"
/tor-browser_en-US/Browser
# Enable our myspell/hunspell dictionaries. TBB only provides the
# one for en-US, but Debian's seems more comprehensive, so we'll
# only use Debian's dictionaries.
rm
-f
"
${
prep
}
"
/dictionaries/
*
for
f
in
/usr/share/hunspell/
*
.aff /usr/share/hunspell/
*
.dic
;
do
ln
-s
"
${
f
}
"
"
${
prep
}
"
/dictionaries/
done
# The libstdc++6 package in Wheezy is too old, so we need the
# bundled one.
cp
"
${
prep
}
"
/TorBrowser/Tor/libstdc++.so.6
"
${
prep
}
"
# We don't need the Tor binary, the shared libraries Tor needs
# (but Firefox doesn't) and documentation shipped in the TBB.
rm
-r
"
${
prep
}
"
/TorBrowser/Tor
"
${
prep
}
"
/TorBrowser/Docs
# We don't want tor-launcher to be part of the regular browser
# profile. Moreover, for the stand-alone tor-launcher we use, we
# need our patched version. So, the version shipped in the TB
# really is not useful for us.
rm
"
${
prep
}
/TorBrowser/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi"
# Remove TBB's torbutton since the "Tor test" will fail and about:tor
# will report an error. We'll install our own Torbutton later, which
# has the extensions.torbutton.test_enabled boolean pref as a workaround.
rm
"
${
prep
}
/TorBrowser/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi"
# The Tor Browser will fail, complaining about an incomplete profile,
# unless there's a readable TorBrowser/Data/Browser/Caches
# in the directory where the firefox executable is located.
mkdir
-p
"
${
prep
}
"
/TorBrowser/Data/Browser/Caches
mv
"
${
prep
}
"
"
${
destination
}
"
rm
-r
"
${
tmp
}
"
}
install_langpacks_from_bundles
()
{
local
bundles_dir destination
bundles_dir
=
"
${
1
}
"
destination
=
"
${
2
}
"
for
tarball
in
"
${
bundles_dir
}
"
/tor-browser-
*
.tar.xz
;
do
locale
=
"
$(
echo
"
${
tarball
}
"
|
sed
"s@^.*/tor-browser-.*_
\(
.*
\)\.
tar
\.
xz@
\1
@"
)
"
if
[
"
${
locale
}
"
=
en-US
]
;
then
continue
fi
xpi
=
"tor-browser_
${
locale
}
/Browser/TorBrowser/Data/Browser/profile.default/extensions/langpack-
${
locale
}
@firefox.mozilla.org.xpi"
(
cd
"
${
bundles_dir
}
"
tar
-xf
"
${
tarball
}
"
"
${
xpi
}
"
mv
"
${
xpi
}
"
"
${
destination
}
"
)
done
}
get_firefox_version
()
{
# The application.ini file
local
appini
appini
=
"
${
1
}
"
sed
-n
's/^Version=\(.*\)$/\1/p'
"
${
appini
}
"
}
# Create and install a fake iceweasel package so we can install our
# desired Debian-packaged Iceweasel addons
install_fake_iceweasel_pkg
()
{
local
fake_version tmp
fake_version
=
"
${
1
}
"
tmp
=
"
$(
mktemp
-d
)
"
apt-get
install
--yes
equivs
cat
>
"
${
tmp
}
"
/iceweasel.control
<<
EOF
Section: web
Priority: optional
Homepage: https://tails.boum.org/
Standards-Version: 3.6.2
Package: iceweasel
Version:
${
fake_version
}
Maintainer: Tails developers <amnesia@boum.org>
Architecture: all
Description: (Fake) Iceweasel
Make it possible to install Debian's Iceweasel addons without having to
install a real Iceweasel.
EOF
(
cd
"
${
tmp
}
"
equivs-build
"
${
tmp
}
"
/iceweasel.control
dpkg
-i
"
${
tmp
}
"
/iceweasel_
"
${
fake_version
}
"
_all.deb
)
rm
-R
"
${
tmp
}
"
}
install_debian_extensions
()
{
local
destination
destination
=
"
${
1
}
"
shift
apt-get
install
--yes
"
${
@
}
"
ln
-s
/usr/share/xul-ext/adblock-plus/
\
"
${
destination
}
"
/
'{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}'
ln
-s
/usr/share/xul-ext/torbutton/
\
"
${
destination
}
"
/torbutton@torproject.org
}
create_default_profile
()
{
local
tbb_profile extensions_dir destination
tbb_profile
=
"
${
1
}
"
tbb_extensions_dir
=
"
${
2
}
"
destination
=
"
${
3
}
"
rsync
-a
--exclude
bookmarks.html
--exclude
extensions
\
"
${
tbb_profile
}
"
/
"
${
destination
}
"
/
# Remove TBB's default bridges
sed
-i
'/extensions\.torlauncher\.default_bridge\./d'
"
${
destination
}
"
/preferences/extension-overrides.js
mkdir
-p
"
${
destination
}
"
/extensions
for
ext
in
"
${
tbb_extensions_dir
}
"
/
*
;
do
ln
-s
"
${
ext
}
"
"
${
destination
}
"
/extensions/
done
}
TBB_SHA256SUMS_FILE
=
/usr/share/tails/tbb-sha256sums.txt
TBB_TARBALLS
=
"
$(
grep
"
\<
tor-browser-linux32-.*
\.
tar.xz$"
"
${
TBB_SHA256SUMS_FILE
}
"
)
"
# We'll use the en-US bundle as our basis; only langpacks will be
# installed from the other bundles.
MAIN_TARBALL
=
"
$(
echo
"
${
TBB_TARBALLS
}
"
|
grep
-o
"tor-browser-linux32-.*_en-US.tar.xz"
)
"
VERSION
=
"
$(
echo
"
${
MAIN_TARBALL
}
"
|
sed
's/tor-browser-linux32-\(.*\)_en-US.tar.xz/\1/'
)
"
TBB_DIST_URL_FILE
=
/usr/share/tails/tbb-dist-url.txt
TBB_TARBALLS_BASE_URL
=
"
$(
cat
"
${
TBB_DIST_URL_FILE
}
"
)
/
${
VERSION
}
"
# The Debian Iceweasel extensions we want to install and make
# available in the Tor Browser.
DEBIAN_EXT_PKGS
=
"xul-ext-adblock-plus xul-ext-torbutton"
TMP
=
"
$(
mktemp
-d
)
"
download_and_verify_files
"
${
TBB_TARBALLS_BASE_URL
}
"
"
${
TBB_TARBALLS
}
"
"
${
TMP
}
"
install_tor_browser
"
${
TMP
}
/
${
MAIN_TARBALL
}
"
"
${
TBB_INSTALL
}
"
mkdir
-p
"
${
TBB_EXT
}
"
install_langpacks_from_bundles
"
${
TMP
}
"
"
${
TBB_EXT
}
"
rm
-r
"
${
TMP
}
"
# Let's put all the extensions from TBB in the global extensions
# directory...
mv
"
${
TBB_INSTALL
}
"
/TorBrowser/Data/Browser/profile.default/extensions/
*
"
${
TBB_EXT
}
"
rmdir
"
${
TBB_INSTALL
}
"
/TorBrowser/Data/Browser/profile.default/extensions
# ... and then install a few Iceweasel extension by using a fake
# Iceweasel equivs package to satisfy the dependencies.
FIREFOX_VERSION
=
$(
get_firefox_version
"
${
TBB_INSTALL
}
"
/application.ini
)
FAKE_ICEWEASEL_VERSION
=
${
FIREFOX_VERSION
}
+fake1
install_fake_iceweasel_pkg
"
${
FAKE_ICEWEASEL_VERSION
}
"
install_debian_extensions
"
${
TBB_EXT
}
"
${
DEBIAN_EXT_PKGS
}
mkdir
-p
"
${
TBB_PROFILE
}
"
create_default_profile
"
${
TBB_INSTALL
}
"
/TorBrowser/Data/Browser/profile.default
"
${
TBB_EXT
}
"
"
${
TBB_PROFILE
}
"
chown
-R
root:root
"
${
TBB_INSTALL
}
"
"
${
TBB_PROFILE
}
"
"
${
TBB_EXT
}
"
chmod
-R
a+rX
"
${
TBB_INSTALL
}
"
"
${
TBB_PROFILE
}
"
"
${
TBB_EXT
}
"
# Make the Tor Browser into the system's default web browser
update-alternatives
--install
/usr/bin/x-www-browser x-www-browser /usr/local/bin/tor-browser 99
update-alternatives
--install
/usr/bin/gnome-www-browser gnome-www-browser /usr/local/bin/tor-browser 99
config/chroot_local-hooks/12-install_browser_searchplugins
0 → 100755
View file @
1138ffbe
#!/bin/sh
set
-e
echo
"Install extra browser search plugins"
# Import the TBB_EXT variable
.
/usr/local/lib/tails-shell-library/tor-browser.sh
LOCALIZED_PLUGINS_DIR
=
/usr/share/amnesia/browser/searchplugins/locale
for
langpack
in
"
${
TBB_EXT
}
"
/langpack-
*
@firefox.mozilla.org.xpi
;
do
locale
=
"
$(
basename
"
${
langpack
}
"
|
sed
's,^langpack-\([^@]\+\)@.*$,\1,'
)
"
pkg
=
iceweasel-l10n-
"
$(
echo
${
locale
}
|
tr
'A-Z'
'a-z'
)
"
tmp
=
"
$(
mktemp
-d
)
"
cd
"
${
tmp
}
"
apt-get download
"
${
pkg
}
"
ar x
"
${
pkg
}
"
*
.deb
path_to_searchplugins
=
etc/iceweasel/searchplugins/locale/
"
${
locale
}
"
tar
xf data.tar.
*
--wildcards
./
"
${
path_to_searchplugins
}
"
/wikipedia-
'*'
.xml
mkdir
-p
"
${
LOCALIZED_PLUGINS_DIR
}
"
/
"
${
locale
}
"
cp
"
${
path_to_searchplugins
}
"
/
*
"
${
LOCALIZED_PLUGINS_DIR
}
"
/
"
${
locale
}
"
cd
/
rm
-r
"
${
tmp
}
"
done
config/chroot_local-hooks/12-remove_unwanted_browser_searchplugins
0 → 100755
View file @
1138ffbe
#!/bin/sh
set
-e
# Remove unwanted browser search plugins.
echo
"Removing unwanted browser search plugins"
# Import the TBB_INSTALL variable
.
/usr/local/lib/tails-shell-library/tor-browser.sh
PLUGIN_DIR
=
"
${
TBB_INSTALL
}
"
/browser/searchplugins
rm
"
${
PLUGIN_DIR
}
"
/amazon
*
.xml
rm
"
${
PLUGIN_DIR
}
"
/bing
*
.xml
rm
"
${
PLUGIN_DIR
}
"
/eBay
*
.xml
rm
"
${
PLUGIN_DIR
}
"
/yahoo
*
.xml
config/chroot_local-hooks/12-remove_unwanted_iceweasel_searchplugins
deleted
100755 → 0
View file @
56c42191
#!/bin/sh
set
-e
# Remove unwanted iceweasel search plugins.
echo
"Removing unwanted iceweasel search plugins"
rm
/etc/iceweasel/searchplugins/common/duckduckgo.xml
rm
/etc/iceweasel/searchplugins/locale/
*
/amazon
*
.xml
rm
/etc/iceweasel/searchplugins/locale/
*
/answers.xml
rm
/etc/iceweasel/searchplugins/locale/
*
/bing
*
.xml
rm
/etc/iceweasel/searchplugins/locale/
*
/eBay
*
.xml
rm
/etc/iceweasel/searchplugins/locale/
*
/yahoo
*
.xml
config/chroot_local-hooks/13-iceweasel_sqlite
deleted
100755 → 0
View file @
56c42191
#!/bin/sh
set
-e
# Build binary sqlite iceweasel files from plain text SQL files.
echo
"Building iceweasel sqlite files"
INSTALLED_PACKAGES
=
"sqlite3"
SQL_SRC_DIR
=
/usr/share/amnesia/iceweasel/sql
ICEWEASEL_PROFILE_DIR
=
/etc/iceweasel/profile
[
-d
"
${
SQL_SRC_DIR
}
"
]
||
exit
11
apt-get
install
--yes
$INSTALLED_PACKAGES
for
sql_src_file
in
${
SQL_SRC_DIR
}
/
*
.sql
;
do
db
=
"
$(
basename
${
sql_src_file
}
|
sed
-e
's|\.sql$||'
)
"
dst_file
=
"
${
ICEWEASEL_PROFILE_DIR
}
/
${
db
}
.sqlite"
sqlite3
"
${
dst_file
}
"
<
"
${
sql_src_file
}
"
done
rm
-rf
${
SQL_SRC_DIR
}
apt-get
--yes
purge
$INSTALLED_PACKAGES
config/chroot_local-hooks/13-override-tbb-branding
View file @
1138ffbe
...
...
@@ -4,7 +4,10 @@ set -e
echo
"Overriding TBB branding with our own"
# Import the TBB_PROFILE variable.
.
/usr/local/lib/tails-shell-library/tor-browser.sh
install
--owner
root
--group
root
--mode
0755
--directory
/etc/xul-ext
install
--owner
root
--group
root
--mode
0644
\
/etc/iceweasel/profile
/extensions/branding@amnesia.boum.org/defaults/preferences/prefs.js
\
"
${
TBB_PROFILE
}
"
/extensions/branding@amnesia.boum.org/defaults/preferences/prefs.js
\
/etc/xul-ext/torbutton.js
config/chroot_local-hooks/14-add_localized_browser_searchplugins
0 → 100755
View file @
1138ffbe
#!/bin/sh
set
-e
echo
"Setting up localized browser search plugins"
# Link localized Tails searchplugins to the proper localization directories:
# e.g. files in '/usr/share/amnesia/browser/searchplugins/locale/es' will be
# linked in '/etc/tor-browser/profile/searchplugins/locale/es-AR',
# '/etc/tor-browser/profile/searchplugins/locale/es-ES', etc.
# Import the TBB_INSTALL and TBB_EXT variables
.
/usr/local/lib/tails-shell-library/tor-browser.sh
locales_for_lang
()
{
local
locale
=
"
$1
"
local
langpacks
find
"
${
TBB_EXT
}
"
-maxdepth
1
-type
f
-name
'langpack-*@firefox.mozilla.org.xpi'
-printf
"%P
\n
"
|
sed
-n
-e
"s/^langpack-
\(
$locale
\)\(
-[A-Z]
\+\)\?
@firefox.mozilla.org.xpi/
\1\2
/p"
}
for
LANGUAGE
in
$(
find /usr/share/amnesia/browser/searchplugins/locale
-maxdepth
1
-type
d
-printf
"%P
\n
"
)
;
do
LOCALES
=
"
$(
locales_for_lang
"
$LANGUAGE
"
)
"
if
[
-z
"
$LOCALES
"
]
;
then
echo
"Unable to find a matching locale for
$LANGUAGE
."
>
&2
exit
1
fi
for
LOCALE
in
$LOCALES
;
do
mkdir
-p
"
${
TBB_INSTALL
}
"
/distribution/searchplugins/locale/
$LOCALE
for
SEARCHPLUGIN
in
$(
find
"/usr/share/amnesia/browser/searchplugins/locale/
$LANGUAGE
"
-maxdepth
1
-type
f
)
;
do
ln
-s
"
$SEARCHPLUGIN
"
"
${
TBB_INSTALL
}
"
/distribution/searchplugins/locale/
$LOCALE
done
done
done
config/chroot_local-hooks/14-add_localized_iceweasel_searchplugins
deleted
100755 → 0
View file @
56c42191
#!/bin/sh
set
-e
echo
"Setting up localized iceweasel search plugins"
# Link localized Tails searchplugins to the proper localization directories:
# e.g. files in '/usr/share/amnesia/iceweasel/searchplugins/locale/es' will be
# linked in '/etc/iceweasel/searchplugins/locale/es-AR',
# '/etc/iceweasel/searchplugins/locale/es-ES', etc.
locales_for_lang
()
{
local
locale
=
"
$1
"
local
langpacks
find /usr/lib/iceweasel/browser/extensions
-maxdepth
1
-type
f
-name
'langpack-*@iceweasel.mozilla.org.xpi'
-printf
"%P
\n
"
|
sed
-n
-e
"s/^langpack-
\(
$locale
\)\(
-[A-Z]
\+\)\?
@iceweasel.mozilla.org.xpi/
\1\2
/p"
}
for
LANGUAGE
in
$(
find /usr/share/amnesia/iceweasel/searchplugins/locale
-maxdepth
1
-type
d
-printf
"%P
\n
"
)
;
do
LOCALES
=
"
$(
locales_for_lang
"
$LANGUAGE
"
)
"
if
[
-z
"
$LOCALES
"
]
;
then
echo
"Unable to find a matching locale for
$LANGUAGE
."
>
&2
exit
1
fi
for
LOCALE
in
$LOCALES
;
do
mkdir
-p
/etc/iceweasel/searchplugins/locale/
$LOCALE
for
SEARCHPLUGIN
in
$(
find
"/usr/share/amnesia/iceweasel/searchplugins/locale/
$LANGUAGE
"
-maxdepth
1
-type
f
)
;
do
ln
-s
"
$SEARCHPLUGIN
"
/etc/iceweasel/searchplugins/locale/
$LOCALE
done
done
done
config/chroot_local-hooks/14-generate-iceweasel-profile
deleted
100755 → 0
View file @
56c42191
#!/bin/sh
echo
"Generating iceweasel profile"
#generate iceweasel profile at build time, so that it has a fixed name
set
-e