Eli Schwartz
db0b093076
pacstrap: use --sysroot instead of --root
...
Does not seem to work, there's no internet connection in the chroot
2018-06-18 03:23:01 -04:00
Eli Schwartz
8f7fc3f5d7
Generate or copy a pacman.conf into the newroot's /tmp directory
...
This makes pacstrap more compatible with migrating from --root to
--sysroot, since the pacman.conf will be required to come from the
newroot itself.
2018-06-18 03:21:48 -04:00
Eli Schwartz
e418a17468
Use bind mounts to reuse the hostcache
...
This avoids depending on pacman --root using the host config, making it
easier to move to --sysroot instead.
2018-05-29 12:03:38 -04:00
Dave Reisner
4b929ea03a
genfstab: add support for prefix matching
...
this allows genfstab to used on running systems to generate entries for
newly added mount points.
2018-05-18 17:18:03 -04:00
Dave Reisner
e4be695f33
arch-chroot: don't require /etc/resolv.conf in the host
...
mansplaining emails shouldn't inspire me to fix things, but here we are.
2018-05-18 17:17:43 -04:00
Dave Reisner
cdb25e135b
arch-chroot: ensure args aren't misinterpreted as chroot options
2018-02-03 09:43:51 -05:00
Dave Reisner
dcd308f373
prepare v18
2018-01-27 07:19:50 -05:00
Dave Reisner
0af6884aca
pacstrap: retire -d flag
...
Similar to 232784ec
, this logic has been around forever with no
discernible value. Retire the flag from the code and documentation, but
leave it behind as a vestige in order to not break scripts found in the
wild.
2018-01-27 07:17:30 -05:00
Dave Reisner
232784ec56
Don't bind mount non-mountpoint directory on itself
...
This essentially reverts 2ace610c
. I'm forgetting the historical context
of what lead to that commit (but note that it predates the first tag).
The only thing I can think of is that genfstab doesn't produce the
correct output when root isn't a mountpoint, but that's a crap reason --
you won't need an fstab when you're calling pacstrap on a directory and
genfstab already complains when the provided root isn't a mountpoint.
2017-11-05 10:14:50 -05:00
Dave Reisner
6c0696b3d4
common: empty initialize rather than mangling environment
...
Instead of mangling the caller's environment, just scope our hexchars
and reinitialize them.
2017-08-20 16:37:04 -04:00
Dave Reisner
0b8efa0e42
common: add cgroup2 as a pseudofs
2017-06-29 08:23:30 -04:00
Dave Reisner
4b781af21f
prune relatime option for psuedofs
2017-06-29 08:23:30 -04:00
Dave Reisner
341c8d66ad
prepare v17
2016-06-12 12:18:36 -04:00
Dave Reisner
9742606666
README: document dependency requirements
...
Yes, you really do need a userspace released some time in the past 3
years to install Arch.
2016-06-12 10:53:13 -04:00
Dave Reisner
bd413f05ce
arch-chroot: fix braino, check for args before shifting
2016-06-12 10:51:04 -04:00
Dave Reisner
daa2fac5b2
genfstab: canonicalize root dir
...
Avoids problems with users passing weird inputs (such as including a
trailing slash).
ref: https://bugs.archlinux.org/task/45753
2016-06-12 10:48:26 -04:00
Dave Reisner
585b1f790f
Merge pull request #27 from jcjordyn130/patch-1
...
Fix the help text
2016-06-12 08:48:58 -04:00
jcjordyn130
50b1ba4d64
Fix the help text
...
Fixed the help text where it says what it will exec
2016-06-11 23:57:16 -05:00
Dave Reisner
cb83a4d3dc
prepare v16
2016-06-11 13:11:06 -04:00
Dave Reisner
a45f28ed81
arch-chroot: die nicely when no chroot directory is passed
2016-06-10 15:36:12 -04:00
Dave Reisner
633d192029
support coreutils chroot's --userspec
2016-04-18 07:05:15 -04:00
Dave Reisner
1b8f4b542c
support chroots without an /etc/resolv.conf
2015-07-04 16:26:49 -04:00
Dave Reisner
69081c9e7e
Thou shalt use /bin/bash
2015-06-30 12:46:52 -04:00
Dave Reisner
42ea087f2d
prepare v15
2015-02-15 14:58:32 -05:00
Dave Reisner
c37db2362a
arch-chroot: handle /etc/resolv.conf as a symlink
...
This is probably going to lead to somewhere in /run, but we may as well
support a symlink to anywhere, as long as it isn't a nested symlink.
ref: https://bugs.archlinux.org/task/43540
2015-01-26 18:12:33 -05:00
Dave Reisner
ae6a0a00ec
genfstab: strip seclabel from optstring
...
People seem to suffer from this, so let's just fix it.
https://www.marshut.net/krqsrn/genfstab-fstab-seclabel-uuid-vs-partuuid-and-arch-wiki.html
https://bbs.archlinux.org/viewtopic.php?pid=1360580
2014-12-26 12:04:05 -05:00
Dave Reisner
67dcb08f4b
genfstab: make -p default behavior, add -P as inverse
...
This should be the default, as you generally don't want to include
pseudofs mounts in your /etc/fstab.
2014-12-26 11:54:24 -05:00
Dave Reisner
e44af861eb
use consistent messaging for chroot_setup failure
2014-12-16 23:15:17 -05:00
Dave Reisner
b5832066c5
rename chroot setup-related functions
...
make it more obvious that these are really related functions.
2014-12-15 23:23:39 -05:00
Dave Reisner
e0eaca918e
fix valid_number_of_base
...
function execution halts entirely on a invalid base, so we never
actually get to our 'return 1'. I'm not sure how our expected failures
ever actually worked, but it's quite plain to see that:
$ a=$(( 2#3 )); echo hi
Never echos "hi". Use a subshell in valid_number_of_base so that we can
properly "trap" execution, and return a meaningful result.
2014-12-15 13:40:00 -05:00
Dave Reisner
25c058a2a2
explicitly exit from TEST_exit
...
This prevents some odd interactions with the EXIT trap, and our last
command's status is seemingly not preserved for the script's real exit.
Add a BASH override to the Makefile as well, as it might be useful for
debugging or testing against other versions of bash.
2014-12-15 08:38:43 -05:00
Dave Reisner
7b4cf9a637
prepare v14
2014-12-12 18:43:21 -05:00
Dave Reisner
2be79c6259
run the chroot in a new PID namespace
...
This automatically tears down any processes remaining in the chroot
when we exit. I'm looking at you, gnupg.
2014-12-11 21:40:52 -05:00
Dave Reisner
02062d2bd6
Merge pull request #21 from abraithwaite/patch-1
...
Remove redundant variable declaration
2014-10-30 18:07:47 -04:00
Alan Braithwaite
a54860044f
Remove redundant variable declaration
...
Unless I'm mistaken, newroot is assigned later, and never referenced in between:
```
(( $# )) || die "No root directory specified"
newroot=$1; shift
```
2014-10-30 14:19:48 -07:00
Dave Reisner
f726f8c22c
genfstab: add vfat quirk
2014-04-06 10:48:15 -04:00
Dave Reisner
80466e0412
common: add support for getting optstr values
2014-04-06 10:48:15 -04:00
Dave Reisner
03121cb504
genfstab: add option quirks for f2fs
...
FS#38019.
2014-04-06 10:48:15 -04:00
Dave Reisner
c0b87a0495
add option twiddling functions
...
these will be used in genfstab
2014-04-06 10:48:15 -04:00
Dave Reisner
7079910d71
common: be explict about in_array return values
...
Not doing this can lead to false positives when checking for existence
in empty arrays.
2014-02-06 17:25:19 -05:00
Dave Reisner
3b58d68669
prepare v13
2014-02-05 15:20:13 -05:00
Dave Reisner
481919edc1
README: fix typo
2014-01-26 15:58:25 -05:00
Dave Reisner
a1b4145ff2
Add tests for some common functions
2013-12-08 22:59:15 -05:00
Dave Reisner
756e831bd5
genfstab: mangle tag values when needed
2013-12-08 22:42:49 -05:00
Dave Reisner
5e5c979126
common: avoid need for fallthrough
2013-12-08 22:42:49 -05:00
Dave Reisner
a93aab3f43
genfstab: fix deleted file parsing
...
backslashes in single quotes don't need escaping. We need to match the
literal string \040deleted.
2013-12-08 22:42:49 -05:00
Dave Reisner
e6f844e367
common: fix errors in valid_number_of_base
...
Instead of trying to do bit twiddling on what might not even be a
number, just try to cast the subject to the target base.
2013-12-07 20:39:15 -05:00
Dave Reisner
1823820546
prepare v12
2013-11-29 14:09:06 -05:00
Dave Reisner
7c53cd416b
common: ignore errors from efivarfs mount failures
...
The existence of /sys/firmware/efi/efivars only indicates that we've
booted the kernel in EFI mode. It does not guarantee that the same
kernel has support for efivarfs. Since this isn't critical, don't fail
the whole api mount.
2013-11-29 14:08:37 -05:00
Dave Reisner
0270a2d3b9
common: quote conditional for efivar mount
...
Prevents failures when the chroot base contains whitespace.
2013-11-15 14:53:58 -05:00