Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444604 - =sys-fs/udev-171-r9: Backport the persistent generator removal from git (was: Does not create 70-persistent-cd.rules or /dev/cdrom)
Summary: =sys-fs/udev-171-r9: Backport the persistent generator removal from git (was:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 437418
  Show dependency tree
 
Reported: 2012-11-24 19:02 UTC by Matthew Schultz
Modified: 2013-01-16 14:34 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2012-11-24 19:02:01 UTC
After upgrading to udev-171-r9  from udev-171-r8 and rebooting, the symlink for /dev/cdrom is not created.  I tried removing /etc/udev/rules.d/70-persistent-cd.rules and rebooting but it did not generate a new 70-persistent-cd.rules file in /etc/udev/rules.d and it did not create a symlink to /dev/cdrom.  

I downgraded to udev-171-r8 and rebooted and it generated 70-persistent-cd.rules and created a symlink to /dev/cdrom

Reproducible: Always

Actual Results:  
udev does not create 70-persistent-cd.rules and a symlink to /dev/cdrom

Expected Results:  
udev should create 70-persistent-cd.rules and a symlink to /dev/cdrom

emerge -pv udev

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-fs/udev-171-r9  USE="gudev hwdb keymap rule_generator -action_modeswitch -build -debug -edd (-extras) -floppy -introspection (-selinux) {-test}" 0 kB


emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r3, 3.6.5-gentoo x86_64)                                                                                                                        
=================================================================                                                                                                                                                  
System uname: Linux-3.6.5-gentoo-x86_64-AMD_Athlon-tm-_II_X4_615e_Processor-with-gentoo-2.2                                                                                                                        
Timestamp of tree: Wed, 21 Nov 2012 14:00:01 +0000                                                                                                                                                                 
ld GNU ld (GNU Binutils) 2.22                                                                                                                                                                                      
app-shells/bash:          4.2_p37                                                                                                                                                                                  
dev-java/java-config:     2.1.11-r3                                                                                                                                                                                
dev-lang/python:          2.7.3-r2, 3.2.3                                                                                                                                                                          
dev-util/cmake:           2.8.9                                                                                                                                                                                    
dev-util/pkgconfig:       0.27.1                                                                                                                                                                                   
sys-apps/baselayout:      2.2                                                                                                                                                                                      
sys-apps/openrc:          0.11.5                                                                                                                                                                                   
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo sunrise x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 ass async audiofile avi bcmath berkdb bluetooth bzip2 cairo calendar caps cdda cjk clamav cli consolekit cracklib crypt css ctype cups curl curlwrappers cxx dbus declarative deflate device-mapper dga dio directfb dri dts dvb dvd dvdread emu-linux-x86 enca encode exif fbcon ffmpeg fftw flac fortran ftp gd gdbm gif gimp gmp gnutls gpm gstreamer gtk gtk2 gzip hash hbci hddtemp iconv id3 idn ieee1394 imagemagick imlib innodb ipv6 ithreads jabber java javascript jpeg jpeg2k json kde kipi lcms libcaca libv4l live lm_sensors logrotate lzma lzo mad matroska mcal mhash mime mjpeg mms mmx mmxext mng modules mp3 mp4 mpeg mplayer msession mssql mudflap multilib mysql mysqli ncurses network nls nptl nptlonly nsplugin nvidia offensive ofx ogg openal opengl openmp openssl opensslcrypt oss pam pcntl pcre pdf pdo pear perl php png policykit posix ppds pppd pvr python qt qt3 qt3support qt4 quicktime readline reflection samba sasl sdl seamonkey session simplexml smtp snmp soap sockets spell spl sql sqlite sse sse2 ssl subversion suhosin svg syslog tcpd theora threads thumbnail tidy tiff tokenizer transcode truetype tslib udev udisks unicode urandom usb utempter v4l v4l2 vaapi vcd vhosts vorbis vpx wddx webkit wxwindows x264 xattr xcb xcomposite xforms xine xinetd xml xml2 xpm xprint xv xvid xvmc zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" PHP_TARGETS="php5-3 php5-4" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeonhd radeon r600 vesa fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Samuli Suominen gentoo-dev 2012-11-28 10:37:15 UTC
Purposely made change

*** This bug has been marked as a duplicate of bug 433746 ***
Comment 2 Samuli Suominen gentoo-dev 2012-11-28 10:43:13 UTC
Reopen if the *persistent* files still end up in /etc/udev/rules.d/ somehow and we can take care of removing them
They are not compatible with latest kernels, like stable gentoo-sources
Comment 3 Daniel Pielmeier gentoo-dev 2012-11-28 11:04:21 UTC
At least the 70-persistent-cd.rules are still generated after rebooting. I have a wlan stick and two dvd drives which did look like this when generated

# DVD-RW_DVR-212 (pci-0000:00:1f.2-scsi-0:0:1:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-0:0:1:0", SYMLINK+="cdrom", ENV{GENERATED}="1"

# TSSTcorpCD_DVDW_SH-S183L (pci-0000:00:1f.2-scsi-0:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-0:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"

# WLAN_selfinstall (pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="FRITZ__WLAN_selfinstall_BC0543069EA3-0:0", SYMLINK+="cdrom2", ENV{GENERATED}="1"


