aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpbuilder-apt-config13
-rwxr-xr-xtest_pbuilder-apt-config11
2 files changed, 21 insertions, 3 deletions
diff --git a/pbuilder-apt-config b/pbuilder-apt-config
index 5e2b491..8953c82 100755
--- a/pbuilder-apt-config
+++ b/pbuilder-apt-config
@@ -151,6 +151,9 @@ builtin_mirror_map() {
ubuntu-ports)
echo "http://ports.ubuntu.com/ubuntu-ports/"
;;
+ ubuntu-security)
+ echo "http://security.ubuntu.com/ubuntu/"
+ ;;
*)
die "Unknown mirror for archive=$archive"
;;
@@ -390,6 +393,8 @@ if [ -n "$profile" ]; then
die "Unknown Ubuntu based profile=$profile"
fi
pockets=""
+ # whether to include the security mirror
+ has_security="yes"
case "$profile" in
*-security)
pockets="security"
@@ -407,12 +412,20 @@ if [ -n "$profile" ]; then
if [ "$base_dist" != "$profile" ]; then
die "Unknown Ubuntu pocket based profile=$profile"
fi
+ has_security="no"
;;
esac
add_output_sources "$with_sources" "$base_mirror" "$base_dist" "$components"
for pocket in $pockets; do
add_output_sources "$with_sources" "$base_mirror" "$base_dist-$pocket" "$components"
done
+ if [ "$has_security" = "yes" ]; then
+ archive="ubuntu-security"
+ mirror="`get_archive_url "$mirror_map" "$archive"`"
+ if [ "$mirror" != "$base_mirror" ]; then
+ add_output_sources "$with_sources" "$mirror" "$base_dist-security" "$components"
+ fi
+ fi
;;
*)
die "Unknown profile for base_archive=$base_archive"
diff --git a/test_pbuilder-apt-config b/test_pbuilder-apt-config
index dd529cb..754df75 100755
--- a/test_pbuilder-apt-config
+++ b/test_pbuilder-apt-config
@@ -34,6 +34,7 @@ cat >"$mirror_map" <<EOF
archive archive-mirror
ubuntu ubuntu-mirror
ubuntu-ports ubuntu-ports-mirror
+ubuntu-security ubuntu-security-mirror
nomirror
ppa:people ppa-people-ppa
@@ -143,18 +144,22 @@ expect_output "deb bo comp1" test_profile bo
expect_output "deb lucid comp1" test_profile lucid
expect_output "deb lucid comp1
+deb lucid-security comp1
deb lucid-security comp1" test_profile lucid-security
expect_output "deb lucid comp1
deb lucid-security comp1
-deb lucid-updates comp1" test_profile lucid-updates
+deb lucid-updates comp1
+deb lucid-security comp1" test_profile lucid-updates
expect_output "deb lucid comp1
deb lucid-security comp1
deb lucid-updates comp1
-deb lucid-backports comp1" test_profile lucid-backports
+deb lucid-backports comp1
+deb lucid-security comp1" test_profile lucid-backports
expect_output "deb lucid comp1
deb lucid-security comp1
deb lucid-updates comp1
-deb lucid-proposed comp1" test_profile lucid-proposed
+deb lucid-proposed comp1
+deb lucid-security comp1" test_profile lucid-proposed
expect_output "deb mirror suite component
deb-src mirror suite component" run_suite_mode --with-sources=yes