Commit Graph

9783 Commits

Author SHA1 Message Date
Anthony G. Basile
7378b89a14 hwdb: remove uneeded *-vendor-product.hwdb
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Ian Stakenvicius
c7c0dad3bd libudev: update to 199
This updates the library codebase to upstream version 199.
(originally merged by Anthony G. Basile <blueness@gentoo.org>)

Upstream commits 5ae18ddc0d and 53726349e1 are not applied,
code will be excluded via #if...#endif in a future commit

Authors:
	Kay Sievers
	Thomas Hindoe Paaboel Andersen
	Hannes Reinecke
	Jan Engelhardt

See http://cgit.freedesktop.org/systemd/systemd/log/src/libudev

    Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 14:36:31 -04:00
Ozan Çağlayan
dfdffb7041 keymap: Remap microphone mute and touchpad toggle for Lenovo U300s
Separate out Ideapad U300s to its own line and add Microphone mute key.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:37 -04:00
Ozan Çağlayan
3cc17c82a6 keymap: Fix touchpad toggling on Lenovo IdeaPad U300s
IdeaPad U300s needs mapping 0xf1 to f21 just like Lenovo V480.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:36 -04:00
Kay Sievers
05b510b489 udev: ifdef all firmware special handling
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:36 -04:00
Tom Gundersen
f3ea87f611 udev: make firmware loading optional and disable by default
Distros that whish to support old kernels should set
  --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:36 -04:00
Zbigniew Jędrzejewski-Szmek
07403f0707 Make two functions static
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:21 -04:00
Anthony G. Basile
ef0ac643c8 rules: updates from upstream
Authors include:

	Tollef Fog Heen
	Kay Sievers
	Tom Gundersen
	Tony Camuso
	Lennart Poettering
	Martin Pitt
	Harald Hoyer
	Michal Schmidt
	Matthew Garrett

See http://cgit.freedesktop.org/systemd/systemd/log/rules

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:21 -04:00
Anthony G. Basile
65adce02ae keymaps: updates from upstream
Authors include:

	Martin Pitt
	Kay Sievers

http://cgit.freedesktop.org/systemd/systemd/tree/keymaps

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:21 -04:00
Anthony G. Basile
04f4b46ab8 hwdb: bring db in line with upstream
This updates the db to current.  Authors include:

	Kay Sievers
	Mantas Mikulėnas
	Tom Gundersen
	Marcel Holtmann

See http://cgit.freedesktop.org/systemd/systemd/log/hwdb

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:20 -04:00
Richard Yao
788245436d
Merge remote-tracking branch 'origin/follow-upstream'
Signed-off-by: Richard Yao <ryao@gentoo.org>
2013-03-17 12:50:36 -04:00
Rob Clark
261132097e udev: fix segfault with android rndis
The android gadget driver for network tethering over rndis somehow has a
parent device with a null subsystem.  Probably this is bug in android driver,
but it is easy enough to make systemd/udev behave gracefully and not
segfault.  And this will help for making linux distros with systemd
(like fedora) work on android devices.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:25:26 -04:00
Kay Sievers
2ba4b11078 udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:22:46 -04:00
Kay Sievers
26eb5714e9 udev: usb_id - ignore non-ASCII serial numbers
On Thu, Feb 7, 2013 at 3:52 PM, Robert Milasan <rmilasan@suse.com> wrote:
> Hi, seems that using some strange usb devices with really bogus serial
> numbers usb_id creates links with junk strings in it:
>
> /dev/disk/by-id/usb-TSSTcorp_BDDVDW_SE-506AB_㡒䍌䜶䉗ぁㄴ㌴†ँ-0:0
>
> Initially was believed that usb_id is to blame, then the kernel, but it
> turns out that really the usb cd/dvd drive has this bogus serial number:
>
> output from dmesg:
> [  538.200160] usb 1-2: new high-speed USB device number 5 using
> ehci_hcd [  538.335067] usb 1-2: New USB device found, idVendor=0e8d,
> idProduct=1956 [  538.335080] usb 1-2: New USB device strings: Mfr=1,
> Product=2, SerialNumber=3 [  538.335089] usb 1-2: Product: MT1956
> [  538.335097] usb 1-2: Manufacturer: MediaTek Inc
> [  538.335105] usb 1-2: SerialNumber:
> \xffffffe3\xffffffa1\xffffff92\xffffffe4\xffffff8d\xffffff8c ...
> [  538.337540] scsi6 : usb-storage 1-2:1.0 [  539.341385] scsi 6:0:0:0:
> CD-ROM            TSSTcorp BDDVDW SE-506AB  TS00 PQ: 0 ANSI: 0
> [  539.354240] sr0: scsi3-mmc drive: 0x/24x writer dvd-ram cd/rw
> xa/form2 cdda tray [  539.354777] sr 6:0:0:0: Attached scsi CD-ROM sr0
> [  539.355122] sr 6:0:0:0: Attached scsi generic sg2 type 5

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:21:28 -04:00
Martin Pitt
bbdf02f1bc keymaps: Add HP HDX 9494NR
Add touchpad and www keys:

   https://bugzilla.redhat.com/show_bug.cgi?id=757928

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:18:33 -04:00
Ayan George
462eddbaf8 keymap: Add support for the brower hotkey on the HP ProBook
https://bugs.launchpad.net/bugs/1105191

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:10:48 -04:00
Bastien Nocera
232e1d3e6b udev: Fix device matching in the accelerometer
As we were searching by ID_PATH, it would have been possible
for us to find a sibling device instead of the device we were
looking for.

