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]
 70OK:
 71TODO: - no other Dependencies to MIR due to this
 72TODO:   - SRCPKG checked with `check-mir`
 73TODO:   - all dependencies can be found in `seeded-in-ubuntu` (already in main)
 74TODO:   - none of the (potentially auto-generated) dependencies (Depends
 75TODO:     and Recommends) that are present after build are not in main
 76TODO: - no -dev/-debug/-doc packages that need exclusion
 77TODO: - No dependencies in main that are only superficially tested requiring
 78TODO:   more tests now.
 79
 80TODO-A: Problems:
 81TODO-A: - TBD
 82TODO-B: Problems: None
 83
 84[Embedded sources and static linking]
 85RULE: - Embedding a library source increases the maintenance burden of a package
 86RULE:   since that source needs to be maintained separately from the source in
 87RULE:   the Ubuntu archive. If a source embeds another package, in general the
 88RULE:   embedded package should not be used and the packaging should be modified
 89RULE:   to use the Ubuntu archive version. When this is not possible, the
 90RULE:   security team must agree to using the embedded source.
 91RULE: - Similarly, when a binary from one source package statically links to
 92RULE:   libraries from another source package from the archive, when those
 93RULE:   libraries are updated the statically linked binaries must be rebuilt
 94RULE:   with the updated libraries to receive the fix, which increases the
 95RULE:   maintenance burden. For this reason, static linking in archive builds
 96RULE:   is discouraged unless static linking is required for the package in
 97RULE:   question to function correctly (e.g. an integrity scanner).
 98RULE: - If debian/control uses `Built-Using` or `Static-Built-Using:` it may
 99RULE:   indicate static linking
