Merge ~litios/ubuntu-security-tools:feature/esm-schroot into ubuntu-security-tools:master

Proposed by David Fernandez Gonzalez
Status: Merged
Merged at revision: 1cd82caf876d639b4692a5cdffe66e5ce871ed18
Proposed branch: ~litios/ubuntu-security-tools:feature/esm-schroot
Merge into: ubuntu-security-tools:master
Diff against target: 26 lines (+11/-3)
1 file modified
build-tools/umt (+11/-3)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+460813@code.launchpad.net

Description of the change

    [UMT] Build the first ESM version inside ESM schroot.

    When we create the first ESM version of a package,
    the tool will suggest a regular schroot for the
    build since that's the only version it's aware of.

    This changes the behavior to use the right
    ESM schroot when building, since the package
    will be built on LP using the ESM PPAs.

To post a comment you must log in.
972e59a... by David Fernandez Gonzalez

[UMT] Build the first ESM version inside ESM schroot.

When we create the first ESM version of a package,
the tool will suggest a regular schroot for the
build since that's the only version it's aware of.

This changes the behavior to use the right
ESM schroot when building, since the package
will be built on LP using the ESM PPAs.

Signed-off-by: David Fernandez Gonzalez <email address hidden>

Revision history for this message
Allen Huang (allenpthuang) wrote :

Hi David,

Thanks for the MP and for saving keystrokes in the future!
One minor issue on my end, I set up my ESM schroots manually following the wiki (https://wiki.ubuntu.com/SecurityTeam/BuildEnvironment#Setting_up_a_chroot_for_Extended_Security_Maintenance), and the names go like `esm-bionic-amd64`. They were put together with all hyphens, and no separation for `-infra` and `-apps`. Not sure if we should support this naming scheme though; I'm happy to continue to use `-c esm-$rel-amd64`.

Revision history for this message
David Fernandez Gonzalez (litios) wrote :

Thanks for the input Allen!

The tooling already took for granted that the right schema for the ESN schroots would be
'esm-TYPE_REL-ARCH'. This change would only extend the use of the already existing schema.

Either we update the tooling to figure out the right schroot or we update the wiki so we all have the same naming convention.

Revision history for this message
David Fernandez Gonzalez (litios) wrote :

As discussed with Eduardo in MM from Allen's comment, we should merge this for now and try to find a better solution.

Eduardo proposed that we could use a single schroot per release and add the PPAs in the sources on the fly when we try to build an ESM package.

This conversation will be moved to a new PR.

Revision history for this message
Allen Huang (allenpthuang) wrote :

> Thanks for the input Allen!
>
> The tooling already took for granted that the right schema for the ESN
> schroots would be
> 'esm-TYPE_REL-ARCH'. This change would only extend the use of the already
> existing schema.
>
> Either we update the tooling to figure out the right schroot or we update the
> wiki so we all have the same naming convention.

No problem at all and as per our offline discussion, updating the wiki might be the right way to go!

Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM - thanks for this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/build-tools/umt b/build-tools/umt
2index b8f6e72..dee186b 100755
3--- a/build-tools/umt
4+++ b/build-tools/umt
5@@ -568,10 +568,18 @@ def perform_source_build(details, opt):
6
7 chroot_release = details['release'].replace('/','_')
8
9- details['chroot'] = "%s-i386" % chroot_release
10 (rc, arch) = runcmd(['uname', '-m'])
11- if arch.strip() == "x86_64":
12- details['chroot'] = "%s-amd64" % chroot_release
13+ schroot_arch = "amd64" if arch.strip() == "x86_64" else "i386"
14+
15+ if 'esm' not in chroot_release and 'esm' in details['version']:
16+ esm_type = 'apps' if details['component'] == 'universe' else 'infra'
17+
18+ if chroot_release == 'trusty':
19+ details['chroot'] = "trusty_esm-%s" % schroot_arch
20+ else:
21+ details['chroot'] = "esm-%s_%s-%s" % (esm_type, chroot_release, schroot_arch)
22+ else:
23+ details['chroot'] = "%s-%s" % (chroot_release, schroot_arch)
24
25 if opt.chroot:
26 details['chroot'] = opt.chroot

Subscribers

People subscribed via source and target branches