Commit Graph

729 Commits

Author SHA1 Message Date
Lucas De Marchi
f38e68a29c README: let people know they don't need to subscribe
People are afraid to CC the mailing list because they think they need to
subscribe (and a lot of them are already subscribed to too many lists).
2012-07-31 09:58:21 -03:00
Lucas De Marchi
382de85c94 build-sys: add 'man' entry in summary 2012-07-31 09:51:48 -03:00
Colin Walters
8631552d3d build-sys: Add --disable-manpages option
1) Embedded systems often don't want man pages on the
   target; rather than pointlessly building them, then ignoring
   the result, allow just not building them at all
2) When bootstrapping an operating systems, documentation is the
   source of many cyclical dependencies, and allowing it to
   be explicitly disabled is useful for earlier build passes.
2012-07-31 09:45:59 -03:00
Dave Reisner
2077017f11 man/rmmod: specify each option in separate <term> tag 2012-07-26 09:19:56 -03:00
Dave Reisner
e3366d46bf man/depmod: specify each option in separate <term> tag 2012-07-26 09:19:53 -03:00
Dave Reisner
0e581357b6 man/modprobe: specify each option in separate <term> tag 2012-07-25 19:50:56 -04:00
Dave Reisner
ffeccb511c man/modinfo: specify each option in separate <term> tag
This has the end result of comma delimiting equivalent options in the
manpage, similar to many other manuals.
2012-07-25 19:50:04 -04:00
Dave Reisner
ff9909694b man/modinfo: document longopts for field shortcuts 2012-07-25 19:37:49 -04:00
Dave Reisner
072122f9dc man/modinfo: document --basedir option
This was never documented in the manpage of module-init-tools either.
The flag is identical in function to modprobe's --dirname option, so use
the same language to describe it.
2012-07-25 19:37:47 -04:00
Dave Reisner
465f2d6b7c man/modprobe: clarify --dirname option
The documentation for this flag leads one to believe that the full path
to the module directory is needed. In reality, this flag specifies only
the root of the module path.
2012-07-25 19:37:17 -04:00
Lucas De Marchi
e8fd8fec23 Use #pragma once instead of #ifndef
Only the public header maintains #ifndef in the header, together with
pragma. The other ones contain only pragma.

As reported by Shawn Landden on systemd mailing list this is compatible
with all major compilers and gcc has this since version 3.3.
2012-07-18 10:31:50 -03:00
Dave Reisner
4e7f0f204b build-sys: disable jobserver for rootfs target
2588e3dff5 broke the distcheck target. Fix it by serializing the rootfs
(re)creation prior to running the testsuite.
2012-07-10 10:41:57 -03:00
Lucas De Marchi
e1b1ab24ab testsuite: re-license under LGPL 2012-07-10 10:31:57 -03:00
Martin Pitt
4281cee076 testsuite: path wrapper: Fix open() with 3 arguments
Properly return the original libc return value in the case that open() is
called with 3 arguments.
2012-07-10 10:31:40 -03:00
Dave Reisner
486f901392 module: support reading coresize from /sys if supported
Linux 3.3 introduced the coresize attribute in /sys/module/*. When
available, use this instead of parsing some portion of /proc/modules.
2012-06-29 13:04:41 -04:00
Dave Reisner
2588e3dff5 Implicitly run 'make rootfs' with 'make check'
Avoid the need for the user to run this manually after a run of the
testsuite by adding it.
2012-06-29 12:58:06 -04:00
Lucas De Marchi
fca5b9bcd4 testsuite: use right offset for module name
We need to cope with the case in which a 32 bits machine is opening a 64
bits kernel module and vice-versa. The offset in `struct module' are
different and do not depend on the architecture we are running, but
rather on the architecture they were created for.

This fixes `make check' in 32 bits machines (since we are shipping 64
bits modules for testing)
2012-06-21 11:30:56 -03:00
Lucas De Marchi
62081c0f68 kmod 9 2012-06-19 19:46:53 -03:00
Lucas De Marchi
7896165922 build-sys: allow compressed modules in testsuite 2012-06-19 13:28:02 -03:00
Lucas De Marchi
33202e84f3 build-sys: Make dirs writable on rootfs creation
Autofoo make the dist dir as readonly. If we copy it, tools needing to
create sysfs entries will not be able to do so, because they can't
create the needed directories/files.

It would be much better if autofoo allowed to let the files as is
instead of converting them to read-only.
2012-06-19 13:27:56 -03:00
Lucas De Marchi
3f376cd877 depmod: use ferror and fclose to check for error
Thanks to hpa for point this out.
2012-06-15 22:14:00 -03:00
Dave Reisner
b7d830bcc8 bootstrap: remove unnecessary echo 2012-06-15 20:35:28 -04:00
Dave Reisner
563befdba6 bootstrap-configure: quote command line arg expansion 2012-06-15 20:35:28 -04:00
Lucas De Marchi
a4fb97a71e depmod: return error when index is truncated due to ENOSPC
Before:
=======
[lucas@vader kmod]$ sudo depmod
[lucas@vader kmod]$ echo $?
0
[lucas@vader kmod]$ ls -l /lib/modules/$(uname -r)
total 12
drwxr-xr-x 8 root root   160 Jun 13 11:05 kernel
-rw-r--r-- 1 root root 12288 Jun 15 21:29 modules.alias
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.alias.bin
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.dep
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.dep.bin
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.devname
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.softdep
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.symbols
-rw-r--r-- 1 root root     0 Jun 15 21:29 modules.symbols.bin

Note that modules.alias is truncated and the other have size == 0

After:
======

[lucas@vader kmod]$ sudo ./tools/depmod
WARNING: could not open /lib/modules/3.5.0-rc2-demarchi-00028-g94fa83c/modules.order: No such file or directory
ERROR: Could not create index: output truncated: No space left on device
[lucas@vader kmod]$ echo $?
1
2012-06-15 21:31:05 -03:00
Lucas De Marchi
015946da0c depmod: fix coding-style issue in array declaration 2012-06-15 03:04:28 -03:00
Lucas De Marchi
80e49ad988 depmod: fail if any index could not be created 2012-06-15 02:42:39 -03:00
Lucas De Marchi
c5db1a3fd2 depmod: don't return error if modules.builtin don't exist 2012-06-15 02:42:25 -03:00
Lucas De Marchi
ccd6afa4f2 Remove ifdef for building tools not bundled
Current build system do not support to build separate tools anymore, so
just remove the ifdefs.
2012-06-15 00:40:14 -03:00
Lucas De Marchi
fd0d806e40 build-sys: add missing header to fix distcheck 2012-06-14 16:58:46 -03:00
Lucas De Marchi
ac78e109c3 tools: rename source files
There's no point anymore in having "kmod-" prefix. This is a historical
thing when we started implementation of these tools.
2012-06-14 16:29:28 -03:00
Lucas De Marchi
e7fc2c868e libkmod-config: refactor functions to get config
It makes more sense to have libkmod-config.c deal with the configuration
directly and the others get the config from ctx. As a bonus point we get
a smaller binary. Following numbers are for x86-64, libkmod + kmod:

Before:
   text	   data	    bss	    dec	    hex	filename
 128840	   1496	    104	 130440	  1fd88	tools/modprobe

After:
   text	   data	    bss	    dec	    hex	filename
 128392	   1496	    104	 129992	  1fbc8	tools/modprobe
2012-06-12 01:43:46 -03:00
Lucas De Marchi
c8c956b199 TODO: update tasks
- Remove dependency loop with install commands, since it's done
 - Add reasoning behind API refactor
2012-06-11 12:01:48 -03:00
Lucas De Marchi
9b01fd2edd testsuite: Fix test description 2012-06-11 11:57:55 -03:00
Lucas De Marchi
5b05c32725 libkmod-index: protect ourselves from corrupted indexes
If index is shorter than 12 bytes, we couldn't even read its header. Go
to error handling in this case.
2012-06-06 09:36:29 -03:00
Lucas De Marchi
01d9ee642d testsuite: add test for install-commands loop
This loop is similar to the one that comes with install rules of
alsa-utils package. It can be easily verified by reverting commit
abd5557 and running the testsuite.
2012-06-06 01:57:33 -03:00
Lucas De Marchi
34db3f2d3e testsuite: allow to export custom env vars 2012-06-06 01:45:30 -03:00
Lucas De Marchi
b8e344a6d2 testsuite: add timeout for each test
Each test must run under 2 seconds. Ideally they should run in much less
than this; just give an arbitrary number so we don't wait forever in
case we reached an infinite loop somewhere.
2012-06-06 01:45:30 -03:00
Lucas De Marchi
ed8e93fd92 testsuite: create additional pipe to monitor child 2012-06-06 01:45:30 -03:00
Lucas De Marchi
535c541e60 libkmod-util: split function for usec conversion 2012-06-06 01:08:56 -03:00
Lucas De Marchi
a6976f8b1d testsuite: add test for softdep loops 2012-06-05 00:57:47 -03:00
Lucas De Marchi
a655370541 testsuite: check if module is in kernel for return code 2012-06-05 00:54:48 -03:00
Lucas De Marchi
ddf1e7a617 testsuite: set default init_module behavior to mimic kernel's 2012-06-05 00:54:48 -03:00
Lucas De Marchi
5a2949cdf3 testsuite: create initstate file upon fake init_module() 2012-06-05 00:54:47 -03:00
Lucas De Marchi
44e5466795 testsuite: add mkdir_p implementation 2012-06-05 00:54:47 -03:00
Lucas De Marchi
113d0084d4 testsuite: trap calls to mkdir 2012-06-05 00:54:47 -03:00
Lucas De Marchi
0de690c96c testsuite: check if rootfs dir is dirty before running
Keep around a stamp-rootfs file that is generated together with the
rootfs. testsuite checks each test directory if its mtime is greater
than stamp's mtime, deciding if rootfs should be re-generated.
2012-06-05 00:54:47 -03:00
Lucas De Marchi
ada9719942 testsuite: separate insert and delete rootfs from modinfo 2012-06-05 00:54:47 -03:00
Lucas De Marchi
e46bca009d libkmod-util: add missing stdbool.h include 2012-06-05 00:54:47 -03:00
Lucas De Marchi
e2ee7d9b7a testsuite: rename rootfs dir 2012-06-05 00:54:47 -03:00
Lucas De Marchi
851ee75c19 build-sys: provide --sysconfdir to make distcheck flags
test-blacklist is accessing the wrong location in make distcheck, making
the test to fail. Fix is by providing --sysconfdir=/etc in configure
flags.
2012-06-05 00:54:46 -03:00