Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488134 - =sys-apps/systemd-207-r2 - /dev/bus/usb is not owned by usb group
Summary: =sys-apps/systemd-207-r2 - /dev/bus/usb is not owned by usb group
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-15 16:56 UTC by nE0sIghT
Modified: 2014-02-19 15:05 UTC (History)
1 user (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 nE0sIghT 2013-10-15 16:56:38 UTC
From Handbook chapter 11 "Finalizing your Gentoo Installation":
"The groups the user is member of define what activities the user can perform. The following table lists a number of important groups you might wish to use: 
...
usb 	be able to access USB devices"

As i see for udev this behavior was set by this ticket: https://bugs.gentoo.org/show_bug.cgi?id=150223

But for now /dev/bus/usb is owned by root:root. There is no rules to correct ownership in udev shipped with sys-apps/systemd-207-r2. And i think this is true for sys-fs/udev.

With sys-apps/systemd-207-r2:
ls -l /dev/bus/usb
total 0
drwxr-xr-x 2 root root 120 Oct 15 20:24 001
drwxr-xr-x 2 root root 120 Oct 15 20:28 002
drwxr-xr-x 2 root root  60 Oct 15 20:24 003
drwxr-xr-x 2 root root  60 Oct 15 20:24 004
drwxr-xr-x 2 root root  60 Oct 15 20:24 005
drwxr-xr-x 2 root root  60 Oct 15 20:24 006

emerge --info
Portage 2.2.1 (default/linux/amd64/13.0, gcc-4.8.1, glibc-2.15-r3, 3.11.5-gentoo x86_64)
=================================================================
System uname: Linux-3.11.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-2400_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:    16391888 total,  13646000 free
KiB Swap:    2095100 total,   2095100 free
Timestamp of tree: Tue, 15 Oct 2013 15:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.4, 4.7.3-r1, 4.8.1-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo vortex gamerlay systemd
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.corbina.net/gentoo"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/usr/local/portage/vortex /var/lib/layman/gamerlay /var/lib/layman/systemd"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="7zip X a-like-o a52 aac aacplus aalib acl acpi alsa amd64 apng applet archive artworkextra audacious audio audiofile automount avx bazaar berkdb bittorrent bittorrent-external branding bsf bzip2 cairo caps chardet chdir cjk cli collada cover cracklib crypt css cuda cue cupsddk curl custom-optimization cvs cxx dbus dconf device-mapper dga dhcp dht diff dirac directfb disk-partition divx djvu dnsretry dos drawing dri dv eap-tls enca encode exif experimental extensions extras facedetect fat fbcondecor ffmpeg fftw fileinfo firefox flac fontconfig fortran frei0r fts3 fuse g3dvl gd gdbm gdm geoip gif glade gles2 glib glitz gnome gnome-keyring gphoto2 gpm graphite grp grub gstreamer gtk gtk3 gtkstyle gudev gzip hddtemp histman hog hvm hwdb iconsets iconv icq id3tag idle idn infinality inifile intl introspection ioemu ipv6 jabber java javascript jingle joystick jpeg jpeg2k kate keymap kinetic kvm ladspa lame lcms libass libcaca libkms libnotify libsamplerate libtiger lights lm_sensors loop-aes lucene lyrics lzma lzo mad matroska melt mercurial minizip mmx mmxext mng modules mp2 mp3 mp4 mp4live mpeg mpeg2 mpg123 mplayer mpu401 mtp mudflap multilib multimedia musepack mvl mysql mysqli nautilus ncurses netplay network networkmanager nls nptl nsplugin nss ntfs ntfsprogs nvidia offensive ofx ogg ogm oodict openal opencore-amr opengl openmp openssl opensslcrypt optimization optimized-qmake oscar pam parse-clocks pcf pch pcre pcre16 pdf pdo pgo php player plugins plymouth png policykit ppds pppd projectm psf pulseaudio purple qml qpak quicktime rar readline realmedia realtime reiserfs resolvconf romio rtsp ru-dv ru-g ru-i ru-k sasl scale0tilt screen screenshot sdl secure-delete session skins slp smp sndfile sound sounds speex spell sqlite sqlite3 sse sse2 sse2_4way sse3 sse4 ssl ssse3 stream strong-optimization subtitles subversion svg system-cairo system-icu system-jpeg system-sqlite systemd t1lib taglib tcpd textures theora threads thunderbird tiff timidity tint2conf tk tls toolbar trayicon truetype tta tweak-mode twolame udev udisks unicode unzip usb utils v4l2 vaapi vala vamp vdpau verse vkontakte vorbis vorbis-psy vpx wad wav wavpack webkit whiteboarding winbind wma wmp x264 xanim xattr xcb xcomposite xhtml xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xpm xsl xulrunner xv xvfb xvid zip zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DRACUT_MODULES="plymouth systemd" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru ru_RU en" NETBEANS_MODULES="apisupport harness ide java nb websvccommon php" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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 Mike Gilbert gentoo-dev 2013-10-18 01:23:47 UTC
This got dropped upstream in udev-158.

http://git.kernel.org/cgit/linux/hotplug/udev.git/commit/?id=bc6788184011fc05bfd3c59f0252d90ac0263c33

http://git.kernel.org/cgit/linux/hotplug/udev.git/commit/?id=b93e0709497e37a5fb023b8b3c5c47a425123193

It looks like we maintained it in FILESDIR for a while after that; hard to tell when it got dropped in CVS.
Comment 2 Mike Gilbert gentoo-dev 2013-10-18 01:28:27 UTC
I think this got dropped from Gentoo between udev-164 and udev-167.
Comment 3 nE0sIghT 2013-10-18 03:11:05 UTC
The reason why i opened this ticket is that games-util/xboxdrv can not be run by non-root user even if user is member of usb group (as per Handbook).

It uses libusb to access usb devices.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-10-18 06:41:35 UTC
We still install 40-gentoo.rules from sys-fs/udev, like so:

$ grep usb *.ebuild
udev-204.ebuild:	# Gentoo specific usb group
udev-204.ebuild:	SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
udev-208.ebuild:	# Gentoo specific usb group
udev-208.ebuild:	SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
udev-9999.ebuild:	# Gentoo specific usb group
udev-9999.ebuild:	SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"

$ ls -ld /dev/bus/usb/00?/00?
crw-rw-r--  1 root usb 189,   0 Oct 17 23:02 /dev/bus/usb/001/001
crw-rw-r--+ 1 root usb 189,   1 Oct 17 23:02 /dev/bus/usb/001/002
crw-rw-r--  1 root usb 189,   2 Oct 17 23:02 /dev/bus/usb/001/003
crw-rw-r--  1 root usb 189,   4 Oct 17 20:02 /dev/bus/usb/001/005
crw-rw-r--  1 root usb 189, 128 Oct 17 23:02 /dev/bus/usb/002/001
crw-rw-r--+ 1 root usb 189, 129 Oct 17 23:02 /dev/bus/usb/002/002
crw-rw-r--  1 root usb 189, 130 Oct 17 23:02 /dev/bus/usb/002/003
crw-rw-r--  1 root usb 189, 256 Oct 17 23:02 /dev/bus/usb/003/001
crw-rw-r--  1 root usb 189, 384 Oct 17 23:02 /dev/bus/usb/004/001

Looks like sys-apps/systemd specific problem.
Comment 5 Mike Gilbert gentoo-dev 2013-10-18 14:08:25 UTC
Ah, I didn't even think to look for a heredoc in src_prepare.

So, my thoughts on possible resolutions:

1. Do nothing; if users need this they can install a rules file in /etc/udev/rules.d.

2. Install 40-gentoo.rules as part of gentoo-systemd-integration.

3. Push for a shared package to install 40-gentoo.rules. This may be overkill for a 4-line text file which includes one rule that we don't even need.

I'm leaning towards #2 at the moment.
Comment 7 nE0sIghT 2013-11-02 12:20:41 UTC
Tested =sys-apps/gentoo-systemd-integration-9999: looks fine for me

ls -ld /dev/bus/usb/00?/00?
crw-rw-r-- 1 root usb 189,   0 нояб.  2 16:17 /dev/bus/usb/001/001
crw-rw-r-- 1 root usb 189,   1 нояб.  2 16:17 /dev/bus/usb/001/002
crw-rw-r-- 1 root usb 189,   2 нояб.  2 16:17 /dev/bus/usb/001/003
crw-rw-r-- 1 root usb 189,   3 нояб.  2 16:17 /dev/bus/usb/001/004
crw-rw-r-- 1 root usb 189, 128 нояб.  2 16:17 /dev/bus/usb/002/001
crw-rw-r-- 1 root usb 189, 129 нояб.  2 16:17 /dev/bus/usb/002/002
crw-rw-r-- 1 root usb 189, 130 нояб.  2 16:17 /dev/bus/usb/002/003
crw-rw-r-- 1 root usb 189, 131 нояб.  2 16:17 /dev/bus/usb/002/004
crw-rw-r-- 1 root usb 189, 256 нояб.  2 16:17 /dev/bus/usb/003/001
crw-rw-r-- 1 root usb 189, 384 нояб.  2 16:17 /dev/bus/usb/004/001
crw-rw-r-- 1 root usb 189, 512 нояб.  2 16:17 /dev/bus/usb/005/001
crw-rw-r-- 1 root usb 189, 640 нояб.  2 16:17 /dev/bus/usb/006/001

Thanks!
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-19 15:05:58 UTC
gentoo-systemd-integration-3 in the tree.