100RULE:   which should be discouraged (except golang/rust, see below)
101RULE:   - Rust - toolchain and dh tools are still changing a lot. Currently it
102RULE:     is expected to only list the rust toolchain in `Built-Using`.
103RULE:     the remaining (currently vendored) dependencies shall be tracked
104RULE:     in a Cargo.lock file
105RULE:   - Go - here `Built-Using` is expected to only contain the go
106RULE:     toolchain used to build it. Additional packaged dependencies
107RULE:     will be tracked in `Static-Built-Using:` automatically.
108RULE:     The superset of packaged and vendored (if used) dependencies shall be
109RULE:     tracked in a go.sum file (go.mod are direct dependencies, go.sum
110RULE:     covers checksum content for direct and indirect dependencies. This
111RULE:     should be present for reproducible builds already which involve
112RULE:     having a go.sum.
113RULE:     We have let go packages into main before this existed, so we have
114RULE:     sub-optimal prior-art. But down the road - if vendoring is used - we
115RULE:     want to switch to require that once the toolchain is ready to
116RULE:     create it accordingly.
117
118OK:
119TODO: - no embedded source present
120TODO: - no static linking
121TODO: - does not have unexpected Built-Using entries
122
123RULE: Golang
124RULE: - golang 1.4 packages and earlier could only statically compile their
125RULE:   binaries. golang 1.5 in Ubuntu 16.10 introduced `-buildmode=shared`
126RULE:   to build shared libraries and `-linkshared` to dynamically link against
127RULE:   shared libraries. In general, statically compiled binaries are not
128RULE:   suitable for the Ubuntu archive because they increase the maintenance
129RULE:   burden significantly. As such, from Ubuntu 16.10 and later, golang
130RULE:   packages in main were expected to be built with shared
131RULE:   libraries.
132RULE: - Evaluating cost/benefits while considering the ABI instability of golang
133RULE:   libraries during this period, the MIR team decided for 17.10 and later
134RULE:   to allow static builds of golang packages in main, so long as the number
135RULE:   of these packages remains low and they follow the guidelines below:
136RULE:   - golang applications in main are expected:
137RULE:       1. to build using `golang-*-dev` packages from the Ubuntu archive
138RULE:          creating `Built-Using` in debian/control. This requirement ensures
139RULE:          that the security team is able to track security issues for all
140RULE:          affected static binary packages
141RULE:       2. not to build any vendored (i.e. embedded) code in the source
142RULE:          package whose binaries appear in the archive (e.g. test code is
143RULE:          ok) without clear justification from the requesting team and
144RULE:          approval from the security team. This requirement ensures that
145RULE:          the security team is able to track security issues for all
146RULE:          affected source packages.
147RULE:       3. only build against approved vendored sources (when applicable).
148RULE:          If new versions add new components or dependencies in subsequent
149RULE:          Ubuntu uploads this will need re-evaluation by the security
150RULE:          team. This requirement ensures that the security team is able
151RULE:          to track security issues for all affected source packages.
152RULE: - The intended outcomes from the above requirements (if not vendored) are
153RULE:   for packages in main to standardize on particular versions of
154RULE:   `golang-*-dev` packages (when possible) with the requesting team
155RULE:    adjusting their packaging as necessary, all teams responsible for
156RULE:    golang packages coordinating on transitions and the requesting team
157RULE:    occasionally creating new `golang-*-dev` packages as agreed to in the
158RULE:    MIR bug (upstreaming to Debian whenever possible).
159RULE: - As a practical matter, golang/rust source packages in main are not
160RULE:   required to remove unused embedded code copies.
161RULE: - If based on the above options it's a statically compiled golang package:
162RULE:   - Does the package use dh-golang (if not, suggest dh-make-golang to
163RULE:     create the package)?
164RULE:   - Does debian/control use `Built-Using: ${misc:Built-Using}` for each
165RULE:     non'-dev' binary package (importantly, golang-*-dev packages only
166RULE:     ship source files so don't need Built-Using)?
167RULE:   - Does the package follow Debian Go packaging guidelines?
168RULE:     (See: https://go-team.pages.debian.net/packaging.html)
169RULE: - When it is infeasible to comply with this policy, the justification,
170RULE:   discussion and approval should all be clearly represented in the bug.
171
172OK:
173TODO-A: - not a go package, no extra constraints to consider in that regard
174TODO-B: - Go Package that follows the Debian Go packaging guidelines
175
176TODO-A:   - vendoring is used, but the reasoning is sufficiently explained
177TODO-B:   - No vendoring used, all Built-Using are in main
178
179TODO-A:   - golang: shared builds
180TODO-B:   - golang: static builds are used, the team confirmed their commitment
181TODO-B:     to the additional responsibilities implied by static builds.
182
183TODO-A: - not a rust package, no extra constraints to consider in that regard
184TODO-B: - Rust package that has all dependencies vendored. It does neither
185TODO-B:   have *Built-Using (after build). Nor does the build log indicate
186TODO-B:   built-in sources that are missed to be reported as Built-Using.
187
188TODO: - rust package using dh_cargo (dh ... --buildsystem cargo)
189
190TODO-A: - Includes vendored code, the package has documented how to refresh this
191TODO-A:   code at <TBD>
192TODO-B: - Does not include vendored code
193
194TODO-A: Problems:
195TODO-A: - TBD
196TODO-B: Problems: None
197
198[Security]
199RULE: - Determine if the package may have security implications or history.
200RULE:   Err on the side of caution.
201RULE: - If the package is security sensitive, you should review as much as you
202RULE:   can and then assign to the ubuntu-security team. The bug will then be
203RULE:   added to the prioritized list of MIR security reviews.
204RULE: - We do not block on, but want to recommend using enhanced isolation
205RULE:   features, things like systemd isolation, apparmor and such shall at
206RULE:   least have gotten a thought if they would help to mitigate risks in
207RULE:   this case. If we spot a case where we think it should be either easy or
208RULE:   very beneficial to use such features we should add them to recommended
209RULE:   tasks.
210
211OK:
212TODO: - history of CVEs does not look concerning
213TODO: - does not run a daemon as root
214TODO: - does not use webkit1,2
215TODO: - does not use lib*v8 directly
216TODO: - does not parse data formats (files [images, video, audio,
217TODO:   xml, json, asn.1], network packets, structures, ...) from
218TODO:   an untrusted source.
219TODO: - does not expose any external endpoint (port/socket/... or similar)
220TODO: - does not process arbitrary web content
221TODO: - does not use centralized online accounts
222TODO: - does not integrate arbitrary javascript into the desktop
223TODO: - does not deal with system authentication (eg, pam), etc)
224TODO: - does not deal with security attestation (secure boot, tpm, signatures)
225TODO: - does not deal with cryptography (en-/decryption, certificates,
226TODO:   signing, ...)
227TODO: - this makes appropriate (for its exposure) use of established risk
228TODO:   mitigation features (dropping permissions, using temporary environments,
229TODO:   restricted users/groups, seccomp, systemd isolation features,
230TODO:   apparmor, ...)
231
232TODO-A: Problems:
233TODO-A: - TBD
234TODO-B: Problems: None
235
236[Common blockers]
237RULE: - There are plenty of testing requirements, hopefully already resolved
238RULE:   by the reporter upfront, see "Quality assurance - testing" section of
239RULE:   the Main Inclusion requirements
240RULE: - The MIR process shall ensure quality and maintainability, due to that
241RULE:   the expectations to that are quite high, but especially in cases where
242RULE:   special HW is needed that can be a hard to achieve which bloats the
243RULE:   options below, it is a balance or compromise we need to strike between
244RULE:   giving such cases a pass too easily and making them impossible.
245RULE:   Please read (to keep this short) for more background:
246RULE:   https://github.com/canonical/ubuntu-mir/issues/30
247
248OK:
249TODO: - does not FTBFS currently
250TODO: - does have a test suite that runs at build time
251TODO:   - test suite fails will fail the build upon error.
252TODO: - does have a non-trivial test suite that runs as autopkgtest
253TODO-A: - This does seem to need special HW for build or test so it can't be
254TODO-A:   automatic at build or autopkgtest time. But as outlined
255TODO-A:   by the requester in [Quality assurance - testing] there:
256TODO-A1:   - is hardware and a test plan or code
257TODO-A2:   - are partner engagements and a test plan or code
258TODO-A3:   - is community support to test this for Ubuntu
259TODO-A4:   - a simulator and a test plan or code
260TODO-A5:   - is upstream support to test this for Ubuntu
261TODO-A6:   - an agreement with the manufacturer to test this for Ubuntu
262TODO-A7:   - an agreement with solutions-qa to be able to test this for Ubuntu
263TODO-A8:   - an agreement with another team to be able to test this for Ubuntu
264TODO-B: - This does not need special HW for build or test
265TODO-C: - This does need special HW for thorough testing, but all options to
266TODO-C:   get this covered have been exhausted and based on demonstration of
267TODO-C:   enough investigation and proof of why there is currently no other
268TODO-C:   option it is accepted as-is as a compromise.
269TODO-C:   The owning team is committed and aware of the implications for
270TODO-C:   ongoing maintenance.
271TODO: - if a non-trivial test on this level does not make sense (the lib alone
272TODO:   is only doing rather simple things), is the overall solution (app+libs)
273TODO:   extensively covered i.e. via end to end autopkgtest ?
274TODO: - no new python2 dependency
275TODO: - Python package, but using dh_python
276TODO: - Go package, but using dh-golang
277
278TODO-A: Problems:
279TODO-A: - TBD
280TODO-B: Problems: None
281
282[Packaging red flags]
283RULE: - Does Ubuntu carry a non necessary delta?
284RULE: - If it's a library, does it either have a symbols file or use an empty
285RULE:   argument to dh_makeshlibs -V? (pass such a patch on to Debian, but
286RULE:   don't block on it).
287RULE:   Note that for C++, see https://wiki.ubuntu.com/DailyRelease/FAQ
288RULE:   for a method to demangle C++ symbols files.
289RULE: - Does it have a watch file? (If relevant, e.g. non-native)
290RULE: - Is its update history slow or sporadic?
291RULE: - Is the current release packaged?
292RULE: - Will entering main make it harder for the people currently keeping it
293RULE:   up to date? (i.e. are they only MOTUs?)
294RULE: - Lintian warnings
295RULE: - Is debian/rules a mess? Ideally it uses dh and overrides to make it as
296RULE:   tiny as possible.
297RULE: - If a package shall be promoted it should NOT be on the lto-disabled
298RULE:   list, but the fix, or the workaround should be directly in the package
299RULE:   to enforce maintainer awareness and make it more visible to anyone
300RULE:   looking at the package - see https://wiki.ubuntu.com/ToolChain/LTO.
301
302OK:
303TODO-A: - Ubuntu does not carry a delta
304TODO-B: - Ubuntu does carry a delta, but it is reasonable and maintenance under
305TODO-B:   control
306TODO-A: - symbols tracking is in place.
307TODO-B: - For c++ libraries - symbols tracking isn't in place but the owning
308TODO-B:   team tried to set it up and came back with a reasonable rationale
309TODO-B:   of why it isn't practical to do for the package.
310TODO-B:   If symbols tracking isn't used then it's recommended to investigate
311TODO-B:   using an alternative like abigail or abi-compliance-check in CI
312TODO-B:   or bumping SOVER with every package update.
313TODO-C: - symbols tracking not applicable for this kind of code.
314TODO-A: - debian/watch is present and looks ok (if needed, e.g. non-native)
315TODO-B: - debian/watch is not present but also not needed (e.g. native)
316TODO: - Upstream update history is (good/slow/sporadic)
317TODO: - Debian/Ubuntu update history is (good/slow/sporadic)
318TODO: - the current release is packaged
319TODO: - promoting this does not seem to cause issues for MOTUs that so far
320TODO:   maintained the package
321TODO: - no massive Lintian warnings
322TODO: - debian/rules is rather clean
323TODO: - It is not on the lto-disabled list
324RULE:   (fix, or the workaround should be directly in the package,
325RULE:    see https://launchpad.net/ubuntu/+source/lto-disabled-list)
326
327TODO-A: Problems:
328TODO-A: - TBD
329TODO-B: Problems: None
330
331[Upstream red flags]
332RULE: flag common issues:
333RULE: - if you see anything else odd, speak up and ask for clarification
334
335OK:
336TODO: - no Errors/warnings during the build
337TODO-A: - no incautious use of malloc/sprintf (as far as we can check it)
338TODO-B: - no incautious use of malloc/sprintf (the language has no direct MM)
339TODO: - no use of sudo, gksu, pkexec, or LD_LIBRARY_PATH (usage is OK inside
340TODO:   tests)
341TODO: - no use of user 'nobody' outside of tests
342RULE:   (consider at least `grep -Hrn nobody` for it
343RULE:    and run `find . -user nobody` in source and built binaries)
344TODO: - no use of setuid / setgid
345RULE:   (consider at least `grep -Hrn -e setuid -e setgid` for it
346RULE:    and run `find . \( -perm -4000 -o -perm -2000 \)` in source and
347RULE:    built binaries)
348TODO: - use of setuid, but ok because TBD (prefer systemd to set those
349TODO:   for services)
350TODO: - no important open bugs (crashers, etc) in Debian or Ubuntu
351RULE: Old dependencies, partially even still in main we want to get rid of over
352RULE: time. While they may be still there, we'd not want to add new
353RULE: dependencies. webkit = Web content engine library for GTK,
354RULE: qtwebkit = Web content engine library for Qt, libseed = GObject JavaScript
355RULE: bindings for the webkit engine
356TODO: - no dependency on webkit, qtwebkit or libseed
357TODO-A: - not part of the UI for extra checks
358TODO-B: - part of the UI, desktop file is ok
359TODO-A: - no translation present, but none needed for this case (user visible)?
360TODO-B: - translation present
361
362TODO-A: Problems:
363TODO-A: - TBD
364TODO-B: Problems: None