Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defer squashfs mounts #2276

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[Unit]
Description=Link additional kernel modules
RequiresMountsFor=PREFIX/lib/modules PREFIX/src/kernels
# Rerunning this service after the system is fully loaded will override
# the already linked kernel modules. This doesn't affect the running system,
# since kernel modules are linked early in the boot sequence, but we still
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[Unit]
Description=Load additional kernel modules
RequiresMountsFor=PREFIX/lib/modules PREFIX/src/kernels
After=link-kernel-modules.service
Requires=link-kernel-modules.service
# Disable manual restarts to prevent loading kernel modules
Expand Down
14 changes: 10 additions & 4 deletions packages/os/os.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Source111: metricdog.service
Source112: metricdog.timer
Source113: send-boot-success.service
Source114: [email protected]
Source115: link-kernel-modules.service
Source116: load-kernel-modules.service
Source115: link-kernel-modules.service.in
Source116: load-kernel-modules.service.in
Source117: cfsignal.service
Source118: generate-network-config.service
Source119: prepare-primary-interface.service
Expand Down Expand Up @@ -430,10 +430,16 @@ install -p -m 0644 \
%{S:100} %{S:101} %{S:102} %{S:103} %{S:105} \
%{S:106} %{S:107} %{S:110} %{S:111} %{S:112} \
%{S:113} %{S:114} %{S:118} %{S:119} \
%{buildroot}%{_cross_unitdir}

%if %{_is_vendor_variant}
%{S:115} %{S:116} \
%endif
sed -e 's|PREFIX|%{_cross_prefix}|g' %{S:115} > link-kernel-modules.service
sed -e 's|PREFIX|%{_cross_prefix}|g' %{S:116} > load-kernel-modules.service
install -p -m 0644 \
link-kernel-modules.service \
load-kernel-modules.service \
%{buildroot}%{_cross_unitdir}
%endif

%if %{_is_aws_variant}
install -p -m 0644 %{S:9} %{buildroot}%{_cross_templatedir}
Expand Down
4 changes: 2 additions & 2 deletions packages/release/usr-share-licenses.mount.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Description=License files
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
After=local-fs-pre.target
Before=umount.target
After=local-fs.target

[Mount]
What=PREFIX/share/bottlerocket/licenses.squashfs
Expand Down
3 changes: 2 additions & 1 deletion packages/release/usr-src-kernels.mount.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Description=Kernel Development Sources (Read-Write)
DefaultDependencies=no
Conflicts=umount.target
RequiresMountsFor=/var/lib/kernel-devel/.overlay/lower
Before=local-fs.target umount.target
Before=umount.target
After=local-fs.target

[Mount]
What=overlay
Expand Down
4 changes: 2 additions & 2 deletions packages/release/var-lib-kernel-devel-lower.mount.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Description=Kernel Development Sources (Read-Only)
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
Before=umount.target
Wants=prepare-var.service
After=prepare-var.service
After=prepare-var.service local-fs.target
RequiresMountsFor=/var

[Mount]
Expand Down