summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-10-01harden version generationFlorian Pritz2-5/+6
If you run make dist, extract that tarball somewhere else and try to run makepkg it will fail because it can't find the git tree anymore. [Dave: removed --dirty flag, as this breaks makepkg] Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-10-01init_functions: use constants on LHS of testsDave Reisner1-3/+3
If we encounter a BOOT_IMAGE var taken from grub2, the first character could be a '(' which will throw off busybox's parser and error out. Reverse the comparison so that the LHS is always a constant, which can be compared to anything (including nothing at all). Fixes FS#26119. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01use correct variable to reference compression methodDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01functions: fix output order in _add_symlinkDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: follow symlinks only when necessaryDave Reisner1-2/+4
If the image we're pointing to is a symlink, show the resolution as part of the name in -a's output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: disable color when stdout isn't a ttyDave Reisner1-1/+1
This was a copypasta error when taking this from makepkg, which has special concerns in this regard. lsinitcpio should only concern itself with stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01init: allow /run to be mounted with exec permsDave Reisner1-1/+1
This is already done in initscripts so we mirror it here. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01init: support breaks before and after mounting rootDave Reisner1-2/+8
Add in 'premount' and 'postmount' as trigger conditions, but also leave in the old 'y' value as a synonym for premount. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01mkinitcpio: insist that /dev and /proc be mountedDave Reisner1-0/+4
This avoids errors with process substitutions in chroots, among other things. It's important that /proc be checked first as /etc/mtab might be a link to /proc/self/mounts. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: keep going even when a hook isn't foundDave Reisner1-1/+2
Instead of bailing entirely, throw an error, and ensure that we exit with a non-zero status. The user might do something as simple as misspell a hook name which may or may not prevent a useful image from being created. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: explicitly create $BUILDROOTDave Reisner1-0/+3
Avoids explosions if a user has no HOOKS in their config, as seen: https://bbs.archlinux.org/viewtopic.php?pid=966344 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: fix whitespace errors in error messagesDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27mkinitcpio: simplify setting of SKIPHOOKSDave Reisner1-6/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27ensure local scoping of variablesDave Reisner2-5/+11
Also make sure that simple variables are declared as null strings. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: specify the delimiter to xargsDave Reisner1-1/+2
Without specifying this, xargs will split arguments on whitespace as well as newlines, and will interpret quoting and backslashes. When the delimiter is specified, every character is taken literally and only the given delimiter in honored. This sidesteps issues with broken modalias files as evidenced by a MacBookAir3,1 or the bbs thread below: https://bbs.archlinux.org/viewtopic.php?pid=971853 Also fixes FS#25450. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: perform path lookup for binaries if neededDave Reisner1-1/+25
We used to do this, but it was lost somewhere along the way in fixing up basedir support. Add in a 'pathlookup' function which can do a search within any given basedir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27functions: refactor get_{base,dir}nameDave Reisner1-7/+8
Make sure these are completely safe for user input. Use the same three step process in both cases: 1) Strip any trailing slash 2) Trim the string according to base/dir request 3) Print the result, defaulting to / if step 2 yielded an empty string Signed-off-by: Dave Reisner <d@falconindy.com>
2011-09-27functions: allow ignoring errors on module additionDave Reisner10-17/+28
We conditionally, but naively, add modules in some of our install hooks, but the kernel may not have these. Note that these modules can fail silently by detecting a '?' suffix on the module name. In conjunction with this, the add_module function now takes a flag, -t or --try, which will ignore module not found errors from modinfo. The config file will also support this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27base: remove superfluous leading /Dave Reisner1-1/+1
The doubled up leading slashes annoy me in the verbose output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27cleanup and bashify install hooksDave Reisner17-266/+220
No logical code changes -- this is purely a syntactical cleanup and standardization across the build hooks along with ensuring that help messages are wrapped to 80 columns or less. All hooks get the same treatment, adhering to the following style: #!/bin/bash build() { COMMANDS } help() { cat <<HELPEOF This is a help message. HELPEOF } # vim: set ft=sh ts=4 sw=4 et: Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27keymap: simplify unicode detectionDave Reisner2-11/+10
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-24keymap/consolefont: source rc.conf properly from $BASEDIRDave Reisner2-29/+37
This is partially in response to FS#24685, which should hopefully cut back on configuration duplication on non-sysvinit systems. This does, however, also fix a bug with keymap/consolefont pulling the wrong rc.conf when BASEDIR is not '/' or unset. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-24install/consolefont: cleanup and refactorDave Reisner1-25/+27
* Provide support for uncompressed font files as well as compressed * Avoiding using an unnecessary temp file * Support $BASEDIR * Warn when no font is found * Only add the runtime hook if a font is added Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-10generate VERSION only for the tarballHEADmasterFlorian Pritz1-9/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-07-09mkinitcpio: reference -h on failed option parsingDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-09autodetect: add verbose feedback on autodetect successDave Reisner1-0/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-09functions: restore verbose feedback to add_moduleDave Reisner1-0/+1
Since we no longer call _add_file from add_module, we lose our 'adding file..' feedback on -v. Explicitly mention each module alongside addition of the path/name to the associated arrays. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-09mkinitcpio: add --quiet to bsdcpio without -vDave Reisner1-1/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-05lsinitcpio: fix logical error in reading compression0.7.2Dave Reisner1-1/+1
2011-07-05autodetect: check for /sys/devices before autodetectingDave Reisner1-2/+2
Oops. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-05cleanup devel PKGBUILDDave Reisner1-4/+7
* Assign a better $pkgver that will be more in line with released versions. This means we can just provide this version and let pacman upgrade. * raise udev dependency to 171
2011-07-05Makefile: allow git-describe to determine versionDave Reisner1-5/+10
For distribution, a VERSION file is written to and distributed for storing the ref. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04mkinitcpio: include version in help msgDave Reisner2-0/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04fix module installation issues with BASEDIRDave Reisner1-1/+4
Broken in 491a99. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04functions: do not null delimit modalias dataDave Reisner1-2/+2
These files will never be more than one line, and they're newline delimited already. Moreover, adding the extra null delimiters appears to do strange things in transit to modprobe. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04manpage: clarify behaviors, add example, fix typosDave Reisner1-5/+13
I've neglected to do this along the way and some options, such as -k or -p now have additional behaviors that should be made known. Now that basedir support is legit, add an example showing a possible invocation. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04manpage: wrap at 80 columns, add a vim modelineDave Reisner1-15/+39
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04unify error messaging, both in grammar and outputDave Reisner2-13/+14
This also removes a superfluous check on MODULEDIR, which is already covered by get_kernver. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-04mkinitcpio: refactor BASEDIR resolutionDave Reisner1-11/+12
This should be performed first, to avoid false positives on any checks that would have been previously done before we knew our BASEDIR was valid. Remove usage of readlink here as well, and use pushd/pwd to resolve. The final trimming of any trailing slash (which might be the entire BASEDIR value) resolves an edge case bug where specifying a BASEDIR that resolved to '/' would cause explosions in add_symlink. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-03Release version 0.7.10.7.1Thomas Bächler1-1/+1
2011-07-03Merge branch 'working' of https://github.com/falconindy/mkinitcpio into workingThomas Bächler3-10/+19
2011-07-02functions: remove cruft from in_arrayDave Reisner1-3/+2
the for loop is already a NOOP when the haystack is empty, so it already falls through to the return 1. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-02cleanup rarely and unused variable declarationsDave Reisner1-5/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-02Fix -k /path when -b is usedGerardo Exequiel Pozzi1-1/+1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-02base/install: rewrite the config to sanitize itDave Reisner1-2/+15
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-02Trim leading spaces in MODULES and earlymodules to prevent error messages ↵Thomas Bächler1-3/+4
when one is set to " "
2011-07-02install modules all at onceDave Reisner2-2/+6
build an array of paths to modules, and install them all at once with mkdir -p and cp --parents. Cuts back on our major source of calls to install(1). This is a tad ugly in that it creates some amount of data duplication, keeping an array of paths in addition to module names. However, turns out to be a worthwhile tradeoff as merging the two datasets into one results in the need for massive string trimming.
2011-07-02functions: reorg, no code changesDave Reisner1-83/+83
Mostly, this groups "private" functions together, separate from public functions. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-02always exit from cleanupDave Reisner2-18/+9
There's no use case for us calling cleanup without exiting afterwards, so we can simplify all of our cleanup;exit; calls into just cleanup. This means our sighandler is no longer needed (it wasn't really, to begin with), but we split it up to make sure we exit with a posix-ish 128+signum exit value. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-01functions: call _add_file directly from add_moduleDave Reisner1-1/+1
This avoids an expensive stat call and some other unnecessary path juggling. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>