Commit Graph

366 Commits

Author SHA1 Message Date
Anthony G. Basile
ff28cff516 configure.ac: bump 3.1.5 = upstream 220 2015-10-13 02:00:05 -04:00
Ian Stakenvicius
305f0eef4d Forward-ported network rule-generator code from eudev-1.10 2015-09-25 12:38:07 -04:00
Romain Naour
0e2be0c217 build-sys: check for strndupa
strndupa is a GNU extension, therefore it's not available
for all libc libraries (musl).

This patch is based on the one proposed by Emil Renner Berthing for
systemd [1].

[1] http://lists.freedesktop.org/archives/systemd-devel/2014-September/023190.html

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 14:57:27 +02:00
Romain Naour
24ccb6ebc5 build-sys: check for mallinfo
mallinfo is not specified by POSIX or the C standards, therefore
it's not available for all libc libraries (musl).

Add the ability to disable mallinfo statistics.

Fixes:
selinux-util.c: In function ‘mac_selinux_init’:
selinux-util.c:70:25: error: storage size of ‘before_mallinfo’ isn’t known
         struct mallinfo before_mallinfo, after_mallinfo;

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 14:49:20 +02:00
Anthony G. Basile
252150e181 src/gudev: remove Gobject libudev support.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:42:01 -04:00
Anthony G. Basile
1b6370e74b docs: remove gtk-docs.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 08:33:47 -04:00
Bastien Nocera
e172381913 It's moved to the iio-sensor-proxy D-Bus service.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:45:23 -04:00
Anthony G. Basile
c9ed0f0dc6 configure.ac: bump 3.1.2 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-19 12:33:33 -04:00
Anthony G. Basile
3c49a3776a configure.ac: bump 3.1.1 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-05 10:35:38 -04:00
Anthony G. Basile
ebb37f6a47 configure.ac: add --enable-hwdb option. Address issue #111.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:50:28 -04:00
Anthony G. Basile
53997d40dd configure.ac: slightly better organize xsltproc stuff
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:36:16 -04:00
Anthony G. Basile
047416ff0f configure.ac: fix --enable-manpages. Fixes issue #109.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:25:58 -04:00
Anthony G. Basile
5803c30ed2 configure.ac: bump udev to 220 and eudev to 3.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 06:53:04 -04:00
David Cortarello
6a398265f3 Remove hardcoded path /run and configure using --with-rootrundir=
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-27 11:34:13 -04:00
Anthony G. Basile
3cda11ed7c configure.ac: update udev version to 219. 2015-03-19 19:34:33 -04:00
Anthony G. Basile
298f6c8128 src/udev/udev-builtin.c: remove legacy optional keymap
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 18:40:16 -05:00
Anthony G. Basile
79bf63bcff src/udev/udev-builtin-kmod.c: remove the modprobe alt to kmod code 2015-02-11 18:06:47 -05:00
Anthony G. Basile
691df3c5c3 rule_generator: remove legacy code 2015-02-11 15:44:15 -05:00
Anthony G. Basile
ff78357e55 configure.ac: bump to 3.0 branch
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 14:59:18 -05:00
Anthony G. Basile
75039e7057 configure.ac: bump to 2.2 2015-02-08 11:52:13 -05:00
Emmanuel Benoît
ad1f456752 Build files: remove extraneous dependency
* configure.ac: use LT_LIBM to check for the maths library
* src/accelerometer/Makefile.am: use $(LIBM) instead of -lm in the link
flags

This causes all executables (except accelerometer) and libraries to be
linked without libm, which they do not need.
2015-01-21 16:45:55 +01:00
Anthony G. Basile
6740579367 configure.ac: don't die on missing linux/btrfs.h, fixes issue #100
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-16 13:40:43 -05:00
Michal Schmidt
03221aa40a hashmap: rewrite the implementation
We reintroduce hashmap.{h,c}, list.h and set.h verbatim from upstream,
before we punt dead code.  The following is the upstream message:

This is a rewrite of the hashmap implementation. Its advantage is lower
memory usage.

It uses open addressing (entries are stored in an array, as opposed to
linked lists). Hash collisions are resolved with linear probing and
Robin Hood displacement policy. See the references in hashmap.c.

Some fun empirical findings about hashmap usage in systemd on my laptop:
  - 98 % of allocated hashmaps are Sets.
  - Sets contain 78 % of all entries, plain Hashmaps 17 %, and
    OrderedHashmaps 5 %.
  - 60 % of allocated hashmaps contain only 1 entry.
  - 90 % of allocated hashmaps contain 5 or fewer entries.
  - 75 % of all entries are in hashmaps that use trivial_hash_ops.

Clearly it makes sense to:
  - store entries in distinct entry types. Especially for Sets - their
    entries are the most numerous and they require the least information
    to store an entry.
  - have a way to store small numbers of entries directly in the hashmap
    structs, and only allocate the usual entry arrays when the direct
    storage is full.

The implementation has an optional debugging feature (enabled by
defining the ENABLE_HASHMAP_DEBUG macro), where it:
  - tracks all allocated hashmaps in a linked list so that one can
    easily find them in gdb,
  - tracks which function/line allocated a given hashmap, and
  - checks for invalid mixing of hashmap iteration and modification.

Since entries are not allocated one-by-one anymore, mempools are not
used for entries. Originally I meant to drop mempools entirely, but it's
still worth it to use them for the hashmap structs. My testing indicates
that it makes loading of units about 5 % faster (a test with 10000 units
where more than 200000 hashmaps are allocated - pure malloc: 449±4 ms,
mempools: 427±7 ms).

