MIR reviewer’s template

This section is a guideline for the reviewer as they review an MIR bug. The intent is to answer the primary question:

Will this package be well maintained in main?

Usage follows How to use MIR templates.

  • By default, statements are in the OK section.

  • Issues to be addressed should go to the Problem: sections (and briefly the [Summary] at the top of the template).

  1RULE: Since we sometimes have many such posts on one bug, in case multiple
  2RULE: packages are associated, clearly state which one this is for.
  3TODO: Review for Source Package: TBDSRC
  4
  5[Summary]
  6TODO: WRITE - TBD The essence of the review result from the MIR POV
  7TODO-A: MIR team ACK
  8TODO-B: MIR team NACK
  9TODO-C: MIR team ACK under the constraint to resolve the below listed
 10TODO-C: required TODOs and as much as possible having a look at the
 11TODO-C: recommended TODOs.
 12TODO-A: This does need a security review, so I'll assign ubuntu-security
 13TODO-B: This does not need a security review
 14TODO: List of specific binary packages to be promoted to main: TBD
 15TODO: Specific binary packages built, but NOT to be promoted to main: TBD
 16
 17Notes:
 18TODO: - add todos, issues or special cases to discuss
 19Required TODOs:
 20TODO: - TBD (Please add them numbered for later reference)
 21Recommended TODOs:
 22RULE: - Does it have a team bug subscriber? (This is not a blocker for a MIR
 23RULE:   team ACK, but needs to be provided before the package can be promoted
 24RULE:   by an AA)
 25TODO: - The package should get a team bug subscriber before being promoted
 26TODO: - TBD (Please add them numbered for later reference)
 27
 28[Rationale, Duplication and Ownership]
 29RULE: One easy way to avoid the burden of maintaining the package is to not
 30RULE: use it in the first place! If a package is pulling in some random jpeg
 31RULE: parsing library that needs a MIR, maybe it makes more sense to patch the
 32RULE: package to just use libjpeg instead. Keep an eye out for duplicated
 33RULE: functionality in main, since that makes bug fixing and security
 34RULE: reviewing that much harder.
 35RULE: Duplicates can be found by searching packages in "main", e.g. using:
 36RULE: $ apt list "?not(?section(/))" | grep <SEARCH_TERM>
 37RULE: and/or by checking for alternatives on https://www.libhunt.com/ or
 38RULE: similar databases.
 39RULE: Sometimes duplicates are not too obvious, but can often be found by
 40RULE: searching through full descriptions, provides and all that. If the above
 41RULE: check didn't already find a duplicate then this check can be done via the
 42RULE: following steps:
 43RULE:   $ apt-cache search  <SEARCH_TERM>
 44RULE: In the returned list pick anything that looks suspicious by name or
 45RULE: description and check if any of them is in main:
 46RULE:   $ rmadison -c main {all,packages,that,look,like,duplicates}
 47RULE: If any of them are reported to be in main check in detail if they cover
 48RULE: indeed the same use case as the package this MIR is about.
 49TODO: There is no other package in main providing the same functionality.
 50RULE: No matter how useful a rationale is and how unique a package might be
 51RULE: it will need an owning team that is willing and able to spend the time
 52RULE: to maintain it well for the benefit of all Ubuntu users and use cases.
 53RULE: If someone submitted an MIR on behalf of another team and suggested them
 54RULE: to own it, we expect someone representing that to be owning team to
 55RULE: comment on the bug and acknowledge that they are ok to own that package
 56RULE: (to avoid review and process effort being spent only to then
 57RULE: immediately be cancelled by a lack of ownership).
 58TODO: A team is committed to own long term maintenance of this package.
 59RULE: In the template to submit cases we ask the reporter to state a rationale
 60RULE: why this should be considered. But a MIR team member needs to
 61RULE: try to judge if this rationale is good for Ubuntu and its users.
 62RULE: We've also seen requests that thought they need to be in main, but that
 63RULE: was based on wrong assumptions, ensure the requester understands what and
 64RULE: why they request a main inclusion when judging if the rationale is valid.
 65TODO: The rationale given in the report seems valid and useful for Ubuntu
 66RULE: If any of the above checks in this section the MIR team can decide to
 67RULE: skip the rest of the check until these basic questions are resolved.
 68
 69[Dependencies]
 70RULE: Long ago also build dependencies needed to be in main, but since 14.04
 71RULE: that no more is the case. Therefore if checking in the build logs do not
 72RULE: rely on sections like "Install main build dependencies (apt-based
 73RULE: resolver)". Similarly some of the tools shown below are capable of
 74RULE: checking both, build and runtime dependencies. Only runtime dependencies
 75RULE: matter.
 76RULE: This got further complex with languages like rust that embed their code
 77RULE: into static builds by default - there, as you can read in the respective
 78RULE: section, build dependencies matter just like runtime dependencies.
 79RULE: To make it even more "be careful, because it depends", some solutions are
 80RULE: e.g. C based headers that put not just definitions but large amounts
 81RULE: of active code that is built into the binaries - that in turn shall be
 82RULE: considered like a runtime dependency that should be in main.
 83RULE: Common tools to check dependencies are:
 84RULE:   - `check-mir` of package ubuntu-dev-tools
 85RULE:   - `seeded-in-ubuntu` of package ubuntu-dev-tools
 86RULE:   - Do not check d/control (dependencies might be generated) but the
 87RULE:     buildlog if none of the Depends and Recommends present after build
 88RULE:     are not in main
 89RULE:   - Please read https://documentation.ubuntu.com/project/contributors/advanced/check-reverse-dependencies/
 90RULE:     for more about checking reverse dependencies in general
 91OK:
 92TODO: - no other runtime Dependencies to MIR due to this
 93TODO: - no other build-time Dependencies with active code in the final binaries
 94TODO:   to MIR due to this
 95TODO: - no -dev/-debug/-doc packages that need exclusion
 96TODO: - No dependencies in main that are only superficially tested requiring
 97TODO:   more tests now.
 98
 99TODO-A: Problems:
