Feature #9881

Jessie: replace our patches to upstream initscripts with systemd drop-in overrides

Added by intrigeri 2015-08-02 08:46:40 . Updated 2015-08-26 05:35:41 .

Status:
Resolved
Priority:
Normal
Assignee:
intrigeri
Category:
Target version:
Start date:
Due date:
2015-07-15
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:
267

Description

We are currently patching 18 initscripts from Debian when building a Tails ISO. For Tails 2.0 (Jessie), we want to divide this number by at least 2, using systemd drop-in overrides.


Subtasks


History

#1 Updated by intrigeri 2015-08-02 08:46:52

  • blocks #8668 added

#2 Updated by intrigeri 2015-08-02 08:47:20

Next step is to check whether systemd in Jessie actually honors drop-in overrides for initscripts.

#4 Updated by intrigeri 2015-08-09 01:26:54

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

Initial research shows that:

  • one can use systemd drop-in overrides for initscripts: on Jessie, initscripts are turned into “native” systemd units by a unit generator
  • however, one cannot reset dependencies (e.g. After=) to the empty list; one can only add to the list; so e.g. for apparmor.service, the only options we have to replace the dependency on remote-fs.target with one on local-fs.target are:
    • override the full unit file (/run/systemd/generator.late/apparmor.service) by copying it into /etc/systemd/system/ and modifying it;
    • keeping our current patch against the initscript.

#5 Updated by intrigeri 2015-08-09 02:19:51

  • Status changed from In Progress to Resolved
  • % Done changed from 10 to 100

Applied in changeset commit:83bc1b9e8350b318a810ea8d3140d4da6448b1c7.

#6 Updated by intrigeri 2015-08-09 02:22:29

  • Target version changed from Tails_1.6 to Tails_2.0
  • Deliverable for set to 267

In the end, drop-in overrides were not needed: systemctl disable was enough. And I decided that introducing a complete apparmor.service unit was not worth it, merely to drop a simple patch against the corresponding initscript.

Mission accomplished: we now patch only 8 initscripts on feature/jessie.