summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30install/keymap: fix installation ($buildroot -> $BUILDROOT)Thomas Bächler1-4/+4
2011-06-30Add .gitignore fileThomas Bächler1-0/+4
2011-06-30Add asciidoc as makedepends in private PKGBUILD.Gerardo Exequiel Pozzi1-0/+1
Avoid: make: a2x: Command not found Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-27Use _get_comp_words_by_ref in bash completionSebastien Luttringer1-8/+8
Thanks Dave Reisner for suggestion Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-27Merge branch 'working'Thomas Bächler3-11/+12
2011-06-27mkinitcpio: fix resolution issues with RTLDDave Reisner1-3/+2
The _add_dir call is all wrong. The necessary paths are created by reversing the order of the _add_symlink and _add_file calls, as _add_file will take care of creating parent directories. Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-27install/base: use private API call to add configDave Reisner2-2/+4
We can't let add_file get its hands on the config file, because we need to be sure that an absolute path is honored. As a side effect, ensure that $BASEDIR is appended to the config file during preset processing. Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-27functions: fix pathing issue with $BASEDIRDave Reisner1-3/+3
Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-27functions: s/basedir/BASEDIR/Dave Reisner1-2/+2
Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-27functions: add missing 'command' before installDave Reisner1-1/+1
Without this, we hit an infinte loop and crash when a legacy 'install' function in a hook is encountered. Thanks-to: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-26Add missing /etc/bash_completion.d in MakefileGerardo Exequiel Pozzi1-0/+1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-26emove old '-a' option from bash completion and fix '-s' option.Thomas Bächler1-2/+2
2011-06-26Remove old '-m' option from bash completion.Thomas Bächler1-2/+1
2011-06-26Merge branch 'master' of https://github.com/seblu/arch-mkinitcpio into workingThomas Bächler3-4/+45
2011-06-26Add lsinitcpio bash completionSebastien Luttringer1-0/+12
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-26Use error function instead of echoSebastien Luttringer1-2/+2
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-26Print pretty message if no help is defined in hookSebastien Luttringer1-0/+4
Thanks to Dave Reisner for having suggested! Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-26Fix printing of bash usage when asking for a bad hookSebastien Luttringer1-2/+6
before: mkinitcpio -H sex /sbin/mkinitcpio: line 105: /lib/initcpio/install/sex: No such file or directory Help for hook 'sex': GNU bash, version 4.2.10(2)-release (x86_64-unknown-linux-gnu) These shell commands are defined internally. Type `help' to see this list. after: mkinitcpio -H sex ==> ERROR: No hook sex Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-26Add bash completion to mkinitcpioSebastien Luttringer2-0/+21
It's annoying to remember the name of preset each time Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-26Makefile: the Makefile itself is a dep for the manpageDave Reisner1-1/+1
This will force the doc to be regenerated if there is a version bump in the Makefile. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-26functions: support $BASEDIR in modprobeDave Reisner1-1/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-26install/autodetect: refactor and simplify hookDave Reisner2-77/+39
Bashify and refactor to cut back on unnecessary churn. Since our {all,checked}_modules functions always return clean module names, we can add these directly to the autodetect file instead of aggregating them during the autodetect hook and then cleansing one at a time. There's a small speed increase here for the simplest code path. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25Fix some install hooks due recent change in all_modules()Gerardo Exequiel Pozzi4-4/+4
[fw] Avoid inclusion of kernel/sound/firewire [pcmcia] Avoid inclusion of kernel/sound/pcmcia [usb] and [usbinput] Avoid inclusion of ignored modules (via grep cmd) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-25Added usbinput to default hooks (implements FS#19328)Eric Bélanger1-1/+1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
2011-06-25properly support $BASEDIRDave Reisner2-51/+108
This add proper support for a $BASEDIR, wherein as much as possible is taken from the user specified root, instead of mixing and matching binaries and modules. This avoids conflicts, particularly with binaries like udev or module-init-tools which may have newer functionality that the root in the $BASEDIR requires. This is somewhat of a large patch, which involves a few key changes: 1) Add a new class of "private" functions: _add_*, which act as a "back end" for the equivalent non-underscore-prefixed functions. 2) Refactor the add_* family of functions to use these new back end functions. This generally simplifies the logic as we have a clear division of labor. 3) Instead of using ldd, which is a glorified wrapper around the RTLD, create a wrapper around the RTLD and invoke it ourselves. This is basically just a small performance improvement -- the bulk of the parsing done by this function's output is done in pure bash. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25install/{sata,pata,scsi}: cleanup and simplifyDave Reisner3-60/+41
* Use loops where possible for module addition * remove superfluous trim operation * remove antiquated filters for modules which do not exist Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25mkinitcpio: allow absolute paths to preset filesDave Reisner1-2/+6
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25add a PKGBUILD for easier testing from the repoDave Reisner1-0/+25
Inspired by the PKGBUILD included with the initscripts repo Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25mkinitcpio: catch errors in parse_hookDave Reisner2-1/+15
It would be better to catch errors in build as well, but this isn't entirely feasible due to the expectation of some builtins to return non-zero during normal operations (e.g., read returns 1 on EOF). Addresses FS#20661 Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25README: update copyright year, add self as authorDave Reisner1-1/+2
Judging by the blamestat, I think I've earned this. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25mkinitcpio.5: alphabetize options for easier navDave Reisner1-21/+21
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25mkinitcpio: only show usage on requestDave Reisner1-2/+5
Display an actual error message for the user when they enter an incorrect option, or neglect to provide $OPTARG when needed. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25mkinitcpio: allow overriding the compression methodDave Reisner2-1/+13
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25init: remove unnecessary variable declarationsDave Reisner1-7/+2
These don't really serve a purpose and might actually munge a test for an unset var. Declare vars as we need them, substituing with default expansions where possible. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25init: declare PATH, remove absolute pathsDave Reisner7-33/+35
We were never very consistent about this anyways. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25functions: remove get_module_nameDave Reisner1-8/+0
This is no longer used, as all of our module discovery functions will return clean module names. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25install/base: cleanup and simplifyDave Reisner2-23/+13
* Create only the directories that are necessary. If others are needed, they'll be created along the way. As part of this, we create /new_root sooner in init, so it's less jarring to the user if they request a break. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25remove support for -m to add a startup messageDave Reisner4-16/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: declare usage as a heredocDave Reisner1-18/+22
alphabetize the usage while we're at it
2011-06-19install/keymap: refactor and bashifyDave Reisner1-23/+16
Write directly to the build root rather than creating temp files to be added later on. Also cleanup syntax to Bash standards. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19add -t option to specify alternate build directoryDave Reisner3-16/+31
This requires some refactoring of how we handle TMPDIR declaration and creation, as well as protecting the way we do cleanup so that we don't error out when cleanup is called prior to TMPDIR being declared. We also add a shortcut to the build root based on the TMPDIR for convenience. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: bashification, part 2/2Dave Reisner1-8/+7
mostly consists of syntax changes in the hook parsing loop. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: bashification, part 1/2Dave Reisner3-16/+15
Always use bash's [[ ]], and apply (( )) where arithmetic calculations are made. We also take a few other bash shortcuts to simplify code where possible. We also touch the Makefile here to adjust the sed'ing for directory names. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19functions: simplify parse_hookDave Reisner1-16/+9
Since we intentionally word split these variables, a variable containing only white space will never trigger us to iterate on each for loop. Therefore, the existance check is superfluous as it will always pass. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19functions: refactor add_symlinkDave Reisner1-11/+6
We don't need to add the destination directory -- we can assume this will always be added by another function. We also ignore $BASEDIR as we will never be passing in a path that contains a $BASEDIR so we don't want to erroenous trim a path. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19overhaul output, introducing colorDave Reisner4-73/+100
Output style and coloring is borrowed from makepkg with minor adjustments. Most instances where we encounter fatal errors are replaced with a 'die' function to wrap this up neatly. In addition, we introduce the -n flag, for no-color. As a side effect, we need to source the functions file earlier so we have the output functions available earlier. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: remove cruft in getopts loopDave Reisner1-6/+0
We shouldn't guess at what the user does and doesn't want, but rather verify after parsing that what we have is sane. Also, remove the default case label, as this will never be met. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16declare SAVELIST, QUIET, SHOW_AUTOMODS as faux booleansDave Reisner2-10/+9
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: refactor and bashify early path calculationsDave Reisner1-26/+27
This addresses a few issues with creation of images with a $BASEDIR, the most alarming that images would always be created on the real root filesystem, with no regard for any supplied base directory. This also cleans up some repetitive path declaration wrt BASEDIR and MODULEDIR. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16declare all variables in mkinitcpioDave Reisner2-25/+15
We also consolidate our empty variable declarations in mkinitcpio with a simple declare. Signed-off-by: Dave Reisner <d@falconindy.com>