Commit Graph

9804 Commits

Author SHA1 Message Date
Ian Stakenvicius
8083286957 adjust symbol versioning for libudev
Libudev has a symbol version for 199 now, so the libudev_internal
version (which is used to essentially hide symbols that are not
part of the external API) needs to use 199 as its baseline instead
of 196

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-05 10:55:36 -04:00
Anthony G. Basile
b8c77fcd07 src/udev/udev-rules.c: fix bug introduced in our 601c4e8
This error was introduced in our commit

    601c4e8ce6

when importing from upstream.  The revert line works only
in the context of all of upstream's commit

    7850b3b83791ba0e2377ba40383c5abc258b839d

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-04 20:49:21 -04:00
Ian Stakenvicius
1d70a98af4 Set rootprefix to be '${prefix}' if unset
Previously, rootprefix was set to the actual value of the default prefix,
which caused issues when running 'make distcheck' since prefix is set
to a non-standard value but rootprefix is unset.  By assigning the variable
rather than its contents, this should now be avoided.
2013-04-04 12:59:24 -04:00
Ian Stakenvicius
c4657beb83 set default prefix to /usr for necessary rootprefix default operation 2013-04-04 12:06:05 -04:00
Ian Stakenvicius
9e98de5d50 Remove 75-persistent-net-generator.rules reintroduced in commit ef0ac643
75-persistent-net-generator.rules is in the rule_generator subdir, do
not try and install from here.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:28:34 -04:00
Ian Stakenvicius
85c2dfdb18 Initial forward-port of rules.d inotify support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:28:09 -04:00
Ian Stakenvicius
d71bb748b2 Removed hard-coded paths in rule-writer scripts
Both scripts had hard-coded paths to 'rule_generator.functions'; these were changed
to be substituted in by configure so the paths will match where files are
installed.øy

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:26:47 -04:00
Ian Stakenvicius
85085621ba Restored the rule generator bits from udev-171
This restores the rule generator scripts for the persistent
network and optical device rule generator scripts that were
removed after udev-171, and re-introduces their installation
to the build system.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:19:35 -04:00
Ian Stakenvicius
9315b3d16f Add support for legacy behaviour in udev_device_get_sysattr_value()
Wraps the changes made in systemd commits 5ae18ddc and 53726349
with a #if's on LIBUDEV_LEGACY_VERSION so that old behaviour
can be chosen at build-time if users find it necessary to support
legacy software dependent on the original behaviour

Original Authors:
	Kay Sievers

Signed-off-by:  Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:14:46 -04:00
Ian Stakenvicius
45f9def272 Use LN_S instead of directly calling ln -s
configure.ac has AC_PROG_LN_S already so we should use it.
upstream did this in commit 783162123dbac43d5b7a3fab9d4f11dcf86d06e1

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 09:24:18 -04:00
Ian Stakenvicius
dd91c2dbcf Move udevadm from sbin to bin
Follow upstream commit f432bb914499e2c28b43f592bb273f0a8664f352
but refactor the patch for eudev build system.  Provide a
compatibility symlink in sbindir for anything that hard-codes
the path to udevadm

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 09:23:53 -04:00
klondike
95c60af90b Respect the MIT license
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
klondike
50758bdd96 Fix buffer overflow
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
klondike
d8d626c7df Clean up the string functions
Avoid two evaluations of src in util_strpcpy clean the code in the ones
where the pointer passed is not modified and merge the main loop of
util_strpcpyl and util_strscpyl into util_strpcpyv.  Also make strpcpy
more compact by removing some unnecessary arithmetic.

Cleanup util_strpcpyv by shortcutting size == 0 case

Do some style fixups

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
Anthony G. Basile
cdd665a921 man: updates from upstream
Added upstream systemd-udevd.service(8) as udevd(8)

Authors include

	Tom Gundersen
	Zbigniew Jędrzejewski-Szmek
	Thomas Hindoe Paaboel Andersen
	Kay Sievers
	Lennart Poettering

See http://cgit.freedesktop.org/systemd/systemd/log/man/udev.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/systemd-udevd.service.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/udevadm.xml

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:22:47 -04:00
Anthony G. Basile
601c4e8ce6 udev: update
This updates the daemon codebase to upstream.

Authors:
	Zbigniew Jędrzejewski-Szmek
	Lennart Poettering
	Václav Pavlín
	Kay Sievers
	Harald Hoyer
	Rob Clark
	Zeeshan Ali (Khattak)

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

Ian is signing off but has some concerns on a few of the changes
that he may fix in future commits.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:48 -04:00
Lennart Poettering
20d47ae5b5 udev: extern on functions is pointless
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
Zbigniew Jędrzejewski-Szmek
35471e6e86 accelerometer: remove dead if and modernize
Based on a coverity warning.

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
Kay Sievers
76c3ff748a hwdb: update
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
Anthony G. Basile
d5920a7a40 docs/libudev/libudev-sections.txt: add missing symbol
Add udev_device_set_sysattr_value which is defined in
libudev/libudev-device.c.

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
Anthony G. Basile
18cafe9973 Correct permissions on /dev/null and friends for 2.6.32
This sets the permissions on null, zero, full, random and urandom
to 666 which is needed for older kernels.  This is part of Gentoo's
40-gentoo.rules which can now be dropped from Gentoo's ebuild.

X-gentoo-Bug: 457868
X-gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=457868
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
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 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 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