This fixes device matching on the WeTab with the upstream kernel,
as it was trying to use the "Asus Laptop extra buttons" device
instead of the accelerometer.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:06:48 -04:00
Anthony G. Basile
2251933e50 Fix whitespace in various files
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 18:05:30 -04:00
Martin Pitt
d003905a5e keymap: Add Samsung 700T
https://bugzilla.redhat.com/show_bug.cgi?id=879691

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 17:53:37 -04:00
Alessandro Crismani
ec5e59d929 keymap: Update the list of Samsung Series 9 models
Currently, keymaps are provided only for the NP90X3A laptop. Samsung
introduced updated models, codenamed 900X3B, 900X3C, 900X4B, 900X4C,
which are currently not matched by udev rules. This patch includes the
newer modules in udev rules and move the samsung-n90x3a file defining
keys to a more generic samsung-series-9 file.

The patch was tested on a 900X4C laptop, and other people reported
that the rules also work for 900X3B and 900X3C ones.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 17:49:02 -04:00
Zeeshan Ali (Khattak)
3a84b73a21 src/udev/udev-builtin-blkid.c: expose new ISO9660 properties from libblkid
This is upstream commit ddb5bee15a6ad71e5b596c035c1ee4dc04d5fd2e

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 17:37:37 -04:00
Harald Hoyer
51631ace74 cdrom_id: add data track count for bad virtual drive implementations
/# /lib/udev/cdrom_id --debug /dev/sr0
probing: '/dev/sr0'
INQUIRY: [AMI     ][Virtual CDROM   ][1.00]
GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h
drive is pre-MMC2 and does not support 46h get configuration command
trying to work around the problem
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
no current profile, but disc is present; assuming CD-ROM
READ TOC: len: 12, start track: 1, end track: 1
last track 1 starts at block 0
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
ID_CDROM=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1

What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger
blkid in /lib/udev/rules.d/60-persistent-storage.rules

KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*",
	ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*",
	ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
		  IMPORT{builtin}="blkid --noraid"
2013-03-14 17:32:42 -04:00
Kay Sievers
a93a578bb0 src/udev/udev-builtin-net_id.c: handle bcma buses
This is upstream commits:

  984c4348ff14d29c526d3d372daa82e278eeb5b4
  f4ddacbd4de0f159ec598f8ad690466a84787ec5

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 17:13:47 -04:00
Kay Sievers
803ecbcde2 udev: path_id - clarify comment about the kernel ATA naming problem 2013-03-14 17:02:27 -04:00
Anthony G. Basile
3e501c7b92 src/udev/udevadm-hwdb.c: fix help
This follows upstream commit e32a4e1ef4c61561b08f50f73f82587bdc946b40

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14 16:21:50 -04:00
Matthew Thode
15cad0e19b Merge pull request #51 from gentoo/issue50
Only check for gperf if --enable-keymap

reviewed by me
2013-03-10 12:04:02 -07:00
Anthony G. Basile
489ca457ea Only check for gperf if --enable-keymap
gperf is only used to generate some header file for src/keymap,
and so we should only test for its existence if --enable-keymap
is given.

See:
 https://github.com/gentoo/eudev/issues/50
 https://bugs.gentoo.org/show_bug.cgi?id=452760

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-10 14:50:10 -04:00
Richard Yao
5cdd4e3c93 Merge pull request #44 from lu-zero/master
add --root to support generating hwdb in offsetted rootfs

People using DESTDIR to prepare packages had issues with the hardware database. We add an autotools option to handle that.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
2013-02-08 22:59:23 -08:00
Luca Barbato
96da532526 udevadm: support updating hwdb from an offset root
Introduce `--root` option to make users run udevadm on rootfs not
mounted as /

Ease the life of distribution packagers.
2013-02-07 13:53:28 +01:00
Ian Stakenvicius
94d7639cf2 Make udevlibexecdir be /lib
ie, fix another regression in our build system ; gentoo bug 455326

it's common for eg. mips systems to not have symlink from the directory
{lib32 or lib64} to /lib.  only the libraries belong to /$(get_libdir) and
everything in /lib/udev goes to, well, /lib/udev, NOT /$(get_libdir)/udev
     -- ssuominen

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-02-04 11:22:30 -05:00
Ian Stakenvicius
c661732bc2 Fix AM_CONDITIONAL for HAVE_BLKID
Corrects error caused in commit a9ef3ca764

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
2013-01-29 09:10:41 -05:00
Ian Stakenvicius
a9ef3ca764 Make blkid optional
Embedded systems may not want to include util-linux when they do
not intend to use blkid functionality

