Commit 87e86760 authored by intrigeri's avatar intrigeri
Browse files

Merge branch 'feature/8654-encode-apt-suite-in-git' into bugfix/9044-syslinux-on-chromebooks

Conflicts:
	debian/changelog
parents d8b0ffe7 ad1590d2
#!/bin/bash
# set -x
set -x
umask 022
......@@ -102,6 +102,34 @@ else
fi
fi
GIT_BASE_BRANCH=$(head -n1 config/base_branch) \
|| fatal "GIT_BASE_BRANCH could not be guessed."
# Merge base branch into the branch being built, iff. we're building
# in Jenkins, and not building from a tag, and not building the base
# branch itself
if [ -n "$JENKINS_URL" ] && [ -z "$GIT_TAG" ] \
&& [ "$GIT_BRANCH" != "$GIT_BASE_BRANCH" ] ; then
GIT_BASE_BRANCH_COMMIT=$(git rev-parse "origin/${GIT_BASE_BRANCH}") \
|| fatal "Base branch's top commit could not be guessed."
cat > .git/info/attributes <<-EOF
config/APT_overlays merge=union
EOF
echo "Merging base branch origin/${GIT_BASE_BRANCH}"
echo "(at commit ${GIT_BASE_BRANCH_COMMIT})..."
git merge --no-edit "origin/${GIT_BASE_BRANCH}" \
|| fatal "Failed to merge base branch."
# Adjust BUILD_BASENAME to embed the base branch name and its top commit
CLEAN_GIT_BASE_BRANCH=$(echo "$GIT_BASE_BRANCH" | sed 's,/,_,g')
GIT_BASE_BRANCH_SHORT_ID=$(git rev-parse --short "origin/${GIT_BASE_BRANCH}") \
|| fatal "Base branch's top commit short ID could not be guessed."
BUILD_BASENAME="${BUILD_BASENAME}+${CLEAN_GIT_BASE_BRANCH}"
BUILD_BASENAME="${BUILD_BASENAME}@${GIT_BASE_BRANCH_SHORT_ID}"
fi
case "$LB_BINARY_IMAGES" in
iso)
BUILD_FILENAME_EXT=iso
......
#!/bin/sh
set -x
for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
if mountpoint -q "$dir" ; then
umount "$dir"
......
#! /bin/sh
# automatically run by "lb config"
set -x
# we require building from git
if ! git rev-parse --is-inside-work-tree; then
echo "${PWD} is not a Git tree. Exiting."
......
......@@ -4,6 +4,12 @@ set -e
APT_MIRROR_URL="http://deb.tails.boum.org/"
DEFAULT_COMPONENTS="main"
BASE_BRANCHES="stable testing devel feature/jessie"
fatal() {
echo "$*" >&2
exit 1
}
git_tag_exists() {
local tag="$1"
......@@ -29,12 +35,30 @@ output_apt_binary_source() {
echo "deb $APT_MIRROR_URL $suite $components"
}
output_overlay_apt_binary_sources() {
for suite in $(cat config/APT_overlays) ; do
output_apt_binary_source "$suite"
done
}
current_branch() {
git branch | awk '/^\* / { print $2 }'
}
on_topic_branch() {
current_branch | grep -qE '^(feature|bug|bugfix)/'
on_base_branch() {
local current_branch=$(current_branch)
for base_branch in $BASE_BRANCHES ; do
if [ "$current_branch" = "$base_branch" ] ; then
return 0
fi
done
return 1
}
base_branch() {
cat config/base_branch | head -n1
}
branch_name_to_suite() {
......@@ -43,19 +67,29 @@ branch_name_to_suite() {
echo "$branch" | sed -e 's,[^.a-z0-9-],-,ig' | tr '[A-Z]' '[a-z]'
}
### Sanity checks
[ -e config/APT_overlays ] || fatal 'config/APT_overlays does not exist'
[ -e config/base_branch ] || fatal 'config/base_branch does not exist'
[ "$(cat config/base_branch | wc -l)" -eq 1 ] \
|| fatal 'config/base_branch must contain exactly one line'
if on_base_branch && ! [ "$(base_branch)" = "$(current_branch)" ] ; then
echo "base_branch: $(base_branch)" >&2
echo "current_branch: $(current_branch)" >&2
fatal "In a base branch, config/base_branch must match the current branch."
fi
### Main
if version_was_released "$(version_in_changelog)"; then
if [ -s config/APT_overlays ]; then
fatal 'config/APT_overlays must be empty while releasing'
fi
output_apt_binary_source "$(branch_name_to_suite "$(version_in_changelog)")"
elif [ "$(current_branch)" = "stable" ]; then
output_apt_binary_source stable
elif [ "$(current_branch)" = "testing" ]; then
output_apt_binary_source testing
elif [ "$(current_branch)" = "experimental" ]; then
output_apt_binary_source experimental
else
output_apt_binary_source devel
output_apt_binary_source "$(branch_name_to_suite "$(base_branch)")"
output_overlay_apt_binary_sources
fi
if on_topic_branch; then
output_apt_binary_source "$(branch_name_to_suite $(current_branch))"
fi
This diff is collapsed.
#!/bin/sh
# XXX: This hook is only needed in Wheezy-based Tails to fix #9011 and
# should be removed once Tails is based on Jessie.
set -e
echo "Fune-tuning syndaemon"
SYNDAEMON_PATH="/usr/bin/syndaemon"
SYNDAEMON_ORIG_PATH="${SYNDAEMON_PATH}.distrib"
dpkg-divert --rename --add "${SYNDAEMON_PATH}"
[ -x "${SYNDAEMON_ORIG_PATH}" ] || exit 1
cat > "${SYNDAEMON_PATH}" <<EOF
#!/bin/sh
# Temporary workaround for #9011 while Tails is based on Wheezy.
if ! echo "\${@}" | grep -qw -- "-t"; then
set -- "\${@}" -t
fi
exec ${SYNDAEMON_ORIG_PATH} "\${@}"
EOF
chmod a+rx "${SYNDAEMON_PATH}"
......@@ -74,9 +74,13 @@ mac_spoof_panic() {
spoof_mac() {
local msg
if ! msg=$(macchanger -e "${1}" 2>&1); then
log "macchanger failed for NIC ${1}, returned ${?} and said: ${msg}"
return 1
set +e
msg="$(macchanger -e "${1}" 2>&1)"
ret="${?}"
set -e
if [ "${ret}" != 0 ]; then
log "macchanger failed for NIC ${1}, returned ${ret} and said: ${msg}"
exit 1
fi
}
......
c5877f9d9eac3f6ce5867f854981fc0196e2a66e08d77382e30a24f6724b06ab tor-browser-linux32-4.0.5_ar.tar.xz
b82fb144d928670c65a79efba03e6e3986028ef8f21f0dca6521391bf1eb97be tor-browser-linux32-4.0.5_de.tar.xz
c30c9897d3bf0056a36eafe5f5f8fe0c5e6b6077b5db1e62aed7503f07f992fa tor-browser-linux32-4.0.5_en-US.tar.xz
97b8c02291aefd0c26a58bea195f0bdbb3e674bedde86b2932d7c967ed94e5e8 tor-browser-linux32-4.0.5_es-ES.tar.xz
2416715fa5ce22e418aded24036410a6b46d63699cb503a3a2c4ef76926059c9 tor-browser-linux32-4.0.5_fa.tar.xz
9a302024b7f4f3fbfc5f6ac308f709813ded1e70326dfcc25b01daed2bc25c3c tor-browser-linux32-4.0.5_fr.tar.xz
3fdc087b3cdca20d8ef3cf3e857a63d3a1f19dfa9c13c4961b2fa7a5e8e64536 tor-browser-linux32-4.0.5_it.tar.xz
12a2f113728a36b318d01df8104f22e2ff0042e1b4532b0b16daa03406c06848 tor-browser-linux32-4.0.5_ko.tar.xz
d63aa334b11e986eec56abb06f2f41997c018da46c489b0533598e6213651b07 tor-browser-linux32-4.0.5_nl.tar.xz
8a7ee62ef9ac1c158239c1361e769c472f0ef70139898306d3f621756f98d80a tor-browser-linux32-4.0.5_pl.tar.xz
d98e37b95c665668a6b9235cdd657cfbfb19cf7bfbe2d3a277b7b664b59b2f50 tor-browser-linux32-4.0.5_pt-PT.tar.xz
7f4b244f0a69d0e7520ef3b12519b3dfcf01bbf161000bc4808d439eef979fd6 tor-browser-linux32-4.0.5_ru.tar.xz
34420fa5afc306d63b394068f026440fff97ebc8724edba1ce23c53a5aaa2c8b tor-browser-linux32-4.0.5_tr.tar.xz
4252d062ac002988c13fb718771d6f4ebe17f93b0ab8e2920e78038132d5a148 tor-browser-linux32-4.0.5_vi.tar.xz
0577c1e91d2b9be22731bdf9607caf93f78e62a806b4b46f8c24385f991abba7 tor-browser-linux32-4.0.5_zh-CN.tar.xz
406424d7f1ad3855d289588302727af1b768f953866b64250ef6a6f5cb606cdf tor-browser-linux32-4.0.6_ar.tar.xz
f6e9cac6a7fe0dd8f07f3ae6db4825dd01f3c7107cf5cc76e3225941278465ea tor-browser-linux32-4.0.6_de.tar.xz
89ce71312f5d73fc2af637a93d7697587b2132fce0e9f6e815b25ddba66518d0 tor-browser-linux32-4.0.6_en-US.tar.xz
aaad62547d6e853ebd7c1b9caf015b7bface28b0361a8cd2237a74b2b0585828 tor-browser-linux32-4.0.6_es-ES.tar.xz
957d2bacb6ec31f5412e5116e638ea8400c87d605a073f821c28920b9ef22ab6 tor-browser-linux32-4.0.6_fa.tar.xz
50c5f81766919b69ee7821bdcd5afb0c8e5502acbadcc5cf8a7584c219aa7591 tor-browser-linux32-4.0.6_fr.tar.xz
58a5e97a20758d403b117739592447b9f9c18f76260014cb1608be7336ae2a0c tor-browser-linux32-4.0.6_it.tar.xz
70c474140954f0d8c987eeb6d1aa3af3635f6f42d44bc6b6bb27ed8b3849ba7f tor-browser-linux32-4.0.6_ko.tar.xz
1f1f62672c38a72ee3680ba957bf0e5a283cf53e50ea7c359838e74142d965c6 tor-browser-linux32-4.0.6_nl.tar.xz
1405aa494de347c2969a25b65b63fa298d2e75d5614463bc40d1e750797903cd tor-browser-linux32-4.0.6_pl.tar.xz
3fea4dd1b4a8454cdd0e1da04db96911ede00eb281c1e0310968ec456e1043ec tor-browser-linux32-4.0.6_pt-PT.tar.xz
62895f4e44c1697efd6fde5ca5980ba65b567cf715fe2aa0d808857806d32067 tor-browser-linux32-4.0.6_ru.tar.xz
4a317403d798a776845d7cc8a5256106782e688920190507e0de39fe36cc6684 tor-browser-linux32-4.0.6_tr.tar.xz
d199acd8fe1f30b89dbe7e922887c14e420352f35954bed8095bbed1d637c687 tor-browser-linux32-4.0.6_vi.tar.xz
dc36fb7f93eca06a640f645fe8ba78bea97da17163434b00de3471f816f6c98e tor-browser-linux32-4.0.6_zh-CN.tar.xz
......@@ -4,11 +4,59 @@ tails (1.4) UNRELEASED; urgency=medium
-- Tails developers <tails@boum.org> Tue, 12 May 2015 12:34:56 +0000
tails (1.3.2) UNRELEASED; urgency=medium
tails (1.3.3) UNRELEASED; urgency=medium
* Dummy entry for next release.
* Dummy entry.
-- Tails developers <tails@boum.org> Tue, 31 Mar 2015 11:34:13 +0100
-- Tails developers <tails@boum.org> Tue, 31 Mar 2015 21:56:58 +0200
tails (1.3.2) unstable; urgency=medium
* Security fixes
- Upgrade Tor Browser to 4.0.6, based on Firefox 31.6.0 ESR.
- Upgrade OpenSSL to 1.0.1e-2+deb7u16.
* Bugfixes
- Make Florence usable with touchpads by forcing syndaemon to
always use the `-t` option, which only disables tapping and
scrolling and not mouse movements (Closes: #9011).
- Make tails-spoof-mac log the correct macchanger exit code on
failure (Closes: #8687).
- Tails Installer:
· Ignore devices with less than 3.5 GB of storage since they
do not fit a Tails installation (Closes: #6538).
· Remove devices from the device list as they are unplugged
(Closes: #8691).
* Minor improvements
- Install obfs4proxy 0.0.4-1~tpo1, which adds support for
client-mode ScrambleSuit.
- Don't start Vidalia if Windows Camouflage is enabled. (Closes:
#7400)
- I2P Browser:
· Remove "Add-ons" from the Tools menu, and hide "Keyboard
Shortcuts" and "Take a Tour" since they point to resources on
the open Internet (Closes: #7970).
· Hide TorButton button from the customize toolbar options, and
remove configs whose only purpose was to make Torbutton "green"
(Closes: #8893).
* Test suite
- New tests:
· Test non-LAN SSH, and SFTP via GNOME's "Connect to Server"
(Closes: #6308).
· Verify that Tails' Tor binary has the expected Tor authorities
hard coded (Closes: #8960).
- Improvements:
· Programmatically determine the supported languages when testing
the Unsafe Browser (Closes: #8918).
· Rename --temp-dir to --tmpdir and make it behave more like
mktemp, and honour TMPDIR if set in the environment. (Closes:
#8709).
- Bugfixes:
· Make --temp-dir (now --tmpdir) actually work.
-- Tails developers <tails@boum.org> Mon, 30 Mar 2015 16:54:20 +0200
tails (1.3.1) unstable; urgency=medium
......
......@@ -4,72 +4,209 @@ Feature: custom APT sources to build branches
the proper APT sources were automatically picked depending
on which Git branch I am working on.
Scenario: build from an untagged stable branch
Given I am working on the stable branch
And last released version mentioned in debian/changelog is 1.0
Scenario: build from an untagged stable branch where config/APT_overlays is empty
Given I am working on the stable base branch
And the last version mentioned in debian/changelog is 1.0
And Tails 1.0 has not been released yet
When I run tails-custom-apt-sources
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'stable' suite
Scenario: build from an untagged stable branch where config/APT_overlays is not empty
Given I am working on the stable base branch
And the last version mentioned in debian/changelog is 1.0
And Tails 1.0 has not been released yet
And config/APT_overlays contains 'feature-foo'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'stable' suite
Then I should not see the '1.0' suite
And I should see the 'feature-foo' suite
And I should see the 'bugfix-bar' suite
But I should not see the '1.0' suite
Scenario: build from a tagged stable branch
Scenario: build from a tagged stable branch where config/APT_overlays is empty
Given Tails 0.10 has been released
And last released version mentioned in debian/changelog is 0.10
And I am working on the stable branch
When I run tails-custom-apt-sources
Then I should see the '0.10' suite
And the last version mentioned in debian/changelog is 0.10
And I am working on the stable base branch
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the '0.10' suite
Scenario: build from a bugfix branch for a stable release
Scenario: build from a tagged stable branch where config/APT_overlays is not empty
Given Tails 0.10 has been released
And last released version mentioned in debian/changelog is 0.10
And I am working on the bugfix/disable_gdomap branch based on 0.10
And the last version mentioned in debian/changelog is 0.10
And I am working on the stable base branch
And config/APT_overlays contains 'feature-foo'
When I run tails-custom-apt-sources
Then I should see the '0.10' suite
Then it should fail
Scenario: build from a bugfix branch without overlays for a stable release
Given Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10.1
And Tails 0.10.1 has not been released yet
And I am working on the bugfix/disable_gdomap branch based on stable
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'stable' suite
Scenario: build from a bugfix branch with overlays for a stable release
Given Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10.1
And Tails 0.10.1 has not been released yet
And I am working on the bugfix/disable_gdomap branch based on stable
And config/APT_overlays contains 'bugfix-disable-gdomap'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'stable' suite
And I should see the 'bugfix-disable-gdomap' suite
And I should see the 'bugfix-bar' suite
But I should not see the '0.10' suite
Scenario: build from an untagged testing branch
Given I am working on the testing branch
And last released version mentioned in debian/changelog is 0.11
Scenario: build from an untagged testing branch where config/APT_overlays is empty
Given I am working on the testing base branch
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has not been released yet
When I run tails-custom-apt-sources
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see the 'testing' suite
And I should not see the '0.11' suite
And I should not see the 'feature-foo' suite
And I should not see the 'bugfix-bar' suite
Scenario: build from a tagged testing branch
Given I am working on the testing branch
And last released version mentioned in debian/changelog is 0.11
Scenario: build from an untagged testing branch where config/APT_overlays is not empty
Given I am working on the testing base branch
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has not been released yet
And config/APT_overlays contains 'feature-foo'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'testing' suite
And I should see the 'feature-foo' suite
And I should see the 'bugfix-bar' suite
But I should not see the '0.11' suite
Scenario: build from a tagged testing branch where config/APT_overlays is empty
Given I am working on the testing base branch
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the '0.11' suite
Scenario: build from a tagged testing branch where config/APT_overlays is not empty
Given I am working on the testing base branch
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And config/APT_overlays contains 'feature-foo'
When I run tails-custom-apt-sources
Then I should see the '0.11' suite
And I should not see the 'testing' suite
Then it should fail
Scenario: build a release candidate from a tagged testing branch
Given I am working on the testing branch
Given I am working on the testing base branch
And Tails 0.11 has been released
And last released version mentioned in debian/changelog is 0.12~rc1
And the last version mentioned in debian/changelog is 0.12~rc1
And Tails 0.12-rc1 has been tagged
When I run tails-custom-apt-sources
Then I should see the '0.12-rc1' suite
And I should not see the 'testing' suite
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the '0.12-rc1' suite
Scenario: build from the devel branch
Given I am working on the devel branch
Scenario: build a release candidate from a tagged testing branch where config/APT_overlays is not empty
Given I am working on the testing base branch
And Tails 0.11 has been released
And the last version mentioned in debian/changelog is 0.12~rc1
And Tails 0.12-rc1 has been tagged
And config/APT_overlays contains 'bugfix-bar'
When I run tails-custom-apt-sources
Then it should fail
Scenario: build from the devel branch without overlays
Given I am working on the devel base branch
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'devel' suite
Scenario: build from the devel branch with overlays
Given I am working on the devel base branch
And config/APT_overlays contains 'feature-foo'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'devel' suite
And I should see the 'feature-foo' suite
And I should see the 'bugfix-bar' suite
Scenario: build from the feature/jessie branch without overlays
Given I am working on the feature/jessie base branch
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'feature-jessie' suite
Scenario: build from the feature/jessie branch with overlays
Given I am working on the feature/jessie base branch
And config/APT_overlays contains 'feature-7756-reintroduce-whisperback'
When I successfully run tails-custom-apt-sources
Then I should see the 'feature-jessie' suite
And I should see the 'feature-7756-reintroduce-whisperback' suite
Scenario: build from the experimental branch
Given I am working on the experimental branch
When I run tails-custom-apt-sources
Then I should see the 'experimental' suite
Given I am working on the experimental branch based on devel
And config/APT_overlays contains 'feature-foo'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'devel' suite
And I should see the 'feature-foo' suite
And I should see the 'bugfix-bar' suite
Scenario: build from a feature branch based on devel
Scenario: build from a feature branch with overlays based on devel
Given I am working on the feature/icedove branch based on devel
When I run tails-custom-apt-sources
And config/APT_overlays contains 'feature-icedove'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'devel' suite
And I should see the 'feature-icedove' suite
And I should see the 'bugfix-bar' suite
Scenario: build from a feature branch without overlays based on devel
Given I am working on the feature/icedove branch based on devel
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'devel' suite
Scenario: build from a feature branch with overlays based on feature/jessie
Given I am working on the feature/7756-reintroduce-whisperback branch based on feature/jessie
And config/APT_overlays contains 'feature-7756-reintroduce-whisperback'
And config/APT_overlays contains 'bugfix-bar'
When I successfully run tails-custom-apt-sources
Then I should see the 'feature-jessie' suite
And I should see the 'feature-7756-reintroduce-whisperback' suite
And I should see the 'bugfix-bar' suite
Scenario: build from a feature branch without overlays based on feature/jessie
Given I am working on the feature/icedove branch based on feature/jessie
And config/APT_overlays is empty
When I successfully run tails-custom-apt-sources
Then I should see only the 'feature-jessie' suite
Scenario: build from a feature branch based on devel with dots in its name
Given I am working on the feature/live-boot-3.x branch based on devel
When I run tails-custom-apt-sources
And config/APT_overlays contains 'feature-live-boot-3.x'
When I successfully run tails-custom-apt-sources
Then I should see the 'devel' suite
And I should see the 'feature-live-boot-3.x' suite
Scenario: build from a branch that has no config/APT_overlays file
Given I am working on the stable base branch
And config/APT_overlays does not exist
When I run tails-custom-apt-sources
Then it should fail
Scenario: build from a branch that has no config/base_branch file
Given I am working on the stable base branch
And config/base_branch does not exist
When I run tails-custom-apt-sources
Then it should fail
Scenario: build from a branch where config/base_branch is empty
Given I am working on the stable base branch
And config/base_branch is empty
When I run tails-custom-apt-sources
Then it should fail
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment