Merge lp:~xnox/ubuntu-touch-customization-hooks/systemd into lp:ubuntu-touch-customization-hooks

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: John McAleely
Approved revision: 40
Merged at revision: 40
Proposed branch: lp:~xnox/ubuntu-touch-customization-hooks/systemd
Merge into: lp:ubuntu-touch-customization-hooks
Diff against target: 85 lines (+25/-17)
5 files modified
debian/control (+1/-2)
debian/install (+1/-0)
etc/init/custom-apparmor-cache.conf (+1/-15)
lib/systemd/system/custom-apparmor-cache.service (+8/-0)
usr/bin/custom-apparmor-cache (+14/-0)
To merge this branch: bzr merge lp:~xnox/ubuntu-touch-customization-hooks/systemd
Reviewer Review Type Date Requested Status
Scott Sweeny (community) Approve
Dimitri John Ledkov (community) Approve
The Savilerow team Pending
Review via email: mp+313124@code.launchpad.net

Commit message

Support custom apparmor profiles in systemd.

Description of the change

Support custom apparmor profiles in systemd.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve
40. By Dimitri John Ledkov

Integrate custom apparmor cache with systemd.

Revision history for this message
Scott Sweeny (ssweeny) wrote :

Approving because the code looks reasonable.

I'm curious though. Is there a scenario where we're going to have both clicks and systemd? I was under the impression that both transitions were happening simultaneously.

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 13 December 2016 at 14:43, Scott Sweeny <email address hidden> wrote:
> Review: Approve
>
> Approving because the code looks reasonable.
>
> I'm curious though. Is there a scenario where we're going to have both clicks and systemd? I was under the impression that both transitions were happening simultaneously.

We currently do not ship a product with clicks and systemd.
We have M10 images with systemd as pid 1.
There is a port of ubuntu-app-launch that uses systemd to launch
pleora of app types, including clicks.
I'm working on porting session to systemd, with as little regression
as possible.
As I want to remove src:upstart from zesty as soon as possible without
regression personal nor touch.
This is one of the four outstanding packages that hold up binary
dependency on upstart.
There are a few more session jobs to port and I will be done with this
task, fully unblocking path to all-snaps all-systemd personal roadmap.

--
Regards,

Dimitri.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-09-25 12:38:10 +0000
3+++ debian/control 2016-12-13 11:42:35 +0000
4@@ -11,7 +11,6 @@
5
6 Package: ubuntu-touch-customization-hooks
7 Architecture: all
8-Depends: upstart,
9- ${misc:Depends},
10+Depends: ${misc:Depends},
11 Description: Enables customization of images
12 Enables customization of Ubuntu Touch images.
13
14=== modified file 'debian/install'
15--- debian/install 2013-09-13 15:55:41 +0000
16+++ debian/install 2016-12-13 11:42:35 +0000
17@@ -1,2 +1,3 @@
18 etc/* /etc
19 usr/* /usr
20+lib/* /lib
21
22=== modified file 'etc/init/custom-apparmor-cache.conf'
23--- etc/init/custom-apparmor-cache.conf 2014-09-22 20:08:31 +0000
24+++ etc/init/custom-apparmor-cache.conf 2016-12-13 11:42:35 +0000
25@@ -3,20 +3,6 @@
26 start on starting click-system-hooks
27
28 task
29-
30-script
31- [ -d /custom/cache/apparmor ] && [ -d /custom/lib/apparmor/ ] || exit 0
32- # Ordering is important. mtimes for the following must be:
33- # click symlink < apparmor profile < apparmor cache
34- if [ -d /custom/lib/apparmor/clicks ] && [ -d /var/lib/apparmor/clicks ] ; then
35- cp -Pnu /custom/lib/apparmor/clicks/* /var/lib/apparmor/clicks || true
36- fi
37- if [ -d /custom/lib/apparmor/profiles ] && [ -d /var/lib/apparmor/profiles ] ; then
38- cp -nu /custom/lib/apparmor/profiles/* /var/lib/apparmor/profiles || true
39- fi
40- if [ -d /custom/cache/apparmor ] && [ -d /var/cache/apparmor ] ; then
41- cp -nu /custom/cache/apparmor/* /var/cache/apparmor/ || true
42- fi
43-end script
44+exec custom-apparmor-cache
45
46 # vim:syntax=upstart
47
48=== added directory 'lib'
49=== added directory 'lib/systemd'
50=== added directory 'lib/systemd/system'
51=== added directory 'lib/systemd/system/click-system-hooks.service.wants'
52=== added symlink 'lib/systemd/system/click-system-hooks.service.wants/custom-apparmor-cache.service'
53=== target is u'/lib/systemd/system/custom-apparmor-cache.service'
54=== added file 'lib/systemd/system/custom-apparmor-cache.service'
55--- lib/systemd/system/custom-apparmor-cache.service 1970-01-01 00:00:00 +0000
56+++ lib/systemd/system/custom-apparmor-cache.service 2016-12-13 11:42:35 +0000
57@@ -0,0 +1,8 @@
58+[Unit]
59+Description=Copy precompiled apparmor cache from /custom
60+After=custom.mount
61+Wants=custom.mount
62+Before=click-system-hooks.service
63+
64+[Service]
65+ExecStart=/usr/bin/custom-apparmor-cache
66
67=== added directory 'usr/bin'
68=== added file 'usr/bin/custom-apparmor-cache'
69--- usr/bin/custom-apparmor-cache 1970-01-01 00:00:00 +0000
70+++ usr/bin/custom-apparmor-cache 2016-12-13 11:42:35 +0000
71@@ -0,0 +1,14 @@
72+#!/bin/sh
73+
74+[ -d /custom/cache/apparmor ] && [ -d /custom/lib/apparmor/ ] || exit 0
75+# Ordering is important. mtimes for the following must be:
76+# click symlink < apparmor profile < apparmor cache
77+if [ -d /custom/lib/apparmor/clicks ] && [ -d /var/lib/apparmor/clicks ] ; then
78+ cp -Pnu /custom/lib/apparmor/clicks/* /var/lib/apparmor/clicks || true
79+fi
80+if [ -d /custom/lib/apparmor/profiles ] && [ -d /var/lib/apparmor/profiles ] ; then
81+ cp -nu /custom/lib/apparmor/profiles/* /var/lib/apparmor/profiles || true
82+fi
83+if [ -d /custom/cache/apparmor ] && [ -d /var/cache/apparmor ] ; then
84+ cp -nu /custom/cache/apparmor/* /var/cache/apparmor/ || true
85+fi

Subscribers

People subscribed via source and target branches