summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-04-24functions: implement add_firmwareDave Reisner2-8/+26
Add this as an abstraction for the various places firmware might exist. Additionally, don't complain about missing firmware unless *none* of it can be found -- and even then, only throw a warning. NB: this means that users building images without the autodetect hook and a rudimentary hook like "block" will see warnings which are going to cause panic, chaos, and upheaval. I fully expect that this will result in extra non-work for me in the form of closing invalid bug reports. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-04-21functions: return a count of failures from map, if possibleDave Reisner1-1/+1
I don't have any particular use case for this, but it might be nice to have this available in the future. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-03-13autodetect: allow whitelisting by MODULE_FS_ALIASDave Reisner1-3/+5
Linux 3.9 adds a filesystem alias in the supporting module in the form of fs-$filesystem. While this is mainly aimed at security/paranoia, it does mean that we can make better use of the fact that we always resolve filesystem as aliases to filesystem modules. Do an additional lookup in add_if_avail to resolve the new alias in addition to the filesystem name itself. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-03-13mkinitcpio: honor updates directory for firmwareDave Reisner2-2/+6
This also removes a check which would have otherwise hidden a missing firmware error from the user. FS#34255. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-03-13mkinitcpio: fix reference to bad variable nameDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-03-09lsinitcpio: shortcut lzop involvement to bsdtarDave Reisner1-8/+4
libarchive 3.1 supports LZO now, so we no longer need this indirection everywhere. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-28PKGBUILD: depend on systemd, not systemd-toolsDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-28mkinitcpio: use consistent style in case statementDave Reisner1-18/+36
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-28add zsh completionDaniel Wallace2-0/+65
add zsh completion for lsinitcpio and mkinitcpio Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com>
2013-02-28bash-completion: use kernel versions from detectionDave Reisner1-8/+2
Instead of rummaging through /lib for kernel versions, just use the validated versions from the hunt through /boot. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-11fsck: add fsck config if it existsDave Reisner1-3/+8
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-05Move preset examples from /etc/mkinitcpio.dSébastien Luttringer1-2/+3
to $(DESTDIR)/usr/share/mkinitcpio to avoid use in mkinicpio -P. Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
2013-02-05Add -P, --allpresets optionDave Reisner3-13/+24
As a logical extension, allow the -p option to be specified multiple times in order to process several presets at once. Original-patch-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-02-03bash-completion: detect_kver -> _detect_kverDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-31functions: add /usr/lib64 -> lib symlink0.13.0Dave Reisner1-2/+8
Relegate this and the other lib64 symlink to x86_64, too, since we have no business creating this on i686. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-24symlink /lib64 -> usr/lib in imageDave Reisner1-0/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-21Do more to determine the color caps of the termDave Reisner3-32/+20
823e24 wasn't really correct, since running 'tput setaf 0' effectively sanity checks the terminfo as well as checking existance. However, it does nothing to affirm that the terminal is capable of supporting colors. Moreover, *never* fall back on the hardcoded escapes as doing so implies that we've found a broken terminfo and we have no idea what the terminal is capable of doing. This reverts commit 823e2454176d4381cd3acc30481e9d84cdc298b1.
2013-01-18mkinitcpio.8: we support PARTLABEL tooDave Reisner1-2/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-13factor out kver detection to functions fileDave Reisner4-23/+24
This leaves bash completion with a duplication, but this is intentional to avoid pulling in the entire functions file and worrying about pollution. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12parseopts: remove superfluous continue/shift statementsDave Reisner1-5/+1
Found via apron. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12functions: remove broken symlink errorDave Reisner1-4/+1
Due to using PATH lookups for hooks, we can't possibly end up with a broken symlink. The build will just error out on the hook not being found. Found via apron. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12init_functions: namespace parsed vars from cmdlineDave Reisner1-23/+23
It's possible, though unlikely, that someone expecting a variable of the name, e.g. "rhs" or "lhs" to be propagated from the kernel cmdline could be sadly let down because of the local scoping. Give our localized vars names less likely to clash. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12use type to determine availability of tputDave Reisner2-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12functions: always force a PATH lookup for typeDave Reisner1-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12lsinitcpio: further cut out dependency on fileDave Reisner2-13/+53
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12lsinitcpio: avoid redundanciesDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12lsinitcpio: abort on unknown file formatsDave Reisner1-1/+6
Specficially, abort when a user tries to run lsinitcpio on a kernel image. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12lsinitcpio: fail hard if the image can't be extractedDave Reisner1-2/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-12mkinitcpio: avoid using 'file' to get kernel versionsDave Reisner2-10/+33
The kernel defines an offset at a fixed location within the bzImage which we can use to find the kernel version string. Since this is fairly important, reimplement the algorithm (which file almost surely uses) using low level tools to avoid the possibility that file may break or change its output, critically wounding mkinitcpio. Note that this change leaves 'file' in use for lsinitcpio compression detection. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-04install/block: move TI flash media drivers to autodetectDave Reisner1-2/+2
Some of these modules have modaliases which can be picked up by whitelisting. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-12-28hooks: rename 'usbinput' to 'keyboard' and add more modulesTom Gundersen3-29/+33
Make the hook a bit more generic by including non-usb keyboard drivers. This should mean that any keyboard will now work in the initramfs. In addition to fixing some uncommon setups requiring additional keyboard modules, this would allow us to no longer build in the atkbd module (and hence i8042) in our stock kernels, which will remove an ugly error message on boot for systems without the i8042 controller. Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-12-02consolefont: fix reference to consolefont variableDave Reisner1-4/+4
Broken by ac8499c08279b05d. FS#32935. https://bbs.archlinux.org/viewtopic.php?id=153982 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-12-02build: use git-archive to create tarballsDave Reisner1-2/+3
Append generated files afterwards. This preserves symlinks, and probably other things too. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-12-02mkinitcpio: use fancy unicode in -L output0.12.0Dave Reisner1-2/+4
Denote deprecation with unicode superscript footnote markers. Yes, this inherently limits us to 9 deprecation notices in its current form, but there really shouldn't ever be so many deprecated items at once. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-30mkinitcpio.8: fix add_runscript doc to match realityDave Reisner1-1/+1
This function no longer expects an argument. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-28shutdown: leave a comment about cryptsetup v. dmsetupDave Reisner1-0/+2
Remind myself why we can't merge these so I'm not tempted to do this again in the future. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26functions: always return successfully if we ran a build hookDave Reisner1-0/+5
Removal of the old API (f85d28014134076) exposed the fact that a build hook returning an error would increment the builderrors. This isn't really wanted -- we don't want to declare a hard "pass/fail" for a hook, as the functions we actually care about passing/failing are the add_* functions which are of real concern (and already caught). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26lsinitcpio: use compound command for parseopts execDave Reisner1-3/+1
Pedantic, but at least this makes us consistent with mkinitcpio. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26handle deprecation notices in -H and -LDave Reisner2-18/+90
Separate out the printing from these flags to separate functions and examine each hook more closely, pointing out where it might be deprecated, and what should be used in place of it. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26replace find_in_dirs with PATH= manipulationDave Reisner3-28/+14
Declaring our lookup paths like normal colon delimited PATHs lets us reuse them for builtins like source and type to do the same work that this function previously did. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26shutdown: teardown loop devices only after umountDave Reisner1-6/+6
This still isn't really ideal, but attempting to detach loops while they're still mounted will definitely fail. Ideally, the loop device is in autoclear mode and dropping its refcount to 0 on umount will cause the backing file to be detached from the loop. Of course, this all gets way too complicated for userspace to handle when dealing with the sort of rat's nest of loop devices that ArchISO sets up. The kernel doesn't help us out here by populating things like holders/ and slaves/, but I'm not sure it could. Maybe there's a better way... Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26selectively decompress modules on installDave Reisner1-6/+19
Don't make any assumptions about the compression on modules and scan the passed in module list for telltale extensions. This has the benefit of doing nothing when modules are uncompressed, and adds support for decompression of XZ modules. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26unique _modpaths arrays in during buildDave Reisner2-11/+12
Declaring _modpaths as an associative array allows us to forego the printf|sort -u|xargs cp pipeline as we can guarantee that the array is already prepared. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26modconf: add new hook to simply inclusion of modprobe configDave Reisner2-4/+16
Add this as a default in the config file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-26merge most storage hooks into a single 'block' hookDave Reisner9-147/+57
As the autodetect hook gets better with every kernel release, we can "afford" to remove the needless segregation of block device driver hooks and simply merge all the "vanilla" or "unstacked" block device drivers. This should make a lot of setups, like usb or virtio, easier as you won't need to remember to add the hook. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24Makefile: copy directories, not individual files on installDave Reisner1-3/+2
This allow preservation of symlinks. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24functions: only show the basename of a deprecated hookDave Reisner1-1/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24build: move manpages to subdirDave Reisner4-7/+7
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24obsolete old-style install hook APIDave Reisner3-52/+22
This removes any meaning from the definitions of MODULES, BINARIES, FILES, and SCRIPT within install hooks. It also removed the deprecated checked_modules() function, which is replaced by add_checked_modules(). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-24drop support for reading /etc/rc.confDave Reisner2-10/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>