ZFS build instructions for Buster (#38)
Co-authored-by: Gauthier Provost <gauthier@kobol.io>
This commit is contained in:
parent
c1745285e7
commit
9518a5aef1
6 changed files with 111 additions and 4 deletions
3
docs/helios64/files/zfs/Dockerfile
Normal file
3
docs/helios64/files/zfs/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM ubuntu:bionic
|
||||
RUN apt update; apt install build-essential autoconf automake bison flex libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev python3-setuptools python3-cffi libffi-dev -y; apt install software-properties-common -y; add-apt-repository ppa:ubuntu-toolchain-r/test; apt install gcc-10 g++-10 -y; update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10; update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
|
||||
|
49
docs/helios64/files/zfs/install-zfs.sh
Executable file
49
docs/helios64/files/zfs/install-zfs.sh
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
#define zfs version
|
||||
zfsver="zfs-2.0.3"
|
||||
#creating building directory
|
||||
mkdir /tmp/zfs-builds && cd "$_"
|
||||
rm -rf /tmp/zfs-builds/build-zfs.sh
|
||||
apt-get download linux-headers-current-rockchip64
|
||||
git clone -b $zfsver https://github.com/openzfs/zfs.git $zfsver-$(uname -r)
|
||||
|
||||
#create file to execute inside container
|
||||
echo "creating ZFS build script to be executed inside container"
|
||||
cat > /tmp/zfs-builds/build-zfs.sh <<EOF
|
||||
#!/bin/bash
|
||||
cd scratch/
|
||||
dpkg -i linux-headers-current-*.deb
|
||||
|
||||
cd "/scratch/$zfsver-$(uname -r)"
|
||||
sh autogen.sh
|
||||
./configure
|
||||
make -s -j$(nproc)
|
||||
make deb
|
||||
mkdir "/scratch/deb-$zfsver-$(uname -r)"
|
||||
cp *.deb "/scratch/deb-$zfsver-$(uname -r)"
|
||||
rm -rf "/scratch/$zfsver-$(uname -r)"
|
||||
exit
|
||||
EOF
|
||||
|
||||
chmod +x /tmp/zfs-builds/build-zfs.sh
|
||||
|
||||
echo ""
|
||||
echo "####################"
|
||||
echo "starting container.."
|
||||
echo "####################"
|
||||
echo ""
|
||||
docker run --rm -it -v /tmp/zfs-builds:/scratch zfs-build-ubuntu-bionic:0.1 /bin/bash /scratch/build-zfs.sh
|
||||
|
||||
# Cleanup packages (if installed).
|
||||
modprobe -r zfs zunicode zzstd zlua zcommon znvpair zavl icp spl
|
||||
apt remove --yes zfsutils-linux zfs-zed zfs-initramfs
|
||||
apt autoremove --yes
|
||||
dpkg -i "/tmp/zfs-builds/deb-$zfsver-$(uname -r)"/kmod-zfs-$(uname -r)*.deb
|
||||
dpkg -i "/tmp/zfs-builds/deb-$zfsver-$(uname -r)"/{libnvpair3,libuutil3,libzfs4,libzpool4,python3-pyzfs,zfs}_*.deb
|
||||
|
||||
echo ""
|
||||
echo "###################"
|
||||
echo "building complete"
|
||||
echo "###################"
|
||||
echo ""
|
Loading…
Add table
Add a link
Reference in a new issue