Here are some memory usage numbers, taken on my laptop with a more or
less normal Fedora setup after booting with SELinux disabled (SELinux
increases systemd's memory usage significantly):

systemd (PID 1)                            Original   New    Change
dirty memory (from pmap -x 1) [KiB]            2152  1264     -41 %
total heap allocations (from gdb-heap) [KiB]   1623   756     -53 %

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-31 13:28:12 -04:00
Lennart Poettering
ea79c9cdf0 util: make use of the new getrandom() syscall if it is available when needing entropy
Doesn't require an fd, and could be a bit faster, so let's make use of
it, if it is available.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-31 11:58:25 -04:00
Anthony G. Basile
d3e4cb5ccb configure.ac: bump 2.1.1 = upstream 217
Release for bug fix on musl.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-29 16:20:14 -04:00
Anthony G. Basile
acbf3091de configure.ac: bump 2.1 = upstream 217
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-28 20:53:04 -04:00
Anthony G. Basile
429c3a7f17 configure.ac: require automake 1.13
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-15 17:01:33 -04:00
Anthony G. Basile
35257b404e configure.ac: bump 2.0 = upstream 216
Branch v2.X breaks from v1.X in that it removes the userland
firmware loading support.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-13 08:56:10 -04:00
Kay Sievers
3b71759460 udev: remove userspace firmware loading support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-13 08:27:22 -04:00
Anthony G. Basile
0f90b52d51 configure.ac and src/libudev/Makefile.am: bump to 1.10 = upstream 216
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-22 08:03:24 -04:00
Anthony G. Basile
b1ac60946d src/shared: refactor shared code
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 19:22:24 -04:00
Anthony G. Basile
ba3e123a22 Include missing.h in udev-builtin-btrfs.c, and move BTRFS_IOC_DEVICES_READY to missing.h
This is a combination of upstream commits

    dced15575f7bf172e3c9d798c43477539525558c
    7bed7f0e3b1f9596aedb64657e432e5b267adebb

by

    Simon McVittie <simon.mcvittie@collabora.co.uk>
    7bed7f0e3b1f9596aedb64657e432e5b267adebb

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:32:35 -04:00
Anthony G. Basile
a51173a35e configure.ac: bump to 1.9 = upstream 215
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-06 08:00:08 -04:00
Anthony G. Basile
cd03d84ff0 configure.ac: separate out rootlibdir and rootlibexecdir 2014-06-24 15:28:01 -04:00
Anthony G. Basile
9851827c99 configure.ac: improve install paths for udevlibexecdir, udevkeymapdir, udevkeymapforceredir, udevrulesdir 2014-06-24 13:04:46 -04:00
Anthony G. Basile
441d5c2b39 configure.ac: bump to 1.8 = upstream 214
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-19 19:58:05 -04:00
Anthony G. Basile
9ea99e7409 configure.ac: bump to 1.7 = upstream 213
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-01 14:14:12 -04:00
Zbigniew Jedrzejewski-Szmek
f8e5fbd9c8 Remove unnecessary casts in printfs
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-05-15 19:34:56 -04:00
Anthony G. Basile
47ef6b2c66 src/libudev/missing.h: clean up and fix build on uclibc and musl
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-05-13 10:53:21 -04:00
Kay Sievers
2500dbc810 udev: remove seqnum API and all assumptions about seqnums
The way the kernel namespaces have been implemented breaks assumptions
udev made regarding uevent sequence numbers. Creating devices in a
namespace "steals" uevents and its sequence numbers from the host. It
confuses the "udevadmin settle" logic, which might block until util a
timeout is reached, even when no uevent is pending.

Remove any assumptions about sequence numbers and deprecate libudev's
API exposing these numbers; none of that can reliably be used anymore
when namespaces are involved.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-04-24 15:40:08 -04:00
Anthony G. Basile
a1a5424a62 configure.ac: bring version numbers in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-04-03 13:31:29 -04:00
Anthony G. Basile
6330a66ad2 configure.ac: bump to 1.5.3
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-03-22 18:44:40 -04:00
lhb-jr
8a5de44bb8 modified: configure.ac
modified:   man/Makefile.am
Added checking for DocBook in configure
2014-03-20 20:51:06 -04:00
Anthony G. Basile
e0aa59ede2 configure.ac: bump to version 1.5.2
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-03-09 13:43:28 -04:00
Anthony G. Basile
3836f0afa1 configure.ac: bump to version 1.5.1 2014-03-04 09:32:50 -05:00
Anthony G. Basile
e906d02b61 configure.ac: bump to version 1.5 2014-02-28 17:35:51 -05:00
Anthony G. Basile
e33d2cfc5e src/udev: bring up to date with upstream.
These commits were authored by

    Zbigniew Jędrzejewski-Szmek
    Tom Gundersen
    Kay Sievers
    Lennart Poettering
    Shawn Landden
    Daniel Buch
    Martin Pitt
    Karel Zak
    Yang Zhiyong

Note: udev_builtin_net_setup_link has *not* been imported.  Also
still missing from udev-builtin is udev_builtin_uaccess.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-13 18:16:50 -05:00
Anthony G. Basile
e27fa9c2e7 configure.ac: add header check for mtd/mtd-user.h
This addresses

    https://github.com/gentoo/eudev/issues/73

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-09-26 11:31:01 -04:00
Anthony G. Basile
1cd005527a configure.ac: compat with upstream 207 2013-09-14 09:42:28 -04:00
Anthony G. Basile
320c6723e7 configure.ac: moving towards release 1.3 2013-09-10 07:22:04 -04:00