After missing the dvd symlinks I removed the 70-persistent-cd.rules to see if they are generated after a reboot. The file is generated but only with the entry for the wlan stick.
Comment 4 Matthew Schultz 2012-11-28 13:30:37 UTC
(In reply to comment #1)
> Purposely made change
> 
> *** This bug has been marked as a duplicate of bug 433746 ***

So since the rule generator went away, what does the rule_generator use flag do then?  Also, how is /dev/cdrom created now?  Do I have to manually write a rule for it?
Comment 5 Matthew Schultz 2012-11-28 13:48:29 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > Purposely made change
> > 
> > *** This bug has been marked as a duplicate of bug 433746 ***
> 
> So since the rule generator went away, what does the rule_generator use flag
> do then?  Also, how is /dev/cdrom created now?  Do I have to manually write
> a rule for it?

Also if I'm supposed to write rules manually for this now, where do I place the rules so that they are read because -r9 won't even read the persistent cd rules that are already there to create /dev/cdrom.
Comment 6 Matthew Schultz 2012-11-28 13:49:56 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #1)
> > > Purposely made change
> > > 
> > > *** This bug has been marked as a duplicate of bug 433746 ***
> > 
> > So since the rule generator went away, what does the rule_generator use flag
> > do then?  Also, how is /dev/cdrom created now?  Do I have to manually write
> > a rule for it?
> 
> Also if I'm supposed to write rules manually for this now, where do I place
> the rules so that they are read because -r9 won't even read the persistent
> cd rules that are already there to create /dev/cdrom.

In addition, is the new manual process documented somewhere on gentoo docs?
Comment 7 Daniel Pielmeier gentoo-dev 2012-11-29 08:54:05 UTC
After another reboot both cd and the net rules are re-generated.

I also have the same questions like Matthew.

Additionally regarding the cdrom symlinks. How should they be generated. I think this is different to the network interfaces as there is no conflict in naming with kernel namespace. Also it are symlinks instead of renames. On the other hand are the cdrom symlinks still needed. Are there any programs out which require them?
Comment 8 Matthew Schultz 2012-11-29 14:53:00 UTC
(In reply to comment #7)
> On the other hand are the cdrom symlinks still needed. 

Isn't that the point of udev which is to create a standardized way to access devices?

>Are there any programs out which require them?

Not so much required as far as I know but will make your life miserable by having to do extra configuration to override defaults:

Some programs which default to /dev/cdrom:

mplayer
mythtv
kmplayer

In addition gentoo handbook mentions /dev/cdrom as the location of that device.
Comment 9 William Hubbs gentoo-dev 2012-11-30 14:02:55 UTC
Udev-195 will create /dev/cdrom. It does not create /dev/dvd, /dev/cdrw, etc.
If the old udev rules are not compatible with modern kernels, this might be a reason to upgrade your udev.
Comment 10 Matthew Schultz 2012-11-30 14:06:47 UTC
(In reply to comment #9)
> Udev-195 will create /dev/cdrom. It does not create /dev/dvd, /dev/cdrw, etc.
> If the old udev rules are not compatible with modern kernels, this might be
> a reason to upgrade your udev.

I'm using gentoo-sources 3.6 and it works fine with 171-r8 but not with 171-r9.  Installing 171 also does not warn of an incompatibility with 3.6.  How is /dev/cdrom created in 195 if the rule generator went away?
Comment 11 William Hubbs gentoo-dev 2012-11-30 14:29:09 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Udev-195 will create /dev/cdrom. It does not create /dev/dvd, /dev/cdrw, etc.
> > If the old udev rules are not compatible with modern kernels, this might be
> > a reason to upgrade your udev.
> 
> I'm using gentoo-sources 3.6 and it works fine with 171-r8 but not with
> 171-r9.  Installing 171 also does not warn of an incompatibility with 3.6. 
> How is /dev/cdrom created in 195 if the rule generator went away?

Looking at the rules, it looks like cdrom is always a symlink to sr0. I don't know what udev would do on a box where sr0 did not exist.
Comment 12 Sergey S. Starikoff 2012-12-03 05:51:29 UTC
(In reply to comment #11)
> Looking at the rules, it looks like cdrom is always a symlink to sr0. I
> don't know what udev would do on a box where sr0 did not exist.

The same issue on amd64 system.
sys-fs/udev-171-r9

$ uname -svr
Linux 3.5.7-gentoo-2 #3 SMP Wed Nov 7 10:17:42 MSK 2012

CD-ROM device exists:
$ file /dev/sr0
/dev/sr0: block special
No symbolic link created
$ file /dev/cdrom
/dev/cdrom: ERROR: cannot open `/dev/cdrom' (No such file or directory)

Rules generator don't work (i.e. removed /etc/udev/rules.d/70-persistent-cd.rules isn't recreated after reboot and was ignored when present).

I see /lib/udev/rules.d/75-cd-aliases-generator.rules file:
# these rules generate rules for the /dev/{cdrom,dvd,...} symlinks

# the "path" of usb/ieee1394 devices changes frequently, use "id"
ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \
  PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end"

ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c"

LABEL="persistent_cd_end"

But don't find in my system mentioned utulity write_cd_rules (so, this file seems to be incorrect).

P.S. /etc/udev/rules.d/70-persistent-net.rules also seems to become ignored.
Comment 13 Samuli Suominen gentoo-dev 2012-12-13 06:07:43 UTC
(In reply to comment #9)
> Udev-195 will create /dev/cdrom. It does not create /dev/dvd, /dev/cdrw, etc.
> If the old udev rules are not compatible with modern kernels, this might be
> a reason to upgrade your udev.

Yeah, sorry about this, didn't expect this change to break this feature from udev at all. Therefore -r9 solves one problem, while introducing another.

Now that council has somewhat agreed that we can stabilize newer udev, like 196-r1, I would suggest anyone having this issue to upgrade immediately. We are still working on minor problems, like kmod not reading /usr/lib/modprobe.d, but otherwise it's solid.
Comment 14 Samuli Suominen gentoo-dev 2013-01-16 14:34:35 UTC
Fixed by 197-r{2,3}. Arch's are CCd to the stabilization bug. No need to keep this open. Time to upgrade.