Skip to content

Commit b9d2b6e

Browse files
authored
Merge pull request #75 from OSInside/firecracker_to_usr_not_var
Manage firecracker pilot with systemd-tmpfiles for SUSE
2 parents b809e3b + c9f2116 commit b9d2b6e

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package: clean vendor sourcetar
1818
cp package/flake-pilot.spec package/build
1919
cp package/cargo_config package/build
2020
cp package/flake-pilot-rpmlintrc package/build
21+
cp package/systemd-tmpfiles-for-suse.conf package/build
2122
# update changelog using reference file
2223
helper/update_changelog.py --since package/flake-pilot.changes.ref > \
2324
package/build/flake-pilot.changes

package/flake-pilot.spec

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ URL: https://github.com/OSInside/flake-pilot
3131
Source0: %{name}.tar.gz
3232
Source1: cargo_config
3333
Source2: %{name}-rpmlintrc
34+
# SUSE-specific source additions (1001+)
35+
Source1001: systemd-tmpfiles-for-suse.conf
3436
%if 0%{?debian} || 0%{?ubuntu}
3537
Requires: golang-github-containers-common
3638
%endif
@@ -141,9 +143,12 @@ make DESTDIR=%{buildroot}/ install_sci
141143
mkdir -p %{buildroot}/overlayroot
142144
mkdir -p %{buildroot}/usr/lib/flake-pilot
143145

146+
%if 0%{?suse_version} >= 1600
147+
install -D -m 644 %{SOURCE1001} %{buildroot}%{_tmpfilesdir}/flake-pilot-firecracker.conf
148+
%else
144149
mkdir -p %{buildroot}/var/lib/firecracker/images
145-
146150
mkdir -p %{buildroot}/var/lib/firecracker/storage
151+
%endif
147152

148153
mkdir -p %{buildroot}/etc/dracut.conf.d
149154
mkdir -p %{buildroot}/usr/lib/dracut/modules.d/80netstart
@@ -180,9 +185,16 @@ install -m 644 flakes.yml %{buildroot}/etc/flakes.yml
180185
%doc /usr/share/man/man8/podman-pilot.8.gz
181186

182187
%files -n flake-pilot-firecracker
188+
%if 0%{?suse_version} >= 1600
189+
%{_tmpfilesdir}/flake-pilot-firecracker.conf
190+
%ghost %dir /var/lib/firecracker
191+
%ghost %dir /var/lib/firecracker/images
192+
%ghost %dir /var/lib/firecracker/storage
193+
%else
183194
%dir /var/lib/firecracker
184195
%dir /var/lib/firecracker/images
185196
%dir /var/lib/firecracker/storage
197+
%endif
186198
%dir /usr/lib/flake-pilot
187199
%config /etc/flakes/firecracker-flake.yaml
188200
%config /etc/flakes/firecracker.json
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
d /var/lib/firecracker
2+
d /var/lib/firecracker/images
3+
d /var/lib/firecracker/storage

0 commit comments

Comments
 (0)