Fixes invalid symlink paths for /dev/fd, /dev/stderr, /dev/stdin, /dev/stdout in arch-chroot when run in unshare mode.
Signed-off-by: Aleksandr Ksenofontov <github@sashok724.net>
* origin/pull/51:
pacstrap: silence "only applied to the deepest dir"
arch-chroot: split variable declaration and assignment
Add gitlab-ci based on the mkinitcpio one
Add .editorconfig, from mkinitcpio
tests: silence "referenced but not assigned" warnings
tests: remove non-applicable ${1} handling
common: split genfstab only helpers
common: quote all arguments
common: disable shellcheck SC2059
common: remove unused msg2()
common: remove unused is_array()
Shellcheck warns that only the deepest directory created will have the
requested permissions. That's fine - this is exactly what we want.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
As suggested by shellcheck:
In arch-chroot line 164:
local src=$(resolve_link /etc/resolv.conf)
^-^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In arch-chroot line 165:
local dest=$(resolve_link "$chrootdir/etc/resolv.conf" "$chrootdir")
^--^ SC2155 (warning): Declare and assign separately to avoid masking return values.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The in-tree config was seemingly never tested, since it fails loudly.
Copy/paste the mkinitcpio one and drop the non-applicable bat/coverage
sections.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Direct copy from mkinitcpio.
Note that the in-tree code-base consistently uses 2 space and redoing
that will be done at misc later point.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The optstring* helpers do the assignment, which isn't particularly easy
for shellcheck to deduce. So silence the warnings.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The arg was never set. Furthermore as-is shellcheck cannot realistically
evaluate the included source.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
As the inline comment says, the arguments are the actual modifiers.
Shout out to YHNdnzj for spotting this o/
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The function hasn't been in use for a number of years.
Cc: Dave Reisner <dreisner@archlinux.org>
Fixes: b240f6e ("common: declare pseudofs types as hash")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
There is a comprehensive inline comment about why we're touching the
chroot resolv.conf. Although it does not consider the cases where:
- the link may be broken for specific reasons, and/or
- working resolver within the chroot is not wanted
v2:
- flip the condition check
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* origin/pull/48:
zsh: pacstrap bring it up-to date
zsh: genfstab bring it up-to date
zsh: arch-chroot bring it up-to date
zsh: simplify arch-chroot and genfstab completion
zsh: split completion into separate files
make: move bash/zsh completions to separate directories
Add -N (simple flag) -u (user/group), plus new directory and command
handling. The vast chunk of these are borrowed by the chroot completion,
as the inline comment indicates.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This will allow us to easily update and keep up-to date these two. The
final pacstrap one is fairly hairy and will be dealt with another time.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The current file is borderline impossible to manage by zsh completion
noobies. Split it up for now, where follow-up commits will simplify
things.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Having only one of subvol= and subvolid= is enough for mounting a btrfs subvolume
And having subvolid= set prevents things like 'snapper rollback' to work, as it
updates the subvolume in-place, leaving subvol= unchanged with a different subvolid.