100TODO-A: - TBD
101TODO-B: Problems: None
102
103[Embedded sources and static linking]
104RULE: - Embedding a library source increases the maintenance burden of a package
105RULE:   since that source needs to be maintained separately from the source in
106RULE:   the Ubuntu archive. If a source embeds another package, in general the
107RULE:   embedded package should not be used and the packaging should be modified
108RULE:   to use the Ubuntu archive version. When this is not possible, the
109RULE:   security team must agree to using the embedded source.
110RULE: - Similarly, when a binary from one source package statically links to
111RULE:   libraries from another source package from the archive, when those
112RULE:   libraries are updated the statically linked binaries must be rebuilt
113RULE:   with the updated libraries to receive the fix, which increases the
114RULE:   maintenance burden. For this reason, static linking in archive builds
115RULE:   is discouraged unless static linking is required for the package in
116RULE:   question to function correctly (e.g. an integrity scanner).
117RULE: - If debian/control uses `Built-Using` or `Static-Built-Using:` it may
118RULE:   indicate static linking
119RULE:   which should be discouraged (except golang/rust, see below)
120RULE:   - Rust - toolchain and dh tools are still changing a lot. Currently it
121RULE:     is expected to only list the rust toolchain in `Built-Using`.
122RULE:     the remaining (currently vendored) dependencies shall be tracked
123RULE:     in a Cargo.lock file
124RULE:   - Go - here `Built-Using` is expected to only contain the go
125RULE:     toolchain used to build it. Additional packaged dependencies
126RULE:     will be tracked in `Static-Built-Using:` automatically.
127RULE:     The superset of packaged and vendored (if used) dependencies shall be
128RULE:     tracked in a go.sum file (go.mod are direct dependencies, go.sum
129RULE:     covers checksum content for direct and indirect dependencies. This
130RULE:     should be present for reproducible builds already which involve
131RULE:     having a go.sum.
132RULE:     We have let go packages into main before this existed, so we have
133RULE:     sub-optimal prior-art. But down the road - if vendoring is used - we
134RULE:     want to switch to require that once the toolchain is ready to
135RULE:     create it accordingly.
136
137OK:
138TODO: - no embedded source present
139TODO: - no static linking
140TODO: - does not have unexpected Built-Using entries
141
142RULE: Golang
143RULE: - golang 1.4 packages and earlier could only statically compile their
144RULE:   binaries. golang 1.5 in Ubuntu 16.10 introduced `-buildmode=shared`
145RULE:   to build shared libraries and `-linkshared` to dynamically link against
146RULE:   shared libraries. In general, statically compiled binaries are not
147RULE:   suitable for the Ubuntu archive because they increase the maintenance
148RULE:   burden significantly. As such, from Ubuntu 16.10 and later, golang
149RULE:   packages in main were expected to be built with shared
150RULE:   libraries.
151RULE: - Evaluating cost/benefits while considering the ABI instability of golang
152RULE:   libraries during this period, the MIR team decided for 17.10 and later
153RULE:   to allow static builds of golang packages in main, so long as the number
154RULE:   of these packages remains low and they follow the guidelines below:
155RULE:   - golang applications in main are expected:
156RULE:       1. to build using `golang-*-dev` packages from the Ubuntu archive
157RULE:          creating `Built-Using` in debian/control. This requirement ensures
158RULE:          that the security team is able to track security issues for all
159RULE:          affected static binary packages
160RULE:       2. not to build any vendored (i.e. embedded) code in the source
161RULE:          package whose binaries appear in the archive (e.g. test code is
162RULE:          ok) without clear justification from the requesting team and
163RULE:          approval from the security team. This requirement ensures that
164RULE:          the security team is able to track security issues for all
165RULE:          affected source packages.
166RULE:       3. only build against approved vendored sources (when applicable).
167RULE:          If new versions add new components or dependencies in subsequent
168RULE:          Ubuntu uploads this will need re-evaluation by the security
169RULE:          team. This requirement ensures that the security team is able
170RULE:          to track security issues for all affected source packages.
171RULE: - The intended outcomes from the above requirements (if not vendored) are
172RULE:   for packages in main to standardize on particular versions of
173RULE:   `golang-*-dev` packages (when possible) with the requesting team
174RULE:    adjusting their packaging as necessary, all teams responsible for
175RULE:    golang packages coordinating on transitions and the requesting team
176RULE:    occasionally creating new `golang-*-dev` packages as agreed to in the
177RULE:    MIR bug (upstreaming to Debian whenever possible).
178RULE: - As a practical matter, golang/rust source packages in main are not
179RULE:   required to remove unused embedded code copies.
180RULE: - If based on the above options it's a statically compiled golang package:
181RULE:   - Does the package use dh-golang (if not, suggest dh-make-golang to
182RULE:     create the package)?
183RULE:   - Does debian/control use `Built-Using: ${misc:Built-Using}` for each
184RULE:     non'-dev' binary package (importantly, golang-*-dev packages only
185RULE:     ship source files so don't need Built-Using)?
186RULE:   - Does the package follow Debian Go packaging guidelines?
187RULE:     (See: https://go-team.pages.debian.net/packaging.html)
188RULE: - When it is infeasible to comply with this policy, the justification,
189RULE:   discussion and approval should all be clearly represented in the bug.
190
191OK:
192TODO-A: - not a go package, no extra constraints to consider in that regard
193TODO-B: - Go Package that follows the Debian Go packaging guidelines
194
195TODO-A:   - vendoring is used, but the reasoning is sufficiently explained
196TODO-B:   - No vendoring used, all Built-Using are in main
197
198TODO-A:   - golang: shared builds
199TODO-B:   - golang: static builds are used, the team confirmed their commitment
200TODO-B:     to the additional responsibilities implied by static builds.
201
202TODO-A: - not a rust package, no extra constraints to consider in that regard
203TODO-B: - Rust package that has all dependencies vendored. It does neither
204TODO-B:   have *Built-Using (after build). Nor does the build log indicate
205TODO-B:   built-in sources that are missed to be reported as Built-Using.
206
207TODO: - rust package using dh_cargo (dh ... --buildsystem cargo)
208
209TODO-A: - Includes vendored code, the package has documented how to refresh this
210TODO-A:   code at <TBD>
211TODO-B: - Does not include vendored code
212
213TODO-A: Problems:
214TODO-A: - TBD
215TODO-B: Problems: None
216
217[Security]
218RULE: - Determine if the package may have security implications or history.
219RULE:   Err on the side of caution.
220RULE: - If the package is security sensitive, you should review as much as you
221RULE:   can and then assign to the ubuntu-security team. The bug will then be
222RULE:   added to the prioritized list of MIR security reviews.
223RULE: - We do not block on, but want to recommend using enhanced isolation
224RULE:   features, things like systemd isolation, apparmor and such shall at
225RULE:   least have gotten a thought if they would help to mitigate risks in
226RULE:   this case. If we spot a case where we think it should be either easy or
227RULE:   very beneficial to use such features we should add them to recommended
228RULE:   tasks.
229
230OK:
231TODO: - history of CVEs does not look concerning
232TODO: - does not run a daemon as root
233TODO: - does not use webkit1,2
234TODO: - does not use lib*v8 directly
235TODO: - does not parse data formats (files [images, video, audio,
236TODO:   xml, json, asn.1], network packets, structures, ...) from
237TODO:   an untrusted source.
238TODO: - does not expose any external endpoint (port/socket/... or similar)
239TODO: - does not process arbitrary web content
240TODO: - does not use centralized online accounts
241TODO: - does not integrate arbitrary javascript into the desktop
242TODO: - does not deal with system authentication (eg, pam), etc)
243TODO: - does not deal with security attestation (secure boot, tpm, signatures)
244TODO: - does not deal with cryptography (en-/decryption, certificates,
245TODO:   signing, ...)
246TODO: - this makes appropriate (for its exposure) use of established risk
247TODO:   mitigation features (dropping permissions, using temporary environments,
248TODO:   restricted users/groups, seccomp, systemd isolation features,
249TODO:   apparmor, ...)
250
251TODO-A: Problems:
252TODO-A: - TBD
253TODO-B: Problems: None
254
255[Common blockers]
256RULE: - There are plenty of testing requirements, hopefully already resolved
257RULE:   by the reporter upfront, see "Quality assurance - testing" section of
258RULE:   the Main Inclusion requirements
259RULE: - The MIR process shall ensure quality and maintainability, due to that
260RULE:   the expectations to that are quite high, but especially in cases where
261RULE:   special HW is needed that can be a hard to achieve which bloats the
262RULE:   options below, it is a balance or compromise we need to strike between
263RULE:   giving such cases a pass too easily and making them impossible.
264RULE:   Please read (to keep this short) for more background:
265RULE:   https://github.com/canonical/ubuntu-mir/issues/30
266
267OK:
268TODO: - does not FTBFS currently
269TODO: - does have a test suite that runs at build time
270TODO:   - test suite fails will fail the build upon error.
271TODO: - does have a non-trivial test suite that runs as autopkgtest
272TODO-A: - This does seem to need special HW for build or test so it can't be
273TODO-A:   automatic at build or autopkgtest time. But as outlined
274TODO-A:   by the requester in [Quality assurance - testing] there:
275TODO-A1:   - is hardware and a test plan or code
276TODO-A2:   - are partner engagements and a test plan or code
277TODO-A3:   - is community support to test this for Ubuntu
278TODO-A4:   - a simulator and a test plan or code
279TODO-A5:   - is upstream support to test this for Ubuntu
280TODO-A6:   - an agreement with the manufacturer to test this for Ubuntu
281TODO-A7:   - an agreement with solutions-qa to be able to test this for Ubuntu
282TODO-A8:   - an agreement with another team to be able to test this for Ubuntu
283TODO-B: - This does not need special HW for build or test
284TODO-C: - This does need special HW for thorough testing, but all options to
285TODO-C:   get this covered have been exhausted and based on demonstration of
286TODO-C:   enough investigation and proof of why there is currently no other
287TODO-C:   option it is accepted as-is as a compromise.
288TODO-C:   The owning team is committed and aware of the implications for
289TODO-C:   ongoing maintenance.
290TODO: - if a non-trivial test on this level does not make sense (the lib alone
291TODO:   is only doing rather simple things), is the overall solution (app+libs)
292TODO:   extensively covered i.e. via end to end autopkgtest ?
293TODO: - no new python2 dependency
294TODO: - Python package, but using dh_python
295TODO: - Go package, but using dh-golang
296
297TODO-A: Problems:
298TODO-A: - TBD
299TODO-B: Problems: None
300
301[Packaging red flags]
302RULE: - Does Ubuntu carry a non necessary delta?
303RULE: - If it's a library, does it either have a symbols file or use an empty
304RULE:   argument to dh_makeshlibs -V? (pass such a patch on to Debian, but
305RULE:   don't block on it).
306RULE:   Note that for C++, see https://wiki.ubuntu.com/DailyRelease/FAQ
307RULE:   for a method to demangle C++ symbols files.
308RULE: - There are shared object only meant for internal use, examples
309RULE:   that come to mind are .so for perl or python implementation.
310RULE:   in such cases symbols tracking is not needed as it isn't meant
311RULE:   to expose an external API/ABI. But then in return we should ensure
312RULE:   the package does not ship external headers to build against e.g.
313RULE:   in a -dev package or similar.
314RULE: - Does it have a watch file? (If relevant, e.g. non-native)
315RULE: - Is its update history slow or sporadic?
316RULE: - Is the current release packaged?
317RULE: - Will entering main make it harder for the people currently keeping it
318RULE:   up to date? (i.e. are they only MOTUs?)
319RULE: - Lintian warnings
320RULE: - Is debian/rules a mess? Ideally it uses dh and overrides to make it as
321RULE:   tiny as possible.
322RULE: - If a package shall be promoted it should NOT be on the lto-disabled
323RULE:   list, but the fix, or the workaround should be directly in the package
324RULE:   to enforce maintainer awareness and make it more visible to anyone
325RULE:   looking at the package - see https://wiki.ubuntu.com/ToolChain/LTO.
326
327OK:
328TODO-A: - Ubuntu does not carry a delta
329TODO-B: - Ubuntu does carry a delta, but it is reasonable and maintenance under
330TODO-B:   control
331TODO-A: - symbols tracking is in place.
332TODO-B: - For c++ libraries - symbols tracking isn't in place but the owning
333TODO-B:   team tried to set it up and came back with a reasonable rationale
334TODO-B:   of why it isn't practical to do for the package.
335TODO-B:   If symbols tracking isn't used then it's recommended to investigate
336TODO-B:   using an alternative like abigail or abi-compliance-check in CI
337TODO-B:   or bumping SOVER with every package update.
338TODO-C: - symbols tracking not applicable for this kind of code.
339TODO-D: - symbols tracking not applicable for this kind of code because it
340TODO-D:   the shared objects are only used internally and no headers made
341TODO-D:   available.
342TODO-A: - debian/watch is present and looks ok (if needed, e.g. non-native)
343TODO-B: - debian/watch is not present but also not needed (e.g. native)
344TODO: - Upstream update history is (good/slow/sporadic)
345TODO: - Debian/Ubuntu update history is (good/slow/sporadic)
346TODO: - the current release is packaged
347TODO: - promoting this does not seem to cause issues for MOTUs that so far
348TODO:   maintained the package
349TODO: - no massive Lintian warnings
350TODO: - debian/rules is rather clean
351TODO: - It is not on the lto-disabled list
352RULE:   (fix, or the workaround should be directly in the package,
353RULE:    see https://launchpad.net/ubuntu/+source/lto-disabled-list)
354
355TODO-A: Problems:
356TODO-A: - TBD
357TODO-B: Problems: None
358
359[Upstream red flags]
360RULE: flag common issues:
361RULE: - if you see anything else odd, speak up and ask for clarification
362
363OK:
364TODO: - no Errors/warnings during the build
365TODO-A: - no incautious use of malloc/sprintf (as far as we can check it)
366TODO-B: - no incautious use of malloc/sprintf (the language has no direct MM)
367TODO: - no use of sudo, gksu, pkexec, or LD_LIBRARY_PATH (usage is OK inside
368TODO:   tests)
369TODO: - no use of user 'nobody' outside of tests
370RULE:   (consider at least `grep -Hrn nobody` for it
371RULE:    and run `find . -user nobody` in source and built binaries)
372TODO: - no use of setuid / setgid
373RULE:   (consider at least `grep -Hrn -e setuid -e setgid` for it
374RULE:    and run `find . \( -perm -4000 -o -perm -2000 \)` in source and
375RULE:    built binaries)
376TODO: - use of setuid, but ok because TBD (prefer systemd to set those
377TODO:   for services)
378TODO: - no important open bugs (crashers, etc) in Debian or Ubuntu
379RULE: Old dependencies, partially even still in main we want to get rid of over
380RULE: time. While they may be still there, we'd not want to add new
381RULE: dependencies. webkit = Web content engine library for GTK,
382RULE: qtwebkit = Web content engine library for Qt, libseed = GObject JavaScript
383RULE: bindings for the webkit engine
384TODO: - no dependency on webkit, qtwebkit or libseed
385TODO-A: - not part of the UI for extra checks
386TODO-B: - part of the UI, desktop file is ok
387TODO-A: - no translation present, but none needed for this case (user visible)?
388TODO-B: - translation present
389
390TODO-A: Problems:
391TODO-A: - TBD
392TODO-B: Problems: None