Skip to content

Commit

Permalink
fix(modules): do not compress modules
Browse files Browse the repository at this point in the history
This is potentially dangerous for many reason, first of all it might
compress firmwares that is not going to be picked up automatically by
drivers which does not support compression. Some drivers, for example,
may go looking directly for ucode or bin files without caring about
compression.

Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler committed Jan 30, 2025
1 parent 0628bcb commit ba153f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions images/Dockerfile.kairos-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ RUN apt-get update \
systemd-hwe-hwdb \
systemd-resolved \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# compress firmware (from 23.10, fw files come compressed)
# for some reason \+ is breaking. Using \; instead despite being slower
RUN find /usr/lib/firmware -type f ! -name "*.zst" -execdir zstd --rm -9 {} \;

FROM ubuntu-latest AS ubuntu-latest-selinux
RUN apt-get update \
Expand All @@ -350,7 +347,6 @@ FROM ubuntu-latest-selinux AS ubuntu-24.10
FROM ubuntu-latest-selinux AS ubuntu-24.04

FROM ${TARGETARCH}-${FLAVOR}-${FLAVOR_RELEASE}-${MODEL} AS ubuntu-legacy
RUN find /usr/lib/firmware -type f ! -name "*.zst" -execdir zstd --rm -9 {} \+

FROM ubuntu-legacy AS ubuntu-22.04
RUN apt-get update
Expand All @@ -367,9 +363,6 @@ FROM ubuntu-legacy AS ubuntu-20.04
###############################################################
FROM ${FLAVOR}-${FLAVOR_RELEASE} AS all

Check warning on line 364 in images/Dockerfile.kairos-ubuntu

View workflow job for this annotation

GitHub Actions / core-generic / ubuntu-24.10

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${FLAVOR}-${FLAVOR_RELEASE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 364 in images/Dockerfile.kairos-ubuntu

View workflow job for this annotation

GitHub Actions / core-rpi4 / ubuntu-20.04

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${FLAVOR}-${FLAVOR_RELEASE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 364 in images/Dockerfile.kairos-ubuntu

View workflow job for this annotation

GitHub Actions / core-rpi4 / ubuntu-22.04

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${FLAVOR}-${FLAVOR_RELEASE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# compress modules
RUN find /usr/lib/modules -type f -name "*.ko" -execdir zstd --rm -9 {} \+

RUN systemctl enable systemd-networkd
RUN systemctl enable ssh

Expand Down
7 changes: 0 additions & 7 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,6 @@ RUN apt-get update \
systemd-hwe-hwdb \
systemd-resolved \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# compress firmware (from 23.10, fw files come compressed)
# for some reason \+ is breaking. Using \; instead despite being slower
RUN find /usr/lib/firmware -type f ! -name "*.zst" -execdir zstd --rm -9 {} \;

FROM ubuntu-latest AS ubuntu-latest-selinux
RUN apt-get update \
Expand All @@ -351,7 +348,6 @@ FROM ubuntu-latest-selinux AS ubuntu-24.10
FROM ubuntu-latest-selinux AS ubuntu-24.04

FROM ${TARGETARCH}-${FLAVOR}-${FLAVOR_RELEASE}-${MODEL} AS ubuntu-legacy
RUN find /usr/lib/firmware -type f ! -name "*.zst" -execdir zstd --rm -9 {} \+

FROM ubuntu-legacy AS ubuntu-22.04
RUN apt-get update
Expand All @@ -368,9 +364,6 @@ FROM ubuntu-legacy AS ubuntu-20.04
###############################################################
FROM ${FLAVOR}-${FLAVOR_RELEASE} AS all

# compress modules
RUN find /usr/lib/modules -type f -name "*.ko" -execdir zstd --rm -9 {} \+

RUN systemctl enable systemd-networkd
RUN systemctl enable ssh

Expand Down

0 comments on commit ba153f5

Please sign in to comment.