Commit Graph

9919 Commits

Author SHA1 Message Date
Ian Stakenvicius
e2f82dc60f fix build system error introduced in c8cbcb8899
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 16:20:30 -04:00
Ian Stakenvicius
69d988e960 Update UPSTREAM.notes and UPSTREAM-206-commit-todo for eudev-1.2 release
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 15:57:22 -04:00
Ian Stakenvicius
c8cbcb8899 provide alternative 80-drivers.rules for --disable-kmod
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 15:57:04 -04:00
Lennart Poettering
9f49634fa3 add new hexchar() call
Based on systemd commit fb624d04e5 , added
to support commit f8e6d758cd

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31 18:04:10 -04:00
Lennart Poettering
fd0b90dbb3 add various escaping/path handling utility functions
This is a partial combination of two systemd commits:

5926cccae202f1b8869017d4bdaf9e9ce371bba6
4fe88d28a4

...and provides functions needed for the changes that were added
in commit 6284c1ca41

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31 17:57:24 -04:00
Lennart Poettering
f8e6d758cd add various escaping/path handling utility functions
A portion of systemd commit 4fe88d28a4 , needed to
support changes made by commit 6284c1ca41

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31 17:48:47 -04:00
Ian Stakenvicius
9a769172c3 Revert "static-nodes: remove creation of static nodes if HAVE_LIBKMOD"
This reverts commit aa417a4d83.

Preface:  The kmod+tmpfiles static dev-node creation requires two commands to
be executed at runtime -- it is not something that will automatically occur
without a system's setup being explicitly designed or changed so that these
commands are executed.

Preface2:  In order for the kmod+tmpfiles static dev-node creation to work
properly, that -must- be executed at startup before {systemd-,}udevd starts.
The reason for this is because udevd will only set permissions on those files
at startup, and so if udevd starts beforehand then these nodes will exist with
permissions that are (probably) too restrictive.

The function in udevd which creates static-nodes is non-fatal and only updates
mtime on the devnodes if they already exist.  As such, if a system is configured
to execute kmod+tmpfiles to create static-nodes, because that must occur first,
eudev's udevd will not conflict.  Also, if a system does not execute kmod+tmpfiles,
then eudev will still create the static devnodes, even if kmod-14 or higher is
installed.

There *may* be a conflict if kmod+tmpfiles is executed after udevd starts, but
as per "preface2" this is not a supported configuration.

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-31 13:07:33 -04:00
Anthony G. Basile
aa417a4d83 static-nodes: remove creation of static nodes if HAVE_LIBKMOD
This address upstream commit edeb68c53f1cdc452016b4c8512586a70b1262e3
and https://bugs.gentoo.org/show_bug.cgi?id=477890.  If eudev is
configured with --enable-libkmod then we check for kmod >= 14 and
ifdef out the code removed in the upstream commit.  Otherwise we
retain it for modutils.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-31 10:46:49 -04:00
Anthony G. Basile
ccc3016682 src/udev/udevadm-hwdb.c: rename variable to match upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 14:34:10 -04:00
Anthony G. Basile
6284c1ca41 udev: export tags of "dead" device nodes to /run/udev/static_node-tags/
This is upstream 84b6ad702e64db534f67ce32d4dd2fec00a16784

Based on a patch by Kay Sievers.

A tag is exported at boot as a symlinks to the device node in the folder
/run/udev/static_node-tags/<tagname>/, if the device node exists.

These tags are cleaned up by udevadm info --cleanup-db, but are otherwise
never removed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 14:05:40 -04:00
Dave Reisner
67ba217a19 udev-rules: report rule parsing errors from get_key 2013-07-30 13:50:13 -04:00
Anthony G. Basile
38382ffbd6 Bring collect.c and udevadm-hwdb.c in line with upstream
This brings these two files in line with upstream's commit:

  ef89eef77ee098a6828169a6d0d74128e236bcbd
  udev: fix two trivial memleaks in error path
  Based-on-a-patch-by: Ian Stakenvicius <axs@gentoo.org>

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 13:46:21 -04:00
Anthony G. Basile
f6571c3d64 rules: bring up to date with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 08:48:51 -04:00
Anthony G. Basile
9930444543 man/udev.xml: add doc about hwdb database
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 08:37:19 -04:00
Ian Stakenvicius
35876baf30 Switch from external keymaps to internal (hwdb) keymaps
This commit imports the new internal keyboard handling from upstream.
This is a combination of many upstream commits, including those
that added code, removed old code, and updated the hwdb.
Some commits (hwdb ones specifically) were unrelated but brought
in anyways to keep the whole hwdb consistent.  Each upstream
commit included is as follows:

9d7d42bc406a2ac04639674281ce3ff6beeda790 - internal keymap support
0c959b39175b126fdb70ae00de37ca6d9c8ca3a1 - hwdb: keyboard -- add file
e8193554925a22b63bef0e77b8397b56d63a91ff - hwdb: keyboard -- update comments
c79d894d590fc9df4861738555cc43c477e33376 - hwdb: import data
aedc2eddd16e48d468e6ad0aea2caf00c7d37365 - hwdb: keyboard update
97a9313cafccf772ce03f5ebd36fe4d9d8412583 - hwdb: drop non-existant Samsung 900XC3 from keymap
ddc77f62244bb41d5c8261517e2e1ff1b763fc94 - switch from udev keymaps to hwdb
0c3815773331b263713f4f7b9d80bc1ca159338e - also remove keymaps-force-release directory
1b6bce89b3383904d0dab619dd38bff673f7286e - keymap: re-add Logitech USB corded/cordless models
bf89b99c5a39115112c2eda4c2103e2db54988d2 - 60-keyboard.hwdb: Fix syntax error
ce39bb6909578017aa10031638e724e038f0b859 - hwdb: data update, upstream
884c86812c51479496edd50b278383d7bb67baf0 - rules: keyboard - use builtin command

All code from each of the above commits is attributed to the original
authors.

There were some adjustments made in order to support the code differences
between upstream and eudev, which was done by myself.

Also of note is that the code can still be disabled via the --disable-keymaps
configure option, which was removed from upstream.

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-24 16:27:01 -04:00
Anthony G. Basile
87b69cb045 src/udev/udevadm-hwdb.c: fix double free
clang is stupid and I will never blindly trust it again.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-11 09:37:36 -04:00
Anthony G. Basile
1fdae2bccb Version bump to 1.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-11 09:05:41 -04:00
Anthony G. Basile
da7301e983 src/udev/udev-builtin-kmod.c: fix char *const declaration
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-11 08:34:22 -04:00
Ian Stakenvicius
b2cf1c7154 Fix potential memleak and use-after-free errors as reported by clang
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 15:14:00 -04:00
Anthony G. Basile
5957c143c1 src/udev/udev-builtin-kmod.c: fix const char* declaration
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 13:51:28 -04:00
Anthony G. Basile
ae66dd92e5 src/udev/mkdir.c: import path_startswith() from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 12:59:18 -04:00
Anthony G. Basile
7a2e1b1409 src/udev/udev-ctrl.c: explicitly declare return value
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 12:37:46 -04:00
Anthony G. Basile
037a28c3d2 Bring mkdir.c, label.c and util.c in better line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 12:31:27 -04:00
Kay Sievers
fbae392487 hwdb: allow list of lookup keys per given record
This allows to specify:
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr*
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr*
   KEY_A=value
   KEY_B=value

