abbbi / nullfsvfs

a virtual black hole file system that behaves like /dev/null
GNU General Public License v3.0
291 stars 12 forks source link

RedHat package support #8

Closed Le-Syl21 closed 3 years ago

Le-Syl21 commented 3 years ago

Try to add it on DockerFile, what's the depedencies ? DKMS?

abbbi commented 3 years ago

No idea, i only know how to propperly package it for debian related distributions :) But note that there is already an rpm package from the centos project's getpagespeed repository:

https://centos.pkgs.org/8/getpagespeed-x86_64/kmod-nullfsvfs-0.0.1-3.el8.x86_64.rpm.html

So maybe that work has been done already and you can have a look how those packages are built.

abbbi commented 3 years ago

Maybe @dvershinin wants to upstream his work :)

abbbi commented 3 years ago

https://negativo17.org/repos/multimedia/epel-7/SRPMS/nullfsvfs-kmod-0.8-2.el7.src.rpm

Provides a good spec file, too.

Shamelessly adding it, thanks @scaronni

Le-Syl21 commented 3 years ago

Thx for the very quick answer :-D

I've install: https://negativo17.org/repos/multimedia/epel-8/x86_64/kmod-nullfsvfs-0.8-2.el8.x86_64.rpm

the install success whitout any problem but when I want to use it, I have this:

insmod: ERROR: could not insert module /usr/lib/modules/4.18.0-305.12.1.el8_4.x86_64/extra/nullfsvfs/nullfs.ko: Invalid module format

But it's maybe more a question for @scaronni ???

Thx again

Le-Syl21 commented 3 years ago

OK so in Docker the module must be on host (Ubuntu LTS for me), not in container (UBI8):

root@ubuntu:~/nullfsvfs-master# make make -C /lib/modules/5.4.0-81-generic/build M=/root/nullfsvfs-master modules make[1]: Entering directory '/usr/src/linux-headers-5.4.0-81-generic' CC [M] /root/nullfsvfs-master/nullfs.o Building modules, stage 2. MODPOST 1 modules CC [M] /root/nullfsvfs-master/nullfs.mod.o LD [M] /root/nullfsvfs-master/nullfs.ko make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-81-generic' root@ubuntu:~/nullfsvfs-master# insmod nullfs.ko root@ubuntu:~/nullfsvfs-master# docker run --privileged -it redhat/ubi8 bash [root@fc257cc67e6f /]# mkdir /fake [root@fc257cc67e6f /]# mount -t nullfs none /fake [root@fc257cc67e6f /]# mount | grep fake none on /fake type nullfs (rw,relatime) [root@fc257cc67e6f /]# df -h | grep fake none 382G 39G 344G 10% /fake [root@fc257cc67e6f /]#

EasyWin Thx everybody

abbbi commented 3 years ago

The added spec file works at least on RHEL 8.4, the only redhat based system i have available now for testing, see README.md for how to build rpm package from source.