Ken Moffat wrote:
>   At the weekend I responded to a message on lfs-support about
> cdroms, eject, etc and it became clear that I had at least one issue
> on a mostly LFS-7.4-rc system [ but with eudev instead of Bruce's
> systemd-udev ] : /dev/sr0 was owned by root:root, so eject didn't
> work for a user.  I've now sorted it, but the implications are more
> likely to impact people in BLFS than LFS so I'll detail it here.
>
>   I used to have a rule in /etc/udev/rules.d to create cdrom and
> dvd symlinks with mode 0660 and owned by the cdrom group.  That has
> been part of my build for some time, I forget when and why I
> originally added it.  Worked fine with my previous builds in late
> April.
>
>   Removing that rule from the 7.4 builds solves the ownership problem
> (i.e. it becomes root:cdrom) and leaves a /dev/cdrom symlink.  But
> it doesn't create a /dev/dvd symlink.
>
>   I have three visual media players : xine, parole, and vlc.  For
> xine I'm fairly sure that it doesn't use /dev/sr0.  For parole I've
> no idea.  I see that vlc now has an option to choose /dev/sr0
> instead of /dev/dvd.  But unfortunately, vlc has never worked well
> for me when playing an encrypted DVD - it plays for a few seconds,
> pauses, then plays a little more - so it won't be my primary means
> of playing DVDs.
>
>   Long story short - upstream systemd removed the cdrw, dvd, dvdrw
> symlinks after someone complained that they didn't work.  If I've
> understood the references (didn't see the actual discussion), with
> multiple CD/DVD devices the order of appearance is random and the
> links might get assigned to inappropriate devices (e.g. a dvdrw link
> on a cdrom).
>
>   Fortunately, I found a post from someone at Suse regretting this
> decision, and a reference to mageia applying a rule change from
> openSUSE.  Now that I know where the openSUSE srpms can be found, I
> downloaded their systemd-206-3.1.src.rpm.  Within that is a patch
> which creates cdrw, dvd, dvdrw symlinks for /dev/sr0.  I've attached
> it in case it is useful to anyone (apply it before installing "udev"
> or "gudev").
>
>   I only want a /dev/dvd symlink for /dev/sr0 and that can be created
> with a sed (a long line is added, your mail client might reformat it)
>
> sed -i '/SYMLINK.*cdrom/ a\
> KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", 
> OPTIONS+="link_priority=-100"' \
>   /lib/udev/rules.d/60-cdrom_id.rules

Perhaps we should try to get write_cd_rules to work from the 
/etc/udev/rules.d/83-cdrom-symlinks.rules file.  It the rule there is 
fired, then it should write 70-persistent-cd.rules.

>   AFAICS either fix ought to work on the LFS udev-systemd
> combination.
>
> ĸen, still kidding myself I'll get to bed at a sensible time one of
> these nights :)

LOL.  Do you still sleep? :)

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to