jlesage / docker-makemkv

Docker container for MakeMKV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow to choose between busybox and util-linux-misc eject

klaernie opened this issue · comments

It would be nice if there was a env var to configure the eject binary being used.

I am running this image with podman instead of docker. The default is running containers rootless, which I prefer.
With running rootless also comes another problem: the container runtime cannot create devices with mknod, but needs to resort to bind-mounting the device in. This leads to each mounted device being listed in /proc/mounts as a mountpoint.

/ # mount |grep /dev/sr0
udev on /dev/sr0 type devtmpfs (rw,nosuid,noexec,relatime,size=49342912k,nr_inodes=12335728,mode=755,inode64)
/ #

The eject command from util-linux-misc dutyfully checks /proc/mounts to see if the user provided a mountpoint or a device, and if it finds the argument given as a mountpoint, it tries to umount and eject the device obtained from /proc/mounts.

Exactly this now condition leads to eject failing with the message:

/ # eject -v /dev/sr0
eject: device name is `/dev/sr0'
eject: udev: mounted on /dev/sr0
eject: udev: not found mountpoint or device with the given name
/ #

But luckily busybox's eject command is much more direct and just calls the ioctl, explicitly not checking /proc/mounts.

Ideally I'd like to have an environment variable, that allows me to choose the eject command to be either eject "$DRV_DEV" or busybox eject "$DRV_DEV".

Thanks and best regards,
Andre

PS: thank you very much for building and maintaining this container, it easily saved me hours in getting makemkv to work!

Ah, this probably explains my exact issue but I haven't had time to delve into it. I am also using Podman on Fedora IoT 38 and not able to get the container to eject the drive after auto rip. Hope to see this change implemented in some fashion to improve compatibility.