Modified from original author's commit to not install
60-persistent-storage.rules if blkid is disabled

systemd commit f553b3b1074151200187df916427a1468186435e
Original author: Anders Olofsson <Anders.Olofsson@axis.com>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
34bcd6cd8c Set device node permissions only at "add" events
New behavioural change -- has potential to fix bugs..?

systemd commit 48a849ee17fb25e0001bfcc0f28a4aa633d016a1
Author: Kay Sievers <kay@vrfy.org>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
760eeae32a Cleanup of spacing to help with diffs
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
0354eeacf8 Add missing ':' to getopt_long 'e'
Parameter -e is set without additional argument in getopt
and this leads to segfault when calling 'udevd -e'.

systemd commit 5bbbe461fd4d133eac49f41210e2fd4846f577d8
Author: Lukas Nykryn <lnykryn@redhat.com>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
eb256defbe Handle scsi Hyper-V devices properly
Hyper-V has an abstract bus, which gets renumbered on guest
startup. So instead of the bus numbers we should be using
the device GUIDs, which can be retrieved from the 'device_id'
sysfs attribute.

systemd commit a24d03b8ee2ca62cd1273e27cf4e79ddcc0fbb1c
Author: Hannes Reinecke <hare@suse.de>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
e34b05dc4c Port new net_id capabilities from systemd-udev-197
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
ab779c8146 Honor DEVUID, DEVGID in addition to DEVMODE
New behaviour in udev-197
systemd commit 1edefa4f1d7bae6cc19aa4a97238400c5a04f7a4
Author: Kay Sievers <kay@vrfy.org>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
cc9cf4c078 Fix missing endian wrappers
https://bugs.freedesktop.org/show_bug.cgi?id=58067
systemd commit f4443fa5976eca51661947dd4df60847213f27fa

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
3066d402f6 save a line of code
This mainly just helps keep diff's between eudev and systemd a little more clean, but it
does drop one line of duplicate code.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
27a018b94e Abort udev_enumerate_new if udev obj is null
https://bugs.freedesktop.org/show_bug.cgi?id=58289
systemd commit e68893075083a7461b1572233d23fdb23541d630

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28 17:42:47 -05:00
Ian Stakenvicius
26e9261926 Add missing selinux code to udev core (convenience lib)
Original Author: Alexey D. (TZ86)
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
2013-01-28 12:12:41 -05:00
Anthony G. Basile
82f60023e3 src/libudev/util.c: fix typo introduce at commit 1ebf647
The first argument of fcntl should be 'fd', the file descriptor.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-23 20:16:57 -05:00
Ian Stakenvicius
0407037a7b Fix --disable-modules config option
This option should be enabled by default, however there was no logic
in AC_ARG_ENABLE to set the variable to be enabled when the flag was
unspecified

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-22 14:34:39 -05:00
Anthony G. Basile
0342e13a32 Fix test-udev.c to build and work on a uclibc system
Two issues are addressed: 1) Makefile.am has to provide config.h
information on HAVE_UNSHARE to test-udev.c.  2) MS_PRIVATE and
MS_REC are defined in <linux/fs.h> which must be directly included
on a uclibc system because of different header stackings.  Its
inclusion makes no difference on a glibc system.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-01-22 14:29:53 -05:00
Anthony G. Basile
1ebf647b05 Fall back on POSIX mkstemp() for systems lacking mkostemp()
We add an autotools check to use mkstemp() and fcntl() when mkostemp()
is missing. This is not strictly equivalent because we have no way of
setting the file access mode O_WRONLY flag, but that should produce no
functional difference.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21 19:07:16 -05:00
Ian Stakenvicius
dd43e0b64c Adjust version in configure.ac for beta2 release
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
 Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-01-21 15:49:32 -05:00
Ian Stakenvicius
6d72c38a3f Forward-port of libudev.so.0 code from libudev-171
Add --enable-legacylib option to configure, allowing for build and
installation of libudev.so.0 shared library for supporting pre-udev-183
software.  Library is installed to rootlibdir.

Note that this legacy library will not be maintained, and should not be used
for anything other than supporting a working system until all software
on the system is migrated to use libudev.so.1

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21 14:34:02 -05:00
Ian Stakenvicius
f715f6d34a Remove the remaining systemd code since it is not needed anymore
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21 11:09:11 -05:00
Ian Stakenvicius
cb44e7c891 Make all udev tools dynamically link to libudev.so
Move libudev.so back to $(rootlibdir) for lvm2 support, and have
all udev tools dynamically link to it.  The symbol versioning and
hidden-visibility on libudev were modified accordingly: we rebase
against the public LIBUDEV_196 symbol versioning, and marked all
other symbols (which used to be local) as  LIBUDEV_internal.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21 10:23:19 -05:00