Instead of:
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr*
   KEY_A=value
   KEY_B=value

  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr*
   KEY_A=value
   KEY_B=value

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 11:14:22 -04:00
Kay Sievers
6f85433a3b hwdb: return false if no property is found
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10 11:13:55 -04:00
Ian Stakenvicius
77d68de482 rule-generator: make sure /etc/udev/rules.d/ exists prior to trying to write to it
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-10 10:52:13 -04:00
Anthony G. Basile
e1dda94b63 docs/{gudev,libudev}: disable tests so make check works
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 04:06:52 -04:00
Anthony G. Basile
22f5ebe441 UPSTREAM.notes: log imports from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 03:58:24 -04:00
Kay Sievers
0d950bc040 hwdb: add --lookup-prefix= option 2013-07-09 03:42:06 -04:00
Anthony G. Basile
5084c56432 src/gudev: update LGPL info
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 03:25:34 -04:00
Anthony G. Basile
e5e61f4666 hwdb: sync with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 03:16:31 -04:00
Kay Sievers
e92a5c88fc hwdb: remove too broad PNP* match from 20-acpi-vendor.hwdb 2013-07-09 03:13:09 -04:00
Kay Sievers
3b94a10e35 hwdb: update
This is upstream commit 07125a9240088f7859b18908cc7d07e396947e24

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 03:11:28 -04:00
Anthony G. Basile
5d2c61c397 src/libudev/libudev-private.h: add missing include strxcpyx.h
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:19:12 -04:00
Kay Sievers
7a3bcc197c hwdb: allow to query arbitrary keys
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:13:45 -04:00
Kay Sievers
36cac2c40f hwdb: add --device=<device-id> and --filter=<key name glob>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:12:45 -04:00
Kay Sievers
86d0542d34 hwdb: remove support for (not fully implemented) conditional properties
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:04:06 -04:00
Anthony G. Basile
c9096d0490 Add sanity checks to paths in cgroup-util.c
This is part of upstream commit

	9444b1f20e311f073864d81e913bd4f32fe95cfd

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:44:52 -04:00
Zbigniew Jędrzejewski-Szmek
68db594ba6 dev-setup: do not create a dangling /proc/kcore symlink
https://bugs.freedesktop.org/show_bug.cgi?id=65382
https://bugs.gentoo.org/472060?id=472060
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:22:02 -04:00
Anthony G. Basile
faa1ff8ef8 Import strxcpyx from upstream
This commit imports strxcpyx from upstream.  This is upstream commit

    d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d

Note: there were also some very minor code cleanups to

	accelerometer.c: line 187
	collect.c: lines 35, 140
	libudev-device.c: line 780
	libudev-hwdb.c: line 300

These are part of upstream commits:

	507f22bd0172bff5e5d98145b1419bd472a2c57f
	3cf7b686e6b29f78de0af5929602cae4482f6d49
	67410e9f73a6cdd8453c78b966451b5151def14a

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:16:55 -04:00
Anthony G. Basile
44e6f1bc1a test: improve test-udev.c
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 23:13:39 -04:00
Anthony G. Basile
8b06a435cc rules: updates from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 23:02:06 -04:00
Anthony G. Basile
1c88925eee keymaps, keymaps-force-release: updates from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 22:52:03 -04:00
Anthony G. Basile
c8cdca5d5c hwdb: update from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 22:46:29 -04:00
Ian Stakenvicius
3909dfd26c create /etc/udev/rules.d target on install
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-03 14:14:29 -04:00
andrew-aladev
42e8bb6f12 rule_generator/rule_generator.functions: fix net rule generator
`udevadm info --run` no longer returns the correct run directory
 so we hard code it as "/run/udev/"

X-Gentoo-Bug: 475276
X-Gentoo-Bug-URL: https://bugs.gentoo.org/475276
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-01 12:57:38 -04:00
Anthony G. Basile
b722b49e9e src/udev/udev-ctrl.c: restore accept4_fallback code
This code was accidentally removed in commit

    601c4e8ce6

We restore it here.  Since most modern systems have accept4()
this code will seldom be triggered.  You can test by configuring
as follows:

    ac_cv_have_decl_accept4="no" ./configure

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-29 13:36:01 -04:00
Sean McGovern
983cecd795 udev: handle network controllers in nonstandard domains
Onboard network controllers are not always on PCI domain 0.

[Kay: use int instead of long, add [P] to slot naming, remove sysname var]

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:15:52 -04:00
Martin Pitt
98cddf4cb7 keymap: Apply to all Latitude and Precision models
https://launchpad.net/bugs/1193147

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:07:36 -04:00
Jan Janssen
b61630e3cf libudev: Use correct type for sizeof
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:04:18 -04:00