mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
build_sysext: Remove any opaque directory markers
The Flatcar extension images built with build_sysext created directories in the overlay in a way that masked contents from other layers. Instead of fixing the way we create directories, make use of postprocessing to avoid any similar problems show up again in the future.
This commit is contained in:
parent
71b4b084e9
commit
5aecc0a802
@ -275,6 +275,10 @@ all_fields=(
|
|||||||
"ARCHITECTURE=${ARCH}"
|
"ARCHITECTURE=${ARCH}"
|
||||||
)
|
)
|
||||||
printf '%s\n' "${all_fields[@]}" >"${BUILD_DIR}/install-root/usr/lib/extension-release.d/extension-release.${SYSEXTNAME}"
|
printf '%s\n' "${all_fields[@]}" >"${BUILD_DIR}/install-root/usr/lib/extension-release.d/extension-release.${SYSEXTNAME}"
|
||||||
|
|
||||||
|
info "Removing opaque directory markers to always merge all contents"
|
||||||
|
find "${BUILD_DIR}/install-root" -xdev -type d -exec sh -c 'if [ "$(attr -R -q -g overlay.opaque {} 2>/dev/null)" = y ]; then attr -R -r overlay.opaque {}; fi' \;
|
||||||
|
|
||||||
mksquashfs "${BUILD_DIR}/install-root" "${BUILD_DIR}/${SYSEXTNAME}.raw" \
|
mksquashfs "${BUILD_DIR}/install-root" "${BUILD_DIR}/${SYSEXTNAME}.raw" \
|
||||||
-noappend -comp "${FLAGS_compression}" ${FLAGS_mksquashfs_opts}
|
-noappend -comp "${FLAGS_compression}" ${FLAGS_mksquashfs_opts}
|
||||||
rm -rf "${BUILD_DIR}"/{fs-root,install-root,workdir}
|
rm -rf "${BUILD_DIR}"/{fs-root,install-root,workdir}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
- Fixed that systemd-sysext images can extend directories where Flatcar extensions are also shipping files, e.g., that the sysext-bakery Kubernetes extension works when OEM extensions are present ([sysext-bakery#50](https://github.com/flatcar/sysext-bakery/issues/50))
|
Loading…
Reference in New Issue
Block a user