1 # first, build docker image with:
2 # $ podman build -t centos7-build -v <path-to-kernel>:/tmp/linux-kernel \
4 # this builds and image without ZFS
6 # then use it to build Lustre:
8 # --mount type=bind,source=<path-to-kernel>,target=/tmp/kernel \
9 # --mount type=bind,source=<path-to-lustre>,target=/tmp/lustre \
10 # centos8-build /bin/bash -c "cd /tmp/lustre; sh autogen.sh; \
11 # ./configure --with-linux=<path-to-kernel> \
12 # --with-linux-obj=<path-to-kernel> --disable-gss \
13 # --disable-shared --disable-crypto; make"
16 # - add ZFS/SPL 0.7 to image
17 # - configurable zfs repo, zfs version/tag
18 # - move kernel to image
23 RUN yum install -y gcc autoconf libtool which make patch diffutils file \
24 binutils-devel install -y python38 python3-devel elfutils-devel \
25 libselinux-devel libaio-devel libyaml-devel bc libnl3-devel bison \
29 RUN yum install -y json-c-devel redhat-lsb-core libssh-devel libattr-devel
32 RUN yum install -y libtirpc-devel libblkid-devel openssl-devel libuuid-devel
34 RUN yum install -y git
36 #build and install latest e2fsprogs
38 "git clone git://git.whamcloud.com/tools/e2fsprogs.git e2fsprogs && \
40 git checkout -b v1.46.2.wc5 v1.46.2.wc5 && \
41 ./configure --with-root-prefix=/usr --enable-elf-shlibs \
42 --disable-uuidd --disable-fsck \
43 --disable-e2initrd-helper \
44 --disable-libblkid --disable-libuuid \
45 --enable-quota --disable-fuse2fs && \
46 make -j8 && make install && cd .. && rm -rf e2fsprogs"
48 # to build zfs we need the kernel built
50 "cd /tmp/linux-kernel; [[ ! -s arch/x86/boot/bzImage ]] && make oldconfig && make -j8 bzImage"
52 # build and install ZFS
54 "git clone https://github.com/zfsonlinux/spl spl && \
56 git checkout -b splbuild spl-0.7.13 && \
57 sed -i 's/CDDL/GPL/' META && \
59 ./configure --with-linux=/tmp/linux-kernel \
60 --with-linux-obj=/tmp/linux-kernel \
67 "git clone https://github.com/zfsonlinux/zfs zfs && \
69 git checkout -b zfsbuild zfs-0.7.13 && \
70 sed -i 's/CDDL/GPL/' META && \
72 ./configure --with-linux=/tmp/linux-kernel \
73 --with-linux-obj=/tmp/linux-kernel \