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

Update to OpenZFS 2.2.2 #3779

Merged
merged 3 commits into from
Mar 12, 2024
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
47 changes: 43 additions & 4 deletions build-tools/src/scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,56 @@ ARG GID
# this must be an ARG so it doesn't carry through post-build phase
ARG all_proxy
# hadolint ignore=DL3018
RUN apk add --no-cache openssh-client git gcc linux-headers libc-dev util-linux libpcap-dev bash vim make protobuf protobuf-dev sudo tar curl graphviz ttf-freefont patch dnsmasq
# we need updated libraries, here we use the same version as for eve/alpine
# hadolint ignore=DL3018
RUN apk --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.16/main add -U --upgrade zfs-dev zfs-libs
RUN apk add --no-cache openssh-client git gcc linux-headers libc-dev util-linux libpcap-dev bash vim make protobuf \
protobuf-dev sudo tar curl graphviz ttf-freefont patch dnsmasq ca-certificates build-base gettext-dev \
libtirpc-dev automake autoconf libtool attr-dev e2fsprogs-dev glib-dev openssl-dev util-linux-dev

RUN deluser ${USER} ; delgroup ${GROUP} || :
RUN sed -ie /:${UID}:/d /etc/passwd /etc/shadow ; sed -ie /:${GID}:/d /etc/group || :
RUN addgroup -g ${GID} ${GROUP} && adduser -h /home/${USER} -G ${GROUP} -D -H -u ${UID} ${USER}
RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USER}
# dep is deprecated and probably should be gotten rid of; no need to parametrize the version, as there will be no further releases
# hadolint ignore=SC2086,DL4006
RUN OS="$(uname -o | tr '[:upper:]' '[:lower:]')" && PLATFORM="$(go version | sed 's#^.*'${OS}'/##g')" && curl -o /usr/local/bin/dep -L "https://github.com/golang/dep/releases/download/v0.5.4/dep-${OS}-${PLATFORM}" && chmod +x /usr/local/bin/dep
### Build OpenZFS 2.2.2 libs here for 'make test' and full eve build in one spot
# should be aligned with kernel
# * ZFS on Linux
# coreutils's uname -o breaks above url generation.
# hadolint ignore=DL3018
RUN apk add --no-cache coreutils
ENV ZFS_VERSION=2.2.2
ENV ZFS_COMMIT=zfs-${ZFS_VERSION}
ENV ZFS_REPO=https://github.com/openzfs/zfs

WORKDIR /tmp/zfs
# hadolint ignore=DL3020
ADD ${ZFS_REPO}/tarball/${ZFS_COMMIT}/ zfs.tgz
RUN tar -zxvf zfs.tgz --strip-components=1 && \
rm zfs.tgz

RUN ./autogen.sh && \
./configure \
--prefix=/usr \
--with-tirpc \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--with-config=user \
--with-udevdir=/lib/udev \
--disable-systemd \
--disable-static && \
./scripts/make_gitrev.sh && \
make -j "$(getconf _NPROCESSORS_ONLN)" && \
make DESTDIR=/tmp/zfs-out install-strip

# cleanup
RUN rm -rf /tmp/zfs-out/usr/share && rm -rf /tmp/zfs-out/usr/src && \
rm -rf /tmp/zfs-out/etc/init.d && rm -rf /tmp/zfs-out/etc/conf.d

RUN cp -r /tmp/zfs-out/* /


RUN go install github.com/golang/protobuf/protoc-gen-go@v1.5.2
RUN go install gotest.tools/gotestsum@v1.7.0
RUN go install github.com/seamia/protodot@87817c3d0a8e7af753af15508b51292e941bc7c6
Expand Down
20 changes: 3 additions & 17 deletions pkg/dom0-ztools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,15 @@ ENV BUILD_PKGS git patch ca-certificates util-linux build-base gettext-dev libti
ENV PKGS ca-certificates util-linux libintl libuuid libtirpc libblkid libcrypto1.1 zlib
RUN eve-alpine-deploy.sh

COPY /patches /

# should be aligned with kernel
# * ZFS on Linux
ENV ZFS_VERSION=2.1.2
ENV ZFS_VERSION=2.2.2
ENV ZFS_COMMIT=zfs-${ZFS_VERSION}
ENV ZFS_REPO=https://github.com/openzfs/zfs
ENV ZFS_PATCH_DIR=/patches-zfs-"${ZFS_VERSION}"
ENV ZFS_REPO=https://github.com/openzfs/zfs.git

WORKDIR /tmp/zfs
ADD ${ZFS_REPO}#${ZFS_COMMIT} /tmp/zfs

ADD ${ZFS_REPO}/tarball/${ZFS_COMMIT}/ zfs.tgz
RUN tar -zxvf zfs.tgz --strip-components=1 && \
rm zfs.tgz
RUN set -e; \
if [ ! -d "${ZFS_PATCH_DIR}" ]; then \
echo "No such dir ${ZFS_PATCH_DIR}"; \
else \
for patch in "${ZFS_PATCH_DIR}"/*.patch; do \
echo "Applying $patch"; \
patch -p1 < "$patch"; \
done \
fi
RUN ./autogen.sh && \
./configure \
--prefix=/usr \
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading