From 76b11dea0d9962824a076a88795903b0cc4c51c6 Mon Sep 17 00:00:00 2001
From: Emanuele Aina <emanuele.aina@collabora.com>
Date: Thu, 7 Mar 2019 23:46:55 +0100
Subject: [PATCH] ostree: Subsume ostree-prepare.sh into the recipe itself

The previous machine-id rework already moved one bit of ostree-prepare.sh
out of it, let's directly embed the two remaining commands in the
recipe directly for simplicity.

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
---
 apertis-ostree-commit.yaml | 8 +++++++-
 scripts/ostree-prepare.sh  | 9 ---------
 2 files changed, 7 insertions(+), 10 deletions(-)
 delete mode 100755 scripts/ostree-prepare.sh

diff --git a/apertis-ostree-commit.yaml b/apertis-ostree-commit.yaml
index dc2a0ba7..755a8cc3 100644
--- a/apertis-ostree-commit.yaml
+++ b/apertis-ostree-commit.yaml
@@ -71,8 +71,14 @@ actions:
     script: scripts/mildenhall-extensions-theme.sh
 
   - action: run
+    description: "Prevent /home and /srv from being created incorrectly from tmpfiles.d"
     chroot: true
-    script: scripts/ostree-prepare.sh
+    command: rm -f /usr/lib/tmpfiles.d/home.conf
+
+  - action: run
+    description: "Drop legacy D-Bus tmpfiles.d snippet"
+    chroot: true
+    command: rm -f /usr/lib/tmpfiles.d/dbus.conf
 
   # can't be done before due to https://github.com/systemd/systemd/issues/11925
   - action: run
diff --git a/scripts/ostree-prepare.sh b/scripts/ostree-prepare.sh
deleted file mode 100755
index 6c80b355..00000000
--- a/scripts/ostree-prepare.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Creates /home and /srv in ways incorrect for ostree
-rm -f /usr/lib/tmpfiles.d/home.conf
-
-# tries to create unneeded legacy file
-rm -f /usr/lib/tmpfiles.d/dbus.conf
-- 
GitLab