Merge ~xnox/launchpad-buildd:noudeb into launchpad-buildd:master

Proposed by Dimitri John Ledkov
Status: Work in progress
Proposed branch: ~xnox/launchpad-buildd:noudeb
Merge into: launchpad-buildd:master
Diff against target: 138 lines (+84/-1)
4 files modified
debian/changelog (+1/-0)
lpbuildd/binarypackage.py (+11/-0)
lpbuildd/tests/test_binarypackage.py (+70/-0)
sbuildrc (+2/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Needs Fixing
Review via email: mp+386466@code.launchpad.net

Commit message

binarypackage: build with noudeb profile for groovy+

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) :
Revision history for this message
Colin Watson (cjwatson) :
Revision history for this message
Dimitri John Ledkov (xnox) :

Unmerged commits

70ef7ba... by Dimitri John Ledkov

binarypackage: build with noudeb profile for groovy+. LP: #1884836

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 26d4622..acc33d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,7 @@ launchpad-buildd (190) UNRELEASED; urgency=medium
3030
31 [ Dimitri John Ledkov ]31 [ Dimitri John Ledkov ]
32 * lxd: Add riscv64 to arch table.32 * lxd: Add riscv64 to arch table.
33 * binarypackage: build with noudeb profile for groovy+. LP: #1884836
3334
34 -- Colin Watson <cjwatson@ubuntu.com> Tue, 28 Apr 2020 10:19:27 +010035 -- Colin Watson <cjwatson@ubuntu.com> Tue, 28 Apr 2020 10:19:27 +0100
3536
diff --git a/lpbuildd/binarypackage.py b/lpbuildd/binarypackage.py
index 2111bbe..f18ac08 100644
--- a/lpbuildd/binarypackage.py
+++ b/lpbuildd/binarypackage.py
@@ -47,6 +47,15 @@ APT_DUBIOUS_DEP_PATTERNS = [
47 ]47 ]
4848
4949
50UDEB_SUITES = (
51 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', 'gutsy', 'hardy',
52 'intrepid', 'jaunty', 'karmic', 'lucid', 'maverick', 'natty', 'oneiric',
53 'precise', 'quantal', 'raring', 'saucy', 'trusty', 'utopic', 'vivid',
54 'wily', 'xenial', 'yakkety', 'zesty', 'artful', 'bionic', 'cosmic',
55 'disco', 'eoan', 'focal'
56 )
57
58
50class BuildLogRegexes:59class BuildLogRegexes:
51 """Build log regexes for performing actions based on regexes, and extracting dependencies for auto dep-waits"""60 """Build log regexes for performing actions based on regexes, and extracting dependencies for auto dep-waits"""
52 GIVENBACK = [61 GIVENBACK = [
@@ -175,6 +184,8 @@ class BinaryPackageBuildManager(DebianBuildManager):
175 env.pop("DEB_BUILD_OPTIONS", None)184 env.pop("DEB_BUILD_OPTIONS", None)
176 else:185 else:
177 env["DEB_BUILD_OPTIONS"] = "noautodbgsym"186 env["DEB_BUILD_OPTIONS"] = "noautodbgsym"
187 if self.series not in UDEB_SUITES:
188 env["DEB_BUILD_PROFILES"] = "noudeb"
178 self.runSubProcess(self._sbuildpath, args, env=env)189 self.runSubProcess(self._sbuildpath, args, env=env)
179190
180 def getAvailablePackages(self):191 def getAvailablePackages(self):
diff --git a/lpbuildd/tests/test_binarypackage.py b/lpbuildd/tests/test_binarypackage.py
index c88bdb2..7423d51 100644
--- a/lpbuildd/tests/test_binarypackage.py
+++ b/lpbuildd/tests/test_binarypackage.py
@@ -268,6 +268,76 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
268 self.buildmanager.backend.backend_fs['/CurrentlyBuilding'])268 self.buildmanager.backend.backend_fs['/CurrentlyBuilding'])
269269
270 @defer.inlineCallbacks270 @defer.inlineCallbacks
271 def test_with_udebs(self):
272 # A build with warty-focal suites does not pass DEB_BUILD_PROFILES
273 self.addCleanup(
274 setattr, self.buildmanager, 'backend_name',
275 self.buildmanager.backend_name)
276 self.buildmanager.backend_name = 'fake'
277 self.buildmanager.initiate(
278 {'foo_1.dsc': ''}, 'chroot.tar.gz',
279 {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
280 'ogrecomponent': 'main', 'archive_purpose': 'PRIMARY',
281 'build_debug_symbols': True})
282 os.makedirs(self.chrootdir)
283 self.buildmanager._state = BinaryPackageBuildState.UPDATE
284 yield self.buildmanager.iterate(0)
285 self.assertState(
286 BinaryPackageBuildState.SBUILD,
287 ['sharepath/bin/sbuild-package', 'sbuild-package',
288 self.buildid, 'i386', 'warty',
289 '-c', 'chroot:build-' + self.buildid,
290 '--arch=i386', '--dist=warty', '--nolog',
291 'foo_1.dsc'],
292 env_matcher=Not(Contains('DEB_BUILD_PROFILES')), final=True)
293 self.assertFalse(self.builder.wasCalled('chrootFail'))
294 self.assertEqual(
295 (dedent("""\
296 Package: foo
297 Component: main
298 Suite: warty
299 Purpose: PRIMARY
300 Build-Debug-Symbols: yes
301 """).encode('UTF-8'), stat.S_IFREG | 0o644),
302 self.buildmanager.backend.backend_fs['/CurrentlyBuilding'])
303
304 @defer.inlineCallbacks
305 def test_without_udebs(self):
306 # A build with groovy+ suites passes DEB_BUILD_PROFILE=noudeb
307 self.addCleanup(
308 setattr, self.buildmanager, 'backend_name',
309 self.buildmanager.backend_name)
310 self.buildmanager.backend_name = 'fake'
311 self.buildmanager.initiate(
312 {'foo_1.dsc': ''}, 'chroot.tar.gz',
313 {'distribution': 'ubuntu', 'series': 'groovy', 'suite': 'groovy',
314 'ogrecomponent': 'main', 'archive_purpose': 'PRIMARY',
315 'build_debug_symbols': True})
316 os.makedirs(self.chrootdir)
317 self.buildmanager._state = BinaryPackageBuildState.UPDATE
318 yield self.buildmanager.iterate(0)
319 self.assertState(
320 BinaryPackageBuildState.SBUILD,
321 ['sharepath/bin/sbuild-package', 'sbuild-package',
322 self.buildid, 'i386', 'groovy',
323 '-c', 'chroot:build-' + self.buildid,
324 '--arch=i386', '--dist=groovy', '--nolog',
325 'foo_1.dsc'],
326 env_matcher=ContainsDict(
327 {'DEB_BUILD_PROFILES': Equals('noudeb')}),
328 final=True)
329 self.assertFalse(self.builder.wasCalled('chrootFail'))
330 self.assertEqual(
331 (dedent("""\
332 Package: foo
333 Component: main
334 Suite: groovy
335 Purpose: PRIMARY
336 Build-Debug-Symbols: yes
337 """).encode('UTF-8'), stat.S_IFREG | 0o644),
338 self.buildmanager.backend.backend_fs['/CurrentlyBuilding'])
339
340 @defer.inlineCallbacks
271 def test_abort_sbuild(self):341 def test_abort_sbuild(self):
272 # Aborting sbuild kills processes in the chroot.342 # Aborting sbuild kills processes in the chroot.
273 yield self.startBuild()343 yield self.startBuild()
diff --git a/sbuildrc b/sbuildrc
index c49ada9..51fc784 100644
--- a/sbuildrc
+++ b/sbuildrc
@@ -32,9 +32,10 @@ $build_environment = {
32};32};
3333
34# We want to expose almost nothing from the buildd environment.34# We want to expose almost nothing from the buildd environment.
35# DEB_BUILD_OPTIONS is set by sbuild-package.35# DEB_BUILD_OPTIONS DEB_BUILD_PROFILES are set by sbuild-package.
36$environment_filter = [36$environment_filter = [
37 '^DEB_BUILD_OPTIONS$',37 '^DEB_BUILD_OPTIONS$',
38 '^DEB_BUILD_PROFILES$',
38 ];39 ];
3940
40# We're just going to throw the chroot away anyway.41# We're just going to throw the chroot away anyway.

Subscribers

People subscribed via source and target branches