Age | Commit message (Collapse) | Author | Files | Lines |
|
This is required for busybox 1.19.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Done as part of FS#25788.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
As it turns out, the mountpoint toy from util-linux isn't really at
feature parity with sysvinit's. In particular, and with respect to
v2.20:
- It throws false negatives when /proc isn't mounted. Rather, it should
fall back on using stat(2), as is the basis for sysvinit's tool.
- when /proc is mounted with as source of 'none', it segfaults on a null
dereference.
Patches have been sent upstream to resolve these issues, but in the
meantime, we're mounting /dev and /proc for very specific reasons.
Instead of relying on a fork/exec to figure out if these API FS's are
mounted, use a simple bash test to see if these specific needs are
available within the FS.
One of many possible fixes for FS#26344.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
An empty file will be created in any case, does not cause any harm, but for correctness.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
This allow initcpio to boot vm which use virtio as network/disk backend.
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
|
|
If PRESET is set, we're in the main loop, not a worker process. No image
will ever be created here, so there's never a need for saving any build
dir.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
We don't suggest sourcing a .kver file anymore, and it can instead be a
path to a kernel image.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
This is already done in initscripts so we mirror it here.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Also make sure that simple variables are declared as null strings.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
The doubled up leading slashes annoy me in the verbose output.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
* 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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
|
|
Oops.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
* 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
|
|
For distribution, a VERSION file is written to and distributed for
storing the ref.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Broken in 491a99.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
This also removes a superfluous check on MODULEDIR, which is already
covered by get_kernver.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
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>
|
|
|
|
|