Merge ~myamada/ubuntu-dev-tools:mk-sbuild into ubuntu-dev-tools:master

Proposed by Masahiro Yamada
Status: Merged
Merged at revision: 844d6d942cf46762affbcbbf2e0b8a8aaae1206e
Proposed branch: ~myamada/ubuntu-dev-tools:mk-sbuild
Merge into: ubuntu-dev-tools:master
Diff against target: 76 lines (+34/-18)
1 file modified
mk-sbuild (+34/-18)
Reviewer Review Type Date Requested Status
Mattia Rizzolo Approve
Review via email: mp+435734@code.launchpad.net

Description of the change

This merge request fixes the security update repository setup in
/etc/apt/sources.list for Debian bullseye and later.

The first commit adds a new helper, debian_dist_ge(), which is similar
to the existing ubuntu_dist_ge().

The second commit fixes the path of the security update repository.

To post a comment you must log in.
Revision history for this message
Mattia Rizzolo (mapreri) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/mk-sbuild b/mk-sbuild
2index e280fbb..52e15a1 100755
3--- a/mk-sbuild
4+++ b/mk-sbuild
5@@ -397,29 +397,41 @@ fi
6 # By default DEBOOTSTRAP_SCRIPT must match RELEASE
7 DEBOOTSTRAP_SCRIPT="$RELEASE"
8
9-if [ "$DISTRO" = "ubuntu" ]; then
10- ubuntu_dist_ge() {
11- local releases="$(ubuntu-distro-info --all)"
12- local left=999
13- local right=0
14- local seq=1
15- for i in $releases; do
16+dist_ge() {
17+ local releases="$($3-distro-info --all)"
18+ local left=999
19+ local right=0
20+ local seq=1
21+
22+ for i in $releases; do
23 if [ $1 = $i ]; then
24- local left=$seq
25- break
26+ local left=$seq
27+ break
28 fi
29 seq=$((seq+1))
30- done
31- seq=1
32- for i in $releases; do
33+ done
34+
35+ seq=1
36+ for i in $releases; do
37 if [ $2 = $i ]; then
38- local right=$seq
39- break
40+ local right=$seq
41+ break
42 fi
43 seq=$((seq+1))
44- done
45- [ $left -ge $right ] && return 0 || return 1
46- }
47+ done
48+
49+ [ $left -ge $right ] && return 0 || return 1
50+}
51+
52+ubuntu_dist_ge () {
53+ dist_ge $1 $2 ubuntu
54+}
55+
56+debian_dist_ge () {
57+ dist_ge $1 $2 debian
58+}
59+
60+if [ "$DISTRO" = "ubuntu" ]; then
61 # On Ubuntu, set DEBOOTSTRAP_SCRIPT to gutsy to allow building new RELEASES without new debootstrap
62 DEBOOTSTRAP_SCRIPT=gutsy
63 fi
64@@ -663,7 +675,11 @@ debian)
65 # Debian only performs security updates
66 SKIP_UPDATES=1
67 if [ -z "$SOURCES_SECURITY_SUITE" ]; then
68- SOURCES_SECURITY_SUITE="RELEASE/updates"
69+ if debian_dist_ge "$RELEASE" "bullseye"; then
70+ SOURCES_SECURITY_SUITE="RELEASE-security"
71+ else
72+ SOURCES_SECURITY_SUITE="RELEASE/updates"
73+ fi
74 fi
75 if [ -z "$SOURCES_SECURITY_URL" ]; then
76 SOURCES_SECURITY_URL="http://security.debian.org/"

Subscribers

People subscribed via source and target branches