Skip to content
Snippets Groups Projects
Commit 6c9e98c1 authored by Frédéric Dalleau's avatar Frédéric Dalleau Committed by Frédéric Dalleau
Browse files

Change from OSTree service file to systemd tmpfile

This reverts commit 79e6240b1fdf143b13bb9763d06182ac73144e76.
Instead of regenerating a new service file on boot in all ospacks, make
systemd-tmpfile creates a symbolic link used by canterbury.

Apertis: https://phabricator.apertis.org/T4589



Signed-off-by: default avatarFrédéric Dalleau <frederic.dalleau@collabora.com>
Reviewed-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
Differential Revision: https://phabricator.apertis.org/D7616
parent 7c6c8b6b
No related branches found
No related tags found
No related merge requests found
......@@ -721,10 +721,6 @@ actions:
{{ end }}
{{ end }}
- action: overlay
description: "Install canterbury hotfix"
source: overlays/canterbury
- action: pack
compression: gz
file: {{ $ospack }}
......@@ -40,6 +40,11 @@ actions:
description: Cleanup /var/lib
script: scripts/remove_var_lib_parts.binary
- action: run
description: Move canterbury cache
chroot: true
script: scripts/canterbury-platform-cache.sh
- action: run
chroot: true
script: scripts/ostree-prepare.sh
......
[Unit]
Description=Canterbury platform index creation
Before=multi-user.target
ConditionPathExists=/usr/bin/canterbury-update-component-index
ConditionPathExists=!/var/cache/app-info/xmls/apertis-platform.xml.gz
[Service]
Type=oneshot
ExecStart=/usr/bin/canterbury-update-component-index --platform
[Install]
WantedBy=multi-user.target
../canterbury-index.service
\ No newline at end of file
#!/bin/sh
set -e
TMPFILE=/usr/lib/tmpfiles.d/canterbury-platform-cache.conf
CACHE=apertis-platform.xml.gz
SOURCE=/var/cache/app-info/xmls
TARGET=/usr/share/canterbury
# Check the canterbury cache filed
if [ ! -f $SOURCE/$CACHE ] ; then
# Exit successfully if Canterbury is not in the image
exit 0
fi
# Move the canterbury cache file to /usr
mkdir -p $TARGET
mv $SOURCE/$CACHE $TARGET
# Create a symbolic link at the standard place
echo "L+ $SOURCE/$CACHE - - - - $TARGET/$CACHE" > $TMPFILE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment