summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-05-17 18:24:21 +0000
committerintrigeri <intrigeri@boum.org>2016-05-17 18:24:21 +0000
commitbb8c3c9925c85edaf6c3ad9301fb619b68f07ceb (patch)
tree7d051dd82849a0a0e9a4ec09cae01be75503c0c1
parentfb8de40edcdd8b614164c58c44506e4a023c1f74 (diff)
Never freeze the debian-security snapshot, and adjust tests accordingly.
This is what our design says should be.
-rwxr-xr-xauto/scripts/apt-mirror9
-rwxr-xr-xauto/scripts/apt-snapshots-serials12
-rw-r--r--features/build.feature12
-rw-r--r--features/step_definitions/build.rb6
4 files changed, 26 insertions, 13 deletions
diff --git a/auto/scripts/apt-mirror b/auto/scripts/apt-mirror
index a20ba23..ec4adb2 100755
--- a/auto/scripts/apt-mirror
+++ b/auto/scripts/apt-mirror
@@ -39,6 +39,9 @@ if [ "$(base_branch)" = stable ]; then
|| fatal "None of the two last version in changelog were released"
case "$ARCHIVE" in
debian-security)
+ [ "$SERIAL" = latest ] \
+ || fatal "APT snapshots are frozen for debian-security, which" \
+ "should not happen on a branch based on stable"
output_time_based_snapshot "$ARCHIVE" "$RESOLVED_SERIAL"
;;
*)
@@ -56,9 +59,9 @@ elif [ "$(base_branch)" = testing ]; then
[ "$(current_branch)" = testing ] \
|| fatal "Not building from testing, but last version in changelog" \
"was released"
- [ "$SERIAL" != latest ] \
- || fatal "APT snapshots are not frozen, which should not happen on" \
- "a tagged testing branch"
+ [ "$ARCHIVE" = debian-security ] || [ "$SERIAL" != latest ] \
+ || fatal "APT snapshots for $ARCHIVE are not frozen, which should" \
+ "not happen on a tagged testing branch"
output_tagged_snapshot "$ARCHIVE" "$(version_in_changelog)"
else
output_time_based_snapshot "$ARCHIVE" "$RESOLVED_SERIAL"
diff --git a/auto/scripts/apt-snapshots-serials b/auto/scripts/apt-snapshots-serials
index 46aae2e..faee29f 100755
--- a/auto/scripts/apt-snapshots-serials
+++ b/auto/scripts/apt-snapshots-serials
@@ -26,9 +26,15 @@ case "$action" in
for origin in $ORIGINS; do
serial_file="$CONFIG/$origin/serial"
git=$(cat $serial_file)
- online=$(get_latest_serial $origin)
- printf "Origin $origin:\n old: $git\n new: $online\n"
- echo $online > $serial_file
+ case "$origin" in
+ debian-security)
+ new=latest
+ ;;
+ *)
+ new=$(get_latest_serial $origin)
+ esac
+ printf "Origin $origin:\n old: $git\n new: $new\n"
+ echo $new > $serial_file
done
printf "\nAll files ($CONFIG/*/serial) have been updated with new serials\n" >&2
;;
diff --git a/features/build.feature b/features/build.feature
index 16a72a1..9042476 100644
--- a/features/build.feature
+++ b/features/build.feature
@@ -221,8 +221,8 @@ Feature: custom APT sources to build branches
Then it should fail
When I run "apt-mirror torproject"
Then it should fail
- When I run "apt-mirror debian-security"
- Then it should fail
+ When I successfully run "apt-mirror debian-security"
+ Then I should see the 0.11 tagged snapshot
Scenario: build from a tagged testing branch with encoded time-based snapshots
Given I am working on the testing base branch
@@ -319,8 +319,8 @@ Feature: custom APT sources to build branches
Then it should fail
When I run "apt-mirror torproject"
Then it should fail
- When I run "apt-mirror debian-security"
- Then it should fail
+ When I successfully run "apt-mirror debian-security"
+ Then I should see a time-based snapshot
Scenario: build from the feature/jessie branch without overlays
Given I am working on the feature/jessie base branch
@@ -369,8 +369,8 @@ Feature: custom APT sources to build branches
Then it should fail
When I run "apt-mirror torproject"
Then it should fail
- When I run "apt-mirror debian-security"
- Then it should fail
+ When I successfully run "apt-mirror debian-security"
+ Then I should see a time-based snapshot
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
diff --git a/features/step_definitions/build.rb b/features/step_definitions/build.rb
index f1bc6f6..a706430 100644
--- a/features/step_definitions/build.rb
+++ b/features/step_definitions/build.rb
@@ -56,11 +56,15 @@ Given(/^no frozen APT snapshot is encoded in config\/APT_snapshots\.d$/) do
end
Given(/^frozen APT snapshots are encoded in config\/APT_snapshots\.d$/) do
- ['debian', 'debian-security', 'torproject'].map do |origin|
+ ['debian', 'torproject'].map do |origin|
File.open("config/APT_snapshots.d/#{origin}/serial", 'w+') do |serial|
serial.write("2016060602\n")
end
end
+ # We never freeze debian-security
+ File.open("config/APT_snapshots.d/debian-security/serial", 'w+') do |serial|
+ serial.write("latest\n")
+ end
end
Given %r{I am working on the ([[:alnum:]./_-]+) base branch$} do |branch|